Hi ports@,

this is a small update of privoxy to 3.0.17, plus an rc script making
use of the built-in chroot functionality. For this to work, you need to
change the home of _privoxy to /var/privoxy, the rc script will copy all
necessary files into the chroot.

Also, some additional files and scripts will be installed.

Already discussed with ajacoutot@. :)


Index: Makefile
===================================================================
RCS file: /cvs/ports/www/privoxy/Makefile,v
retrieving revision 1.21
diff -u -p -r1.21 Makefile
--- Makefile    22 Nov 2010 08:36:53 -0000      1.21
+++ Makefile    18 Mar 2011 19:49:03 -0000
@@ -2,7 +2,7 @@
 
 COMMENT=       web proxy with advanced filtering capabilities
 
-V=             3.0.16
+V=             3.0.17
 DISTNAME=      privoxy-${V}-stable
 PKGNAME=       privoxy-${V}
 CATEGORIES=    www
@@ -25,7 +25,6 @@ EXTRACT_SUFX= -src.tar.gz
 NO_REGRESS=    Yes
 
 USE_GMAKE=     Yes
-USE_GROFF =    Yes
 MAKE_FILE=     GNUmakefile
 
 LIB_DEPENDS=   devel/pcre
@@ -41,9 +40,12 @@ pre-configure:
 do-install:
        @${SUBST_CMD} ${WRKSRC}/config
        ${INSTALL_PROGRAM} ${WRKSRC}/privoxy ${PREFIX}/sbin
+       cd ${WRKSRC}/tools && ${INSTALL_SCRIPT} * ${PREFIX}/bin
        ${INSTALL_MAN} ${WRKSRC}/privoxy.1 ${PREFIX}/man/man1
        ${INSTALL_DATA_DIR} ${PREFIX}/share/doc/privoxy
-       ${INSTALL_DATA} ${WRKSRC}/README ${PREFIX}/share/doc/privoxy
+.for _f in AUTHORS ChangeLog README LICENSE
+       ${INSTALL_DATA} ${WRKSRC}/${_f} ${PREFIX}/share/doc/privoxy
+.endfor
        ${INSTALL_DATA_DIR} ${PREFIX}/share/examples/privoxy
        ${INSTALL_DATA} ${WRKSRC}/config ${PREFIX}/share/examples/privoxy
        ${INSTALL_DATA} ${WRKSRC}/default.filter 
${PREFIX}/share/examples/privoxy
Index: distinfo
===================================================================
RCS file: /cvs/ports/www/privoxy/distinfo,v
retrieving revision 1.9
diff -u -p -r1.9 distinfo
--- distinfo    25 Jun 2010 13:50:47 -0000      1.9
+++ distinfo    18 Mar 2011 19:49:03 -0000
@@ -1,5 +1,5 @@
-MD5 (privoxy-3.0.16-stable-src.tar.gz) = ZNP/zfgwfgSjdXc7tOslXg==
-RMD160 (privoxy-3.0.16-stable-src.tar.gz) = NnI/Amn5oDOUyVnrZYe1f9t+txM=
-SHA1 (privoxy-3.0.16-stable-src.tar.gz) = LJxEA0/wUJwST6yYy3QaLCVy7c0=
-SHA256 (privoxy-3.0.16-stable-src.tar.gz) = 
ffdOM8+SY8uBU+V0bkrQm/gtfEPRdVEbt5BWuKT6/uY=
-SIZE (privoxy-3.0.16-stable-src.tar.gz) = 1656721
+MD5 (privoxy-3.0.17-stable-src.tar.gz) = nTY9c4o/PXPndNbf6v2xXw==
+RMD160 (privoxy-3.0.17-stable-src.tar.gz) = jkrMYMp+e+IKkuGuzpLuzt1NGZc=
+SHA1 (privoxy-3.0.17-stable-src.tar.gz) = yt7y647BgieOCSMi09VvIly2nJM=
+SHA256 (privoxy-3.0.17-stable-src.tar.gz) = 
0d423BQRgKWrXpEFB1UVZOlYzCOn2NqqQR4VZMIIzXc=
+SIZE (privoxy-3.0.17-stable-src.tar.gz) = 1670102
Index: patches/patch-config
===================================================================
RCS file: /cvs/ports/www/privoxy/patches/patch-config,v
retrieving revision 1.6
diff -u -p -r1.6 patch-config
--- patches/patch-config        4 Oct 2009 19:27:25 -0000       1.6
+++ patches/patch-config        18 Mar 2011 19:49:03 -0000
@@ -1,6 +1,7 @@
---- config~    Sat Mar 21 12:51:51 2009
-+++ config     Sat Oct  3 16:12:45 2009
-@@ -267,7 +267,7 @@
+$OpenBSD$
+--- config.orig        Sat Nov 13 13:48:18 2010
++++ config     Fri Mar 18 17:15:32 2011
+@@ -265,7 +265,7 @@
  #
  #      No trailing "/", please.
  #
