Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign upFix locale in fedora-*-minimal #2435
Comments
andrewdavidwong
added
bug
C: Fedora
P: minor
labels
Nov 14, 2016
andrewdavidwong
added this to the Release 3.2 milestone
Nov 14, 2016
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
rustybird
Nov 14, 2016
This can be fixed by installing the glibc-langpack-en package, or alternatively by running localectl set-locale LANG=C and restarting
rustybird
commented
Nov 14, 2016
•
|
This can be fixed by installing the |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
jpouellet
Nov 15, 2016
Contributor
Yeah, I noticed this too.
% env | grep LANG
LANG=en_US.UTF-8
% env | grep LC_
% strace -o trace man man > /dev/null
man: can't set the locale; make sure $LC_* and $LANG are correct
% grep locale trace
open("/usr/lib/locale/locale-archive", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/locale.alias", O_RDONLY|O_CLOEXEC) = 3
open("/usr/lib/locale/en_US.UTF-8/LC_IDENTIFICATION", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib/locale/en_US.utf8/LC_IDENTIFICATION", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib/locale/en_US/LC_IDENTIFICATION", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib/locale/en.UTF-8/LC_IDENTIFICATION", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib/locale/en.utf8/LC_IDENTIFICATION", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib/locale/en/LC_IDENTIFICATION", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
write(2, "can't set the locale; make sure "..., 59) = 59
open("/usr/lib/locale/en_US.UTF-8/LC_CTYPE", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib/locale/en_US.utf8/LC_CTYPE", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib/locale/en_US/LC_CTYPE", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib/locale/en.UTF-8/LC_CTYPE", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib/locale/en.utf8/LC_CTYPE", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib/locale/en/LC_CTYPE", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
Changing /etc/locale.conf from LANG=en_US.UTF-8 to LANG=C also seems to work.
|
Yeah, I noticed this too.
Changing /etc/locale.conf from |
marmarek
modified the milestones:
Release 3.2,
Release 3.2 updates
Nov 19, 2016
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
jpouellet
Nov 22, 2016
Contributor
@marmarek what do you think the appropriate path forward is here?
I propose installing glibc-langpack-en for fedora24 and only setting LANG=C for -minimal.
|
@marmarek what do you think the appropriate path forward is here? I propose installing |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
|
Seems like a good idea. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
marmarek
Nov 22, 2016
Member
Hmm, looking the commit setting locale, it is done for gnome-terminal. Here are more details: #1033
But I've just checked and gnome-terminal seems to run just fine with either LANG=C or LANG=. So, maybe setting default locale isn't needed at all anymore?
On the other hand - changing this right now (as a stable update) isn't the best idea... So this would be (if at all) for Qubes 4.0. And for now LANG=C just for minimal template.
|
Hmm, looking the commit setting locale, it is done for gnome-terminal. Here are more details: #1033 On the other hand - changing this right now (as a stable update) isn't the best idea... So this would be (if at all) for Qubes 4.0. And for now LANG=C just for minimal template. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
jpouellet
Nov 22, 2016
Contributor
Not the best idea because why? A desire to avoid churn for everybody for minimal benefit? Or some other reason?
|
Not the best idea because why? A desire to avoid churn for everybody for minimal benefit? Or some other reason? |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
marmarek
Nov 22, 2016
Member
Risk of regression or other unwanted side effects - like the one with gnome-terminal mentioned above.
|
Risk of regression or other unwanted side effects - like the one with gnome-terminal mentioned above. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
jpouellet
Nov 22, 2016
Contributor
Makes sense.
Sounds to me like that's an argument for just installing glibc-langpack-en instead of trying to switch to LANG=C? Or just leave this unresolved?
|
Makes sense. Sounds to me like that's an argument for just installing glibc-langpack-en instead of trying to switch to LANG=C? Or just leave this unresolved? |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
marmarek
Nov 22, 2016
Member
How many packages are pulled in by glibc-langpack-en on minimal template? If not many (for example just one), that's ok.
|
How many packages are pulled in by |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
jpouellet
Nov 22, 2016
Contributor
Deps are small:
$ rpm -qR glibc-langpack-en
glibc = 2.23.1-11.fc24
glibc-common = 2.23.1-11.fc24
rpmlib(CompressedFileNames) <= 3.0.4-1
rpmlib(FileDigests) <= 4.6.0-1
rpmlib(PartialHardlinkSets) <= 4.0.4-1
rpmlib(PayloadFilesHavePrefix) <= 4.0-1
rpmlib(PayloadIsXz) <= 5.2-1
Install log on clean fedora-24-minimal here.
|
Deps are small:
Install log on clean fedora-24-minimal here. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
andrewdavidwong
Nov 22, 2016
Member
I propose installing
glibc-langpack-enfor fedora24
Why? Is there a problem on fedora-24? I only noticed it on fedora-24-minimal.
only setting
LANG=Cfor -minimal
This seems preferable to installing any additional packages, especially in the minimal template. More packages, larger attack surface, right?
Why? Is there a problem on
This seems preferable to installing any additional packages, especially in the minimal template. More packages, larger attack surface, right? |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
marmarek
Nov 22, 2016
Member
Why? Is there a problem on fedora-24? I only noticed it on fedora-24-minimal.
Indeed non-minimal template have glibc-all-langpacks installed.
This seems preferable to installing any additional packages, especially in the minimal template. More packages, larger attack surface, right?
I don't think glibc-langpack-en enlarge attack surface in any way (unless it would pull in some other package that would do so) - it doesn't expose any additional interface - package brings in only some data (translations), not code. IMO the only concern here for minimal template is its size, but the package is relatively small (275k compressed, about 4MB uncompressed).
Indeed non-minimal template have
I don't think |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
andrewdavidwong
Nov 22, 2016
Member
I don't think glibc-langpack-en enlarge attack surface in any way (unless it would pull in some other package that would do so) - it doesn't expose any additional interface - package brings in only some data (translations), not code.
But the attack surface isn't just the code; it also includes the package maintainer(s), their signing keys, development machines, etc., any/all of which could be compromised, right? (In any case, I agree that this one package doesn't make much of a difference, but ceteris paribus, it seems preferable to adhere to principles.)
But the attack surface isn't just the code; it also includes the package maintainer(s), their signing keys, development machines, etc., any/all of which could be compromised, right? (In any case, I agree that this one package doesn't make much of a difference, but ceteris paribus, it seems preferable to adhere to principles.) |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
jpouellet
Nov 22, 2016
Contributor
While I agree that simply having utf8 errno value -> string conversions and such should be totally fine, safe utf8 handling in general is quite difficult, and if using the C locale would cause programs to handle input as ASCII and bypass utf8 handling code paths, then perhaps there is something to be said for that.
For example, my IRC client displays all unicode characters as \u1234 instead of the actual character, and this did in practice save me from some font rendering bug on OS X a while back (the details of which have been lost to memory).
- https://websec.github.io/unicode-security-guide/
- http://www.unicode.org/reports/tr36/
- http://www.unicode.org/reports/tr39/
- http://seriot.ch/resources/talks_papers/i_love_unicode_softshake.pdf
- http://seriot.ch/resources/talks_papers/20141106_asfws_unicode_hacks.pdf
- https://www.schneier.com/crypto-gram/archives/2000/0715.html#9
Unicode is just too complex to ever be secure. -- Bruce Schneier
|
While I agree that simply having utf8 errno value -> string conversions and such should be totally fine, safe utf8 handling in general is quite difficult, and if using the For example, my IRC client displays all unicode characters as
|
marmarek
closed this
in
marmarek/qubes-builder-rpm@8a9816f
Nov 25, 2016
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
|
Updated template uploaded to the repository. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
entr0py
Dec 15, 2016
Hmm, looking the commit setting locale, it is done for gnome-terminal. Here are more details: #1033
But I've just checked and gnome-terminal seems to run just fine with either LANG=C or LANG=. So, maybe setting default locale isn't needed at all anymore?
Not sure what I'm doing differently but gnome-terminal does not run for me in fedora-24-minimal with LANG=C. Installing glibc-langpack-en, followed by localectl set-locale LANG=en_US.utf8 solves the issue. If glibc-langpack-en is left out for space considerations, perhaps a note could be added to fedora-24-minimal documentation?
Also, not to play favorites, maybe uninstall glibc-langpack-zu (South African isiZulu) from the default template? :-P
$ localectl list-locales
C.utf8
zu_ZA
zu_ZA.utf8
entr0py
commented
Dec 15, 2016
Not sure what I'm doing differently but gnome-terminal does not run for me in fedora-24-minimal with Also, not to play favorites, maybe uninstall
|
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
andrewdavidwong
Dec 22, 2016
Member
Also, not to play favorites, maybe uninstall glibc-langpack-zu (South African isiZulu) from the default template? :-P
$ sudo dnf remove glibc-langpack-zu
Dependencies resolved.
Error: The operation would result in removing the following protected packages: dnf, systemd.
Odd.
Odd. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
entr0py
Dec 22, 2016
Ah, now it makes sense. I didn't get that error because I installed glibc-lanpack-en before removing zu. It must be that one langpack is required and that's why zu was not removed from the template in the first place.
entr0py
commented
Dec 22, 2016
|
Ah, now it makes sense. I didn't get that error because I installed |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
andrewdavidwong
Dec 22, 2016
Member
Yes, you're right. After installing glibc-lanpack-en, I was able to remove glibc-langpack-zu. Since we have to have one installed anyway by default, it might as well be glibc-lanpack-en. What do you think @marmarek?
|
Yes, you're right. After installing |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
|
Makes sense. Interesting why |
marmarek
reopened this
Dec 22, 2016
mvermaes
referenced this issue
Apr 19, 2017
Open
Update to qubes-core-vm-3.2.17-1 in custom template generates missing character map messages #2763
andrewdavidwong
referenced this issue
May 21, 2017
Closed
Fedora-24-minimal: GUI integration (MRU entry tool) broken / missing dependencies #2816
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
|
This is also a problem on |
andrewdavidwong
changed the title from
Fix locale in fedora-24-minimal
to
Fix locale in fedora-*-minimal
Nov 3, 2017
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Polygonbugs
commented
Feb 14, 2018
|
This also applied to fedora-26-minimal. |
andrewdavidwong commentedNov 14, 2016
Qubes OS version (e.g.,
R3.1):R3.2
Affected TemplateVMs (e.g.,
fedora-23, if applicable):fedora-24-minimal
When updating the fedora-24-minimal template, there are warnings of this type:
(Repeated for
LC_COLLATE,LC_MESSAGES,LC_NUMERIC, andLC_TIME.)And after the update is finished: