summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLisa M. Seelye <lisa@gentoo.org>2004-08-22 19:14:10 +0000
committerLisa M. Seelye <lisa@gentoo.org>2004-08-22 19:14:10 +0000
commit7ff048df91ce965785b7506b06101b3e81756ad1 (patch)
treeafbd146ecd2506ac22de931ffbea52a91c7fe26a /sys-devel/distcc
parentStable on alpha. (diff)
downloadhistorical-7ff048df91ce965785b7506b06101b3e81756ad1.tar.gz
historical-7ff048df91ce965785b7506b06101b3e81756ad1.tar.bz2
historical-7ff048df91ce965785b7506b06101b3e81756ad1.zip
Adding a patch for 2.17 to enable ipv6, updating the init and conf scripts. also set the distcc-config script to try and use userid 240.
Diffstat (limited to 'sys-devel/distcc')
-rw-r--r--sys-devel/distcc/ChangeLog10
-rw-r--r--sys-devel/distcc/Manifest10
-rw-r--r--sys-devel/distcc/distcc-2.17-r1.ebuild159
-rw-r--r--sys-devel/distcc/files/2.17/2.17-ipv6-fix.diff.gzbin0 -> 237 bytes
-rw-r--r--sys-devel/distcc/files/2.17/conf42
-rw-r--r--sys-devel/distcc/files/2.17/distcc-config165
-rw-r--r--sys-devel/distcc/files/2.17/init30
-rw-r--r--sys-devel/distcc/files/digest-distcc-2.17-r11
8 files changed, 414 insertions, 3 deletions
diff --git a/sys-devel/distcc/ChangeLog b/sys-devel/distcc/ChangeLog
index fb5bad61614d..21c3f25d4958 100644
--- a/sys-devel/distcc/ChangeLog
+++ b/sys-devel/distcc/ChangeLog
@@ -1,6 +1,14 @@
# ChangeLog for sys-devel/distcc
# Copyright 2000-2004 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-devel/distcc/ChangeLog,v 1.111 2004/08/21 01:13:13 lisa Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-devel/distcc/ChangeLog,v 1.112 2004/08/22 19:14:09 lisa Exp $
+
+*distcc-2.17-r1 (22 Aug 2004)
+
+ 22 Aug 2004; Lisa Seelye <lisa@gentoo.org>
+ +files/2.17/2.17-ipv6-fix.diff.gz, +files/2.17/conf,
+ +files/2.17/distcc-config, +files/2.17/init, +distcc-2.17-r1.ebuild:
+ Adding a patch for 2.17 to enable ipv6, updating the init and conf scripts.
+ also set the distcc-config script to try and use userid 240.
20 Aug 2004; Lisa Seelye <lisa@gentoo.org> distcc-2.17.ebuild:
<@SpanKY> make the first line 'ipv6 does not work with distcc-2.17' ?
diff --git a/sys-devel/distcc/Manifest b/sys-devel/distcc/Manifest
index 5767925bd11e..277923fe9bef 100644
--- a/sys-devel/distcc/Manifest
+++ b/sys-devel/distcc/Manifest
@@ -1,15 +1,21 @@
-MD5 8688cc7288b5cbd47ac28cff3af70c5a ChangeLog 20235
+MD5 551289c0161c3fee3254f73374b7f8f3 ChangeLog 20579
MD5 e410d067ffa3099f48c975b64dc98ec8 distcc-2.12.1-r1.ebuild 4627
MD5 26994a05c40e35fed4942021cceb6e98 distcc-2.13-r1.ebuild 4695
MD5 1e3e87d6fe39c6d6bd8e6002b9b0ec27 distcc-2.14.ebuild 4816
MD5 a78c111d15e1063661ef79429404490d distcc-2.16.ebuild 4886
-MD5 48a7e545dde0dae10a5a6af1a39411ce distcc-2.17.ebuild 5071
MD5 70619e7eb5fa4fd0aa4f3588579cd50d metadata.xml 443
+MD5 60de017daacc5265d673d671b1519005 distcc-2.17-r1.ebuild 4972
+MD5 48a7e545dde0dae10a5a6af1a39411ce distcc-2.17.ebuild 5071
MD5 9ca407ce154707a1f27485523adf943c files/digest-distcc-2.12.1-r1 66
MD5 6ab90bfeafe27c0d276eb8b6f1257560 files/digest-distcc-2.13-r1 64
MD5 47a8df000e00ce5f8bff08c9342bdae4 files/digest-distcc-2.14 64
MD5 c462167d99c154e9f8b9f94022ed2a71 files/digest-distcc-2.16 64
MD5 af5f3983a736bd552e83d92ac9955a03 files/digest-distcc-2.17 64
+MD5 af5f3983a736bd552e83d92ac9955a03 files/digest-distcc-2.17-r1 64
+MD5 2f83451f527f3c2c7739d4535f1fb1b3 files/2.17/conf 1317
+MD5 1161999a5d25185f95a8c284bd7307d1 files/2.17/init 733
+MD5 a053c2281c30835b1025f307b09b78ae files/2.17/2.17-ipv6-fix.diff.gz 237
+MD5 4d84dbf5df40f1df02f24244bb890b41 files/2.17/distcc-config 4876
MD5 0c66fbdfd3c7ad0ae07bc17bbce9b5e1 files/2.11.1p/conf 551
MD5 0f86be5afa04088831e049957f87582a files/2.11.1p/init 642
MD5 d4ca35b391ec7d05f6bc040e333370d2 files/2.11.1p/distcc-config 4877
diff --git a/sys-devel/distcc/distcc-2.17-r1.ebuild b/sys-devel/distcc/distcc-2.17-r1.ebuild
new file mode 100644
index 000000000000..64b49d44cbdc
--- /dev/null
+++ b/sys-devel/distcc/distcc-2.17-r1.ebuild
@@ -0,0 +1,159 @@
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-devel/distcc/distcc-2.17-r1.ebuild,v 1.1 2004/08/22 19:14:09 lisa 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 eutils gcc flag-o-matic gnuconfig
+
+PATCHLEVEL="2.17"
+
+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"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~x86 ~ppc ~sparc ~mips ~alpha ~arm ~hppa ~ia64 ~amd64 ~s390"
+# ATTN s390 MAINTANER: if you bump this stable on s390 please remove 2.14 from cvs -lisa
+# 2004-07-08
+
+
+IUSE="gnome gtk selinux ipv6"
+
+DEPEND=">=sys-apps/portage-2.0.49-r6
+ >=sys-devel/gcc-config-1.3.1
+ sys-apps/shadow
+ dev-util/pkgconfig"
+RDEPEND="
+ !arm? ( !mips? ( !s390? (
+ 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 )"
+
+src_unpack() {
+ unpack ${A}
+ cd ${S}
+ epatch ${FILESDIR}/${PATCHLEVEL}/2.17-ipv6-fix.diff.gz
+ gnuconfig_update
+}
+
+src_compile() {
+ local myconf="--with-included-popt "
+ #Here we use the built in parse-options package. saves a dependancy
+
+ #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 && ! use mips && myconf="${myconf} --with-gtk"
+ use gtk && use gnome && ! use mips && myconf="${myconf} --with-gnome"
+ use mips && use gtk || use gnome && ewarn "X support for Mips has been disabled."
+ #Above, mips is excluded due to version issues. 2004-02-20
+
+ [ `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 "
+ sleep 4s
+ fi
+
+ econf ${myconf} || die "econf ${myconf} failed"
+ emake || die "emake failed"
+}
+
+src_install() {
+ make DESTDIR="${D%/}" install
+
+ insinto /usr/share/doc/${PN}
+ doins "${S}/survey.txt"
+
+ exeinto /usr/bin
+ doexe "${FILESDIR}/${PATCHLEVEL}/distcc-config"
+
+ insinto /etc/conf.d
+ newins "${FILESDIR}/${PATCHLEVEL}/conf" distccd
+
+ exeinto /etc/init.d
+ newexe "${FILESDIR}/${PATCHLEVEL}/init" distccd
+
+ # 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
+}
+
+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() {
+ # handle DISTCC_HOSTS upgrade better
+ local ENVFILE
+ ENVFILE="${ROOT}etc/env.d/02distcc"
+ [ ! -f "${ENVFILE}" ] && \
+ ENVFILE="${ROOT}etc/env.d/04distcc"
+ if [ -f "${ENVFILE}" ]
+ then
+ # save hosts to new file
+ ROOT="${ROOT}"
+ HOSTS=$(egrep '^DISTCC_HOSTS' "${ENVFILE}" | sed 's,[^=]*=,,')
+ [ ${HOSTS} ] && ${ROOT}usr/bin/distcc-config --set-hosts ${HOSTS}
+ # now remove from the file
+ grep -v 'DISTCC_HOSTS' "${ENVFILE}" > "${ENVFILE}.new"
+ mv "${ENVFILE}.new" "${ENVFILE}"
+ fi
+
+ 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"
+ ewarn "As of distcc-2.11, the only thing you have to do to configure distcc"
+ ewarn "is to set your hosts (see the Guide, above) and to add distcc to"
+ ewarn "the FEATURES line in /etc/make.conf"
+ ewarn "This version includes a new distcc-config. If you encounter problems with it,"
+ ewarn "please report them to our Bugzilla at bugs.gentoo.org"
+ 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 "Don't forget to run etc-update and restart distccd!"
+ sleep 5s
+}
diff --git a/sys-devel/distcc/files/2.17/2.17-ipv6-fix.diff.gz b/sys-devel/distcc/files/2.17/2.17-ipv6-fix.diff.gz
new file mode 100644
index 000000000000..26d165f8eb8b
--- /dev/null
+++ b/sys-devel/distcc/files/2.17/2.17-ipv6-fix.diff.gz
Binary files differ
diff --git a/sys-devel/distcc/files/2.17/conf b/sys-devel/distcc/files/2.17/conf
new file mode 100644
index 000000000000..54790beca4de
--- /dev/null
+++ b/sys-devel/distcc/files/2.17/conf
@@ -0,0 +1,42 @@
+# Copyright 2003 Gentoo Technologies, Inc
+# $Header: /var/cvsroot/gentoo-x86/sys-devel/distcc/files/2.17/conf,v 1.1 2004/08/22 19:14:10 lisa Exp $
+# distccd configuration file
+
+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 --allow or --listen options
+# for increased security. You can specify an IP to permit connections
+# from or a CIDR mask
+# --listen accepts only a single IP
+# 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 --listen 192.168.0.2"
+
+# set this for niceness
+# Default is 15
+DISTCCD_NICE="15"
diff --git a/sys-devel/distcc/files/2.17/distcc-config b/sys-devel/distcc/files/2.17/distcc-config
new file mode 100644
index 000000000000..e5f059e83bcb
--- /dev/null
+++ b/sys-devel/distcc/files/2.17/distcc-config
@@ -0,0 +1,165 @@
+#!/usr/bin/env python
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-devel/distcc/files/2.17/distcc-config,v 1.1 2004/08/22 19:14:10 lisa Exp $
+
+import os, re, signal, sys, commands, pwd
+from string import rstrip
+
+options=[
+ '--get-hosts',
+ '--set-hosts',
+ '--get-verbose',
+ '--set-verbose',
+ '--get-log',
+ '--set-log',
+ '--install',
+ '--help',
+ '--get-env',
+ '--set-env'
+]
+
+tmpcmdline=sys.argv[1:]
+cmdline=[]
+envfile = '/etc/env.d/02distcc'
+
+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 '!!!',sys.argv[:1][0],tmpcmdline[0],'must be run as root'
+ 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',var,'to:',value
+ os.popen('/usr/sbin/env-update')
+ 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 permissions(path,user,group):
+ for file in os.listdir(path):
+ #print 'Configuring',path+file+'...'
+ os.chown(path+file,user,group)
+
+def installlinks(chost=''):
+ for file in ['gcc', 'cc', 'c++', 'g++']:
+ path = '/usr/lib/distcc/bin/'
+ if not chost == '':
+ file = chost+'-'+file
+ if os.path.exists('/usr/bin/'+file):
+ #print 'Creating',path+file,'symlink...'
+ if not os.path.exists(path+file):
+ os.symlink('/usr/bin/distcc',path+file)
+ #else:
+ # print 'Already exists. Skipping...'
+
+def createdistccdir(dir):
+ if not os.path.exists(dir):
+ os.mkdir(dir)
+ os.chmod(dir, 1777)
+
+for x in tmpcmdline:
+ if not x:
+ continue
+ if x[0:2]=="--":
+ if not x in options:
+ print "!!! Error:",x,"is an invalid option."
+ sys.exit(1)
+ else:
+ cmdline = x
+
+if '--get-hosts' in tmpcmdline:
+ HOSTS_ENV = os.environ.get('DISTCC_HOSTS')
+ HOSTS_HOME = os.environ.get('HOME')+'/hosts'
+ if HOSTS_ENV:
+ print HOSTS_ENV
+ elif os.path.exists(HOSTS_HOME) and os.path.getsize(HOSTS_HOME) != 0:
+ print HOSTS_HOME
+ elif os.path.exists('/etc/distcc/hosts'):
+ print rstrip(open('/etc/distcc/hosts', 'r').read())
+ else:
+ print 'No configuration file found. Setup your hosts with --set-hosts.'
+elif '--set-hosts' in tmpcmdline:
+ if isroot(1):
+ PATH = '/etc/distcc'
+ else:
+ PATH = os.environ.get('HOME')
+ createdistccdir(PATH)
+ open(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 '--install' in tmpcmdline:
+ isroot()
+ print 'Creating',envfile+'...'
+ distcc_env = open(envfile, 'w')
+ distcc_env.write('# This file is managed by distcc-config; use it to change these settings.\n')
+ distcc_env.write('DISTCC_LOG=""\n')
+ distcc_env.write('DCCC_PATH="/usr/lib/distcc/bin"\n')
+ distcc_env.write('DISTCC_VERBOSE="0"\n')
+
+ if os.WEXITSTATUS(commands.getstatusoutput('/usr/sbin/useradd -u 240 -g daemon -s /bin/false -d /dev/null -c "distccd" distcc')[0]) == 9:
+ os.WEXITSTATUS(commands.getstatusoutput('/usr/sbin/usermod -g daemon -s /bin/false -d /dev/null -c "distccd" distcc')[0])
+
+ foobar = pwd.getpwnam('distcc')
+ user = foobar[2]
+ group = foobar[3]
+
+ makeconf = open('/etc/make.conf', 'r').read()
+ chost = re.compile('CHOST="(.*)"').search(makeconf).group(1)
+ print 'Creating symlinks...'
+ installlinks()
+ installlinks(chost)
+
+ print 'Checking permissions...'
+ permissions('/usr/lib/distcc/bin/',user,group)
+ permissions('/var/run/distccd/',user,group)
+elif '--get-env' in tmpcmdline:
+ if len(tmpcmdline) == 1:
+ print rstrip(open(envfile, 'r').read())
+ 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:
+ print 'Usage: /usr/bin/distcc-config --set-hosts DISTCC_HOSTS | --get-hosts'
+ print ' /usr/bin/distcc-config --set-verbose { 0 | 1 } | --get-verbose'
+ print ' /usr/bin/distcc-config --set-log FILE | --get-log'
+ print ' /usr/bin/distcc-config --set-env VARIABLE VALUE | --get-env [VARIABLE]'
diff --git a/sys-devel/distcc/files/2.17/init b/sys-devel/distcc/files/2.17/init
new file mode 100644
index 000000000000..cddadf345a80
--- /dev/null
+++ b/sys-devel/distcc/files/2.17/init
@@ -0,0 +1,30 @@
+#!/sbin/runscript
+# $Header: /var/cvsroot/gentoo-x86/sys-devel/distcc/files/2.17/init,v 1.1 2004/08/22 19:14:10 lisa Exp $
+
+depend() {
+ need net
+ use ypbind
+}
+
+start() {
+ [ -e "${DISTCCD_PIDFILE}" ] && rm -f ${DISTCCD_PIDFILE} &>/dev/null
+
+ 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 \
+ ${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.17-r1 b/sys-devel/distcc/files/digest-distcc-2.17-r1
new file mode 100644
index 000000000000..26143c9d7cf5
--- /dev/null
+++ b/sys-devel/distcc/files/digest-distcc-2.17-r1
@@ -0,0 +1 @@
+MD5 8ac5c032cde68c525afe9f53eae5cbf7 distcc-2.17.tar.bz2 339527