[#92070] [Ruby trunk Feature#15667] Introduce malloc_trim(0) in full gc cycles — sam.saffron@...
Issue #15667 has been updated by sam.saffron (Sam Saffron).
3 messages
2019/04/01
[ruby-core:92398] [Ruby trunk Bug#15787] rubygems.rb on read-only volume
From:
wishdev@...
Date:
2019-04-24 13:47:36 UTC
List:
ruby-core #92398
Issue #15787 has been updated by wishdev (John Higgins).
There is no such requirement as rubygems.rb in that folder being written to=
. I run locked down lxc containers on a daily basis that have no such writi=
ng ability (read only roots) and ruby works just fine. That folder is also =
not generally writeable on my systems for a standard user either even if th=
e root is not read only.
I'm also generally unaware (and I could be very wrong) but there is no "lis=
t" of installed gems anywhere that I can find.
I don't believe you are barking up the correct tree here.
The file you mention is required to be readable because it is the core of t=
he rubygems module - but there is nothing written to that file at all.
----------------------------------------
Bug #15787: rubygems.rb on read-only volume
https://bugs.ruby-lang.org/issues/15787#change-77756
* Author: extrowerk (Zolt=E1n Mizsei)
* Status: Open
* Priority: Normal
* Assignee: =
* Target version: =
* ruby -v: ruby 2.6.3p62 (2019-04-16 revision 67580) [x86_64-haiku]
* Backport: 2.4: UNKNOWN, 2.5: UNKNOWN, 2.6: UNKNOWN
----------------------------------------
On Haiku the package management just virtually extracts/populates the files=
, and as it doesn't have write-overlay feature, the populated files are rea=
d-only.
Issue: Ruby has to maintain a list of installed gems in a single file, in r=
ubygems.rb. Ruby stats this file, and bails out if it is read-only:
```
~ =BB ruby --version
ruby 2.6.3p62 (2019-04-16 revision 67580) [x86_64-haiku]
~ =BB ruby
Traceback (most recent call last):
1: from <internal:gem_prelude>:2:in `<internal:gem_prelude>'
<internal:gem_prelude>:2:in `require': Operation not supported -- /boot/sys=
tem/lib/ruby/2.6.0/rubygems.rb (LoadError)
~ =BB ls -la /boot/system/lib/ruby/2.6.0/rubygems.rb
-r--r--r-- 1 user root 36970 m=E1rc. 6 10:01 /boot/system/lib/ruby/2.6.0/r=
ubygems.rb
~ =BB uname -a
Haiku shredder 1 hrev53091 Apr 22 2019 22:17:21 x86_64 x86_64 Haiku
``` =
The 2.2.x branch was not affected, but since 2.3 every version have this pr=
oblem. Happens here: https://github.com/ruby/ruby/blob/trunk/ruby.c#L2098
Either it has to create this file somewhere in non-packaged (this is the wr=
iteable folderstructure) and hope it won't get out of sync when pkgman (pac=
kage updater software) updates Ruby packages, or it has to be fixed to enum=
erate them directly by examining the directories.
The fact that this file is located in a packaged tree also hints that Ruby =
will probably want to also use packaged location for manual gems installs, =
which obviously won't work either.
Question: is it possible to force/instrument ruby to use a user-specific "r=
ubygems.rb" if the system one read only?
Probably this problem exists on other platforms too, where the user doesn't=
have write-right to this file. How is it handled?
Thank You!
-- =
https://bugs.ruby-lang.org/
Unsubscribe: <mailto:ruby-core-request@ruby-lang.org?subject=3Dunsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>