After rubygem-sinatra was upgraded to 4.0.0, oxidized fails to start with oxidized-web. The error, displayed when run with '-d': $ /usr/local/bin/oxidized -d oxidized-web not found: sudo gem install oxidized-web - \ or disable web support by setting "rest: false" in your configuration /usr/local/lib/ruby/gems/3.2/gems/oxidized-0.29.1/lib/oxidized/core.rb:23:in `rescue in initialize': oxidized-web not found: sudo gem install oxidized-web - \ (Oxidized::OxidizedError) or disable web support by setting "rest: false" in your configuration from /usr/local/lib/ruby/gems/3.2/gems/oxidized-0.29.1/lib/oxidized/core.rb:20:in `initialize' from /usr/local/lib/ruby/gems/3.2/gems/oxidized-0.29.1/lib/oxidized/core.rb:4:in `new' from /usr/local/lib/ruby/gems/3.2/gems/oxidized-0.29.1/lib/oxidized/core.rb:4:in `new' from /usr/local/lib/ruby/gems/3.2/gems/oxidized-0.29.1/lib/oxidized/cli.rb:13:in `run' from /usr/local/lib/ruby/gems/3.2/gems/oxidized-0.29.1/bin/oxidized:8:in `<top (required)>' from /usr/local/bin/oxidized:25:in `load' from /usr/local/bin/oxidized:25:in `<main>' /usr/local/lib/ruby/site_ruby/3.2/rubygems/specification.rb:2312:in `raise_if_conflicts': Unable to activate oxidized-web-0.13.1, because sinatra-4.0.0 conflicts with sinatra (~> 3.0, >= 3.0.6) (Gem::ConflictError) from /usr/local/lib/ruby/site_ruby/3.2/rubygems/specification.rb:1443:in `activate' from /usr/local/lib/ruby/site_ruby/3.2/rubygems.rb:210:in `rescue in try_activate' from /usr/local/lib/ruby/site_ruby/3.2/rubygems.rb:203:in `try_activate' from <internal:/usr/local/lib/ruby/site_ruby/3.2/rubygems/core_ext/kernel_require.rb>:155:in `rescue in require' from <internal:/usr/local/lib/ruby/site_ruby/3.2/rubygems/core_ext/kernel_require.rb>:40:in `require' from /usr/local/lib/ruby/gems/3.2/gems/oxidized-0.29.1/lib/oxidized/core.rb:21:in `initialize' from /usr/local/lib/ruby/gems/3.2/gems/oxidized-0.29.1/lib/oxidized/core.rb:4:in `new' from /usr/local/lib/ruby/gems/3.2/gems/oxidized-0.29.1/lib/oxidized/core.rb:4:in `new' from /usr/local/lib/ruby/gems/3.2/gems/oxidized-0.29.1/lib/oxidized/cli.rb:13:in `run' from /usr/local/lib/ruby/gems/3.2/gems/oxidized-0.29.1/bin/oxidized:8:in `<top (required)>' from /usr/local/bin/oxidized:25:in `load' from /usr/local/bin/oxidized:25:in `<main>' /usr/local/lib/ruby/site_ruby/3.2/rubygems/specification.rb:1471:in `block in activate_dependencies': can't satisfy 'sinatra (~> 3.0, >= 3.0.6)', already activated 'sinatra-4.0.0' (Gem::LoadError) from /usr/local/lib/ruby/site_ruby/3.2/rubygems/specification.rb:1463:in `each' from /usr/local/lib/ruby/site_ruby/3.2/rubygems/specification.rb:1463:in `activate_dependencies' from /usr/local/lib/ruby/site_ruby/3.2/rubygems/specification.rb:1445:in `activate' from /usr/local/lib/ruby/site_ruby/3.2/rubygems.rb:204:in `try_activate' from <internal:/usr/local/lib/ruby/site_ruby/3.2/rubygems/core_ext/kernel_require.rb>:155:in `rescue in require' from <internal:/usr/local/lib/ruby/site_ruby/3.2/rubygems/core_ext/kernel_require.rb>:40:in `require' from /usr/local/lib/ruby/gems/3.2/gems/oxidized-0.29.1/lib/oxidized/core.rb:21:in `initialize' from /usr/local/lib/ruby/gems/3.2/gems/oxidized-0.29.1/lib/oxidized/core.rb:4:in `new' from /usr/local/lib/ruby/gems/3.2/gems/oxidized-0.29.1/lib/oxidized/core.rb:4:in `new' from /usr/local/lib/ruby/gems/3.2/gems/oxidized-0.29.1/lib/oxidized/cli.rb:13:in `run' from /usr/local/lib/ruby/gems/3.2/gems/oxidized-0.29.1/bin/oxidized:8:in `<top (required)>' from /usr/local/bin/oxidized:25:in `load' from /usr/local/bin/oxidized:25:in `<main>' <internal:/usr/local/lib/ruby/site_ruby/3.2/rubygems/core_ext/kernel_require.rb>:86:in `require': cannot load such file -- oxidized/web (LoadError) from <internal:/usr/local/lib/ruby/site_ruby/3.2/rubygems/core_ext/kernel_require.rb>:86:in `require' from /usr/local/lib/ruby/gems/3.2/gems/oxidized-0.29.1/lib/oxidized/core.rb:21:in `initialize' from /usr/local/lib/ruby/gems/3.2/gems/oxidized-0.29.1/lib/oxidized/core.rb:4:in `new' from /usr/local/lib/ruby/gems/3.2/gems/oxidized-0.29.1/lib/oxidized/core.rb:4:in `new' from /usr/local/lib/ruby/gems/3.2/gems/oxidized-0.29.1/lib/oxidized/cli.rb:13:in `run' from /usr/local/lib/ruby/gems/3.2/gems/oxidized-0.29.1/bin/oxidized:8:in `<top (required)>' from /usr/local/bin/oxidized:25:in `load' from /usr/local/bin/oxidized:25:in `<main>' The problem seems to be: "Unable to activate oxidized-web-0.13.1, because sinatra-4.0.0 conflicts with sinatra (~> 3.0, >= 3.0.6) (Gem::ConflictError)"
Created attachment 248825 [details] Updates gemspec requirements to allow for sinatra 4.0 Updates the existing patch to allow for updated versions of rubygem-sinatra and rubygem-sinatra-contrib in ports. Tested building in poudriere and updating on running server. UI now starts up and no errors found yet.
Fails to start, probably broken by https://cgit.freebsd.org/ports/commit/?id=d86e4213df64cb407a2ccf2ba5ddc6a2e15b9c20 Error now, with my patch is: /usr/local/lib/ruby/site_ruby/3.2/rubygems/dependency.rb:313:in `to_specs': Could not find 'rack-test' (~> 0.7.0) among 37 total gem(s) (Gem::MissingSpecError) Checked in 'GEM_PATH=/var/db/oxidized/.local/share/gem/ruby/3.2:/usr/local/lib/ruby/gems/3.2' , execute `gem env` for more information from /usr/local/lib/ruby/site_ruby/3.2/rubygems/specification.rb:1478:in `block in activate_dependencies' from /usr/local/lib/ruby/site_ruby/3.2/rubygems/specification.rb:1466:in `each' from /usr/local/lib/ruby/site_ruby/3.2/rubygems/specification.rb:1466:in `activate_dependencies' from /usr/local/lib/ruby/site_ruby/3.2/rubygems/specification.rb:1448:in `activate' from /usr/local/lib/ruby/site_ruby/3.2/rubygems.rb:199:in `try_activate' from <internal:/usr/local/lib/ruby/site_ruby/3.2/rubygems/core_ext/kernel_require.rb>:139:in `block in require' from <internal:/usr/local/lib/ruby/site_ruby/3.2/rubygems/core_ext/kernel_require.rb>:139:in `synchronize' from <internal:/usr/local/lib/ruby/site_ruby/3.2/rubygems/core_ext/kernel_require.rb>:139:in `rescue in require' from <internal:/usr/local/lib/ruby/site_ruby/3.2/rubygems/core_ext/kernel_require.rb>:135:in `require' from /usr/local/lib/ruby/gems/3.2/gems/oxidized-0.29.1/lib/oxidized/core.rb:21:in `initialize' from /usr/local/lib/ruby/gems/3.2/gems/oxidized-0.29.1/lib/oxidized/core.rb:4:in `new' from /usr/local/lib/ruby/gems/3.2/gems/oxidized-0.29.1/lib/oxidized/core.rb:4:in `new' from /usr/local/lib/ruby/gems/3.2/gems/oxidized-0.29.1/lib/oxidized/cli.rb:13:in `run' from /usr/local/lib/ruby/gems/3.2/gems/oxidized-0.29.1/bin/oxidized:8:in `<top (required)>' from /usr/local/bin/oxidized:25:in `load' from /usr/local/bin/oxidized:25:in `<main>' <internal:/usr/local/lib/ruby/site_ruby/3.2/rubygems/core_ext/kernel_require.rb>:136:in `require': cannot load such file -- oxidized/web (LoadError) from <internal:/usr/local/lib/ruby/site_ruby/3.2/rubygems/core_ext/kernel_require.rb>:136:in `require' from /usr/local/lib/ruby/gems/3.2/gems/oxidized-0.29.1/lib/oxidized/core.rb:21:in `initialize' from /usr/local/lib/ruby/gems/3.2/gems/oxidized-0.29.1/lib/oxidized/core.rb:4:in `new' from /usr/local/lib/ruby/gems/3.2/gems/oxidized-0.29.1/lib/oxidized/core.rb:4:in `new' from /usr/local/lib/ruby/gems/3.2/gems/oxidized-0.29.1/lib/oxidized/cli.rb:13:in `run' from /usr/local/lib/ruby/gems/3.2/gems/oxidized-0.29.1/bin/oxidized:8:in `<top (required)>' from /usr/local/bin/oxidized:25:in `load' from /usr/local/bin/oxidized:25:in `<main>'
eh that's not great. Would turning www/rubygem-rack-test into an explicit dependency fix this, or is there a bigger systemic problem with commit #d86e4213?
(In reply to Nick Hilliard from comment #3) I have very little experience with ruby, but given that this wasn't a problem before, I think the problem is that commit #d86e4213 added .freeze to all gem dependencies. I'm going to try patching the gemspec for rack-test and see where it goes
Created attachment 248964 [details] Patch oxidized-web.gemspec With this patch, rubygem-oxidized-web builds and runs
Have you had a chance to look at my updated patch? I think that if upstream is not willing to merge, than we should just patch the gemspec to accept all major versions, so instead of `~> 3.0` we put `>= 3.0`. If a major version update breaks the dependency, we'll have to address that anyway, if upstream is not actively maintaining dependencies.
Created attachment 249603 [details] updated einar's patch with Makefile diffs lgtm. i've added some makefile updates, but otherwise looks good to commit.
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=5d361af172ee2ee6af410827f25c4704098066a4 commit 5d361af172ee2ee6af410827f25c4704098066a4 Author: Nick Hilliard <nick@foobar.org> AuthorDate: 2024-08-20 18:18:35 +0000 Commit: Zsolt Udvari <uzsolt@FreeBSD.org> CommitDate: 2024-08-20 18:21:35 +0000 net-mgmt/rubygem-oxidized-web: fix run with sinatra 4.0 Add rubygem-rack-test dependency. Fix patch. PR: 277377 Reported by: Einar Bjarni Halldórsson <einar@isnic.is> Approved by: submitter is maintainer net-mgmt/rubygem-oxidized-web/Makefile | 3 ++- .../rubygem-oxidized-web/files/patch-oxidized-web.gemspec | 13 ++++++++----- 2 files changed, 10 insertions(+), 6 deletions(-)
Committed, thanks!