All of lore.kernel.org
 help / color / mirror / Atom feed
From: Armin Kuster <akuster808@gmail.com>
To: openembedded-core@lists.openembedded.org
Subject: [warrior-next 40/54] glibc/glibc-locale: Fix do_stash_locale to work with usrmerge and multilibs
Date: Sun, 29 Sep 2019 21:47:35 -0700	[thread overview]
Message-ID: <36c223ecc5349478821a7a64a4ff14bbeae0a7da.1569818533.git.akuster808@gmail.com> (raw)
In-Reply-To: <cover.1569818533.git.akuster808@gmail.com>

From: Jason Wessel <jason.wessel@windriver.com>

The do_stash_locale was not working consistently across the 4 build
configurations and the multilib, usrmerge configuration would fail
entirely with the obscure message:

| DEBUG: Executing shell function do_prep_locale_tree
| tar: i18n: Cannot stat: No such file or directory
| tar: Exiting with failure status due to previous errors
| gzip: /poky/build/tmp/work/core2-64-poky-linux/glibc-locale/2.29-r0/locale-tree//usr/share/i18n/charmaps/*gz.gz: No such file or directory
| WARNING: /poky/build/tmp/work/core2-64-poky-linux/glibc-locale/2.29-r0/temp/run.do_prep_locale_tree.124690:1 exit 1 from 'gunzip $i'

Here is the 4 build configurations without the patch applied:

A) x86-64 no multilibs, no usrmerge
find ./tmp/work/*/glibc/2.29-r0/stashed-locale -type f |grep -v nscd.service |wc -l
909
B) x86-64 no multilibs, usrmerge
find ./tmp/work/*/glibc/2.29-r0/stashed-locale -type f |grep -v nscd.service |wc -l
909
C) x86-64 multilibs, no usrmerge
find ./tmp/work/*/glibc/2.29-r0/stashed-locale -type f |grep -v nscd.service |wc -l
885
D) x86-64 multilibs, usrmerge
find ./tmp/work/*/glibc/2.29-r0/stashed-locale -type f |grep -v nscd.service |wc -l
864

The issue here is that all the moves should be processed first, then a
copy should be made of the lib directories, but only in the case they
are different when using the usrmerge feature.  Even though the build
worked for the multilib configuration without usrmerge, the content
was not the same.

After applying the patch the same number of files are in all the
configurations.  The list of files was also diffed, after normalizing
the directory names to ensure all the correct files were copied.

Ultimately there are probably additional files that should be pruned
from what is copied to the stated_locale, but the purpose of this
patch is make it 100% consistent between the build types and fix the
builds.

Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
---
 meta/recipes-core/glibc/glibc-package.inc | 19 +++++++++++++------
 1 file changed, 13 insertions(+), 6 deletions(-)

