1 |
commit: dece1ba0c3fec64ebc3c24c55d19f06f9de0bce2 |
2 |
Author: Mikle Kolyada <zlogene <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Jan 27 16:18:38 2020 +0000 |
4 |
Commit: Mikle Kolyada <zlogene <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Jan 27 16:19:07 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=dece1ba0 |
7 |
|
8 |
net-proxy/squid: Version bump (v4.10) |
9 |
|
10 |
Package-Manager: Portage-2.3.84, Repoman-2.3.20 |
11 |
Signed-off-by: Mikle Kolyada <zlogene <AT> gentoo.org> |
12 |
|
13 |
net-proxy/squid/Manifest | 1 + |
14 |
net-proxy/squid/squid-4.10.ebuild | 276 ++++++++++++++++++++++++++++++++++++++ |
15 |
2 files changed, 277 insertions(+) |
16 |
|
17 |
diff --git a/net-proxy/squid/Manifest b/net-proxy/squid/Manifest |
18 |
index bd9b122ddb3..0082c607046 100644 |
19 |
--- a/net-proxy/squid/Manifest |
20 |
+++ b/net-proxy/squid/Manifest |
21 |
@@ -1 +1,2 @@ |
22 |
+DIST squid-4.10.tar.xz 2445848 BLAKE2B 8161626f0fc448f62c9afe13194e10a3ac21c1fe25cd6a9e6a85dcc3cebc2a84750ae78235134ada38f730923e7d1815ca5fb5a6aec7ae70623798c66beaf160 SHA512 033891f84789fe23a23fabcfb6f51a5b044c16892600f94380b5f0bcbceaef67b95c7047154d940511146248ca9846a949f00a609c6ed27f9af8829325eb08e0 |
23 |
DIST squid-4.9.tar.xz 2444664 BLAKE2B ac9006519773809034176cf350f31400ddc02e03aaa67df725fc9f59245337a319526463b3f96916f7d6544b99bd623b0969c8b1787b50ee142dc2fe38bb5b75 SHA512 ca3db39379ea0582ff28297dde21899d02916ea499fb9c0f86aa60301829b7c601bb21ee274f841555047bc911e878717b38670b8796e5d717862b7a285ef84f |
24 |
|
25 |
diff --git a/net-proxy/squid/squid-4.10.ebuild b/net-proxy/squid/squid-4.10.ebuild |
26 |
new file mode 100644 |
27 |
index 00000000000..90f46fc0095 |
28 |
--- /dev/null |
29 |
+++ b/net-proxy/squid/squid-4.10.ebuild |
30 |
@@ -0,0 +1,276 @@ |
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 linux-info pam toolchain-funcs user |
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 ~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 |
+RESTRICT="!test? ( test )" |
64 |
+ |
65 |
+BDEPEND="dev-lang/perl" |
66 |
+ |
67 |
+COMMON_DEPEND="caps? ( >=sys-libs/libcap-2.16 ) |
68 |
+ pam? ( sys-libs/pam ) |
69 |
+ ldap? ( net-nds/openldap ) |
70 |
+ kerberos? ( virtual/krb5 ) |
71 |
+ qos? ( net-libs/libnetfilter_conntrack ) |
72 |
+ ssl? ( |
73 |
+ !gnutls? ( dev-libs/openssl:0 ) |
74 |
+ dev-libs/nettle:= ) |
75 |
+ sasl? ( dev-libs/cyrus-sasl ) |
76 |
+ ecap? ( net-libs/libecap:1 ) |
77 |
+ esi? ( dev-libs/expat dev-libs/libxml2 ) |
78 |
+ gnutls? ( >=net-libs/gnutls-3.1.5 ) |
79 |
+ logrotate? ( app-admin/logrotate ) |
80 |
+ >=sys-libs/db-4:* |
81 |
+ dev-libs/libltdl:0" |
82 |
+DEPEND="${COMMON_DEPEND} |
83 |
+ ${BDEPEND} |
84 |
+ ecap? ( virtual/pkgconfig ) |
85 |
+ test? ( dev-util/cppunit )" |
86 |
+RDEPEND="${COMMON_DEPEND} |
87 |
+ samba? ( net-fs/samba ) |
88 |
+ perl? ( dev-lang/perl ) |
89 |
+ mysql? ( dev-perl/DBD-mysql ) |
90 |
+ postgres? ( dev-perl/DBD-Pg ) |
91 |
+ selinux? ( sec-policy/selinux-squid ) |
92 |
+ sqlite? ( dev-perl/DBD-SQLite )" |
93 |
+ |
94 |
+REQUIRED_USE="tproxy? ( caps ) |
95 |
+ qos? ( caps )" |
96 |
+ |
97 |
+pkg_pretend() { |
98 |
+ if use tproxy; then |
99 |
+ local CONFIG_CHECK="~NF_CONNTRACK ~NETFILTER_XT_MATCH_SOCKET ~NETFILTER_XT_TARGET_TPROXY" |
100 |
+ linux-info_pkg_setup |
101 |
+ fi |
102 |
+} |
103 |
+ |
104 |
+pkg_setup() { |
105 |
+ enewgroup squid |
106 |
+ enewuser squid -1 -1 /var/cache/squid squid |
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 |
+ econf \ |
206 |
+ --sysconfdir=/etc/squid \ |
207 |
+ --libexecdir=/usr/libexec/squid \ |
208 |
+ --localstatedir=/var \ |
209 |
+ --with-pidfile=/run/squid.pid \ |
210 |
+ --datadir=/usr/share/squid \ |
211 |
+ --with-logdir=/var/log/squid \ |
212 |
+ --with-default-user=squid \ |
213 |
+ --enable-removal-policies="lru,heap" \ |
214 |
+ --enable-storeio="${storeio_modules}" \ |
215 |
+ --enable-disk-io \ |
216 |
+ --enable-auth-basic="${basic_modules}" \ |
217 |
+ --enable-auth-digest="${digest_modules}" \ |
218 |
+ --enable-auth-ntlm="${ntlm_modules}" \ |
219 |
+ --enable-auth-negotiate="${negotiate_modules}" \ |
220 |
+ --enable-external-acl-helpers="${ext_helpers}" \ |
221 |
+ --enable-log-daemon-helpers \ |
222 |
+ --enable-url-rewrite-helpers \ |
223 |
+ --enable-cache-digests \ |
224 |
+ --enable-delay-pools \ |
225 |
+ --enable-eui \ |
226 |
+ --enable-icmp \ |
227 |
+ --enable-follow-x-forwarded-for \ |
228 |
+ --with-large-files \ |
229 |
+ --with-build-environment=default \ |
230 |
+ --disable-strict-error-checking \ |
231 |
+ --disable-arch-native \ |
232 |
+ --with-included-ltdl=/usr/include \ |
233 |
+ --with-ltdl-libdir=/usr/$(get_libdir) \ |
234 |
+ $(use_with caps libcap) \ |
235 |
+ $(use_enable ipv6) \ |
236 |
+ $(use_enable snmp) \ |
237 |
+ $(use_with ssl openssl) \ |
238 |
+ $(use_with ssl nettle) \ |
239 |
+ $(use_with gnutls) \ |
240 |
+ $(use_enable ssl-crtd) \ |
241 |
+ $(use_enable ecap) \ |
242 |
+ $(use_enable esi) \ |
243 |
+ $(use_enable htcp) \ |
244 |
+ $(use_enable wccp) \ |
245 |
+ $(use_enable wccpv2) \ |
246 |
+ ${transparent} \ |
247 |
+ ${myconf} |
248 |
+} |
249 |
+ |
250 |
+src_install() { |
251 |
+ default |
252 |
+ |
253 |
+ # need suid root for looking into /etc/shadow |
254 |
+ fowners root:squid /usr/libexec/squid/basic_ncsa_auth |
255 |
+ fperms 4750 /usr/libexec/squid/basic_ncsa_auth |
256 |
+ if use pam; then |
257 |
+ fowners root:squid /usr/libexec/squid/basic_pam_auth |
258 |
+ fperms 4750 /usr/libexec/squid/basic_pam_auth |
259 |
+ fi |
260 |
+ # pinger needs suid as well |
261 |
+ fowners root:squid /usr/libexec/squid/pinger |
262 |
+ fperms 4750 /usr/libexec/squid/pinger |
263 |
+ |
264 |
+ # these scripts depend on perl |
265 |
+ if ! use perl; then |
266 |
+ for f in basic_pop3_auth \ |
267 |
+ ext_delayer_acl \ |
268 |
+ helper-mux \ |
269 |
+ log_db_daemon \ |
270 |
+ security_fake_certverify \ |
271 |
+ storeid_file_rewrite \ |
272 |
+ url_lfs_rewrite; do |
273 |
+ rm "${D}"/usr/libexec/squid/${f} || die |
274 |
+ done |
275 |
+ fi |
276 |
+ |
277 |
+ # cleanup |
278 |
+ rm -r "${D}"/run "${D}"/var/cache || die |
279 |
+ |
280 |
+ dodoc CONTRIBUTORS CREDITS ChangeLog INSTALL QUICKSTART README SPONSORS doc/*.txt |
281 |
+ newdoc src/auth/negotiate/kerberos/README README.kerberos |
282 |
+ newdoc src/auth/basic/RADIUS/README README.RADIUS |
283 |
+ newdoc src/acl/external/kerberos_ldap_group/README README.kerberos_ldap_group |
284 |
+ dodoc RELEASENOTES.html |
285 |
+ |
286 |
+ newpamd "${FILESDIR}/squid.pam" squid |
287 |
+ newconfd "${FILESDIR}/squid.confd-r2" squid |
288 |
+ newinitd "${FILESDIR}/squid.initd-r5" squid |
289 |
+ if use logrotate; then |
290 |
+ insinto /etc/logrotate.d |
291 |
+ newins "${FILESDIR}/squid.logrotate" squid |
292 |
+ else |
293 |
+ exeinto /etc/cron.weekly |
294 |
+ newexe "${FILESDIR}/squid.cron" squid.cron |
295 |
+ fi |
296 |
+ |
297 |
+ diropts -m0750 -o squid -g squid |
298 |
+ keepdir /var/log/squid /etc/ssl/squid /var/lib/squid |
299 |
+} |
300 |
+ |
301 |
+pkg_postinst() { |
302 |
+ elog "A good starting point to debug Squid issues is to use 'squidclient mgr:' commands such as 'squidclient mgr:info'." |
303 |
+ if [ ${#r} -gt 0 ]; then |
304 |
+ 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." |
305 |
+ fi |
306 |
+} |