pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/www/privoxy Update privoxy to 3.0.12



details:   https://anonhg.NetBSD.org/pkgsrc/rev/40b0a0e94ba5
branches:  trunk
changeset: 556927:40b0a0e94ba5
user:      mjl <mjl%pkgsrc.org@localhost>
date:      Tue Apr 07 00:21:46 2009 +0000

description:
Update privoxy to 3.0.12
This is a stable release which includes many enhancements but no major
new features. The most prominent improvement is support for keep-alive
connections.

Also add a patch to deal with non-availability of gethostbyname_r()
on NetBSD -- privoxy then uses gethostbyname() in a mutexed section,
effectively single threading DNS lookup. This is extremely annoying when
running into DNS timeouts. Hack around it by implementing functionality
using getaddrinfo().

diffstat:

 www/privoxy/Makefile         |   8 ++--
 www/privoxy/PLIST            |   5 ++-
 www/privoxy/distinfo         |  10 +++---
 www/privoxy/patches/patch-af |  22 ----------------
 www/privoxy/patches/patch-ag |  59 ++++++++++++++++++++++++++++++++++++++++++++
 5 files changed, 71 insertions(+), 33 deletions(-)

diffs (156 lines):

diff -r 674808a8ae8f -r 40b0a0e94ba5 www/privoxy/Makefile
--- a/www/privoxy/Makefile      Mon Apr 06 19:10:31 2009 +0000
+++ b/www/privoxy/Makefile      Tue Apr 07 00:21:46 2009 +0000
@@ -1,12 +1,12 @@
-# $NetBSD: Makefile,v 1.37 2009/02/04 21:30:53 drochner Exp $
+# $NetBSD: Makefile,v 1.38 2009/04/07 00:21:46 mjl Exp $
 #
 
 DISTNAME=      ${PKGNAME_NOREV}-stable-src
-PKGNAME=       privoxy-3.0.10
+PKGNAME=       privoxy-3.0.12
 CATEGORIES=    www
 MASTER_SITES=  ${MASTER_SITE_SOURCEFORGE:=ijbswa/}
 
-MAINTAINER=    kim%tac.nyc.ny.us@localhost
+MAINTAINER=    pkgsrc-users%NetBSD.org@localhost
 HOMEPAGE=      http://www.privoxy.org/
 COMMENT=       Web proxy with advanced filtering capabilities
 
@@ -47,7 +47,7 @@
 USER_GROUP=            ${PRIVOXY_USER} ${PRIVOXY_GROUP}
 
 .for i in \
-    config trust default.action standard.action user.action default.filter
+    config trust default.action user.action default.filter match-all.action
 CONF_FILES_PERMS+=     ${EGDIR}/${i} ${PKG_SYSCONFDIR}/${i} ${USER_GROUP} 0660
 .endfor
 
diff -r 674808a8ae8f -r 40b0a0e94ba5 www/privoxy/PLIST
--- a/www/privoxy/PLIST Mon Apr 06 19:10:31 2009 +0000
+++ b/www/privoxy/PLIST Tue Apr 07 00:21:46 2009 +0000
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST,v 1.6 2009/02/04 21:30:53 drochner Exp $
+@comment $NetBSD: PLIST,v 1.7 2009/04/07 00:21:46 mjl Exp $
 man/man1/privoxy.1
 sbin/privoxy
 share/doc/privoxy/AUTHORS
@@ -48,10 +48,11 @@
 share/doc/privoxy/user-manual/templates.html
 share/doc/privoxy/user-manual/upgradersnote.html
 share/doc/privoxy/user-manual/whatsnew.html
+share/examples/privoxy/templates/url-info-osd.xml
 share/examples/privoxy/config
 share/examples/privoxy/default.action
 share/examples/privoxy/default.filter
-share/examples/privoxy/standard.action
+share/examples/privoxy/match-all.action
 share/examples/privoxy/templates/blocked
 share/examples/privoxy/templates/cgi-error-404
 share/examples/privoxy/templates/cgi-error-bad-param
diff -r 674808a8ae8f -r 40b0a0e94ba5 www/privoxy/distinfo
--- a/www/privoxy/distinfo      Mon Apr 06 19:10:31 2009 +0000
+++ b/www/privoxy/distinfo      Tue Apr 07 00:21:46 2009 +0000
@@ -1,8 +1,8 @@
-$NetBSD: distinfo,v 1.11 2009/02/11 17:59:32 drochner Exp $
+$NetBSD: distinfo,v 1.12 2009/04/07 00:21:46 mjl Exp $
 
