FS#76004 - [ruby-psych] Psych::BadAlias: Unknown alias: base
Attached to Project:
Community Packages
Opened by Hamish Claxton (Verequies) - Sunday, 25 September 2022, 03:49 GMT
Last edited by Buggy McBugFace (bugbot) - Saturday, 25 November 2023, 20:07 GMT
Opened by Hamish Claxton (Verequies) - Sunday, 25 September 2022, 03:49 GMT
Last edited by Buggy McBugFace (bugbot) - Saturday, 25 November 2023, 20:07 GMT
|
Details
All ruby packages up to date with testing.
I receive the following error: 'Psych::BadAlias: Unknown alias: base' Previously working with the ruby package versions as attached. It seems something broke during the stdlib restructuring. |
This task depends upon
Closed by Buggy McBugFace (bugbot)
Saturday, 25 November 2023, 20:07 GMT
Reason for closing: Moved
Additional comments about closing: https://gitlab.archlinux.org/archlinux/p ackaging/packages/ruby-psych/issues/1
Saturday, 25 November 2023, 20:07 GMT
Reason for closing: Moved
Additional comments about closing: https://gitlab.archlinux.org/archlinux/p ackaging/packages/ruby-psych/issues/1
The attached script should replicate the issue (tested just before).
You can retest after the first time you run the script by running `bundle exec rake db:migrate RAILS_ENV=production` inside the GitLab folder.
Generated with `bundle exec rake db:migrate RAILS_ENV=production --trace`
There is already work being done on the issue in the settingslogic repository: https://github.com/binarylogic/settingslogic/pull/86
I keep investigating but I fear all we can do is patch code or push upstream gem maintainers to fix the issues.
I was able to get GitLab to install successfully by editing the Gemfile, and changing the settingslogic dependency to use this pull request 'https://github.com/settingslogic/settingslogic/pull/22'.
Hopefully GitLab notices this soon and updates their dependencies.
So I guess in the end there is no issue with the ruby-psych gem and older gems just require updating to be compatible.
That being said, if Ruby 3.1 bundles Psych 4 should we not update Ruby to 3.1 as its currently sitting at 3.0.4?
We plan to update to ruby 3.1 once the de-vendoring is fully done.
I got in contact with a friend of mine who works as SRE at gitlab and forwarded him our issue and what impact it has for gitlab to be compatible to with 3.1 or more precise with psych > 4.0.0. He told me he will forward my concern and is confident there will be a solution soon.
Sadly this still means I can't push my 47 ruby packages changes i have waiting in [community-testing] to [community] as it would break gitlab.
Regarding your 47 ruby package updates. I think you should push them.
The GitLab packages in Arch Linux depend on Ruby 2.7 so it should be safe to update without any issue.
I install GitLab from source personally, so I use Ruby 3.0.4.
That being said, GitLab does work with Ruby 3.0.4 from my testing so you could remove the dependency on Ruby 2.7 by updating that package too.
You would just need to edit the Gemfile like so:
'sed -i "s/gem 'settingslogic', '~> 2.0.9'/gem 'settingslogic', git: 'https:\/\/github.com\/Verequies\/settingslogic'/" Gemfile'
'bundle lock --update=bundler-audit'
And everything should work with Ruby 3.0.4 and your package changes, and hopefully Ruby 3.1 when you update to that too.
As you can see from the repository I ended up forking the working pull request repository just in case the repository was deleted.
EDIT: Forgot to mention installing GitLab from source using the current community (non-testing) packages was broken to begin with as well.
Once updated, it would also leave just Redmine left to be switched to Ruby 3.0.4/3.1 - and from a quick look up online, it is already compatible.
That would mean the Ruby2.7 package could be removed as nothing depends on it?
After installing the old ruby package from Arch Archive (2022-07-15, the last working one), I can show the following:
% pacman -Qi ruby | grep Version
Version : 3.0.4-1
% pacman -Ql ruby | grep psych | grep spec
ruby /usr/lib/ruby/gems/3.0.0/specifications/default/psych-3.3.2.gemspec
This version works perfectly fine with Mastodon.
[1] https://lists.archlinux.org/archives/list/arch-dev-public%40lists.archlinux.org/thread/24P6GYY43AVP7DB4LVDQ2M6B4TOAXKF2/
[2] https://github.com/mastodon/mastodon/commit/fb8503e861b630728ead4be847309f1fd7c03dd4
[3] https://stdgems.org/psych/