diff options
author | Alin Năstac <mrness@gentoo.org> | 2007-06-17 07:06:38 +0000 |
---|---|---|
committer | Alin Năstac <mrness@gentoo.org> | 2007-06-17 07:06:38 +0000 |
commit | 1b056785acc013b1559bee11837b362b899a4cb4 (patch) | |
tree | 76435e93cb87f93de688e560fb30d1ad1230bb57 /net-proxy/privoxy | |
parent | Added ~ppc, bug #178071 (diff) | |
download | historical-1b056785acc013b1559bee11837b362b899a4cb4.tar.gz historical-1b056785acc013b1559bee11837b362b899a4cb4.tar.bz2 historical-1b056785acc013b1559bee11837b362b899a4cb4.zip |
Remove obsolete versions.
Package-Manager: portage-2.1.2.7
Diffstat (limited to 'net-proxy/privoxy')
-rw-r--r-- | net-proxy/privoxy/ChangeLog | 9 | ||||
-rw-r--r-- | net-proxy/privoxy/Manifest | 65 | ||||
-rw-r--r-- | net-proxy/privoxy/files/digest-privoxy-3.0.3-r3 | 3 | ||||
-rw-r--r-- | net-proxy/privoxy/files/digest-privoxy-3.0.3-r5 | 3 | ||||
-rw-r--r-- | net-proxy/privoxy/files/digest-privoxy-3.0.5_beta | 3 | ||||
-rw-r--r-- | net-proxy/privoxy/files/privoxy-3.0.3-zlib.patch | 517 | ||||
-rw-r--r-- | net-proxy/privoxy/files/privoxy-zlib.patch | 508 | ||||
-rw-r--r-- | net-proxy/privoxy/files/privoxy.initd (renamed from net-proxy/privoxy/files/privoxy.rc7) | 2 | ||||
-rw-r--r-- | net-proxy/privoxy/privoxy-3.0.3-r3.ebuild | 92 | ||||
-rw-r--r-- | net-proxy/privoxy/privoxy-3.0.3-r5.ebuild | 85 | ||||
-rw-r--r-- | net-proxy/privoxy/privoxy-3.0.5_beta.ebuild | 84 | ||||
-rw-r--r-- | net-proxy/privoxy/privoxy-3.0.6.ebuild | 4 |
12 files changed, 33 insertions, 1342 deletions
diff --git a/net-proxy/privoxy/ChangeLog b/net-proxy/privoxy/ChangeLog index cd41157e6b8a..1e2fcaddc6e8 100644 --- a/net-proxy/privoxy/ChangeLog +++ b/net-proxy/privoxy/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for net-proxy/privoxy # Copyright 2002-2007 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-proxy/privoxy/ChangeLog,v 1.22 2007/04/24 18:38:22 dertobi123 Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-proxy/privoxy/ChangeLog,v 1.23 2007/06/17 07:06:38 mrness Exp $ + + 17 Jun 2007; Alin Năstac <mrness@gentoo.org> + -files/privoxy-3.0.3-zlib.patch, +files/privoxy.initd, -files/privoxy.rc7, + -files/privoxy-zlib.patch, -privoxy-3.0.3-r3.ebuild, + -privoxy-3.0.3-r5.ebuild, -privoxy-3.0.5_beta.ebuild, + privoxy-3.0.6.ebuild: + Remove obsolete versions. 24 Apr 2007; Tobias Scherbaum <dertobi123@gentoo.org> privoxy-3.0.6.ebuild: diff --git a/net-proxy/privoxy/Manifest b/net-proxy/privoxy/Manifest index eccb674d47fd..208c66a7d1c0 100644 --- a/net-proxy/privoxy/Manifest +++ b/net-proxy/privoxy/Manifest @@ -1,59 +1,38 @@ -AUX privoxy-3.0.3-zlib.patch 18288 RMD160 e015514be80167193422751db5bad0fad63df7d1 SHA1 cf1be95da02cc58a40e341140029374f05689460 SHA256 4c1aee2cc7ee72cff19a9e50ca3158534d57724419c1b7a5cf1072708e218dde -MD5 b35f03c7c5b207f9c216f8a66978bac0 files/privoxy-3.0.3-zlib.patch 18288 -RMD160 e015514be80167193422751db5bad0fad63df7d1 files/privoxy-3.0.3-zlib.patch 18288 -SHA256 4c1aee2cc7ee72cff19a9e50ca3158534d57724419c1b7a5cf1072708e218dde files/privoxy-3.0.3-zlib.patch 18288 +-----BEGIN PGP SIGNED MESSAGE----- +Hash: SHA1 + AUX privoxy-3.0.6-implicit-decl.patch 391 RMD160 e3273410a60598f3df9e35a844a2e2aa3cc16760 SHA1 54c2f4880f8e6071d149b2326850501ec2098520 SHA256 e2c228118aa5debd505c54699d22025336a280d0e4cd4239cf457b3aa592fbea MD5 ce362ff76055d9f4244f10b01f96cd2e files/privoxy-3.0.6-implicit-decl.patch 391 RMD160 e3273410a60598f3df9e35a844a2e2aa3cc16760 files/privoxy-3.0.6-implicit-decl.patch 391 SHA256 e2c228118aa5debd505c54699d22025336a280d0e4cd4239cf457b3aa592fbea files/privoxy-3.0.6-implicit-decl.patch 391 -AUX privoxy-zlib.patch 17945 RMD160 8a336222a82b2c3c1302df0e76585fb9ca3878f5 SHA1 e66c85a9135c11c215cbe9486d50954eea849cf8 SHA256 dc6cb55feaf17cea48e07abfb63ffb3d6e5a8a55db2dadf2cbbc8b5e5b2b40f6 -MD5 199b985be5ba80912fdd3bf5776e697f files/privoxy-zlib.patch 17945 -RMD160 8a336222a82b2c3c1302df0e76585fb9ca3878f5 files/privoxy-zlib.patch 17945 -SHA256 dc6cb55feaf17cea48e07abfb63ffb3d6e5a8a55db2dadf2cbbc8b5e5b2b40f6 files/privoxy-zlib.patch 17945 +AUX privoxy.initd 581 RMD160 efd70ec873f628bf5de8852d6cd82d2ea4190938 SHA1 eef9349a596011fcdb381184faf61c73f1ab3dfb SHA256 c5b41e8e067df6a34d67704a17185c15a4c155dd4b1bf2cfe1aa939bcc97a61a +MD5 d4c1eb95abff06816f51840d8f98abb9 files/privoxy.initd 581 +RMD160 efd70ec873f628bf5de8852d6cd82d2ea4190938 files/privoxy.initd 581 +SHA256 c5b41e8e067df6a34d67704a17185c15a4c155dd4b1bf2cfe1aa939bcc97a61a files/privoxy.initd 581 AUX privoxy.logrotate 191 RMD160 0619507db8b0ad5bdd3d0a390807e52da4afca3f SHA1 78e91faf72b5541cb98467b99f5be1d93fff014c SHA256 a14373c8a26aab32f6f025c11a5521d7923ce900d00b31aa61da9f3979e3bb2e MD5 f2b6a652dbfbc65e5b89024a8ea3da7e files/privoxy.logrotate 191 RMD160 0619507db8b0ad5bdd3d0a390807e52da4afca3f files/privoxy.logrotate 191 SHA256 a14373c8a26aab32f6f025c11a5521d7923ce900d00b31aa61da9f3979e3bb2e files/privoxy.logrotate 191 -AUX privoxy.rc7 579 RMD160 85c9d36031e6081f9e6588592bbeca8387975070 SHA1 52fcfec8b6b2647c014a144b8ed4d315dfb6416d SHA256 b5a9704fc92820bef5c1b7f6d039e7fee813fc12022dd2fe782663becc5e9a67 -MD5 2a366b72a6ff8d6d01cf0bef2ac71f0a files/privoxy.rc7 579 -RMD160 85c9d36031e6081f9e6588592bbeca8387975070 files/privoxy.rc7 579 -SHA256 b5a9704fc92820bef5c1b7f6d039e7fee813fc12022dd2fe782663becc5e9a67 files/privoxy.rc7 579 -DIST privoxy-3.0.3-stable-src.tar.gz 1561072 RMD160 ae77a87c51ec8685f9352c99a8db820fc95b9202 SHA1 8aa5ad21a819c0cd5e5f3aadf24e9fb0d813bdaa SHA256 4dab0049049c1ae6cfb00faea606d981535d0f0a65aab17e3179cc3d75de9f84 -DIST privoxy-3.0.5-beta-src.tar.gz 1727642 RMD160 c446ca3646bf88357d3102b1cbc867a1daf77876 SHA1 33478d3420346b3893e4f10c9145dc5c6c6ec545 SHA256 e7285b27311fe2093d742e4f8c553a04232946f66aa6ad6bc6141f76c1b0b489 DIST privoxy-3.0.6-stable-src.tar.gz 1755661 RMD160 96483460ce56e6abc062278882997c548bb2e119 SHA1 6369c02ef6e044d23fd1d90f6523b489abe58c0c SHA256 49e49d92d3b22c0fe730fef0f067668a51bb8a7aae53277ba709f301066e5dc0 -EBUILD privoxy-3.0.3-r3.ebuild 2355 RMD160 1503f052336e3e80160972f9a0d4c79ed50c382c SHA1 4964ba28e10a87f120ffc0dcf8de817fd9975003 SHA256 50cf6ba57db0194c421d1c51186a3923bd395f18d36967db283bdc570c802bbb -MD5 116b629d35a9c45ff430fbbda3f46b51 privoxy-3.0.3-r3.ebuild 2355 -RMD160 1503f052336e3e80160972f9a0d4c79ed50c382c privoxy-3.0.3-r3.ebuild 2355 -SHA256 50cf6ba57db0194c421d1c51186a3923bd395f18d36967db283bdc570c802bbb privoxy-3.0.3-r3.ebuild 2355 -EBUILD privoxy-3.0.3-r5.ebuild 2247 RMD160 309c3b1bca01f14492024986b129df24e8066089 SHA1 bff5404a6a32dc98b13f7117f0f35c38f8ae763d SHA256 53f9a9b92762eebf1bb6039b3fd01e46a331e1329d4ccacc1d58a5e71d3e1de1 -MD5 b913bd706b581b2e65d934a1a34a4ceb privoxy-3.0.3-r5.ebuild 2247 -RMD160 309c3b1bca01f14492024986b129df24e8066089 privoxy-3.0.3-r5.ebuild 2247 -SHA256 53f9a9b92762eebf1bb6039b3fd01e46a331e1329d4ccacc1d58a5e71d3e1de1 privoxy-3.0.3-r5.ebuild 2247 -EBUILD privoxy-3.0.5_beta.ebuild 2137 RMD160 ab16a2f4f4e999c4f54dc616743fb466e406bf93 SHA1 a25efa954823d81f4c56ca64dd0f8a8c0eaf0f6c SHA256 4b244b8f155201482f32e6481138f8e95c8d4388dfc42d05850513bf7403b9c1 -MD5 1cb1abd427a9624cfa84a5f99af1bdf5 privoxy-3.0.5_beta.ebuild 2137 -RMD160 ab16a2f4f4e999c4f54dc616743fb466e406bf93 privoxy-3.0.5_beta.ebuild 2137 -SHA256 4b244b8f155201482f32e6481138f8e95c8d4388dfc42d05850513bf7403b9c1 privoxy-3.0.5_beta.ebuild 2137 -EBUILD privoxy-3.0.6.ebuild 2040 RMD160 b569f4078fb2519f5ef47b6b5cc60d8e2b4cb71f SHA1 b261c0fb32c7e4c5849439b66ba03a472747ec27 SHA256 45676262aae7f989a2ffd8af62cda4c60c47d98ca99b08028be6fd9ac503f320 -MD5 5bd552de36bb465cc49147876bfbcbba privoxy-3.0.6.ebuild 2040 -RMD160 b569f4078fb2519f5ef47b6b5cc60d8e2b4cb71f privoxy-3.0.6.ebuild 2040 -SHA256 45676262aae7f989a2ffd8af62cda4c60c47d98ca99b08028be6fd9ac503f320 privoxy-3.0.6.ebuild 2040 -MISC ChangeLog 7833 RMD160 c91572f2cab00cb22a28cef48000ca56a22772c5 SHA1 72bac492edf231e0bc20e00c1b68f840b1eb633c SHA256 3e7ae150be1d98259cb55ac8114f6fb24a251bc4f0ef8be13e1f250a312965b6 -MD5 b3986b7d3a005b8d8e2d976af567def4 ChangeLog 7833 -RMD160 c91572f2cab00cb22a28cef48000ca56a22772c5 ChangeLog 7833 -SHA256 3e7ae150be1d98259cb55ac8114f6fb24a251bc4f0ef8be13e1f250a312965b6 ChangeLog 7833 +EBUILD privoxy-3.0.6.ebuild 2038 RMD160 2c1581affe3aafa1511177ac2b544624ca79818c SHA1 1a7d5059bf23cc4cbe4584fa4c0f3378485df6f2 SHA256 64f80ba31a09e6fdfb4091d11632e92722f7be54aaeb4202bd2d41f99da79489 +MD5 7f3b5c482a0ffb00a8eea25c4ba6f34b privoxy-3.0.6.ebuild 2038 +RMD160 2c1581affe3aafa1511177ac2b544624ca79818c privoxy-3.0.6.ebuild 2038 +SHA256 64f80ba31a09e6fdfb4091d11632e92722f7be54aaeb4202bd2d41f99da79489 privoxy-3.0.6.ebuild 2038 +MISC ChangeLog 8118 RMD160 2638cc39e8278e8a295d7a721255dc0de72b88c6 SHA1 c8386c63e2581d9b2d250cfe1c1502db8d022093 SHA256 b44aeebb6a4110dca851260889b3c807d7be01d5215f35527c77ae7d902aed6d +MD5 ab6f3a4735e8373c7a9bb8791a3c6227 ChangeLog 8118 +RMD160 2638cc39e8278e8a295d7a721255dc0de72b88c6 ChangeLog 8118 +SHA256 b44aeebb6a4110dca851260889b3c807d7be01d5215f35527c77ae7d902aed6d ChangeLog 8118 MISC metadata.xml 291 RMD160 1e9cbadea15378b291cd003139d8fbdc8cf4595b SHA1 27e52a5679b01f661170e997bdc9578ef42a5d18 SHA256 694b05be02eb88162313a10a1e3e44acf89214381eab941a0ec497ab8925049c MD5 a31f52e5785898edac47ca00310413e2 metadata.xml 291 RMD160 1e9cbadea15378b291cd003139d8fbdc8cf4595b metadata.xml 291 SHA256 694b05be02eb88162313a10a1e3e44acf89214381eab941a0ec497ab8925049c metadata.xml 291 -MD5 5307330523879d08bf02e0dff8a3f443 files/digest-privoxy-3.0.3-r3 277 -RMD160 4f7d535834fbea8974915e7b7dc969e5a5476e46 files/digest-privoxy-3.0.3-r3 277 -SHA256 22332b4b4fb78ccf6057a77d6812bfe721d6ef2e854ed04b1134df694b978b53 files/digest-privoxy-3.0.3-r3 277 -MD5 5307330523879d08bf02e0dff8a3f443 files/digest-privoxy-3.0.3-r5 277 -RMD160 4f7d535834fbea8974915e7b7dc969e5a5476e46 files/digest-privoxy-3.0.3-r5 277 -SHA256 22332b4b4fb78ccf6057a77d6812bfe721d6ef2e854ed04b1134df694b978b53 files/digest-privoxy-3.0.3-r5 277 -MD5 aa90b6fb0fb770f5b39a26c618b4f280 files/digest-privoxy-3.0.5_beta 271 -RMD160 c507d9f2e095e8298a4fc0b19c8f407909c8afa7 files/digest-privoxy-3.0.5_beta 271 -SHA256 5d0da5d18b1ec7b2b16c276461c529ea81e64d526d37e317e689495a302ba447 files/digest-privoxy-3.0.5_beta 271 MD5 5887a2b38f85fce3beed526895d647e5 files/digest-privoxy-3.0.6 277 RMD160 df1f07afc9411e18f9e1e018810cb7307e83ef3a files/digest-privoxy-3.0.6 277 SHA256 03090ded4e9c8d64974a571589d572916d16c7e0436ec50f2df3d4f7b5d6a5fb files/digest-privoxy-3.0.6 277 +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v2.0.4 (GNU/Linux) + +iD8DBQFGdN2GJnxX6mF440QRAsJ/AKCTNdNSH/kE0jPefvI38qATWCGF0ACeOsSZ +bfOmE4Z6+GTG9Hx0QDiHBKg= +=vhTj +-----END PGP SIGNATURE----- diff --git a/net-proxy/privoxy/files/digest-privoxy-3.0.3-r3 b/net-proxy/privoxy/files/digest-privoxy-3.0.3-r3 deleted file mode 100644 index 59989685087a..000000000000 --- a/net-proxy/privoxy/files/digest-privoxy-3.0.3-r3 +++ /dev/null @@ -1,3 +0,0 @@ -MD5 b0710be8af09409bfb03f52523a17010 privoxy-3.0.3-stable-src.tar.gz 1561072 -RMD160 ae77a87c51ec8685f9352c99a8db820fc95b9202 privoxy-3.0.3-stable-src.tar.gz 1561072 -SHA256 4dab0049049c1ae6cfb00faea606d981535d0f0a65aab17e3179cc3d75de9f84 privoxy-3.0.3-stable-src.tar.gz 1561072 diff --git a/net-proxy/privoxy/files/digest-privoxy-3.0.3-r5 b/net-proxy/privoxy/files/digest-privoxy-3.0.3-r5 deleted file mode 100644 index 59989685087a..000000000000 --- a/net-proxy/privoxy/files/digest-privoxy-3.0.3-r5 +++ /dev/null @@ -1,3 +0,0 @@ -MD5 b0710be8af09409bfb03f52523a17010 privoxy-3.0.3-stable-src.tar.gz 1561072 -RMD160 ae77a87c51ec8685f9352c99a8db820fc95b9202 privoxy-3.0.3-stable-src.tar.gz 1561072 -SHA256 4dab0049049c1ae6cfb00faea606d981535d0f0a65aab17e3179cc3d75de9f84 privoxy-3.0.3-stable-src.tar.gz 1561072 diff --git a/net-proxy/privoxy/files/digest-privoxy-3.0.5_beta b/net-proxy/privoxy/files/digest-privoxy-3.0.5_beta deleted file mode 100644 index 71f14cf256f2..000000000000 --- a/net-proxy/privoxy/files/digest-privoxy-3.0.5_beta +++ /dev/null @@ -1,3 +0,0 @@ -MD5 61f16bde1f88090eae88bf8b7fdbb557 privoxy-3.0.5-beta-src.tar.gz 1727642 -RMD160 c446ca3646bf88357d3102b1cbc867a1daf77876 privoxy-3.0.5-beta-src.tar.gz 1727642 -SHA256 e7285b27311fe2093d742e4f8c553a04232946f66aa6ad6bc6141f76c1b0b489 privoxy-3.0.5-beta-src.tar.gz 1727642 diff --git a/net-proxy/privoxy/files/privoxy-3.0.3-zlib.patch b/net-proxy/privoxy/files/privoxy-3.0.3-zlib.patch deleted file mode 100644 index 00ba739ac127..000000000000 --- a/net-proxy/privoxy/files/privoxy-3.0.3-zlib.patch +++ /dev/null @@ -1,517 +0,0 @@ -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 2006-03-29 01:19:45.337430250 +0300 -@@ -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 2006-03-29 01:19:45.353431250 +0300 -@@ -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 2006-03-29 01:19:03.000000000 +0300 -+++ privoxy-3.0.3-stable/default.action.master 2006-03-29 01:19:45.357431500 +0300 -@@ -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 2006-03-29 01:23:20.022847250 +0300 -@@ -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 = 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 2006-03-29 01:19:45.357431500 +0300 -@@ -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 2006-03-29 01:19:45.361431750 +0300 -@@ -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 2006-03-29 01:19:45.361431750 +0300 -@@ -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 2006-03-29 01:28:21.741703500 +0300 -@@ -563,7 +563,7 @@ - #define JB_ERR_PARSE 4 /**< Error parsing file */ - #define JB_ERR_MODIFIED 5 /**< File has been modified outside of the - CGI actions editor. */ -- -+#define JB_ERR_GENERIC 6 - - /** - * This macro is used to free a pointer that may be NULL. -@@ -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/net-proxy/privoxy/files/privoxy-zlib.patch b/net-proxy/privoxy/files/privoxy-zlib.patch deleted file mode 100644 index 174ce9182b17..000000000000 --- a/net-proxy/privoxy/files/privoxy-zlib.patch +++ /dev/null @@ -1,508 +0,0 @@ -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/net-proxy/privoxy/files/privoxy.rc7 b/net-proxy/privoxy/files/privoxy.initd index b06d990b273d..279a1f1abbbb 100644 --- a/net-proxy/privoxy/files/privoxy.rc7 +++ b/net-proxy/privoxy/files/privoxy.initd @@ -1,7 +1,7 @@ #!/sbin/runscript # Copyright 1999-2004 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-proxy/privoxy/files/privoxy.rc7,v 1.1 2005/04/22 19:15:11 mrness Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-proxy/privoxy/files/privoxy.initd,v 1.1 2007/06/17 07:06:38 mrness Exp $ depend() { need net diff --git a/net-proxy/privoxy/privoxy-3.0.3-r3.ebuild b/net-proxy/privoxy/privoxy-3.0.3-r3.ebuild deleted file mode 100644 index c73bf5af5c2d..000000000000 --- a/net-proxy/privoxy/privoxy-3.0.3-r3.ebuild +++ /dev/null @@ -1,92 +0,0 @@ -# Copyright 1999-2006 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-proxy/privoxy/privoxy-3.0.3-r3.ebuild,v 1.5 2006/03/06 21:04:01 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="alpha amd64 ppc sparc x86" -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 -1 /etc/privoxy privoxy -} - -src_unpack() { - unpack ${A} - cd "${S}" - - # 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 - local i - 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/net-proxy/privoxy/privoxy-3.0.3-r5.ebuild b/net-proxy/privoxy/privoxy-3.0.3-r5.ebuild deleted file mode 100644 index caf9f0e424f6..000000000000 --- a/net-proxy/privoxy/privoxy-3.0.3-r5.ebuild +++ /dev/null @@ -1,85 +0,0 @@ -# Copyright 1999-2006 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-proxy/privoxy/privoxy-3.0.3-r5.ebuild,v 1.7 2006/08/21 02:12:10 dang 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 zlib" -SLOT="0" -KEYWORDS="~alpha amd64 ppc sparc x86 ~x86-fbsd" -LICENSE="GPL-2" - -DEPEND="=sys-devel/autoconf-2.1* - pcre? ( dev-libs/libpcre ) - zlib? ( sys-libs/zlib )" -RDEPEND="selinux? ( sec-policy/selinux-privoxy ) - pcre? ( dev-libs/libpcre ) - zlib? ( sys-libs/zlib )" - -S="${WORKDIR}/${P}-stable" - -pkg_setup() { - enewgroup privoxy - enewuser privoxy -1 -1 /etc/privoxy privoxy -} - -src_unpack() { - unpack ${A} - - # add gzip and zlib decompression - use zlib && epatch "${FILESDIR}/${P}-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) \ - $(use_enable zlib) \ - --sysconfdir=/etc/privoxy || die "econf failed" - - emake || die "make failed." -} - -pkg_preinst() { - pkg_setup -} - -src_install () { - dosbin privoxy - newinitd "${FILESDIR}/privoxy.rc7" privoxy - insinto /etc/logrotate.d - newins "${FILESDIR}/privoxy.logrotate" 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 - local i - for i in developer-manual faq man-page user-manual ; do - insinto "/usr/share/doc/${PF}/${i}" - doins doc/webserver/"${i}"/* - done - - diropts -m 0750 -g privoxy -o privoxy - keepdir /var/log/privoxy -} diff --git a/net-proxy/privoxy/privoxy-3.0.5_beta.ebuild b/net-proxy/privoxy/privoxy-3.0.5_beta.ebuild deleted file mode 100644 index 4fa7d0db7992..000000000000 --- a/net-proxy/privoxy/privoxy-3.0.5_beta.ebuild +++ /dev/null @@ -1,84 +0,0 @@ -# Copyright 1999-2006 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-proxy/privoxy/privoxy-3.0.5_beta.ebuild,v 1.1 2006/10/20 18:44:10 mrness Exp $ - -inherit toolchain-funcs eutils autotools - -if [[ "${PV}" = *"beta"* ]] ; then - MY_PV=${PV/_beta/-beta} - MY_PV_S=${MY_PV/beta/BETA} -else - MY_PV=${PV}-stable - MY_PV_S=${MY_PV} -fi - -HOMEPAGE="http://www.privoxy.org - http://sourceforge.net/projects/ijbswa/" -DESCRIPTION="A web proxy with advanced filtering capabilities for protecting privacy against Internet junk" -SRC_URI="mirror://sourceforge/ijbswa/${PN}-${MY_PV}-src.tar.gz" - -IUSE="pcre selinux" -SLOT="0" -KEYWORDS="~alpha ~amd64 ~ppc ~sparc ~x86 ~x86-fbsd" -LICENSE="GPL-2" - -DEPEND="=sys-devel/autoconf-2.1* - pcre? ( dev-libs/libpcre )" -RDEPEND="selinux? ( sec-policy/selinux-privoxy ) - pcre? ( dev-libs/libpcre )" - -S="${WORKDIR}/${PN}-${MY_PV_S}" - -pkg_setup() { - enewgroup privoxy - enewuser privoxy -1 -1 /etc/privoxy privoxy -} - -src_unpack() { - unpack ${A} - - cd "${S}" - sed -e 's:confdir .:confdir /etc/privoxy:' \ - -e 's:logdir .:logdir /var/log/privoxy:' \ - -e 's:logfile logfile:logfile privoxy.log:' \ - -i config || die "sed failed." - sed -e 's:^\+set-image-blocker{pattern}:+set-image-blocker{blank}:' \ - -i default.action.master || die "sed 2 failed." - eautoreconf || die "autoconf failed" -} - -src_compile() { - export CC=$(tc-getCC) - econf \ - $(use_enable pcre dynamic-pcre) \ - --with-user=privoxy \ - --with-group=privoxy \ - --sysconfdir=/etc/privoxy \ - || die "econf failed" - - emake || die "emake failed" -} - -pkg_preinst() { - pkg_setup -} - -src_install () { - dosbin privoxy - newinitd "${FILESDIR}/privoxy.rc7" privoxy - insinto /etc/logrotate.d - newins "${FILESDIR}/privoxy.logrotate" 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 README AUTHORS doc/text/faq.txt ChangeLog - cd doc/webserver - dohtml -r developer-manual faq man-page user-manual - - diropts -m 0750 -g privoxy -o privoxy - keepdir /var/log/privoxy -} diff --git a/net-proxy/privoxy/privoxy-3.0.6.ebuild b/net-proxy/privoxy/privoxy-3.0.6.ebuild index a61be473bbf7..ca15724041c4 100644 --- a/net-proxy/privoxy/privoxy-3.0.6.ebuild +++ b/net-proxy/privoxy/privoxy-3.0.6.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2007 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-proxy/privoxy/privoxy-3.0.6.ebuild,v 1.7 2007/04/24 18:38:22 dertobi123 Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-proxy/privoxy/privoxy-3.0.6.ebuild,v 1.8 2007/06/17 07:06:38 mrness Exp $ WANT_AUTOMAKE="latest" WANT_AUTOCONF="latest" @@ -61,7 +61,7 @@ pkg_preinst() { src_install () { dosbin privoxy - newinitd "${FILESDIR}/privoxy.rc7" privoxy + newinitd "${FILESDIR}/privoxy.initd" privoxy insinto /etc/logrotate.d newins "${FILESDIR}/privoxy.logrotate" privoxy |