diff options
author | V3n3RiX <venerix@koprulu.sector> | 2024-10-13 04:04:07 +0100 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2024-10-13 04:04:07 +0100 |
commit | 7b5306e0d287565138e8b051e32f57e6af6ae0ed (patch) | |
tree | 7e232eacc1f02fc6abb1c416458b5a564d0e295f /sys-devel/distcc | |
parent | 3980ecf15e6202ac2f2015045b549600e709b721 (diff) |
gentoo auto-resync : 13:10:2024 - 04:04:06
Diffstat (limited to 'sys-devel/distcc')
-rw-r--r-- | sys-devel/distcc/Manifest | 5 | ||||
-rw-r--r-- | sys-devel/distcc/distcc-3.4-r1.ebuild | 181 | ||||
-rw-r--r-- | sys-devel/distcc/distcc-3.4-r2.ebuild | 182 | ||||
-rw-r--r-- | sys-devel/distcc/distcc-3.4-r5.ebuild (renamed from sys-devel/distcc/distcc-3.4-r3.ebuild) | 75 | ||||
-rw-r--r-- | sys-devel/distcc/files/distcc-config-r1 | 180 |
5 files changed, 226 insertions, 397 deletions
diff --git a/sys-devel/distcc/Manifest b/sys-devel/distcc/Manifest index c4d81bfe70c5..3511a53d058e 100644 --- a/sys-devel/distcc/Manifest +++ b/sys-devel/distcc/Manifest @@ -4,14 +4,13 @@ AUX distcc-3.4-fix-dcc_gcc_rewrite_fqn-corruption.patch 2846 BLAKE2B 228501a60a2 AUX distcc-3.4-pump-tests.patch 5922 BLAKE2B 17e755c3a6c04465a6c0be1e2657eb92d3a25e871eb62750d4a379290c01c6939ad55feb76a76b35b66d366aedaa64e4b7d63143be412a93a22448d33c819271 SHA512 8d2a6e5a5ac219fad327919344d68274243337fabd6361ee6355be658e2503d6d3657d8adb285dc40105b0916096bb9b21e93f544fb7342dcf9ac03c70c6a4fc AUX distcc-3.4-rewrite-chost.patch 2934 BLAKE2B 88289d943bfb4824a2b42654c2cd0ce9e3a797551b5589396d15e5094294210729c941d1309078981c8cc4679c347f4f5b6037af47d0b97ed2c60d6dd0da7023 SHA512 9573211d5bb2ae606af2d1ba19a78f7d7498e7755f6a922d7c544f5c9daae3e0463438739958e59f7b25fcc13615723d83fe4d3a1e2f6fc4997c6680f9ac9f81 AUX distcc-config 5218 BLAKE2B 41d483481e483217ed6313b4f82ed66c4f006070c269bc5ee1283db9c000d12ab29a90d1813df2a590f87c02520e312c35901a7d3f1364480b68bb02d668d51d SHA512 fe3dee7a89ec16e103b52d3555d483b42e4cbe716e3e77f792c543fb2c82eca5f6b8e0d2809f16c805d55263471108ff2dea1f4a5d55826f67f8b94239aca946 +AUX distcc-config-r1 5213 BLAKE2B 352534097ecd8ecfe3306df169afcf4896a4f8550e021d1acdb73b2ab3efe4c028b361664022e35c23f509bbba60cea8a38299a51d40012bf57a367c04bae3ee SHA512 f829e2962884585b7fdf6751728e1cc895c51687d05a3028334b1804dda0968e3c5e9d30ebe12b0c95be44d8739fce93605033fcdc3ed34a90755165ce18288b AUX distcc-hardened.patch 1084 BLAKE2B 4b78fce2ab19b3832006a8b0092d3d38df07ce8225eb367c90256a158a41121e09269cd4bf59a1fc450db58eafe09e757f6e3ca4ae074a4567676701228c8289 SHA512 d1150dc83bf89c332f8c0bd01e15f52f95d71868733bd2e5430a5377f1a4aaa2b5b6e0cd488d33d9b94ce18b0eeeadf4af719db536b001b50e4d482b35c7e057 AUX distccd.confd 1328 BLAKE2B d6a4756afbe7813733227091028e1db570371750bd22dedbfb66e4d86e995138cdc3a63c853b5674c8678bf0475d7276c45f74b40ac916d060760f06ac3fdf73 SHA512 e6ff0547892b9e7a255afeb56eb07516e4b328d86d5d987872f1bf24a973132544e9f17195e5f8827305218429adb1c5290cde3ef1c094efd035592cbdde7eec AUX distccd.initd 374 BLAKE2B 48011f19225536311701250470011bc1c1be16f2400831964dd5e28920d4a0c955565a15b5014118e6fa65f4ac12c99d2f2dc6a63c1aa5863b0ef9633953ff82 SHA512 f707bdb15066e4eab4481c6be7e482e81f58586456123b42ddc3e92b0d7973b81975e3670166e20d0814b0c0d7441bec7788e9bd16af5fa9746380895b23bf65 AUX distccd.service-1 234 BLAKE2B 0ab7f90e6f7274fd9fe72df6a58e5323b2d65e91ca8805c549f9f92fa41a3099ea3f0a422270ca0ffe37d682d435da513552e6b7c33617c767909577cc83f85a SHA512 c2aa1b5e0d34c6b8c20d3fb83b8328e6859cefc9f3f98130701f7448fe896f5c80e29091fc4bbab01d1f600c0258b790571d86e7057dc4cfe799b53aef92a1bc AUX distccd.service.conf 186 BLAKE2B b3776e30ded7777be2610f07acec0f70a3cfb7718be149ad5bebd58538add7efead69368020c30610ec33a87ab4d3b3f0123d347f6d0d4abd74f3c714b039955 SHA512 19bf25757ba724ba4e728797b8c6fccabb8b95d2945f0e3c216303a04a4e7470507dcf8535657954f265ed5f067f32dcb3fb6558e9958a86de76b1e66e2b31b6 DIST distcc-3.4.tar.gz 1239519 BLAKE2B 8dc9baa6b1f65f2bb3621e4e643d7d15d55e2338de4d6a7f20a572d9ec280925b4421a294f40c9fcfba8d4193a6bd1871eb8caf13dd2c2a8a81834671f6bc8bc SHA512 de09329fdfa25e08a9b9529190ddaa9ceccb34c8655692edb86f367a8db4a71b750c6e928cb8e5a670f51fbbc02fd1c8524f72e01b3ebaacc1106dc676d18eef -EBUILD distcc-3.4-r1.ebuild 5219 BLAKE2B 481fd8691b028e5806034b6f508a3dbe3bf31bd8beae3471f671a7f4fcec24adeaa3809a3b40d346b53b6100bc7472456a9fe15024d6b3bc5c34e23a5c98596e SHA512 9d17c1312c3e712347ad10b1a8f317b443d6e648fdb0e12c5f96c8de774b5e9074b01daf26b38f5d449a38127df909babba0acadf59a1ca4f71747daa5df0ea4 -EBUILD distcc-3.4-r2.ebuild 5287 BLAKE2B 14e0587528e5016cc714c4ef893dceb618b6197f6710cb1dbf8a7e78a3d483a37d2ee8cb1383983951e2f93d3521117fb408be23617e08635b261e1f1b52bf92 SHA512 0def4102d804befb2dcb7038e22384dbe84cba68f3e8b9648d83c05c372274ce5d5182a3f63bba01231d1b70d0608417a7a24230825f75f770d52ee6f1c466af -EBUILD distcc-3.4-r3.ebuild 5315 BLAKE2B 1db8a326d78a0d0c5bcbc8853bd94e5a44a3cbab86a55e178a3b0d5b4b3142277eab51e7c2d69e455002b796b35d7269a33b7d80578f83bb5ac220f066d4ac61 SHA512 dd3184a77aa3d2eb9f04b2ab83b07300ef6dcabfb93969d06a3afb1c090bb58fc6e8e361c11909b4fe812747613d6129ae9360a2bbe98ec103ad88836b29836e EBUILD distcc-3.4-r4.ebuild 5456 BLAKE2B d5485af92cb2daca6b4f1de788a99cbef300cf55aff415523c33e98ebe8f634107c20ce4999520163f89d9665e8fa1735a7150259bd8e186be5c5940207e6adc SHA512 ed2187969141801f7aa82676601ad76cab13bacae396d0903f4af3dc59da2cb49d7eece0ad9650e57142714017d4bd12e6633504971a97c9080a4f3bf4834ab1 +EBUILD distcc-3.4-r5.ebuild 5490 BLAKE2B 2f1138c02c095dc48d0ee905632b9334b5be886bb9a6c7e9d8f164d7ff0f6540618907fde8715a4462f8bb8f102ce4af9a8de6b9a5452c054a8067f7414d45fc SHA512 696f8f881b50b8bdbcdf4e1533687378a43d290e0a1577caf842af92dadf2f518d7203b9ab7e4a5a2f3a58a1e16c2a886b9d6c61b5cae903f0023da7a61d5497 MISC metadata.xml 430 BLAKE2B 6e7c7b3cbb7009bd40528f114ec88491dab2a7d7c50469684298cb9ab816903f2befd5b6c5d6c6c829f768faa896cb4786242a099310a18837011d0433adccad SHA512 7baf41e27b6e8179050dac0c4aefd481ca3d45df1fe848ee6cdfca435739646e5cd647ed0aa8157544c81c27012e68c64e86bda47c9d7464d22828b4d660ce2e diff --git a/sys-devel/distcc/distcc-3.4-r1.ebuild b/sys-devel/distcc/distcc-3.4-r1.ebuild deleted file mode 100644 index f5a660195bc6..000000000000 --- a/sys-devel/distcc/distcc-3.4-r1.ebuild +++ /dev/null @@ -1,181 +0,0 @@ -# Copyright 1999-2024 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -PYTHON_COMPAT=( python3_{10..11} ) - -inherit autotools flag-o-matic prefix python-single-r1 systemd - -DESCRIPTION="Distribute compilation of C code across several machines on a network" -HOMEPAGE="https://github.com/distcc/distcc" -SRC_URI="https://github.com/distcc/distcc/releases/download/v${PV}/${P}.tar.gz" - -LICENSE="GPL-2+" -SLOT="0" -KEYWORDS="~alpha amd64 arm arm64 ~hppa ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86" -IUSE="gssapi gtk hardened ipv6 selinux xinetd zeroconf" -REQUIRED_USE="${PYTHON_REQUIRED_USE}" - -RDEPEND="${PYTHON_DEPS} - dev-libs/popt - gssapi? ( net-libs/libgssglue ) - gtk? ( x11-libs/gtk+:3 ) - zeroconf? ( >=net-dns/avahi-0.6[dbus] ) -" -DEPEND="${RDEPEND} - sys-libs/binutils-libs" -BDEPEND=" - dev-build/autoconf-archive - virtual/pkgconfig" -RDEPEND+=" - acct-user/distcc - dev-util/shadowman - >=sys-devel/gcc-config-1.4.1 - selinux? ( sec-policy/selinux-distcc ) - xinetd? ( sys-apps/xinetd )" - -src_prepare() { - eapply "${FILESDIR}/${PN}-3.0-xinetd.patch" - # SOCKSv5 support needed for Portage, bug #537616 - eapply "${FILESDIR}/${PN}-3.2_rc1-socks5.patch" - eapply "${FILESDIR}/${PN}-3.4-pump-tests.patch" - eapply_user - - # Bugs #120001, #167844 and probably more. See patch for description. - use hardened && eapply "${FILESDIR}/distcc-hardened.patch" - - sed -i \ - -e "/PATH/s:\$distcc_location:${EPREFIX}/usr/lib/distcc/bin:" \ - -e "s:@PYTHON@:${EPYTHON}:" \ - pump.in || die "sed failed" - - sed \ - -e "s:@EPREFIX@:${EPREFIX:-/}:" \ - -e "s:@libdir@:/usr/lib:" \ - "${FILESDIR}/distcc-config" > "${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 - - hprefixify update-distcc-symlinks.py src/{serve,daemon}.c - python_fix_shebang update-distcc-symlinks.py "${T}/distcc-config" - eautoreconf -} - -src_configure() { - # https://github.com/distcc/distcc/issues/454 - append-cppflags -DPY_SSIZE_T_CLEAN - - local myconf=( - --disable-Werror - --libdir="${EPREFIX}"/usr/lib - $(use_enable ipv6 rfc2553) - $(use_with gtk) - --without-gnome - $(use_with gssapi auth) - $(use_with zeroconf avahi) - ) - - econf "${myconf[@]}" -} - -src_test() { - # sandbox breaks some tests, and hangs some too - # retest once #590084 is fixed - local -x SANDBOX_ON=0 - emake -j1 check -} - -src_install() { - # override GZIP_BIN to stop it from compressing manpages - emake -j1 DESTDIR="${D}" GZIP_BIN=false install - python_optimize - - newinitd "${FILESDIR}/distccd.initd" distccd - systemd_newunit "${FILESDIR}/distccd.service-1" distccd.service - systemd_install_serviced "${FILESDIR}/distccd.service.conf" - - cp "${FILESDIR}/distccd.confd" "${T}/distccd" || die - if use zeroconf; then - cat >> "${T}/distccd" <<-EOF || die - - # Enable zeroconf support in distccd - DISTCCD_OPTS="\${DISTCCD_OPTS} --zeroconf" - EOF - - sed -i '/ExecStart/ s|$| --zeroconf|' "${D}$(systemd_get_systemunitdir)"/distccd.service || die - fi - doconfd "${T}/distccd" - - newenvd - 02distcc <<-EOF || die - # This file is managed by distcc-config; use it to change these settings. - # DISTCC_LOG and DISTCC_DIR should not be set. - DISTCC_VERBOSE="${DISTCC_VERBOSE:-0}" - DISTCC_FALLBACK="${DISTCC_FALLBACK:-1}" - DISTCC_SAVE_TEMPS="${DISTCC_SAVE_TEMPS:-0}" - DISTCC_TCP_CORK="${DISTCC_TCP_CORK}" - DISTCC_SSH="${DISTCC_SSH}" - UNCACHED_ERR_FD="${UNCACHED_ERR_FD}" - DISTCC_ENABLE_DISCREPANCY_EMAIL="${DISTCC_ENABLE_DISCREPANCY_EMAIL}" - DCC_EMAILLOG_WHOM_TO_BLAME="${DCC_EMAILLOG_WHOM_TO_BLAME}" - EOF - - keepdir /usr/lib/distcc - - dobin "${T}/distcc-config" - - if 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 - fi - - if use xinetd; then - insinto /etc/xinetd.d - newins "doc/example/xinetd" distcc - fi - - insinto /usr/share/shadowman/tools - newins - distcc <<<"${EPREFIX}/usr/lib/distcc/bin" - newins - distccd <<<"${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_postinst() { - # remove the old paths when switching from libXX to lib - if [[ $(get_libdir) != lib && ${SYMLINK_LIB} != yes && \ - -d ${EROOT}/usr/$(get_libdir)/distcc ]]; then - rm -r -f "${EROOT}/usr/$(get_libdir)/distcc" || die - fi - - if [[ -z ${ROOT} ]]; then - eselect compiler-shadow update distcc - eselect compiler-shadow update distccd - fi - - elog - elog "Tips on using distcc with Gentoo can be found at" - elog "https://wiki.gentoo.org/wiki/Distcc" - elog - elog "distcc-pump is known to cause breakage with multiple packages." - elog "Do NOT enable it globally." - elog - elog "To use the distccmon programs with Gentoo you should use this command:" - elog "# DISTCC_DIR=\"${DISTCC_DIR:-${BUILD_PREFIX}/.distcc}\" distccmon-text 5" - - if use gtk; then - elog "Or:" - elog "# DISTCC_DIR=\"${DISTCC_DIR:-${BUILD_PREFIX}/.distcc}\" distccmon-gnome" - fi -} - -pkg_prerm() { - if [[ -z ${REPLACED_BY_VERSION} && -z ${ROOT} ]]; then - eselect compiler-shadow remove distcc - fi -} diff --git a/sys-devel/distcc/distcc-3.4-r2.ebuild b/sys-devel/distcc/distcc-3.4-r2.ebuild deleted file mode 100644 index a0a3b7ca7ef5..000000000000 --- a/sys-devel/distcc/distcc-3.4-r2.ebuild +++ /dev/null @@ -1,182 +0,0 @@ -# Copyright 1999-2024 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -PYTHON_COMPAT=( python3_{10..11} ) - -inherit autotools flag-o-matic prefix python-single-r1 systemd - -DESCRIPTION="Distribute compilation of C code across several machines on a network" -HOMEPAGE="https://github.com/distcc/distcc" -SRC_URI="https://github.com/distcc/distcc/releases/download/v${PV}/${P}.tar.gz" - -LICENSE="GPL-2+" -SLOT="0" -KEYWORDS="~alpha amd64 arm arm64 ~hppa ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86" -IUSE="gssapi gtk hardened ipv6 selinux xinetd zeroconf" -REQUIRED_USE="${PYTHON_REQUIRED_USE}" - -RDEPEND="${PYTHON_DEPS} - dev-libs/popt - gssapi? ( net-libs/libgssglue ) - gtk? ( x11-libs/gtk+:3 ) - zeroconf? ( >=net-dns/avahi-0.6[dbus] ) -" -DEPEND="${RDEPEND} - sys-libs/binutils-libs" -BDEPEND=" - dev-build/autoconf-archive - virtual/pkgconfig" -RDEPEND+=" - acct-user/distcc - dev-util/shadowman - >=sys-devel/gcc-config-1.4.1 - selinux? ( sec-policy/selinux-distcc ) - xinetd? ( sys-apps/xinetd )" - -src_prepare() { - eapply "${FILESDIR}/${PN}-3.0-xinetd.patch" - # SOCKSv5 support needed for Portage, bug #537616 - eapply "${FILESDIR}/${PN}-3.2_rc1-socks5.patch" - eapply "${FILESDIR}/${PN}-3.4-pump-tests.patch" - eapply "${FILESDIR}/${P}-fix-dcc_gcc_rewrite_fqn-corruption.patch" - eapply_user - - # Bugs #120001, #167844 and probably more. See patch for description. - use hardened && eapply "${FILESDIR}/distcc-hardened.patch" - - sed -i \ - -e "/PATH/s:\$distcc_location:${EPREFIX}/usr/lib/distcc/bin:" \ - -e "s:@PYTHON@:${EPYTHON}:" \ - pump.in || die "sed failed" - - sed \ - -e "s:@EPREFIX@:${EPREFIX:-/}:" \ - -e "s:@libdir@:/usr/lib:" \ - "${FILESDIR}/distcc-config" > "${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 - - hprefixify update-distcc-symlinks.py src/{serve,daemon}.c - python_fix_shebang update-distcc-symlinks.py "${T}/distcc-config" - eautoreconf -} - -src_configure() { - # https://github.com/distcc/distcc/issues/454 - append-cppflags -DPY_SSIZE_T_CLEAN - - local myconf=( - --disable-Werror - --libdir="${EPREFIX}"/usr/lib - $(use_enable ipv6 rfc2553) - $(use_with gtk) - --without-gnome - $(use_with gssapi auth) - $(use_with zeroconf avahi) - ) - - econf "${myconf[@]}" -} - -src_test() { - # sandbox breaks some tests, and hangs some too - # retest once #590084 is fixed - local -x SANDBOX_ON=0 - emake -j1 check -} - -src_install() { - # override GZIP_BIN to stop it from compressing manpages - emake -j1 DESTDIR="${D}" GZIP_BIN=false install - python_optimize - - newinitd "${FILESDIR}/distccd.initd" distccd - systemd_newunit "${FILESDIR}/distccd.service-1" distccd.service - systemd_install_serviced "${FILESDIR}/distccd.service.conf" - - cp "${FILESDIR}/distccd.confd" "${T}/distccd" || die - if use zeroconf; then - cat >> "${T}/distccd" <<-EOF || die - - # Enable zeroconf support in distccd - DISTCCD_OPTS="\${DISTCCD_OPTS} --zeroconf" - EOF - - sed -i '/ExecStart/ s|$| --zeroconf|' "${D}$(systemd_get_systemunitdir)"/distccd.service || die - fi - doconfd "${T}/distccd" - - newenvd - 02distcc <<-EOF || die - # This file is managed by distcc-config; use it to change these settings. - # DISTCC_LOG and DISTCC_DIR should not be set. - DISTCC_VERBOSE="${DISTCC_VERBOSE:-0}" - DISTCC_FALLBACK="${DISTCC_FALLBACK:-1}" - DISTCC_SAVE_TEMPS="${DISTCC_SAVE_TEMPS:-0}" - DISTCC_TCP_CORK="${DISTCC_TCP_CORK}" - DISTCC_SSH="${DISTCC_SSH}" - UNCACHED_ERR_FD="${UNCACHED_ERR_FD}" - DISTCC_ENABLE_DISCREPANCY_EMAIL="${DISTCC_ENABLE_DISCREPANCY_EMAIL}" - DCC_EMAILLOG_WHOM_TO_BLAME="${DCC_EMAILLOG_WHOM_TO_BLAME}" - EOF - - keepdir /usr/lib/distcc - - dobin "${T}/distcc-config" - - if 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 - fi - - if use xinetd; then - insinto /etc/xinetd.d - newins "doc/example/xinetd" distcc - fi - - insinto /usr/share/shadowman/tools - newins - distcc <<<"${EPREFIX}/usr/lib/distcc/bin" - newins - distccd <<<"${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_postinst() { - # remove the old paths when switching from libXX to lib - if [[ $(get_libdir) != lib && ${SYMLINK_LIB} != yes && \ - -d ${EROOT}/usr/$(get_libdir)/distcc ]]; then - rm -r -f "${EROOT}/usr/$(get_libdir)/distcc" || die - fi - - if [[ -z ${ROOT} ]]; then - eselect compiler-shadow update distcc - eselect compiler-shadow update distccd - fi - - elog - elog "Tips on using distcc with Gentoo can be found at" - elog "https://wiki.gentoo.org/wiki/Distcc" - elog - elog "distcc-pump is known to cause breakage with multiple packages." - elog "Do NOT enable it globally." - elog - elog "To use the distccmon programs with Gentoo you should use this command:" - elog "# DISTCC_DIR=\"${DISTCC_DIR:-${BUILD_PREFIX}/.distcc}\" distccmon-text 5" - - if use gtk; then - elog "Or:" - elog "# DISTCC_DIR=\"${DISTCC_DIR:-${BUILD_PREFIX}/.distcc}\" distccmon-gnome" - fi -} - -pkg_prerm() { - if [[ -z ${REPLACED_BY_VERSION} && -z ${ROOT} ]]; then - eselect compiler-shadow remove distcc - fi -} diff --git a/sys-devel/distcc/distcc-3.4-r3.ebuild b/sys-devel/distcc/distcc-3.4-r5.ebuild index d00fc2bed616..c9317d52aec3 100644 --- a/sys-devel/distcc/distcc-3.4-r3.ebuild +++ b/sys-devel/distcc/distcc-3.4-r5.ebuild @@ -3,7 +3,7 @@ EAPI=8 -PYTHON_COMPAT=( python3_{10..11} ) +PYTHON_COMPAT=( python3_{10..13} ) inherit autotools flag-o-matic prefix python-single-r1 systemd @@ -17,29 +17,34 @@ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~ IUSE="gssapi gtk hardened ipv6 selinux xinetd zeroconf" REQUIRED_USE="${PYTHON_REQUIRED_USE}" -RDEPEND="${PYTHON_DEPS} +RDEPEND=" + ${PYTHON_DEPS} dev-libs/popt gssapi? ( net-libs/libgssglue ) gtk? ( x11-libs/gtk+:3 ) zeroconf? ( >=net-dns/avahi-0.6[dbus] ) " -DEPEND="${RDEPEND} - sys-libs/binutils-libs" +DEPEND=" + ${RDEPEND} + sys-libs/binutils-libs +" BDEPEND=" + ${PYTHON_DEPS} dev-build/autoconf-archive - virtual/pkgconfig" + virtual/pkgconfig +" RDEPEND+=" acct-user/distcc dev-util/shadowman >=sys-devel/gcc-config-1.4.1 selinux? ( sec-policy/selinux-distcc ) - xinetd? ( sys-apps/xinetd )" + xinetd? ( sys-apps/xinetd ) +" PATCHES=( "${FILESDIR}/${PN}-3.0-xinetd.patch" # SOCKSv5 support needed for Portage, bug #537616 "${FILESDIR}/${PN}-3.2_rc1-socks5.patch" - "${FILESDIR}/${PN}-3.4-pump-tests.patch" "${FILESDIR}/${P}-fix-dcc_gcc_rewrite_fqn-corruption.patch" "${FILESDIR}/${P}-rewrite-chost.patch" ) @@ -50,15 +55,9 @@ src_prepare() { # Bugs #120001, #167844 and probably more. See patch for description. use hardened && eapply "${FILESDIR}/distcc-hardened.patch" - sed -i \ - -e "/PATH/s:\$distcc_location:${EPREFIX}/usr/lib/distcc/bin:" \ - -e "s:@PYTHON@:${EPYTHON}:" \ - pump.in || die "sed failed" - 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 @@ -80,21 +79,30 @@ src_configure() { --without-gnome $(use_with gssapi auth) $(use_with zeroconf avahi) + + # NB: we can't pass --disable-pump-mode as it disables Python + # detection; we instead hack it out below ) econf "${myconf[@]}" } +src_compile() { + # override PYTHON= to prevent setup.py from running + emake PYTHON= +} + src_test() { # sandbox breaks some tests, and hangs some too # retest once #590084 is fixed local -x SANDBOX_ON=0 - emake -j1 check + # run the main test suite directly to skip pump tests + emake -j1 distcc-maintainer-check } src_install() { # override GZIP_BIN to stop it from compressing manpages - emake -j1 DESTDIR="${D}" GZIP_BIN=false install + emake -j1 DESTDIR="${D}" GZIP_BIN=false PYTHON= install python_optimize newinitd "${FILESDIR}/distccd.initd" distccd @@ -114,16 +122,16 @@ src_install() { doconfd "${T}/distccd" newenvd - 02distcc <<-EOF || die - # This file is managed by distcc-config; use it to change these settings. - # DISTCC_LOG and DISTCC_DIR should not be set. - DISTCC_VERBOSE="${DISTCC_VERBOSE:-0}" - DISTCC_FALLBACK="${DISTCC_FALLBACK:-1}" - DISTCC_SAVE_TEMPS="${DISTCC_SAVE_TEMPS:-0}" - DISTCC_TCP_CORK="${DISTCC_TCP_CORK}" - DISTCC_SSH="${DISTCC_SSH}" - UNCACHED_ERR_FD="${UNCACHED_ERR_FD}" - DISTCC_ENABLE_DISCREPANCY_EMAIL="${DISTCC_ENABLE_DISCREPANCY_EMAIL}" - DCC_EMAILLOG_WHOM_TO_BLAME="${DCC_EMAILLOG_WHOM_TO_BLAME}" + # This file is managed by distcc-config; use it to change these settings. + # DISTCC_LOG and DISTCC_DIR should not be set. + DISTCC_VERBOSE="${DISTCC_VERBOSE:-0}" + DISTCC_FALLBACK="${DISTCC_FALLBACK:-1}" + DISTCC_SAVE_TEMPS="${DISTCC_SAVE_TEMPS:-0}" + DISTCC_TCP_CORK="${DISTCC_TCP_CORK}" + DISTCC_SSH="${DISTCC_SSH}" + UNCACHED_ERR_FD="${UNCACHED_ERR_FD}" + DISTCC_ENABLE_DISCREPANCY_EMAIL="${DISTCC_ENABLE_DISCREPANCY_EMAIL}" + DCC_EMAILLOG_WHOM_TO_BLAME="${DCC_EMAILLOG_WHOM_TO_BLAME}" EOF keepdir /usr/lib/distcc @@ -143,14 +151,21 @@ src_install() { fi insinto /usr/share/shadowman/tools - newins - distcc <<<"${EPREFIX}/usr/lib/distcc/bin" - 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 && \ @@ -160,15 +175,13 @@ pkg_postinst() { if [[ -z ${ROOT} ]]; then eselect compiler-shadow update distcc - eselect compiler-shadow update distccd fi elog elog "Tips on using distcc with Gentoo can be found at" elog "https://wiki.gentoo.org/wiki/Distcc" elog - elog "distcc-pump is known to cause breakage with multiple packages." - elog "Do NOT enable it globally." + elog "distcc-pump is broken and no longer installed." elog elog "To use the distccmon programs with Gentoo you should use this command:" elog "# DISTCC_DIR=\"${DISTCC_DIR:-${BUILD_PREFIX}/.distcc}\" distccmon-text 5" diff --git a/sys-devel/distcc/files/distcc-config-r1 b/sys-devel/distcc/files/distcc-config-r1 new file mode 100644 index 000000000000..e58a173f9d2e --- /dev/null +++ b/sys-devel/distcc/files/distcc-config-r1 @@ -0,0 +1,180 @@ +#!/usr/bin/env python +# Copyright 2003-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +import os, re, signal, subprocess, sys + +options=[ + '--get-hosts', + '--set-hosts', + '--get-verbose', + '--set-verbose', + '--get-log', + '--set-log', + '--update-masquerade', + '--update-masquerade-with-crossdev', + '--help', + '--get-env', + '--set-env' +] + +tmpcmdline=sys.argv[1:] +cmdline=[] + +eprefix = '@EPREFIX@' +bindir = os.path.join(eprefix, 'usr', 'bin') +sbindir = os.path.join(eprefix, 'usr', 'sbin') +libdir = os.path.join(eprefix, 'usr', 'lib') +sysconfdir = os.path.join(eprefix, 'etc') + +gcc_config = os.path.join(bindir, 'gcc-config') +env_update = os.path.join(sbindir, 'env-update') +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') + +def exithandler(foo,bar): + os.kill(0,signal.SIGKILL) + sys.exit(1) + +signal.signal(signal.SIGINT,exithandler) + +def isroot(ret=0): + if os.getuid() != 0: + if ret == 0: + print('!!! %s %s must be run as root' % (sys.argv[:1][0],tmpcmdline[0])) + sys.exit(1) + else: + retval = 0 + else: + retval = 1 + return retval + +def writeenv(var,value): + isroot() + distcc_env = [] + distcc_env = open(envfile, 'r').readlines() + distcc_env_new = open(envfile, 'w') + for i in range(len(distcc_env)): + if re.compile(var+'="(.*)"').match(distcc_env[i]): + distcc_env[i] = var+'="'+value+'"\n' + distcc_env_new.write(distcc_env[i]) + #print('Set %s to: %s ' % (var,value)) + subprocess.Popen(env_update, shell=True) + print('If you want to use these new settings in an existing shell,') + print('you need to "source /etc/profile" to get the changes.') + +def readenv(var): + distcc_env = open(envfile, 'r').read() + match = re.compile(var+'="(.*)"').search(distcc_env) + if match: + print(var+'='+match.group(1)) + else: + print(var,'not set.') + +def installlink(chost='', version=''): + for file in ['gcc', 'cc', 'c++', 'g++']: + if not chost == '': + file = '%s-%s' % (chost,file) + if not version == '': + file = '%s-%s' % (file,version) + path = os.path.join(dccc_dir,file) + if os.path.exists(os.path.join(bindir,file)): + if not os.path.exists(path): + print('Creating %s symlink...' % (path)) + os.symlink(distcc_path,path) + #else: + # print('Already exists. Skipping...') + +def installlinks(): + p = subprocess.Popen([gcc_config+" -C -l"], shell=True, stdout=subprocess.PIPE) + lines = p.stdout.read().decode().rstrip().split('\n') + for line in lines: + columns = line.split() + if len(columns) >= 2: + matches = re.match("(.*)-(.*)", columns[1]) + chost = matches.group(1) + version = matches.group(2) + installlink(chost) + installlink(chost, version) + +def uninstalllinks(): + for root, dirs, files in os.walk(dccc_dir): + for file in files: + os.remove(os.path.join(root, file)) + +def createdistccdir(dir): + if not os.path.exists(dir): + os.mkdir(dir) + os.chmod(dir, 0o755) + +for x in tmpcmdline: + if not x: + continue + if x[0:2]=="--": + if not x in options: + print("!!! Error: %s is an invalid option." % (x)) + sys.exit(1) + else: + cmdline = x + +if '--get-hosts' in tmpcmdline: + HOSTS_ENV = os.environ.get('DISTCC_HOSTS') + HOSTS_HOME = os.path.join(os.environ.get('HOME'), '.distcc', 'hosts') + if HOSTS_ENV: + print(HOSTS_ENV) + elif os.path.isfile(HOSTS_HOME) and os.path.getsize(HOSTS_HOME) != 0: + print(HOSTS_HOME) + elif os.path.exists(hostfile): + print(open(hostfile, 'r').read().rstrip()) + else: + print('No configuration file found. Setup your hosts with --set-hosts.') +elif '--set-hosts' in tmpcmdline: + if isroot(1): + PATH = default_distcc_dir + else: + PATH = os.path.join(os.environ.get('HOME'), '.distcc') + createdistccdir(PATH) + open(os.path.join(PATH, 'hosts'), 'w').write(cmdline + '\n') +elif '--get-verbose' in tmpcmdline: + readenv('DISTCC_VERBOSE') +elif '--set-verbose' in tmpcmdline: + writeenv('DISTCC_VERBOSE',tmpcmdline[1]) +elif '--get-log' in tmpcmdline: + readenv('DISTCC_LOG') +elif '--set-log' in tmpcmdline: + writeenv('DISTCC_LOG',tmpcmdline[1]) +elif '--update-masquerade' in tmpcmdline: + isroot() + uninstalllinks() + print('Creating symlinks...') + installlink() + installlinks() +elif '--update-masquerade-with-crossdev' in tmpcmdline: + isroot() + uninstalllinks() + print('Creating symlinks...') + installlinks() +elif '--get-env' in tmpcmdline: + if len(tmpcmdline) == 1: + print(open(envfile, 'r').read().rstrip()) + elif len(tmpcmdline) == 2: + readenv(tmpcmdline[1]) + else: + print('!!! Error: Specify only one variable.') +elif '--set-env' in tmpcmdline: + if len(tmpcmdline) > 2 and len(tmpcmdline) <= 3: + isroot() + writeenv(tmpcmdline[1],tmpcmdline[2]) + else: + print('!!! Error: Awaiting two parameters.') +else: + cmd = sys.argv[:1][0] + print('Usage: %s --set-hosts DISTCC_HOSTS | --get-hosts' % (cmd)) + print(' %s --set-verbose { 0 | 1 } | --get-verbose' % (cmd)) + print(' %s --set-log FILE | --get-log' % (cmd)) + print(' %s --set-env VARIABLE VALUE | --get-env [VARIABLE]' % (cmd)) + print(' %s --update-masquerade' % (cmd)) + print(' %s --update-masquerade-with-crossdev' % (cmd)) |