diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
commit | 4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch) | |
tree | ba5f07bf3f9d22d82e54a462313f5d244036c768 /net-proxy/privoxy/files |
reinit the tree, so we can have metadata
Diffstat (limited to 'net-proxy/privoxy/files')
-rw-r--r-- | net-proxy/privoxy/files/privoxy-3.0.19-gentoo.patch | 114 | ||||
-rw-r--r-- | net-proxy/privoxy/files/privoxy.initd-3 | 28 | ||||
-rw-r--r-- | net-proxy/privoxy/files/privoxy.logrotate | 9 | ||||
-rw-r--r-- | net-proxy/privoxy/files/privoxy.service | 10 |
4 files changed, 161 insertions, 0 deletions
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 |