summaryrefslogtreecommitdiff
path: root/net-proxy/privoxy
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /net-proxy/privoxy
reinit the tree, so we can have metadata
Diffstat (limited to 'net-proxy/privoxy')
-rw-r--r--net-proxy/privoxy/Manifest9
-rw-r--r--net-proxy/privoxy/files/privoxy-3.0.19-gentoo.patch114
-rw-r--r--net-proxy/privoxy/files/privoxy.initd-328
-rw-r--r--net-proxy/privoxy/files/privoxy.logrotate9
-rw-r--r--net-proxy/privoxy/files/privoxy.service10
-rw-r--r--net-proxy/privoxy/metadata.xml38
-rw-r--r--net-proxy/privoxy/privoxy-3.0.26.ebuild127
7 files changed, 335 insertions, 0 deletions
diff --git a/net-proxy/privoxy/Manifest b/net-proxy/privoxy/Manifest
new file mode 100644
index 000000000000..1afc923fd01b
--- /dev/null
+++ b/net-proxy/privoxy/Manifest
@@ -0,0 +1,9 @@
+AUX privoxy-3.0.19-gentoo.patch 3661 SHA256 71c6e6b042a820c44e7110c8a60f7987c826900fd4b22073565977ce63d4860a SHA512 e0f916f33b8f17375b60686a0e4795883f29e46c55e273e0a69fae63d4b4e5a2585bb86b04aa288fdd75cdf51eedf7d72a9f8092e13a853e934e0029ae919a24 WHIRLPOOL 701a5c7ec31b7d2d68801005d81f01ec727712aab7d5d866427a78c940ef2d63201f6ba9e1679bf8e919653b355ea8a0577d4bce5c13b24812d43f2b09797553
+AUX privoxy.initd-3 639 SHA256 7a2e3996dd9dd02307b11ffb2dca8915490283820a6b6c124d808a38badcc505 SHA512 0bfd7ab2e42c4905f2542a4dbd93cf30d15a8808d527e6bcb6b14f75de226c94c0e0dea6ff69bbac37d3da605acfa2035e2d0e9fe0a41d7beb33cfea5ed2340b WHIRLPOOL 589aeafdee5176619163e34c4e037158636f963c596f3cbeb02285abdb9c941a41623580e0b8e994f324c710cbd4aafde762f7f6c527359697bcc3ae16c62432
+AUX privoxy.logrotate 191 SHA256 a14373c8a26aab32f6f025c11a5521d7923ce900d00b31aa61da9f3979e3bb2e SHA512 118caaeac3aba751584c5bdfc737bf5bfeddf1a62fda1f44bcd4654ae2e33183bc1ce6fc66d4a1bdd79766e42e669b1615a6d46d528a1bd49cabdf98385a3bb9 WHIRLPOOL 4f7f576eb52a02daf38ccec68c49ee5ae0d449cbefdc11ecd1a9790eeee99f800576e05467f80a915423aa077ed3769e85a7c03a92679f31d6b3fe4a3aa3a792
+AUX privoxy.service 248 SHA256 35fee00be175e22dffafcd4a61de3a117268d64d506e99b9b3518702c3a20f35 SHA512 0f3484f06521a66b984fda7238f175a135b22fa5a00dc0c8caadd380d21bfecdae7a6c8d2c0d9a4a3c2858539913722be2b7d4fddd17ea2c95f4e151c3f74ca0 WHIRLPOOL 681c7fe28220ddc4194e6e83974878530b4a3aefd3b1a2de66f9b950ea1eb36252b484077c31af9fbbe335d777898e551455ee5c57892f4e43e5966b23b2d05c
+DIST privoxy-3.0.26-stable-src.tar.gz 1741772 SHA256 57e415b43ee5dfdca74685cc034053eaae962952fdabd086171551a86abf9cd8 SHA512 e448305287d0451c761b76b8d8974ea1ec837b621bbb498a7ff16a54cb4d8f1f734efe2eef03235c01163bb40e225785065aad6ee265a31d90970ab98af11044 WHIRLPOOL 56fc14cea34923186163a91747ba09bbe8c79464ed6668c6776d83f088f3742728ff0b0755e4ca0bfe7a8ed645627b1956876e59256cf76e25f1c13017957779
+EBUILD privoxy-3.0.26.ebuild 3478 SHA256 2c95928e749e6d78d2aa4bba1b8fe49c234127745bddbb80141585dee2545e08 SHA512 377e08a3f25664af85d8340034df3e316a897b5b01d361c1dce9a608de16fe3da7420eddfec2431da2e56f8552e147e256cf346dd8371f1030361f5a28a44e07 WHIRLPOOL cbd9516b62b969e0e7eb5fb96916f1f1e489c8a3b5ad429b3136d5e4eb0b12aa09b083c71e94aaaf4c7bd13e79eaf4e8eb7cf83ec30f55c5b38160bd33a4135d
+MISC ChangeLog 5749 SHA256 be7f6f2e1005ffce129d5805a7c8e4417a0e39b9f59d6a52f7e3e3d0fb304e15 SHA512 d4875acb5485def10f24a0d6e812da42d5d9807bea934e1e98dbb128e1d7b39c9b47857dec3eaf9a0871fdf05416b29db2a1c4146758ed03f84c1a3a2e52c44c WHIRLPOOL c27bec8e0b0a2094db1cdcf1d8f62f8698a8074e09f011a1576ffc00e8fcfd222e67307f715f58fe458e161687e44f76d988badb4f911156ad534b46571a317e
+MISC ChangeLog-2015 21107 SHA256 cd60634a324380d099f5b0f427c10037faf31f4876d51c75b6ff147411f62b24 SHA512 66d2e29ca2f9e9a80b5f56f8af4662bc318fe70de5c3e6b4202c73656be50572302b2e7d09f848a0670e30f706b01c50075a919926265797cc757a41f9355577 WHIRLPOOL 965a2c63d6f228c29985cf30c0547400fb03bebf2254438fb027bef999776520b7211b0b20b32a613709fc7b9fdd754b9a9917f101e66f3da250ef66e6b8e969
+MISC metadata.xml 2327 SHA256 b00664487f467d10e71fb1554048710dc73a6c4db881ca67122265bc11336c61 SHA512 39f6ab39db2aa725e87640c141abbba5d2d06da8681045d02aadf9afd9e7e9b1f0ae2413b1b66ab1917ed0ba7b8e62fe67d5ac57ba91fac5fd6e7459fb74f456 WHIRLPOOL 43a147eadf5792e7fb976b362f83f9b63e5ab9d3cd4284dc8821febb21f8d12afebca6d9d850336ad8eae4c1f7f7ec87e6e0b1f1a1b7c3cb73c9a992d394da4d
diff --git a/net-proxy/privoxy/files/privoxy-3.0.19-gentoo.patch b/net-proxy/privoxy/files/privoxy-3.0.19-gentoo.patch
new file mode 100644
index 000000000000..4571e24e1f06
--- /dev/null
+++ b/net-proxy/privoxy/files/privoxy-3.0.19-gentoo.patch
@@ -0,0 +1,114 @@
+--- a/GNUmakefile.in
++++ b/GNUmakefile.in
+@@ -62,8 +62,8 @@
+ MAN_DEST = $(MAN_DIR)/man1
+ MAN_PAGE = privoxy.1
+ SHARE_DEST = @datadir@
+-DOC_DEST = $(SHARE_DEST)/doc/privoxy
+-VAR_DEST = @localstatedir@
++DOC_DEST = @docdir@
++VAR_DEST = /var
+ LOGS_DEST = $(VAR_DEST)/log/privoxy
+ PIDS_DEST = $(VAR_DEST)/run
+
+@@ -852,7 +852,6 @@
+ $(INSTALL) $(INSTALL_T) $(DOK_WEB)/man-page/*html $(DESTDIR)$$DOC/man-page;\
+ $(INSTALL) $(INSTALL_T) $(DOK_WEB)/privoxy-index.html $(DESTDIR)$$DOC/index.html;\
+ $(INSTALL) $(INSTALL_T) AUTHORS $(DESTDIR)$$DOC;\
+- $(INSTALL) $(INSTALL_T) LICENSE $(DESTDIR)$$DOC;\
+ $(INSTALL) $(INSTALL_T) README $(DESTDIR)$$DOC;\
+ $(INSTALL) $(INSTALL_T) ChangeLog $(DESTDIR)$$DOC;\
+ $(INSTALL) $(INSTALL_T) $(DOK_WEB)/p_doc.css $(DESTDIR)$$DOC;\
+@@ -923,34 +922,8 @@
+ fi ;\
+ $(ECHO) Installing configuration files to $(DESTDIR)$(CONF_DEST);\
+ for i in $(CONFIGS); do \
+- if [ "$$i" = "default.action" ] || [ "$$i" = "default.filter" ] ; then \
+- $(RM) $(DESTDIR)$(CONF_DEST)/$$i ;\
+- $(ECHO) Installing fresh $$i;\
+ $(INSTALL) $$INSTALL_CONF $$i $(DESTDIR)$(CONF_DEST) || exit 1;\
+- elif [ -s "$(CONF_DEST)/$$i" ]; then \
+- $(ECHO) Installing $$i as $$i.new ;\
+- $(INSTALL) $$INSTALL_CONF $$i $(DESTDIR)$(CONF_DEST)/$$i.new || exit 1;\
+- NEW=1;\
+- else \
+- $(INSTALL) $$INSTALL_CONF $$i $(DESTDIR)$(CONF_DEST) || exit 1;\
+- fi ;\
+ done ;\
+- if [ -n "$$NEW" ]; then \
+- $(CHMOD) $(RWD_MODE) $(DESTDIR)$(CONF_DEST)/*.new || exit 1 ;\
+- $(ECHO) "Warning: Older config files are preserved. Check new versions for changes!" ;\
+- fi ;\
+- [ ! -f $(DESTDIR)$(LOG_DEST)/logfile ] && $(ECHO) Creating logfiles in $(DESTDIR)$(LOG_DEST) || \
+- $(ECHO) Checking logfiles in $(DESTDIR)$(LOG_DEST) ;\
+- $(TOUCH) $(DESTDIR)$(LOG_DEST)/logfile || exit 1 ;\
+- if [ x$$USER != x ]; then \
+- $(CHOWN) $$USER $(DESTDIR)$(LOG_DEST)/logfile || \
+- $(ECHO) "** WARNING ** current install user different from configured user. Logging may fail!!" ;\
+- fi ;\
+- if [ x$$GROUP_T != x ]; then \
+- $(CHGRP) $$GROUP_T $(DESTDIR)$(LOG_DEST)/logfile || \
+- $(ECHO) "** WARNING ** current install user different from configured user. Logging may fail!!" ;\
+- fi ;\
+- $(CHMOD) $(RWD_MODE) $(DESTDIR)$(LOG_DEST)/logfile || exit 1 ;\
+ if [ "$(prefix)" = "/usr/local" ] || [ "$(prefix)" = "/usr" ]; then \
+ if [ -f /etc/slackware-version ] && [ -d /etc/rc.d/ ] && [ -w /etc/rc.d/ ] ; then \
+ $(SED) 's+%PROGRAM%+$(PROGRAM)+' slackware/rc.privoxy.orig | \
+--- a/config
++++ b/config
+@@ -265,7 +265,7 @@
+ #
+ # No trailing "/", please.
+ #
+-confdir .
++confdir /etc/privoxy
+ #
+ #
+ # 2.2. templdir
+@@ -322,7 +322,7 @@
+ #
+ # No trailing "/", please.
+ #
+-logdir .
++logdir /var/log/privoxy
+ #
+ #
+ # 2.4. actionsfile
+@@ -462,7 +462,7 @@
+ # Any log files must be writable by whatever user Privoxy is
+ # being run as (on Unix, default user id is "privoxy").
+ #
+-logfile logfile
++logfile privoxy.log
+ #
+ #
+ # 2.7. trustfile
+--- a/default.action.master
++++ b/default.action.master
+@@ -566,7 +566,7 @@
+ +client-header-tagger{css-requests} \
+ +client-header-tagger{image-requests} \
+ +hide-from-header{block} \
+-+set-image-blocker{pattern} \
+++set-image-blocker{blank} \
+ }
+ standard.Cautious
+
+@@ -588,7 +588,7 @@
+ +hide-from-header{block} \
+ +hide-referrer{conditional-block} \
+ +session-cookies-only \
+-+set-image-blocker{pattern} \
+++set-image-blocker{blank} \
+ }
+ standard.Medium
+
+@@ -627,7 +627,7 @@
+ +hide-referrer{conditional-block} \
+ +limit-connect{,} \
+ +overwrite-last-modified{randomize} \
+-+set-image-blocker{pattern} \
+++set-image-blocker{blank} \
+ }
+ standard.Advanced
+
diff --git a/net-proxy/privoxy/files/privoxy.initd-3 b/net-proxy/privoxy/files/privoxy.initd-3
new file mode 100644
index 000000000000..66159ea59838
--- /dev/null
+++ b/net-proxy/privoxy/files/privoxy.initd-3
@@ -0,0 +1,28 @@
+#!/sbin/openrc-run
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+CONFFILE=/etc/${SVCNAME}/config
+PIDFILE=/var/run/${SVCNAME}.pid
+
+depend() {
+ use net
+}
+
+start() {
+ if [ ! -f "${CONFFILE}" ]; then
+ eerror "Configuration file ${CONFFILE} not found!"
+ return 1
+ fi
+
+ ebegin "Starting ${SVCNAME}"
+ start-stop-daemon --start --quiet --exec /usr/sbin/privoxy --pidfile "${PIDFILE}" \
+ -- --pidfile "${PIDFILE}" --user privoxy.privoxy "${CONFFILE}" #2>/dev/null
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping ${SVCNAME}"
+ start-stop-daemon --stop --quiet --pidfile "${PIDFILE}"
+ eend $?
+}
diff --git a/net-proxy/privoxy/files/privoxy.logrotate b/net-proxy/privoxy/files/privoxy.logrotate
new file mode 100644
index 000000000000..aa7463bd572e
--- /dev/null
+++ b/net-proxy/privoxy/files/privoxy.logrotate
@@ -0,0 +1,9 @@
+/var/log/privoxy/privoxy.log /var/log/privoxy/jarfile {
+ missingok
+ notifempty
+ create 0640 privoxy privoxy
+ sharedscripts
+ postrotate
+ killall -HUP privoxy 2>/dev/null || true
+ endscript
+}
diff --git a/net-proxy/privoxy/files/privoxy.service b/net-proxy/privoxy/files/privoxy.service
new file mode 100644
index 000000000000..568123924781
--- /dev/null
+++ b/net-proxy/privoxy/files/privoxy.service
@@ -0,0 +1,10 @@
+[Unit]
+Description=Privoxy Web Proxy With Advanced Filtering Capabilities
+After=network.target
+
+[Service]
+ExecStart=/usr/sbin/privoxy --no-daemon --user privoxy.privoxy /etc/privoxy/config
+SuccessExitStatus=15
+
+[Install]
+WantedBy=multi-user.target
diff --git a/net-proxy/privoxy/metadata.xml b/net-proxy/privoxy/metadata.xml
new file mode 100644
index 000000000000..ff0981277efe
--- /dev/null
+++ b/net-proxy/privoxy/metadata.xml
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>bircoph@gentoo.org</email>
+ </maintainer>
+ <longdescription>
+ Privoxy is a non-caching web proxy with advanced filtering
+ capabilities for enhancing privacy, modifying web page data
+ and HTTP headers, controlling access, and removing ads and
+ other obnoxious Internet junk. Privoxy has a flexible
+ configuration and can be customized to suit individual
+ needs and tastes. It has application for both stand-alone
+ systems and multi-user networks.
+ </longdescription>
+ <use>
+ <flag name="editor">Enable the web-based actions file editor</flag>
+ <flag name="client-tags">Enable support for client-specific tags</flag>
+ <flag name="compression">Allow privoxy to compress buffered content before sending to the client, if it supports it</flag>
+ <flag name="extended-host-patterns">Enable and require PCRE syntax in host patterns. You must convert action files to PCRE, see privoxy-url-pattern-translator.pl Use at your own risk!</flag>
+ <flag name="external-filters">Allow to filter content with scripts and programs. Experimental</flag>
+ <flag name="fast-redirects">Support fast redirects</flag>
+ <flag name="force">Allow single-page disable (force load)</flag>
+ <flag name="graceful-termination">Allow to shutdown Privoxy through the webinterface</flag>
+ <flag name="ie-images">Enable a quick but not always reliable auto-detect whether requests from MS Internet Explorer are for an image or not</flag>
+ <flag name="image-blocking">Allows the +handle-as-image action, to send "blocked" images instead of HTML</flag>
+ <flag name="lfs">Support large files (&gt;2GB) on 32-bit systems</flag>
+ <flag name="png-images">Use PNG format instead of GIF for built-in images</flag>
+ <flag name="stats">Keep statistics</flag>
+ <flag name="toggle">Support temporary disable toggle via web interface</flag>
+ <flag name="tools">Install log parser, regression tester and user agent generator tools</flag>
+ <flag name="whitelists">Support trust files (white lists)</flag>
+ <flag name="zlib">Use <pkg>sys-libs/zlib</pkg> to decompress data before filtering</flag>
+ </use>
+ <upstream>
+ <remote-id type="sourceforge">ijbswa</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-proxy/privoxy/privoxy-3.0.26.ebuild b/net-proxy/privoxy/privoxy-3.0.26.ebuild
new file mode 100644
index 000000000000..bf831fb51512
--- /dev/null
+++ b/net-proxy/privoxy/privoxy-3.0.26.ebuild
@@ -0,0 +1,127 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+
+inherit autotools systemd toolchain-funcs user
+
+[ "${PV##*_}" = "beta" ] &&
+ PRIVOXY_STATUS="beta" ||
+ PRIVOXY_STATUS="stable"
+
+HOMEPAGE="http://www.privoxy.org https://sourceforge.net/projects/ijbswa/"
+DESCRIPTION="A web proxy with advanced filtering capabilities for enhancing privacy"
+SRC_URI="mirror://sourceforge/ijbswa/${P%_*}-${PRIVOXY_STATUS}-src.tar.gz"
+
+IUSE="+acl client-tags compression editor extended-host-patterns
+external-filters +fast-redirects +force graceful-termination
+ie-images +image-blocking ipv6 lfs png-images selinux +stats
++threads toggle tools whitelists +zlib"
+SLOT="0"
+KEYWORDS="alpha amd64 arm ppc ppc64 sparc x86 ~x86-fbsd"
+LICENSE="GPL-2"
+
+DEPEND="
+ dev-libs/libpcre
+ zlib? ( sys-libs/zlib )
+"
+RDEPEND="${DEPEND}
+ extended-host-patterns? ( dev-lang/perl )
+ selinux? ( sec-policy/selinux-privoxy )
+ tools? (
+ net-misc/curl
+ dev-lang/perl
+ )
+"
+REQUIRED_USE="
+ compression? ( zlib )
+ toggle? ( editor )
+"
+
+S="${WORKDIR}/${P%_*}-${PRIVOXY_STATUS}"
+
+PATCHES=( "${FILESDIR}"/${PN}-3.0.19-gentoo.patch )
+
+pkg_pretend() {
+ if ! use threads; then
+ ewarn
+ ewarn "Privoxy may be very slow without threads support, consider to enable them."
+ ewarn "See also http://www.privoxy.org/faq/trouble.html#GENTOO-RICERS"
+ ewarn
+ fi
+}
+
+pkg_setup() {
+ enewgroup privoxy
+ enewuser privoxy -1 -1 /etc/privoxy privoxy
+}
+
+src_prepare() {
+ default
+ mv configure.in configure.ac || die
+ sed -i "s|/p\.p/|/config.privoxy.org/|g" tools/privoxy-regression-test.pl || die
+
+ # autoreconf needs to be called even if we don't modify any autotools source files
+ # See main makefile
+ eautoreconf
+}
+
+src_configure() {
+ # --with-debug only enables debug CFLAGS
+ # --with-docbook and --with-db2html and their deps are useless,
+ # since docs are already pregenerated in the source tarball
+ econf \
+ --docdir=/usr/share/doc/${PF} \
+ --sysconfdir=/etc/privoxy \
+ --enable-dynamic-pcre \
+ --with-user=privoxy \
+ --with-group=privoxy \
+ $(use_enable acl acl-support) \
+ $(use_enable compression) \
+ $(use_enable client-tags) \
+ $(use_enable editor) \
+ $(use_enable extended-host-patterns) \
+ $(use_enable fast-redirects) \
+ $(use_enable force) \
+ $(use_enable graceful-termination) \
+ $(use_enable ie-images) \
+ $(use_enable image-blocking) \
+ $(use_enable ipv6 ipv6-support) \
+ $(use_enable kernel_FreeBSD accept-filter) \
+ $(use_enable lfs large-file-support) \
+ $(use_enable png-images no-gifs) \
+ $(use_enable stats) \
+ $(use_enable threads pthread) \
+ $(use_enable toggle) \
+ $(use_enable whitelists trust-files) \
+ $(use_enable zlib)
+}
+
+src_install () {
+ default
+
+ newinitd "${FILESDIR}/privoxy.initd-3" privoxy
+ systemd_dounit "${FILESDIR}"/${PN}.service
+
+ insinto /etc/logrotate.d
+ newins "${FILESDIR}/privoxy.logrotate" privoxy
+
+ diropts -m 0750 -g privoxy -o privoxy
+ keepdir /var/log/privoxy
+
+ use extended-host-patterns && newbin tools/url-pattern-translator.pl privoxy-url-pattern-translator.pl
+ if use tools; then
+ dobin tools/{privoxy-log-parser.pl,privoxy-regression-test.pl}
+ newbin tools/uagen.pl privoxy-uagen.pl
+ fi
+}
+
+pkg_postinst() {
+ if use extended-host-patterns; then
+ ewarn
+ ewarn "You enabled extended-host-patterns, now you *must* convert all action files in"
+ ewarn "PCRE-compatible format, or privoxy will fail to start. Helper tool"
+ ewarn "privoxy-url-pattern-translator.pl is available."
+ ewarn
+ fi
+}