diff --git a/meta/recipes-core/glibc/glibc-package.inc b/meta/recipes-core/glibc/glibc-package.inc
index a1d79b3..ff17a19 100644
--- a/meta/recipes-core/glibc/glibc-package.inc
+++ b/meta/recipes-core/glibc/glibc-package.inc
@@ -162,21 +162,28 @@ bashscripts = "mtrace sotruss xtrace"
 do_stash_locale () {
 	dest=${LOCALESTASH}
 	install -d ${dest}${base_libdir} ${dest}${bindir} ${dest}${libdir} ${dest}${datadir}
-	if [ "${base_libdir}" != "${libdir}" ]; then
-		cp -fpPR ${D}${base_libdir}/* ${dest}${base_libdir}
-	fi
+	# Hide away the locale data from the deployment
 	if [ -e ${D}${bindir}/localedef ]; then
 		mv -f ${D}${bindir}/localedef ${dest}${bindir}
 	fi
 	if [ -e ${D}${libdir}/gconv ]; then
 		mv -f ${D}${libdir}/gconv ${dest}${libdir}
 	fi
-	if [ -e ${D}${exec_prefix}/lib ]; then
-		cp -fpPR ${D}${exec_prefix}/lib ${dest}${exec_prefix}
-	fi
 	if [ -e ${D}${datadir}/i18n ]; then
 		mv ${D}${datadir}/i18n ${dest}${datadir}
 	fi
+
+	# Make a copy of all the libraries into the locale stash
+	cp -fpPR ${D}${libdir}/* ${dest}${libdir}
+	if [ "${base_libdir}" != "${libdir}" ]; then
+		cp -fpPR ${D}${base_libdir}/* ${dest}${base_libdir}
+	fi
+	if [ -e ${D}${exec_prefix}/lib ]; then
+		if [ ${exec_prefix}/lib != ${base_libdir} ] && [ ${exec_prefix}/lib != ${libdir} ]; then
+			cp -fpPR ${D}${exec_prefix}/lib ${dest}${exec_prefix}
+		fi
+	fi
+
 	cp -fpPR ${D}${datadir}/* ${dest}${datadir}
 	rm -rf ${D}${datadir}/locale/
 	cp -fpPR ${WORKDIR}/SUPPORTED ${dest}
-- 
2.7.4



  parent reply	other threads:[~2019-09-30  4:48 UTC|newest]

Thread overview: 55+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-30  4:46 [warrior-next 00/54] warrior-next pull request Armin Kuster
2019-09-30  4:46 ` [warrior-next 01/54] binutils: fix CVE-2019-12972 CVE-2019-9071 Armin Kuster
2019-09-30  4:46 ` [warrior-next 02/54] binutils: CVE-2019-9070 is same as CVE-2019-9071 Armin Kuster
2019-09-30  4:46 ` [warrior-next 03/54] python: fix CVE-2019-9740 Armin Kuster
2019-09-30  4:46 ` [warrior-next 04/54] libxslt: fix CVE-2019-13117 CVE-2019-13118 Armin Kuster
2019-09-30  4:47 ` [warrior-next 05/54] glibc: CVE-2018-20796 is same as CVE-2019-9169 Armin Kuster
2019-09-30  4:47 ` [warrior-next 06/54] libid3tag: handle unknown encodings (CVE-2017-11550) Armin Kuster
2019-09-30  4:47 ` [warrior-next 07/54] libid3tag: CVE-2017-11551 is the same as CVE-2004-2779 Armin Kuster
2019-09-30  4:47 ` [warrior-next 08/54] tiff: fix CVE-2019-6128 Armin Kuster
2019-09-30  4:47 ` [warrior-next 09/54] tiff: fix CVE-2019-7663 Armin Kuster
2019-09-30  4:47 ` [warrior-next 10/54] libsdl: CVE fixes Armin Kuster
2019-09-30  4:47 ` [warrior-next 11/54] gstreamer1.0-vaapi: backport jpeg encode/decode fixes Armin Kuster
2019-09-30  4:47 ` [warrior-next 12/54] package: Improve determinism Armin Kuster
2019-09-30  4:47 ` [warrior-next 13/54] patch: fix CVE-2019-13636 Armin Kuster
2019-09-30  4:47 ` [warrior-next 14/54] python3: fix CVE-2019-9740 Armin Kuster
2019-09-30  4:47 ` [warrior-next 15/54] ghostscript: fix CVE-2019-3839 Armin Kuster
2019-09-30  4:47 ` [warrior-next 16/54] rng-tools: fix very long shutdown delay with systemd Armin Kuster
2019-09-30  4:47 ` [warrior-next 17/54] psmisc: Fix dependency for USE_NLS=no Armin Kuster
2019-09-30  4:47 ` [warrior-next 18/54] package.bbclass: fix directories setuid and setgid bits Armin Kuster
2019-09-30  4:47 ` [warrior-next 19/54] qemu: add a patch fixing the native build on newer kernels Armin Kuster
2019-09-30  4:47 ` [warrior-next 20/54] mesa: Update 19.0.1 -> 19.0.8 Armin Kuster
2019-09-30  4:47 ` [warrior-next 21/54] qemu: fix CVE-2018-20815 Armin Kuster
2019-09-30  4:47 ` [warrior-next 22/54] linux-yocto/4.19: update to 4.19.57 and -rt22 Armin Kuster
2019-09-30  4:47 ` [warrior-next 23/54] linux-yocto/4.19: update to v4.19.61 Armin Kuster
2019-09-30  4:47 ` [warrior-next 24/54] boost: Fix build and enable context and coroutines on aarch64 Armin Kuster
2019-09-30  4:47 ` [warrior-next 25/54] rsync: fix CVEs for included zlib Armin Kuster
2019-09-30  4:47 ` [warrior-next 26/54] patch: fix CVE-2019-13638 Armin Kuster
2019-09-30  4:47 ` [warrior-next 27/54] patch: backport fixes Armin Kuster
2019-09-30  4:47 ` [warrior-next 28/54] dpkg: Use less as pager Armin Kuster
2019-09-30  4:47 ` [warrior-next 29/54] icecc.bbclass: catch subprocess.CalledProcessError Armin Kuster
2019-09-30  4:47 ` [warrior-next 30/54] meson: backport fix for builds with -Werror=return-type Armin Kuster
2019-09-30  4:47 ` [warrior-next 31/54] powertop: import a fix from buildroot Armin Kuster
2019-09-30  4:47 ` [warrior-next 32/54] binutils: fix CVE-2019-14250 CVE-2019-14444 Armin Kuster
2019-09-30  4:47 ` [warrior-next 33/54] pango: fix CVE-2019-1010238 Armin Kuster
2019-09-30  4:47 ` [warrior-next 34/54] glib-2.0: fix CVE-2019-13012 Armin Kuster
2019-09-30  4:47 ` [warrior-next 35/54] gcc: reduce the variables in symtab Armin Kuster
2019-09-30  4:47 ` [warrior-next 36/54] gcc: CVE-2018-12886 Armin Kuster
2019-09-30  4:47 ` [warrior-next 37/54] binutils: Fix mips patch which changes default emulation Armin Kuster
2019-09-30  4:47 ` [warrior-next 38/54] glibc: Fix multilibs + usrmerge builds Armin Kuster
2019-09-30  4:47 ` [warrior-next 39/54] glibc-locale: Fix build error with PACKAGE_NO_GCONV = "1" Armin Kuster
2019-09-30  4:47 ` Armin Kuster [this message]
2019-09-30  4:47 ` [warrior-next 41/54] glibc / glibc-locale: Fix stash_locale determinism problems Armin Kuster
2019-09-30  4:47 ` [warrior-next 42/54] gcc-8.3: Security fix for CVE-2019-14250 Armin Kuster
2019-09-30  4:47 ` [warrior-next 43/54] kernel-fitimage: uboot-sign: fix missing signature Armin Kuster
2019-09-30  4:47 ` [warrior-next 44/54] kernel-devsrc: tweak for v5.3+ Armin Kuster
2019-09-30  4:47 ` [warrior-next 45/54] libxcrypt: Fix the build with -Os Armin Kuster
2019-09-30  4:47 ` [warrior-next 46/54] libgpg-error: Fix build with gawk 5.x Armin Kuster
2019-09-30  4:47 ` [warrior-next 47/54] Curl: Security fix for CVE-2019-5482 Armin Kuster
2019-09-30  4:47 ` [warrior-next 48/54] gcc: Security fix for CVE-2019-15847 Armin Kuster
2019-09-30  4:47 ` [warrior-next 49/54] multilib.bbclass: Reduce ALTERNATIVE_PRIORITY for extended recipes Armin Kuster
2019-09-30  4:47 ` [warrior-next 50/54] useradd: Fix build architecture corruption of sstate artefacts Armin Kuster
2019-09-30  4:47 ` [warrior-next 51/54] useradd: Ensure do_populate_sysroot has dependency on useradd variables Armin Kuster
2019-09-30  4:47 ` [warrior-next 52/54] uboot: fixes to uboot-extlinux-config attribute values Armin Kuster
2019-09-30  4:47 ` [warrior-next 53/54] kernel-uboot: compress arm64 kernels Armin Kuster
2019-09-30  4:47 ` [warrior-next 54/54] cve-check: backport rewrite from master Armin Kuster

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=36c223ecc5349478821a7a64a4ff14bbeae0a7da.1569818533.git.akuster808@gmail.com \
    --to=akuster808@gmail.com \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.