Skip to content
Snippets Groups Projects
Commit 58231509 authored by Jakub Jirutka's avatar Jakub Jirutka :flag_ua:
Browse files

main/ruby: patch Rubygems to avoid fetching platform-specific gems

For more information see description in the patch file.
parent 2a876880
No related branches found
No related tags found
No related merge requests found
......@@ -4,7 +4,7 @@
pkgname=ruby
pkgver=2.4.1
_abiver="${pkgver%.*}.0"
pkgrel=2
pkgrel=3
pkgdesc="An object-oriented language for quick and easy programming"
url="http://www.ruby-lang.org/en/"
arch="all"
......@@ -28,7 +28,8 @@ subpackages="$pkgname-doc $pkgname-dev
$pkgname-xmlrpc::noarch
$pkgname-libs
"
source="ftp://ftp.ruby-lang.org/pub/ruby/${pkgver%.*}/$pkgname-$pkgver.tar.bz2"
source="ftp://ftp.ruby-lang.org/pub/ruby/${pkgver%.*}/$pkgname-$pkgver.tar.bz2
rubygems-avoid-platform-specific-gems.patch"
options="!fhs"
replaces="ruby-gems"
builddir="$srcdir/$pkgname-$pkgver"
......@@ -225,4 +226,5 @@ _mvgem() {
done
}
sha512sums="1c80d4c30ecb51758a193b26b76802a06d214de7f15570f1e85b5fae4cec81bda7237f086b81f6f2b5767f2e93d347ad1fa3f49d7b5c2e084d5f57c419503f74 ruby-2.4.1.tar.bz2"
sha512sums="1c80d4c30ecb51758a193b26b76802a06d214de7f15570f1e85b5fae4cec81bda7237f086b81f6f2b5767f2e93d347ad1fa3f49d7b5c2e084d5f57c419503f74 ruby-2.4.1.tar.bz2
cfdc5ea3b2e2ea69c51f38e8e2180cb1dc27008ca55cc6301f142ebafdbab31c3379b3b6bba9ff543153876dd98ed2ad194df3255b7ea77a62e931c935f80538 rubygems-avoid-platform-specific-gems.patch"
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
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