1 |
matsuu 08/10/25 06:39:17 |
2 |
|
3 |
Modified: init distcc-config |
4 |
Added: xinetd |
5 |
Log: |
6 |
Added xinetd USE flag. Removed '--install' function from gcc-config and Added doenvd to src_install. Fixed #216950. |
7 |
(Portage version: 2.2_rc12/cvs/Linux 2.6.27-gentoo x86_64) |
8 |
|
9 |
Revision Changes Path |
10 |
1.2 sys-devel/distcc/files/3.0/init |
11 |
|
12 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-devel/distcc/files/3.0/init?rev=1.2&view=markup |
13 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-devel/distcc/files/3.0/init?rev=1.2&content-type=text/plain |
14 |
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-devel/distcc/files/3.0/init?r1=1.1&r2=1.2 |
15 |
|
16 |
Index: init |
17 |
=================================================================== |
18 |
RCS file: /var/cvsroot/gentoo-x86/sys-devel/distcc/files/3.0/init,v |
19 |
retrieving revision 1.1 |
20 |
retrieving revision 1.2 |
21 |
diff -u -r1.1 -r1.2 |
22 |
--- init 18 Oct 2008 16:21:59 -0000 1.1 |
23 |
+++ init 25 Oct 2008 06:39:17 -0000 1.2 |
24 |
@@ -1,7 +1,7 @@ |
25 |
#!/sbin/runscript |
26 |
# Copyright 1999-2008 Gentoo Foundation |
27 |
# Distributed under the terms of the GNU General Public License v2 |
28 |
-# $Header: /var/cvsroot/gentoo-x86/sys-devel/distcc/files/3.0/init,v 1.1 2008/10/18 16:21:59 matsuu Exp $ |
29 |
+# $Header: /var/cvsroot/gentoo-x86/sys-devel/distcc/files/3.0/init,v 1.2 2008/10/25 06:39:17 matsuu Exp $ |
30 |
|
31 |
depend() { |
32 |
need net |
33 |
@@ -12,7 +12,8 @@ |
34 |
ebegin "Starting distccd" |
35 |
PATH="$(gcc-config --get-bin-path):${PATH}" \ |
36 |
start-stop-daemon --start --quiet --exec "${DISTCCD_EXEC}" -- \ |
37 |
- --pid-file "${DISTCCD_PIDFILE}" --user distcc ${DISTCCD_OPTS} |
38 |
+ --daemon --pid-file "${DISTCCD_PIDFILE}" --user distcc \ |
39 |
+ ${DISTCCD_OPTS} |
40 |
eend $? |
41 |
} |
42 |
|
43 |
|
44 |
|
45 |
|
46 |
1.2 sys-devel/distcc/files/3.0/distcc-config |
47 |
|
48 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-devel/distcc/files/3.0/distcc-config?rev=1.2&view=markup |
49 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-devel/distcc/files/3.0/distcc-config?rev=1.2&content-type=text/plain |
50 |
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-devel/distcc/files/3.0/distcc-config?r1=1.1&r2=1.2 |
51 |
|
52 |
Index: distcc-config |
53 |
=================================================================== |
54 |
RCS file: /var/cvsroot/gentoo-x86/sys-devel/distcc/files/3.0/distcc-config,v |
55 |
retrieving revision 1.1 |
56 |
retrieving revision 1.2 |
57 |
diff -u -r1.1 -r1.2 |
58 |
--- distcc-config 18 Oct 2008 16:21:59 -0000 1.1 |
59 |
+++ distcc-config 25 Oct 2008 06:39:17 -0000 1.2 |
60 |
@@ -1,7 +1,7 @@ |
61 |
#!/usr/bin/env python |
62 |
# Copyright 1999-2004 Gentoo Foundation |
63 |
# Distributed under the terms of the GNU General Public License v2 |
64 |
-# $Header: /var/cvsroot/gentoo-x86/sys-devel/distcc/files/3.0/distcc-config,v 1.1 2008/10/18 16:21:59 matsuu Exp $ |
65 |
+# $Header: /var/cvsroot/gentoo-x86/sys-devel/distcc/files/3.0/distcc-config,v 1.2 2008/10/25 06:39:17 matsuu Exp $ |
66 |
|
67 |
import os, re, signal, sys, commands, pwd |
68 |
from string import rstrip |
69 |
@@ -13,7 +13,6 @@ |
70 |
'--set-verbose', |
71 |
'--get-log', |
72 |
'--set-log', |
73 |
- '--install', |
74 |
'--help', |
75 |
'--get-env', |
76 |
'--set-env' |
77 |
@@ -50,7 +49,7 @@ |
78 |
distcc_env[i] = var+'="'+value+'"\n' |
79 |
distcc_env_new.write(distcc_env[i]) |
80 |
#print 'Set',var,'to:',value |
81 |
- os.popen('/usr/sbin/env-update') |
82 |
+ os.system('/usr/sbin/env-update') |
83 |
print 'If you want to use these new settings in an existing shell,' |
84 |
print 'you need to "source /etc/profile" to get the changes.' |
85 |
|
86 |
@@ -62,23 +61,6 @@ |
87 |
else: |
88 |
print var,'not set.' |
89 |
|
90 |
-def permissions(path,user,group): |
91 |
- for file in os.listdir(path): |
92 |
- #print 'Configuring',path+file+'...' |
93 |
- os.chown(path+file,user,group) |
94 |
- |
95 |
-def installlinks(chost=''): |
96 |
- for file in ['gcc', 'cc', 'c++', 'g++']: |
97 |
- path = '/usr/lib/distcc/bin/' |
98 |
- if not chost == '': |
99 |
- file = chost+'-'+file |
100 |
- if os.path.exists('/usr/bin/'+file): |
101 |
- #print 'Creating',path+file,'symlink...' |
102 |
- if not os.path.exists(path+file): |
103 |
- os.symlink('/usr/bin/distcc',path+file) |
104 |
- #else: |
105 |
- # print 'Already exists. Skipping...' |
106 |
- |
107 |
def createdistccdir(dir): |
108 |
if not os.path.exists(dir): |
109 |
os.mkdir(dir) |
110 |
@@ -120,30 +102,6 @@ |
111 |
readenv('DISTCC_LOG') |
112 |
elif '--set-log' in tmpcmdline: |
113 |
writeenv('DISTCC_LOG',tmpcmdline[1]) |
114 |
-elif '--install' in tmpcmdline: |
115 |
- isroot() |
116 |
- print 'Creating',envfile+'...' |
117 |
- distcc_env = open(envfile, 'w') |
118 |
- distcc_env.write('# This file is managed by distcc-config; use it to change these settings.\n') |
119 |
- distcc_env.write('DISTCC_LOG=""\n') |
120 |
- distcc_env.write('DCCC_PATH="/usr/lib/distcc/bin"\n') |
121 |
- distcc_env.write('DISTCC_VERBOSE="0"\n') |
122 |
- |
123 |
- if os.WEXITSTATUS(commands.getstatusoutput('/usr/sbin/useradd -u 240 -g daemon -s /bin/false -d /dev/null -c "distccd" distcc')[0]) == 9: |
124 |
- os.WEXITSTATUS(commands.getstatusoutput('/usr/sbin/usermod -g daemon -s /bin/false -d /dev/null -c "distccd" distcc')[0]) |
125 |
- |
126 |
- foobar = pwd.getpwnam('distcc') |
127 |
- user = foobar[2] |
128 |
- group = foobar[3] |
129 |
- |
130 |
- makeconf = open('/etc/make.conf', 'r').read() |
131 |
- chost = re.compile('CHOST="(.*)"').search(makeconf).group(1) |
132 |
- print 'Creating symlinks...' |
133 |
- installlinks() |
134 |
- installlinks(chost) |
135 |
- |
136 |
- print 'Checking permissions...' |
137 |
- permissions('/var/run/distccd/',user,group) |
138 |
elif '--get-env' in tmpcmdline: |
139 |
if len(tmpcmdline) == 1: |
140 |
print rstrip(open(envfile, 'r').read()) |
141 |
|
142 |
|
143 |
|
144 |
1.1 sys-devel/distcc/files/3.0/xinetd |
145 |
|
146 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-devel/distcc/files/3.0/xinetd?rev=1.1&view=markup |
147 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-devel/distcc/files/3.0/xinetd?rev=1.1&content-type=text/plain |
148 |
|
149 |
Index: xinetd |
150 |
=================================================================== |
151 |
# default: off |
152 |
# description: distccd serves C/C++ compilation requests from distcc clients. |
153 |
# WARNING: This service should ONLY be used on trusted networks. |
154 |
|
155 |
# xinetd service description for distcc, contributed by akpm, updated |
156 |
# by mbp. |
157 |
|
158 |
# To use this, just check the parameters below and copy this file into |
159 |
# /etc/xinet.d/distcc, or the appropriate location for your system, |
160 |
# and then restart xinetd. You should also create a 'distcc' user. |
161 |
|
162 |
# ===> Note that running from inetd is generally NOT recommended for |
163 |
# distcc. distccd should give better performance when it can run as a |
164 |
# standalone daemon and regulate its own load. |
165 |
|
166 |
service distcc |
167 |
{ |
168 |
disable = yes |
169 |
socket_type = stream |
170 |
wait = no |
171 |
user = distcc |
172 |
server = /usr/bin/distccd |
173 |
server_args = --inetd |
174 |
|
175 |
# This makes xinetd cope if there is no service listed in |
176 |
# /etc/services |
177 |
type = UNLISTED |
178 |
} |