-SHA1 (privoxy-3.0.10-stable-src.tar.gz) = 0ce51a8dc938fe6412daa7f6edf159b98fd66d54
-RMD160 (privoxy-3.0.10-stable-src.tar.gz) = 91c8d56b71a5c606554bf509827197d689d8fc10
-Size (privoxy-3.0.10-stable-src.tar.gz) = 1957465 bytes
+SHA1 (privoxy-3.0.12-stable-src.tar.gz) = 1118d6a7b4980f26c9ad0902c0e6af5aaaf1a640
+RMD160 (privoxy-3.0.12-stable-src.tar.gz) = 32509b897e073f1cc100b8a4a157d19a219b51cd
+Size (privoxy-3.0.12-stable-src.tar.gz) = 1811124 bytes
 SHA1 (patch-aa) = c263d2a4b9522a33613f82ab2bc18d5c2b554b21
 SHA1 (patch-ac) = e39ffe694462b952c5ad66ac577a0acbee0a1d9f
-SHA1 (patch-af) = cb4249abd1c2f4f5d256ab4c3b56d04213ee820f
+SHA1 (patch-ag) = 9ec6d971382f145d11c5f6e0d13381fdfe3cd31f
diff -r 674808a8ae8f -r 40b0a0e94ba5 www/privoxy/patches/patch-af
--- a/www/privoxy/patches/patch-af      Mon Apr 06 19:10:31 2009 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,22 +0,0 @@
-$NetBSD: patch-af,v 1.2 2009/02/11 17:59:32 drochner Exp $
-
---- ./jcc.c.orig       2008-06-27 13:13:56.000000000 +0200
-+++ ./jcc.c
-@@ -3349,6 +3349,17 @@ int main(int argc, const char *argv[])
-       {
-          log_error(LOG_LEVEL_FATAL, "Cannot setgid(): Insufficient permissions.");
-       }
-+      if (NULL != grp)
-+      {
-+         if (setgroups(1, &grp->gr_gid))
-+         {
-+            log_error(LOG_LEVEL_FATAL, "setgroups() failed: %E");
-+         }
-+      }
-+      else if (initgroups(pw->pw_name, pw->pw_gid))
-+      {
-+         log_error(LOG_LEVEL_FATAL, "initgroups() failed: %E");
-+      }
-       if (do_chroot)
-       {
-          if (!pw->pw_dir)
diff -r 674808a8ae8f -r 40b0a0e94ba5 www/privoxy/patches/patch-ag
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/www/privoxy/patches/patch-ag      Tue Apr 07 00:21:46 2009 +0000
@@ -0,0 +1,59 @@
+$NetBSD: patch-ag,v 1.1 2009/04/07 00:21:47 mjl Exp $
+
+--- jbsockets.c.orig   2009-03-31 14:08:54.000000000 +0200
++++ jbsockets.c        2009-03-31 14:36:35.000000000 +0200
+@@ -945,6 +945,14 @@
+    struct sockaddr_in inaddr;
+    struct hostent *hostp;
+    unsigned int dns_retries = 0;
++#if defined(__NetBSD__)
++   struct hostent result;
++      struct sockaddr_in raddr;
++      struct sockaddr_in *rlist[2];
++
++      memset(&result, '\0', sizeof(struct hostent));
++#endif
++
+ #if defined(HAVE_GETHOSTBYNAME_R_6_ARGS) || defined(HAVE_GETHOSTBYNAME_R_5_ARGS) || defined(HAVE_GETHOSTBYNAME_R_3_ARGS)
+    struct hostent result;
+ #if defined(HAVE_GETHOSTBYNAME_R_6_ARGS) || defined(HAVE_GETHOSTBYNAME_R_5_ARGS)
+@@ -995,7 +1003,39 @@
+       {
+          hostp = NULL;
+       }
++#elif defined(__NetBSD__)
++      /* mjl */
++      {
++      struct addrinfo *resp = NULL;
++      struct addrinfo hints;
++
++      memset(&hints, '\0', sizeof(struct addrinfo));
++      hints.ai_family = AF_INET;
++
++   while (getaddrinfo(host, NULL, &hints, &resp) == EAI_AGAIN
++          && (dns_retries++ < MAX_DNS_RETRIES))
++      {   
++         log_error(LOG_LEVEL_ERROR,
++            "Timeout #%u while trying to resolve %s. Trying again.",
++            dns_retries, host);
++      }
++
++      if(resp) 
++              {
++              result.h_addrtype = resp->ai_family;
++              memcpy(&raddr, &((struct sockaddr_in *) resp->ai_addr)
++                                                              ->sin_addr, sizeof(struct sockaddr_in));
++              /* set up fake hostent */
++              rlist[0] = &raddr;
++              rlist[1] = NULL;
++              result.h_addr_list = (char **)rlist;
++              hostp = &result;
++
++              freeaddrinfo(resp);
++              }
++      }
++
+ #elif FEATURE_PTHREAD
+       privoxy_mutex_lock(&resolver_mutex);
+       while (NULL == (hostp = gethostbyname(host))
+              && (h_errno == TRY_AGAIN) && (dns_retries++ < MAX_DNS_RETRIES))



Home | Main Index | Thread Index | Old Index