RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1677927 - Unable to invoke localedef to UTF-8: cannot read character map directory `/usr/share/i18n/charmaps'
Summary: Unable to invoke localedef to UTF-8: cannot read character map directory `/us...
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: ubi-minimal-container
Version: 7.6
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: rc
: ---
Assignee: Jindrich Novy
QA Contact: Martin Jenner
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-02-16 23:22 UTC by Clayton Coleman
Modified: 2021-03-15 07:33 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-03-15 07:33:22 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Clayton Coleman 2019-02-16 23:22:40 UTC
While attempting to reparent a number of images in OpenShift to UBI-7 (https://access.redhat.com/containers/#/registry.access.redhat.com/ubi7-minimal/images/7.6-24) one of the images (which leverages Jenkins) needed to invoke

    $ localedef -f UTF-8 -i en_US en_US.UTF-8

which failed with:

character map file `UTF-8' not found: No such file or directory
cannot read character map directory `/usr/share/i18n/charmaps': No such file or directory

I attempted to update glibc-common to see if the file was laid down, but it was not (I was able to get an update but the file was missing after the fact).

Is there any way to get at UTF-8 locales on a UBI7 system via microdnf?

Comment 1 Josh Boyer 2019-02-18 21:25:45 UTC
This appears to be another "removed content during the base image build bug", similar to bug 1677818 and bug 1665251

Comment 5 Roland Weber 2019-05-28 13:39:06 UTC
This might be caused by a packaging change in glibc:
https://fedoraproject.org/wiki/Changes/Glibc_locale_subpackaging

In UBI 8, the English locales come in a package called glibc-langpack-en.
The charmaps are still missing after installing that though.
Maybe they are in the corresponding source package?

Comment 6 Derrick Ornelas 2019-05-28 14:48:34 UTC
(In reply to Roland Weber from comment #5)
> This might be caused by a packaging change in glibc:
> https://fedoraproject.org/wiki/Changes/Glibc_locale_subpackaging
> 
> In UBI 8, the English locales come in a package called glibc-langpack-en.
> The charmaps are still missing after installing that though.
> Maybe they are in the corresponding source package?


These files are deliberately deleted from the base install used to create the minimal image.  This is done to make the overall image smaller.  

---
for dir in locale i18n; do
    find /usr/share/${dir} -mindepth  1 -maxdepth 1 -type d -not \( -name "${KEEPLANG}" -o -name POSIX \) -exec rm -rf {} +
done
---


Re-installing the glibc-common package should restore the files, but microdnf doesn't have a reinstall option.

Comment 7 Roland Weber 2019-05-29 05:39:25 UTC
I tried re-installing glibc-common with dnf (on UBI 8), but the charmaps were not restored.
Afterwards, I found the glibc-langpack-en, which solved my problem.
Unlike the issue opener, I only need the locale to be available, without generating it myself.

Comment 10 RHEL Program Management 2021-03-15 07:33:22 UTC
After evaluating this issue, there are no plans to address it further or fix it in an upcoming release.  Therefore, it is being closed.  If plans change such that this issue will be fixed in an upcoming release, then the bug can be reopened.


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