when loading the ruby library it was only doing ruby_init(), but it didn't
setup the load path at all. this caused it to fail loading 'rbconfig'. with jeremy@
This commit is contained in:
parent
71a0cb46b1
commit
5ba851d38e
@ -1,9 +1,9 @@
|
||||
# $OpenBSD: Makefile,v 1.11 2015/07/16 05:25:50 jasper Exp $
|
||||
# $OpenBSD: Makefile,v 1.12 2015/07/16 15:52:01 jasper Exp $
|
||||
|
||||
COMMENT = collect and display system facts
|
||||
|
||||
DISTNAME = facter-3.0.1
|
||||
REVISION = 9
|
||||
REVISION = 10
|
||||
SHARED_LIBS += facter 3.0 # 3.0
|
||||
PKGSPEC = facter->=3.0,<4.0
|
||||
CATEGORIES = sysutils
|
||||
|
14
sysutils/facter/patches/patch-lib_inc_internal_ruby_api_hpp
Normal file
14
sysutils/facter/patches/patch-lib_inc_internal_ruby_api_hpp
Normal file
@ -0,0 +1,14 @@
|
||||
$OpenBSD: patch-lib_inc_internal_ruby_api_hpp,v 1.1 2015/07/16 15:52:01 jasper Exp $
|
||||
|
||||
Initialize the ruby loadpath ($:) so that rbconfig.rb gets loaded.
|
||||
|
||||
--- lib/inc/internal/ruby/api.hpp.orig Thu Jul 16 09:36:21 2015
|
||||
+++ lib/inc/internal/ruby/api.hpp Thu Jul 16 09:39:27 2015
|
||||
@@ -619,6 +619,7 @@ namespace facter { namespace ruby {
|
||||
void (* const ruby_init)();
|
||||
void* (* const ruby_options)(int, char**);
|
||||
int (* const ruby_cleanup)(volatile int);
|
||||
+ void (* const ruby_init_loadpath)();
|
||||
|
||||
static std::unique_ptr<api> create();
|
||||
static facter::util::dynamic_library find_library();
|
23
sysutils/facter/patches/patch-lib_src_ruby_api_cc
Normal file
23
sysutils/facter/patches/patch-lib_src_ruby_api_cc
Normal file
@ -0,0 +1,23 @@
|
||||
$OpenBSD: patch-lib_src_ruby_api_cc,v 1.3 2015/07/16 15:52:01 jasper Exp $
|
||||
|
||||
Initialize the ruby loadpath ($:) so that rbconfig.rb gets loaded.
|
||||
|
||||
--- lib/src/ruby/api.cc.orig Thu Jun 25 17:47:38 2015
|
||||
+++ lib/src/ruby/api.cc Thu Jul 16 09:46:32 2015
|
||||
@@ -98,6 +98,7 @@ namespace facter { namespace ruby {
|
||||
LOAD_SYMBOL(ruby_init),
|
||||
LOAD_SYMBOL(ruby_options),
|
||||
LOAD_SYMBOL(ruby_cleanup),
|
||||
+ LOAD_SYMBOL(ruby_init_loadpath),
|
||||
_library(move(library))
|
||||
{
|
||||
}
|
||||
@@ -157,6 +158,8 @@ namespace facter { namespace ruby {
|
||||
} else {
|
||||
ruby_init();
|
||||
}
|
||||
+
|
||||
+ ruby_init_loadpath();
|
||||
|
||||
LOG_INFO("using ruby version %1% to resolve custom facts.", to_string(rb_const_get(*rb_cObject, rb_intern("RUBY_VERSION"))));
|
||||
|
Loading…
Reference in New Issue
Block a user