ports/186638: PATCH www/fcgiwrap: fix rc _flags
Johan Ström
johan at stromnet.se
Mon Feb 10 21:40:02 UTC 2014
>Number: 186638
>Category: ports
>Synopsis: PATCH www/fcgiwrap: fix rc _flags
>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: Mon Feb 10 21:40:00 UTC 2014
>Closed-Date:
>Last-Modified:
>Originator: Johan Ström
>Release: FreeBSD 8.4-RELEASE-p7 amd64
>Organization:
>Environment:
System: FreeBSD back-1.stromnet.se 8.4-RELEASE-p7 FreeBSD 8.4-RELEASE-p7 #0: Sat Jan 11 01:45:47 UTC 2014 root at amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC amd64
>Description:
rc script does not handle fcgiwrap_flags properly due to two bugs in fcgiwrap.in
The first one is a typo, fciwrap_flags instead of fcgiwrap_flags.
The second is the fact that ${name}_flags is passed to daemon rather than fcgiwrap.
From rc.subr (8.4 and 9.2 at least):
$command $rc_flags $command_args
The attached patch fixes both problems.
>How-To-Repeat:
Install fcgiwrap, set (for example) fcgiwrap_flags="-f" to enable stdout forwarding.
Start the script, and check ps, you will see it has not picked up the -f flag.
>Fix:
--- files/fcgiwrap.patch begins here ---
--- files/fcgiwrap.in.orig 2014-02-10 22:13:16.062270249 +0100
+++ files/fcgiwrap.in 2014-02-10 22:15:31.704481672 +0100
@@ -96,7 +96,7 @@
eval fcgiwrap_fib="\${fcgiwrap_${profile}_fib:-${fcgiwrap_fib}}"
eval fcgiwrap_user="\${fcgiwrap_${profile}_user:-${fcgiwrap_user}}"
eval fcgiwrap_socket="\${fcgiwrap_${profile}_socket:?}"
- eval fcgiwrap_flags="\${fcgiwrap_${profile}_flags:-${fciwrap_flags}}"
+ eval fcgiwrap_flags="\${fcgiwrap_${profile}_flags:-${fcgiwrap_flags}}"
else
echo "$0: extra argument ignored"
fi
@@ -117,6 +117,10 @@
fi
fi
-command_args="-f -p ${pidfile} ${procname} -s ${fcgiwrap_socket}"
+# run_rc_command would send ${name}_flags as parameters to $command (daemon)
+# This ensures they are actually passed to fcgiwrap instead.
+actual_fcgiwrap_flags="${fcgiwrap_flags}"
+fcgiwrap_flags=""
+command_args="-f -p ${pidfile} ${procname} -s ${fcgiwrap_socket} ${actual_fcgiwrap_flags}"
run_rc_command "$1"
--- files/fcgiwrap.patch ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list