ports/185977: [patch] devel/distcc: add rc option to set DISTCCD_PATH
David Shane Holden
dpejesh at yahoo.com
Wed Jan 22 00:20:01 UTC 2014
>Number: 185977
>Category: ports
>Synopsis: [patch] devel/distcc: add rc option to set DISTCCD_PATH
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: change-request
>Submitter-Id: current-users
>Arrival-Date: Wed Jan 22 00:20:01 UTC 2014
>Closed-Date:
>Last-Modified:
>Originator: David Shane Holden
>Release: 10.0-RELEASE
>Organization:
>Environment:
FreeBSD i7x 10.0-RELEASE FreeBSD 10.0-RELEASE #0 r260789: Thu Jan 16 22:34:59 UTC 2014 root at snap.freebsd.org:/usr/obj/usr/src/sys/GENERIC amd64
>Description:
When trying to use gcc with distcc, I found that the remote distccd process couldn't find it and failed because by default it was searching the base system path. This patch allows you to set the DISTCCD_PATH environment variable which is used instead of PATH when it searches for compilers.
eg.
distccd_enable="YES"
distccd_path="/usr/bin:/usr/local/bin"
This allows distccd to use compilers installed from ports in /usr/local/bin as well as clang from /usr/bin.
>How-To-Repeat:
>Fix:
Patch attached with submission follows:
diff --git a/devel/distcc/files/distccd.in b/devel/distcc/files/distccd.in
index c9b9d4a..6d63291 100644
--- a/devel/distcc/files/distccd.in
+++ b/devel/distcc/files/distccd.in
@@ -10,7 +10,9 @@
#
# Add the following lines to /etc/rc.conf to enable distccd:
#
-# distccd_enable="YES"
+# distccd_enable (bool): Set to YES to enable distccd.
+# distccd_flags (str): Arguments passed to distccd.
+# distccd_path (str): DISTCCD_PATH environment value for distccd..
#
distccd_enable=${distccd_enable-"NO"}
@@ -32,6 +34,11 @@ distccd_precmd()
# distccd drops root privileges and then attempts to create the pid file
touch ${pidfile}
chown distcc:distcc ${pidfile}
+
+ if [ -n "${distccd_path}" ]
+ then
+ export DISTCCD_PATH="${distccd_path}"
+ fi
}
start_precmd="distccd_precmd"
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list