diff options
author | Alin Năstac <mrness@gentoo.org> | 2005-02-26 23:22:34 +0000 |
---|---|---|
committer | Alin Năstac <mrness@gentoo.org> | 2005-02-26 23:22:34 +0000 |
commit | 531e37d97cb5586b9b7178bbeb5501c48edc08a9 (patch) | |
tree | d407366de85d32e84cd0e6c04320dde71ec9cda5 /www-proxy | |
parent | Update the homepage. See bug #83280. (diff) | |
download | gentoo-2-531e37d97cb5586b9b7178bbeb5501c48edc08a9.tar.gz gentoo-2-531e37d97cb5586b9b7178bbeb5501c48edc08a9.tar.bz2 gentoo-2-531e37d97cb5586b9b7178bbeb5501c48edc08a9.zip |
bump to source version 3.0.3-2 (#83205); add zlib support (#83278); remove slots
(Portage version: 2.0.51-r15)
Diffstat (limited to 'www-proxy')
-rw-r--r-- | www-proxy/privoxy/ChangeLog | 10 | ||||
-rw-r--r-- | www-proxy/privoxy/Manifest | 24 | ||||
-rw-r--r-- | www-proxy/privoxy/files/digest-privoxy-3.0.3-r2 | 1 | ||||
-rw-r--r-- | www-proxy/privoxy/files/privoxy-3.0.3.2.patch | 270 | ||||
-rw-r--r-- | www-proxy/privoxy/files/privoxy-zlib.patch | 508 | ||||
-rw-r--r-- | www-proxy/privoxy/privoxy-3.0.2.ebuild | 4 | ||||
-rw-r--r-- | www-proxy/privoxy/privoxy-3.0.3-r1.ebuild | 4 | ||||
-rw-r--r-- | www-proxy/privoxy/privoxy-3.0.3-r2.ebuild | 94 | ||||
-rw-r--r-- | www-proxy/privoxy/privoxy-3.0.3.ebuild | 4 |
9 files changed, 897 insertions, 22 deletions
diff --git a/www-proxy/privoxy/ChangeLog b/www-proxy/privoxy/ChangeLog index 275f1de9bffc..e650270273c6 100644 --- a/www-proxy/privoxy/ChangeLog +++ b/www-proxy/privoxy/ChangeLog @@ -1,6 +1,14 @@ # ChangeLog for www-proxy/privoxy # Copyright 2002-2005 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/www-proxy/privoxy/ChangeLog,v 1.6 2005/02/24 15:43:54 mrness Exp $ +# $Header: /var/cvsroot/gentoo-x86/www-proxy/privoxy/ChangeLog,v 1.7 2005/02/26 23:22:34 mrness Exp $ + +*privoxy-3.0.3-r2 (27 Feb 2005) + + 27 Feb 2005; Alin Nastac <mrness@gentoo.org> +files/privoxy-3.0.3.2.patch, + +files/privoxy-zlib.patch, privoxy-3.0.2.ebuild, privoxy-3.0.3-r1.ebuild, + +privoxy-3.0.3-r2.ebuild, privoxy-3.0.3.ebuild: + Bump version to 3.0.3-2 (#83205) and add support for zlib decompression + (#83278). *privoxy-3.0.3-r1 (24 Feb 2005) diff --git a/www-proxy/privoxy/Manifest b/www-proxy/privoxy/Manifest index a3f33deb2d79..f528c1e3c74b 100644 --- a/www-proxy/privoxy/Manifest +++ b/www-proxy/privoxy/Manifest @@ -1,21 +1,15 @@ ------BEGIN PGP SIGNED MESSAGE----- -Hash: SHA1 - +MD5 2044c4419f1557c4e1eb960ef6910769 privoxy-3.0.3-r1.ebuild 2100 +MD5 f5c43e323eb5229975b410068d0b575b privoxy-3.0.2.ebuild 1878 +MD5 4b3b0fb5fad10a063895f9b6e0ff2153 privoxy-3.0.3-r2.ebuild 2409 +MD5 7967a0485b9d384283b3ff05f501ccde privoxy-3.0.3.ebuild 1888 MD5 d75e10b7464fe8cb0661982926c45422 ChangeLog 4245 MD5 acc475c99bfbf9b1cff330da7ef939a6 metadata.xml 291 -MD5 1935accfa0381a7e5abd4ed5e838b40c privoxy-3.0.3-r1.ebuild 2100 -MD5 8f3a6b8befcb1aa0872cf537cbee827c privoxy-3.0.2.ebuild 1878 -MD5 05765a248506560e5ee1facec59fbe36 privoxy-3.0.3.ebuild 1888 +MD5 1c4661fe6b0663a64585ed84847c472b files/privoxy-3.0.3.2.patch 9446 MD5 2760360001df367f12d98ee964007363 files/privoxy.logrotate 191 +MD5 56d88e9a6970c67adde3386b83dcb2ae files/digest-privoxy-3.0.3-r1 77 +MD5 56d88e9a6970c67adde3386b83dcb2ae files/digest-privoxy-3.0.3-r2 77 +MD5 3edef26559671518faa0e79459a6557c files/privoxy-wtm.patch 18531 +MD5 84c5590bae09be1d5419c27a1d5b676d files/privoxy.rc6 523 MD5 ad897a8372898fe35da88ff91c90afe4 files/privoxy.rc7 579 MD5 498b2ae85af76ed736ac4979e28bfe8a files/digest-privoxy-3.0.2 77 MD5 56d88e9a6970c67adde3386b83dcb2ae files/digest-privoxy-3.0.3 77 -MD5 84c5590bae09be1d5419c27a1d5b676d files/privoxy.rc6 523 -MD5 56d88e9a6970c67adde3386b83dcb2ae files/digest-privoxy-3.0.3-r1 77 ------BEGIN PGP SIGNATURE----- -Version: GnuPG v1.2.6 (GNU/Linux) - -iD8DBQFCHfZMjiC39V7gKu0RAs0wAJ9f5Est/gTOKf44sHuhVQJ/rAPooQCg2xXc -2XbVowgzf2xyQaSt+Q+I7Ow= -=NdSZ ------END PGP SIGNATURE----- diff --git a/www-proxy/privoxy/files/digest-privoxy-3.0.3-r2 b/www-proxy/privoxy/files/digest-privoxy-3.0.3-r2 new file mode 100644 index 000000000000..8293b5fba301 --- /dev/null +++ b/www-proxy/privoxy/files/digest-privoxy-3.0.3-r2 @@ -0,0 +1 @@ +MD5 b0710be8af09409bfb03f52523a17010 privoxy-3.0.3-stable-src.tar.gz 1561072 diff --git a/www-proxy/privoxy/files/privoxy-3.0.3.2.patch b/www-proxy/privoxy/files/privoxy-3.0.3.2.patch new file mode 100644 index 000000000000..ef34cd6c686f --- /dev/null +++ b/www-proxy/privoxy/files/privoxy-3.0.3.2.patch @@ -0,0 +1,270 @@ +diff -ur privoxy-3.0.3/GNUmakefile.in privoxy-3.0.3-stable/GNUmakefile.in +--- privoxy-3.0.3/GNUmakefile.in 2004-01-31 02:15:33.000000000 +0100 ++++ privoxy-3.0.3-stable/GNUmakefile.in 2004-02-17 15:13:27.000000000 +0100 +@@ -1,6 +1,6 @@ + # Note: Makefile is built automatically from Makefile.in + # +-# $Id: privoxy-3.0.3.2.patch,v 1.1 2005/02/26 23:22:34 mrness Exp $ ++# $Id: privoxy-3.0.3.2.patch,v 1.1 2005/02/26 23:22:34 mrness Exp $ + # + # Written by and Copyright (C) 2001 - 2004 the SourceForge + # Privoxy team. http://www.privoxy.org/ +@@ -818,7 +818,9 @@ + # (http://www.easysw.com/htmldoc/). Note: 1.8.20 has a TOC bug. + # PDF docs are uploaded to webserver as zip archive. + dok-pdf: dok-shtml +- @$(ECHO) -n "starting htmldoc version: "; htmldoc --version ++ @$(ECHO) -n "starting htmldoc version: "; ++ if htmldoc --version ; then : ; \ ++ else $(ECHO) "WARNING: could not get htmldoc version" ; fi + cd utils/ldp_print && $(RM) *html *bak *jpg *tmp *pdf *zip + cp -f doc/source/temp/*html doc/webserver/images/*jpg utils/ldp_print + cd utils/ldp_print ;\ +@@ -1019,6 +1021,7 @@ + clobber: tidy + $(RM) GNUmakefile configure config.h.in config.h config.cache config.status config.log logfile \ + privoxy.log core *.tar.gz *.tar privoxy-cl.spec doc/source/ldp.dsl ++ $(RM) -r autom4te.cache + + # + # FIXME: What is all this? +@@ -1341,6 +1344,13 @@ + ## end: + + # $Log: privoxy-3.0.3.2.patch,v $ + # Revision 1.1 2005/02/26 23:22:34 mrness + # bump to source version 3.0.3-2 (#83205); add zlib support (#83278); remove slots + # (Portage version: 2.0.51-r15) + # ++# Revision 1.104.2.27 2004/02/07 16:11:10 oes ++# Make clobber remove the autom4te.cache dir. ++# Closes BR #889300 ++# ++# Revision 1.104.2.26 2004/01/31 16:32:25 oes ++# Adding a check for an htmldoc variant from the debian diff ++# + # Revision 1.104.2.25 2004/01/31 01:15:33 oes + # Fixed a typo; updated copyright notice + # +Only in privoxy-3.0.3: autom4te.cache +diff -ur privoxy-3.0.3/cgi.c privoxy-3.0.3-stable/cgi.c +--- privoxy-3.0.3/cgi.c 2003-12-17 17:33:16.000000000 +0100 ++++ privoxy-3.0.3-stable/cgi.c 2004-02-17 15:13:27.000000000 +0100 +@@ -1,4 +1,4 @@ +-const char cgi_rcs[] = "$Id: privoxy-3.0.3.2.patch,v 1.1 2005/02/26 23:22:34 mrness Exp $"; ++const char cgi_rcs[] = "$Id: privoxy-3.0.3.2.patch,v 1.1 2005/02/26 23:22:34 mrness Exp $"; + /********************************************************************* + * + * File : $Source: /var/cvsroot/gentoo-x86/www-proxy/privoxy/files/privoxy-3.0.3.2.patch,v $ +@@ -38,6 +38,12 @@ + * + * Revisions : + * $Log: privoxy-3.0.3.2.patch,v $ + * Revision 1.1 2005/02/26 23:22:34 mrness + * bump to source version 3.0.3-2 (#83205); add zlib support (#83278); remove slots + * (Portage version: 2.0.51-r15) + * ++ * Revision 1.70.2.13 2004/02/17 13:30:23 oes ++ * Moved cgi_error_disabled() from cgiedit.c to ++ * cgi.c to re-enable build with --disable-editor. ++ * Fixes Bug #892744. Thanks to Matthew Fischer ++ * for spotting. ++ * + * Revision 1.70.2.12 2003/12/17 16:33:16 oes + * - Added new function cgi_redirect to handle creation of + * HTTP redirect messages formerly repeated in the code. +@@ -1244,6 +1250,42 @@ + + /********************************************************************* + * ++ * Function : cgi_error_disabled ++ * ++ * Description : CGI function that is called to generate an error ++ * response if the actions editor or toggle CGI are ++ * accessed despite having being disabled at compile- ++ * or run-time. ++ * ++ * Parameters : ++ * 1 : csp = Current client state (buffers, headers, etc...) ++ * 2 : rsp = http_response data structure for output ++ * ++ * CGI Parameters : none ++ * ++ * Returns : JB_ERR_OK on success ++ * JB_ERR_MEMORY on out-of-memory error. ++ * ++ *********************************************************************/ ++jb_err cgi_error_disabled(struct client_state *csp, ++ struct http_response *rsp) ++{ ++ struct map *exports; ++ ++ assert(csp); ++ assert(rsp); ++ ++ if (NULL == (exports = default_exports(csp, NULL))) ++ { ++ return JB_ERR_MEMORY; ++ } ++ ++ return template_fill_for_cgi(csp, "cgi-error-disabled", exports, rsp); ++} ++ ++ ++/********************************************************************* ++ * + * Function : cgi_init_error_messages + * + * Description : Call at the start of the program to initialize +diff -ur privoxy-3.0.3/cgi.h privoxy-3.0.3-stable/cgi.h +--- privoxy-3.0.3/cgi.h 2003-12-17 17:33:28.000000000 +0100 ++++ privoxy-3.0.3-stable/cgi.h 2004-02-17 15:13:27.000000000 +0100 +@@ -1,6 +1,6 @@ + #ifndef CGI_H_INCLUDED + #define CGI_H_INCLUDED +-#define CGI_H_VERSION "$Id: privoxy-3.0.3.2.patch,v 1.1 2005/02/26 23:22:34 mrness Exp $" ++#define CGI_H_VERSION "$Id: privoxy-3.0.3.2.patch,v 1.1 2005/02/26 23:22:34 mrness Exp $" + /********************************************************************* + * + * File : $Source: /var/cvsroot/gentoo-x86/www-proxy/privoxy/files/privoxy-3.0.3.2.patch,v $ +@@ -38,6 +38,12 @@ + * + * Revisions : + * $Log: privoxy-3.0.3.2.patch,v $ + * Revision 1.1 2005/02/26 23:22:34 mrness + * bump to source version 3.0.3-2 (#83205); add zlib support (#83278); remove slots + * (Portage version: 2.0.51-r15) + * ++ * Revision 1.29.2.2 2004/02/17 13:30:23 oes ++ * Moved cgi_error_disabled() from cgiedit.c to ++ * cgi.c to re-enable build with --disable-editor. ++ * Fixes Bug #892744. Thanks to Matthew Fischer ++ * for spotting. ++ * + * Revision 1.29.2.1 2003/12/17 16:33:28 oes + * Added prototype of new function cgi_redirect + * +@@ -215,7 +221,9 @@ + const char *template_name); + extern jb_err cgi_error_bad_param(struct client_state *csp, + struct http_response *rsp); +-jb_err cgi_error_unknown(struct client_state *csp, ++extern jb_err cgi_error_disabled(struct client_state *csp, ++ struct http_response *rsp); ++extern jb_err cgi_error_unknown(struct client_state *csp, + struct http_response *rsp, + jb_err error_to_report); + +diff -ur privoxy-3.0.3/cgiedit.c privoxy-3.0.3-stable/cgiedit.c +--- privoxy-3.0.3/cgiedit.c 2003-12-18 09:13:48.000000000 +0100 ++++ privoxy-3.0.3-stable/cgiedit.c 2004-02-17 15:13:27.000000000 +0100 +@@ -1,4 +1,4 @@ +-const char cgiedit_rcs[] = "$Id: privoxy-3.0.3.2.patch,v 1.1 2005/02/26 23:22:34 mrness Exp $"; ++const char cgiedit_rcs[] = "$Id: privoxy-3.0.3.2.patch,v 1.1 2005/02/26 23:22:34 mrness Exp $"; + /********************************************************************* + * + * File : $Source: /var/cvsroot/gentoo-x86/www-proxy/privoxy/files/privoxy-3.0.3.2.patch,v $ +@@ -42,6 +42,12 @@ + * + * Revisions : + * $Log: privoxy-3.0.3.2.patch,v $ + * Revision 1.1 2005/02/26 23:22:34 mrness + * bump to source version 3.0.3-2 (#83205); add zlib support (#83278); remove slots + * (Portage version: 2.0.51-r15) + * ++ * Revision 1.41.2.7 2004/02/17 13:30:23 oes ++ * Moved cgi_error_disabled() from cgiedit.c to ++ * cgi.c to re-enable build with --disable-editor. ++ * Fixes Bug #892744. Thanks to Matthew Fischer ++ * for spotting. ++ * + * Revision 1.41.2.6 2003/12/18 08:13:48 oes + * One line lost in last commit + * +@@ -469,8 +475,6 @@ + jb_err cgi_error_file_read_only(struct client_state *csp, + struct http_response *rsp, + const char *filename); +-jb_err cgi_error_disabled(struct client_state *csp, +- struct http_response *rsp); + + /* Internal arbitrary config file support functions */ + static jb_err edit_read_file_lines(FILE *fp, struct file_line ** pfile, int *newline); +@@ -2408,40 +2412,6 @@ + + /********************************************************************* + * +- * Function : cgi_error_disabled +- * +- * Description : CGI function that is called if the actions editor +- * is called although it's disabled in config +- * +- * Parameters : +- * 1 : csp = Current client state (buffers, headers, etc...) +- * 2 : rsp = http_response data structure for output +- * +- * CGI Parameters : none +- * +- * Returns : JB_ERR_OK on success +- * JB_ERR_MEMORY on out-of-memory error. +- * +- *********************************************************************/ +-jb_err cgi_error_disabled(struct client_state *csp, +- struct http_response *rsp) +-{ +- struct map *exports; +- +- assert(csp); +- assert(rsp); +- +- if (NULL == (exports = default_exports(csp, NULL))) +- { +- return JB_ERR_MEMORY; +- } +- +- return template_fill_for_cgi(csp, "cgi-error-disabled", exports, rsp); +-} +- +- +-/********************************************************************* +- * + * Function : cgi_edit_actions + * + * Description : CGI function that allows the user to choose which +diff -ur privoxy-3.0.3/cgiedit.h privoxy-3.0.3-stable/cgiedit.h +--- privoxy-3.0.3/cgiedit.h 2002-11-28 19:15:17.000000000 +0100 ++++ privoxy-3.0.3-stable/cgiedit.h 2004-02-17 15:13:27.000000000 +0100 +@@ -1,6 +1,6 @@ + #ifndef CGIEDIT_H_INCLUDED + #define CGIEDIT_H_INCLUDED +-#define CGIEDIT_H_VERSION "$Id: privoxy-3.0.3.2.patch,v 1.1 2005/02/26 23:22:34 mrness Exp $" ++#define CGIEDIT_H_VERSION "$Id: privoxy-3.0.3.2.patch,v 1.1 2005/02/26 23:22:34 mrness Exp $" + /********************************************************************* + * + * File : $Source: /var/cvsroot/gentoo-x86/www-proxy/privoxy/files/privoxy-3.0.3.2.patch,v $ +@@ -37,6 +37,12 @@ + * + * Revisions : + * $Log: privoxy-3.0.3.2.patch,v $ + * Revision 1.1 2005/02/26 23:22:34 mrness + * bump to source version 3.0.3-2 (#83205); add zlib support (#83278); remove slots + * (Portage version: 2.0.51-r15) + * ++ * Revision 1.7.2.2 2004/02/17 13:30:23 oes ++ * Moved cgi_error_disabled() from cgiedit.c to ++ * cgi.c to re-enable build with --disable-editor. ++ * Fixes Bug #892744. Thanks to Matthew Fischer ++ * for spotting. ++ * + * Revision 1.7.2.1 2002/11/28 18:15:17 oes + * Added cgi_error_disabled + * +@@ -140,8 +146,6 @@ + extern jb_err cgi_toggle (struct client_state *csp, + struct http_response *rsp, + const struct map *parameters); +-extern jb_err cgi_error_disabled(struct client_state *csp, +- struct http_response *rsp); + #endif /* def FEATURE_CGI_EDIT_ACTIONS */ + + diff --git a/www-proxy/privoxy/files/privoxy-zlib.patch b/www-proxy/privoxy/files/privoxy-zlib.patch new file mode 100644 index 000000000000..174ce9182b17 --- /dev/null +++ b/www-proxy/privoxy/files/privoxy-zlib.patch @@ -0,0 +1,508 @@ +diff -Nru privoxy-3.0.3-stable.orig/actionlist.h privoxy-3.0.3-stable/actionlist.h +--- privoxy-3.0.3-stable.orig/actionlist.h 2002-09-25 18:25:25.000000000 +0300 ++++ privoxy-3.0.3-stable/actionlist.h 2005-02-27 01:01:23.072737744 +0200 +@@ -116,6 +116,7 @@ + DEFINE_ACTION_STRING ("deanimate-gifs", ACTION_DEANIMATE, ACTION_STRING_DEANIMATE) + DEFINE_CGI_PARAM_RADIO ("deanimate-gifs", ACTION_DEANIMATE, ACTION_STRING_DEANIMATE, "first", 0) + DEFINE_CGI_PARAM_RADIO ("deanimate-gifs", ACTION_DEANIMATE, ACTION_STRING_DEANIMATE, "last", 1) ++DEFINE_ACTION_BOOL ("decompress-from-server", ACTION_DECOMPRESS_IN) + DEFINE_ACTION_BOOL ("downgrade-http-version", ACTION_DOWNGRADE) + DEFINE_ACTION_BOOL ("fast-redirects", ACTION_FAST_REDIRECTS) + DEFINE_ACTION_MULTI ("filter", ACTION_MULTI_FILTER) +diff -Nru privoxy-3.0.3-stable.orig/configure.in privoxy-3.0.3-stable/configure.in +--- privoxy-3.0.3-stable.orig/configure.in 2004-01-30 11:26:03.000000000 +0200 ++++ privoxy-3.0.3-stable/configure.in 2005-02-27 00:59:01.813373408 +0200 +@@ -1234,6 +1234,20 @@ + libpcrs is available], + [ if test $enableval = "no"; then have_pcrs=no; fi ]) + ++AC_ARG_ENABLE(zlib, ++[ --enable-zlib Use the zlib library to allow compressing or ++ decompressing data on the fly.], ++[enableval2=$enableval], ++[enableval2=no]) ++if test $enableval2 = yes; then ++ AC_CHECK_LIB(z, zlibVersion, , [ ++ AC_MSG_ERROR([Unable to find a copy of zlib. The zlib library ++is necessary to enable compresion support. ]) ++ ]) ++ AC_DEFINE(FEATURE_ZLIB,1, ++ [ Define to 1 to use compression through the zlib library. ]) ++fi ++ + + # If we have libpcre and either we also have pcreposix or + # we don't need pcreposix, then link pcre dynamically; else +diff -Nru privoxy-3.0.3-stable.orig/default.action.master privoxy-3.0.3-stable/default.action.master +--- privoxy-3.0.3-stable.orig/default.action.master 2004-01-30 17:28:45.000000000 +0200 ++++ privoxy-3.0.3-stable/default.action.master 2005-02-27 00:59:01.815373104 +0200 +@@ -452,7 +452,7 @@ + -hide-user-agent \ + -kill-popups \ + -limit-connect \ +-+prevent-compression \ ++-prevent-compression \ + -send-vanilla-wafer \ + -send-wafer \ + +session-cookies-only \ +diff -Nru privoxy-3.0.3-stable.orig/filters.c privoxy-3.0.3-stable/filters.c +--- privoxy-3.0.3-stable.orig/filters.c 2003-11-11 15:10:31.000000000 +0200 ++++ privoxy-3.0.3-stable/filters.c 2005-02-27 01:01:23.073737592 +0200 +@@ -1320,6 +1320,38 @@ + csp->flags |= CSP_FLAG_MODIFIED; + } + ++#ifdef FEATURE_ZLIB ++ /* If the body has a compressed transfer-encoding, uncompress ++ * it first, adjusting size and iob->eod. Note that ++ * decompression occurs after de-chunking. ++ */ ++ if (csp->content_type & CT_GZIP || csp->content_type & CT_DEFLATE) ++ { ++ /* Notice that we at least tried to decompress. */ ++ if (JB_ERR_OK != decompress_iob(csp)) ++ { ++ /* We failed to decompress the data; there's no point ++ * in continuing since we can't filter. This is ++ * slightly tricky because we need to remember not to ++ * modify the Content-Encoding header later; using ++ * CT_TABOO flag is a kludge for this purpose. ++ */ ++ csp->content_type |= CT_TABOO; ++ return(NULL); ++ } ++ log_error(LOG_LEVEL_RE_FILTER, "Decompressing successful"); ++ ++ /* Decompression gives us a completely new iob, so we ++ * need to update. ++ */ ++ size = csp->iob->eod - csp->iob->cur; ++ old_buf = csp->iob->cur; ++ ++ csp->flags |= CSP_FLAG_MODIFIED; ++ } ++#endif ++ ++ + /* + * For all applying +filter actions, look if a filter by that + * name exists and if yes, execute it's pcrs_joblist on the +diff -Nru privoxy-3.0.3-stable.orig/jcc.c privoxy-3.0.3-stable/jcc.c +--- privoxy-3.0.3-stable.orig/jcc.c 2003-12-12 14:52:53.000000000 +0200 ++++ privoxy-3.0.3-stable/jcc.c 2005-02-27 01:06:08.737310128 +0200 +@@ -659,6 +659,10 @@ + # include <select.h> + # endif + ++#ifdef FEATURE_ZLIB ++#include <zlib.h> ++#endif ++ + #endif + + #include "project.h" +@@ -1605,6 +1609,8 @@ + + if ((csp->content_type & CT_TEXT) && /* It's a text / * MIME-Type */ + !http->ssl && /* We talk plaintext */ ++ !(csp->content_type & CT_GZIP) && ++ !(csp->content_type & CT_DEFLATE) && + block_popups) /* Policy allows */ + { + block_popups_now = 1; +diff -Nru privoxy-3.0.3-stable.orig/parsers.c privoxy-3.0.3-stable/parsers.c +--- privoxy-3.0.3-stable.orig/parsers.c 2003-07-11 16:21:25.000000000 +0300 ++++ privoxy-3.0.3-stable/parsers.c 2005-02-27 01:01:23.078736832 +0200 +@@ -433,6 +433,10 @@ + #include <assert.h> + #include <string.h> + ++#ifdef FEATURE_ZLIB ++#include <zlib.h> ++#endif ++ + #if !defined(_WIN32) && !defined(__OS2__) + #include <unistd.h> + #endif +@@ -632,6 +636,281 @@ + } + + ++#ifdef FEATURE_ZLIB ++/********************************************************************* ++ * ++ * Function : decompress_iob ++ * ++ * Description : Decompress buffered page, expanding the ++ * buffer as necessary. csp->iob->cur ++ * should point to the the beginning of the ++ * compressed data block. ++ * ++ * Parameters : ++ * 1 : csp = Current client state (buffers, headers, etc...) ++ * ++ * Returns : JB_ERR_OK on success, JB_ERR_MEMORY if out-of-memory ++ * limit reached, JB_ERR_GENERIC if error decompressing ++ * buffer. ++ * ++ *********************************************************************/ ++jb_err decompress_iob(struct client_state *csp) ++{ ++ char *buf; /* new, uncompressed buffer */ ++ int bufsize = csp->iob->size; /* allocated size of the new buffer */ ++ /* Number of bytes at the beginning ++ * of the iob that we should NOT ++ * decompress. ++ */ ++ int skip_size = csp->iob->cur - csp->iob->buf; ++ int status; /* return status of the inflate() call */ ++ z_stream zstr; /* used by calls to zlib */ ++ ++ /* This is to protect the parsing of gzipped data, but it should(?) ++ * be valid for deflated data also. ++ */ ++ if (bufsize < 10) ++ { ++ log_error (LOG_LEVEL_ERROR, "Buffer too small decompressing iob"); ++ return JB_ERR_GENERIC; ++ } ++ ++ if (csp->content_type & CT_GZIP) ++ { ++ /* Our task is slightly complicated by the facts that data ++ * compressed by gzip does not include a zlib header, and ++ * that there is no easily accessible interface in zlib to ++ * handle a gzip header. We strip off the gzip header by ++ * hand, and later inform zlib not to expect a header. ++ */ ++ ++ /* Strip off the gzip header. Please see RFC 1952 for more ++ * explanation of the appropriate fields. ++ */ ++ if ((*csp->iob->cur++ != (char)0x1f) ++ || (*csp->iob->cur++ != (char)0x8b) ++ || (*csp->iob->cur++ != Z_DEFLATED)) ++ { ++ log_error (LOG_LEVEL_ERROR, ++ "Invalid gzip header when decompressing"); ++ return JB_ERR_GENERIC; ++ } ++ else { ++ int flags = *csp->iob->cur++; ++ if (flags & 0xe0) ++ { ++ /* The gzip header has reserved bits set; bail out. */ ++ log_error (LOG_LEVEL_ERROR, ++ "Invalid gzip header when decompressing"); ++ return JB_ERR_GENERIC; ++ } ++ csp->iob->cur += 6; ++ ++ /* Skip extra fields if necessary. */ ++ if (flags & 0x04) ++ { ++ /* Skip a given number of bytes, specified as a 16-bit ++ * little-endian value. ++ */ ++ csp->iob->cur += *csp->iob->cur++ + (*csp->iob->cur++ << 8); ++ } ++ ++ /* Skip the filename if necessary. */ ++ if (flags & 0x08) ++ { ++ /* A null-terminated string follows. */ ++ while (*csp->iob->cur++); ++ } ++ ++ /* Skip the comment if necessary. */ ++ if (flags & 0x10) ++ { ++ while (*csp->iob->cur++); ++ } ++ ++ /* Skip the CRC if necessary. */ ++ if (flags & 0x02) ++ { ++ csp->iob->cur += 2; ++ } ++ } ++ } ++ else if (csp->content_type & CT_DEFLATE) ++ { ++ log_error (LOG_LEVEL_INFO, "Decompressing deflated iob: %d", *csp->iob->cur); ++ /* In theory (that is, according to RFC 1950), deflate-compressed ++ * data should begin with a two-byte zlib header and have an ++ * adler32 checksum at the end. It seems that in practice the ++ * only the raw compressed data is sent. Note that this means that ++ * we are not RFC 1950-compliant here, but the advantage is that ++ * this actually works. :) ++ * ++ * We add a dummy null byte to tell zlib where the data ends, ++ * and later inform it not to expect a header. ++ * ++ * Fortunately, add_to_iob() has thoughtfully null-terminated ++ * the buffer; we can just increment the end pointer to include ++ * the dummy byte. ++ */ ++ csp->iob->eod++; ++ } ++ else ++ { ++ log_error (LOG_LEVEL_ERROR, ++ "Unable to determine compression format for decompression"); ++ return JB_ERR_GENERIC; ++ } ++ ++ /* Set up the fields required by zlib. */ ++ zstr.next_in = csp->iob->cur; ++ zstr.avail_in = csp->iob->eod - csp->iob->cur; ++ zstr.zalloc = Z_NULL; ++ zstr.zfree = Z_NULL; ++ zstr.opaque = Z_NULL; ++ ++ /* Passing -MAX_WBITS to inflateInit2 tells the library ++ * that there is no zlib header. ++ */ ++ if (inflateInit2 (&zstr, -MAX_WBITS) != Z_OK) ++ { ++ log_error (LOG_LEVEL_ERROR, ++ "Error initializing decompression"); ++ return JB_ERR_GENERIC; ++ } ++ ++ /* Next, we allocate new storage for the inflated data. ++ * We don't modify the existing iob yet, so in case there ++ * is error in decompression we can recover gracefully. ++ */ ++ buf = zalloc (bufsize); ++ if (NULL == buf) ++ { ++ log_error (LOG_LEVEL_ERROR, ++ "Out of memory decompressing iob"); ++ return JB_ERR_MEMORY; ++ } ++ ++ assert(bufsize >= skip_size); ++ memcpy(buf, csp->iob->buf, skip_size); ++ zstr.avail_out = bufsize - skip_size; ++ zstr.next_out = buf + skip_size; ++ ++ /* Try to decompress the whole stream in one shot. */ ++ while (Z_BUF_ERROR == (status = inflate(&zstr, Z_FINISH))) ++ { ++ /* We need to allocate more memory for the output buffer. */ ++ ++ char *tmpbuf; /* used for realloc'ing the buffer */ ++ int oldbufsize = bufsize; /* keep track of the old bufsize */ ++ ++ /* If zlib wants more data then there's a problem, because ++ * the complete compressed file should have been buffered. ++ */ ++ if (0 == zstr.avail_in) ++ { ++ log_error(LOG_LEVEL_ERROR, ++ "Unexpected end of compressed iob"); ++ return JB_ERR_GENERIC; ++ } ++ ++ /* If we tried the limit and still didn't have enough ++ * memory, just give up. ++ */ ++ if (bufsize == csp->config->buffer_limit) ++ { ++ log_error(LOG_LEVEL_ERROR, "Out of memory decompressing iob"); ++ return JB_ERR_MEMORY; ++ } ++ ++ /* Try doubling the buffer size each time. */ ++ bufsize *= 2; ++ ++ /* Don't exceed the buffer limit. */ ++ if (bufsize > csp->config->buffer_limit) ++ { ++ bufsize = csp->config->buffer_limit; ++ } ++ ++ /* Try to allocate the new buffer. */ ++ tmpbuf = realloc(buf, bufsize); ++ if (NULL == tmpbuf) ++ { ++ log_error(LOG_LEVEL_ERROR, "Out of memory decompressing iob"); ++ freez(buf); ++ return JB_ERR_MEMORY; ++ } ++ else ++ { ++ char *oldnext_out = zstr.next_out; ++ ++ /* Update the fields for inflate() to use the new ++ * buffer, which may be in a different location from ++ * the old one. ++ */ ++ zstr.avail_out += bufsize - oldbufsize; ++ zstr.next_out = tmpbuf + bufsize - zstr.avail_out; ++ ++ /* Compare with an uglier method of calculating these values ++ * that doesn't require the extra oldbufsize variable. ++ */ ++ assert(zstr.avail_out == ++ tmpbuf + bufsize - (char *)zstr.next_out); ++ assert((char *)zstr.next_out == ++ tmpbuf + ((char *)oldnext_out - buf)); ++ assert(zstr.avail_out > 0); ++ ++ buf = tmpbuf; ++ } ++ } ++ ++ inflateEnd(&zstr); ++ if (status != Z_STREAM_END) ++ { ++ /* We failed to decompress the stream. */ ++ log_error(LOG_LEVEL_ERROR, ++ "Error in decompressing to the buffer (iob): %s", ++ zstr.msg); ++ return JB_ERR_GENERIC; ++ } ++ ++ /* Finally, we can actually update the iob, since the ++ * decompression was successful. First, free the old ++ * buffer. ++ */ ++ freez(csp->iob->buf); ++ ++ /* Now, update the iob to use the new buffer. */ ++ csp->iob->buf = buf; ++ csp->iob->cur = csp->iob->buf + skip_size; ++ csp->iob->eod = zstr.next_out; ++ csp->iob->size = bufsize; ++ ++ /* Make sure the new uncompressed iob obeys some minimal ++ * consistency conditions. ++ */ ++ if ((csp->iob->buf < csp->iob->cur) ++ && (csp->iob->cur <= csp->iob->eod) ++ && (csp->iob->eod <= csp->iob->buf + csp->iob->size)) ++ { ++ char t = csp->iob->cur[100]; ++ csp->iob->cur[100] = 0; ++ log_error(LOG_LEVEL_INFO, ++ "Sucessfully decompressed: %s", csp->iob->cur); ++ csp->iob->cur[100] = t; ++ return JB_ERR_OK; ++ } ++ else ++ { ++ /* It seems that zlib did something weird. */ ++ log_error(LOG_LEVEL_ERROR, ++ "Unexpected error decompressing the buffer (iob): %d==%d, %d>%d, %d<%d", csp->iob->cur, csp->iob->buf + skip_size, csp->iob->eod, csp->iob->buf, csp->iob->eod, csp->iob->buf + csp->iob->size); ++ return JB_ERR_GENERIC; ++ } ++ ++} ++#endif /* defined(FEATURE_ZLIB) */ ++ ++ + /********************************************************************* + * + * Function : get_header +@@ -937,13 +1216,59 @@ + *********************************************************************/ + jb_err server_content_encoding(struct client_state *csp, char **header) + { ++#ifdef FEATURE_ZLIB ++ if (strstr(*header, "gzip")) ++ { ++ /* ++ * If the body was modified, we have tried to ++ * decompress it, so adjust the header if necessary. ++ */ ++ if ((csp->flags & CSP_FLAG_MODIFIED) /* we attempted to decompress */ ++ && !(csp->content_type & CT_TABOO)) /* decompression was successful */ ++ { ++ freez(*header); ++ *header = strdup("Content-Encoding: identity"); ++ return (header == NULL) ? JB_ERR_MEMORY : JB_ERR_OK; ++ } ++ else ++ { ++ csp->content_type |= CT_GZIP; ++ } ++ } ++ else if (strstr(*header, "deflate")) ++ { ++ /* ++ * If the body was modified, we have tried to ++ * decompress it, so adjust the header if necessary. ++ */ ++ if ((csp->flags & CSP_FLAG_MODIFIED) /* we attempted to decompress */ ++ && !(csp->content_type & CT_TABOO)) /* decompression was successful */ ++ { ++ freez(*header); ++ *header = strdup("Content-Encoding: identity"); ++ return (header == NULL) ? JB_ERR_MEMORY : JB_ERR_OK; ++ } ++ else ++ { ++ csp->content_type |= CT_DEFLATE; ++ } ++ } ++ else if (strstr(*header, "compress")) ++ { ++ /* We can't decompress this; therefore we can't filter ++ * it either. ++ */ ++ csp->content_type |= CT_TABOO; ++ } ++#else /* !defined(FEATURE_GZIP) */ + /* + * Turn off pcrs and gif filtering if body compressed + */ + if (strstr(*header, "gzip") || strstr(*header, "compress") || strstr(*header, "deflate")) + { +- csp->content_type = CT_TABOO; ++ csp->content_type |= CT_TABOO; + } ++#endif /* !defined(FEATURE_GZIP) */ + + return JB_ERR_OK; + +diff -Nru privoxy-3.0.3-stable.orig/parsers.h privoxy-3.0.3-stable/parsers.h +--- privoxy-3.0.3-stable.orig/parsers.h 2002-09-25 17:52:46.000000000 +0300 ++++ privoxy-3.0.3-stable/parsers.h 2005-02-27 01:01:23.079736680 +0200 +@@ -194,6 +194,7 @@ + + extern int flush_socket(jb_socket fd, struct client_state *csp); + extern jb_err add_to_iob(struct client_state *csp, char *buf, int n); ++extern jb_err decompress_iob(struct client_state *csp); + extern char *get_header(struct client_state *csp); + extern char *get_header_value(const struct list *header_list, const char *header_name); + extern char *sed(const struct parsers pats[], const add_header_func_ptr more_headers[], struct client_state *csp); +diff -Nru privoxy-3.0.3-stable.orig/project.h privoxy-3.0.3-stable/project.h +--- privoxy-3.0.3-stable.orig/project.h 2004-01-30 17:29:29.000000000 +0200 ++++ privoxy-3.0.3-stable/project.h 2005-02-27 01:01:23.081736376 +0200 +@@ -818,6 +818,15 @@ + #define CT_TABOO 4 /**< csp->content_type bitmask: + DO NOT filter, irrespective of other flags. */ + ++/* Although these are not, strictly speaking, content types ++ * (they are content encodings), it is simple to handle ++ * them as such. ++ */ ++#define CT_GZIP 8 /**< csp->content_type bitmask: ++ gzip-compressed data. */ ++#define CT_DEFLATE 16 /**< csp->content_type bitmask: ++ zlib-compressed data. */ ++ + /** + * The mask which includes all actions. + */ +@@ -862,6 +871,8 @@ + #define ACTION_VANILLA_WAFER 0x00008000UL + /** Action bitmap: Limit CONNECT requests to safe ports. */ + #define ACTION_LIMIT_CONNECT 0x00010000UL ++/** Action bitmap: Uncompress incoming text for filtering. */ ++#define ACTION_DECOMPRESS_IN 0x00020000UL + + /** Action string index: How to deanimate GIFs */ + #define ACTION_STRING_DEANIMATE 0 diff --git a/www-proxy/privoxy/privoxy-3.0.2.ebuild b/www-proxy/privoxy/privoxy-3.0.2.ebuild index 08a5927ae075..9621761726df 100644 --- a/www-proxy/privoxy/privoxy-3.0.2.ebuild +++ b/www-proxy/privoxy/privoxy-3.0.2.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/www-proxy/privoxy/privoxy-3.0.2.ebuild,v 1.4 2005/02/24 15:43:54 mrness Exp $ +# $Header: /var/cvsroot/gentoo-x86/www-proxy/privoxy/privoxy-3.0.2.ebuild,v 1.5 2005/02/26 23:22:34 mrness Exp $ inherit eutils @@ -11,7 +11,7 @@ SRC_URI="mirror://sourceforge/ijbswa/${P}-stable-src.tar.gz" RESTRICT="nomirror" IUSE="selinux" -SLOT="2" +SLOT="0" KEYWORDS="x86 ppc alpha sparc" LICENSE="GPL-2" diff --git a/www-proxy/privoxy/privoxy-3.0.3-r1.ebuild b/www-proxy/privoxy/privoxy-3.0.3-r1.ebuild index 92def516dc64..63d854233ce3 100644 --- a/www-proxy/privoxy/privoxy-3.0.3-r1.ebuild +++ b/www-proxy/privoxy/privoxy-3.0.3-r1.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/www-proxy/privoxy/privoxy-3.0.3-r1.ebuild,v 1.1 2005/02/24 15:43:54 mrness Exp $ +# $Header: /var/cvsroot/gentoo-x86/www-proxy/privoxy/privoxy-3.0.3-r1.ebuild,v 1.2 2005/02/26 23:22:34 mrness Exp $ inherit eutils @@ -10,7 +10,7 @@ SRC_URI="mirror://sourceforge/ijbswa/${P}-stable-src.tar.gz" RESTRICT="nomirror" IUSE="pcre selinux" -SLOT="2" +SLOT="0" KEYWORDS="~x86 ~ppc ~alpha ~sparc ~amd64" LICENSE="GPL-2" diff --git a/www-proxy/privoxy/privoxy-3.0.3-r2.ebuild b/www-proxy/privoxy/privoxy-3.0.3-r2.ebuild new file mode 100644 index 000000000000..0648addeaa47 --- /dev/null +++ b/www-proxy/privoxy/privoxy-3.0.3-r2.ebuild @@ -0,0 +1,94 @@ +# Copyright 1999-2005 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/www-proxy/privoxy/privoxy-3.0.3-r2.ebuild,v 1.1 2005/02/26 23:22:34 mrness Exp $ + +inherit toolchain-funcs eutils + +HOMEPAGE="http://www.privoxy.org" +DESCRIPTION="A web proxy with advanced filtering capabilities for protecting privacy against internet junk." +SRC_URI="mirror://sourceforge/ijbswa/${P}-stable-src.tar.gz" + +IUSE="pcre selinux" +SLOT="0" +KEYWORDS="~x86 ~ppc ~alpha ~sparc ~amd64" +LICENSE="GPL-2" + +DEPEND=">=sys-apps/sed-4 + =sys-devel/autoconf-2.1* + virtual/libc + pcre? ( dev-libs/libpcre )" + +RDEPEND="virtual/libc + selinux? ( sec-policy/selinux-privoxy ) + pcre? ( dev-libs/libpcre )" + +S="${WORKDIR}/${P}-stable" + +pkg_setup() { + enewgroup privoxy + enewuser privoxy -1 /bin/false /etc/privoxy privoxy +} + +src_unpack() { + unpack ${A} + cd ${S} + + # update to privoxy 3.0.3-2 + epatch ${FILESDIR}/privoxy-3.0.3.2.patch + # add gzip and zlib decompression + epatch ${FILESDIR}/privoxy-zlib.patch + + rm ${S}/autom4te.cache/{output.0,requests,traces.0} + + sed -e 's:confdir .:confdir /etc/privoxy:' \ + -e 's:logdir .:logdir /var/log/privoxy:' \ + -e 's:logfile logfile:logfile privoxy.log:' \ + -i ${S}/config || die "sed failed." + sed -e 's:^\+set-image-blocker{pattern}:+set-image-blocker{blank}:' \ + -i ${S}/default.action.master || die "sed 2 failed." +} + +src_compile() { + export WANT_AUTOCONF=2.1 + autoheader || die "autoheader failed" + autoconf || die "autoconf failed" + + export CC=$(tc-getCC) + econf \ + $(use_enable pcre dynamic-pcre) \ + --sysconfdir=/etc/privoxy || die "econf failed" + + emake || die "make failed." +} + +src_install () { + diropts -m 0750 -g privoxy -o privoxy + insopts -m 0640 -g privoxy -o privoxy + + keepdir /var/log/privoxy + + insinto /etc/privoxy + doins default.action default.filter config standard.action trust user.action + + insinto /etc/privoxy/templates + doins templates/* + + doman privoxy.1 + dodoc LICENSE README AUTHORS doc/text/faq.txt ChangeLog + + insopts -m 0644 -g root -o root + diropts -m 0755 -g root -o root + for i in developer-manual faq man-page user-manual + do + insinto /usr/share/doc/${PF}/$i + doins doc/webserver/$i/* + done + + insopts -m 0750 -g root -o root + insinto /usr/sbin + doins privoxy + newinitd ${FILESDIR}/privoxy.rc7 privoxy + insopts -m 0640 + insinto /etc/logrotate.d + newins ${FILESDIR}/privoxy.logrotate privoxy +} diff --git a/www-proxy/privoxy/privoxy-3.0.3.ebuild b/www-proxy/privoxy/privoxy-3.0.3.ebuild index ccbfb14e4366..6f071c25d45d 100644 --- a/www-proxy/privoxy/privoxy-3.0.3.ebuild +++ b/www-proxy/privoxy/privoxy-3.0.3.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/www-proxy/privoxy/privoxy-3.0.3.ebuild,v 1.3 2005/02/24 15:43:54 mrness Exp $ +# $Header: /var/cvsroot/gentoo-x86/www-proxy/privoxy/privoxy-3.0.3.ebuild,v 1.4 2005/02/26 23:22:34 mrness Exp $ inherit eutils @@ -11,7 +11,7 @@ SRC_URI="mirror://sourceforge/ijbswa/${P}-stable-src.tar.gz" RESTRICT="nomirror" IUSE="selinux" -SLOT="2" +SLOT="0" KEYWORDS="~x86 ~ppc alpha ~sparc ~amd64" LICENSE="GPL-2" |