Gentoo Archives: gentoo-commits

From: "Andreas K. Hüttel" <dilfridge@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-libs/glibc/
Date: Fri, 11 Jun 2021 17:18:18
Message-Id: 1623431883.ddff3e8e4dda6e67215c87d1c306ebba60e3923c.dilfridge@gentoo
1 commit: ddff3e8e4dda6e67215c87d1c306ebba60e3923c
2 Author: Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
3 AuthorDate: Fri Jun 11 17:17:49 2021 +0000
4 Commit: Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
5 CommitDate: Fri Jun 11 17:18:03 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ddff3e8e
7
8 sys-libs/glibc: Install LSB 5.0 compatibility symlink
9
10 Package-Manager: Portage-3.0.18, Repoman-3.0.2
11 Signed-off-by: Andreas K. Hüttel <dilfridge <AT> gentoo.org>
12
13 sys-libs/glibc/glibc-9999.ebuild | 21 +++++++++++++++++++++
14 1 file changed, 21 insertions(+)
15
16 diff --git a/sys-libs/glibc/glibc-9999.ebuild b/sys-libs/glibc/glibc-9999.ebuild
17 index f6c0a1f83f5..dff43ad9f2c 100644
18 --- a/sys-libs/glibc/glibc-9999.ebuild
19 +++ b/sys-libs/glibc/glibc-9999.ebuild
20 @@ -1292,6 +1292,27 @@ glibc_do_src_install() {
21 fi
22 done
23
24 + # In the LSB 5.0 definition, someone had the excellent idea to "standardize"
25 + # the runtime loader name, see also https://xkcd.com/927/
26 + # Normally, in Gentoo one should never come across executables that require this.
27 + # However, binary commercial packages are known to adhere to weird practices.
28 + # https://refspecs.linuxfoundation.org/LSB_5.0.0/LSB-Core-AMD64/LSB-Core-AMD64.html#BASELIB
29 + local lsb_ldso_name native_ldso_name lsb_ldso_abi
30 + local lsb_ldso_abi_list=(
31 + # x86
32 + amd64 ld-linux-x86-64.so.2 ld-lsb-x86-64.so.3
33 + )
34 + for (( i = 0; i < ${#lsb_ldso_abi_list[@]}; i += 3 )) ; do
35 + lsb_ldso_abi=${lsb_ldso_abi_list[i]}
36 + native_ldso_name=${lsb_ldso_abi_list[i+1]}
37 + lsb_ldso_name=${lsb_ldso_abi_list[i+2]}
38 + has ${lsb_ldso_abi} $(get_install_abis) || continue
39 +
40 + if [[ ! -L ${ED}/$(get_abi_LIBDIR ${lsb_ldso_abi})/${lsb_ldso_name} && ! -e ${ED}/$(get_abi_LIBDIR ${lsb_ldso_abi})/${lsb_ldso_name} ]] ; then
41 + dosym ${native_ldso_name} "/$(get_abi_LIBDIR ${lsb_ldso_abi})/${lsb_ldso_name}"
42 + fi
43 + done
44 +
45 # With devpts under Linux mounted properly, we do not need the pt_chown
46 # binary to be setuid. This is because the default owners/perms will be
47 # exactly what we want.