Bug 1727489 - glibc-langpack-en is missing
Summary: glibc-langpack-en is missing
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora Container Images
Classification: Fedora
Component: fedora-container-image
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Clement Verna
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 1729454 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-07-06 23:55 UTC by Gordon Messmer
Modified: 2019-07-26 06:47 UTC (History)
4 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2019-07-26 06:47:00 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Gordon Messmer 2019-07-06 23:55:36 UTC
Description of problem:
glibc-langpack-en is not currently installed in the fedora:rawhide image, but the default locale is "en_US.UTF-8".  "python35" appears to set the default encoding to ascii due to the unsupported locale.  "python3" (3.7) errors out in other ways due to the unsupported locale.

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


How reproducible:
Always

Steps to Reproduce:
1. podman run --rm -it fedora:rawhide
2. locale

Actual results:

[root@6044a31ebff4 /]# locale
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
LANG=en_US.UTF-8
...

Expected results:

[root@de2ee6ecf591 /]# locale
LANG=en_US.UTF-8
...

Additional info:

https://travis-ci.org/fedora-python/pyp2rpm/builds/554386021?utm_source=github_status&utm_medium=notification

This integration test shows both types of failures.  Among other instances:

Lines leading up to 2373 record Python 3.5 errors

Lines leading up to 6313 record Python 3.7 errors.

Comment 1 Clement Verna 2019-07-07 05:03:24 UTC
Ha yes we are ow using the glibc-minimal-langpack package in order to make the base image smaller. Can you try to setup the locale to LANG=C.UTF-8 ? If that works I ll make the change in the base image.


Thanks

Comment 2 Clement Verna 2019-07-07 08:58:31 UTC
OK looking at how this is managed in the fedora-minimal base image I have opened https://pagure.io/fedora-kickstarts/pull-request/538. Once merged I ll release a new image.

Comment 3 Gordon Messmer 2019-07-07 17:22:22 UTC
LANG=C.UTF-8 appears to work.

I'm not sure how removing other locales from /usr/share/ will fix the problem.  Unless I'm missing something, en_US still won't be present.  If that locale isn't going to be installed, I would think that the correct fix would be to set the system-wide default locale to C.UTF-8.  And in that case, "echo "%_install_langs $LANG" > /etc/rpm/macros.image-language-conf" in fedora-container-common.ks may be a candidate for a consistent setting as well.

Could you add to fedora-container-common.ks:

echo 'LANG="C.UTF-8"' >  /etc/locale.conf

Comment 4 Clement Verna 2019-07-12 17:15:04 UTC
*** Bug 1729454 has been marked as a duplicate of this bug. ***

Comment 5 Clement Verna 2019-07-18 07:04:50 UTC
The images on Dockerhub have now the fix for this bug. registry.fp.o will be updated soon.

Gordon, Could you confirm that this issue is solved ?

Comment 6 Jan Pazdziora (Red Hat) 2019-07-19 18:43:31 UTC
registry.fedoraproject.org/fedora:rawhide is fixed.

registry.fedoraproject.org/fedora:30 is not.

Comment 7 Gordon Messmer 2019-07-19 19:33:36 UTC
fedora:rawhide on registry.fp.o looks good to me, as well, but I see LANG set to the missing en_US on docker.io right now.

Good:

$ podman run --rm -it registry.fedoraproject.org/fedora:rawhide
Trying to pull registry.fedoraproject.org/fedora:rawhide...Getting image source signatures
Copying blob 51a8766de95c done
Copying config a8e2c6d93a done
Writing manifest to image destination
Storing signatures
[root@66a93c3978c3 /]# locale -a
C
C.utf8
POSIX
[root@66a93c3978c3 /]# echo $LANG
C.UTF-8


Bad:

$ podman pull fedora:rawhide
Trying to pull docker.io/library/fedora:rawhide...Getting image source signatures
Copying blob 2e04ad4d7f6e done
Copying config 30f5d22477 done
Writing manifest to image destination
Storing signatures
30f5d224770a31bc6ab6ba27264a7fba0bfac3d8f4bb6f5e6f5a08b5c3a36e99
$ podman run --rm -it fedora:rawhide
[root@a20d42f82446 /]# locale -a
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_COLLATE to default locale: No such file or directory
C
C.utf8
POSIX
[root@a20d42f82446 /]# echo $LANG
en_US.UTF-8

Comment 8 Jens Petersen 2019-07-20 05:18:17 UTC
We should default to LANG=C.utf8 which is part of glibc-common - there is no need to remove anything anymore (en locales are not even installed anyway;).

Comment 9 Jens Petersen 2019-07-20 05:39:50 UTC
Okay I now see now https://pagure.io/fedora-kickstarts/pull-request/540 and https://pagure.io/fedora-kickstarts/pull-request/541 which look fine.

