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: Tue, 22 Sep 2015 06:29:22
Message-Id: 1442903328.384715d9776e57b007da94aa44a04e3fbce48639.eras@gentoo
1 commit: 384715d9776e57b007da94aa44a04e3fbce48639
2 Author: Eray Aslan <eras <AT> gentoo <DOT> org>
3 AuthorDate: Tue Sep 22 06:28:48 2015 +0000
4 Commit: Eray Aslan <eras <AT> gentoo <DOT> org>
5 CommitDate: Tue Sep 22 06:28:48 2015 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=384715d9
7
8 net-proxy/squid: security bump to squid-3.5.9
9
10 Package-Manager: portage-2.2.21
11
12 net-proxy/squid/Manifest | 1 +
13 net-proxy/squid/squid-3.5.9.ebuild | 250 +++++++++++++++++++++++++++++++++++++
14 2 files changed, 251 insertions(+)
15
16 diff --git a/net-proxy/squid/Manifest b/net-proxy/squid/Manifest
17 index bada621..bdea487 100644
18 --- a/net-proxy/squid/Manifest
19 +++ b/net-proxy/squid/Manifest
20 @@ -1,3 +1,4 @@
21 DIST squid-3.5.6.tar.xz 2291152 SHA256 cd080e8d5eaabebf6808792751322bd05f2a9c8fe4377f54c7155682ef6c38d5 SHA512 f6c2550cdb5b2f3317105c986caddf06d010bffa0c61d065cffcde72e5bc30c4608486c79c4b25418dfb9f0a8d7ef1d2fabb6b07d1f0262a19fafc945af98bef WHIRLPOOL 863c6f73c3c26737d98cbff15afa5b6630310226ee9ec10a3e38f646b1416137e998f9bb1e5b492e5871129aed3c98e729b3a757d35088162e671d310a887336
22 DIST squid-3.5.7.tar.xz 2294580 SHA256 ec6f861bddee007b1dd320667a26ddc9ff76847bbe4cbb59c0134588e65c8699 SHA512 13757da759c1a64fe13d451cff40c4ae30b18c2939f6971b4ef25e24b771ea973e3357f05ec89fccff51acc9e2c77418880b05f6020d58b7633141b928aaf349 WHIRLPOOL 9ce722647f6144ae5192a0a177d5d085252039eed3a7cbdf1fcb638c32097bf21710db71044448fc98bdba7c15daefb79dee5912b4d0c41cbc0e0b0fda695ee1
23 DIST squid-3.5.8.tar.xz 2295644 SHA256 f402a21d4fae8b3e9df13683dc530366e4b1753df21e91c05a0a9514a1abfc62 SHA512 df371934b141fd0e57223ef2a801b71ae2c88c918e1ebd17a82105d33a8f6d439da65cd6437b42a3857f0d64ce461ea31d01299d452ede3650a44cf6826e16e1 WHIRLPOOL 9ca3f07b3068a439299b30e8be924208bc36e336f7929c593563bf6dadf9eaaa051c213e34eafc1ec6db43540b61367bd666c7c172e370d600aa6823779bd192
24 +DIST squid-3.5.9.tar.xz 2296384 SHA256 9e9a3dc16e6f97258f2c3589dc6163bec20fb9369aec1fe03612dbca76d185d3 SHA512 e9db2eb1674feb4242c5498d24c44ba53eb1ac8df71465301a6e2462051788b45d38e779edc38a944c7ac903bfef0dde52a9b0e167ef15d71084b7b6e405c666 WHIRLPOOL 48c9866f36882051072fde81521189c463d35a72954f0d891b0f65f7caa49f078b1ad5229244b3c9bd51e8c4f07c947313eacffc3d94ac211c95f432deed3657
25
26 diff --git a/net-proxy/squid/squid-3.5.9.ebuild b/net-proxy/squid/squid-3.5.9.ebuild
27 new file mode 100644
28 index 0000000..1c2065f
29 --- /dev/null
30 +++ b/net-proxy/squid/squid-3.5.9.ebuild
31 @@ -0,0 +1,250 @@
32 +# Copyright 1999-2015 Gentoo Foundation
33 +# Distributed under the terms of the GNU General Public License v2
34 +# $Id$
35 +
36 +EAPI=5
37 +inherit autotools eutils linux-info pam toolchain-funcs user versionator
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 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? ( dev-libs/openssl:* dev-libs/nettle >=net-libs/gnutls-3.1.5 )
60 + sasl? ( dev-libs/cyrus-sasl )
61 + ecap? ( net-libs/libecap:1 )
62 + esi? ( dev-libs/expat dev-libs/libxml2 )
63 + !x86-fbsd? ( logrotate? ( app-admin/logrotate ) )
64 + >=sys-libs/db-4:*
65 + dev-lang/perl
66 + dev-libs/libltdl:0"
67 +DEPEND="${COMMON_DEPEND}
68 + ecap? ( virtual/pkgconfig )
69 + sys-apps/ed
70 + test? ( dev-util/cppunit )"
71 +RDEPEND="${COMMON_DEPEND}
72 + samba? ( net-fs/samba )
73 + mysql? ( dev-perl/DBD-mysql )
74 + postgres? ( dev-perl/DBD-Pg )
75 + selinux? ( sec-policy/selinux-squid )
76 + sqlite? ( dev-perl/DBD-SQLite )
77 + !<=sci-biology/meme-4.8.1-r1"
78 +
79 +REQUIRED_USE="tproxy? ( caps )
80 + qos? ( caps )"
81 +
82 +pkg_pretend() {
83 + if use tproxy; then
84 + local CONFIG_CHECK="~NF_CONNTRACK ~NETFILTER_XT_MATCH_SOCKET ~NETFILTER_XT_TARGET_TPROXY"
85 + linux-info_pkg_setup
86 + fi
87 +}
88 +
89 +pkg_setup() {
90 + enewgroup squid
91 + enewuser squid -1 -1 /var/cache/squid squid
92 +}
93 +
94 +src_prepare() {
95 + epatch "${FILESDIR}/${PN}-3.5.7-gentoo.patch"
96 + epatch "${FILESDIR}/${PN}-kernel-headers-4.2.patch"
97 + sed -i -e 's:/usr/local/squid/etc:/etc/squid:' \
98 + INSTALL QUICKSTART \
99 + scripts/fileno-to-pathname.pl \
100 + scripts/check_cache.pl \
101 + tools/cachemgr.cgi.8 \
102 + tools/purge/conffile.hh \
103 + tools/purge/README || die
104 + sed -i -e 's:/usr/local/squid/sbin:/usr/sbin:' \
105 + INSTALL QUICKSTART || die
106 + sed -i -e 's:/usr/local/squid/var/cache:/var/cache/squid:' \
107 + QUICKSTART || die
108 + sed -i -e 's:/usr/local/squid/var/logs:/var/log/squid:' \
109 + QUICKSTART \
110 + src/log/access_log.cc || die
111 + sed -i -e 's:/usr/local/squid/logs:/var/log/squid:' \
112 + src/log/access_log.cc || die
113 + sed -i -e 's:/usr/local/squid/libexec:/usr/libexec/squid:' \
114 + helpers/external_acl/unix_group/ext_unix_group_acl.8 \
115 + helpers/external_acl/session/ext_session_acl.8 \
116 + src/ssl/ssl_crtd.8 || die
117 + sed -i -e 's:/usr/local/squid/cache:/var/cache/squid:' \
118 + scripts/check_cache.pl || die
119 + sed -i -e 's:/usr/local/squid/ssl_cert:/etc/ssl/squid:' \
120 + src/ssl/ssl_crtd.8 || die
121 + sed -i -e 's:/usr/local/squid/var/lib/ssl_db:/var/lib/squid/ssl_db:' \
122 + src/ssl/ssl_crtd.8 || die
123 + sed -i -e 's:/var/lib/ssl_db:/var/lib/squid/ssl_db:' \
124 + src/ssl/ssl_crtd.8 || die
125 + # /var/run/squid to /run/squid
126 + sed -i -e 's:$(localstatedir)::' \
127 + src/ipc/Makefile.am || die
128 + sed -i -e 's:_LTDL_SETUP:LTDL_INIT([installable]):' \
129 + libltdl/configure.ac || die
130 +
131 + epatch_user
132 +
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 + dohtml 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 +}
273 +
274 +pkg_postinst() {
275 + if [[ $(get_version_component_range 1 ${REPLACING_VERSIONS}) -lt 3 ]] || \
276 + [[ $(get_version_component_range 2 ${REPLACING_VERSIONS}) -lt 5 ]]; then
277 + elog "Please read the release notes at:"
278 + elog " http://www.squid-cache.org/Versions/v3/3.5/RELEASENOTES.html"
279 + echo
280 + fi
281 +}