Skip to content
Snippets Groups Projects
Verified Commit ffd10bfe authored by Louis-Philippe Véronneau's avatar Louis-Philippe Véronneau
Browse files

d/patches: delete 0007 and don't add /usr/lib/ruby/vendor_ruby to the jruby...

d/patches: delete 0007 and don't add /usr/lib/ruby/vendor_ruby to the jruby LOAD_PATH anymore. (Closes: #977979, #977981)
parent a39ac050
No related branches found
No related tags found
No related merge requests found
jruby (9.2.14.0-1) unstable; urgency=medium
Since jruby 9.2.14 only targets ruby2.5 compatbility and since Debian now
packages ruby2.7-compatible gems, support for loading ruby libraries from
/usr/lib/ruby/vendor_ruby has been removed from this version of jruby.
.
This change might introduce breakage if you depended on this feature. See
BTS #977981 for more details.
-- Louis-Philippe Véronneau <pollo@debian.org> Fri, 01 Jan 2021 15:00:04 -0500
......@@ -15,6 +15,8 @@ jruby (9.2.14.0-1) UNRELEASED; urgency=medium
* d/rules: fix where ruby2.7 libs are copied from for the testsuite.
(Closes: #976477)
* d/rules: remove get-orig-source target.
* d/patches: delete 0007 and don't add /usr/lib/ruby/vendor_ruby to the
jruby LOAD_PATH anymore. (Closes: #977979, #977981)
[ Thomas Goirand ]
* New upstream release.
......
Description: Add /usr/lib/ruby/vendor_ruby to default LOAD_PATH
Author: Miguel Landaeta <nomadium@debian.org>
Bug-Debian: https://bugs.debian.org/663342
Forwarded: no
Last-Update: 2020-12-28
Index: jruby/core/src/main/java/org/jruby/ext/rbconfig/RbConfigLibrary.java
===================================================================
--- jruby.orig/core/src/main/java/org/jruby/ext/rbconfig/RbConfigLibrary.java
+++ jruby/core/src/main/java/org/jruby/ext/rbconfig/RbConfigLibrary.java
@@ -61,6 +61,8 @@ public class RbConfigLibrary implements
private static final String RUBY_DRAGONFLYBSD = "dragonflybsd";
private static final String RUBY_AIX = "aix";
+ private static final String MRI_VENDOR_LIBDIR = "/usr/lib/ruby/vendor_ruby";
+
private static String normalizedHome;
/** This is a map from Java's "friendly" OS names to those used by Ruby */
@@ -182,6 +184,10 @@ public class RbConfigLibrary implements
return newFile(getRubyLibDir(runtime), "vendor_ruby").getPath();
}
+ public static String getMRIVendorLibDir(Ruby runtime) {
+ return SafePropertyAccessor.getProperty("debian.mri.vendor.libdir", MRI_VENDOR_LIBDIR);
+ }
+
public static String getVendorLibDir(Ruby runtime) {
return getVendorDir(runtime);
}
@@ -302,6 +308,7 @@ public class RbConfigLibrary implements
String rubyLibDir = getRubyLibDir(runtime);
String archDir = getArchDir(runtime);
String vendorDir = getVendorDir(runtime);
+ String vendorMRILibDir = getMRIVendorLibDir(runtime);
String vendorLibDir = getVendorLibDir(runtime);
String vendorArchDir = getVendorArchDir(runtime);
String siteDir = getSiteDir(runtime);
@@ -318,6 +325,7 @@ public class RbConfigLibrary implements
setConfig(context, CONFIG, "vendorlibdir", vendorLibDir);
setConfig(context, CONFIG, "vendorarchdir", vendorArchDir);
}
+ setConfig(context, CONFIG, "mri_vendor_libdir", vendorMRILibDir);
setConfig(context, CONFIG, "sitedir", siteDir);
setConfig(context, CONFIG, "sitelibdir", siteLibDir);
setConfig(context, CONFIG, "sitearchdir", siteArchDir);
Index: jruby/core/src/main/java/org/jruby/runtime/load/LoadService.java
===================================================================
--- jruby.orig/core/src/main/java/org/jruby/runtime/load/LoadService.java
+++ jruby/core/src/main/java/org/jruby/runtime/load/LoadService.java
@@ -73,6 +73,7 @@ import org.jruby.runtime.ThreadContext;
import org.jruby.runtime.builtin.IRubyObject;
import org.jruby.util.FileResource;
import org.jruby.util.JRubyFile;
+import org.jruby.util.SafePropertyAccessor;
import org.jruby.util.collections.StringArraySet;
import org.jruby.util.log.Logger;
import org.jruby.util.log.LoggerFactory;
@@ -254,6 +255,11 @@ public class LoadService {
addPath(RbConfigLibrary.getRubyLibDir(runtime));
}
+ // Allow jruby to load libraries installed in the system
+ if (SafePropertyAccessor.getBoolean("debian.include.mri_vendor_libdir_in_load_path", false)) {
+ addPath(RbConfigLibrary.getMRIVendorLibDir(runtime));
+ }
+
} catch(SecurityException ignore) {}
addPaths(runtime.getInstanceConfig().getExtraLoadPaths());
}
Index: jruby/bin/jruby.bash
===================================================================
--- jruby.orig/bin/jruby.bash
+++ jruby/bin/jruby.bash
@@ -429,6 +429,7 @@ fi
jvm_command+=("-Djruby.home=$JRUBY_HOME" \
"-Djruby.lib=$JRUBY_HOME/lib" "-Djruby.script=jruby" \
"-Djruby.shell=$JRUBY_SHELL" \
+ "-Ddebian.include.mri_vendor_libdir_in_load_path=true" \
"$java_class" "$@")
add_log
0004-Add-missing-maven-artifacts-pom-files.patch
0005-Disable-jnr-ffi-native-usage.patch
0006-Disable-maven-jruby-jars-artifact.patch
0007-Add-usr-lib-ruby-vendor-ruby-to-load-path.patch
0008-Configure-unit-tests-to-run-at-build-time.patch
#0010-Exclude-mri-tests-failing-in-debian.patch
0011-Disable-failed-tests-in-sbuild.patch
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment