From owner-freebsd-ports-bugs@FreeBSD.ORG Tue Sep 19 13:40:27 2006 Return-Path: X-Original-To: freebsd-ports-bugs@hub.freebsd.org Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B997D16A417 for ; Tue, 19 Sep 2006 13:40:27 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5FE2E43D4C for ; Tue, 19 Sep 2006 13:40:27 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.4/8.13.4) with ESMTP id k8JDeRkv098265 for ; Tue, 19 Sep 2006 13:40:27 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.4/8.13.4/Submit) id k8JDeQIp098264; Tue, 19 Sep 2006 13:40:26 GMT (envelope-from gnats) Date: Tue, 19 Sep 2006 13:40:26 GMT Message-Id: <200609191340.k8JDeQIp098264@freefall.freebsd.org> To: freebsd-ports-bugs@FreeBSD.org From: Fabian Keil Cc: Subject: Re: ports/103358: Broken www/Privoxy rc.d script X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Fabian Keil List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Sep 2006 13:40:27 -0000 The following reply was made to PR ports/103358; it has been noted by GNATS. From: Fabian Keil To: bug-followup@FreeBSD.org Cc: Subject: Re: ports/103358: Broken www/Privoxy rc.d script Date: Tue, 19 Sep 2006 15:32:18 +0200 --Sig_NqcrOROpp+WyJ84ujLj7+zZ Content-Type: multipart/mixed; boundary="MP_k=Lthtxw4SEqvyJW8.lu4kG" --MP_k=Lthtxw4SEqvyJW8.lu4kG Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Richard, no harm done, there were other issues with the rc.d script that required fixing. Committer, please let me hijack this PR to update the port to revision 5. Most likely the last one before the next release. Changes: - Remove three year old (!) patch that disables libc_r functions. Thanks to Lars Eggert for providing feedback about the reason the patch was included. There should be no reason left to apply this patch, and if there were, I'd prefer to fix it upstream. - Change maintainer address - Replace rc.d script to leverage the rcNG framework some more. Added privoxy_config variable to give the user the change to use a file that doesn't get overwritten on updates. Thanks to Simon Wright for the suggestion. - Install standard.action by default. It's an official and useful Privoxy file, it doesn't cause any problems and there is no reason, not to install it. - Modified pkg-message to give some more hints. - Don't send Privoxy's console message to /dev/null. If everything works it's only one line, and in case of a problem you really want to know the reason. Thanks to Richard Bejtlich for reporting. Fabian --=20 http://www.fabiankeil.de/ --MP_k=Lthtxw4SEqvyJW8.lu4kG Content-Type: text/x-patch; name=privoxy-3.0.3_5.diff Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename=privoxy-3.0.3_5.diff diff -ruN privoxy.3.0.3_4/Makefile privoxy/Makefile --- privoxy.3.0.3_4/Makefile Wed Sep 13 11:41:17 2006 +++ privoxy/Makefile Tue Sep 19 14:05:25 2006 @@ -7,13 +7,13 @@ =20 PORTNAME=3D privoxy PORTVERSION=3D 3.0.3 -PORTREVISION=3D 4 +PORTREVISION=3D 5 CATEGORIES=3D www MASTER_SITES=3D ${MASTER_SITE_SOURCEFORGE} MASTER_SITE_SUBDIR=3D ijbswa DISTNAME=3D privoxy-${PORTVERSION}-stable-src =20 -MAINTAINER=3D freebsd-listen@fabiankeil.de +MAINTAINER=3D fk@fabiankeil.de COMMENT=3D Privoxy is a web proxy with advanced filtering capabilities =20 WRKSRC=3D ${WRKDIR}/privoxy-${PORTVERSION}-stable @@ -21,7 +21,7 @@ USE_GMAKE=3D yes USE_AUTOTOOLS=3D autoconf:253 =20 -USE_RC_SUBR=3D privoxy.sh +USE_RC_SUBR=3D privoxy SUB_FILES=3D pkg-message =20 MAKEFILE=3D GNUmakefile @@ -32,7 +32,6 @@ ${REINPLACE_CMD} \ -e 's,^\(confdir\) \.,\1 ${PREFIX}/etc/privoxy,' \ -e 's,^\(logdir\) \.,\1 /var/log/privoxy,' \ - -e 's,^\(actionsfile standard\),#\1,' \ -e 's,^\(actionsfile user\),#\1,' \ ${WRKSRC}/config =20 @@ -47,7 +46,7 @@ @${MKDIR} ${PREFIX}/etc/privoxy/templates @${INSTALL_PROGRAM} ${WRKSRC}/privoxy ${PREFIX}/sbin @${INSTALL_DATA} ${WRKSRC}/templates/[a-z]* ${PREFIX}/etc/privoxy/templat= es -.for file in config default.action default.filter trust +.for file in config default.action standard.action default.filter trust @${INSTALL_DATA} ${WRKSRC}/${file} ${PREFIX}/etc/privoxy .endfor @${INSTALL_MAN} ${WRKSRC}/privoxy.1 ${MANPREFIX}/man/man1 diff -ruN privoxy.3.0.3_4/files/patch-configure.in privoxy/files/patch-conf= igure.in --- privoxy.3.0.3_4/files/patch-configure.in Wed Sep 13 11:41:12 2006 +++ privoxy/files/patch-configure.in Thu Jan 1 01:00:00 1970 @@ -1,141 +0,0 @@ --- Patch by Lars Eggert USC Information Sciences Institute ---- configure.in.orig Fri Feb 20 17:15:20 2003 -+++ configure.in Fri Feb 20 17:15:51 2003 -@@ -726,137 +726,6 @@ - AC_SUBST(PTHREAD_ONLY) - - dnl =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --dnl Support for thread-safe versions of gethostbyaddr, gethostbyname, --dnl gmtime and localtime --dnl =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D -- --dnl Next line needed to find the gethost*_r functions on Solaris --AC_CHECK_LIB(nsl, gethostbyname) -- --AC_CHECK_FUNC(gethostbyaddr_r, [ -- AC_MSG_CHECKING([signature of gethostbyaddr_r]) -- AC_TRY_COMPILE([ --# include -- ], [ -- struct hostent *h, *hp; -- char *a, *b; -- int l, bl, t, e; -- (void) gethostbyaddr_r(a, l, t, h, b, bl, &hp, &e) -- ], [ -- AC_DEFINE(HAVE_GETHOSTBYADDR_R_8_ARGS) -- AC_MSG_RESULT([8 args]) -- ], [ -- AC_TRY_COMPILE([ --# include -- ], [ -- struct hostent *h; -- char *a, *b; -- int l, bl, t, e; -- (void) gethostbyaddr_r(a, l, t, h, b, bl, &e) -- ], [ -- AC_DEFINE(HAVE_GETHOSTBYADDR_R_7_ARGS) -- AC_MSG_RESULT([7 args]) -- ], [ -- AC_TRY_COMPILE([ --# include -- ], [ -- struct hostent_data *d; -- struct hostent *h; -- char a, -- int l, t; -- (void) gethostbyaddr_r(a, l, t, h, d) -- ], [ -- AC_DEFINE(HAVE_GETHOSTBYADDR_R_5_ARGS) -- AC_MSG_RESULT([5 args]) -- ], [ -- AC_MSG_RESULT(unrecognised) -- ]) -- ]) -- ]) --], [ -- AC_MSG_RESULT(no) --]) -- --AC_CHECK_FUNC(gethostbyname_r, [ -- AC_MSG_CHECKING([signature of gethostbyname_r]) -- AC_TRY_COMPILE([ --# include -- ], [ -- struct hostent *h, *r; -- char *n, *b; -- int bl, e; -- (void) gethostbyname_r(n, h, b, bl, &r, &e) -- ], [ -- AC_DEFINE(HAVE_GETHOSTBYNAME_R_6_ARGS) -- AC_MSG_RESULT([6 args]) -- ], [ -- AC_TRY_COMPILE([ --# include -- ], [ -- struct hostent *h; -- char *n, *b; -- int bl, e; -- (void) gethostbyname_r(n, h, b, bl, &e) -- ], [ -- AC_DEFINE(HAVE_GETHOSTBYNAME_R_5_ARGS) -- AC_MSG_RESULT([5 args]) -- ], [ -- AC_TRY_COMPILE([ --# include -- ], [ -- struct hostent_data *d; -- struct hostent *h; -- char *n, -- (void) gethostbyname_r(n, h, d) -- ], [ -- AC_DEFINE(HAVE_GETHOSTBYNAME_R_3_ARGS) -- AC_MSG_RESULT([3 args]) -- ], [ -- AC_MSG_RESULT(unrecognised) -- ]) -- ]) -- ]) --], [ -- AC_MSG_RESULT(no) --]) -- --AC_CHECK_FUNC(gmtime_r, [ -- AC_MSG_CHECKING([signature of gmtime_r]) -- AC_TRY_COMPILE([ --# include -- ], [ -- struct time *t; -- struct tm *tm; -- (void) gmtime_r(t, tm) -- ], [ -- AC_MSG_RESULT(ok) -- AC_DEFINE(HAVE_GMTIME_R) -- ], [ -- AC_MSG_RESULT(unrecognised) -- ]) --], [ -- AC_MSG_RESULT(no) --]) -- --AC_CHECK_FUNC(localtime_r, [ -- AC_MSG_CHECKING([signature of localtime_r]) -- AC_TRY_COMPILE([ --# include -- ], [ -- struct time *t; -- struct tm *tm; -- (void) localtime_r(t, tm) -- ], [ -- AC_MSG_RESULT(ok) -- AC_DEFINE(HAVE_LOCALTIME_R) -- ], [ -- AC_MSG_RESULT(unrecognised) -- ]) --], [ -- AC_MSG_RESULT(no) --]) -- --dnl =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D - dnl Solaris specific - dnl FIXME: Not tested on Solaris yet... - dnl ISFIXED: Have tested it on Solaris, but there are other ways to diff -ruN privoxy.3.0.3_4/files/pkg-message.in privoxy/files/pkg-message.in --- privoxy.3.0.3_4/files/pkg-message.in Wed Sep 13 11:41:12 2006 +++ privoxy/files/pkg-message.in Tue Sep 19 14:51:50 2006 @@ -1,10 +1,25 @@ *********************************************************** -** Before running privoxy you must modify the file ** +** Privoxy's default configuration file is: ** ** %%PREFIX%%/etc/privoxy/config ** +** It gets overwritten on (re)install, if you make your ** +** own modifications, you should rename it first. ** ** ** -** Start privoxy with: ** -** %%PREFIX%%/sbin/privoxy %%PREFIX%%/etc/privoxy/config ** +** To start Privoxy on boot, add: privoxy_enable=3D"YES" ** +** to /etc/rc.conf. If you changed the location of the ** +** configuration file, additionally add: ** +** privoxy_config=3D"%%PREFIX%%/etc/privoxy/your-config" ** ** ** -** For documentation see: ** =20 +** To start Privoxy manually, run: ** +** %%PREFIX%%/etc/rc.d/privoxy forcestart ** +** The script understands most of the commands listed ** +** in rc(8), it also contains a list of other rc ** +** variables you can use. ** +** ** +** If you installed Privoxy as package and are using the ** +** default configuration, you have to make sure the ** +** directories /var/log/privoxy and /var/run/privoxy ** +** exist and are owned by privoxy:privoxy. ** +** ** +** For documentation see: ** ** %%PREFIX%%/share/doc/privoxy-manual or 'man privoxy' ** *********************************************************** diff -ruN privoxy.3.0.3_4/files/privoxy.in privoxy/files/privoxy.in --- privoxy.3.0.3_4/files/privoxy.in Thu Jan 1 01:00:00 1970 +++ privoxy/files/privoxy.in Tue Sep 19 14:44:52 2006 @@ -0,0 +1,42 @@ +#!/bin/sh +# +# $FreeBSD:$ +# +# +# PROVIDE: privoxy +# REQUIRE: NETWORKING +# BEFORE: LOGIN +# +# This rc script understands the following variables +# which are read from /etc/rc.conf: +# +# privoxy_enable (bool): Set to "NO" by default. +# Set it to "YES" to enable Privoxy. +# privoxy_config (str): Privoxy's configuration file. Default is: +# %%PREFIX%%/etc/privoxy/config. +# privoxy_flags (str): List of additional Privoxy options you want +# to use. None set by default. +# privoxy_pidfile (str): Default is /var/run/privoxy/privoxy.pid. +# privoxy_user (str): Privoxy Daemon user. Default is privoxy. +# +# Usage: +# %%PREFIX%%/etc/rc.d/privoxy [fast|force|one](start|stop|restart|rcvar|st= atus|poll) + +. %%RC_SUBR%% + +name=3D"privoxy" +rcvar=3D${name}_enable +load_rc_config ${name} + +: ${privoxy_enable=3D"NO"} +: ${privoxy_config=3D"%%PREFIX%%/etc/privoxy/config"} +: ${privoxy_flags=3D""} +: ${privoxy_user=3D"privoxy"} +: ${privoxy_pidfile=3D"/var/run/privoxy/privoxy.pid"} + + +command=3D"%%PREFIX%%/sbin/privoxy" +command_args=3D"${privoxy_flags} --pidfile ${privoxy_pidfile} ${privoxy_co= nfig}" + +run_rc_command "$1" + diff -ruN privoxy.3.0.3_4/files/privoxy.sh.in privoxy/files/privoxy.sh.in --- privoxy.3.0.3_4/files/privoxy.sh.in Wed Sep 13 11:41:12 2006 +++ privoxy/files/privoxy.sh.in Thu Jan 1 01:00:00 1970 @@ -1,50 +0,0 @@ -#!/bin/sh -# -# - -# PROVIDE: privoxy -# REQUIRE: NETWORKING - -# -# DO NOT CHANGE THESE DEFAULT VALUES HERE -# SET THEM IN THE /etc/rc.conf FILE -# -privoxy_enable=3D${privoxy_enable-"NO"} -privoxy_flags=3D${privoxy_flags-""} -privoxy_pidfile=3D${privoxy_pidfile-"/var/run/privoxy/privoxy.pid"} - -. %%RC_SUBR%% - -name=3D"privoxy" -rcvar=3D`set_rcvar` -command=3D"%%PREFIX%%/sbin/privoxy" -stop_cmd=3D"privoxy_stop" -start_cmd=3D"privoxy_start" - -pidfile=3D"${privoxy_pidfile}" -configfile=3D%%PREFIX%%/etc/privoxy/config - -privoxy_start() -{ - if [ -f ${pidfile} ] ;then - echo "${name} is already running" - else - echo "Starting ${name}." - su -m privoxy -c "${command} ${privoxy_flags} ${configfile} --pid= file ${pidfile}" \ - 1>/dev/null 2>&1 - fi -} - -privoxy_stop() -{ - if [ ! -f ${pidfile} ] ;then - echo "${name} is not running" - else - kill -9 `cat ${pidfile}` - rm -f ${pidfile} - echo "${name} stopped" - fi -} - -load_rc_config $name -run_rc_command "$1" diff -ruN privoxy.3.0.3_4/pkg-plist privoxy/pkg-plist --- privoxy.3.0.3_4/pkg-plist Wed Sep 13 11:41:17 2006 +++ privoxy/pkg-plist Tue Sep 19 14:07:35 2006 @@ -1,6 +1,7 @@ sbin/privoxy etc/privoxy/config etc/privoxy/default.action +etc/privoxy/standard.action etc/privoxy/default.filter etc/privoxy/trust etc/privoxy/templates/blocked --MP_k=Lthtxw4SEqvyJW8.lu4kG-- --Sig_NqcrOROpp+WyJ84ujLj7+zZ Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (FreeBSD) iD8DBQFFD/FpBYqIVf93VJ0RAnTxAJ98OuzQgd5YOWXD5xFHzJzoTwbt2gCgyHDa BB/nmh7D72T52dTriQUDB7c= =yBHa -----END PGP SIGNATURE----- --Sig_NqcrOROpp+WyJ84ujLj7+zZ--