Dne 15. 10. 23 v 1:48 Mamoru TASAKA napsal(a):
Vít Ondruch wrote on 2023/10/13 0:20:Hi,I am back again with yet another update, this time to e029375a7d. The changes are in the PR:Vít, would you take a look at this change? https://github.com/rubygems/rubygems/pull/5327In ruby.git , these are imported from 7aebe2a52bac2a925c475c511640ad13a7d20490 to9dcaa832592af0125ba6407a506b2b3953b2f81c , I guess. Perhaps due to the above changes:[A] now "gem build ../foo-version.spec" as we usually do in rubygem-foo.spec fails like:--------------------------------------------------------- + gem build ../Ascii85-1.1.0.gemspecDefaulting to user installation because default GEM_HOME (/usr/share/gems) is not writable. Invalid gemspec in [../Ascii85-1.1.0.gemspec]: ../Ascii85-1.1.0.gemspec:1: unknown regexp options - har...se default GEM_HOME (/usr/share/gems) is not writable. ... ^~~~~~../Ascii85-1.1.0.gemspec:1: syntax error, unexpected local variable or method, expecting end-of-input...t GEM_HOME (/usr/share/gems) is not writable. ... ^~ ERROR: Error loading gemspec. Aborting. error: Bad exit status from /var/tmp/rpm-tmp.Cvl7rH (%build) --------------------------------------------------------- So this affects (breaks) almost all of Fedora rubygem- packages.
I have decided to workaround this by simple patch which just disables printing this message:
https://src.fedoraproject.org/fork/vondruch/rpms/ruby/c/555691277a4134a9779084c3d2bba5da89332534 This keeps the things most in line with upstream.The question still is if we should remove the operating_system.rb override for user install. Probably not at this time, because we do more then just simply enabling user installation. And the current implementation is doing too much heuristics :/
[B] Also, even if I workaround this, %gem_install , i.e.$ gem install -V --local --build-root . --force --document=ri,rdoc %{gem_name}-%{version}.gemnow installs files under $HOME/.local: ---------------------------------------------------------+ gem install -V --local --build-root . --force --document=ri,rdoc Ascii85-1.1.0.gem Defaulting to user installation because default GEM_HOME (/usr/share/gems) is not writable.WARNING: You build with buildroot. Build root: /builddir/build/BUILD/Ascii85-1.1.0Bin dir: /builddir/build/BUILD/Ascii85-1.1.0/builddir/.local/share/gem/ruby/bin Gem home: /builddir/build/BUILD/Ascii85-1.1.0/builddir/.local/share/gem/ruby Plugins dir: /builddir/build/BUILD/Ascii85-1.1.0/builddir/.local/share/gem/ruby/plugins /builddir/build/BUILD/Ascii85-1.1.0/builddir/.local/share/gem/ruby/gems/Ascii85-1.1.0/.travis.yml /builddir/build/BUILD/Ascii85-1.1.0/builddir/.local/share/gem/ruby/gems/Ascii85-1.1.0/Ascii85.gemspec /builddir/build/BUILD/Ascii85-1.1.0/builddir/.local/share/gem/ruby/gems/Ascii85-1.1.0/Gemfile /builddir/build/BUILD/Ascii85-1.1.0/builddir/.local/share/gem/ruby/gems/Ascii85-1.1.0/History.txt /builddir/build/BUILD/Ascii85-1.1.0/builddir/.local/share/gem/ruby/gems/Ascii85-1.1.0/LICENSE /builddir/build/BUILD/Ascii85-1.1.0/builddir/.local/share/gem/ruby/gems/Ascii85-1.1.0/README.md /builddir/build/BUILD/Ascii85-1.1.0/builddir/.local/share/gem/ruby/gems/Ascii85-1.1.0/Rakefile /builddir/build/BUILD/Ascii85-1.1.0/builddir/.local/share/gem/ruby/gems/Ascii85-1.1.0/bin/ascii85 /builddir/build/BUILD/Ascii85-1.1.0/builddir/.local/share/gem/ruby/gems/Ascii85-1.1.0/lib/Ascii85/version.rb /builddir/build/BUILD/Ascii85-1.1.0/builddir/.local/share/gem/ruby/gems/Ascii85-1.1.0/lib/ascii85.rb /builddir/build/BUILD/Ascii85-1.1.0/builddir/.local/share/gem/ruby/gems/Ascii85-1.1.0/spec/lib/ascii85_spec.rb /builddir/build/BUILD/Ascii85-1.1.0/builddir/.local/share/gem/ruby/bin/ascii85---------------------------------------------------------
I have decided to revert to use `--install-dir` again: https://src.fedoraproject.org/fork/vondruch/rpms/ruby/c/682a0ee3599884734f7ad6c45955173586cb331f In addition, I have submitted this PR to improve the logic a bit: https://github.com/rubygems/rubygems/pull/7100(this might also help to our case, where we need to specify `--no-user-install` when somebody wish to use `--install-dir`).
And also this ticket in a hope to improve the situation more broadly, but I am not very hopeful it will change much:
https://github.com/rubygems/rubygems/issues/7089But I wish the StdLib gems were installed into different directory then the rest of `gem install`ed gems. I think that would help us tremendously.
Vít
OpenPGP_signature.asc
Description: OpenPGP digital signature
_______________________________________________ ruby-sig mailing list -- ruby-sig@lists.fedoraproject.org To unsubscribe send an email to ruby-sig-le...@lists.fedoraproject.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/ruby-sig@lists.fedoraproject.org Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue