* [gentoo-commits] repo/gentoo:master commit in: sys-devel/distcc/, sys-devel/distcc/files/
@ 2018-12-08 12:12 Michał Górny
0 siblings, 0 replies; 11+ messages in thread
From: Michał Górny @ 2018-12-08 12:12 UTC (permalink / raw
To: gentoo-commits
commit: b994f9815d7a32697fab2cc9c568a6255277d490
Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Sat Dec 8 11:36:01 2018 +0000
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Sat Dec 8 12:12:36 2018 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b994f981
sys-devel/distcc: Bump to 3.3.2
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
sys-devel/distcc/Manifest | 1 +
sys-devel/distcc/distcc-3.3.2.ebuild | 197 +++++++++++++++++++++
.../distcc/files/distcc-3.3.2-freedesktop.patch | 112 ++++++++++++
3 files changed, 310 insertions(+)
diff --git a/sys-devel/distcc/Manifest b/sys-devel/distcc/Manifest
index 1d4758855f8..5a734a064a0 100644
--- a/sys-devel/distcc/Manifest
+++ b/sys-devel/distcc/Manifest
@@ -1,2 +1,3 @@
DIST distcc-3.2rc1.tar.bz2 609904 BLAKE2B e6b928f3b9231524d37bdf86b39cd6a3601b6cdb1e03d913ae562286794240b4dd364d5d01da2176f9bb440809b166b4b877443459751adf8bd3ecf92ceb8476 SHA512 98b2e8423d724bbb6a615d946d170441a8e293310785f867d7a277b318c043a37b0af39ae8ed1f7a0667803de9db1d1925199bad85130cf9bd9cb347635125ee
+DIST distcc-3.3.2.tar.gz 1008938 BLAKE2B e784002dffefd395b068d237a86203563fefc81e17a08c4d2e372eaaf62c5ac799011fc8633c8bfb717f0ebc8c8cb8b999c941e0f5f87c4077d031a9e5c4b138 SHA512 fdf11ed94ba50977b45e302179c5c4ba067cc3db37579cb8ed6d5b9487f8e3c89114f65af69333c38d374cf7634d7aef8d5a2d5c7fd8e9b1f4930c0897d6da10
DIST distcc-3.3.tar.gz 1171281 BLAKE2B f637cacbfdaaca6efb56e912de55fcfa49e3fffcb8f34649e339f16376250e18a20d30281a46f207992c0b300c726427a3ad5a77bd8976d2993f8f49b9b6b970 SHA512 459c175c8ac905bc70299e77ac11b6d24782bd69c9152126249c9af8fbb4c269e6f7317b02abf50cf6cc0405dd0f887e803320e19dc528a19c4c488640c615dc
diff --git a/sys-devel/distcc/distcc-3.3.2.ebuild b/sys-devel/distcc/distcc-3.3.2.ebuild
new file mode 100644
index 00000000000..e8c90cc81a0
--- /dev/null
+++ b/sys-devel/distcc/distcc-3.3.2.ebuild
@@ -0,0 +1,197 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python3_{5,6} )
+
+inherit autotools flag-o-matic python-single-r1 systemd \
+ toolchain-funcs user xdg-utils prefix
+
+DESCRIPTION="Distribute compilation of C code across several machines on a network"
+HOMEPAGE="http://distcc.org/"
+SRC_URI="https://github.com/${PN}/${PN}/releases/download/v${PV}/${P}.tar.gz"
+
+LICENSE="GPL-2+"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86"
+IUSE="gnome gssapi gtk hardened ipv6 selinux xinetd zeroconf"
+
+RESTRICT="test"
+
+CDEPEND="${PYTHON_DEPS}
+ dev-libs/popt
+ gnome? (
+ >=gnome-base/libgnome-2
+ >=gnome-base/libgnomeui-2
+ x11-libs/gtk+:2
+ x11-libs/pango
+ )
+ gssapi? ( net-libs/libgssglue )
+ gtk? ( x11-libs/gtk+:2 )
+ zeroconf? ( >=net-dns/avahi-0.6[dbus] )
+"
+DEPEND="${CDEPEND}
+ sys-libs/binutils-libs
+ virtual/pkgconfig"
+RDEPEND="${CDEPEND}
+ !net-misc/pump
+ dev-util/shadowman
+ >=sys-devel/gcc-config-1.4.1
+ selinux? ( sec-policy/selinux-distcc )
+ xinetd? ( sys-apps/xinetd )"
+
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+S="${WORKDIR}/distcc"
+
+pkg_setup() {
+ enewuser distcc 240 -1 -1 daemon
+ python-single-r1_pkg_setup
+}
+
+src_prepare() {
+ eapply "${FILESDIR}/${PN}-3.0-xinetd.patch"
+ # bug #255188
+ eapply "${FILESDIR}/${PN}-3.3.2-freedesktop.patch"
+ # SOCKSv5 support needed for Portage, bug #537616
+ eapply "${FILESDIR}/${PN}-3.2_rc1-socks5.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}/3.2/distcc-config" > "${T}/distcc-config" || die
+
+ hprefixify update-distcc-symlinks.py src/{serve,daemon}.c
+ eautoreconf
+}
+
+src_configure() {
+ local myconf=(
+ --disable-Werror
+ $(use_enable ipv6 rfc2553)
+ $(use_with gtk)
+ $(use_with gnome)
+ $(use_with gssapi auth)
+ $(use_with zeroconf avahi)
+ )
+
+ econf "${myconf[@]}"
+}
+
+src_install() {
+ # override GZIP_BIN to stop it from compressing manpages
+ emake DESTDIR="${D}" GZIP_BIN=false install
+ python_optimize
+
+ newinitd "${FILESDIR}/3.2/init" distccd
+ systemd_dounit "${FILESDIR}/distccd.service"
+ systemd_install_serviced "${FILESDIR}/distccd.service.conf"
+
+ cp "${FILESDIR}/3.2/conf" "${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 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
+ 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 [[ ${ROOT} == / ]]; then
+ eselect compiler-shadow update distcc
+ eselect compiler-shadow update distccd
+ fi
+
+ use gnome && xdg_desktop_database_update
+
+ elog
+ elog "Tips on using distcc with Gentoo can be found at"
+ elog "https://wiki.gentoo.org/wiki/Distcc"
+ elog
+ elog "How to use pump mode with Gentoo:"
+ elog "# distcc-config --set-hosts \"foo,cpp,lzo bar,cpp,lzo baz,cpp,lzo\""
+ elog "# echo 'FEATURES=\"\${FEATURES} distcc distcc-pump\"' >> /etc/portage/make.conf"
+ elog "# emerge -u world"
+ 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 gnome || use gtk; then
+ elog "Or:"
+ elog "# DISTCC_DIR=\"${DISTCC_DIR:-${BUILD_PREFIX}/.distcc}\" distccmon-gnome"
+ fi
+
+ elog
+ elog "***SECURITY NOTICE***"
+ elog "Since distcc-3.3, whitelist is used for what distccd could execute. The whilelist"
+ 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 /etc/conf.d/distccd."
+ elog "Cf. https://github.com/distcc/distcc/pull/243."
+}
+
+pkg_prerm() {
+ if [[ -z ${REPLACED_BY_VERSION} && ${ROOT} == / ]]; then
+ eselect compiler-shadow remove distcc
+ fi
+}
+
+pkg_postrm() {
+ use gnome && xdg_desktop_database_update
+}
diff --git a/sys-devel/distcc/files/distcc-3.3.2-freedesktop.patch b/sys-devel/distcc/files/distcc-3.3.2-freedesktop.patch
new file mode 100644
index 00000000000..7b735ebec7f
--- /dev/null
+++ b/sys-devel/distcc/files/distcc-3.3.2-freedesktop.patch
@@ -0,0 +1,112 @@
+From d852c808d6f470031f40edec9ebe980afc69b9b9 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
+Date: Sat, 8 Dec 2018 12:50:07 +0100
+Subject: [PATCH] Fix desktop spec compliance of distccmon-gnome install
+
+---
+ Makefile.in | 18 ++++++++++--------
+ gnome/distccmon-gnome.desktop | 7 +++----
+ ...mon-gnome-icon.png => distccmon-gnome.png} | Bin
+ src/mon-gnome.c | 2 +-
+ 4 files changed, 14 insertions(+), 13 deletions(-)
+ rename gnome/{distccmon-gnome-icon.png => distccmon-gnome.png} (100%)
+
+diff --git a/Makefile.in b/Makefile.in
+index 6e1e467..1106559 100644
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -52,13 +52,14 @@ mandir = @mandir@
+ includedir = @includedir@
+ oldincludedir = /usr/include
+ docdir = @docdir@
+-pkgdatadir = $(datadir)/@PACKAGE_NAME@
++icondir = $(datarootdir)/pixmaps
++desktopdir = $(datarootdir)/applications
+
+ include_server_builddir = $(builddir)/_include_server
+
+ # These must be done from here, not from autoconf, because they can
+ # contain variable expansions written in Make syntax. Ew.
+-DIR_DEFS = -DLIBDIR="\"${libdir}\"" -DSYSCONFDIR="\"${sysconfdir}\"" -DPKGDATADIR="\"${pkgdatadir}\""
++DIR_DEFS = -DLIBDIR="\"${libdir}\"" -DSYSCONFDIR="\"${sysconfdir}\"" -DICONDIR="\"${icondir}\""
+
+ # arguments to pkgconfig
+ GNOME_PACKAGES = @GNOME_PACKAGES@
+@@ -387,7 +388,7 @@ man_HTML = man/distcc_1.html man/distccd_1.html man/distccmon_text_1.html \
+ man/lsdistcc_1.html man/pump_1.html man/include_server_1.html
+ MEN = $(man1_MEN)
+
+-gnome_data = gnome/distccmon-gnome-icon.png \
++gnome_data = gnome/distccmon-gnome.png \
+ gnome/distccmon-gnome.desktop
+
+ popt_OBJS=popt/findme.o popt/popt.o popt/poptconfig.o \
+@@ -1033,7 +1034,8 @@ showpaths:
+ @echo " programs $(DESTDIR)$(bindir)"
+ @echo " sbin programs $(DESTDIR)$(sbindir)"
+ @echo " system configuration $(DESTDIR)$(sysconfdir)"
+- @echo " shared data files $(DESTDIR)$(pkgdatadir)"
++ @echo " icon file $(DESTDIR)$(icondir)"
++ @echo " application file $(DESTDIR)$(desktopdir)"
+
+
+ # install-sh can't handle multiple arguments, but we don't need any
+@@ -1129,10 +1131,10 @@ install-example: $(example_DOCS)
+ done
+
+ install-gnome-data: $(gnome_data)
+- $(mkinstalldirs) "$(DESTDIR)$(pkgdatadir)"
+- for p in $(gnome_data); do \
+- $(INSTALL_DATA) "$$p" "$(DESTDIR)$(pkgdatadir)" || exit 1; \
+- done
++ $(mkinstalldirs) "$(DESTDIR)$(icondir)"
++ $(mkinstalldirs) "$(DESTDIR)$(desktopdir)"
++ $(INSTALL_DATA) gnome/distccmon-gnome.png "$(DESTDIR)$(icondir)"
++ $(INSTALL_DATA) gnome/distccmon-gnome.desktop "$(DESTDIR)$(desktopdir)"
+
+ install-conf: $(conf_files) $(default_files)
+ $(mkinstalldirs) "$(DESTDIR)$(sysconfdir)/distcc"
+diff --git a/gnome/distccmon-gnome.desktop b/gnome/distccmon-gnome.desktop
+index bd1fa26..7205f5e 100644
+--- a/gnome/distccmon-gnome.desktop
++++ b/gnome/distccmon-gnome.desktop
+@@ -1,6 +1,5 @@
+ [Desktop Entry]
+-Version=0.9.4
+-Encoding=UTF-8
++Version=1.0
+ Exec=distccmon-gnome
+ Name=distcc monitor
+ Name[sv]=distcc övervakare
+@@ -8,9 +7,9 @@ GenericName=Distributed Compile Monitor
+ GenericName[sv]=Distribuerad kompilerings-övervakare
+ Comment=Graphical view of distributed compile tasks
+ Comment[sv]=Grafisk vy av distribuerade kompileringsuppgifter
+-Icon=distccmon-gnome-icon.png
++Icon=distccmon-gnome
+ TryExec=distccmon-gnome
+ Terminal=false
+ Type=Application
+-Categories=GNOME;Application;Development;
++Categories=GNOME;GTK;Development;
+ StartupNotify=true
+diff --git a/gnome/distccmon-gnome-icon.png b/gnome/distccmon-gnome.png
+similarity index 100%
+rename from gnome/distccmon-gnome-icon.png
+rename to gnome/distccmon-gnome.png
+diff --git a/src/mon-gnome.c b/src/mon-gnome.c
+index 24681d0..bfc286d 100644
+--- a/src/mon-gnome.c
++++ b/src/mon-gnome.c
+@@ -599,7 +599,7 @@ static GtkWidget * dcc_gnome_make_mainwin (void)
+
+ #if GTK_CHECK_VERSION(2,2,0)
+ gtk_window_set_icon_from_file (GTK_WINDOW (mainwin),
+- PKGDATADIR "/distccmon-gnome-icon.png",
++ ICONDIR "/distccmon-gnome.png",
+ NULL);
+ #endif
+
+--
+2.20.0.rc2
+
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-devel/distcc/, sys-devel/distcc/files/
@ 2018-12-09 6:40 Georgy Yakovlev
0 siblings, 0 replies; 11+ messages in thread
From: Georgy Yakovlev @ 2018-12-09 6:40 UTC (permalink / raw
To: gentoo-commits
commit: ffd45776bb13d8ee7140fd5499413a7ffa873798
Author: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
AuthorDate: Sun Dec 9 06:17:53 2018 +0000
Commit: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
CommitDate: Sun Dec 9 06:35:53 2018 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ffd45776
sys-devel/distcc: improve init.d script, secure pidfile handling
removed unneeded start/stop functions
removed gcc spec/path loading, it's useless because
path whitelist is handled by compiler-shadow and we no longer
use gcc specs.
pidfile is now owned by root and created by s-s-d
pidfile path is now controlled by service name (/run/distccd.pid)
initfile no longer runs chmod on pidfile and parent directory.
Bug: https://bugs.gentoo.org/650854
Package-Manager: Portage-2.3.52, Repoman-2.3.12
Signed-off-by: Georgy Yakovlev <gyakovlev <AT> gentoo.org>
sys-devel/distcc/distcc-3.3.2-r1.ebuild | 196 ++++++++++++++++++++++++++++++++
sys-devel/distcc/files/distccd.confd | 37 ++++++
sys-devel/distcc/files/distccd.initd | 13 +++
3 files changed, 246 insertions(+)
diff --git a/sys-devel/distcc/distcc-3.3.2-r1.ebuild b/sys-devel/distcc/distcc-3.3.2-r1.ebuild
new file mode 100644
index 00000000000..100daf4ce2c
--- /dev/null
+++ b/sys-devel/distcc/distcc-3.3.2-r1.ebuild
@@ -0,0 +1,196 @@
+# Copyright 1999-2018 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python3_{5,6} )
+
+inherit autotools flag-o-matic python-single-r1 systemd \
+ toolchain-funcs user xdg-utils prefix
+
+DESCRIPTION="Distribute compilation of C code across several machines on a network"
+HOMEPAGE="http://distcc.org/"
+SRC_URI="https://github.com/${PN}/${PN}/releases/download/v${PV}/${P}.tar.gz"
+
+LICENSE="GPL-2+"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86"
+IUSE="gnome gssapi gtk hardened ipv6 selinux xinetd zeroconf"
+
+RESTRICT="test"
+
+CDEPEND="${PYTHON_DEPS}
+ dev-libs/popt
+ gnome? (
+ >=gnome-base/libgnome-2
+ >=gnome-base/libgnomeui-2
+ x11-libs/gtk+:2
+ x11-libs/pango
+ )
+ gssapi? ( net-libs/libgssglue )
+ gtk? ( x11-libs/gtk+:2 )
+ zeroconf? ( >=net-dns/avahi-0.6[dbus] )
+"
+DEPEND="${CDEPEND}
+ sys-libs/binutils-libs
+ virtual/pkgconfig"
+RDEPEND="${CDEPEND}
+ !net-misc/pump
+ dev-util/shadowman
+ >=sys-devel/gcc-config-1.4.1
+ selinux? ( sec-policy/selinux-distcc )
+ xinetd? ( sys-apps/xinetd )"
+
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+S="${WORKDIR}/distcc"
+
+pkg_setup() {
+ enewuser distcc 240 -1 -1 daemon
+ python-single-r1_pkg_setup
+}
+
+src_prepare() {
+ eapply "${FILESDIR}/${PN}-3.0-xinetd.patch"
+ # bug #255188
+ eapply "${FILESDIR}/${PN}-3.3.2-freedesktop.patch"
+ # SOCKSv5 support needed for Portage, bug #537616
+ eapply "${FILESDIR}/${PN}-3.2_rc1-socks5.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}/3.2/distcc-config" > "${T}/distcc-config" || die
+
+ hprefixify update-distcc-symlinks.py src/{serve,daemon}.c
+ python_fix_shebang update-distcc-symlinks.py "${T}/distcc-config"
+ eautoreconf
+}
+
+src_configure() {
+ local myconf=(
+ --disable-Werror
+ $(use_enable ipv6 rfc2553)
+ $(use_with gtk)
+ $(use_with gnome)
+ $(use_with gssapi auth)
+ $(use_with zeroconf avahi)
+ )
+
+ econf "${myconf[@]}"
+}
+
+src_install() {
+ # override GZIP_BIN to stop it from compressing manpages
+ emake DESTDIR="${D}" GZIP_BIN=false install
+ python_optimize
+
+ newinitd "${FILESDIR}/distccd.initd" distccd
+ systemd_dounit "${FILESDIR}/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 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
+ 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 [[ ${ROOT} == / ]]; then
+ eselect compiler-shadow update distcc
+ eselect compiler-shadow update distccd
+ fi
+
+ use gnome && xdg_desktop_database_update
+
+ 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 gnome || use gtk; then
+ elog "Or:"
+ elog "# DISTCC_DIR=\"${DISTCC_DIR:-${BUILD_PREFIX}/.distcc}\" distccmon-gnome"
+ fi
+
+ elog
+ elog "***SECURITY NOTICE***"
+ elog "Since distcc-3.3, whitelist is used for what distccd could execute. The whilelist"
+ 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 /etc/conf.d/distccd."
+ elog "Cf. https://github.com/distcc/distcc/pull/243."
+}
+
+pkg_prerm() {
+ if [[ -z ${REPLACED_BY_VERSION} && ${ROOT} == / ]]; then
+ eselect compiler-shadow remove distcc
+ fi
+}
+
+pkg_postrm() {
+ use gnome && xdg_desktop_database_update
+}
diff --git a/sys-devel/distcc/files/distccd.confd b/sys-devel/distcc/files/distccd.confd
new file mode 100644
index 00000000000..bc08d40777d
--- /dev/null
+++ b/sys-devel/distcc/files/distccd.confd
@@ -0,0 +1,37 @@
+# /etc/conf.d/distccd: config file for /etc/init.d/distccd
+
+DISTCCD_OPTS=""
+
+# this is the distccd executable
+DISTCCD_EXEC="/usr/bin/distccd"
+
+# set this option to run distccd with extra parameters
+# Default port is 3632. For most people the default is okay.
+DISTCCD_OPTS="${DISTCCD_OPTS} --port 3632"
+
+# Logging
+# You can change some logging options here:
+# --log-file FILE
+# --log-level LEVEL [critical,error,warning, notice, info, debug]
+#
+# Leaving --log-file blank will log to syslog
+# example: --log-file /dev/null --log-level warning
+# example: --log-level critical
+
+DISTCCD_OPTS="${DISTCCD_OPTS} --log-level critical"
+
+# SECURITY NOTICE:
+# It is HIGHLY recommended that you use the --listen option
+# for increased security. You can specify an IP to permit connections
+# from or a CIDR mask
+# --listen accepts only a single IP
+# --allow is now mandatory as of distcc-2.18.
+# example: --allow 192.168.0.0/24
+# example: --allow 192.168.0.5 --allow 192.168.0.150
+# example: --listen 192.168.0.2
+DISTCCD_OPTS="${DISTCCD_OPTS} --allow 192.168.0.0/24"
+#DISTCCD_OPTS="${DISTCCD_OPTS} --listen 192.168.0.2"
+
+# set this for niceness
+# Default is 15
+DISTCCD_OPTS="${DISTCCD_OPTS} -N 15"
diff --git a/sys-devel/distcc/files/distccd.initd b/sys-devel/distcc/files/distccd.initd
new file mode 100644
index 00000000000..7673ff2cf42
--- /dev/null
+++ b/sys-devel/distcc/files/distccd.initd
@@ -0,0 +1,13 @@
+#!/sbin/openrc-run
+# Copyright 1999-2018 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+depend() {
+ need net
+ use avahi-daemon ypbind
+}
+
+command="${DISTCCD_EXEC:-usr/bin/distccd}"
+command_args="--user distcc --daemon --no-detach ${DISTCCD_OPTS}"
+command_background="true"
+pidfile="/run/${RC_SVCNAME}.pid"
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-devel/distcc/, sys-devel/distcc/files/
@ 2018-12-09 8:04 Georgy Yakovlev
0 siblings, 0 replies; 11+ messages in thread
From: Georgy Yakovlev @ 2018-12-09 8:04 UTC (permalink / raw
To: gentoo-commits
commit: 20ea2072e04e1804fbe0b2c351b22167149ed272
Author: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
AuthorDate: Sun Dec 9 08:00:26 2018 +0000
Commit: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
CommitDate: Sun Dec 9 08:04:01 2018 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=20ea2072
sys-devel/distcc: revbump, fix distcc-config py2<-> py3 errors
error:
Creating symlinks...
Creating /usr/lib/distcc/bin/gcc symlink...
Creating /usr/lib/distcc/bin/cc symlink...
Creating /usr/lib/distcc/bin/c++ symlink...
Creating /usr/lib/distcc/bin/g++ symlink...
Traceback (most recent call last):
File "/usr/bin/distcc-config", line 154, in <module>
installlinks()
File "/usr/bin/distcc-config", line 93, in installlinks
lines = p.stdout.read().rstrip().split('\n')
TypeError: a bytes-like object is required, not 'str'
throw in extra .decode() to stdout.read()
Package-Manager: Portage-2.3.52, Repoman-2.3.12
Signed-off-by: Georgy Yakovlev <gyakovlev <AT> gentoo.org>
sys-devel/distcc/distcc-3.3.2-r2.ebuild | 196 ++++++++++++++++++++++++++++++++
sys-devel/distcc/files/distcc-config | 180 +++++++++++++++++++++++++++++
2 files changed, 376 insertions(+)
diff --git a/sys-devel/distcc/distcc-3.3.2-r2.ebuild b/sys-devel/distcc/distcc-3.3.2-r2.ebuild
new file mode 100644
index 00000000000..22f3c738ebd
--- /dev/null
+++ b/sys-devel/distcc/distcc-3.3.2-r2.ebuild
@@ -0,0 +1,196 @@
+# Copyright 1999-2018 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python3_{5,6} )
+
+inherit autotools flag-o-matic python-single-r1 systemd \
+ toolchain-funcs user xdg-utils prefix
+
+DESCRIPTION="Distribute compilation of C code across several machines on a network"
+HOMEPAGE="http://distcc.org/"
+SRC_URI="https://github.com/${PN}/${PN}/releases/download/v${PV}/${P}.tar.gz"
+
+LICENSE="GPL-2+"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86"
+IUSE="gnome gssapi gtk hardened ipv6 selinux xinetd zeroconf"
+
+RESTRICT="test"
+
+CDEPEND="${PYTHON_DEPS}
+ dev-libs/popt
+ gnome? (
+ >=gnome-base/libgnome-2
+ >=gnome-base/libgnomeui-2
+ x11-libs/gtk+:2
+ x11-libs/pango
+ )
+ gssapi? ( net-libs/libgssglue )
+ gtk? ( x11-libs/gtk+:2 )
+ zeroconf? ( >=net-dns/avahi-0.6[dbus] )
+"
+DEPEND="${CDEPEND}
+ sys-libs/binutils-libs
+ virtual/pkgconfig"
+RDEPEND="${CDEPEND}
+ !net-misc/pump
+ dev-util/shadowman
+ >=sys-devel/gcc-config-1.4.1
+ selinux? ( sec-policy/selinux-distcc )
+ xinetd? ( sys-apps/xinetd )"
+
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+S="${WORKDIR}/distcc"
+
+pkg_setup() {
+ enewuser distcc 240 -1 -1 daemon
+ python-single-r1_pkg_setup
+}
+
+src_prepare() {
+ eapply "${FILESDIR}/${PN}-3.0-xinetd.patch"
+ # bug #255188
+ eapply "${FILESDIR}/${PN}-3.3.2-freedesktop.patch"
+ # SOCKSv5 support needed for Portage, bug #537616
+ eapply "${FILESDIR}/${PN}-3.2_rc1-socks5.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
+
+ hprefixify update-distcc-symlinks.py src/{serve,daemon}.c
+ python_fix_shebang update-distcc-symlinks.py "${T}/distcc-config"
+ eautoreconf
+}
+
+src_configure() {
+ local myconf=(
+ --disable-Werror
+ $(use_enable ipv6 rfc2553)
+ $(use_with gtk)
+ $(use_with gnome)
+ $(use_with gssapi auth)
+ $(use_with zeroconf avahi)
+ )
+
+ econf "${myconf[@]}"
+}
+
+src_install() {
+ # override GZIP_BIN to stop it from compressing manpages
+ emake DESTDIR="${D}" GZIP_BIN=false install
+ python_optimize
+
+ newinitd "${FILESDIR}/distccd.initd" distccd
+ systemd_dounit "${FILESDIR}/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 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
+ 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 [[ ${ROOT} == / ]]; then
+ eselect compiler-shadow update distcc
+ eselect compiler-shadow update distccd
+ fi
+
+ use gnome && xdg_desktop_database_update
+
+ 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 gnome || use gtk; then
+ elog "Or:"
+ elog "# DISTCC_DIR=\"${DISTCC_DIR:-${BUILD_PREFIX}/.distcc}\" distccmon-gnome"
+ fi
+
+ elog
+ elog "***SECURITY NOTICE***"
+ elog "Since distcc-3.3, whitelist is used for what distccd could execute. The whilelist"
+ 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 /etc/conf.d/distccd."
+ elog "Cf. https://github.com/distcc/distcc/pull/243."
+}
+
+pkg_prerm() {
+ if [[ -z ${REPLACED_BY_VERSION} && ${ROOT} == / ]]; then
+ eselect compiler-shadow remove distcc
+ fi
+}
+
+pkg_postrm() {
+ use gnome && xdg_desktop_database_update
+}
diff --git a/sys-devel/distcc/files/distcc-config b/sys-devel/distcc/files/distcc-config
new file mode 100644
index 00000000000..974620d107f
--- /dev/null
+++ b/sys-devel/distcc/files/distcc-config
@@ -0,0 +1,180 @@
+#!/usr/bin/env python
+# Copyright 1999-2018 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, '@libdir@')
+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', 'bin')
+
+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))
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-devel/distcc/, sys-devel/distcc/files/
@ 2018-12-09 19:16 Michał Górny
0 siblings, 0 replies; 11+ messages in thread
From: Michał Górny @ 2018-12-09 19:16 UTC (permalink / raw
To: gentoo-commits
commit: 1ae7ddd19bc5c2713e5b6a100c69663d58ca72fa
Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Sun Dec 9 19:06:09 2018 +0000
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Sun Dec 9 19:16:00 2018 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1ae7ddd1
sys-devel/distcc: Backport fix for crash on non-existing dir
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
...stcc-3.3.2-r3.ebuild => distcc-3.3.2-r4.ebuild} | 2 ++
.../distcc/files/distcc-3.3.2-noexist-crash.patch | 22 ++++++++++++++++++++++
2 files changed, 24 insertions(+)
diff --git a/sys-devel/distcc/distcc-3.3.2-r3.ebuild b/sys-devel/distcc/distcc-3.3.2-r4.ebuild
similarity index 98%
rename from sys-devel/distcc/distcc-3.3.2-r3.ebuild
rename to sys-devel/distcc/distcc-3.3.2-r4.ebuild
index 1266d913df9..01cca1f446a 100644
--- a/sys-devel/distcc/distcc-3.3.2-r3.ebuild
+++ b/sys-devel/distcc/distcc-3.3.2-r4.ebuild
@@ -56,6 +56,8 @@ src_prepare() {
eapply "${FILESDIR}/${PN}-3.3.2-freedesktop.patch"
# SOCKSv5 support needed for Portage, bug #537616
eapply "${FILESDIR}/${PN}-3.2_rc1-socks5.patch"
+ # crash on missing directory
+ eapply "${FILESDIR}"/distcc-3.3.2-noexist-crash.patch
eapply_user
# Bugs #120001, #167844 and probably more. See patch for description.
diff --git a/sys-devel/distcc/files/distcc-3.3.2-noexist-crash.patch b/sys-devel/distcc/files/distcc-3.3.2-noexist-crash.patch
new file mode 100644
index 00000000000..7f378082d99
--- /dev/null
+++ b/sys-devel/distcc/files/distcc-3.3.2-noexist-crash.patch
@@ -0,0 +1,22 @@
+From 24f73c5cd8f839bd520eb52e91d0d26e07689373 Mon Sep 17 00:00:00 2001
+From: Shawn Landden <shawn@git.icu>
+Date: Wed, 29 Aug 2018 04:52:38 -0700
+Subject: [PATCH] fix #304
+
+---
+ src/daemon.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/daemon.c b/src/daemon.c
+index 5765982..c8fee7c 100644
+--- a/src/daemon.c
++++ b/src/daemon.c
+@@ -166,7 +166,7 @@ static void dcc_warn_masquerade_whitelist(void) {
+ rs_log_crit(LIBDIR "/distcc not found. %s", warn);
+ dcc_exit(EXIT_COMPILER_MISSING);
+ }
+- if (!readdir(e) && !readdir(d)) {
++ if ((!e || !readdir(e)) && (!d || !readdir(d))) {
+ rs_log_crit(LIBDIR "/distcc empty. %s", warn);
+ dcc_exit(EXIT_COMPILER_MISSING);
+ }
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-devel/distcc/, sys-devel/distcc/files/
@ 2019-03-17 6:27 Matt Turner
0 siblings, 0 replies; 11+ messages in thread
From: Matt Turner @ 2019-03-17 6:27 UTC (permalink / raw
To: gentoo-commits
commit: 7d193cf6247ffe8967ea79c8e68f6728605b3d40
Author: Matt Turner <mattst88 <AT> gentoo <DOT> org>
AuthorDate: Sun Mar 17 06:23:54 2019 +0000
Commit: Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Sun Mar 17 06:26:41 2019 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7d193cf6
sys-devel/distcc: Drop --verbose from systemd service file
Causes enormous volumes of logspam. Acked by mgorny.
Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org>
sys-devel/distcc/distcc-3.3.2-r5.ebuild | 200 +++++++++++++++++++++++++++++++
sys-devel/distcc/files/distccd.service-1 | 10 ++
2 files changed, 210 insertions(+)
diff --git a/sys-devel/distcc/distcc-3.3.2-r5.ebuild b/sys-devel/distcc/distcc-3.3.2-r5.ebuild
new file mode 100644
index 00000000000..24098b549c2
--- /dev/null
+++ b/sys-devel/distcc/distcc-3.3.2-r5.ebuild
@@ -0,0 +1,200 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python3_{5,6} )
+
+inherit autotools flag-o-matic python-single-r1 systemd \
+ toolchain-funcs user xdg-utils prefix
+
+DESCRIPTION="Distribute compilation of C code across several machines on a network"
+HOMEPAGE="http://distcc.org/"
+SRC_URI="https://github.com/${PN}/${PN}/releases/download/v${PV}/${P}.tar.gz"
+
+LICENSE="GPL-2+"
+SLOT="0"
+KEYWORDS="~alpha amd64 arm ~arm64 hppa ia64 ~m68k ~mips ppc ppc64 s390 ~sh ~sparc ~x86"
+IUSE="gnome gssapi gtk hardened ipv6 selinux xinetd zeroconf"
+
+RESTRICT="test"
+
+CDEPEND="${PYTHON_DEPS}
+ dev-libs/popt
+ gnome? (
+ >=gnome-base/libgnome-2
+ >=gnome-base/libgnomeui-2
+ x11-libs/gtk+:2
+ x11-libs/pango
+ )
+ gssapi? ( net-libs/libgssglue )
+ gtk? ( x11-libs/gtk+:2 )
+ zeroconf? ( >=net-dns/avahi-0.6[dbus] )
+"
+DEPEND="${CDEPEND}
+ sys-devel/autoconf-archive
+ sys-libs/binutils-libs
+ virtual/pkgconfig"
+RDEPEND="${CDEPEND}
+ !net-misc/pump
+ dev-util/shadowman
+ >=sys-devel/gcc-config-1.4.1
+ selinux? ( sec-policy/selinux-distcc )
+ xinetd? ( sys-apps/xinetd )"
+
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+S="${WORKDIR}/distcc"
+
+pkg_setup() {
+ enewuser distcc 240 -1 -1 daemon
+ python-single-r1_pkg_setup
+}
+
+src_prepare() {
+ eapply "${FILESDIR}/${PN}-3.0-xinetd.patch"
+ # bug #255188
+ eapply "${FILESDIR}/${PN}-3.3.2-freedesktop.patch"
+ # SOCKSv5 support needed for Portage, bug #537616
+ eapply "${FILESDIR}/${PN}-3.2_rc1-socks5.patch"
+ # crash on missing directory
+ eapply "${FILESDIR}"/distcc-3.3.2-noexist-crash.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
+
+ hprefixify update-distcc-symlinks.py src/{serve,daemon}.c
+ python_fix_shebang update-distcc-symlinks.py "${T}/distcc-config"
+ eautoreconf
+}
+
+src_configure() {
+ local myconf=(
+ --disable-Werror
+ --libdir=/usr/lib
+ $(use_enable ipv6 rfc2553)
+ $(use_with gtk)
+ $(use_with gnome)
+ $(use_with gssapi auth)
+ $(use_with zeroconf avahi)
+ )
+
+ econf "${myconf[@]}"
+}
+
+src_install() {
+ # override GZIP_BIN to stop it from compressing manpages
+ emake 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 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
+ 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 [[ ${ROOT} == / ]]; then
+ eselect compiler-shadow update distcc
+ eselect compiler-shadow update distccd
+ fi
+
+ use gnome && xdg_desktop_database_update
+
+ 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 gnome || use gtk; then
+ elog "Or:"
+ elog "# DISTCC_DIR=\"${DISTCC_DIR:-${BUILD_PREFIX}/.distcc}\" distccmon-gnome"
+ fi
+
+ elog
+ elog "***SECURITY NOTICE***"
+ elog "Since distcc-3.3, whitelist is used for what distccd could execute. The whilelist"
+ 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 /etc/conf.d/distccd."
+ elog "Cf. https://github.com/distcc/distcc/pull/243."
+}
+
+pkg_prerm() {
+ if [[ -z ${REPLACED_BY_VERSION} && ${ROOT} == / ]]; then
+ eselect compiler-shadow remove distcc
+ fi
+}
+
+pkg_postrm() {
+ use gnome && xdg_desktop_database_update
+}
diff --git a/sys-devel/distcc/files/distccd.service-1 b/sys-devel/distcc/files/distccd.service-1
new file mode 100644
index 00000000000..9bd470297df
--- /dev/null
+++ b/sys-devel/distcc/files/distccd.service-1
@@ -0,0 +1,10 @@
+[Unit]
+Description=Distccd: A Distributed Compilation Server
+After=network.target
+
+[Service]
+User=distcc
+ExecStart=/usr/bin/distccd --no-detach --daemon --port 3632 -N 15 --allow $ALLOWED_SERVERS
+
+[Install]
+WantedBy=multi-user.target
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-devel/distcc/, sys-devel/distcc/files/
@ 2019-12-29 20:51 Michał Górny
0 siblings, 0 replies; 11+ messages in thread
From: Michał Górny @ 2019-12-29 20:51 UTC (permalink / raw
To: gentoo-commits
commit: 37f05be34993ee4da8a8f8e13d1ce1b5574f8632
Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Sun Dec 29 20:49:59 2019 +0000
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Sun Dec 29 20:51:14 2019 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=37f05be3
sys-devel/distcc: Remove old
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
sys-devel/distcc/Manifest | 1 -
sys-devel/distcc/distcc-3.3.2-r5.ebuild | 200 ---------------------
.../distcc/files/distcc-3.3.2-noexist-crash.patch | 22 ---
3 files changed, 223 deletions(-)
diff --git a/sys-devel/distcc/Manifest b/sys-devel/distcc/Manifest
index 5e6d668cdda..1efba30ad96 100644
--- a/sys-devel/distcc/Manifest
+++ b/sys-devel/distcc/Manifest
@@ -1,2 +1 @@
-DIST distcc-3.3.2.tar.gz 1008938 BLAKE2B e784002dffefd395b068d237a86203563fefc81e17a08c4d2e372eaaf62c5ac799011fc8633c8bfb717f0ebc8c8cb8b999c941e0f5f87c4077d031a9e5c4b138 SHA512 fdf11ed94ba50977b45e302179c5c4ba067cc3db37579cb8ed6d5b9487f8e3c89114f65af69333c38d374cf7634d7aef8d5a2d5c7fd8e9b1f4930c0897d6da10
DIST distcc-3.3.3.tar.gz 1195666 BLAKE2B b393fdb20eb555dec794bf55c1287dd804a576e0a5db9f2fa84c3924a40185a193231aea807353918430297c9c83c7592aaaafd521cf73c92a72bf30b8a69caa SHA512 d5e7fc67f49ee640cef753038b5c0ebcbbac61c6ac29f20ee4736b045a89979ced765717c46383a4fadc50a4fe34e94e58e307509144414a9ca19eb4cc68a135
diff --git a/sys-devel/distcc/distcc-3.3.2-r5.ebuild b/sys-devel/distcc/distcc-3.3.2-r5.ebuild
deleted file mode 100644
index ebf2f5ab847..00000000000
--- a/sys-devel/distcc/distcc-3.3.2-r5.ebuild
+++ /dev/null
@@ -1,200 +0,0 @@
-# Copyright 1999-2019 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-PYTHON_COMPAT=( python3_{5,6} )
-
-inherit autotools flag-o-matic python-single-r1 systemd \
- toolchain-funcs user xdg-utils prefix
-
-DESCRIPTION="Distribute compilation of C code across several machines on a network"
-HOMEPAGE="http://distcc.org/"
-SRC_URI="https://github.com/${PN}/${PN}/releases/download/v${PV}/${P}.tar.gz"
-
-LICENSE="GPL-2+"
-SLOT="0"
-KEYWORDS="alpha amd64 arm arm64 hppa ia64 ~m68k ~mips ppc ppc64 s390 ~sh sparc x86"
-IUSE="gnome gssapi gtk hardened ipv6 selinux xinetd zeroconf"
-
-RESTRICT="test"
-
-CDEPEND="${PYTHON_DEPS}
- dev-libs/popt
- gnome? (
- >=gnome-base/libgnome-2
- >=gnome-base/libgnomeui-2
- x11-libs/gtk+:2
- x11-libs/pango
- )
- gssapi? ( net-libs/libgssglue )
- gtk? ( x11-libs/gtk+:2 )
- zeroconf? ( >=net-dns/avahi-0.6[dbus] )
-"
-DEPEND="${CDEPEND}
- sys-devel/autoconf-archive
- sys-libs/binutils-libs
- virtual/pkgconfig"
-RDEPEND="${CDEPEND}
- !net-misc/pump
- dev-util/shadowman
- >=sys-devel/gcc-config-1.4.1
- selinux? ( sec-policy/selinux-distcc )
- xinetd? ( sys-apps/xinetd )"
-
-REQUIRED_USE="${PYTHON_REQUIRED_USE}"
-
-S="${WORKDIR}/distcc"
-
-pkg_setup() {
- enewuser distcc 240 -1 -1 daemon
- python-single-r1_pkg_setup
-}
-
-src_prepare() {
- eapply "${FILESDIR}/${PN}-3.0-xinetd.patch"
- # bug #255188
- eapply "${FILESDIR}/${PN}-3.3.2-freedesktop.patch"
- # SOCKSv5 support needed for Portage, bug #537616
- eapply "${FILESDIR}/${PN}-3.2_rc1-socks5.patch"
- # crash on missing directory
- eapply "${FILESDIR}"/distcc-3.3.2-noexist-crash.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
-
- hprefixify update-distcc-symlinks.py src/{serve,daemon}.c
- python_fix_shebang update-distcc-symlinks.py "${T}/distcc-config"
- eautoreconf
-}
-
-src_configure() {
- local myconf=(
- --disable-Werror
- --libdir=/usr/lib
- $(use_enable ipv6 rfc2553)
- $(use_with gtk)
- $(use_with gnome)
- $(use_with gssapi auth)
- $(use_with zeroconf avahi)
- )
-
- econf "${myconf[@]}"
-}
-
-src_install() {
- # override GZIP_BIN to stop it from compressing manpages
- emake 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 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
- 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 [[ ${ROOT} == / ]]; then
- eselect compiler-shadow update distcc
- eselect compiler-shadow update distccd
- fi
-
- use gnome && xdg_desktop_database_update
-
- 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 gnome || use gtk; then
- elog "Or:"
- elog "# DISTCC_DIR=\"${DISTCC_DIR:-${BUILD_PREFIX}/.distcc}\" distccmon-gnome"
- fi
-
- elog
- elog "***SECURITY NOTICE***"
- elog "Since distcc-3.3, whitelist is used for what distccd could execute. The whilelist"
- 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 /etc/conf.d/distccd."
- elog "Cf. https://github.com/distcc/distcc/pull/243."
-}
-
-pkg_prerm() {
- if [[ -z ${REPLACED_BY_VERSION} && ${ROOT} == / ]]; then
- eselect compiler-shadow remove distcc
- fi
-}
-
-pkg_postrm() {
- use gnome && xdg_desktop_database_update
-}
diff --git a/sys-devel/distcc/files/distcc-3.3.2-noexist-crash.patch b/sys-devel/distcc/files/distcc-3.3.2-noexist-crash.patch
deleted file mode 100644
index 7f378082d99..00000000000
--- a/sys-devel/distcc/files/distcc-3.3.2-noexist-crash.patch
+++ /dev/null
@@ -1,22 +0,0 @@
-From 24f73c5cd8f839bd520eb52e91d0d26e07689373 Mon Sep 17 00:00:00 2001
-From: Shawn Landden <shawn@git.icu>
-Date: Wed, 29 Aug 2018 04:52:38 -0700
-Subject: [PATCH] fix #304
-
----
- src/daemon.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/daemon.c b/src/daemon.c
-index 5765982..c8fee7c 100644
---- a/src/daemon.c
-+++ b/src/daemon.c
-@@ -166,7 +166,7 @@ static void dcc_warn_masquerade_whitelist(void) {
- rs_log_crit(LIBDIR "/distcc not found. %s", warn);
- dcc_exit(EXIT_COMPILER_MISSING);
- }
-- if (!readdir(e) && !readdir(d)) {
-+ if ((!e || !readdir(e)) && (!d || !readdir(d))) {
- rs_log_crit(LIBDIR "/distcc empty. %s", warn);
- dcc_exit(EXIT_COMPILER_MISSING);
- }
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-devel/distcc/, sys-devel/distcc/files/
@ 2021-03-02 18:16 Michał Górny
0 siblings, 0 replies; 11+ messages in thread
From: Michał Górny @ 2021-03-02 18:16 UTC (permalink / raw
To: gentoo-commits
commit: 76151f32fbd41247e5d01f88207db2a084f6e661
Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Tue Mar 2 17:23:51 2021 +0000
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Tue Mar 2 18:16:45 2021 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=76151f32
sys-devel/distcc: Disable CHOST rewrites that break i686 cross
Closes: https://bugs.gentoo.org/773652
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
...stcc-3.3.3-r2.ebuild => distcc-3.3.3-r3.ebuild} | 2 ++
.../files/distcc-3.3.3-no-rewrite-chost.patch | 28 ++++++++++++++++++++++
2 files changed, 30 insertions(+)
diff --git a/sys-devel/distcc/distcc-3.3.3-r2.ebuild b/sys-devel/distcc/distcc-3.3.3-r3.ebuild
similarity index 98%
rename from sys-devel/distcc/distcc-3.3.3-r2.ebuild
rename to sys-devel/distcc/distcc-3.3.3-r3.ebuild
index b5d02e4bf2c..729f2211d69 100644
--- a/sys-devel/distcc/distcc-3.3.3-r2.ebuild
+++ b/sys-devel/distcc/distcc-3.3.3-r3.ebuild
@@ -46,6 +46,8 @@ src_prepare() {
eapply "${FILESDIR}/${P}-py38.patch"
# gcc-10 fix, #707502
eapply "${FILESDIR}/${P}-gcc-10-fix.patch"
+ # unbreak CHOST prefix, https://bugs.gentoo.org/773652
+ eapply "${FILESDIR}/${P}-no-rewrite-chost.patch"
eapply_user
# Bugs #120001, #167844 and probably more. See patch for description.
diff --git a/sys-devel/distcc/files/distcc-3.3.3-no-rewrite-chost.patch b/sys-devel/distcc/files/distcc-3.3.3-no-rewrite-chost.patch
new file mode 100644
index 00000000000..dafaa90759b
--- /dev/null
+++ b/sys-devel/distcc/files/distcc-3.3.3-no-rewrite-chost.patch
@@ -0,0 +1,28 @@
+From c2471d4cf3e2ef2556c150d52860b4e8f04e4994 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Ville=20Syrj=C3=A4l=C3=A4?= <ville.syrjala@linux.intel.com>
+Date: Mon, 1 Mar 2021 22:13:36 +0200
+Subject: [PATCH] distcc: fix i686 cross compile
+
+[mgorny: disable toolchain prefix rewriting code that workarounds some
+ Debian invention and breaks everything else]
+
+---
+ src/compile.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/compile.c b/src/compile.c
+index 25df355..e5d655b 100644
+--- a/src/compile.c
++++ b/src/compile.c
+@@ -572,7 +572,7 @@ static int dcc_gcc_rewrite_fqn(char **argv)
+ if (!newcmd)
+ return -ENOMEM;
+
+- if ((t = strstr(target_with_vendor, "-pc-"))) {
++ if (0 && (t = strstr(target_with_vendor, "-pc-"))) {
+ memcpy(newcmd, target_with_vendor, t - target_with_vendor);
+ strcat(newcmd, t + strlen("-pc"));
+ } else
+--
+2.26.2
+
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-devel/distcc/, sys-devel/distcc/files/
@ 2022-06-07 4:56 Sam James
0 siblings, 0 replies; 11+ messages in thread
From: Sam James @ 2022-06-07 4:56 UTC (permalink / raw
To: gentoo-commits
commit: 960e52330ab1979cc35077fbcea1e3ea7c63415f
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Tue Jun 7 04:53:40 2022 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue Jun 7 04:56:11 2022 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=960e5233
sys-devel/distcc: update EAPI 7 -> 8, Python 3.10
Seems to mostly work with Python 3.10, although I get a test failure,
it's better than it was pre-patch.
Closes: https://bugs.gentoo.org/846320
Signed-off-by: Sam James <sam <AT> gentoo.org>
sys-devel/distcc/distcc-3.4-r1.ebuild | 181 +++++++++++++++++++++
sys-devel/distcc/files/distcc-3.4-pump-tests.patch | 153 +++++++++++++++++
2 files changed, 334 insertions(+)
diff --git a/sys-devel/distcc/distcc-3.4-r1.ebuild b/sys-devel/distcc/distcc-3.4-r1.ebuild
new file mode 100644
index 000000000000..7495c3fff4fe
--- /dev/null
+++ b/sys-devel/distcc/distcc-3.4-r1.ebuild
@@ -0,0 +1,181 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{8..10} )
+
+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 ~ia64 ~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="
+ sys-devel/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/files/distcc-3.4-pump-tests.patch b/sys-devel/distcc/files/distcc-3.4-pump-tests.patch
new file mode 100644
index 000000000000..db392b7f3632
--- /dev/null
+++ b/sys-devel/distcc/files/distcc-3.4-pump-tests.patch
@@ -0,0 +1,153 @@
+https://github.com/distcc/distcc/pull/460
+
+From 45d9c4a1ef66451ed45a6afdec7098ed02082390 Mon Sep 17 00:00:00 2001
+From: Rosen Matev <rosen.matev@cern.ch>
+Date: Fri, 29 Apr 2022 15:42:28 +0200
+Subject: [PATCH] Fix tests in pump mode
+
+`make check` is also running tests for the pump mode
+(`pump-maintainer-check` target) but they were all falling back to
+the usual preprocessor mode as the include server was not started.
+
+This is solved by prepending `pump` to the distcc invocations and
+also some trivially failing tests are fixed or disabled when they
+make no sense in pump mode.
+---
+ Makefile.in | 2 +-
+ pump.in | 13 +++++++++++--
+ test/testdistcc.py | 28 ++++++++++++++++++++++++----
+ 3 files changed, 36 insertions(+), 7 deletions(-)
+
+diff --git a/Makefile.in b/Makefile.in
+index f240ca6f..79e28380 100644
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -583,7 +583,7 @@ distccmon-gnome@EXEEXT@: $(mon_obj) $(gnome_obj)
+ # the distcc version, the source location, the CPP flags (for location of the
+ # includes), and the build location.
+ include-server:
+- if test -z "$(PYTHON)"; then \
++ @if test -z "$(PYTHON)"; then \
+ echo "Not building $@: No suitable python found"; \
+ else \
+ mkdir -p "$(include_server_builddir)" && \
+diff --git a/pump.in b/pump.in
+index 8e46f458..08a32c0e 100755
+--- a/pump.in
++++ b/pump.in
+@@ -218,7 +218,9 @@ PrintIncludeServerStatusMessage() {
+ }
+
+ Announce() {
+- echo "__________Using distcc-pump from $DISTCC_LOCATION"
++ if [ "$verbose" = 1 ]; then
++ echo "__________Using distcc-pump from $DISTCC_LOCATION"
++ fi
+ }
+
+ # Starts up the include server. Sets $socket, $socket_dir, and
+@@ -359,7 +361,9 @@ ShutDown() {
+ # Always -- at exit -- shut down include_server and remove $socket_dir
+ if [ -n "$include_server_pid" ] && \
+ ps -p "$include_server_pid" > /dev/null; then
+- echo '__________Shutting down distcc-pump include server'
++ if [ "$verbose" = 1 ]; then
++ echo '__________Shutting down distcc-pump include server'
++ fi
+ kill $include_server_pid
+ # Wait until it's really dead. We need to do this because the
+ # include server may produce output after receiving SIGTERM.
+@@ -508,6 +512,11 @@ Main() {
+
+ Initialize
+
++ # Do not write on stdout if we're testing pump mode
++ if [ "0$DISTCC_TESTING_INCLUDE_SERVER" -ne "0" ]; then
++ verbose=0
++ fi
++
+ case "$*" in
+ --startup)
+ # Don't put ordinary progress messages on stdout,
+diff --git a/test/testdistcc.py b/test/testdistcc.py
+index dfdf2f13..6377d0b6 100755
+--- a/test/testdistcc.py
++++ b/test/testdistcc.py
+@@ -258,7 +258,11 @@ def valgrind(self):
+ return _valgrind_command;
+
+ def distcc(self):
+- return self.valgrind() + "distcc "
++ if "cpp" not in _server_options:
++ return self.valgrind() + "distcc "
++ else:
++ return "DISTCC_TESTING_INCLUDE_SERVER=1 " + self.valgrind() + "pump distcc "
++
+
+ def distccd(self):
+ return self.valgrind() + "distccd "
+@@ -422,6 +426,11 @@ class BogusOption_Case(SimpleDistCC_Case):
+ Now that we support implicit compilers, this is passed to gcc,
+ which returns a non-zero status."""
+ def runtest(self):
++ # Disable the test in pump mode since the pump wrapper fails
++ # before we can run distcc.
++ if "cpp" in _server_options:
++ raise comfychair.NotRunError('pump wrapper expects DISTCC_HOSTS')
++
+ error_rc, _, _ = self.runcmd_unchecked(self._cc + " --bogus-option")
+ assert error_rc != 0
+ self.runcmd(self.distcc() + self._cc + " --bogus-option", error_rc)
+@@ -432,7 +441,7 @@ def runtest(self):
+ class CompilerOptionsPassed_Case(SimpleDistCC_Case):
+ """Test that options following the compiler name are passed to the compiler."""
+ def runtest(self):
+- out, err = self.runcmd("DISTCC_HOSTS=localhost "
++ out, err = self.runcmd("DISTCC_HOSTS=localhost%s " % _server_options
+ + self.distcc()
+ + self._cc + " --help")
+ if re.search('distcc', out):
+@@ -1422,7 +1431,8 @@ def source(self):
+
+ def setupEnv(self):
+ Compilation_Case.setupEnv(self)
+- os.environ['DISTCC_HOSTS'] = '127.0.0.1:%d,lzo' % self.server_port
++ os.environ['DISTCC_HOSTS'] = (
++ '127.0.0.1:%d,lzo' % self.server_port + _server_options)
+
+ class DashONoSpace_Case(CompileHello_Case):
+ def compileCmd(self):
+@@ -1525,6 +1535,11 @@ def source(self):
+ """
+
+ def runtest(self):
++ # Disable the test in pump mode since the pump wrapper fails
++ # before we can run distcc.
++ if "cpp" in _server_options:
++ raise comfychair.NotRunError('pump wrapper expects DISTCC_HOSTS')
++
+ # -P means not to emit linemarkers
+ self.runcmd(self.distcc()
+ + self._cc + " -E testtmp.c -o testtmp.out")
+@@ -1828,7 +1843,7 @@ class NoServer_Case(CompileHello_Case):
+ """Invalid server name"""
+ def setup(self):
+ self.stripEnvironment()
+- os.environ['DISTCC_HOSTS'] = 'no.such.host.here'
++ os.environ['DISTCC_HOSTS'] = 'no.such.host.here' + _server_options
+ self.distcc_log = 'distcc.log'
+ os.environ['DISTCC_LOG'] = self.distcc_log
+ self.createSource()
+@@ -1874,6 +1889,11 @@ class NoHosts_Case(CompileHello_Case):
+ We expect compilation to succeed, but with a warning that it was
+ run locally."""
+ def runtest(self):
++ # Disable the test in pump mode since the pump wrapper fails
++ # before we can run distcc.
++ if "cpp" in _server_options:
++ raise comfychair.NotRunError('pump wrapper expects DISTCC_HOSTS')
++
+ # WithDaemon_Case sets this to point to the local host, but we
+ # don't want that. Note that you cannot delete environment
+ # keys in Python1.5, so we need to just set them to the empty
+
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-devel/distcc/, sys-devel/distcc/files/
@ 2023-01-13 9:32 Sam James
0 siblings, 0 replies; 11+ messages in thread
From: Sam James @ 2023-01-13 9:32 UTC (permalink / raw
To: gentoo-commits
commit: 4a4dea6c8c14d265858ab687c96781f5dfb66766
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Fri Jan 13 09:31:12 2023 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri Jan 13 09:31:12 2023 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4a4dea6c
sys-devel/distcc: drop 3.3.3-r3, 3.4
Signed-off-by: Sam James <sam <AT> gentoo.org>
sys-devel/distcc/Manifest | 1 -
sys-devel/distcc/distcc-3.3.3-r3.ebuild | 186 ---------------------
sys-devel/distcc/distcc-3.4.ebuild | 178 --------------------
.../distcc/files/distcc-3.3.2-freedesktop.patch | 112 -------------
.../distcc/files/distcc-3.3.3-gcc-10-fix.patch | 28 ----
.../files/distcc-3.3.3-no-rewrite-chost.patch | 28 ----
sys-devel/distcc/files/distcc-3.3.3-py38.patch | 53 ------
7 files changed, 586 deletions(-)
diff --git a/sys-devel/distcc/Manifest b/sys-devel/distcc/Manifest
index f78dee9dc148..19f4116d75c4 100644
--- a/sys-devel/distcc/Manifest
+++ b/sys-devel/distcc/Manifest
@@ -1,2 +1 @@
-DIST distcc-3.3.3.tar.gz 1195666 BLAKE2B b393fdb20eb555dec794bf55c1287dd804a576e0a5db9f2fa84c3924a40185a193231aea807353918430297c9c83c7592aaaafd521cf73c92a72bf30b8a69caa SHA512 d5e7fc67f49ee640cef753038b5c0ebcbbac61c6ac29f20ee4736b045a89979ced765717c46383a4fadc50a4fe34e94e58e307509144414a9ca19eb4cc68a135
DIST distcc-3.4.tar.gz 1239519 BLAKE2B 8dc9baa6b1f65f2bb3621e4e643d7d15d55e2338de4d6a7f20a572d9ec280925b4421a294f40c9fcfba8d4193a6bd1871eb8caf13dd2c2a8a81834671f6bc8bc SHA512 de09329fdfa25e08a9b9529190ddaa9ceccb34c8655692edb86f367a8db4a71b750c6e928cb8e5a670f51fbbc02fd1c8524f72e01b3ebaacc1106dc676d18eef
diff --git a/sys-devel/distcc/distcc-3.3.3-r3.ebuild b/sys-devel/distcc/distcc-3.3.3-r3.ebuild
deleted file mode 100644
index c535bb1a9fe3..000000000000
--- a/sys-devel/distcc/distcc-3.3.3-r3.ebuild
+++ /dev/null
@@ -1,186 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PYTHON_COMPAT=( python3_{7..9} )
-
-inherit autotools flag-o-matic prefix python-single-r1 systemd \
- toolchain-funcs xdg-utils
-
-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 ~ia64 ~m68k ~mips ppc ppc64 ~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+:2 )
- zeroconf? ( >=net-dns/avahi-0.6[dbus] )
-"
-DEPEND="${RDEPEND}
- sys-libs/binutils-libs"
-BDEPEND="
- sys-devel/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"
- # bug #255188
- eapply "${FILESDIR}/${PN}-3.3.2-freedesktop.patch"
- # SOCKSv5 support needed for Portage, bug #537616
- eapply "${FILESDIR}/${PN}-3.2_rc1-socks5.patch"
- # backport py3.8 fixes
- eapply "${FILESDIR}/${P}-py38.patch"
- # gcc-10 fix, #707502
- eapply "${FILESDIR}/${P}-gcc-10-fix.patch"
- # unbreak CHOST prefix, https://bugs.gentoo.org/773652
- eapply "${FILESDIR}/${P}-no-rewrite-chost.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() {
- local myconf=(
- --disable-Werror
- --libdir=/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.ebuild b/sys-devel/distcc/distcc-3.4.ebuild
deleted file mode 100644
index dc60b2b2ff1e..000000000000
--- a/sys-devel/distcc/distcc-3.4.ebuild
+++ /dev/null
@@ -1,178 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PYTHON_COMPAT=( python3_{7..9} )
-
-inherit autotools flag-o-matic prefix python-single-r1 systemd \
- toolchain-funcs xdg-utils
-
-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 ~ia64 ~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="
- sys-devel/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_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() {
- 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/files/distcc-3.3.2-freedesktop.patch b/sys-devel/distcc/files/distcc-3.3.2-freedesktop.patch
deleted file mode 100644
index 7b735ebec7f9..000000000000
--- a/sys-devel/distcc/files/distcc-3.3.2-freedesktop.patch
+++ /dev/null
@@ -1,112 +0,0 @@
-From d852c808d6f470031f40edec9ebe980afc69b9b9 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
-Date: Sat, 8 Dec 2018 12:50:07 +0100
-Subject: [PATCH] Fix desktop spec compliance of distccmon-gnome install
-
----
- Makefile.in | 18 ++++++++++--------
- gnome/distccmon-gnome.desktop | 7 +++----
- ...mon-gnome-icon.png => distccmon-gnome.png} | Bin
- src/mon-gnome.c | 2 +-
- 4 files changed, 14 insertions(+), 13 deletions(-)
- rename gnome/{distccmon-gnome-icon.png => distccmon-gnome.png} (100%)
-
-diff --git a/Makefile.in b/Makefile.in
-index 6e1e467..1106559 100644
---- a/Makefile.in
-+++ b/Makefile.in
-@@ -52,13 +52,14 @@ mandir = @mandir@
- includedir = @includedir@
- oldincludedir = /usr/include
- docdir = @docdir@
--pkgdatadir = $(datadir)/@PACKAGE_NAME@
-+icondir = $(datarootdir)/pixmaps
-+desktopdir = $(datarootdir)/applications
-
- include_server_builddir = $(builddir)/_include_server
-
- # These must be done from here, not from autoconf, because they can
- # contain variable expansions written in Make syntax. Ew.
--DIR_DEFS = -DLIBDIR="\"${libdir}\"" -DSYSCONFDIR="\"${sysconfdir}\"" -DPKGDATADIR="\"${pkgdatadir}\""
-+DIR_DEFS = -DLIBDIR="\"${libdir}\"" -DSYSCONFDIR="\"${sysconfdir}\"" -DICONDIR="\"${icondir}\""
-
- # arguments to pkgconfig
- GNOME_PACKAGES = @GNOME_PACKAGES@
-@@ -387,7 +388,7 @@ man_HTML = man/distcc_1.html man/distccd_1.html man/distccmon_text_1.html \
- man/lsdistcc_1.html man/pump_1.html man/include_server_1.html
- MEN = $(man1_MEN)
-
--gnome_data = gnome/distccmon-gnome-icon.png \
-+gnome_data = gnome/distccmon-gnome.png \
- gnome/distccmon-gnome.desktop
-
- popt_OBJS=popt/findme.o popt/popt.o popt/poptconfig.o \
-@@ -1033,7 +1034,8 @@ showpaths:
- @echo " programs $(DESTDIR)$(bindir)"
- @echo " sbin programs $(DESTDIR)$(sbindir)"
- @echo " system configuration $(DESTDIR)$(sysconfdir)"
-- @echo " shared data files $(DESTDIR)$(pkgdatadir)"
-+ @echo " icon file $(DESTDIR)$(icondir)"
-+ @echo " application file $(DESTDIR)$(desktopdir)"
-
-
- # install-sh can't handle multiple arguments, but we don't need any
-@@ -1129,10 +1131,10 @@ install-example: $(example_DOCS)
- done
-
- install-gnome-data: $(gnome_data)
-- $(mkinstalldirs) "$(DESTDIR)$(pkgdatadir)"
-- for p in $(gnome_data); do \
-- $(INSTALL_DATA) "$$p" "$(DESTDIR)$(pkgdatadir)" || exit 1; \
-- done
-+ $(mkinstalldirs) "$(DESTDIR)$(icondir)"
-+ $(mkinstalldirs) "$(DESTDIR)$(desktopdir)"
-+ $(INSTALL_DATA) gnome/distccmon-gnome.png "$(DESTDIR)$(icondir)"
-+ $(INSTALL_DATA) gnome/distccmon-gnome.desktop "$(DESTDIR)$(desktopdir)"
-
- install-conf: $(conf_files) $(default_files)
- $(mkinstalldirs) "$(DESTDIR)$(sysconfdir)/distcc"
-diff --git a/gnome/distccmon-gnome.desktop b/gnome/distccmon-gnome.desktop
-index bd1fa26..7205f5e 100644
---- a/gnome/distccmon-gnome.desktop
-+++ b/gnome/distccmon-gnome.desktop
-@@ -1,6 +1,5 @@
- [Desktop Entry]
--Version=0.9.4
--Encoding=UTF-8
-+Version=1.0
- Exec=distccmon-gnome
- Name=distcc monitor
- Name[sv]=distcc övervakare
-@@ -8,9 +7,9 @@ GenericName=Distributed Compile Monitor
- GenericName[sv]=Distribuerad kompilerings-övervakare
- Comment=Graphical view of distributed compile tasks
- Comment[sv]=Grafisk vy av distribuerade kompileringsuppgifter
--Icon=distccmon-gnome-icon.png
-+Icon=distccmon-gnome
- TryExec=distccmon-gnome
- Terminal=false
- Type=Application
--Categories=GNOME;Application;Development;
-+Categories=GNOME;GTK;Development;
- StartupNotify=true
-diff --git a/gnome/distccmon-gnome-icon.png b/gnome/distccmon-gnome.png
-similarity index 100%
-rename from gnome/distccmon-gnome-icon.png
-rename to gnome/distccmon-gnome.png
-diff --git a/src/mon-gnome.c b/src/mon-gnome.c
-index 24681d0..bfc286d 100644
---- a/src/mon-gnome.c
-+++ b/src/mon-gnome.c
-@@ -599,7 +599,7 @@ static GtkWidget * dcc_gnome_make_mainwin (void)
-
- #if GTK_CHECK_VERSION(2,2,0)
- gtk_window_set_icon_from_file (GTK_WINDOW (mainwin),
-- PKGDATADIR "/distccmon-gnome-icon.png",
-+ ICONDIR "/distccmon-gnome.png",
- NULL);
- #endif
-
---
-2.20.0.rc2
-
diff --git a/sys-devel/distcc/files/distcc-3.3.3-gcc-10-fix.patch b/sys-devel/distcc/files/distcc-3.3.3-gcc-10-fix.patch
deleted file mode 100644
index 2c0bce6c82b6..000000000000
--- a/sys-devel/distcc/files/distcc-3.3.3-gcc-10-fix.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-From 377969cc762569f4a5ec409a1e7ad6a7be3e51b3 Mon Sep 17 00:00:00 2001
-From: Romain Geissler <romain.geissler@amadeus.com>
-Date: Mon, 27 Jan 2020 09:28:43 +0000
-Subject: [PATCH] Fix build with gcc 10 which defaults to -fno-common (cf
- https://gcc.gnu.org/gcc-10/porting_to.html)
-
-This fixes the following link error I see when I use the latest gcc 10
-git branch:
-/opt/1A/toolchain/x86_64-v20.0.7/lib/gcc/x86_64-1a-linux-gnu/10.0.1/../../../../x86_64-1a-linux-gnu/bin/ld: src/serve.o:(.bss+0x0): multiple definition of `stats_text'; src/prefork.o:(.bss+0x0): first defined here
-/opt/1A/toolchain/x86_64-v20.0.7/lib/gcc/x86_64-1a-linux-gnu/10.0.1/../../../../x86_64-1a-linux-gnu/bin/ld: src/stats.o:(.data+0x20): multiple definition of `stats_text'; src/prefork.o:(.bss+0x0): first defined here
-collect2: error: ld returned 1 exit status
----
- src/stats.h | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/stats.h b/src/stats.h
-index 9bde285..74d4690 100644
---- a/src/stats.h
-+++ b/src/stats.h
-@@ -33,7 +33,7 @@ enum stats_e { STATS_TCP_ACCEPT, STATS_REJ_BAD_REQ, STATS_REJ_OVERLOAD,
- STATS_COMPILE_OK, STATS_COMPILE_ERROR, STATS_COMPILE_TIMEOUT,
- STATS_CLI_DISCONN, STATS_OTHER, STATS_ENUM_MAX };
-
--const char *stats_text[20];
-+extern const char *stats_text[20];
-
- int dcc_stats_init(void);
- void dcc_stats_init_kid(void);
diff --git a/sys-devel/distcc/files/distcc-3.3.3-no-rewrite-chost.patch b/sys-devel/distcc/files/distcc-3.3.3-no-rewrite-chost.patch
deleted file mode 100644
index dafaa90759b4..000000000000
--- a/sys-devel/distcc/files/distcc-3.3.3-no-rewrite-chost.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-From c2471d4cf3e2ef2556c150d52860b4e8f04e4994 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Ville=20Syrj=C3=A4l=C3=A4?= <ville.syrjala@linux.intel.com>
-Date: Mon, 1 Mar 2021 22:13:36 +0200
-Subject: [PATCH] distcc: fix i686 cross compile
-
-[mgorny: disable toolchain prefix rewriting code that workarounds some
- Debian invention and breaks everything else]
-
----
- src/compile.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/compile.c b/src/compile.c
-index 25df355..e5d655b 100644
---- a/src/compile.c
-+++ b/src/compile.c
-@@ -572,7 +572,7 @@ static int dcc_gcc_rewrite_fqn(char **argv)
- if (!newcmd)
- return -ENOMEM;
-
-- if ((t = strstr(target_with_vendor, "-pc-"))) {
-+ if (0 && (t = strstr(target_with_vendor, "-pc-"))) {
- memcpy(newcmd, target_with_vendor, t - target_with_vendor);
- strcat(newcmd, t + strlen("-pc"));
- } else
---
-2.26.2
-
diff --git a/sys-devel/distcc/files/distcc-3.3.3-py38.patch b/sys-devel/distcc/files/distcc-3.3.3-py38.patch
deleted file mode 100644
index 1ba5fee7d87e..000000000000
--- a/sys-devel/distcc/files/distcc-3.3.3-py38.patch
+++ /dev/null
@@ -1,53 +0,0 @@
-From c52a023b8a17e4346c66a8fddee69b40b327eae7 Mon Sep 17 00:00:00 2001
-From: MartB <mart.b@outlook.de>
-Date: Thu, 28 Nov 2019 21:00:59 +0100
-Subject: [PATCH] Replace time.clock() with time.perf_counter()
-
-.clock() got removed in python 3.8 and was marked as deprecated since 3.3
-(https://github.com/python/cpython/pull/13270)
----
- include_server/parse_file.py | 4 ++--
- include_server/statistics.py | 4 ++--
- 2 files changed, 4 insertions(+), 4 deletions(-)
-
-diff --git a/include_server/parse_file.py b/include_server/parse_file.py
-index d1dcc74..f5d78b7 100755
---- a/include_server/parse_file.py
-+++ b/include_server/parse_file.py
-@@ -272,7 +272,7 @@ def Parse(self, filepath, symbol_table):
-
- assert isinstance(filepath, str)
- self.filepath = filepath
-- parse_file_start_time = time.clock()
-+ parse_file_start_time = time.perf_counter()
- statistics.parse_file_counter += 1
-
- includepath_map_index = self.includepath_map.Index
-@@ -338,6 +338,6 @@ def Parse(self, filepath, symbol_table):
- expr_includes, next_includes)
-
-
-- statistics.parse_file_total_time += time.clock() - parse_file_start_time
-+ statistics.parse_file_total_time += time.perf_counter() - parse_file_start_time
-
- return (quote_includes, angle_includes, expr_includes, next_includes)
-diff --git a/include_server/statistics.py b/include_server/statistics.py
-index 9677af3..7bc9cb8 100755
---- a/include_server/statistics.py
-+++ b/include_server/statistics.py
-@@ -62,13 +62,13 @@ def StartTiming():
- global start_time, translation_unit_counter
- """Mark the start of a request to find an include closure."""
- translation_unit_counter += 1
-- start_time = time.clock()
-+ start_time = time.perf_counter()
-
-
- def EndTiming():
- """Mark the end of an include closure calculation."""
- global translation_unit_time, min_time, max_time, total_time
-- translation_unit_time = time.clock() - start_time
-+ translation_unit_time = time.perf_counter() - start_time
- min_time = min(translation_unit_time, min_time)
- max_time = max(translation_unit_time, max_time)
- total_time += translation_unit_time
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-devel/distcc/, sys-devel/distcc/files/
@ 2023-04-20 19:37 Sam James
0 siblings, 0 replies; 11+ messages in thread
From: Sam James @ 2023-04-20 19:37 UTC (permalink / raw
To: gentoo-commits
commit: 82469e1b6888efad9c7e08dec227694c9f1684c8
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Thu Apr 20 19:21:39 2023 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Thu Apr 20 19:36:50 2023 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=82469e1b
sys-devel/distcc: backport corruption fix
Closes: https://bugs.gentoo.org/904720
Signed-off-by: Sam James <sam <AT> gentoo.org>
sys-devel/distcc/distcc-3.4-r2.ebuild | 182 +++++++++++++++++++++
...cc-3.4-fix-dcc_gcc_rewrite_fqn-corruption.patch | 65 ++++++++
2 files changed, 247 insertions(+)
diff --git a/sys-devel/distcc/distcc-3.4-r2.ebuild b/sys-devel/distcc/distcc-3.4-r2.ebuild
new file mode 100644
index 000000000000..1f64a9e6be93
--- /dev/null
+++ b/sys-devel/distcc/distcc-3.4-r2.ebuild
@@ -0,0 +1,182 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{9..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 ~ia64 ~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="
+ sys-devel/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/files/distcc-3.4-fix-dcc_gcc_rewrite_fqn-corruption.patch b/sys-devel/distcc/files/distcc-3.4-fix-dcc_gcc_rewrite_fqn-corruption.patch
new file mode 100644
index 000000000000..14c08db329d1
--- /dev/null
+++ b/sys-devel/distcc/files/distcc-3.4-fix-dcc_gcc_rewrite_fqn-corruption.patch
@@ -0,0 +1,65 @@
+https://bugs.gentoo.org/904720
+https://github.com/distcc/distcc/commit/879b71d6e95673e58d33f6c3c341a893ee307161
+
+From 879b71d6e95673e58d33f6c3c341a893ee307161 Mon Sep 17 00:00:00 2001
+From: Alexey Sheplyakov <asheplyakov@yandex.ru>
+Date: Sat, 10 Jul 2021 22:18:14 +0400
+Subject: [PATCH] dcc_gcc_rewrite_fqn: avoid heap corruption
+
+On ALT Linux I've run into the following bug:
+
+distcc gcc -Wall -std=gnu89 -I. -O2 -o hello.o -c hello.c
+free(): invalid next size (fast)
+Aborted (core dumped)
+
+Apparently dcc_gcc_rewrite writes beyond the allocated memory:
+
+valgrind --leak-check=full -v ./distcc gcc -Wall -std=gnu89 -I. -O2 -o hello.o -c hello.c
+
+==11382== ERROR SUMMARY: 53 errors from 5 contexts (suppressed: 0 from 0)
+==11382==
+==11382== 1 errors in context 1 of 5:
+==11382== Invalid write of size 1
+==11382== at 0x4C349D8: strcat (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
+==11382== by 0x10D165: dcc_gcc_rewrite_fqn (compile.c:611)
+==11382== by 0x10D4B4: dcc_build_somewhere (compile.c:725)
+==11382== by 0x10DC01: dcc_build_somewhere_timed (compile.c:1014)
+==11382== by 0x10E380: main (distcc.c:352)
+==11382== Address 0x544e828 is 1 bytes after a block of size 23 alloc'd
+==11382== at 0x4C31B0F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
+==11382== by 0x10D087: dcc_gcc_rewrite_fqn (compile.c:588)
+==11382== by 0x10D4B4: dcc_build_somewhere (compile.c:725)
+==11382== by 0x10DC01: dcc_build_somewhere_timed (compile.c:1014)
+==11382== by 0x10E380: main (distcc.c:352)
+==11382==
+==11382==
+==11382== 1 errors in context 2 of 5:
+==11382== Invalid write of size 1
+==11382== at 0x4C349C8: strcat (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
+==11382== by 0x10D165: dcc_gcc_rewrite_fqn (compile.c:611)
+==11382== by 0x10D4B4: dcc_build_somewhere (compile.c:725)
+==11382== by 0x10DC01: dcc_build_somewhere_timed (compile.c:1014)
+==11382== by 0x10E380: main (distcc.c:352)
+==11382== Address 0x544e827 is 0 bytes after a block of size 23 alloc'd
+==11382== at 0x4C31B0F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
+==11382== by 0x10D087: dcc_gcc_rewrite_fqn (compile.c:588)
+==11382== by 0x10D4B4: dcc_build_somewhere (compile.c:725)
+==11382== by 0x10DC01: dcc_build_somewhere_timed (compile.c:1014)
+==11382== by 0x10E380: main (distcc.c:352)
+
+and ALT Linux' hardened glibc does not quite like that.
+Correctly compute the `newcmd_len` to avoid the problem.
+
+ALTBUG: #40425
+--- a/src/compile.c
++++ b/src/compile.c
+@@ -584,7 +584,7 @@ static int dcc_gcc_rewrite_fqn(char **argv)
+ return -ENOENT;
+
+
+- newcmd_len = strlen(target_with_vendor) + 1 + strlen(argv[0] + 1);
++ newcmd_len = strlen(target_with_vendor) + 1 + strlen(argv[0]) + 1;
+ newcmd = malloc(newcmd_len);
+ if (!newcmd)
+ return -ENOMEM;
+
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-devel/distcc/, sys-devel/distcc/files/
@ 2024-10-12 15:54 Mike Gilbert
0 siblings, 0 replies; 11+ messages in thread
From: Mike Gilbert @ 2024-10-12 15:54 UTC (permalink / raw
To: gentoo-commits
commit: d7e09eb9df61ad2b80b172b9baa7ed18fa5f5b47
Author: Mike Gilbert <floppym <AT> gentoo <DOT> org>
AuthorDate: Thu Oct 10 17:14:51 2024 +0000
Commit: Mike Gilbert <floppym <AT> gentoo <DOT> org>
CommitDate: Sat Oct 12 15:53:32 2024 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d7e09eb9
sys-devel/distcc: revbump
Signed-off-by: Mike Gilbert <floppym <AT> gentoo.org>
sys-devel/distcc/distcc-3.4-r5.ebuild | 195 ++++++++++++++++++++++++++++++++
sys-devel/distcc/files/distcc-config-r1 | 180 +++++++++++++++++++++++++++++
2 files changed, 375 insertions(+)
diff --git a/sys-devel/distcc/distcc-3.4-r5.ebuild b/sys-devel/distcc/distcc-3.4-r5.ebuild
new file mode 100644
index 000000000000..720b8cf870d1
--- /dev/null
+++ b/sys-devel/distcc/distcc-3.4-r5.ebuild
@@ -0,0 +1,195 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{10..13} )
+
+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="
+ ${PYTHON_DEPS}
+ 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 )
+"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-3.0-xinetd.patch"
+ # SOCKSv5 support needed for Portage, bug #537616
+ "${FILESDIR}/${PN}-3.2_rc1-socks5.patch"
+ "${FILESDIR}/${P}-fix-dcc_gcc_rewrite_fqn-corruption.patch"
+ "${FILESDIR}/${P}-rewrite-chost.patch"
+)
+
+src_prepare() {
+ default
+
+ # Bugs #120001, #167844 and probably more. See patch for description.
+ use hardened && eapply "${FILESDIR}/distcc-hardened.patch"
+
+ 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)
+
+ # 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
+ # 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 PYTHON= 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"
+ # Dummy symlinks to distccd to satisfy command whitelist, bug 650986
+ 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 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"
+
+ 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/files/distcc-config-r1 b/sys-devel/distcc/files/distcc-config-r1
new file mode 100644
index 000000000000..974620d107fb
--- /dev/null
+++ b/sys-devel/distcc/files/distcc-config-r1
@@ -0,0 +1,180 @@
+#!/usr/bin/env python
+# Copyright 1999-2018 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, '@libdir@')
+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', 'bin')
+
+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))
^ permalink raw reply related [flat|nested] 11+ messages in thread
end of thread, other threads:[~2024-10-12 15:54 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-06-07 4:56 [gentoo-commits] repo/gentoo:master commit in: sys-devel/distcc/, sys-devel/distcc/files/ Sam James
-- strict thread matches above, loose matches on Subject: below --
2024-10-12 15:54 Mike Gilbert
2023-04-20 19:37 Sam James
2023-01-13 9:32 Sam James
2021-03-02 18:16 Michał Górny
2019-12-29 20:51 Michał Górny
2019-03-17 6:27 Matt Turner
2018-12-09 19:16 Michał Górny
2018-12-09 8:04 Georgy Yakovlev
2018-12-09 6:40 Georgy Yakovlev
2018-12-08 12:12 Michał Górny
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox