1 From: Jakub Jirutka <jakub@jirutka.cz>
2 Date: Fri, 19 May 2017 19:56:00 +0200
3 Subject: [PATCH] Rubygems: don't install platform-specific gems
5 Gems with native extensions typically contain just source code that is
6 built during installation on user's system. However, Rubygems allows to
7 publish even platform-specific gems with prebuilt binaries for specific
8 platform. The problem is that Rubygems uses only short platform
9 identification like x86_64-linux; it does not identify used libc.
10 And sadly platform-specific gems for linux are built against glibc, so
11 they may not work on musl libc.
13 This patch is a workaround for the aforesaid problem. It removes local
14 platform from Rubygems' supported platforms to force it always pick
15 a platform-agnostic (source) gem. Users can override it using
24 - @platforms = [Gem::Platform::RUBY, Gem::Platform.local]
25 + # XXX: Patched to avoid installing platform-specific gems with binaries
26 + # linked against glibc.
27 + @platforms = [Gem::Platform::RUBY]
28 + #@platforms = [Gem::Platform::RUBY, Gem::Platform.local]