Skip to content

Commit

Permalink
glibc: fix locale generation issue
Browse files Browse the repository at this point in the history
In the existing system, locale-gen.sh requires few extra files to
generate locales properly or else when we run this script it will result
in a login loop due to login daemon crash because of incomplete locale
data.

This patch fixes it by packaging the minimal set of files needed to
generate the basic locale info.

Change-Id: Ie35aa5b1aba86b812867e60336ed92ae42c9a764
Signed-off-by: Shreenidhi Shedi <[email protected]>
Reviewed-on: http://photon-jenkins.eng.vmware.com:8082/20480
Tested-by: gerrit-photon <[email protected]>
Reviewed-by: Tapas Kundu <[email protected]>
  • Loading branch information
sshedi authored and tapakund committed Apr 11, 2023
1 parent 94aeca1 commit b1b9244
Showing 1 changed file with 17 additions and 2 deletions.
19 changes: 17 additions & 2 deletions SPECS/glibc/glibc.spec
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
Summary: Main C library
Name: glibc
Version: 2.36
Release: 3%{?dist}
Release: 4%{?dist}
License: LGPLv2+
URL: http://www.gnu.org/software/libc
Group: Applications/System
Expand All @@ -14,6 +14,7 @@ Distribution: Photon

Source0: http://ftp.gnu.org/gnu/glibc/%{name}-%{version}.tar.xz
%define sha512 %{name}=9ea0bbda32f83a85b7da0c34f169607fb8a102f0a11a914e6bf531be47d1bef4f5307128286cffa1e2dc5879f0e6ccaef527dd353486883fa332a0b44bde8b3e

Source1: locale-gen.sh
Source2: locale-gen.conf

Expand All @@ -27,6 +28,8 @@ Provides: /sbin/ldconfig

Requires: filesystem

Conflicts: %{name}-i18n < 2.36-4

%define ExtraBuildRequires bison, python3, python3-libs

%description
Expand Down Expand Up @@ -272,7 +275,12 @@ fi
%{_datadir}/i18n/charmaps/UTF-8.gz
%{_datadir}/i18n/charmaps/ISO-8859-1.gz
%{_datadir}/i18n/locales/en_US
%{_datarootdir}/locale/locale.alias
%{_datadir}/i18n/locales/en_GB
%{_datadir}/i18n/locales/i18n*
%{_datadir}/i18n/locales/iso14651_t1
%{_datadir}/i18n/locales/iso14651_t1_common
%{_datadir}/i18n/locales/translit_*
%{_datadir}/locale/locale.alias
%exclude %{_sharedstatedir}/nss_db/Makefile
%exclude %{_bindir}/iconv
%exclude %{_bindir}/mtrace
Expand Down Expand Up @@ -315,6 +323,11 @@ fi
%exclude %{_datadir}/i18n/charmaps/UTF-8.gz
%exclude %{_datadir}/i18n/charmaps/ISO-8859-1.gz
%exclude %{_datadir}/i18n/locales/en_US
%exclude %{_datadir}/i18n/locales/en_GB
%exclude %{_datadir}/i18n/locales/i18n*
%exclude %{_datadir}/i18n/locales/iso14651_t1
%exclude %{_datadir}/i18n/locales/iso14651_t1_common
%exclude %{_datadir}/i18n/locales/translit_*

%files devel
%defattr(-,root,root)
Expand All @@ -328,6 +341,8 @@ fi
%defattr(-,root,root)

%changelog
* Fri Apr 07 2023 Shreenidhi Shedi <[email protected]> 2.36-4
- Fix locale generation issue by packaging files properly
* Fri Jan 20 2023 Shreenidhi Shedi <[email protected]> 2.36-3
- Don't change elf permissions in glibc
* Tue Jan 17 2023 Piyush Gupta <[email protected]> 2.36-2
Expand Down

0 comments on commit b1b9244

Please sign in to comment.