Gentoo Archives: gentoo-commits

From: Eray Aslan <eras@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-proxy/squid/
Date: Thu, 22 Dec 2016 12:18:54
Message-Id: 1482409095.e890dbc06ebba955a5486815f639207899a642a5.eras@gentoo
1 commit: e890dbc06ebba955a5486815f639207899a642a5
2 Author: Eray Aslan <eras <AT> gentoo <DOT> org>
3 AuthorDate: Thu Dec 22 12:18:15 2016 +0000
4 Commit: Eray Aslan <eras <AT> gentoo <DOT> org>
5 CommitDate: Thu Dec 22 12:18:15 2016 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e890dbc0
7
8 net-proxy/squid: security bump to 3.5.23 - bug 603052
9
10 Package-Manager: Portage-2.3.3, Repoman-2.3.1
11
12 net-proxy/squid/Manifest | 1 +
13 net-proxy/squid/squid-3.5.23.ebuild | 241 ++++++++++++++++++++++++++++++++++++
14 2 files changed, 242 insertions(+)
15
16 diff --git a/net-proxy/squid/Manifest b/net-proxy/squid/Manifest
17 index 1c33cf4..2b7a55e 100644
18 --- a/net-proxy/squid/Manifest
19 +++ b/net-proxy/squid/Manifest
20 @@ -2,3 +2,4 @@ DIST squid-3.5.19.tar.xz 2318720 SHA256 c4b8a2efb85acc600e506605f175298ce3324048
21 DIST squid-3.5.20.tar.xz 2319780 SHA256 37db73bd33ddd3503fe375bc3f2b47d9fb7309042e439ad3651f21d5dcf2d395 SHA512 555e456d63bfe506e1cb84cd4857e900648382613181ff7fb70026e37d224b9b125b49e0a2e12cca63377427d33be7e9fbc3755c66a5370eab975e6ab3444bee WHIRLPOOL 37f8805e8601868cc6917e3d755ac6a42781267751379ef4f71bd3586a81292efceadd3c00defe8050c8f2e84b8dd2a81c167b3f0bb57e08517af9668e7f2147
22 DIST squid-3.5.21.tar.xz 2320896 SHA256 6fb537a1e4d746276e60856acd2398f88aab94ebd476ae2cc2bf16af5c7cc251 SHA512 17c541062c785effe091cedca7c5133f20280bf8a83efe0f04778a85b44d16c695f374cb8721c2fb4a241d4c7065f132e9e6bf7deca858944b22397fbf22b301 WHIRLPOOL 8b3de7de4d869cf6e9470063d2560ff1c96a0944fe996362258235db3314b15065243dc9f226d637545a523a2523a20a02b507bca5e521ca833fc1f5c27c4616
23 DIST squid-3.5.22.tar.xz 2324164 SHA256 1ce95b469257abeb2ed8a1c0417812301c1ef5a4cc40ca504167daa470ad9358 SHA512 40925c8b4d7b05a580397b1adf24457b66514eea2e05c0685251370aea3e48e0ac52b36ec9ec5ef5b1564ac46fec89bc8842e24cced413b9f3b24eb7778f6ba5 WHIRLPOOL 041ccfceb4e4111254ffb410008b727a87551827a726865b5860e9f506afcaf4f76331845e2a1b291fef4db6f4f1e042da48be03a18d667a5b917a5b2ccb76a6
24 +DIST squid-3.5.23.tar.xz 2325884 SHA256 fa4c0c99f41e92fe1330bed3968d176c6f47ef2e3aea2f83977d5501afa40bdb SHA512 3f2b3df60fc0b2aab3d0d9e3489832d60d0aac8222f09ad2ff6afb95202b904f41f6530d713e7ce446c6f62b66f0cd792a6b12005d43c53fe68d2371f9caa880 WHIRLPOOL 39338be97e3357759b9062e3c3b353a2118ca910e56584e73560489078e76a42b230ac24468ea62f6e3df7de210492beda54b0c178804c097d4b303d16cd2914
25
26 diff --git a/net-proxy/squid/squid-3.5.23.ebuild b/net-proxy/squid/squid-3.5.23.ebuild
27 new file mode 100644
28 index 00000000..d2965c6
29 --- /dev/null
30 +++ b/net-proxy/squid/squid-3.5.23.ebuild
31 @@ -0,0 +1,241 @@
32 +# Copyright 1999-2016 Gentoo Foundation
33 +# Distributed under the terms of the GNU General Public License v2
34 +# $Id$
35 +
36 +EAPI=6
37 +inherit autotools linux-info pam toolchain-funcs user
38 +
39 +DESCRIPTION="A full-featured web proxy cache"
40 +HOMEPAGE="http://www.squid-cache.org/"
41 +SRC_URI="http://www.squid-cache.org/Versions/v3/3.5/${P}.tar.xz"
42 +
43 +LICENSE="GPL-2"
44 +SLOT="0"
45 +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd"
46 +IUSE="caps ipv6 pam ldap libressl samba sasl kerberos nis radius ssl snmp selinux logrotate test \
47 + ecap esi ssl-crtd \
48 + mysql postgres sqlite \
49 + qos tproxy \
50 + +htcp +wccp +wccpv2 \
51 + pf-transparent ipf-transparent kqueue \
52 + elibc_uclibc kernel_linux"
53 +
54 +COMMON_DEPEND="caps? ( >=sys-libs/libcap-2.16 )
55 + pam? ( virtual/pam )
56 + ldap? ( net-nds/openldap )
57 + kerberos? ( virtual/krb5 )
58 + qos? ( net-libs/libnetfilter_conntrack )
59 + ssl? (
60 + libressl? ( dev-libs/libressl:0 )
61 + !libressl? ( dev-libs/openssl:0 )
62 + dev-libs/nettle >=net-libs/gnutls-3.1.5 )
63 + sasl? ( dev-libs/cyrus-sasl )
64 + ecap? ( net-libs/libecap:1 )
65 + esi? ( dev-libs/expat dev-libs/libxml2 )
66 + !x86-fbsd? ( logrotate? ( app-admin/logrotate ) )
67 + >=sys-libs/db-4:*
68 + dev-lang/perl
69 + dev-libs/libltdl:0"
70 +DEPEND="${COMMON_DEPEND}
71 + ecap? ( virtual/pkgconfig )
72 + test? ( dev-util/cppunit )"
73 +RDEPEND="${COMMON_DEPEND}
74 + samba? ( net-fs/samba )
75 + mysql? ( dev-perl/DBD-mysql )
76 + postgres? ( dev-perl/DBD-Pg )
77 + selinux? ( sec-policy/selinux-squid )
78 + sqlite? ( dev-perl/DBD-SQLite )
79 + !<=sci-biology/meme-4.8.1-r1"
80 +
81 +REQUIRED_USE="tproxy? ( caps )
82 + qos? ( caps )"
83 +
84 +pkg_pretend() {
85 + if use tproxy; then
86 + local CONFIG_CHECK="~NF_CONNTRACK ~NETFILTER_XT_MATCH_SOCKET ~NETFILTER_XT_TARGET_TPROXY"
87 + linux-info_pkg_setup
88 + fi
89 +}
90 +
91 +pkg_setup() {
92 + enewgroup squid
93 + enewuser squid -1 -1 /var/cache/squid squid
94 +}
95 +
96 +src_prepare() {
97 + eapply "${FILESDIR}/${PN}-3.5.7-gentoo.patch"
98 + sed -i -e 's:/usr/local/squid/etc:/etc/squid:' \
99 + INSTALL QUICKSTART \
100 + scripts/fileno-to-pathname.pl \
101 + scripts/check_cache.pl \
102 + tools/cachemgr.cgi.8 \
103 + tools/purge/conffile.hh \
104 + tools/purge/README || die
105 + sed -i -e 's:/usr/local/squid/sbin:/usr/sbin:' \
106 + INSTALL QUICKSTART || die
107 + sed -i -e 's:/usr/local/squid/var/cache:/var/cache/squid:' \
108 + QUICKSTART || die
109 + sed -i -e 's:/usr/local/squid/var/logs:/var/log/squid:' \
110 + QUICKSTART \
111 + src/log/access_log.cc || die
112 + sed -i -e 's:/usr/local/squid/logs:/var/log/squid:' \
113 + src/log/access_log.cc || die
114 + sed -i -e 's:/usr/local/squid/libexec:/usr/libexec/squid:' \
115 + helpers/external_acl/unix_group/ext_unix_group_acl.8 \
116 + helpers/external_acl/session/ext_session_acl.8 \
117 + src/ssl/ssl_crtd.8 || die
118 + sed -i -e 's:/usr/local/squid/cache:/var/cache/squid:' \
119 + scripts/check_cache.pl || die
120 + sed -i -e 's:/usr/local/squid/ssl_cert:/etc/ssl/squid:' \
121 + src/ssl/ssl_crtd.8 || die
122 + sed -i -e 's:/usr/local/squid/var/lib/ssl_db:/var/lib/squid/ssl_db:' \
123 + src/ssl/ssl_crtd.8 || die
124 + sed -i -e 's:/var/lib/ssl_db:/var/lib/squid/ssl_db:' \
125 + src/ssl/ssl_crtd.8 || die
126 + # /var/run/squid to /run/squid
127 + sed -i -e 's:$(localstatedir)::' \
128 + src/ipc/Makefile.am || die
129 + sed -i -e 's:_LTDL_SETUP:LTDL_INIT([installable]):' \
130 + libltdl/configure.ac || die
131 +
132 + eapply_user
133 + eautoreconf
134 +}
135 +
136 +src_configure() {
137 + local basic_modules="MSNT-multi-domain,NCSA,POP3,getpwnam"
138 + use samba && basic_modules+=",SMB"
139 + use ldap && basic_modules+=",LDAP"
140 + use pam && basic_modules+=",PAM"
141 + use sasl && basic_modules+=",SASL"
142 + use nis && ! use elibc_uclibc && basic_modules+=",NIS"
143 + use radius && basic_modules+=",RADIUS"
144 + if use mysql || use postgres || use sqlite ; then
145 + basic_modules+=",DB"
146 + fi
147 +
148 + local digest_modules="file"
149 + use ldap && digest_modules+=",LDAP,eDirectory"
150 +
151 + local negotiate_modules="none"
152 + local myconf="--without-mit-krb5 --without-heimdal-krb5"
153 + if use kerberos ; then
154 + negotiate_modules="kerberos,wrapper"
155 + if has_version app-crypt/heimdal ; then
156 + myconf="--without-mit-krb5 --with-heimdal-krb5"
157 + else
158 + myconf="--with-mit-krb5 --without-heimdal-krb5"
159 + fi
160 + fi
161 +
162 + local ntlm_modules="none"
163 + use samba && ntlm_modules="smb_lm"
164 +
165 + local ext_helpers="file_userip,session,unix_group"
166 + use samba && ext_helpers+=",wbinfo_group"
167 + use ldap && ext_helpers+=",LDAP_group,eDirectory_userip"
168 + use ldap && use kerberos && ext_helpers+=",kerberos_ldap_group"
169 +
170 + local storeio_modules="aufs,diskd,rock,ufs"
171 +
172 + local transparent
173 + if use kernel_linux ; then
174 + transparent+=" --enable-linux-netfilter"
175 + use qos && transparent+=" --enable-zph-qos --with-netfilter-conntrack"
176 + fi
177 +
178 + if use kernel_FreeBSD || use kernel_OpenBSD || use kernel_NetBSD ; then
179 + transparent+=" $(use_enable kqueue)"
180 + if use pf-transparent; then
181 + transparent+=" --enable-pf-transparent"
182 + elif use ipf-transparent; then
183 + transparent+=" --enable-ipf-transparent"
184 + fi
185 + fi
186 +
187 + tc-export CC AR
188 +
189 + econf \
190 + --sysconfdir=/etc/squid \
191 + --libexecdir=/usr/libexec/squid \
192 + --localstatedir=/var \
193 + --with-pidfile=/run/squid.pid \
194 + --datadir=/usr/share/squid \
195 + --with-logdir=/var/log/squid \
196 + --with-default-user=squid \
197 + --enable-removal-policies="lru,heap" \
198 + --enable-storeio="${storeio_modules}" \
199 + --enable-disk-io \
200 + --enable-auth-basic="${basic_modules}" \
201 + --enable-auth-digest="${digest_modules}" \
202 + --enable-auth-ntlm="${ntlm_modules}" \
203 + --enable-auth-negotiate="${negotiate_modules}" \
204 + --enable-external-acl-helpers="${ext_helpers}" \
205 + --enable-log-daemon-helpers \
206 + --enable-url-rewrite-helpers \
207 + --enable-cache-digests \
208 + --enable-delay-pools \
209 + --enable-eui \
210 + --enable-icmp \
211 + --enable-follow-x-forwarded-for \
212 + --with-large-files \
213 + --disable-strict-error-checking \
214 + --disable-arch-native \
215 + --with-ltdl-includedir=/usr/include \
216 + --with-ltdl-libdir=/usr/$(get_libdir) \
217 + $(use_with caps libcap) \
218 + $(use_enable ipv6) \
219 + $(use_enable snmp) \
220 + $(use_with ssl openssl) \
221 + $(use_with ssl nettle) \
222 + $(use_with ssl gnutls) \
223 + $(use_enable ssl-crtd) \
224 + $(use_enable ecap) \
225 + $(use_enable esi) \
226 + $(use_enable htcp) \
227 + $(use_enable wccp) \
228 + $(use_enable wccpv2) \
229 + ${transparent} \
230 + ${myconf}
231 +}
232 +
233 +src_install() {
234 + emake DESTDIR="${D}" install
235 +
236 + # need suid root for looking into /etc/shadow
237 + fowners root:squid /usr/libexec/squid/basic_ncsa_auth
238 + fperms 4750 /usr/libexec/squid/basic_ncsa_auth
239 + if use pam; then
240 + fowners root:squid /usr/libexec/squid/basic_pam_auth
241 + fperms 4750 /usr/libexec/squid/basic_pam_auth
242 + fi
243 + # pinger needs suid as well
244 + fowners root:squid /usr/libexec/squid/pinger
245 + fperms 4750 /usr/libexec/squid/pinger
246 +
247 + # cleanup
248 + rm -f "${D}"/usr/bin/Run*
249 + rm -rf "${D}"/run/squid "${D}"/var/cache/squid
250 +
251 + dodoc CONTRIBUTORS CREDITS ChangeLog INSTALL QUICKSTART README SPONSORS doc/*.txt
252 + newdoc helpers/negotiate_auth/kerberos/README README.kerberos
253 + newdoc helpers/basic_auth/RADIUS/README README.RADIUS
254 + newdoc helpers/external_acl/kerberos_ldap_group/README README.kerberos_ldap_group
255 + newdoc tools/purge/README README.purge
256 + newdoc tools/helper-mux.README README.helper-mux
257 + dodoc RELEASENOTES.html
258 +
259 + newpamd "${FILESDIR}/squid.pam" squid
260 + newconfd "${FILESDIR}/squid.confd-r1" squid
261 + newinitd "${FILESDIR}/squid.initd-r4" squid
262 + if use logrotate; then
263 + insinto /etc/logrotate.d
264 + newins "${FILESDIR}/squid.logrotate" squid
265 + else
266 + exeinto /etc/cron.weekly
267 + newexe "${FILESDIR}/squid.cron" squid.cron
268 + fi
269 +
270 + diropts -m0750 -o squid -g squid
271 + keepdir /var/log/squid /etc/ssl/squid /var/lib/squid
272 +}