Scenario: - FreeBSD main (but also in previous releases) - Building in /usr/src using "make buildworld buildkernel" - Installing using "make installkernel installworld" Result: - There are circular symbolic links in /usr/local/share - See the following output: [0]# diff -r /usr/share/locale /usr/share/locale > /dev/null diff: /usr/share/locale/nn_NO.ISO8859-1/LC_MESSAGES: Too many levels of symbolic links diff: /usr/share/locale/nn_NO.ISO8859-15/LC_MESSAGES: Too many levels of symbolic links diff: /usr/share/locale/sl_SI.ISO8859-2/LC_MESSAGES: No such file or directory [0]# Expected result: - The links should point to reasonable targets
Does not appear to be reproducible on my ~13.0 laptop. $ diff -r /usr/share/locale /usr/share/locale > /dev/null $
Oh, but: share/msgdef/Makefile ... SAME+= sr_RS.ISO8859-2 sl_SI.ISO8859-2 ... SAME+= nn_NO.ISO8859-15 nn_NO.ISO8859-15 ...
Hmmm... maybe it is really just in main (this is where the output is from). -- Martin
The issue is there, introduced in base 0a36787e4c1fa0cf77dcf83be0867178476e372b.
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=159599c4a2bbd8fcc4bb7f845afe3e0ea232ab9e commit 159599c4a2bbd8fcc4bb7f845afe3e0ea232ab9e Author: Yuri Pankov <yuripv@FreeBSD.org> AuthorDate: 2023-09-21 10:45:54 +0000 Commit: Yuri Pankov <yuripv@FreeBSD.org> CommitDate: 2023-09-21 10:54:21 +0000 msgdef: fix NO and SI locales Fix circular symlinks by providing separate source for nn_NO.ISO8859-1, nn_NO.ISO8859-15, and sl_SI.ISO8859-2 (re)generated from CLDR. PR: 260841 Reviewed by: imp (previous version) Fixes: 0a36787e4c1f ("locales: separate unicode from other locales") Differential Revision: https://reviews.freebsd.org/D41899 share/msgdef/Makefile | 5 ++--- share/msgdef/nn_NO.ISO8859-15.src (new) | 8 ++++++++ share/msgdef/sl_SI.ISO8859-2.src (new) | 8 ++++++++ 3 files changed, 18 insertions(+), 3 deletions(-)
On Fresh install of FreeBSD/amd64 14.0-RELEASE environment: $ ls -l /usr/share/locale/nn_NO.ISO8859-1/LC_MESSAGES /usr/share/locale/nn_NO.ISO8859-15/LC_MESSAGES lrwxr-xr-x 1 root wheel 31 Nov 10 17:37 /usr/share/locale/nn_NO.ISO8859-1/LC_MESSAGES@ -> ../nn_NO.ISO8859-15/LC_MESSAGES lrwxr-xr-x 1 root wheel 31 Nov 10 17:37 /usr/share/locale/nn_NO.ISO8859-15/LC_MESSAGES@ -> ../nn_NO.ISO8859-15/LC_MESSAGES
The fix should be merge to 14.0-STABLE
Seems to affect the GitLab port www/gitlab-ce (Rake crashes). A database migration for example results in: # su -l git -c "cd /usr/local/www/gitlab-ce && rake db:migrate RAILS_ENV=production" rake aborted! Errno::ELOOP: Too many levels of symbolic links - /usr/share/locale/nn_NO.ISO8859-1/LC_MESSAGES <internal:dir>:220:in `glob' <internal:/usr/local/lib/ruby/site_ruby/3.1/rubygems/core_ext/kernel_require.rb>:38:in `require' <internal:/usr/local/lib/ruby/site_ruby/3.1/rubygems/core_ext/kernel_require.rb>:38:in `require' /usr/local/www/gitlab-ce/config/application.rb:17:in `<top (required)>' <internal:/usr/local/lib/ruby/site_ruby/3.1/rubygems/core_ext/kernel_require.rb>:86:in `require' <internal:/usr/local/lib/ruby/site_ruby/3.1/rubygems/core_ext/kernel_require.rb>:86:in `require' /usr/local/www/gitlab-ce/Rakefile:9:in `<top (required)>' (See full trace by running task with --trace)
*** Bug 275384 has been marked as a duplicate of this bug. ***
A commit in branch stable/14 references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=5b4b93e6074c4a928c6a452790ed8a43e1c4a039 commit 5b4b93e6074c4a928c6a452790ed8a43e1c4a039 Author: Yuri Pankov <yuripv@FreeBSD.org> AuthorDate: 2023-09-21 10:45:54 +0000 Commit: Yuri Pankov <yuripv@FreeBSD.org> CommitDate: 2023-11-28 07:12:11 +0000 msgdef: fix NO and SI locales Fix circular symlinks by providing separate source for nn_NO.ISO8859-1, nn_NO.ISO8859-15, and sl_SI.ISO8859-2 (re)generated from CLDR. PR: 260841 Reviewed by: imp (previous version) Fixes: 0a36787e4c1f ("locales: separate unicode from other locales") Differential Revision: https://reviews.freebsd.org/D41899 (cherry picked from commit 159599c4a2bbd8fcc4bb7f845afe3e0ea232ab9e) share/msgdef/Makefile | 5 ++--- share/msgdef/nn_NO.ISO8859-15.src (new) | 8 ++++++++ share/msgdef/sl_SI.ISO8859-2.src (new) | 8 ++++++++ 3 files changed, 18 insertions(+), 3 deletions(-)
Should be fixed now, sorry the fix didn't make it to 14.0-RELEASE.
Won't it be fixed on releng/14.0?
(In reply to Yuri Pankov from comment #11) Will you issue an EN for 14.0?
(In reply to Mikael Urankar from comment #13) Yes, please release this as errata for 14.0. I am sure I am not the only one to run gitlab-ce on FreeBSD. Not being to able to run it on 14.0-RELEASE patched with freebsd-update, but requiring 14-STABLE for it, maintained by building kernel and userland from sources, would be quite a problem.
(In reply to Marko Cupać from comment #14) Actually I met this problem during DB migration after upgrading gitlab-ce, like comment #8. I manually rewrote symlinks like 13.2-RELEASE, for I wanted to run gitlab-ce again, immediately. $ ls -l /usr/share/locale/nn_NO.ISO8859-1/LC_MESSAGES /usr/share/locale/nn_NO.ISO8859-15/LC_MESSAGES lrwxr-xr-x 1 root wheel 31 Nov 25 01:43 /usr/share/locale/nn_NO.ISO8859-1/LC_MESSAGES@ -> ../nn_NO.ISO8859-15/LC_MESSAGES lrwxr-xr-x 1 root wheel 26 Nov 25 02:45 /usr/share/locale/nn_NO.ISO8859-15/LC_MESSAGES@ -> ../nn_NO.UTF-8/LC_MESSAGES
The errata template is available at https://www.freebsd.org/security/errata-template.txt If someone's willing to provide content for sections I through IV (Background, Problem Description, Impact, Workaround) it will be a significant help in preparing an erratum update.
(In reply to Ed Maste from comment #16) Working on it.
(In reply to Yuri Pankov from comment #17) Any news? I'm holding off upgrading my gitlab instances.
I upgraded now all my environments to FreeBSD 14 and see exactly the same problem. Any updates?
> I upgraded now all my environments to FreeBSD 14 and see exactly the same problem. Any updates? The bug was already fixed a while ago. I don't see any issues since than :)
(In reply to Torsten Zuehlsdorff from comment #20) Althouht it was fixed before 14.1 in stable/14, I can't see any commit to fix this in releng/14.0 branch, which is still supported version (and the Version: field of this bug pointed). (Yes, I don't see any problem for me, because I already upgraded my 14.0 environment affected by this bug to 14.1, but ....)
(In reply to Torsten Zuehlsdorff from comment #20) The bug is fixed in FreeBSD 14.1-RELEASE and 14.1-STABLE, but not in FreeBSD 14.0-RELEASE (patched) which is still in support. $ freebsd-version -u 14.0-RELEASE-p8 $ stale-symlink-buildworld.sh stale symlink detected: lrwxr-xr-x 1 root wheel 31 Nov 10 2023 /usr/share/locale/nn_NO.ISO8859-1/LC_MESSAGES -> ../nn_NO.ISO8859-15/LC_MESSAGES stale symlink detected: lrwxr-xr-x 1 root wheel 31 Nov 10 2023 /usr/share/locale/nn_NO.ISO8859-15/LC_MESSAGES -> ../nn_NO.ISO8859-15/LC_MESSAGES stale symlink detected: lrwxr-xr-x 1 root wheel 30 Nov 10 2023 /usr/share/locale/sl_SI.ISO8859-2/LC_MESSAGES -> ../sr_RS.ISO8859-2/LC_MESSAGES