summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatija Skala <mskala@gmx.com>2017-11-09 17:49:37 +0100
committerSergei Trofimovich <slyfox@gentoo.org>2017-12-31 21:26:29 +0000
commit0e95698ff9584aa8045275705c0247a77264d044 (patch)
treee7e807cac395c7fc9db7e92be16c402671f9f457 /sys-libs
parentapp-admin/yadm: version bump. (diff)
downloadgentoo-0e95698ff9584aa8045275705c0247a77264d044.tar.gz
gentoo-0e95698ff9584aa8045275705c0247a77264d044.tar.bz2
gentoo-0e95698ff9584aa8045275705c0247a77264d044.zip
sys-libs/glibc: avoid libm-2.26.so symlink clash on merged /usr, bug #627378
The problem in bug #627378 manifests as libm-2.26.so file corruption: Before the change glibc package contained a 'libm-2.26.so' symlink from '/usr/lib64' to '/lib64': $ equery f sys-libs/glibc | sed 's@usr/lib@lib@g' | sort | uniq -d /lib64/libm-2.26.so When both are the same directory all depends on the merge order: - symlink first, then real file. real file overwrites symlink, all is good - real file first, then symlink. symlink overwrites the file and points to itself. Binaries linked against libm fail to start. The change is to get rid of symlink (symlink was a workaround to portage's QA check) and move 'libm-2.26.a' from '/usr/lib64' to '/usr/lib64/glibc-<pv>'. Reported-by: Duncan Fixed-by: Matija Skala Closes: https://bugs.gentoo.org/627378 Closes: https://github.com/gentoo/gentoo/pull/4268
Diffstat (limited to 'sys-libs')
-rw-r--r--sys-libs/glibc/glibc-2.26-r5.ebuild (renamed from sys-libs/glibc/glibc-2.26-r4.ebuild)11
-rw-r--r--sys-libs/glibc/glibc-9999.ebuild11
2 files changed, 14 insertions, 8 deletions
diff --git a/sys-libs/glibc/glibc-2.26-r4.ebuild b/sys-libs/glibc/glibc-2.26-r5.ebuild
index 97cf7ef1cbce..abde9e62f95f 100644
--- a/sys-libs/glibc/glibc-2.26-r4.ebuild
+++ b/sys-libs/glibc/glibc-2.26-r5.ebuild
@@ -607,15 +607,18 @@ glibc_do_src_install() {
find "${D}" -name "libnsl.a" -delete
find "${D}" -name "libnsl.so" -delete
- # Normally real_pv is ${PV}. Live ebuilds are exception, there we need
+ # Normally upstream_pv is ${PV}. Live ebuilds are exception, there we need
# to infer upstream version:
# '#define VERSION "2.26.90"' -> '2.26.90'
local upstream_pv=$(sed -n -r 's/#define VERSION "(.*)"/\1/p' "${S}"/version.h)
- # Newer versions get fancy with libm linkage to include vectorized support.
- # While we don't really need a ldscript here, portage QA checks get upset.
if [[ -e ${ED}$(alt_usrlibdir)/libm-${upstream_pv}.a ]] ; then
- dosym ../../$(get_libdir)/libm-${upstream_pv}.so $(alt_usrlibdir)/libm-${upstream_pv}.so
+ # Move versioned .a file out of libdir to evade portage QA checks
+ # instead of using gen_usr_ldscript(). We fix ldscript as:
+ # "GROUP ( /usr/lib64/libm-<pv>.a ..." -> "GROUP ( /usr/lib64/glibc-<pv>/libm-<pv>.a ..."
+ sed -i "s@\(libm-${upstream_pv}.a\)@${P}/\1@" "${ED}"$(alt_usrlibdir)/libm.a || die
+ dodir $(alt_usrlibdir)/${P}
+ mv "${ED}"$(alt_usrlibdir)/libm-${upstream_pv}.a "${ED}"$(alt_usrlibdir)/${P}/libm-${upstream_pv}.a || die
fi
# We'll take care of the cache ourselves
diff --git a/sys-libs/glibc/glibc-9999.ebuild b/sys-libs/glibc/glibc-9999.ebuild
index a5bf3b51ebc1..2aed938db026 100644
--- a/sys-libs/glibc/glibc-9999.ebuild
+++ b/sys-libs/glibc/glibc-9999.ebuild
@@ -614,15 +614,18 @@ glibc_do_src_install() {
find "${D}" -name "libnsl.a" -delete
find "${D}" -name "libnsl.so" -delete
- # Normally real_pv is ${PV}. Live ebuilds are exception, there we need
+ # Normally upstream_pv is ${PV}. Live ebuilds are exception, there we need
# to infer upstream version:
# '#define VERSION "2.26.90"' -> '2.26.90'
local upstream_pv=$(sed -n -r 's/#define VERSION "(.*)"/\1/p' "${S}"/version.h)
- # Newer versions get fancy with libm linkage to include vectorized support.
- # While we don't really need a ldscript here, portage QA checks get upset.
if [[ -e ${ED}$(alt_usrlibdir)/libm-${upstream_pv}.a ]] ; then
- dosym ../../$(get_libdir)/libm-${upstream_pv}.so $(alt_usrlibdir)/libm-${upstream_pv}.so
+ # Move versioned .a file out of libdir to evade portage QA checks
+ # instead of using gen_usr_ldscript(). We fix ldscript as:
+ # "GROUP ( /usr/lib64/libm-<pv>.a ..." -> "GROUP ( /usr/lib64/glibc-<pv>/libm-<pv>.a ..."
+ sed -i "s@\(libm-${upstream_pv}.a\)@${P}/\1@" "${ED}"$(alt_usrlibdir)/libm.a || die
+ dodir $(alt_usrlibdir)/${P}
+ mv "${ED}"$(alt_usrlibdir)/libm-${upstream_pv}.a "${ED}"$(alt_usrlibdir)/${P}/libm-${upstream_pv}.a || die
fi
# We'll take care of the cache ourselves