Commit 7b76db81 authored by Islam Amer's avatar Islam Amer

Let vendors handle their own locale-archive generation

All files needed to generate all locales are already installed by glibc-common.
Just run for example: localedef --replace -i en_GB -f UTF-8 en_GB.utf8
Signed-off-by: default avatarIslam Amer <>
parent 6bb2273e
* Sun Dec 21 2014 Islam Amer <> - 2.19
- Remove locale-archive.tmpl generation during build time to save ~100Mb disk space
- Remove build-locale-archive invocation in %post to save a lot of time and disk burn
* Sat Dec 13 2014 Carsten Munk <> - 2.19
- Disable special -march=i486 for glibc
- Use correct release. Release is mungled on OBS
......@@ -328,11 +328,6 @@ GCC=`cat Gcc`
mkdir -p $RPM_BUILD_ROOT
make -j1 install_root=$RPM_BUILD_ROOT install -C build-%{nptl_target_cpu}-linuxnptl PARALLELMFLAGS=
%ifnarch %{auxarches}
cd build-%{nptl_target_cpu}-linuxnptl && \
make %{?_smp_mflags} install_root=$RPM_BUILD_ROOT install-locales -C ../localedata objdir=`pwd` && \
cd ..
librtso=`basename $RPM_BUILD_ROOT/%{_lib}/*`
......@@ -390,37 +385,13 @@ for i in *.a; do
# Hardlink identical locale files together
%ifnarch %{auxarches}
#From 2.11, removed hardlink
pushd ${RPM_BUILD_ROOT}%{_prefix}/lib/locale
rm locale-archive || :
# Intentionally we do not pass --alias-file=, aliases will be added
# by build-locale-archive.
# note that due to qemu-arm emulation behaviour, we need to break this up into multiple invocations.
# see BMC 10526.
localedef_bin="$olddir/build-%{nptl_target_cpu}-linuxnptl/elf/ --library-path $olddir/build-%{nptl_target_cpu}-linuxnptl/ $olddir/build-%{nptl_target_cpu}-linuxnptl/locale/localedef"
%if 0%{?qemu_user_space_build}
if [ -f /usr/bin/localedef ]; then
find . -name '*_*' -maxdepth 1 | xargs -r -n10 -P1 --verbose $localedef_bin --prefix ${RPM_BUILD_ROOT} --add-to-archive
rm -rf *_*
mv locale-archive{,.tmpl}
mkdir -p $RPM_BUILD_ROOT/%{_prefix}/lib/locale/
> $RPM_BUILD_ROOT/%{_prefix}/lib/locale/locale-archive
%ifarch armv7hl armv7tnhl armv7nhl
ln -s /lib/ ${RPM_BUILD_ROOT}/lib/
rm -f ${RPM_BUILD_ROOT}/%{_lib}/libnss1-*
rm -f ${RPM_BUILD_ROOT}/%{_lib}/libnss-*.so.1
......@@ -594,10 +565,6 @@ touch $RPM_BUILD_ROOT/var/{db,run}/nscd/{passwd,group,hosts,services}
touch $RPM_BUILD_ROOT/var/run/nscd/{socket,}
%ifnarch %{auxarches}
> $RPM_BUILD_ROOT/%{_prefix}/lib/locale/locale-archive
install -m 700 build-locale-archive $RPM_BUILD_ROOT/usr/sbin/build-locale-archive
mkdir -p $RPM_BUILD_ROOT/var/cache/ldconfig
......@@ -615,8 +582,6 @@ fi
%postun utils -p /sbin/ldconfig
%post common -p /usr/sbin/build-locale-archive
%pre -n nscd
/usr/sbin/useradd -M -o -r -d / -s /sbin/nologin \
-c "NSCD Daemon" -u 28 nscd > /dev/null 2>&1 || :
......@@ -653,7 +618,6 @@ fi
%files -f common.filelist common
%dir %{_prefix}/lib/locale
%attr(0644,root,root) %verify(not md5 size mtime) %{_prefix}/lib/locale/locale-archive.tmpl
%attr(0644,root,root) %verify(not md5 size mtime mode) %ghost %config(missingok,noreplace) %{_prefix}/lib/locale/locale-archive
%dir %attr(755,root,root) /etc/default
%verify(not md5 size mtime) %config(noreplace) /etc/default/nss
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment