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: Mon, 17 May 2021 08:04:26
Message-Id: 1621238658.e1a2cfc9505ad2dcf104e580d80784ce98f27629.zlogene@gentoo
1 commit: e1a2cfc9505ad2dcf104e580d80784ce98f27629
2 Author: Mikle Kolyada <zlogene <AT> gentoo <DOT> org>
3 AuthorDate: Mon May 17 08:02:48 2021 +0000
4 Commit: Mikle Kolyada <zlogene <AT> gentoo <DOT> org>
5 CommitDate: Mon May 17 08:04:18 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e1a2cfc9
7
8 net-proxy/squid: Version bump (v4.15)
9
10 Package-Manager: Portage-3.0.17, Repoman-3.0.2
11 Signed-off-by: Mikle Kolyada <zlogene <AT> gentoo.org>
12
13 net-proxy/squid/Manifest | 1 +
14 net-proxy/squid/squid-4.15.ebuild | 286 ++++++++++++++++++++++++++++++++++++++
15 2 files changed, 287 insertions(+)
16
17 diff --git a/net-proxy/squid/Manifest b/net-proxy/squid/Manifest
18 index 0f94dacdf38..ed550051705 100644
19 --- a/net-proxy/squid/Manifest
20 +++ b/net-proxy/squid/Manifest
21 @@ -1,2 +1,3 @@
22 DIST squid-4.13.tar.xz 2452752 BLAKE2B e2efdfda736f2324c6723e76272c4989a41fa6d0f52b48cc33957ae8e57e75350487d9683fc72c43926e5d91b698eef728282895018b78acefe23de2e67cfd74 SHA512 06807f82ed01e12afe2dd843aa0a94f69c351765b1889c4c5c3da1cf2ecb06ac3a4be6a24a62f04397299c8fc0df5397f76f64df5422ff78b37a9382d5fdf7fc
23 DIST squid-4.14.tar.xz 2452892 BLAKE2B be8d8fc17b6b762faac0e6fbb5e428fc48b3f958b27f9da9eb941315c22185d34edb9fec73518626b6d5a7206b43f209638dc6bb874d52d6e183e5646874a668 SHA512 3509caea9e10ea54547eeb769a21f0ca4d37e39a063953821fc51d588b22facfa183d0a48be9ab15831ee646e031079b515c75162515b8a4e7c708df2d41958b
24 +DIST squid-4.15.tar.xz 2454176 BLAKE2B 3cb08c806f03fcddd7233b05986434d2be3e62a50d006eb3f84bbc5b894ee3641929551d00a1800d6676add62f967067ec62b5b7c41d767766eeab5dfc17980e SHA512 8f0ce6e30dd9173927e8133618211ffb865fb5dde4c63c2fb465e2efccda4a6efb33f2c0846870c9b915340aff5f59461a60171882bcc0c890336b846fe60bd1
25
26 diff --git a/net-proxy/squid/squid-4.15.ebuild b/net-proxy/squid/squid-4.15.ebuild
27 new file mode 100644
28 index 00000000000..ce003456869
29 --- /dev/null
30 +++ b/net-proxy/squid/squid-4.15.ebuild
31 @@ -0,0 +1,286 @@
32 +# Copyright 1999-2021 Gentoo Authors
33 +# Distributed under the terms of the GNU General Public License v2
34 +
35 +EAPI=7
36 +
37 +inherit autotools flag-o-matic linux-info pam systemd toolchain-funcs
38 +
39 +DESCRIPTION="A full-featured web proxy cache"
40 +HOMEPAGE="http://www.squid-cache.org/"
41 +
42 +# Upstream patch ID for the most recent bug-fixed update to the formal release.
43 +r=
44 +#r=-20181117-r0022167
45 +if [ -z "$r" ]; then
46 + SRC_URI="http://www.squid-cache.org/Versions/v${PV%.*}/${P}.tar.xz"
47 +else
48 + SRC_URI="http://www.squid-cache.org/Versions/v${PV%.*}/${P}${r}.tar.bz2"
49 + S="${S}${r}"
50 +fi
51 +
52 +LICENSE="GPL-2"
53 +SLOT="0"
54 +KEYWORDS="~alpha amd64 arm ~arm64 ~hppa ~ia64 ~mips ppc ppc64 ~sparc x86"
55 +IUSE="caps gnutls ipv6 pam ldap samba sasl kerberos nis radius ssl snmp selinux logrotate test \
56 + ecap esi ssl-crtd \
57 + mysql postgres sqlite systemd \
58 + perl qos tproxy \
59 + +htcp +wccp +wccpv2 \
60 + pf-transparent ipf-transparent kqueue \
61 + elibc_uclibc kernel_linux"
62 +
63 +RESTRICT="!test? ( test )"
64 +
65 +BDEPEND="dev-lang/perl"
66 +
67 +COMMON_DEPEND="acct-group/squid
68 + acct-user/squid
69 + caps? ( >=sys-libs/libcap-2.16 )
70 + pam? ( sys-libs/pam )
71 + ldap? ( net-nds/openldap )
72 + kerberos? ( virtual/krb5 )
73 + qos? ( net-libs/libnetfilter_conntrack )
74 + ssl? (
75 + !gnutls? ( dev-libs/openssl:0 )
76 + dev-libs/nettle:= )
77 + sasl? ( dev-libs/cyrus-sasl )
78 + systemd? ( sys-apps/systemd:= )
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 + sed -i 's:/var/run/:/run/:g' tools/systemd/squid.service || die
139 +
140 + eapply_user
141 + eautoreconf
142 +}
143 +
144 +src_configure() {
145 + local basic_modules="NCSA,POP3,getpwnam"
146 + use samba && basic_modules+=",SMB"
147 + use ldap && basic_modules+=",SMB_LM,LDAP"
148 + use pam && basic_modules+=",PAM"
149 + use sasl && basic_modules+=",SASL"
150 + use nis && ! use elibc_uclibc && basic_modules+=",NIS"
151 + use radius && basic_modules+=",RADIUS"
152 + if use mysql || use postgres || use sqlite ; then
153 + basic_modules+=",DB"
154 + fi
155 +
156 + local digest_modules="file"
157 + use ldap && digest_modules+=",LDAP,eDirectory"
158 +
159 + local negotiate_modules="none"
160 + local myconf="--without-mit-krb5 --without-heimdal-krb5"
161 + if use kerberos ; then
162 + negotiate_modules="kerberos,wrapper"
163 + if has_version app-crypt/heimdal ; then
164 + myconf="--without-mit-krb5 --with-heimdal-krb5"
165 + else
166 + myconf="--with-mit-krb5 --without-heimdal-krb5"
167 + fi
168 + fi
169 +
170 + local ntlm_modules="none"
171 + use samba && ntlm_modules="SMB_LM"
172 +
173 + local ext_helpers="file_userip,session,unix_group,delayer,time_quota"
174 + use samba && ext_helpers+=",wbinfo_group"
175 + use ldap && ext_helpers+=",LDAP_group,eDirectory_userip"
176 + use ldap && use kerberos && ext_helpers+=",kerberos_ldap_group"
177 + if use mysql || use postgres || use sqlite ; then
178 + ext_helpers+=",SQL_session"
179 + fi
180 +
181 + local storeio_modules="aufs,diskd,rock,ufs"
182 +
183 + local transparent
184 + if use kernel_linux ; then
185 + transparent+=" --enable-linux-netfilter"
186 + use qos && transparent+=" --enable-zph-qos --with-netfilter-conntrack"
187 + fi
188 +
189 + if use kernel_FreeBSD || use kernel_OpenBSD || use kernel_NetBSD ; then
190 + transparent+=" $(use_enable kqueue)"
191 + if use pf-transparent; then
192 + transparent+=" --enable-pf-transparent"
193 + elif use ipf-transparent; then
194 + transparent+=" --enable-ipf-transparent"
195 + fi
196 + fi
197 +
198 + tc-export_build_env BUILD_CXX
199 + export BUILDCXX=${BUILD_CXX}
200 + export BUILDCXXFLAGS=${BUILD_CXXFLAGS}
201 + tc-export CC AR
202 +
203 + # Should be able to drop this workaround with newer versions.
204 + # https://bugs.squid-cache.org/show_bug.cgi?id=4224
205 + tc-is-cross-compiler && export squid_cv_gnu_atomics=no
206 +
207 + # Bug #719662
208 + (use ppc || use arm || use hppa) && append-libs -latomic
209 +
210 + econf \
211 + --sysconfdir=/etc/squid \
212 + --libexecdir=/usr/libexec/squid \
213 + --localstatedir=/var \
214 + --with-pidfile=/run/squid.pid \
215 + --datadir=/usr/share/squid \
216 + --with-logdir=/var/log/squid \
217 + --with-default-user=squid \
218 + --enable-removal-policies="lru,heap" \
219 + --enable-storeio="${storeio_modules}" \
220 + --enable-disk-io \
221 + --enable-auth-basic="${basic_modules}" \
222 + --enable-auth-digest="${digest_modules}" \
223 + --enable-auth-ntlm="${ntlm_modules}" \
224 + --enable-auth-negotiate="${negotiate_modules}" \
225 + --enable-external-acl-helpers="${ext_helpers}" \
226 + --enable-log-daemon-helpers \
227 + --enable-url-rewrite-helpers \
228 + --enable-cache-digests \
229 + --enable-delay-pools \
230 + --enable-eui \
231 + --enable-icmp \
232 + --enable-follow-x-forwarded-for \
233 + --with-large-files \
234 + --with-build-environment=default \
235 + --disable-strict-error-checking \
236 + --disable-arch-native \
237 + --with-included-ltdl=/usr/include \
238 + --with-ltdl-libdir=/usr/$(get_libdir) \
239 + $(use_with caps libcap) \
240 + $(use_enable ipv6) \
241 + $(use_enable snmp) \
242 + $(use_with ssl openssl) \
243 + $(use_with ssl nettle) \
244 + $(use_with gnutls) \
245 + $(use_enable ssl-crtd) \
246 + $(use_with systemd) \
247 + $(use_enable ecap) \
248 + $(use_enable esi) \
249 + $(use_enable htcp) \
250 + $(use_enable wccp) \
251 + $(use_enable wccpv2) \
252 + ${transparent} \
253 + ${myconf}
254 +}
255 +
256 +src_install() {
257 + default
258 +
259 + systemd_dounit "tools/systemd/squid.service"
260 +
261 + # need suid root for looking into /etc/shadow
262 + fowners root:squid /usr/libexec/squid/basic_ncsa_auth
263 + fperms 4750 /usr/libexec/squid/basic_ncsa_auth
264 + if use pam; then
265 + fowners root:squid /usr/libexec/squid/basic_pam_auth
266 + fperms 4750 /usr/libexec/squid/basic_pam_auth
267 + fi
268 + # pinger needs suid as well
269 + fowners root:squid /usr/libexec/squid/pinger
270 + fperms 4750 /usr/libexec/squid/pinger
271 +
272 + # these scripts depend on perl
273 + if ! use perl; then
274 + for f in basic_pop3_auth \
275 + ext_delayer_acl \
276 + helper-mux \
277 + log_db_daemon \
278 + security_fake_certverify \
279 + storeid_file_rewrite \
280 + url_lfs_rewrite; do
281 + rm "${D}"/usr/libexec/squid/${f} || die
282 + done
283 + fi
284 +
285 + # cleanup
286 + rm -r "${D}"/run "${D}"/var/cache || die
287 +
288 + dodoc CONTRIBUTORS CREDITS ChangeLog INSTALL QUICKSTART README SPONSORS doc/*.txt
289 + newdoc src/auth/negotiate/kerberos/README README.kerberos
290 + newdoc src/auth/basic/RADIUS/README README.RADIUS
291 + newdoc src/acl/external/kerberos_ldap_group/README README.kerberos_ldap_group
292 + dodoc RELEASENOTES.html
293 +
294 + if use pam; then
295 + newpamd "${FILESDIR}/squid.pam" squid
296 + fi
297 +
298 + newconfd "${FILESDIR}/squid.confd-r2" squid
299 + newinitd "${FILESDIR}/squid.initd-r5" squid
300 + if use logrotate; then
301 + insinto /etc/logrotate.d
302 + newins "${FILESDIR}/squid.logrotate" squid
303 + else
304 + exeinto /etc/cron.weekly
305 + newexe "${FILESDIR}/squid.cron" squid.cron
306 + fi
307 +
308 + diropts -m0750 -o squid -g squid
309 + keepdir /var/log/squid /etc/ssl/squid /var/lib/squid
310 +}
311 +
312 +pkg_postinst() {
313 + elog "A good starting point to debug Squid issues is to use 'squidclient mgr:' commands such as 'squidclient mgr:info'."
314 + if [ ${#r} -gt 0 ]; then
315 + 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."
316 + fi
317 +}