summaryrefslogtreecommitdiffstats
path: root/devel/distcc/files
diff options
context:
space:
mode:
authorahze <ahze@df743ca5-7f9a-e211-a948-0013205c9059>2007-05-20 01:43:14 +0800
committerahze <ahze@df743ca5-7f9a-e211-a948-0013205c9059>2007-05-20 01:43:14 +0800
commit8c61ad0058b81bc04250124366935f2bff5e92b3 (patch)
treebe82d6c57af2b9a2ce105422ee5c5b0f86eb00ff /devel/distcc/files
parent69a552a09c69f93fa3f5ef12a823c746a2f594cd (diff)
downloadmarcuscom-ports-8c61ad0058b81bc04250124366935f2bff5e92b3.tar
marcuscom-ports-8c61ad0058b81bc04250124366935f2bff5e92b3.tar.gz
marcuscom-ports-8c61ad0058b81bc04250124366935f2bff5e92b3.tar.bz2
marcuscom-ports-8c61ad0058b81bc04250124366935f2bff5e92b3.tar.lz
marcuscom-ports-8c61ad0058b81bc04250124366935f2bff5e92b3.tar.xz
marcuscom-ports-8c61ad0058b81bc04250124366935f2bff5e92b3.tar.zst
marcuscom-ports-8c61ad0058b81bc04250124366935f2bff5e92b3.zip
- Add support for mDNS via avahi
to use: * run distccd with --zeroconf * set $DISTCC_HOSTS to "+zeroconf" git-svn-id: svn://creme-brulee.marcuscom.com/ports/trunk@8883 df743ca5-7f9a-e211-a948-0013205c9059
Diffstat (limited to 'devel/distcc/files')
-rw-r--r--devel/distcc/files/distccd.sh.in40
-rw-r--r--devel/distcc/files/patch-src-dparent.c.diff20
2 files changed, 60 insertions, 0 deletions
diff --git a/devel/distcc/files/distccd.sh.in b/devel/distcc/files/distccd.sh.in
new file mode 100644
index 000000000..3e56ec4da
--- /dev/null
+++ b/devel/distcc/files/distccd.sh.in
@@ -0,0 +1,40 @@
+#!/bin/sh
+#
+# $FreeBSD$
+# $MCom$
+
+# PROVIDE: distccd
+# REQUIRE: NETWORKING
+# KEYWORD: shutdown
+
+#
+# Add the following lines to /etc/rc.conf to enable distccd:
+#
+# distccd_enable="YES"
+#
+
+distccd_enable=${distccd_enable-"NO"}
+distccd_flags=${distccd_flags-"-a 127.0.0.0/8 --user distcc --daemon -P %%DISTCCD_PIDFILE%%"}
+
+. %%RC_SUBR%%
+
+name=distccd
+rcvar=`set_rcvar`
+
+command=%%PREFIX%%/sbin/${name}
+# extract pid file from distccd_flags (if any)
+pidfile="`echo ${distccd_flags} |sed -nE -e 's/^.*-P ([^ ]+).*$/\1/p'`"
+# set default value
+pidfile=${pidfile:-%%DISTCCD_PIDFILE%%}
+
+distccd_precmd()
+{
+ # distccd drops root privileges and then attempts to create the pid file
+ touch ${pidfile}
+ chown distcc:distcc ${pidfile}
+}
+
+start_precmd="distccd_precmd"
+
+load_rc_config ${name}
+run_rc_command "$1"
diff --git a/devel/distcc/files/patch-src-dparent.c.diff b/devel/distcc/files/patch-src-dparent.c.diff
new file mode 100644
index 000000000..c7eee8e77
--- /dev/null
+++ b/devel/distcc/files/patch-src-dparent.c.diff
@@ -0,0 +1,20 @@
+--- src/dparent.c.orig Sun Oct 24 08:05:48 2004
++++ src/dparent.c Fri Nov 4 17:35:09 2005
+@@ -285,6 +285,9 @@
+ **/
+ void dcc_remove_pid(void)
+ {
++ /* distcc user, we are running as, cannot delete files in /var/run
++ */
++#if 0
+ if (!arg_pid_file)
+ return;
+
+@@ -292,6 +295,7 @@
+ rs_log_warning("failed to remove pid file %s: %s",
+ arg_pid_file, strerror(errno));
+ }
++#endif
+ }
+
+