sys-devel/distcc: install distccd whitelist by shadowman.

- remove redundant "|| die".
  - fix the libdir names.

Closes: https://bugs.gentoo.org/650986
Package-Manager: Portage-2.3.24, Repoman-2.3.6
This commit is contained in:
Benda Xu
2018-03-20 23:46:47 +09:00
parent 0fa97fd6f7
commit d1377aaa81
+13 -11
View File
@@ -74,7 +74,7 @@ src_prepare() {
-e "s:@libdir@:/usr/$(get_libdir):" \
"${FILESDIR}/3.2/distcc-config" > "${T}/distcc-config" || die
hprefixify update-distcc-symlinks.py src/{serve,daemon}.c
hprefixify -e "s,/lib/,/$(get_libdir)/," update-distcc-symlinks.py src/{serve,daemon}.c
}
src_configure() {
@@ -109,7 +109,7 @@ src_install() {
sed -i '/ExecStart/ s|$| --zeroconf|' "${D}$(systemd_get_systemunitdir)"/distccd.service || die
fi
doconfd "${T}/distccd" || die
doconfd "${T}/distccd"
cat > "${T}/02distcc" <<-EOF || die
# This file is managed by distcc-config; use it to change these settings.
@@ -123,26 +123,27 @@ src_install() {
DISTCC_ENABLE_DISCREPANCY_EMAIL="${DISTCC_ENABLE_DISCREPANCY_EMAIL}"
DCC_EMAILLOG_WHOM_TO_BLAME="${DCC_EMAILLOG_WHOM_TO_BLAME}"
EOF
doenvd "${T}/02distcc" || die
doenvd "${T}/02distcc"
keepdir "${DCCC_PATH}" || die
keepdir "${DCCC_PATH%bin}"
dobin "${T}/distcc-config" || die
dobin "${T}/distcc-config"
if use gnome || use gtk; then
einfo "Renaming /usr/bin/distccmon-gnome to /usr/bin/distccmon-gui"
einfo "This is to have a little sensability in naming schemes between distccmon programs"
mv "${ED}/usr/bin/distccmon-gnome" "${ED}/usr/bin/distccmon-gui" || die
dosym distccmon-gui /usr/bin/distccmon-gnome || die
dosym distccmon-gui /usr/bin/distccmon-gnome
fi
if use xinetd; then
insinto /etc/xinetd.d || die
newins "doc/example/xinetd" distcc || die
insinto /etc/xinetd.d
newins "doc/example/xinetd" distcc
fi
insinto /usr/share/shadowman/tools
newins - distcc <<<"${EPREFIX}${DCCC_PATH}"
newins - distccd <<<"${EPREFIX}${DCCC_PATH%bin}"
rm -r "${ED}/etc/default" || die
rm "${ED}/etc/distcc/clients.allow" || die
@@ -152,6 +153,7 @@ src_install() {
pkg_postinst() {
if [[ ${ROOT} == / ]]; then
eselect compiler-shadow update distcc
eselect compiler-shadow update distccd
fi
use gnome && xdg_desktop_database_update
@@ -176,9 +178,9 @@ pkg_postinst() {
elog
elog "***SECURITY NOTICE***"
elog "Since distcc-3.3, whitelist is used for what distccd could execute. The whilelist"
elog "has to be generated manually by invoking \`update-distcc-symlinks\`. To revert"
elog "to the old behavior, you need to pass --make-me-a-botnet to distccd in"
elog "/etc/conf.d/distccd. Cf. https://github.com/distcc/distcc/pull/243."
elog "has been generated by compiler-shadow distccd. To revert to the old behavior, "
elog "you need to pass --make-me-a-botnet to distccd in elog /etc/conf.d/distccd."
elog "Cf. https://github.com/distcc/distcc/pull/243."
}
pkg_prerm() {