Bug 2104628

Summary: Option for "LANG.iso88591" missing on localectl missing due to not installing package: glibc-all-langpacks in RHEL 8.5/8.4
Product: Red Hat Enterprise Linux 8 Reporter: mkielian <mkielian>
Component: glibcAssignee: glibc team <glibc-bugzilla>
Status: NEW --- QA Contact: qe-baseos-tools-bugs
Severity: low Docs Contact:
Priority: unspecified    
Version: 8.5CC: ashankar, codonell, dj, eng-i18n-bugs, fweimer, mfabian, pfrankli, sipoyare
Target Milestone: rcKeywords: Triaged
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description mkielian@redhat.com 2022-07-06 18:11:22 UTC
Description of problem:


Version-Release number of selected component (if applicable):

RHEL 8.4
RHEL 8.5


How reproducible:  Very



Steps to Reproduce:

1. Install langpacks for LANG: 

# dnf install langpacks-<LANG>.noarch


2. Check for iso88591 Lang pack:

# localectl list-locales | grep en_<LANG>
en_<LANG>
en_<LANG>.utf8


NOTE: it ill be missing an [ en_<LANG>.iso88591 ] option.


3. Install the package: 

# dnf install glibc-all-langpacks


4. Check for the [ en_<LANG>.iso88591 ]

# localectl list-locales | grep en_<LANG>
en_<LANG>
en_<LANG>.iso88591   <--- NOW SHOWS UP
en_<LANG>.utf8



Actual results:

# localectl list-locales

Missing: [ en_<LANG>.iso88591 ]


Expected results:

# localectl list-locales

[ en_<LANG>.iso88591 ] shows up as a option.



Additional info:

When doing more research the RHEL 8.6 installs the needed package: [ glibc-all-langpacks ] when doign a typical install.

Checking RHEL 8.4 and RHEL 8.5 it does not install that package during a typical install.

Not sure if there was a change in what packagers were included for the standard install for RHEL 8.6 vs Older RHEL 8.

Comment 1 mkielian@redhat.com 2022-07-06 18:25:00 UTC
Created KCS at: https://access.redhat.com/solutions/6966655

Comment 2 Parag Nemade 2022-07-08 01:54:48 UTC
It appears glibc-all-langpacks has been added as default installed package from rhel-8.6.0 release.

Comment 3 Florian Weimer 2022-07-08 07:26:49 UTC
It's not clear to me what the actual bug is supposed to be here.

The primary name of English ISO-8859-1 locale for Canada is en_CA, en_CA.iso88591 is just an alias, with the same data. In this sense, this could be a duplicate of bug 1627016, which has not yet been fixed upstream/in Fedora. Bug 1326470 has some further discussion.

Comment 4 Mike FABIAN 2022-07-09 15:20:28 UTC
I agree with what Florian Weimer says in comment#3.

There is only an inconsistency in the listing. But the en_US.iso88591 locale is there and works.

The test I do here is on Fedora 36, but the behaviour is the same as on RHEL8:

[mfabian@fedora ~]$ cat /etc/fedora-release 
Fedora release 36 (Thirty Six)
[mfabian@fedora ~]$
[mfabian@fedora ~]$ ls /usr/lib/locale/   
C.utf8      en_CA            en_GB.utf8  en_IL       en_PH.utf8       en_US.utf8
en_AG       en_CA.utf8       en_HK       en_IN       en_SC.utf8       en_ZA
en_AU       en_DK            en_HK.utf8  en_NG       en_SG            en_ZA.utf8
en_AU.utf8  en_DK.utf8       en_IE       en_NZ       en_SG.utf8       en_ZM
en_BW       en_GB            en_IE@euro  en_NZ.utf8  en_US            en_ZW
en_BW.utf8  en_GB.iso885915  en_IE.utf8  en_PH       en_US.iso885915  en_ZW.utf8
[mfabian@fedora ~]$ rpm -q glibc-all-langpacks
package glibc-all-langpacks is not installed
[mfabian@fedora ~]$ rpm -q glibc-langpack-en
glibc-langpack-en-2.35-14.fc36.x86_64
[mfabian@fedora ~]$ 

So glibc-all-langpacks is not installed, only glibc-langpack-en is installed. But the ISO-8859-1, the ISO-8859-15 and the UTF-8 versions of the en_US locale are available and work:

[mfabian@fedora ~]$ LC_ALL=en_US locale charmap
ISO-8859-1
[mfabian@fedora ~]$ LC_ALL=en_US.iso88591 locale charmap
ISO-8859-1
[mfabian@fedora ~]$ LC_ALL=en_US.ISO_8859-1 locale charmap
ISO-8859-1
[mfabian@fedora ~]$ LC_ALL=en_US.ISO-8859-1 locale charmap
ISO-8859-1
[mfabian@fedora ~]$ LC_ALL=en_US.ISO_8859-15 locale charmap
ISO-8859-15
[mfabian@fedora ~]$ [mfabian@fedora ~]$ LC_ALL=en_US.UTF-8 locale charmap
UTF-8
[mfabian@fedora ~]$ 

You can see that they all work, (there are several ways to spell ISO-8859-1 so that it still works ...)

For comparison what happens when a locale does not exist look at for example en_US.ISO_8859-9, one gets an error message when trying this one:

[mfabian@fedora ~]$ LC_ALL=en_US.ISO_8859-9 locale charmap
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
ANSI_X3.4-1968
[mfabian@fedora ~]$

So there is no problem in functionality. Only the listing via “locale -a” and “localectl list-locales” is inconsistent.

[mfabian@fedora ~]$ locale -a | grep en_US
en_US
en_US.iso885915
en_US.utf8
[mfabian@fedora ~]$ localectl list-locales | grep en_US
en_US.UTF-8
[mfabian@fedora ~]$

“locale -a” lists everything which is available (“en_US” without the encoding is the ISO-8859-1 version). But “localectl list-locales” fails to list everything.