Gentoo Archives: gentoo-commits

From: Mikle Kolyada <zlogene@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-proxy/squid/
Date: Thu, 27 Aug 2020 19:43:44
Message-Id: 1598557418.c912c4cb1a4e703aacd70f5ae9ccfbf5d23b6a8e.zlogene@gentoo
1 commit: c912c4cb1a4e703aacd70f5ae9ccfbf5d23b6a8e
2 Author: Mikle Kolyada <zlogene <AT> gentoo <DOT> org>
3 AuthorDate: Thu Aug 27 19:42:15 2020 +0000
4 Commit: Mikle Kolyada <zlogene <AT> gentoo <DOT> org>
5 CommitDate: Thu Aug 27 19:43:38 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c912c4cb
7
8 net-proxy/squid: Version bump (v4.13)
9
10 Package-Manager: Portage-2.3.103, Repoman-2.3.23
11 Signed-off-by: Mikle Kolyada <zlogene <AT> gentoo.org>
12
13 net-proxy/squid/Manifest | 1 +
14 net-proxy/squid/squid-4.13.ebuild | 279 ++++++++++++++++++++++++++++++++++++++
15 2 files changed, 280 insertions(+)
16
17 diff --git a/net-proxy/squid/Manifest b/net-proxy/squid/Manifest
18 index dac695fdb6a..8c5adefcbab 100644
19 --- a/net-proxy/squid/Manifest
20 +++ b/net-proxy/squid/Manifest
21 @@ -1 +1,2 @@
22 DIST squid-4.12.tar.xz 2450564 BLAKE2B 39068d5e999ebf62fbc45ea8faa8811c7b4e6a231f814f2580f54ce3ac499b503b7bc071188b4446a2a94f7eb2f4cfc6369a1b578e637a7b5e37a0ae2aabfb8e SHA512 96fa700a0c28711eb1ec5e44e1d324dc8d3accdddbc675def8babe057e2cc71083bd3817bc37cbd9f3c03772743df578573ee3698bbd6131df68c3580ad31ef4
23 +DIST squid-4.13.tar.xz 2452752 BLAKE2B e2efdfda736f2324c6723e76272c4989a41fa6d0f52b48cc33957ae8e57e75350487d9683fc72c43926e5d91b698eef728282895018b78acefe23de2e67cfd74 SHA512 06807f82ed01e12afe2dd843aa0a94f69c351765b1889c4c5c3da1cf2ecb06ac3a4be6a24a62f04397299c8fc0df5397f76f64df5422ff78b37a9382d5fdf7fc
24
25 diff --git a/net-proxy/squid/squid-4.13.ebuild b/net-proxy/squid/squid-4.13.ebuild
26 new file mode 100644
27 index 00000000000..5547d6a8e97
28 --- /dev/null
29 +++ b/net-proxy/squid/squid-4.13.ebuild
30 @@ -0,0 +1,279 @@
31 +# Copyright 1999-2020 Gentoo Authors
32 +# Distributed under the terms of the GNU General Public License v2
33 +
34 +EAPI=7
35 +
36 +WANT_AUTOMAKE="1.15"
37 +
38 +inherit autotools flag-o-matic linux-info pam toolchain-funcs
39 +
40 +DESCRIPTION="A full-featured web proxy cache"
41 +HOMEPAGE="http://www.squid-cache.org/"
42 +
43 +# Upstream patch ID for the most recent bug-fixed update to the formal release.
44 +r=
45 +#r=-20181117-r0022167
46 +if [ -z "$r" ]; then
47 + SRC_URI="http://www.squid-cache.org/Versions/v${PV%.*}/${P}.tar.xz"
48 +else
49 + SRC_URI="http://www.squid-cache.org/Versions/v${PV%.*}/${P}${r}.tar.bz2"
50 + S="${S}${r}"
51 +fi
52 +
53 +LICENSE="GPL-2"
54 +SLOT="0"
55 +KEYWORDS="~alpha amd64 arm ~arm64 ~hppa ~ia64 ~mips ppc ppc64 ~sparc x86"
56 +IUSE="caps gnutls ipv6 pam ldap samba sasl kerberos nis radius ssl snmp selinux logrotate test \
57 + ecap esi ssl-crtd \
58 + mysql postgres sqlite \
59 + perl qos tproxy \
60 + +htcp +wccp +wccpv2 \
61 + pf-transparent ipf-transparent kqueue \
62 + elibc_uclibc kernel_linux"
63 +
64 +RESTRICT="!test? ( test )"
65 +
66 +BDEPEND="dev-lang/perl"
67 +
68 +COMMON_DEPEND="acct-group/squid
69 + acct-user/squid
70 + caps? ( >=sys-libs/libcap-2.16 )
71 + pam? ( sys-libs/pam )
72 + ldap? ( net-nds/openldap )
73 + kerberos? ( virtual/krb5 )
74 + qos? ( net-libs/libnetfilter_conntrack )
75 + ssl? (
76 + !gnutls? ( dev-libs/openssl:0 )
77 + dev-libs/nettle:= )
78 + sasl? ( dev-libs/cyrus-sasl )
79 + ecap? ( net-libs/libecap:1 )
80 + esi? ( dev-libs/expat dev-libs/libxml2 )
81 + gnutls? ( >=net-libs/gnutls-3.1.5 )
82 + logrotate? ( app-admin/logrotate )
83 + >=sys-libs/db-4:*
84 + dev-libs/libltdl:0"
85 +
86 +DEPEND="${COMMON_DEPEND}
87 + ${BDEPEND}
88 + ecap? ( virtual/pkgconfig )
89 + test? ( dev-util/cppunit )"
90 +
91 +RDEPEND="${COMMON_DEPEND}
92 + samba? ( net-fs/samba )
93 + perl? ( dev-lang/perl )
94 + mysql? ( dev-perl/DBD-mysql )
95 + postgres? ( dev-perl/DBD-Pg )
96 + selinux? ( sec-policy/selinux-squid )
97 + sqlite? ( dev-perl/DBD-SQLite )"
98 +
99 +REQUIRED_USE="tproxy? ( caps )
100 + qos? ( caps )"
101 +
102 +pkg_pretend() {
103 + if use tproxy; then
104 + local CONFIG_CHECK="~NF_CONNTRACK ~NETFILTER_XT_MATCH_SOCKET ~NETFILTER_XT_TARGET_TPROXY"
105 + linux-info_pkg_setup
106 + fi
107 +}
108 +
109 +src_prepare() {
110 + eapply "${FILESDIR}/${PN}-4.3-gentoo.patch"
111 + sed -i -e 's:/usr/local/squid/etc:/etc/squid:' \
112 + INSTALL QUICKSTART \
113 + scripts/fileno-to-pathname.pl \
114 + scripts/check_cache.pl \
115 + tools/cachemgr.cgi.8 \
116 + tools/purge/conffile.hh \
117 + tools/purge/purge.1 || die
118 + sed -i -e 's:/usr/local/squid/sbin:/usr/sbin:' \
119 + INSTALL QUICKSTART || die
120 + sed -i -e 's:/usr/local/squid/var/cache:/var/cache/squid:' \
121 + QUICKSTART || die
122 + sed -i -e 's:/usr/local/squid/var/logs:/var/log/squid:' \
123 + QUICKSTART \
124 + src/log/access_log.cc || die
125 + sed -i -e 's:/usr/local/squid/logs:/var/log/squid:' \
126 + src/log/access_log.cc || die
127 + sed -i -e 's:/usr/local/squid/libexec:/usr/libexec/squid:' \
128 + src/acl/external/unix_group/ext_unix_group_acl.8 \
129 + src/acl/external/session/ext_session_acl.8 || die
130 + sed -i -e 's:/usr/local/squid/cache:/var/cache/squid:' \
131 + scripts/check_cache.pl || die
132 + # /var/run/squid to /run/squid
133 + sed -i -e 's:$(localstatedir)::' \
134 + src/ipc/Makefile.am || die
135 + sed -i -e 's:_LTDL_SETUP:LTDL_INIT([installable]):' \
136 + libltdl/configure.ac || die
137 +
138 + eapply_user
139 + eautoreconf
140 +}
141 +
142 +src_configure() {
143 + local basic_modules="NCSA,POP3,getpwnam"
144 + use samba && basic_modules+=",SMB"
145 + use ldap && basic_modules+=",SMB_LM,LDAP"
146 + use pam && basic_modules+=",PAM"
147 + use sasl && basic_modules+=",SASL"
148 + use nis && ! use elibc_uclibc && basic_modules+=",NIS"
149 + use radius && basic_modules+=",RADIUS"
150 + if use mysql || use postgres || use sqlite ; then
151 + basic_modules+=",DB"
152 + fi
153 +
154 + local digest_modules="file"
155 + use ldap && digest_modules+=",LDAP,eDirectory"
156 +
157 + local negotiate_modules="none"
158 + local myconf="--without-mit-krb5 --without-heimdal-krb5"
159 + if use kerberos ; then
160 + negotiate_modules="kerberos,wrapper"
161 + if has_version app-crypt/heimdal ; then
162 + myconf="--without-mit-krb5 --with-heimdal-krb5"
163 + else
164 + myconf="--with-mit-krb5 --without-heimdal-krb5"
165 + fi
166 + fi
167 +
168 + local ntlm_modules="none"
169 + use samba && ntlm_modules="SMB_LM"
170 +
171 + local ext_helpers="file_userip,session,unix_group,delayer,time_quota"
172 + use samba && ext_helpers+=",wbinfo_group"
173 + use ldap && ext_helpers+=",LDAP_group,eDirectory_userip"
174 + use ldap && use kerberos && ext_helpers+=",kerberos_ldap_group"
175 + if use mysql || use postgres || use sqlite ; then
176 + ext_helpers+=",SQL_session"
177 + fi
178 +
179 + local storeio_modules="aufs,diskd,rock,ufs"
180 +
181 + local transparent
182 + if use kernel_linux ; then
183 + transparent+=" --enable-linux-netfilter"
184 + use qos && transparent+=" --enable-zph-qos --with-netfilter-conntrack"
185 + fi
186 +
187 + if use kernel_FreeBSD || use kernel_OpenBSD || use kernel_NetBSD ; then
188 + transparent+=" $(use_enable kqueue)"
189 + if use pf-transparent; then
190 + transparent+=" --enable-pf-transparent"
191 + elif use ipf-transparent; then
192 + transparent+=" --enable-ipf-transparent"
193 + fi
194 + fi
195 +
196 + tc-export_build_env BUILD_CXX
197 + export BUILDCXX=${BUILD_CXX}
198 + export BUILDCXXFLAGS=${BUILD_CXXFLAGS}
199 + tc-export CC AR
200 +
201 + # Should be able to drop this workaround with newer versions.
202 + # https://bugs.squid-cache.org/show_bug.cgi?id=4224
203 + tc-is-cross-compiler && export squid_cv_gnu_atomics=no
204 +
205 + # Bug #719662
206 + (use ppc || use arm || use hppa) && append-libs -latomic
207 +
208 + econf \
209 + --sysconfdir=/etc/squid \
210 + --libexecdir=/usr/libexec/squid \
211 + --localstatedir=/var \
212 + --with-pidfile=/run/squid.pid \
213 + --datadir=/usr/share/squid \
214 + --with-logdir=/var/log/squid \
215 + --with-default-user=squid \
216 + --enable-removal-policies="lru,heap" \
217 + --enable-storeio="${storeio_modules}" \
218 + --enable-disk-io \
219 + --enable-auth-basic="${basic_modules}" \
220 + --enable-auth-digest="${digest_modules}" \
221 + --enable-auth-ntlm="${ntlm_modules}" \
222 + --enable-auth-negotiate="${negotiate_modules}" \
223 + --enable-external-acl-helpers="${ext_helpers}" \
224 + --enable-log-daemon-helpers \
225 + --enable-url-rewrite-helpers \
226 + --enable-cache-digests \
227 + --enable-delay-pools \
228 + --enable-eui \
229 + --enable-icmp \
230 + --enable-follow-x-forwarded-for \
231 + --with-large-files \
232 + --with-build-environment=default \
233 + --disable-strict-error-checking \
234 + --disable-arch-native \
235 + --with-included-ltdl=/usr/include \
236 + --with-ltdl-libdir=/usr/$(get_libdir) \
237 + $(use_with caps libcap) \
238 + $(use_enable ipv6) \
239 + $(use_enable snmp) \
240 + $(use_with ssl openssl) \
241 + $(use_with ssl nettle) \
242 + $(use_with gnutls) \
243 + $(use_enable ssl-crtd) \
244 + $(use_enable ecap) \
245 + $(use_enable esi) \
246 + $(use_enable htcp) \
247 + $(use_enable wccp) \
248 + $(use_enable wccpv2) \
249 + ${transparent} \
250 + ${myconf}
251 +}
252 +
253 +src_install() {
254 + default
255 +
256 + # need suid root for looking into /etc/shadow
257 + fowners root:squid /usr/libexec/squid/basic_ncsa_auth
258 + fperms 4750 /usr/libexec/squid/basic_ncsa_auth
259 + if use pam; then
260 + fowners root:squid /usr/libexec/squid/basic_pam_auth
261 + fperms 4750 /usr/libexec/squid/basic_pam_auth
262 + fi
263 + # pinger needs suid as well
264 + fowners root:squid /usr/libexec/squid/pinger
265 + fperms 4750 /usr/libexec/squid/pinger
266 +
267 + # these scripts depend on perl
268 + if ! use perl; then
269 + for f in basic_pop3_auth \
270 + ext_delayer_acl \
271 + helper-mux \
272 + log_db_daemon \
273 + security_fake_certverify \
274 + storeid_file_rewrite \
275 + url_lfs_rewrite; do
276 + rm "${D}"/usr/libexec/squid/${f} || die
277 + done
278 + fi
279 +
280 + # cleanup
281 + rm -r "${D}"/run "${D}"/var/cache || die
282 +
283 + dodoc CONTRIBUTORS CREDITS ChangeLog INSTALL QUICKSTART README SPONSORS doc/*.txt
284 + newdoc src/auth/negotiate/kerberos/README README.kerberos
285 + newdoc src/auth/basic/RADIUS/README README.RADIUS
286 + newdoc src/acl/external/kerberos_ldap_group/README README.kerberos_ldap_group
287 + dodoc RELEASENOTES.html
288 +
289 + newpamd "${FILESDIR}/squid.pam" squid
290 + newconfd "${FILESDIR}/squid.confd-r2" squid
291 + newinitd "${FILESDIR}/squid.initd-r5" squid
292 + if use logrotate; then
293 + insinto /etc/logrotate.d
294 + newins "${FILESDIR}/squid.logrotate" squid
295 + else
296 + exeinto /etc/cron.weekly
297 + newexe "${FILESDIR}/squid.cron" squid.cron
298 + fi
299 +
300 + diropts -m0750 -o squid -g squid
301 + keepdir /var/log/squid /etc/ssl/squid /var/lib/squid
302 +}
303 +
304 +pkg_postinst() {
305 + elog "A good starting point to debug Squid issues is to use 'squidclient mgr:' commands such as 'squidclient mgr:info'."
306 + if [ ${#r} -gt 0 ]; then
307 + elog "You are using a release with the official ${r} patch! Make sure you mention that, or send the output of 'squidclient mgr:info' when asking for support."
308 + fi
309 +}