Bug 185977 - [patch] devel/distcc: add rc option to set DISTCCD_PATH
Summary: [patch] devel/distcc: add rc option to set DISTCCD_PATH
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Steven Kreuzer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-01-22 00:20 UTC by David Shane Holden
Modified: 2014-02-10 01:40 UTC (History)
0 users

See Also:


Attachments
file.diff (793 bytes, patch)
2014-01-22 00:20 UTC, David Shane Holden
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description David Shane Holden 2014-01-22 00:20:01 UTC
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.

Fix: Patch attached with submission follows:
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2014-01-22 00:20:09 UTC
Responsible Changed
From-To: freebsd-ports-bugs->skreuzer

Over to maintainer (via the GNATS Auto Assign Tool)
Comment 2 dfilter service freebsd_committer freebsd_triage 2014-02-10 01:39:32 UTC
Author: skreuzer
Date: Mon Feb 10 01:39:25 2014
New Revision: 343570
URL: http://svnweb.freebsd.org/changeset/ports/343570
QAT: https://qat.redports.org/buildarchive/r343570/

Log:
  Add rc option to set DISTCCD_PATH
  
  PR:		ports/185977
  Submitted by:	David Shane Holden <dpejesh@yahoo.com>

Modified:
  head/devel/distcc/files/distccd.in

Modified: head/devel/distcc/files/distccd.in
==============================================================================
--- head/devel/distcc/files/distccd.in	Mon Feb 10 01:35:05 2014	(r343569)
+++ head/devel/distcc/files/distccd.in	Mon Feb 10 01:39:25 2014	(r343570)
@@ -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,9 +34,13 @@ 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"
-
 load_rc_config ${name}
 run_rc_command "$1"
_______________________________________________
svn-ports-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-ports-all
To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
Comment 3 Steven Kreuzer freebsd_committer freebsd_triage 2014-02-10 01:40:12 UTC
State Changed
From-To: open->closed

Committed. Thanks!