@@ -9,12 +10,12 @@
  #
  #
  #  2.2. templdir
-@@ -324,7 +324,7 @@
+@@ -322,7 +322,7 @@ confdir .
  #
  #      No trailing "/", please.
  #
 -logdir .
-+logdir /var/log/privoxy
++logdir /log
  #
  #
  #  2.4. actionsfile
Index: pkg/MESSAGE
===================================================================
RCS file: /cvs/ports/www/privoxy/pkg/MESSAGE,v
retrieving revision 1.1
diff -u -p -r1.1 MESSAGE
--- pkg/MESSAGE 25 Nov 2004 21:07:50 -0000      1.1
+++ pkg/MESSAGE 18 Mar 2011 19:49:03 -0000
@@ -1,9 +1,6 @@
-You will need to edit /etc/rc.local as appropriate and add a
-section similar to the following so that privoxy is started
-automatically:
-
-    if [ -x ${PREFIX}/sbin/privoxy ]; then
-            echo -n ' privoxy';
-            ${PREFIX}/sbin/privoxy --user _privoxy._privoxy \
-                    ${SYSCONFDIR}/privoxy/config
-    fi
+Note for people upgrading from 3.0.16 and before: There is now an rc
+script that will start privoxy chrooted to /var/privoxy. Any
+configuration files will be copied over automatically, but you need to
+make sure that any other directories which are needed by privoxy (e.g.
+the log directories) exist relative to the chroot and have proper
+privileges for the _privoxy user.
Index: pkg/PLIST
===================================================================
RCS file: /cvs/ports/www/privoxy/pkg/PLIST,v
retrieving revision 1.8
diff -u -p -r1.8 PLIST
--- pkg/PLIST   25 Jun 2010 13:50:47 -0000      1.8
+++ pkg/PLIST   18 Mar 2011 19:49:03 -0000
@@ -1,9 +1,17 @@
 @comment $OpenBSD: PLIST,v 1.8 2010/06/25 13:50:47 merdely Exp $
+@ask-update privoxy-<3.0.17 Make sure home directory of the _privoxy user is 
set to /var/privoxy and read MESSAGE
 @newgroup _privoxy:516
-@newuser _privoxy:516:_privoxy:daemon:Privoxy 
Account:/nonexistent:/sbin/nologin
+@newuser _privoxy:516:_privoxy:daemon:Privoxy 
Account:/var/privoxy:/sbin/nologin
+bin/privoxy-log-parser.pl
+bin/privoxy-regression-test.pl
+bin/uagen.pl
+bin/url-pattern-translator.pl
 @man man/man1/privoxy.1
 @bin sbin/privoxy
 share/doc/privoxy/
+share/doc/privoxy/AUTHORS
+share/doc/privoxy/ChangeLog
+share/doc/privoxy/LICENSE
 share/doc/privoxy/README
 share/examples/privoxy/
 @sample ${SYSCONFDIR}/privoxy/
@@ -254,7 +262,11 @@ share/examples/privoxy/user.action
 @owner _privoxy
 @group _privoxy
 @sample ${SYSCONFDIR}/privoxy/user.action
+@sample /var/privoxy/
 @mode 775
 @owner
-@sample /var/log/privoxy/
-@extraunexec rm -rf /var/log/privoxy/*
+@sample /var/privoxy/log/
+@extraunexec rm -rf /var/privoxy/log/*
+@group
+@mode
+@rcscript ${RCDIR}/privoxy
Index: pkg/privoxy.rc
===================================================================
RCS file: pkg/privoxy.rc
diff -N pkg/privoxy.rc
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ pkg/privoxy.rc      18 Mar 2011 19:49:03 -0000
@@ -0,0 +1,36 @@
+#!/bin/sh
+#
+# $OpenBSD$
+
+daemon="${TRUEPREFIX}/sbin/privoxy"
+daemon_flags="--user _privoxy._privoxy --chroot --pre-chroot-nslookup \
+       www.google.com ${SYSCONFDIR}/privoxy/config"
+
+. /etc/rc.d/rc.subr
+
+rc_reload=NO
+
+rc_pre()
+{
+       case ${daemon_flags} in
+       *--chroot*)     
+                       pax -rw -u -p e ${SYSCONFDIR}/privoxy /var/privoxy/
+                       pax -rw -u -p e ${SYSCONFDIR}/hosts /var/privoxy/
+                       pax -rw -u -p e ${SYSCONFDIR}/resolv.conf /var/privoxy/
+                       ;;
+       esac
+}
+
+rc_post()
+{
+       # preserve config changes made inside the chroot, for instance via the
+       # web interface
+       case ${daemon_flags} in
+       *--chroot*)
+                       cd /var/privoxy${SYSCONFDIR} && pax -rw -u -p e \
+                               ./privoxy ${SYSCONFDIR}
+                       ;;
+       esac
+}
+
+rc_cmd $1

Reply via email to