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