diff options
author | Petteri Räty <betelgeuse@gentoo.org> | 2008-01-04 03:53:15 +0000 |
---|---|---|
committer | Petteri Räty <betelgeuse@gentoo.org> | 2008-01-04 03:53:15 +0000 |
commit | 936da1d01007555e5c28ceadce1f0011a55f8922 (patch) | |
tree | 08e9b26a756ba2d00594a4c8b570d08eb8049cec /sys-devel/distcc | |
parent | prune unused versions (diff) | |
download | gentoo-2-936da1d01007555e5c28ceadce1f0011a55f8922.tar.gz gentoo-2-936da1d01007555e5c28ceadce1f0011a55f8922.tar.bz2 gentoo-2-936da1d01007555e5c28ceadce1f0011a55f8922.zip |
Add avahi support to distcc and use system copy of popt. Fixes bug #203874 and bug #179631.
(Portage version: 2.1.4_rc11)
Diffstat (limited to 'sys-devel/distcc')
-rw-r--r-- | sys-devel/distcc/ChangeLog | 13 | ||||
-rw-r--r-- | sys-devel/distcc/distcc-2.18.3-r11.ebuild | 183 | ||||
-rw-r--r-- | sys-devel/distcc/files/2.18-r1/conf | 45 | ||||
-rw-r--r-- | sys-devel/distcc/files/2.18-r1/init | 39 | ||||
-rw-r--r-- | sys-devel/distcc/files/digest-distcc-2.18.3-r11 | 6 | ||||
-rw-r--r-- | sys-devel/distcc/files/distcc-avahi-configure.patch | 29 |
6 files changed, 313 insertions, 2 deletions
diff --git a/sys-devel/distcc/ChangeLog b/sys-devel/distcc/ChangeLog index a61658b8d987..4aef5b7b3430 100644 --- a/sys-devel/distcc/ChangeLog +++ b/sys-devel/distcc/ChangeLog @@ -1,6 +1,14 @@ # ChangeLog for sys-devel/distcc -# Copyright 2000-2007 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-devel/distcc/ChangeLog,v 1.166 2007/12/25 14:22:22 phreak Exp $ +# Copyright 2000-2008 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/sys-devel/distcc/ChangeLog,v 1.167 2008/01/04 03:53:14 betelgeuse Exp $ + +*distcc-2.18.3-r11 (04 Jan 2008) + + 04 Jan 2008; Petteri Räty <betelgeuse@gentoo.org> +files/2.18-r1/conf, + +files/2.18-r1/init, +files/distcc-avahi-configure.patch, + +distcc-2.18.3-r11.ebuild: + Add avahi support to distcc and use system copy of popt. Fixes bug #203874 + and bug #179631. 25 Dec 2007; Christian Heim <phreak@gentoo.org> metadata.xml: Removing lisa from metadata.xml as per #23541. @@ -220,6 +228,7 @@ 16 Sep 2004; Lisa Seelye <lisa@gentoo.org> distcc-2.16-r1.ebuild: forgot to bump patchlevel var +*distcc-2.16-r1 (16 Sep 2004) *distcc-2.14-r1 (16 Sep 2004) 16 Sep 2004; Lisa Seelye <lisa@gentoo.org> -files/2.11.1p/conf, diff --git a/sys-devel/distcc/distcc-2.18.3-r11.ebuild b/sys-devel/distcc/distcc-2.18.3-r11.ebuild new file mode 100644 index 000000000000..070394b328fd --- /dev/null +++ b/sys-devel/distcc/distcc-2.18.3-r11.ebuild @@ -0,0 +1,183 @@ +# Copyright 1999-2008 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-devel/distcc/distcc-2.18.3-r11.ebuild,v 1.1 2008/01/04 03:53:14 betelgeuse Exp $ + +# If you change this in any way please email lisa@gentoo.org and make an +# entry in the ChangeLog (this means you spanky :P). (2004-04-11) Lisa Seelye + +inherit autotools eutils flag-o-matic toolchain-funcs + +PATCHLEVEL="2.18-r1" + +DESCRIPTION="a program to distribute compilation of C code across several machines on a network" +HOMEPAGE="http://distcc.samba.org/" +SRC_URI="http://distcc.samba.org/ftp/distcc/distcc-${PV}.tar.bz2 + mirror://gentoo/${PN}-2.18-avahi.patch.bz2" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86" +IUSE="avahi gnome gtk selinux ipv6" + +COMMON_DEP="dev-libs/popt + avahi? ( >=net-dns/avahi-0.6.5 )" +DEPEND="|| ( >=sys-devel/gcc-config-1.3.1 app-admin/eselect-compiler ) + userland_GNU? ( sys-apps/shadow ) + dev-util/pkgconfig + dev-util/unifdef + ${COMMON_DEP}" +RDEPEND=" + gnome? ( + >=x11-libs/gtk+-2.0.0 + >=gnome-base/libgnome-2.0.0 + >=gnome-base/libgnomeui-2.0.0.0 + >=gnome-base/libglade-2.0.0 + x11-libs/pango + >=gnome-base/gconf-2.0.0 + ) + gtk? ( + >=x11-libs/gtk+-2.0.0 + x11-libs/pango + ) + selinux? ( sec-policy/selinux-distcc ) + ${COMMON_DEP}" + +pkg_setup() { + if use avahi && ! built_with_use net-dns/avahi dbus; then + eerror "${CATEGORY}/${PN} needs net-dns/avahi built with the dbus use" + eerror "flag for avahi support." + die "net-dns/avahi not built with dbus support" + fi +} + +src_unpack() { + unpack ${A} + cd "${S}" + + # -Wl,--as-needed to close bug #128605 + epatch "${FILESDIR}/distcc-as-needed.patch" + + # See bug #75420 for more multilib stuff + epatch "${FILESDIR}/distcc-gentoo-multilib-r1.patch" + einfo "Please report to bug #75420 success or failure of this patch." + + rm -v popt/*.c || die + if use avahi; then + epatch "${DISTDIR}/${PN}-2.18-avahi.patch.bz2" + epatch "${FILESDIR}/${PN}-avahi-configure.patch" + eautoreconf + fi +} + +src_compile() { + local myconf="--without-included-popt " + + #not taking any chances here, guessing which takes precedence in the + #configure script, so we'll just make the distinction here: + #gnome takes precedence over gtk if both are specified (gnome pulls + #in gtk anyways...) + use gtk && ! use gnome && myconf="${myconf} --with-gtk" + use gtk && use gnome && myconf="${myconf} --with-gnome" + + #More legacy stuff? + [ `gcc-major-version` -eq 2 ] && filter-lfs-flags + + if use ipv6; then + ewarn "To use IPV6 you must have IPV6 compiled into your kernel" + ewarn "either via a module or compiled code" + ewarn "You can recompile without ipv6 with: USE='-ipv6' emerge distcc" + myconf=" ${myconf} --enable-rfc2553 " + epause 5 + fi + econf ${myconf} $(use_enable avahi) || die "econf ${myconf} failed" + emake || die "emake failed" +} + +handle_avahi() { + local avahi="-UAVAHI" + use avahi && avahi="-DAVAHI" + unifdef ${avahi} "${1}" > "${2}" +} + +src_install() { + make DESTDIR="${D%/}" install + + insinto /usr/share/doc/${PN} + doins "${S}/survey.txt" + + exeinto /usr/bin + doexe "${FILESDIR}/distcc-config" + + handle_avahi "${FILESDIR}/${PATCHLEVEL}/init" "${T}/init" + newinitd "${T}/init" distccd || die + + handle_avahi "${FILESDIR}/${PATCHLEVEL}/conf" "${T}/conf" + newconfd "${T}/conf" distccd || die + + # create and keep the symlink dir + dodir /usr/lib/distcc/bin + keepdir /usr/lib/distcc/bin + + # create the distccd pid directory + dodir /var/run/distccd + keepdir /var/run/distccd + + 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 "${D}/usr/bin/distccmon-gnome" "${D}/usr/bin/distccmon-gui" || die + dosym /usr/bin/distccmon-gui /usr/bin/distccmon-gnome + fi + +} + +pkg_preinst() { + # non-/ installs don't require us to do anything here + [ "${ROOT}" != "/" ] && return 0 + + # stop daemon since script is being updated + [ -n "$(pidof distccd)" -a -x /etc/init.d/distccd ] && \ + /etc/init.d/distccd stop +} + +pkg_postinst() { + #are we doing bootstrap with has no useradd? + if [[ ${CHOST} != *-*-gnu && ${CHOST} != *-linux* ]] || [ -x /usr/sbin/useradd ]; then + enewuser distcc 240 + else + ewarn "You do not have useradd (bootstrap) from shadow so I didn't" + ewarn "install the distcc user. Note that attempting to start the daemon" + ewarn "will fail. Please install shadow and re-emerge distcc." + ebeep 2 + fi + + # By now everyone should be using the right envfile + + if [ "${ROOT}" = "/" ]; then + einfo "Installing links to native compilers..." + /usr/bin/distcc-config --install + else + # distcc-config can *almost* handle ROOT installs itself + # but for now, but user must finsh things off + ewarn "*** Installation is not complete ***" + ewarn "You must run the following as root:" + ewarn " /usr/bin/distcc-config --install" + ewarn "after booting or chrooting into ${ROOT}" + fi + einfo "Setting permissions on ${ROOT}var/run/distccd" + chown -R distcc:daemon "${ROOT}var/run/distccd" + echo "" + + einfo "Tips on using distcc with Gentoo can be found at" + einfo "http://www.gentoo.org/doc/en/distcc.xml" + echo "" + einfo "To use the distccmon programs with Gentoo you should use this command:" + einfo " DISTCC_DIR=/var/tmp/portage/.distcc distccmon-text N" + use gnome || use gtk && einfo "Or: DISTCC_DIR=/var/tmp/portage/.distcc distccmon-gnome" + + ewarn "***SECURITY NOTICE***" + ewarn "If you are upgrading distcc please make sure to run etc-update to" + ewarn "update your /etc/conf.d/distccd and /etc/init.d/distccd files with" + ewarn "added security precautions (the --listen and --allow directives)" + ebeep 5 +} diff --git a/sys-devel/distcc/files/2.18-r1/conf b/sys-devel/distcc/files/2.18-r1/conf new file mode 100644 index 000000000000..783236aa410f --- /dev/null +++ b/sys-devel/distcc/files/2.18-r1/conf @@ -0,0 +1,45 @@ +# /etc/conf.d/distccd: config file for /etc/init.d/distccd + +DISTCCD_OPTS="" + +# this is the distccd executable +DISTCCD_EXEC="/usr/bin/distccd" + +# this is where distccd will store its pid file +DISTCCD_PIDFILE="/var/run/distccd/distccd.pid" + +# 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 recomended 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_NICE="15" + +#ifdef AVAHI +# Enable zeroconf support in distccd +DISTCCD_AVAHI="yes" +#endif diff --git a/sys-devel/distcc/files/2.18-r1/init b/sys-devel/distcc/files/2.18-r1/init new file mode 100644 index 000000000000..ae899aa8fbc5 --- /dev/null +++ b/sys-devel/distcc/files/2.18-r1/init @@ -0,0 +1,39 @@ +#!/sbin/runscript +# $Header: /var/cvsroot/gentoo-x86/sys-devel/distcc/files/2.18-r1/init,v 1.1 2008/01/04 03:53:15 betelgeuse Exp $ + +depend() { + local avahi +#ifdef AVAHI + [ ${DISTCCD_AVAHI} = yes ] && avahi="avahi-daemon" +#endif + need net ${avahi} + use ypbind +} + +start() { + [ -e "${DISTCCD_PIDFILE}" ] && rm -f ${DISTCCD_PIDFILE} &>/dev/null + + local args +#ifdef AVAHI + [ ${DISTCCD_AVAHI} = yes ] && args="--zeroconf" +#endif + + ebegin "Starting distccd" + chown distcc `dirname ${DISTCCD_PIDFILE}` &>/dev/null + TMPDIR="${TMPDIR}" \ + PATH="$(gcc-config --get-bin-path):${PATH}" \ + /sbin/start-stop-daemon --start --quiet --startas ${DISTCCD_EXEC} \ + --pidfile ${DISTCCD_PIDFILE} -- \ + --pid-file ${DISTCCD_PIDFILE} -N ${DISTCCD_NICE} --user distcc \ + ${args} ${DISTCCD_OPTS} + + eend $? +} + +stop() { + ebegin "Stopping distccd" + start-stop-daemon --stop --quiet --pidfile "${DISTCCD_PIDFILE}" + rm -f "${DISTCCD_PIDFILE}" + eend $? +} + diff --git a/sys-devel/distcc/files/digest-distcc-2.18.3-r11 b/sys-devel/distcc/files/digest-distcc-2.18.3-r11 new file mode 100644 index 000000000000..9a3c09aebb4a --- /dev/null +++ b/sys-devel/distcc/files/digest-distcc-2.18.3-r11 @@ -0,0 +1,6 @@ +MD5 8310f09bef99fe272faec803e5931dd9 distcc-2.18-avahi.patch.bz2 9447 +RMD160 eaf358bc417566bb8cf7ea005ce853df880f4e49 distcc-2.18-avahi.patch.bz2 9447 +SHA256 1c6fb40b57385870b267d3ce4285ba3fa32e57a335cfcd3b96f4f9a36645a97f distcc-2.18-avahi.patch.bz2 9447 +MD5 0d6b80a1efc3a3d816c4f4175f63eaa2 distcc-2.18.3.tar.bz2 341601 +RMD160 c7ac6f3e161dccf39b841b57a3328b4208d28c2d distcc-2.18.3.tar.bz2 341601 +SHA256 6500f1bc2a30b1f044ebed79c6ce15457d1712263e65f0db7d6046af262ba434 distcc-2.18.3.tar.bz2 341601 diff --git a/sys-devel/distcc/files/distcc-avahi-configure.patch b/sys-devel/distcc/files/distcc-avahi-configure.patch new file mode 100644 index 000000000000..9f42764f2845 --- /dev/null +++ b/sys-devel/distcc/files/distcc-avahi-configure.patch @@ -0,0 +1,29 @@ +diff -ur distcc-2.18.3.old/configure.ac distcc-2.18.3/configure.ac +--- distcc-2.18.3.old/configure.ac 2008-01-01 21:08:02.000000000 +0200 ++++ distcc-2.18.3/configure.ac 2008-01-01 21:09:56.000000000 +0200 +@@ -387,14 +387,18 @@ + [#include <sys/socket.h>]) + + dnl check for avahi ++AC_ARG_ENABLE(avahi, AC_HELP_STRING([--enable-avahi], [enable avahi support], [], [enable_avahi=auto])) ++ZEROCONF_DISTCC_OBJS="" ++ZEROCONF_DISTCCD_OBJS="" + PKG_CHECK_MODULES(AVAHI, [avahi-client >= 0.6.5], +-[AC_DEFINE(HAVE_AVAHI, 1, [defined if Avahi is available]) +-CFLAGS="$CFLAGS $AVAHI_CFLAGS" +-LIBS="$LIBS $AVAHI_LIBS" +-ZEROCONF_DISTCC_OBJS="src/zeroconf.o src/gcc-id.o" +-ZEROCONF_DISTCCD_OBJS="src/zeroconf-reg.o src/gcc-id.o"], +-[ZEROCONF_DISTCC_OBJS="" +-ZEROCONF_DISTCCD_OBJS=""]) ++[if test x"${enable_avahi}" = x"yes" || test x"${enable_avahi}" = x"auto"; then ++ AC_DEFINE(HAVE_AVAHI, 1, [defined if Avahi is available]) ++ CFLAGS="$CFLAGS $AVAHI_CFLAGS" ++ LIBS="$LIBS $AVAHI_LIBS" ++ ZEROCONF_DISTCC_OBJS="src/zeroconf.o src/gcc-id.o" ++ ZEROCONF_DISTCCD_OBJS="src/zeroconf-reg.o src/gcc-id.o" ++fi], ++[test x"${enable_avahi}" = x"yes" && AC_MSG_ERROR(avahi support needs avahi-client >= 0.6.5 installed)]) + AC_SUBST(ZEROCONF_DISTCC_OBJS) + AC_SUBST(ZEROCONF_DISTCCD_OBJS) + |