Maybe the installer or systemd is override /etc/locale.conf?

Comment 10 Jens Petersen 2019-07-20 07:26:28 UTC
I see /etc/locale.conf has LANG="C.UTF-8" in Fedora-Container-Base-Rawhide-20190719.n.1.x86_64.tar.xz
(from https://koji.fedoraproject.org/koji/buildinfo?buildID=1315328).

Comment 11 Jens Petersen 2019-07-20 07:40:02 UTC
ie this change by Clement: https://pagure.io/fedora-kickstarts/c/a07f9892b16791bcaf68a670094f9485fa415456 (f30 & master)

Comment 12 Jens Petersen 2019-07-20 15:42:22 UTC
I feel honestly it would be better to restore glibc-langpack-en to fedora:30 until bug 1729454 is sorted out.

We should not make such breaking changes to stable fedora:latest without sufficient testing IMO.

Comment 13 Clement Verna 2019-07-20 17:44:08 UTC
(In reply to Gordon Messmer from comment #7)
> fedora:rawhide on registry.fp.o looks good to me, as well, but I see LANG
> set to the missing en_US on docker.io right now.
> 
> Good:
> 
> $ podman run --rm -it registry.fedoraproject.org/fedora:rawhide
> Trying to pull registry.fedoraproject.org/fedora:rawhide...Getting image
> source signatures
> Copying blob 51a8766de95c done
> Copying config a8e2c6d93a done
> Writing manifest to image destination
> Storing signatures
> [root@66a93c3978c3 /]# locale -a
> C
> C.utf8
> POSIX
> [root@66a93c3978c3 /]# echo $LANG
> C.UTF-8
> 
> 
> Bad:
> 
> $ podman pull fedora:rawhide
> Trying to pull docker.io/library/fedora:rawhide...Getting image source
> signatures
> Copying blob 2e04ad4d7f6e done
> Copying config 30f5d22477 done
> Writing manifest to image destination
> Storing signatures
> 30f5d224770a31bc6ab6ba27264a7fba0bfac3d8f4bb6f5e6f5a08b5c3a36e99
> $ podman run --rm -it fedora:rawhide
> [root@a20d42f82446 /]# locale -a
> 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_COLLATE to default locale: No such file or directory
> C
> C.utf8
> POSIX
> [root@a20d42f82446 /]# echo $LANG
> en_US.UTF-8

Hum not sure what I did wrong on with the docker release, I ll double check and make sure the change is there.

Comment 14 Clement Verna 2019-07-20 17:47:35 UTC
(In reply to Jens Petersen from comment #12)
> I feel honestly it would be better to restore glibc-langpack-en to fedora:30
> until bug 1729454 is sorted out.
> 
> We should not make such breaking changes to stable fedora:latest without
> sufficient testing IMO.

I would take quite some time to revert the change (ie open a PR to fedora-kickstarts, get it merged, then have a successful compose, then release the images in DockerHub and registry.fp.o), while the fix is already release on docker hub for fedora:latest and waiting on https://pagure.io/releng/issue/8542 for registry.fp.o

Comment 15 Jens Petersen 2019-07-21 12:04:39 UTC
(In reply to Clement Verna from comment #14)
> I would take quite some time to revert the change (ie open a PR to
> fedora-kickstarts, get it merged, then have a successful compose, then
> release the images in DockerHub and registry.fp.o), while the fix is already
> release on docker hub for fedora:latest

Okay fair enough:

So in the Fedora registry 31 is okay now but not 30, whereas on Docker 30 is okay but not 31!!

$ alias podman-run='podman run --rm -it'

$ podman image list -n registry.fedoraproject.org/fedora:31
registry.fedoraproject.org/fedora   31   5f87ce3c82a7   13 hours ago   231 MB
$ podman-run registry.fedoraproject.org/fedora:31 cat /etc/locale.conf 
LANG="C.UTF-8"

$ podman image list -n registry.fedoraproject.org/fedora:30
registry.fedoraproject.org/fedora   30   47c865867d25   2 weeks ago   268 MB
$ podman-run registry.fedoraproject.org/fedora:30 cat /etc/locale.conf 
LANG="en_US.UTF-8"

$ podman image list -n docker.io/library/fedora:31
docker.io/library/fedora   31        30f5d224770a   3 days ago   237 MB   
docker.io/library/fedora   rawhide   30f5d224770a   3 days ago   237 MB   
$ podman-run docker.io/library/fedora:31 cat /etc/locale.conf 
LANG="en_US.UTF-8"

$ podman image list -n docker.io/library/fedora:30
docker.io/library/fedora   30   2b74bf3d2430   3 days ago   255 MB   
$ podman-run docker.io/library/fedora:30 cat /etc/locale.conf 
LANG="C.UTF-8"

Comment 16 Clement Verna 2019-07-22 11:09:02 UTC
(In reply to Jens Petersen from comment #15)
> (In reply to Clement Verna from comment #14)
> > I would take quite some time to revert the change (ie open a PR to
> > fedora-kickstarts, get it merged, then have a successful compose, then
> > release the images in DockerHub and registry.fp.o), while the fix is already
> > release on docker hub for fedora:latest
> 
> Okay fair enough:
> 
> So in the Fedora registry 31 is okay now but not 30, whereas on Docker 30 is
> okay but not 31!!
> 
> $ alias podman-run='podman run --rm -it'
> 
> $ podman image list -n registry.fedoraproject.org/fedora:31
> registry.fedoraproject.org/fedora   31   5f87ce3c82a7   13 hours ago   231 MB
> $ podman-run registry.fedoraproject.org/fedora:31 cat /etc/locale.conf 
> LANG="C.UTF-8"
> 
> $ podman image list -n registry.fedoraproject.org/fedora:30
> registry.fedoraproject.org/fedora   30   47c865867d25   2 weeks ago   268 MB
> $ podman-run registry.fedoraproject.org/fedora:30 cat /etc/locale.conf 
> LANG="en_US.UTF-8"
> 
> $ podman image list -n docker.io/library/fedora:31
> docker.io/library/fedora   31        30f5d224770a   3 days ago   237 MB   
> docker.io/library/fedora   rawhide   30f5d224770a   3 days ago   237 MB   
> $ podman-run docker.io/library/fedora:31 cat /etc/locale.conf 
> LANG="en_US.UTF-8"
> 
> $ podman image list -n docker.io/library/fedora:30
> docker.io/library/fedora   30   2b74bf3d2430   3 days ago   255 MB   
> $ podman-run docker.io/library/fedora:30 cat /etc/locale.conf 
> LANG="C.UTF-8"


Yes unfortunately the release process for both registry.fp.o and DockerHub are different. registry.fp.o/fedora:rawhide is updated nightly if the compose is complete while on DockerHub I am trying to update the images on average every 2 weeks. I am currently on Parental leave so things are also a bit slower on my side.

Comment 17 Clement Verna 2019-07-22 11:36:54 UTC
The following PR should take care of the DockerHub fedora:rawhide --> https://github.com/docker-library/official-images/pull/6334. For registry.fp.o/fedora:30 it is still waiting the releng ticket https://pagure.io/releng/issue/8542

Comment 18 Jens Petersen 2019-07-23 01:28:53 UTC
Thanks Clement

Is there any way we can keep Docker Hub and the Fedora Registry in closer sync automatically?
It is quite confusing having different images/datestamps on them. Is/has this already being/been discussed?

Comment 19 Clement Verna 2019-07-23 03:15:39 UTC
Yes it was discussed in this ticket https://pagure.io/releng/issue/8270 but like many other things it just need someone's time to do it.


The DockerHub PR was merged so fedora:31 should be fixed there.

Comment 20 Clement Verna 2019-07-24 18:29:04 UTC
Ok I think we have this finally fixed.

$ podman run --rm -it registry.fedoraproject.org/fedora:30
[root@5c26b4e5abad /]# locale
LANG=C.UTF-8
LC_CTYPE="C.UTF-8"
LC_NUMERIC="C.UTF-8"
LC_TIME="C.UTF-8"
LC_COLLATE="C.UTF-8"
LC_MONETARY="C.UTF-8"
LC_MESSAGES="C.UTF-8"
LC_PAPER="C.UTF-8"
LC_NAME="C.UTF-8"
LC_ADDRESS="C.UTF-8"
LC_TELEPHONE="C.UTF-8"
LC_MEASUREMENT="C.UTF-8"
LC_IDENTIFICATION="C.UTF-8"
LC_ALL=

podman run --rm -it fedora:rawhide 
[root@e146f26c7abc /]# locale
LANG=C.UTF-8
LC_CTYPE="C.UTF-8"
LC_NUMERIC="C.UTF-8"
LC_TIME="C.UTF-8"
LC_COLLATE="C.UTF-8"
LC_MONETARY="C.UTF-8"
LC_MESSAGES="C.UTF-8"
LC_PAPER="C.UTF-8"
LC_NAME="C.UTF-8"
LC_ADDRESS="C.UTF-8"
LC_TELEPHONE="C.UTF-8"
LC_MEASUREMENT="C.UTF-8"
LC_IDENTIFICATION="C.UTF-8"
LC_ALL=


Could you guys double check on your side ?

Thanks

Comment 21 Gordon Messmer 2019-07-25 04:54:14 UTC
All of the images look good to me.

Comment 22 Clement Verna 2019-07-26 06:47:00 UTC
Great thanks, closing this then :-)


Note You need to log in before you can comment on or make changes to this bug.