Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 710762 - admincd: no UTF-8 locale
Summary: admincd: no UTF-8 locale
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Release Media
Classification: Unclassified
Component: LiveCD/DVD (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Release Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-02-25 08:05 UTC by Alexander Tsoy
Modified: 2020-10-03 16:03 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Tsoy 2020-02-25 08:05:58 UTC
tmux requires UTF-8 locale to run:

livecd ~ # tmux 
tmux: need UTF-8 locale (LC_CTYPE) but have ANSI_X3.4-1968
livecd ~ # locale -a
C
POSIX


And locales cannot be generated:

livecd ~ # sed -i.bak 's/^#\(en_US.*\)/\1/' /etc/locale.gen
livecd ~ # locale-gen 
 * Generating 3 locales (this might take a while) with 8 jobs
 *  (1/3) Generating en_US.ISO-8859-1 ...
[error] character map file `ISO-8859-1' not found: No such file or directory
[error] cannot read character map directory `/usr/share/i18n/charmaps': No such file or directory                                                                                                                                       [ !! ]
 *  (2/3) Generating en_US.UTF-8 ...
[error] character map file `UTF-8' not found: No such file or directory
[error] cannot read character map directory `/usr/share/i18n/charmaps': No such file or directory                                                                                                                                       [ !! ]
 *  (3/3) Generating C.UTF-8 ...
[error] character map file `UTF-8' not found: No such file or directory
[error] cannot read character map directory `/usr/share/i18n/charmaps': No such file or directory                                                                                                                                       [ !! ]
 * Generation complete
 * Adding locales to archive ...
cannot create temporary file: //usr/lib64/locale/locale-archive.FKe7PW: Read-only file system
 * C.UTF-8:


I'm using latest admincd: admincd-amd64-20200223T214502Z.iso
Comment 1 Ben Kohler gentoo-dev 2020-02-26 13:50:22 UTC
Looking into this now.  Our minimal installcd  DOES have all of the locales, so I need to find out what's special about the admincd.

I do notice that we added a forced glibc rebuild [1] to installcd-stage1 to work around another issue, which admincd-stage1 doesn't have.  I'll test that theory soon.

[1] https://gitweb.gentoo.org/proj/releng.git/tree/releases/weekly/specs/amd64/installcd-stage1.spec#n104
Comment 2 Larry the Git Cow gentoo-dev 2020-04-06 00:11:29 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/proj/releng.git/commit/?id=dc5b666533c2902a2087572394a760c4ec8030eb

commit dc5b666533c2902a2087572394a760c4ec8030eb
Author:     Matt Turner <mattst88@gentoo.org>
AuthorDate: 2020-03-28 18:06:09 +0000
Commit:     Matt Turner <mattst88@gentoo.org>
CommitDate: 2020-04-02 23:50:36 +0000

    specs: Enable USE=compile-locales for installcd-stage1
    
    This patch causes glibc (starting with version 2.30) to be remerged in
    installcd-stage1 with USE=compile-locales.
    
    Available with glibc-2.30, USE=compile-locales will generate the locales
    in src_install() and include them in the binary package.
    
    This enables catalyst to reduce the locales produced in stages 1-3 to a
    minimal set without causing the ISOs to have a limited set of locales.
    
    Bug: https://bugs.gentoo.org/710762
    Signed-off-by: Matt Turner <mattst88@gentoo.org>

 releases/weekly/specs/alpha/installcd-stage1.spec         | 1 +
 releases/weekly/specs/amd64/installcd-stage1.spec         | 1 +
 releases/weekly/specs/hppa/installcd-stage1.spec          | 1 +
 releases/weekly/specs/ia64/installcd-stage1.spec          | 1 +
 releases/weekly/specs/ppc/ppc32/installcd-stage1.spec     | 1 +
 releases/weekly/specs/sparc/sparc64/installcd-stage1.spec | 1 +
 releases/weekly/specs/x86/hardened/installcd-stage1.spec  | 1 +
 releases/weekly/specs/x86/installcd-stage1.spec           | 1 +
 8 files changed, 8 insertions(+)
Comment 3 Larry the Git Cow gentoo-dev 2020-04-08 00:25:21 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=f0e772bd3905d02d691d0e41b3a8e3bd3c10e2fe

commit f0e772bd3905d02d691d0e41b3a8e3bd3c10e2fe
Author:     Matt Turner <mattst88@gentoo.org>
AuthorDate: 2020-03-27 23:28:11 +0000
Commit:     Matt Turner <mattst88@gentoo.org>
CommitDate: 2020-04-07 23:23:07 +0000

    targets: Set LANG=C.UTF8
    
    Stable glibc now always provides a UTF-8 capable locale, which many
    packages require. Set this as the default LANG.
    
    Running locale-gen in stage1 should also solve bug #536938.
    
    Bug: https://bugs.gentoo.org/536938
    Bug: https://bugs.gentoo.org/710762
    Bug: https://bugs.gentoo.org/714906
    Signed-off-by: Matt Turner <mattst88@gentoo.org>

 targets/stage1/chroot.sh | 12 ++++++++++++
 1 file changed, 12 insertions(+)
Comment 4 Matt Turner gentoo-dev 2020-05-20 18:05:38 UTC
This is included in catalyst-3.0.10.
Comment 5 Larry the Git Cow gentoo-dev 2020-10-03 16:03:09 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=234286ffae459764e2dfaf55c94e44ec3ad4e9cd

commit 234286ffae459764e2dfaf55c94e44ec3ad4e9cd
Author:     Matt Turner <mattst88@gentoo.org>
AuthorDate: 2020-10-03 03:20:58 +0000
Commit:     Matt Turner <mattst88@gentoo.org>
CommitDate: 2020-10-03 03:20:58 +0000

    targets: Remove ancient locale-deleting code
    
    This block of code was added in commit ef648688ce8b ("Forward port the
    changes from catalyst 1.1.9 to 1.1.10.10 to catalyst2.") in 2005 without
    any further explanation. Since locale-gen was first committed to our
    glibc package in 2006, we think that locales were handled differently
    before (and not packed into /usr/${libdir}/locale/locale-archive).
    
    Not only is this code unneeded, it can actually cause the locale-archive
    to be deleted if the livecd is using a multilib profile! E.g. on a
    multilib amd64 profile, where /usr/lib/locale is a symlink to
    /usr/lib64/locale, it deletes /usr/lib64/locale/l* which matches
    /usr/lib64/locale/locale-archive.
    
    Because the minimal livecd uses a non-multilib profile, this explains
    why it still contained the expected set of locales, while the multilib
    admincd did not.
    
    Thanks go to Ben Kohler, Thomas Deutschmann, and  Andreas Hüttel for
    figuring out this mystery!
    
    Bug: https://bugs.gentoo.org/710762
    Signed-off-by: Matt Turner <mattst88@gentoo.org>

 targets/support/livecdfs-update.sh | 7 -------
 1 file changed, 7 deletions(-)