Created attachment 659158 [details] emerge --info Hi, I get the following during installation of app-misc/ca-certificates-20200601.3.53: !!! failed to properly create symlink: !!! /etc/ssl/certs/._cfg0000_988a38cb.0 -> NetLock_Arany_=Class_Gold=_Főtanúsítvány.pem !!! 'latin-1' codec can't encode character '\u0151' in position 28: ordinal not in range(256) !!! Failed to move file. !!! /etc/ssl/certs/._cfg0000_988a38cb.0 -> NetLock_Arany_=Class_Gold=_Főtanúsítvány.pem Not sure where to start. I've seen recommendations to use the utf-8 character set instead of latin-1, but I have no idea where this is done. Thanks for any help you can offer. Bob Gleitsmann
So, I discovered the UTF-8 guide in the Gentoo wiki. Please give me a chance to digest it before doing any work on this bug. Thanks.
I can install the package properly, but I do not like the idea of UTF-8 filenames. /etc/ssl/certs$ ls -al 988a38cb.0 lrwxrwxrwx 1 root root 48 2020-06-03 01:31 988a38cb.0 -> 'NetLock_Arany_=Class_Gold=_Főtanúsítvány.pem' This should be changed.
> [...] but I do not like the idea of UTF-8 filenames. Maybe I am missing your point but using UTF-8 is totally fine. And given that it's included in source tarball already there is also nothing we can do here in case we would really like to be able to support non-UTF8 systems (chicken/egg problem -- you wouldn't be able to unpack without UTF8 support at all so we cannot even rename). Please try to convince upstream to change name in case you really care.
This looks like a bug in portage, possibly related to the selinux code path.
Looks like the issue is probably that the os.symlink call inside portage._selinux.symlink does not encode the arguments as UTF-8. The code has not changed since this commit back on 2009-08-06: https://gitweb.gentoo.org/proj/portage.git/commit/?id=25c5202b7e66bbef5b058fd9679070877bc54ed7
Actually, the last change to encoding behavior was from this commit related to bug 430488 on 2013-01-14: https://gitweb.gentoo.org/proj/portage.git/commit/?id=6137290b2bb8353db0df1a7664e435ced37bacfd
This bug is an unintended result of the fix for bug 430488, since that made it pass unicode strings to the os.symlink call, instead of UTF-8 encoded bytes.
Patch posted for review: https://archives.gentoo.org/gentoo-portage-dev/message/676e9a69f7cc0f32902f8bd670314c4a https://github.com/gentoo/portage/pull/619
I tried to use the patch, but the patching itself fails for obscure reasons. Is it not compatible with portage-3.0.4-r1? I was trying to copy and paste it from the web page and that did not go well. Is there another way? Thanks.
(In reply to rjgleits from comment #9) It would be easier to grab the patch from github. https://github.com/gentoo/portage/pull/619.patch
Thanks. Got the patch installed and it worked. The certificates package installed correctly. Thanks! Best Wishes, Bob
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/proj/portage.git/commit/?id=a8f0e05d35b0ba2747827ce03dff42682192def8 commit a8f0e05d35b0ba2747827ce03dff42682192def8 Author: Zac Medico <zmedico@gentoo.org> AuthorDate: 2020-09-09 05:08:20 +0000 Commit: Zac Medico <zmedico@gentoo.org> CommitDate: 2020-09-11 19:00:57 +0000 selinux: encode os path arguments as UTF-8 (bug 741194) Encode path arguments as UTF-8, like portage.os wrapper. Fixes: 6137290b2bb8 ("selinux: python3 unicode paths, bug #430488") Tested-by: Bob Gleitsmann <rjgleits@bellsouth.net> Bug: https://bugs.gentoo.org/741194 Signed-off-by: Zac Medico <zmedico@gentoo.org> lib/portage/_selinux.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-)
Thanks for testing!
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3f5468f112ce4a8210fe2073267f842367a7287b commit 3f5468f112ce4a8210fe2073267f842367a7287b Author: Zac Medico <zmedico@gentoo.org> AuthorDate: 2020-09-11 19:14:10 +0000 Commit: Zac Medico <zmedico@gentoo.org> CommitDate: 2020-09-11 19:25:54 +0000 sys-apps/portage: 3.0.6-r1 revbump for bug 741194 #741194 selinux: encode os path arguments as UTF-8 Bug: https://bugs.gentoo.org/739718 Bug: https://bugs.gentoo.org/741194 Package-Manager: Portage-3.0.6, Repoman-3.0.1 Signed-off-by: Zac Medico <zmedico@gentoo.org> sys-apps/portage/Manifest | 1 + sys-apps/portage/{portage-3.0.6.ebuild => portage-3.0.6-r1.ebuild} | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-)