sys-libs/glibc: avoid libm-2.26.so symlink clash on merged /usr, bug #627378
authorMatija Skala <mskala@gmx.com>
Thu, 9 Nov 2017 16:49:37 +0000 (17:49 +0100)
committerSergei Trofimovich <slyfox@gentoo.org>
Sun, 31 Dec 2017 21:26:29 +0000 (21:26 +0000)
commit0e95698ff9584aa8045275705c0247a77264d044
treee7e807cac395c7fc9db7e92be16c402671f9f457
parent203a8aa3740fe72a810b77a3e5830e477df3a17c
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
sys-libs/glibc/glibc-2.26-r5.ebuild [moved from sys-libs/glibc/glibc-2.26-r4.ebuild with 97% similarity]
sys-libs/glibc/glibc-9999.ebuild