summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatsuu Takuto <matsuu@gentoo.org>2008-10-25 06:39:17 +0000
committerMatsuu Takuto <matsuu@gentoo.org>2008-10-25 06:39:17 +0000
commit27d2a1f6167c1a39d961dbe59d206c0f826818c5 (patch)
tree4687c0fb5762f2c68a97d3cfe2690da71dbda9bb /sys-devel/distcc/files
parentAutomated update of use.local.desc (diff)
downloadgentoo-2-27d2a1f6167c1a39d961dbe59d206c0f826818c5.tar.gz
gentoo-2-27d2a1f6167c1a39d961dbe59d206c0f826818c5.tar.bz2
gentoo-2-27d2a1f6167c1a39d961dbe59d206c0f826818c5.zip
Added xinetd USE flag. Removed '--install' function from gcc-config and Added doenvd to src_install. Fixed #216950.
(Portage version: 2.2_rc12/cvs/Linux 2.6.27-gentoo x86_64)
Diffstat (limited to 'sys-devel/distcc/files')
-rw-r--r--sys-devel/distcc/files/3.0/distcc-config46
-rwxr-xr-xsys-devel/distcc/files/3.0/init5
-rw-r--r--sys-devel/distcc/files/3.0/xinetd28
3 files changed, 33 insertions, 46 deletions
diff --git a/sys-devel/distcc/files/3.0/distcc-config b/sys-devel/distcc/files/3.0/distcc-config
index ae5424f95c13..c763c2169339 100644
--- a/sys-devel/distcc/files/3.0/distcc-config
+++ b/sys-devel/distcc/files/3.0/distcc-config
@@ -1,7 +1,7 @@
#!/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/3.0/distcc-config,v 1.1 2008/10/18 16:21:59 matsuu Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-devel/distcc/files/3.0/distcc-config,v 1.2 2008/10/25 06:39:17 matsuu Exp $
import os, re, signal, sys, commands, pwd
from string import rstrip
@@ -13,7 +13,6 @@ options=[
'--set-verbose',
'--get-log',
'--set-log',
- '--install',
'--help',
'--get-env',
'--set-env'
@@ -50,7 +49,7 @@ def writeenv(var,value):
distcc_env[i] = var+'="'+value+'"\n'
distcc_env_new.write(distcc_env[i])
#print 'Set',var,'to:',value
- os.popen('/usr/sbin/env-update')
+ os.system('/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.'
@@ -62,23 +61,6 @@ def readenv(var):
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)
@@ -120,30 +102,6 @@ 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('/var/run/distccd/',user,group)
elif '--get-env' in tmpcmdline:
if len(tmpcmdline) == 1:
print rstrip(open(envfile, 'r').read())
diff --git a/sys-devel/distcc/files/3.0/init b/sys-devel/distcc/files/3.0/init
index 0c1e62711286..6f7150f94af9 100755
--- a/sys-devel/distcc/files/3.0/init
+++ b/sys-devel/distcc/files/3.0/init
@@ -1,7 +1,7 @@
#!/sbin/runscript
# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-devel/distcc/files/3.0/init,v 1.1 2008/10/18 16:21:59 matsuu Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-devel/distcc/files/3.0/init,v 1.2 2008/10/25 06:39:17 matsuu Exp $
depend() {
need net
@@ -12,7 +12,8 @@ start() {
ebegin "Starting distccd"
PATH="$(gcc-config --get-bin-path):${PATH}" \
start-stop-daemon --start --quiet --exec "${DISTCCD_EXEC}" -- \
- --pid-file "${DISTCCD_PIDFILE}" --user distcc ${DISTCCD_OPTS}
+ --daemon --pid-file "${DISTCCD_PIDFILE}" --user distcc \
+ ${DISTCCD_OPTS}
eend $?
}
diff --git a/sys-devel/distcc/files/3.0/xinetd b/sys-devel/distcc/files/3.0/xinetd
new file mode 100644
index 000000000000..6554d7e59488
--- /dev/null
+++ b/sys-devel/distcc/files/3.0/xinetd
@@ -0,0 +1,28 @@
+# default: off
+# description: distccd serves C/C++ compilation requests from distcc clients.
+# WARNING: This service should ONLY be used on trusted networks.
+
+# xinetd service description for distcc, contributed by akpm, updated
+# by mbp.
+
+# To use this, just check the parameters below and copy this file into
+# /etc/xinet.d/distcc, or the appropriate location for your system,
+# and then restart xinetd. You should also create a 'distcc' user.
+
+# ===> Note that running from inetd is generally NOT recommended for
+# distcc. distccd should give better performance when it can run as a
+# standalone daemon and regulate its own load.
+
+service distcc
+{
+ disable = yes
+ socket_type = stream
+ wait = no
+ user = distcc
+ server = /usr/bin/distccd
+ server_args = --inetd
+
+ # This makes xinetd cope if there is no service listed in
+ # /etc/services
+ type = UNLISTED
+}