diff options
author | Andrew Savchenko <bircoph@gmail.com> | 2011-11-05 23:50:27 +0400 |
---|---|---|
committer | Andrew Savchenko <bircoph@gmail.com> | 2011-11-05 23:50:27 +0400 |
commit | d51d923203853914d486cab57f4fad15e27d0115 (patch) | |
tree | 2b4f8d43b447197be4d37498a756d0cc87edb38c /net-proxy | |
parent | l7-filter-userspace: fix build with gcc-4.5.3 (diff) | |
download | bircoph-d51d923203853914d486cab57f4fad15e27d0115.tar.gz bircoph-d51d923203853914d486cab57f4fad15e27d0115.tar.bz2 bircoph-d51d923203853914d486cab57f4fad15e27d0115.zip |
polipo: fix dns timeouts
In some cases polipo timeouts DNS for available hosts,
see http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=540912
for details.
Diffstat (limited to 'net-proxy')
-rw-r--r-- | net-proxy/polipo/ChangeLog | 170 | ||||
-rw-r--r-- | net-proxy/polipo/Manifest | 8 | ||||
-rw-r--r-- | net-proxy/polipo/files/config | 8 | ||||
-rw-r--r-- | net-proxy/polipo/files/polipo-1.0.4.1-dns.patch | 22 | ||||
-rw-r--r-- | net-proxy/polipo/files/polipo.crond | 9 | ||||
-rw-r--r-- | net-proxy/polipo/files/polipo.initd | 54 | ||||
-rw-r--r-- | net-proxy/polipo/metadata.xml | 6 | ||||
-rw-r--r-- | net-proxy/polipo/polipo-1.0.4.1.ebuild | 48 |
8 files changed, 325 insertions, 0 deletions
diff --git a/net-proxy/polipo/ChangeLog b/net-proxy/polipo/ChangeLog new file mode 100644 index 0000000..c41eaee --- /dev/null +++ b/net-proxy/polipo/ChangeLog @@ -0,0 +1,170 @@ +# ChangeLog for net-proxy/polipo +# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/net-proxy/polipo/ChangeLog,v 1.34 2010/05/31 19:35:27 maekke Exp $ + + 31 May 2010; Markus Meier <maekke@gentoo.org> polipo-1.0.4.1.ebuild: + amd64 stable, bug #300173 + + 29 May 2010; Pawel Hajdan jr <phajdan.jr@gentoo.org> + polipo-1.0.4.1.ebuild: + x86 stable wrt security bug #300173 + +*polipo-1.0.4.1 (26 May 2010) + + 26 May 2010; Jeroen Roovers <jer@gentoo.org> +polipo-1.0.4.1.ebuild: + Version bump (bug #300173). Respect CC. + + 13 Sep 2009; Markus Meier <maekke@gentoo.org> polipo-1.0.4.ebuild: + amd64 stable, bug #284449 + + 12 Sep 2009; Christian Faulhammer <fauli@gentoo.org> polipo-1.0.4.ebuild: + stable x86, security bug 284449 + +*polipo-1.0.4 (13 Jul 2008) + + 13 Jul 2008; Alin Năstac <mrness@gentoo.org> -polipo-1.0.2-r1.ebuild, + +polipo-1.0.4.ebuild: + Version bump. + + 14 Jan 2008; Christoph Mende <angelos@gentoo.org> polipo-1.0.3.ebuild: + Stable on amd64 wrt bug #203753 + + 07 Jan 2008; Alin Năstac <mrness@gentoo.org> files/polipo.initd: + Make init script compatible with POSIX shells, thanks to Fabrizio Montesi + <famontesi@gmail.com> (#204729). + + 01 Jan 2008; Markus Meier <maekke@gentoo.org> polipo-1.0.3.ebuild: + x86 stable, bug #203753 + + 07 Jan 2008; Alin Năstac <mrness@gentoo.org> files/polipo.initd: + Make init script compatible with POSIX shells, thanks to Fabrizio Montesi + <famontesi@gmail.com> (#204729). + + 04 Nov 2007; Alin Năstac <mrness@gentoo.org> polipo-1.0.2-r1.ebuild, + polipo-1.0.3.ebuild: + Remove useless pkg_preinst function. + +*polipo-1.0.3 (02 Nov 2007) + + 02 Nov 2007; Alin Năstac <mrness@gentoo.org> + -files/polipo-0.9.12-gentoo.patch, -files/polipo-0.9.12-printf-ptr.patch, + -files/polipo-0.9.12.initd, -files/polipo-1.0.0-gentoo.patch, + -polipo-0.9.12-r1.ebuild, -polipo-1.0.0.ebuild, -polipo-1.0.1.ebuild, + +polipo-1.0.3.ebuild: + Remove obsolete versions. Version bump. Install HTML documentation. + + 02 Sep 2007; Christian Faulhammer <opfer@gentoo.org> + polipo-1.0.2-r1.ebuild: + stable x86, security bug 190617 + + 01 Sep 2007; Christoph Mende <angelos@gentoo.org> polipo-1.0.2-r1.ebuild: + Stable on amd64 wrt security bug #190617 + +*polipo-1.0.2-r1 (01 Sep 2007) + + 01 Sep 2007; Alin Năstac <mrness@gentoo.org> -polipo-1.0.2.ebuild, + +polipo-1.0.2-r1.ebuild: + Fix man and info path (#190617). + +*polipo-1.0.2 (29 Aug 2007) + + 29 Aug 2007; Alin Năstac <mrness@gentoo.org> +polipo-1.0.2.ebuild: + Version bump wrt security bug #190617. + +*polipo-1.0.1 (19 Aug 2007) + + 19 Aug 2007; Alin Năstac <mrness@gentoo.org> +polipo-1.0.1.ebuild: + Version bump. + + 17 Jun 2007; Alin Năstac <mrness@gentoo.org> files/polipo.crond: + Verify that the service is running before purging old objects from cache. + +*polipo-1.0.0 (17 Jun 2007) + + 17 Jun 2007; Alin Năstac <mrness@gentoo.org> + -files/polipo-0.9.10-gentoo.patch, -files/polipo-0.9.11-gentoo.patch, + +files/polipo-0.9.12.initd, +files/polipo-1.0.0-gentoo.patch, + files/polipo.initd, -polipo-0.9.10.ebuild, -polipo-0.9.11.ebuild, + polipo-0.9.12-r1.ebuild, +polipo-1.0.0.ebuild: + Remove obsolete versions. Version bump (#182258). + + 28 Apr 2007; Torsten Veller <tove@gentoo.org> polipo-0.9.10.ebuild, + polipo-0.9.11.ebuild, polipo-0.9.12-r1.ebuild: + Fix *initd, *confd and *envd calls (#173884, #174266) + + 11 Apr 2007; Andrej Kacian <ticho@gentoo.org> polipo-0.9.12-r1.ebuild: + Stable on x86, bug #174151. + +*polipo-0.9.12-r1 (11 Apr 2007) + + 11 Apr 2007; Alin Năstac <mrness@gentoo.org> + +files/polipo-0.9.12-printf-ptr.patch, -polipo-0.9.12.ebuild, + +polipo-0.9.12-r1.ebuild: + Use correct printf format for pointers. Keep /var/cache/polipo directory. + Stable on amd64. + + 12 Feb 2007; Alin Nastac <mrness@gentoo.org> files/polipo.initd: + Check configuration at service startup. + +*polipo-0.9.12 (08 Feb 2007) + + 08 Feb 2007; Alin Nastac <mrness@gentoo.org> + +files/polipo-0.9.12-gentoo.patch, +polipo-0.9.12.ebuild: + Version bump (#165857). + +*polipo-0.9.11 (15 Jan 2007) + + 15 Jan 2007; Alin Nastac <mrness@gentoo.org> + -files/polipo-0.9.9-gentoo.patch, +files/polipo-0.9.11-gentoo.patch, + -polipo-0.9.9-r2.ebuild, +polipo-0.9.11.ebuild: + Fix "Range without partial content" error (#162160). Version bump. + + 17 Nov 2006; Alin Nastac <mrness@gentoo.org> polipo-0.9.10.ebuild: + Stable on x86. + +*polipo-0.9.10 (13 Oct 2006) + + 13 Oct 2006; Alin Nastac <mrness@gentoo.org> + +files/polipo-0.9.10-gentoo.patch, +polipo-0.9.10.ebuild: + Version bump (#150772). + +*polipo-0.9.9-r2 (06 Sep 2006) + + 06 Sep 2006; Alin Nastac <mrness@gentoo.org> files/polipo.crond, + files/polipo.initd, -polipo-0.9.9-r1.ebuild, +polipo-0.9.9-r2.ebuild: + Minor changes in cron script (#145246) and init script (#145681). + +*polipo-0.9.9-r1 (28 Aug 2006) + + 28 Aug 2006; Alin Nastac <mrness@gentoo.org> files/polipo.crond, + -polipo-0.9.9.ebuild, +polipo-0.9.9-r1.ebuild: + Improve cron script (#145246). + + 05 Jul 2006; Alin Nastac <mrness@gentoo.org> files/polipo.crond, + polipo-0.9.9.ebuild: + Remove sudo dependency - use su instead (#138860). + + 06 Mar 2006; Alin Nastac <mrness@gentoo.org> + -files/polipo-0.9.8-gentoo.patch, -polipo-0.9.8.ebuild, + polipo-0.9.9.ebuild: + Remove old version. Stable on x86. + +*polipo-0.9.9 (06 Dec 2005) + + 06 Dec 2005; Alin Nastac <mrness@gentoo.org> + +files/polipo-0.9.9-gentoo.patch, +polipo-0.9.9.ebuild: + Version bump (#114607). + + 12 Sep 2005; Luis Medinas <metalgod@gentoo.org> polipo-0.9.8.ebuild: + Added ~amd64 keyword. Closes bug #103280. + + 22 Apr 2005; Alin Nastac <mrness@gentoo.org> : + Rename category & herd www-proxy to net-proxy + +*polipo-0.9.8 (26 Mar 2005) + + 26 Mar 2005; Alin Nastac <mrness@gentoo.org> +metadata.xml, +files/config, + +files/polipo-0.9.8-gentoo.patch, +files/polipo.crond, +files/polipo.initd, + +polipo-0.9.8.ebuild: + Initial import from bug #79618. + diff --git a/net-proxy/polipo/Manifest b/net-proxy/polipo/Manifest new file mode 100644 index 0000000..93473f7 --- /dev/null +++ b/net-proxy/polipo/Manifest @@ -0,0 +1,8 @@ +AUX config 167 RMD160 c277cb5c2a60d11ce7eeee781a335f1f475e9287 SHA1 b0ed88a7494f7fe756a1a9999e495a377fc88d11 SHA256 3b600497508790390eb5413cc53ab04bfe8b083324472732b11847acddc91bda +AUX polipo-1.0.4.1-dns.patch 1014 RMD160 057778b668c9ad9272693bfa88c59298a18987e8 SHA1 6a7da8fc9cc87b1bf28f40e2875ccee6f0635def SHA256 d4b2faab078439179b6e6d836248927d45bf938a831affbaf3743c107c222a1e +AUX polipo.crond 234 RMD160 463895559a9d28d38bc11064cdab7882a56128e6 SHA1 59a70f72fdb01f381199f566c3146d7810273363 SHA256 cab7448361658d34593822893688df11d6f02f8b2927dbbbbe84642b335575d0 +AUX polipo.initd 1305 RMD160 e6dd83ec00172d8cc64fc900d88a7842cd42e7b9 SHA1 633c10df334ba27719549eb990ad5d8c1553d19c SHA256 3d8ba3b9c452cf6f0b8b93ebc6dda699811340f2428f5edf8c4cb081aac1d4c4 +DIST polipo-1.0.4.1.tar.gz 180121 RMD160 9422cece234db1b822979e32e976439a2d5757b6 SHA1 e755b585a9bba2b599a6bcc7c6f7035d3cb27bec SHA256 8d6fbfdec600d42823e483b0143704c6f179c349803028a4d2cef056b79f7cfa +EBUILD polipo-1.0.4.1.ebuild 1312 RMD160 0db30e09331912cb4d750c7db641e6c554b9ded2 SHA1 cf64f85959a626b172ce8f110a75d111bae919ff SHA256 4f4404fccef1027ee831fb750b2ac785173294759c673f1a959d96bd53d634fc +MISC ChangeLog 5883 RMD160 38eb769d0437ccaad146d1aef3dd901f5dba9dd6 SHA1 59f64cd2ba7a0fd2fcc6e0f3f352a29d05392a17 SHA256 7a4e15aa350c50ee1f13351fdf165c39f0d5ff6de36bb6dd239cc239aa545c49 +MISC metadata.xml 294 RMD160 9030115eb77480c879cc1b05acf92e90c9825330 SHA1 05e93a9bb94da1af1f7ac486d280d82dc68664fc SHA256 86f147ccac4c6a157b8e94ac26c69c07db91b435bb0ec703a332c17c1f3d1c1a diff --git a/net-proxy/polipo/files/config b/net-proxy/polipo/files/config new file mode 100644 index 0000000..4c92355 --- /dev/null +++ b/net-proxy/polipo/files/config @@ -0,0 +1,8 @@ +daemonise=false +diskCacheRoot=/var/cache/polipo/ +proxyAddress=127.0.0.1 +proxyName=localhost +serverSlots=4 +serverMaxSlots=8 +cacheIsShared=true +allowedClients=127.0.0.1 diff --git a/net-proxy/polipo/files/polipo-1.0.4.1-dns.patch b/net-proxy/polipo/files/polipo-1.0.4.1-dns.patch new file mode 100644 index 0000000..bf5757b --- /dev/null +++ b/net-proxy/polipo/files/polipo-1.0.4.1-dns.patch @@ -0,0 +1,22 @@ +--- polipo-1.0.4/dns.c.orig 2008-01-08 16:56:45.000000000 +0400 ++++ polipo-1.0.4/dns.c 2010-03-29 18:28:43.225601510 +0500 +@@ -1181,7 +1181,8 @@ + } else + releaseAtom(value); + } else if(af == 0) { +- if(query->inet4 || query->inet6) { ++ if(query->inet4 && query->inet4->length || ++ query->inet6 && query->inet6->length) { + do_log(L_WARN, "Host %s has both %s and CNAME -- " + "ignoring CNAME.\n", query->name->string, + query->inet4 ? "A" : "AAAA"); +@@ -1207,7 +1208,8 @@ + if(object->flags & OBJECT_INITIAL) { + assert(!object->headers); + if(cname) { +- assert(query->inet4 == NULL && query->inet6 == NULL); ++ assert(!(query->inet4 && query->inet4->length)); ++ assert(!(query->inet6 && query->inet6->length)); + object->headers = cname; + object->expires = current_time.tv_sec + ttl; + } else if((!query->inet4 || query->inet4->length == 0) && diff --git a/net-proxy/polipo/files/polipo.crond b/net-proxy/polipo/files/polipo.crond new file mode 100644 index 0000000..2bda2cc --- /dev/null +++ b/net-proxy/polipo/files/polipo.crond @@ -0,0 +1,9 @@ +#!/bin/sh + +if /etc/init.d/polipo --quiet status; then + #Expire old cached objects + kill -USR1 $(cat /var/run/polipo.pid) + sleep 1 + nice -n 15 su -s "/bin/sh" -c "polipo -x" polipo > /dev/null + kill -USR2 $(cat /var/run/polipo.pid) +fi diff --git a/net-proxy/polipo/files/polipo.initd b/net-proxy/polipo/files/polipo.initd new file mode 100644 index 0000000..c1b8431 --- /dev/null +++ b/net-proxy/polipo/files/polipo.initd @@ -0,0 +1,54 @@ +#!/sbin/runscript +# Copyright 1999-2005 Gentoo Technologies, Inc. +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-proxy/polipo/files/polipo.initd,v 1.5 2008/01/07 20:17:04 mrness Exp $ + +depend() { + need net +} + +checkconfig() { + { polipo -v || return 1 ; } | { + local retvalue=0 + local name type value desc + while read name type value desc ; do + case ${name} in + configFile) + if [ "${value}" = "(none)" ] ; then + eerror "Unable to read configuration file /etc/polipo/config" + retvalue=1 + fi + ;; + daemonise) + if [ "${value}" != "false" ] ; then + eerror "Configuration option not supported by this init script: ${name}=${value}" + retvalue=1 + fi + ;; + pidFile) + if [ "${value}" != "(none)" ] ; then + eerror "Configuration option not supported by this init script: ${name}=${value}" + retvalue=1 + fi + ;; + esac + done + return ${retvalue} + } +} + +start() { + checkconfig || return 1 + + ebegin "Starting Polipo HTTP proxy" + start-stop-daemon --start --user polipo \ + --background --pidfile /var/run/polipo.pid --make-pidfile \ + --exec /usr/bin/polipo + eend $? +} + +stop() { + ebegin "Stopping Polipo HTTP proxy" + start-stop-daemon --stop --pidfile /var/run/polipo.pid + eend $? +} diff --git a/net-proxy/polipo/metadata.xml b/net-proxy/polipo/metadata.xml new file mode 100644 index 0000000..913049e --- /dev/null +++ b/net-proxy/polipo/metadata.xml @@ -0,0 +1,6 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<herd>net-proxy</herd> +<longdescription>A small and fast caching web proxy designed to be used by one person or a small group of people.</longdescription> +</pkgmetadata> diff --git a/net-proxy/polipo/polipo-1.0.4.1.ebuild b/net-proxy/polipo/polipo-1.0.4.1.ebuild new file mode 100644 index 0000000..221b425 --- /dev/null +++ b/net-proxy/polipo/polipo-1.0.4.1.ebuild @@ -0,0 +1,48 @@ +# Copyright 1999-2010 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-proxy/polipo/polipo-1.0.4.1.ebuild,v 1.3 2010/05/31 19:35:27 maekke Exp $ + +inherit base eutils toolchain-funcs + +DESCRIPTION="A caching web proxy" +HOMEPAGE="http://www.pps.jussieu.fr/~jch/software/polipo/" +SRC_URI="http://www.pps.jussieu.fr/~jch/software/files/${PN}/${P}.tar.gz" +SRC_URI="http://freehaven.net/~chrisd/${PN}/${P}.tar.gz" + +LICENSE="MIT" +SLOT="0" +KEYWORDS="amd64 x86" +IUSE="" + +DEPEND="sys-apps/texinfo" + +PATCHES=( "${FILESDIR}/${P}-dns.patch" ) + +pkg_setup() { + enewgroup polipo + enewuser polipo -1 -1 /var/cache/polipo polipo +} + +src_compile() { + tc-export CC + emake PREFIX=/usr "CDEBUGFLAGS=${CFLAGS}" all || die "build failed" +} + +src_install() { + einstall PREFIX=/usr MANDIR=/usr/share/man INFODIR=/usr/share/info "TARGET=${D}" || die "install failed" + + newinitd "${FILESDIR}/polipo.initd" polipo + insinto /etc/polipo ; doins "${FILESDIR}/config" + exeinto /etc/cron.daily ; newexe "${FILESDIR}/polipo.crond" polipo.sh + + diropts -m0750 -o polipo -g polipo + keepdir /var/cache/polipo + + dodoc CHANGES README + dohtml html/* +} + +pkg_postinst() { + einfo "Do not forget to read the manual." + einfo "Change the config file in /etc/polipo to suit your needs." +} |