summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorgy Yakovlev <gyakovlev@gentoo.org>2018-12-08 22:17:53 -0800
committerGeorgy Yakovlev <gyakovlev@gentoo.org>2018-12-08 22:35:53 -0800
commitffd45776bb13d8ee7140fd5499413a7ffa873798 (patch)
treea10a89cf4fdddfef5004212d156c424abef6bd54 /sys-devel/distcc/files
parentapp-shells/mcfly: new package (diff)
downloadgentoo-ffd45776bb13d8ee7140fd5499413a7ffa873798.tar.gz
gentoo-ffd45776bb13d8ee7140fd5499413a7ffa873798.tar.bz2
gentoo-ffd45776bb13d8ee7140fd5499413a7ffa873798.zip
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@gentoo.org>
Diffstat (limited to 'sys-devel/distcc/files')
-rw-r--r--sys-devel/distcc/files/distccd.confd37
-rw-r--r--sys-devel/distcc/files/distccd.initd13
2 files changed, 50 insertions, 0 deletions
diff --git a/sys-devel/distcc/files/distccd.confd b/sys-devel/distcc/files/distccd.confd
new file mode 100644
index 000000000000..bc08d40777d3
--- /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 000000000000..7673ff2cf429
--- /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"