summaryrefslogtreecommitdiff
path: root/system/ruby/rubygems-avoid-platform-specific-gems.patch
diff options
context:
space:
mode:
authorA. Wilcox <AWilcox@Wilcox-Tech.com>2018-06-24 03:07:52 -0500
committerA. Wilcox <AWilcox@Wilcox-Tech.com>2018-06-24 03:07:52 -0500
commit965d80ca4ac1c981343de938f066f5c6627a716a (patch)
treeeb2f89411cd5a5042e930d86871fa7dda84c833f /system/ruby/rubygems-avoid-platform-specific-gems.patch
parentb34e6fe698af4901a2a662cc0ce671afa755e121 (diff)
downloadpackages-965d80ca4ac1c981343de938f066f5c6627a716a.tar.gz
packages-965d80ca4ac1c981343de938f066f5c6627a716a.tar.bz2
packages-965d80ca4ac1c981343de938f066f5c6627a716a.tar.xz
packages-965d80ca4ac1c981343de938f066f5c6627a716a.zip
system/ruby: pull in for asciidoctor
Diffstat (limited to 'system/ruby/rubygems-avoid-platform-specific-gems.patch')
-rw-r--r--system/ruby/rubygems-avoid-platform-specific-gems.patch31
1 files changed, 31 insertions, 0 deletions
diff --git a/system/ruby/rubygems-avoid-platform-specific-gems.patch b/system/ruby/rubygems-avoid-platform-specific-gems.patch
new file mode 100644
index 000000000..74a536558
--- /dev/null
+++ b/system/ruby/rubygems-avoid-platform-specific-gems.patch
@@ -0,0 +1,31 @@
+From: Jakub Jirutka <jakub@jirutka.cz>
+Date: Fri, 19 May 2017 19:56:00 +0200
+Subject: [PATCH] Rubygems: don't install platform-specific gems
+
+Gems with native extensions typically contain just source code that is
+built during installation on user's system. However, Rubygems allows to
+publish even platform-specific gems with prebuilt binaries for specific
+platform. The problem is that Rubygems uses only short platform
+identification like x86_64-linux; it does not identify used libc.
+And sadly platform-specific gems for linux are built against glibc, so
+they may not work on musl libc.
+
+This patch is a workaround for the aforesaid problem. It removes local
+platform from Rubygems' supported platforms to force it always pick
+a platform-agnostic (source) gem. Users can override it using
+`--platform` option.
+
+--- a/lib/rubygems.rb
++++ b/lib/rubygems.rb
+@@ -743,7 +743,10 @@
+ def self.platforms
+ @platforms ||= []
+ if @platforms.empty?
+- @platforms = [Gem::Platform::RUBY, Gem::Platform.local]
++ # XXX: Patched to avoid installing platform-specific gems with binaries
++ # linked against glibc.
++ @platforms = [Gem::Platform::RUBY]
++ #@platforms = [Gem::Platform::RUBY, Gem::Platform.local]
+ end
+ @platforms
+ end