musl
This commit is contained in:
parent
44c3e728d1
commit
47bdebcc0f
2 changed files with 30 additions and 0 deletions
|
@ -29,5 +29,10 @@ COPY --from=build /srv/http /srv/http
|
|||
RUN install -dm 2750 -o app -g www-data /srv/gems
|
||||
RUN chmod 755 /usr/local/bin/geminabox
|
||||
|
||||
# https://github.com/rubygems/rubygems/issues/2918
|
||||
# https://gitlab.alpinelinux.org/alpine/aports/issues/10808
|
||||
COPY ./rubygems-platform-musl.patch /tmp/
|
||||
RUN patch -d /usr/lib/ruby/2.5.0 -Np 0 -i /tmp/rubygems-platform-musl.patch
|
||||
|
||||
EXPOSE 9292
|
||||
VOLUME /srv/gems
|
||||
|
|
25
rubygems-platform-musl.patch
Normal file
25
rubygems-platform-musl.patch
Normal file
|
@ -0,0 +1,25 @@
|
|||
--- rubygems/platform.rb.orig
|
||||
+++ rubygems/platform.rb
|
||||
@@ -89,7 +89,7 @@
|
||||
when /^dalvik(\d+)?$/ then [ 'dalvik', $1 ]
|
||||
when /^dotnet$/ then [ 'dotnet', nil ]
|
||||
when /^dotnet([\d.]*)/ then [ 'dotnet', $1 ]
|
||||
- when /linux/ then [ 'linux', $1 ]
|
||||
+ when /linux-?(\w+)?/ then [ 'linux', $1 ]
|
||||
when /mingw32/ then [ 'mingw32', nil ]
|
||||
when /(mswin\d+)(\_(\d+))?/ then
|
||||
os, version = $1, $3
|
||||
--- rubygems.rb.orig
|
||||
+++ rubygems.rb
|
||||
@@ -764,10 +764,7 @@
|
||||
def self.platforms
|
||||
@platforms ||= []
|
||||
if @platforms.empty?
|
||||
- # XXX: Patched to avoid installing platform-specific gems with binaries
|
||||
- # linked against glibc.
|
||||
- @platforms = [Gem::Platform::RUBY]
|
||||
- #@platforms = [Gem::Platform::RUBY, Gem::Platform.local]
|
||||
+ @platforms = [Gem::Platform::RUBY, Gem::Platform.local]
|
||||
end
|
||||
@platforms
|
||||
end
|
Loading…
Reference in a new issue