diff options
author | Mike Gilbert <floppym@gentoo.org> | 2024-10-10 13:18:56 -0400 |
---|---|---|
committer | Mike Gilbert <floppym@gentoo.org> | 2024-10-12 11:53:36 -0400 |
commit | 80781de2c71054bccb012c1ef2acf5dc7f079f6a (patch) | |
tree | c21addfe5099552a4059faacfdbf5a10ca2ea5c5 /sys-devel/distcc | |
parent | sys-devel/distcc: revbump (diff) | |
download | gentoo-80781de2c71054bccb012c1ef2acf5dc7f079f6a.tar.gz gentoo-80781de2c71054bccb012c1ef2acf5dc7f079f6a.tar.bz2 gentoo-80781de2c71054bccb012c1ef2acf5dc7f079f6a.zip |
sys-devel/distcc: move masquerade links to /usr/lib/distcc
This matches the path used internally by distcc.
We provide a symlink at /usr/lib/distcc/bin for backward compat.
Bug: https://bugs.gentoo.org/650986
Signed-off-by: Mike Gilbert <floppym@gentoo.org>
Diffstat (limited to 'sys-devel/distcc')
-rw-r--r-- | sys-devel/distcc/distcc-3.4-r5.ebuild | 16 | ||||
-rw-r--r-- | sys-devel/distcc/files/distcc-config-r1 | 6 |
2 files changed, 13 insertions, 9 deletions
diff --git a/sys-devel/distcc/distcc-3.4-r5.ebuild b/sys-devel/distcc/distcc-3.4-r5.ebuild index 720b8cf870d1..c9317d52aec3 100644 --- a/sys-devel/distcc/distcc-3.4-r5.ebuild +++ b/sys-devel/distcc/distcc-3.4-r5.ebuild @@ -57,8 +57,7 @@ src_prepare() { sed \ -e "s:@EPREFIX@:${EPREFIX:-/}:" \ - -e "s:@libdir@:/usr/lib:" \ - "${FILESDIR}/distcc-config" > "${T}/distcc-config" || die + "${FILESDIR}/distcc-config-r1" > "${T}/distcc-config" || die # TODO: gdb tests fail due to gdb failing to find .c file sed -i -e '/Gdb.*Case,/d' test/testdistcc.py || die @@ -152,15 +151,21 @@ src_install() { fi insinto /usr/share/shadowman/tools - newins - distcc <<<"${EPREFIX}/usr/lib/distcc/bin" - # Dummy symlinks to distccd to satisfy command whitelist, bug 650986 - newins - distccd <<<"${EPREFIX}/usr/lib/distcc" + newins - distcc <<<"${EPREFIX}/usr/lib/distcc" rm -r "${ED}/etc/default" || die rm "${ED}/etc/distcc/clients.allow" || die rm "${ED}/etc/distcc/commands.allow.sh" || die } +pkg_preinst() { + # Compatibility symlink for Portage + dosym . /usr/lib/distcc/bin + if [[ -e ${EROOT}/usr/lib/distcc/bin && ! -L ${EROOT}/usr/lib/distcc/bin ]]; then + rm -rf "${EROOT}"/usr/lib/distcc/bin || die + fi +} + pkg_postinst() { # remove the old paths when switching from libXX to lib if [[ $(get_libdir) != lib && ${SYMLINK_LIB} != yes && \ @@ -170,7 +175,6 @@ pkg_postinst() { if [[ -z ${ROOT} ]]; then eselect compiler-shadow update distcc - eselect compiler-shadow update distccd fi elog diff --git a/sys-devel/distcc/files/distcc-config-r1 b/sys-devel/distcc/files/distcc-config-r1 index 974620d107fb..e58a173f9d2e 100644 --- a/sys-devel/distcc/files/distcc-config-r1 +++ b/sys-devel/distcc/files/distcc-config-r1 @@ -1,5 +1,5 @@ #!/usr/bin/env python -# Copyright 1999-2018 Gentoo Authors +# Copyright 2003-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 import os, re, signal, subprocess, sys @@ -24,7 +24,7 @@ cmdline=[] eprefix = '@EPREFIX@' bindir = os.path.join(eprefix, 'usr', 'bin') sbindir = os.path.join(eprefix, 'usr', 'sbin') -libdir = os.path.join(eprefix, '@libdir@') +libdir = os.path.join(eprefix, 'usr', 'lib') sysconfdir = os.path.join(eprefix, 'etc') gcc_config = os.path.join(bindir, 'gcc-config') @@ -33,7 +33,7 @@ envfile = os.path.join(sysconfdir, 'env.d', '02distcc') default_distcc_dir = os.path.join(sysconfdir, 'distcc') hostfile = os.path.join(default_distcc_dir, 'hosts') distcc_path = os.path.join(bindir, 'distcc') -dccc_dir = os.path.join(libdir, 'distcc', 'bin') +dccc_dir = os.path.join(libdir, 'distcc') def exithandler(foo,bar): os.kill(0,signal.SIGKILL) |