Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 22 Jan 2014 00:11:33 GMT
From:      David Shane Holden <dpejesh@yahoo.com>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/185977: [patch] devel/distcc: add rc option to set DISTCCD_PATH
Message-ID:  <201401220011.s0M0BXDr065468@oldred.freebsd.org>
Resent-Message-ID: <201401220020.s0M0K1rI058371@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>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@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:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201401220011.s0M0BXDr065468>