commit: ddff3e8e4dda6e67215c87d1c306ebba60e3923c
Author: Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
AuthorDate: Fri Jun 11 17:17:49 2021 +0000
Commit: Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
CommitDate: Fri Jun 11 17:18:03 2021 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ddff3e8e
sys-libs/glibc: Install LSB 5.0 compatibility symlink
Package-Manager: Portage-3.0.18, Repoman-3.0.2
Signed-off-by: Andreas K. Hüttel <dilfridge <AT> gentoo.org>
sys-libs/glibc/glibc-9999.ebuild | 21 +++++++++++++++++++++
1 file changed, 21 insertions(+)
diff --git a/sys-libs/glibc/glibc-9999.ebuild b/sys-libs/glibc/glibc-9999.ebuild
index f6c0a1f83f5..dff43ad9f2c 100644
--- a/sys-libs/glibc/glibc-9999.ebuild
+++ b/sys-libs/glibc/glibc-9999.ebuild
@@ -1292,6 +1292,27 @@ glibc_do_src_install() {
fi
done
+ # In the LSB 5.0 definition, someone had the excellent idea to
"standardize"
+ # the runtime loader name, see also https://xkcd.com/927/
+ # Normally, in Gentoo one should never come across executables that
require this.
+ # However, binary commercial packages are known to adhere to weird
practices.
+ #
https://refspecs.linuxfoundation.org/LSB_5.0.0/LSB-Core-AMD64/LSB-Core-AMD64.html#BASELIB
+ local lsb_ldso_name native_ldso_name lsb_ldso_abi
+ local lsb_ldso_abi_list=(
+ # x86
+ amd64 ld-linux-x86-64.so.2 ld-lsb-x86-64.so.3
+ )
+ for (( i = 0; i < ${#lsb_ldso_abi_list[@]}; i += 3 )) ; do
+ lsb_ldso_abi=${lsb_ldso_abi_list[i]}
+ native_ldso_name=${lsb_ldso_abi_list[i+1]}
+ lsb_ldso_name=${lsb_ldso_abi_list[i+2]}
+ has ${lsb_ldso_abi} $(get_install_abis) || continue
+
+ if [[ ! -L ${ED}/$(get_abi_LIBDIR
${lsb_ldso_abi})/${lsb_ldso_name} && ! -e ${ED}/$(get_abi_LIBDIR
${lsb_ldso_abi})/${lsb_ldso_name} ]] ; then
+ dosym ${native_ldso_name} "/$(get_abi_LIBDIR
${lsb_ldso_abi})/${lsb_ldso_name}"
+ fi
+ done
+
# With devpts under Linux mounted properly, we do not need the pt_chown
# binary to be setuid. This is because the default owners/perms will be
# exactly what we want.