Gentoo Archives: gentoo-commits

From: Andrew Savchenko <bircoph@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-proxy/privoxy/, net-proxy/privoxy/files/
Date: Sat, 27 Feb 2021 16:21:34
Message-Id: 1614442877.3e03f00b6df257facc1c17b38b84a87f23d22aae.bircoph@gentoo
1 commit: 3e03f00b6df257facc1c17b38b84a87f23d22aae
2 Author: Andrew Savchenko <bircoph <AT> gentoo <DOT> org>
3 AuthorDate: Sat Feb 27 16:14:53 2021 +0000
4 Commit: Andrew Savchenko <bircoph <AT> gentoo <DOT> org>
5 CommitDate: Sat Feb 27 16:21:17 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3e03f00b
7
8 net-proxy/privoxy: version bump
9
10 Update to version 3.0.32
11
12 Fixes: OVE-20210203-0001, OVE-20210205-0001, OVE-20210206-0001,
13 OVE-20210207-0001, OVE-20210222-0001.
14
15 Bug: https://bugs.gentoo.org/771960
16 Package-Manager: Portage-3.0.14, Repoman-3.0.2
17 Signed-off-by: Andrew Savchenko <bircoph <AT> gentoo.org>
18
19 net-proxy/privoxy/Manifest | 1 +
20 .../privoxy/files/privoxy-3.0.32-gentoo.patch | 121 +++++++++++++++++
21 net-proxy/privoxy/privoxy-3.0.32.ebuild | 148 +++++++++++++++++++++
22 3 files changed, 270 insertions(+)
23
24 diff --git a/net-proxy/privoxy/Manifest b/net-proxy/privoxy/Manifest
25 index 0aaec43c89b..ca5d8acc7e5 100644
26 --- a/net-proxy/privoxy/Manifest
27 +++ b/net-proxy/privoxy/Manifest
28 @@ -1 +1,2 @@
29 DIST privoxy-3.0.31-stable-src.tar.gz 1839901 BLAKE2B 08564fb8de37d334844de10dfecc39b3f10cee996b3931be4e2d7e33eccd7ec115d7487353496de0fd645fc76ea237aa907eda2fb7fa8aad14050280fc083cc7 SHA512 0bea9973ac22e594a959452390c8612605dbf1fd55151632d35ecc7fe0ef9ca87cc1694a8bcb0511467445ec414b721b9d33651d917b2a8083768d8905ec68ed
30 +DIST privoxy-3.0.32-stable-src.tar.gz 1834528 BLAKE2B c846dada5fd34b80be9f7a75dc4177f3907241f6cf28b4120929687523d449d73b6a78bfe73f0a1086fbb3a8388103beb1e5a62becdffa24bf57d34cbb6cda56 SHA512 da41c0045bf593219df64718645eff984b5df43737811cc0fa12fce7e8ae1ab59eefbe20f23d6ce8f62216cfd81f1a9c319688d15693c25eed36010f3e1d5ffd
31
32 diff --git a/net-proxy/privoxy/files/privoxy-3.0.32-gentoo.patch b/net-proxy/privoxy/files/privoxy-3.0.32-gentoo.patch
33 new file mode 100644
34 index 00000000000..4199b6e2a9c
35 --- /dev/null
36 +++ b/net-proxy/privoxy/files/privoxy-3.0.32-gentoo.patch
37 @@ -0,0 +1,121 @@
38 +diff --git a/GNUmakefile.in b/GNUmakefile.in
39 +index fcd44c4f..8cf2364a 100644
40 +--- a/GNUmakefile.in
41 ++++ b/GNUmakefile.in
42 +@@ -62,8 +62,8 @@ MAN_DIR = @mandir@
43 + MAN_DEST = $(MAN_DIR)/man8
44 + MAN_PAGE = privoxy.8
45 + SHARE_DEST = @datadir@
46 +-DOC_DEST = $(SHARE_DEST)/doc/privoxy
47 +-VAR_DEST = @localstatedir@
48 ++DOC_DEST = @docdir@
49 ++VAR_DEST = /var
50 + LOGS_DEST = $(VAR_DEST)/log/privoxy
51 + PIDS_DEST = $(VAR_DEST)/run
52 +
53 +@@ -892,8 +892,6 @@ install: CONF_DEST LOG_DEST PID_DEST check_doc GROUP_T
54 + $(INSTALL) $(INSTALL_T) $(DOK_WEB)/man-page/*html $(DESTDIR)$$DOC/man-page;\
55 + $(INSTALL) $(INSTALL_T) $(DOK_WEB)/privoxy-index.html $(DESTDIR)$$DOC/index.html;\
56 + $(INSTALL) $(INSTALL_T) AUTHORS $(DESTDIR)$$DOC;\
57 +- $(INSTALL) $(INSTALL_T) LICENSE $(DESTDIR)$$DOC;\
58 +- $(INSTALL) $(INSTALL_T) LICENSE.GPLv3 $(DESTDIR)$$DOC;\
59 + $(INSTALL) $(INSTALL_T) README $(DESTDIR)$$DOC;\
60 + $(INSTALL) $(INSTALL_T) ChangeLog $(DESTDIR)$$DOC;\
61 + $(INSTALL) $(INSTALL_T) $(DOK_WEB)/p_doc.css $(DESTDIR)$$DOC;\
62 +@@ -964,34 +962,8 @@ install: CONF_DEST LOG_DEST PID_DEST check_doc GROUP_T
63 + fi ;\
64 + $(ECHO) Installing configuration files to $(DESTDIR)$(CONF_DEST);\
65 + for i in $(CONFIGS); do \
66 +- if [ "$$i" = "default.action" ] || [ "$$i" = "default.filter" ] ; then \
67 +- $(RM) $(DESTDIR)$(CONF_DEST)/$$i ;\
68 +- $(ECHO) Installing fresh $$i;\
69 + $(INSTALL) $$INSTALL_CONF $$i $(DESTDIR)$(CONF_DEST) || exit 1;\
70 +- elif [ -s "$(DESTDIR)$(CONF_DEST)/$$i" ]; then \
71 +- $(ECHO) Installing $$i as $$i.new ;\
72 +- $(INSTALL) $$INSTALL_CONF $$i $(DESTDIR)$(CONF_DEST)/$$i.new || exit 1;\
73 +- NEW=1;\
74 +- else \
75 +- $(INSTALL) $$INSTALL_CONF $$i $(DESTDIR)$(CONF_DEST) || exit 1;\
76 +- fi ;\
77 + done ;\
78 +- if [ -n "$$NEW" ]; then \
79 +- $(CHMOD) $(RWD_MODE) $(DESTDIR)$(CONF_DEST)/*.new || exit 1 ;\
80 +- $(ECHO) "Warning: Older config files are preserved. Check new versions for changes!" ;\
81 +- fi ;\
82 +- [ ! -f $(DESTDIR)$(LOG_DEST)/logfile ] && $(ECHO) Creating logfiles in $(DESTDIR)$(LOG_DEST) || \
83 +- $(ECHO) Checking logfiles in $(DESTDIR)$(LOG_DEST) ;\
84 +- $(TOUCH) $(DESTDIR)$(LOG_DEST)/logfile || exit 1 ;\
85 +- if [ x$$USER != x ]; then \
86 +- $(CHOWN) $$USER $(DESTDIR)$(LOG_DEST)/logfile || \
87 +- $(ECHO) "** WARNING ** current install user different from configured user. Logging may fail!!" ;\
88 +- fi ;\
89 +- if [ x$$GROUP_T != x ]; then \
90 +- $(CHGRP) $$GROUP_T $(DESTDIR)$(LOG_DEST)/logfile || \
91 +- $(ECHO) "** WARNING ** current install user different from configured user. Logging may fail!!" ;\
92 +- fi ;\
93 +- $(CHMOD) $(RWD_MODE) $(DESTDIR)$(LOG_DEST)/logfile || exit 1 ;\
94 + if [ "$(prefix)" = "/usr/local" ] || [ "$(prefix)" = "/usr" ]; then \
95 + if [ -f /etc/slackware-version ] && [ -d /etc/rc.d/ ] && [ -w /etc/rc.d/ ] ; then \
96 + $(SED) 's+%PROGRAM%+$(PROGRAM)+' slackware/rc.privoxy.in | \
97 +diff --git a/config b/config
98 +index da6d6b75..aefb55e1 100644
99 +--- a/config
100 ++++ b/config
101 +@@ -259,7 +259,7 @@
102 + #
103 + # No trailing "/", please.
104 + #
105 +-confdir .
106 ++confdir /etc/privoxy
107 + #
108 + # 2.2. templdir
109 + # ==============
110 +@@ -344,7 +344,7 @@ confdir .
111 + #
112 + # No trailing "/", please.
113 + #
114 +-logdir .
115 ++logdir /var/log/privoxy
116 + #
117 + # 2.5. actionsfile
118 + # =================
119 +@@ -478,7 +478,7 @@ filterfile user.filter # User customizations
120 + # require additional software to do it. For details, please
121 + # refer to the documentation for your operating system.
122 + #
123 +-logfile logfile
124 ++logfile privoxy.log
125 + #
126 + # 2.8. trustfile
127 + # ===============
128 +diff --git a/default.action.master b/default.action.master
129 +index 632984eb..8338431c 100644
130 +--- a/default.action.master
131 ++++ b/default.action.master
132 +@@ -559,7 +559,7 @@ allow-ads = -block -filter{banners-by-size} -filter{banners-by-link}
133 + +client-header-tagger{image-requests} \
134 + +client-header-tagger{range-requests} \
135 + +hide-from-header{block} \
136 +-+set-image-blocker{pattern} \
137 +++set-image-blocker{blank} \
138 + }
139 + standard.Cautious
140 +
141 +@@ -582,7 +582,7 @@ standard.Cautious
142 + +hide-from-header{block} \
143 + +hide-referrer{conditional-block} \
144 + +session-cookies-only \
145 +-+set-image-blocker{pattern} \
146 +++set-image-blocker{blank} \
147 + }
148 + standard.Medium
149 +
150 +@@ -622,7 +622,7 @@ standard.Medium
151 + +hide-referrer{conditional-block} \
152 + +limit-connect{,} \
153 + +overwrite-last-modified{randomize} \
154 +-+set-image-blocker{pattern} \
155 +++set-image-blocker{blank} \
156 + }
157 + standard.Advanced
158 +
159
160 diff --git a/net-proxy/privoxy/privoxy-3.0.32.ebuild b/net-proxy/privoxy/privoxy-3.0.32.ebuild
161 new file mode 100644
162 index 00000000000..18fa1136373
163 --- /dev/null
164 +++ b/net-proxy/privoxy/privoxy-3.0.32.ebuild
165 @@ -0,0 +1,148 @@
166 +# Copyright 1999-2021 Gentoo Authors
167 +# Distributed under the terms of the GNU General Public License v2
168 +
169 +EAPI=7
170 +
171 +inherit autotools systemd toolchain-funcs
172 +
173 +[ "${PV##*_}" = "beta" ] &&
174 + PRIVOXY_STATUS="beta" ||
175 + PRIVOXY_STATUS="stable"
176 +
177 +HOMEPAGE="https://www.privoxy.org https://sourceforge.net/projects/ijbswa/"
178 +DESCRIPTION="A web proxy with advanced filtering capabilities for enhancing privacy"
179 +SRC_URI="mirror://sourceforge/ijbswa/${P%_*}-${PRIVOXY_STATUS}-src.tar.gz"
180 +
181 +IUSE="+acl brotli client-tags compression editor extended-host-patterns
182 +extended-statistics external-filters +fast-redirects +force fuzz
183 +graceful-termination +image-blocking ipv6 lfs +mbedtls openssl
184 +png-images selinux ssl +stats +threads toggle tools whitelists
185 ++zlib"
186 +SLOT="0"
187 +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~ppc ~ppc64 ~sparc ~x86"
188 +LICENSE="GPL-2+"
189 +
190 +DEPEND="
191 + acct-group/privoxy
192 + acct-user/privoxy
193 + dev-libs/libpcre
194 + brotli? ( app-arch/brotli )
195 + ssl? (
196 + mbedtls? ( net-libs/mbedtls )
197 + openssl? ( dev-libs/openssl )
198 + )
199 + zlib? ( sys-libs/zlib )
200 +"
201 +RDEPEND="${DEPEND}
202 + extended-host-patterns? ( dev-lang/perl )
203 + selinux? ( sec-policy/selinux-privoxy )
204 + tools? (
205 + net-misc/curl
206 + dev-lang/perl
207 + )
208 +"
209 +REQUIRED_USE="
210 + client-tags? ( threads )
211 + toggle? ( editor )
212 + compression? ( zlib )
213 + brotli? ( zlib )
214 + fuzz? ( zlib )
215 + ssl? ( ^^ ( mbedtls openssl ) threads )
216 +"
217 +
218 +S="${WORKDIR}/${P%_*}-${PRIVOXY_STATUS}"
219 +
220 +PATCHES=(
221 + "${FILESDIR}"/${PN}-3.0.32-gentoo.patch
222 + "${FILESDIR}"/${PN}-3.0.28-strip.patch
223 +)
224 +
225 +pkg_pretend() {
226 + if ! use threads; then
227 + ewarn
228 + ewarn "Privoxy may be very slow without threads support, consider to enable them."
229 + ewarn "See also https://www.privoxy.org/faq/trouble.html#GENTOO-RICERS"
230 + ewarn
231 + fi
232 +}
233 +
234 +src_prepare() {
235 + default
236 + mv configure.in configure.ac || die
237 + sed -i "s|/p\.p/|/config.privoxy.org/|g" tools/privoxy-regression-test.pl || die
238 +
239 + # autoreconf needs to be called even if we don't modify any autotools source files
240 + # See main makefile
241 + eautoreconf
242 +}
243 +
244 +src_configure() {
245 + local myconf="--without-mbedtls --without-openssl"
246 + if use ssl; then
247 + myconf="$(use_with mbedtls) $(use_with openssl)"
248 + fi
249 +
250 + # --with-debug only enables debug CFLAGS
251 + # --with-docbook and --with-db2html and their deps are useless,
252 + # since docs are already pregenerated in the source tarball
253 + econf \
254 + --sysconfdir=/etc/privoxy \
255 + --enable-dynamic-pcre \
256 + --without-assertions \
257 + --with-user=privoxy \
258 + --with-group=privoxy \
259 + $(use_enable acl acl-support) \
260 + $(use_enable compression) \
261 + $(use_enable client-tags) \
262 + $(use_enable editor) \
263 + $(use_enable extended-host-patterns pcre-host-patterns) \
264 + $(use_enable extended-statistics) \
265 + $(use_enable fast-redirects) \
266 + $(use_enable force) \
267 + $(use_enable fuzz) \
268 + $(use_enable graceful-termination) \
269 + $(use_enable image-blocking) \
270 + $(use_enable ipv6 ipv6-support) \
271 + $(use_enable kernel_FreeBSD accept-filter) \
272 + $(use_enable lfs large-file-support) \
273 + $(use_enable png-images no-gifs) \
274 + $(use_enable stats) \
275 + $(use_enable threads pthread) \
276 + $(use_enable toggle) \
277 + $(use_enable whitelists trust-files) \
278 + $(use_enable zlib) \
279 + $(use_with brotli) \
280 + ${myconf}
281 +}
282 +
283 +src_install() {
284 + default
285 +
286 + newinitd "${FILESDIR}/privoxy.initd-3" privoxy
287 + systemd_dounit "${FILESDIR}"/${PN}.service
288 +
289 + insinto /etc/logrotate.d
290 + newins "${FILESDIR}/privoxy.logrotate" privoxy
291 +
292 + diropts -m 0750 -g privoxy -o privoxy
293 + keepdir /var/log/privoxy
294 +
295 + use extended-host-patterns && newbin tools/url-pattern-translator.pl privoxy-url-pattern-translator.pl
296 + if use tools; then
297 + dobin tools/{privoxy-log-parser.pl,privoxy-regression-test.pl}
298 + newbin tools/uagen.pl privoxy-uagen.pl
299 + fi
300 +
301 + rmdir "${ED}/var/run" || die
302 + chown privoxy:root "${ED}/etc/privoxy" || die
303 +}
304 +
305 +pkg_postinst() {
306 + if use extended-host-patterns; then
307 + ewarn
308 + ewarn "You enabled extended-host-patterns, now you *must* convert all action files in"
309 + ewarn "PCRE-compatible format, or privoxy will fail to start. Helper tool"
310 + ewarn "privoxy-url-pattern-translator.pl is available."
311 + ewarn
312 + fi
313 +}