diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
commit | 4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch) | |
tree | ba5f07bf3f9d22d82e54a462313f5d244036c768 /net-proxy/squid |
reinit the tree, so we can have metadata
Diffstat (limited to 'net-proxy/squid')
-rw-r--r-- | net-proxy/squid/Manifest | 18 | ||||
-rw-r--r-- | net-proxy/squid/files/squid-3.5.7-gentoo.patch | 100 | ||||
-rw-r--r-- | net-proxy/squid/files/squid-cppunit-1.14.patch | 417 | ||||
-rw-r--r-- | net-proxy/squid/files/squid.confd-r1 | 12 | ||||
-rw-r--r-- | net-proxy/squid/files/squid.cron | 5 | ||||
-rw-r--r-- | net-proxy/squid/files/squid.initd-r4 | 117 | ||||
-rw-r--r-- | net-proxy/squid/files/squid.logrotate | 8 | ||||
-rw-r--r-- | net-proxy/squid/files/squid.pam | 7 | ||||
-rw-r--r-- | net-proxy/squid/metadata.xml | 31 | ||||
-rw-r--r-- | net-proxy/squid/squid-3.5.23.ebuild | 240 | ||||
-rw-r--r-- | net-proxy/squid/squid-3.5.24.ebuild | 240 | ||||
-rw-r--r-- | net-proxy/squid/squid-3.5.25.ebuild | 240 | ||||
-rw-r--r-- | net-proxy/squid/squid-3.5.26.ebuild | 241 |
13 files changed, 1676 insertions, 0 deletions
diff --git a/net-proxy/squid/Manifest b/net-proxy/squid/Manifest new file mode 100644 index 000000000000..821afcbfd4ca --- /dev/null +++ b/net-proxy/squid/Manifest @@ -0,0 +1,18 @@ +AUX squid-3.5.7-gentoo.patch 3414 SHA256 4fe5687c3986c2da4b496e269cf92f04e0a2e3fd41d38f96625263addec9202e SHA512 403a053e64f0061901fedab7dc65a671cb22f534a21d9f066c6ec7bd8db03519b63d402702bea85929669e37925e9a0e9fd9e918ac1ea37d399d443b2dda9766 WHIRLPOOL 8f3239b20fc7429f0cadececdfd8c3aad36a1f97e541800c4d836766407aa0d23adbfd65a600f741ff78ec2e56f6e514a44aec791ed5be684977974a39e7f7cb +AUX squid-cppunit-1.14.patch 11414 SHA256 6e8d1645743e7fdf6b1123c3ab461fae40ed51e704f1b1c6c05a5a6d8ee8d632 SHA512 2fb02c8c92dc524c19cbbaad4dad03bddc8c18046e37f86562dcaa73a9cea0cb2af352ca0701438d2f77a55b448b34e68678961d721812135b9f7d4799cbe94a WHIRLPOOL da713acc1ee403999d2700ccd8dd5474945d207bbc6142c7db882abc30e4d0f768fcd82d9bb0da22c5efe2f1f0fe57cfeb3950ee46249545271d0e8cd56eea0a +AUX squid.confd-r1 384 SHA256 507d8f26bdb7227c39ed0641429d32972513e4240bf59a20b076e8019201b20d SHA512 018418d0ef66c9ab5d67a8e68ed6f95c7a04ad2a8a073747f39d9db8e83cf72c685d388a727363788042e45d440a69651ec928ccdeed835915ebc8c676b43519 WHIRLPOOL 9379f8f1646192badf0e8c05dc005486917cef2b3e7d3c37485eef1890531f57954ddc1c49b5a3e8c306a4b02aa238e0d246ae23c25b1ab037b06b5d36a68a16 +AUX squid.cron 143 SHA256 4c9e2afe5b0bba583ce896233ea1f9262beeb1b6cf51b4adb48d5f5c03933b2f SHA512 cec563c20799ffea8b4fb418d5015d6dc437bd38c35e7150ed01bc298dab5214132e10f4e7b8176da1966e16a7f53f423c36e8419642cb16716f5c346c30d749 WHIRLPOOL 029c94d4e4826ee612c7dc12acc088e3100c9d1737baebb74b25b6e7ac2ba78d0bab9f744c12b5de4113c9727892c9a30dd17067409ac8da62afeee552de391e +AUX squid.initd-r4 3262 SHA256 8a1369aab5cef61d19ea61c373819bd4eeabd2ba4c70f831e5009891993f3a4f SHA512 d1edeeafef69730429c19e07b4b39ff388047042880c61907fb2e6d8a907011edb78a29faa265f8e07d2c3bb18d63d62dd384338729e2549995f7f2a0903783d WHIRLPOOL d306dfe361655401c534f6bff44799bd99a6dad77d8b1c1ed3116234174c864f353b164a40499143e217d070cf1e5dd74b4805862d007f6b105d227d65b75d1b +AUX squid.logrotate 103 SHA256 e5ddce1c9af851040affa15e1a59e89d8db0f2eea7c461320a1d3784578f4482 SHA512 d75a667c3ffa32fdd938ef40df8813a467d9f10b2363107bf915cb0c99834fbe8d0eb502a18a816875b67b0db1b27806ed3caf620c38516040cb644b225f5a55 WHIRLPOOL 1cbce1fb05d4661d26f80baeafad0d3a5de1108a21eb6519775b9be2c549d1ca1b85575b72941fd246e4e9fbdf466b302b767aa7ce002f990f6ca4a9844e1e41 +AUX squid.pam 209 SHA256 c99c6f53a786832d20673ec3be3c8fda516872e433a65449fc70cda2282e0380 SHA512 5501e3d9319aea99f0deed98748366d4dfbeccdde96d842474fe144a4584394d8f5563372cd7b2437a389378c49b61b646403cca1be4362c888750d027b2f594 WHIRLPOOL 3627dae5146574497165f126ac779be728e2683e31a003fdf719db2a659018a89b5a91f9ecb429007c398fda5794178f4f8f00448e7d3e63b1b1221af9506066 +DIST squid-3.5.23.tar.xz 2325884 SHA256 fa4c0c99f41e92fe1330bed3968d176c6f47ef2e3aea2f83977d5501afa40bdb SHA512 3f2b3df60fc0b2aab3d0d9e3489832d60d0aac8222f09ad2ff6afb95202b904f41f6530d713e7ce446c6f62b66f0cd792a6b12005d43c53fe68d2371f9caa880 WHIRLPOOL 39338be97e3357759b9062e3c3b353a2118ca910e56584e73560489078e76a42b230ac24468ea62f6e3df7de210492beda54b0c178804c097d4b303d16cd2914 +DIST squid-3.5.24.tar.xz 2326424 SHA256 4fe29f582eef357faa541a53835b6885e24e6f28b80a3abcdf3b57f5393bbdb2 SHA512 912a0882c71ba170e7c2eccf940cfca87d7fd0a6026a7aaa9dddacc1e17590809ad449e15913d180d5ce5b8d2828a68247ab920a4a499f3ee29ddd464e29344f WHIRLPOOL 1d245ee3bd6eff69b201ee1c57671617d06e36663d38d44bf4335ca1ebee251c0983f1f041c00cc823d7c5fc04d0a3725197beac407e2bfcfe81f679bc96f3a0 +DIST squid-3.5.25.tar.xz 2327316 SHA256 28959254c32b8cd87e9599b6beb97352cf0638524e0f5ac3e1754f08462f3585 SHA512 9adfadd962954537c3364543ce4ca862e6f60801f1fb80bc3b74fbd99b60219aed4756affff8f7d956337f4b573d0ebecad01f689d0c6554aa2958f5bcfb972f WHIRLPOOL d29a4591fc8521e3ebd864d547c86341136b1aefa7679d35a01e5fcc102b4dfe1e340089f9e7ba9489911fbcd6a1e61a4715e1669348aa6e8a4379471ab18ec6 +DIST squid-3.5.26.tar.xz 2328352 SHA256 baa1eecb7d6e18881f4455060d80ee7cb95ae7e2695fdccf7e21ccc8f879a982 SHA512 08fc7fb5d1dea8d91cc318e5be9044fd75c69d0d2053a0c79ab594155aeb4a0f48bb0ff1dd754497485dc8db117b71f1787b0265842cf61b474293d5d38a9222 WHIRLPOOL 4d069b5beb91a0c688dacd72067f360a22bbf5565705c4d0a4ee9c6131c857adcbaa2130b0785f242bde23902cd32344f3c264f46f567088283f3de65d6acbd0 +EBUILD squid-3.5.23.ebuild 7306 SHA256 f22dd602baaaf4f677ab58325b81a5c2fc6d3e8686b1c5c06183ff6b079a8edf SHA512 0858bea28bdc074663f2a280e58fb133527073a0b72e2b13ae806af103ba894464942733a484aefa179ba5a8db6ae564abb0ea1ab13b521e0da330c69882d6a4 WHIRLPOOL f74b963da688fb07027975b48fc88c2e4732e6e008bbaf11bbf03c97f70ca0d62348b42c5a7f290d9c302669f33b85236c077b0cb92a3f202b6f8196742a992f +EBUILD squid-3.5.24.ebuild 7315 SHA256 96969a0a432abf413a8390b88892de6d9e1782fb0b79ded6c96f1f9e1c0ae088 SHA512 b6c55e52177b5c901ad9ef61119103fe1fbb8fc7553a6e1d506684ab35dcc2ed2e57b19d1549fec2aa417bb5899f5807dc356c3a094c17337aa6b5a655bfe0e1 WHIRLPOOL 49e70447fa5ac07da2d4ef5e39150c9f5524aee4cb25b7cfee5e28257fcdd6dcb6fe573ab56d7c00279022b43054a6342332911cf60e272cdab5896eca629762 +EBUILD squid-3.5.25.ebuild 7315 SHA256 96969a0a432abf413a8390b88892de6d9e1782fb0b79ded6c96f1f9e1c0ae088 SHA512 b6c55e52177b5c901ad9ef61119103fe1fbb8fc7553a6e1d506684ab35dcc2ed2e57b19d1549fec2aa417bb5899f5807dc356c3a094c17337aa6b5a655bfe0e1 WHIRLPOOL 49e70447fa5ac07da2d4ef5e39150c9f5524aee4cb25b7cfee5e28257fcdd6dcb6fe573ab56d7c00279022b43054a6342332911cf60e272cdab5896eca629762 +EBUILD squid-3.5.26.ebuild 7359 SHA256 541385afd03584c8f40acb37757da56466110c337562cae1595856384d55d04b SHA512 89c4dd7744138780c3b3a74064ac68e70bc6ed7c0bd598675ec9fa6ada16216d5cfc555892666d20f97d58365b71c1cea11ceeb846f0645a3743b56024c5313e WHIRLPOOL fa372527cd4e3daaace77ea892f54e3d1722715e573d3ec10d946ef505f2b477386e9aec67e34f9dd9280d35b22892693ca16497f94a273e82c29b7485db9aaf +MISC ChangeLog 11617 SHA256 3462208cfe311d6e2774fa69c877135f42fab56369aa97d18084d4d4977f7c15 SHA512 eb447e3bd41d33f62d0a96105b5923ca658f28ca2d7eb7c4cef7f48f10229342cbd86bd11dcd9b535872fb75666a04438c0a82e7397c9de30a2cc9c37daee7a7 WHIRLPOOL 17fee0a65c4f561ae04ad80352b0057355c7fa7a9f302ecce225d2b28eb58d5cdfa6d94b0f3f110fb7aa8014e96cdf0e8b0c3fb388a4b553fb4dbeea36144158 +MISC ChangeLog-2015 97633 SHA256 1015b1d282884c639ec17fcaec41953e1e9b1fccb1cda1db913707e7e6e62288 SHA512 a9373b0624bc2a8f47b7ca5be6243e5d0ec183023374dad843ccffb8daf451042a7e9771b38eb6027369e3e31314c62776b7ae5f075bcf738c35c8ba31d367f5 WHIRLPOOL 0baca988640a5320a7b27d6fc57731b1fbc7a3231af566527cb38fcf7fd80d7c335206c87fec297b892e2ce470e4f0144187bfac17c05af6041b2561584995cc +MISC metadata.xml 1539 SHA256 cd56af34fc45e24ddaa2d049f314a0590a7887bed745ad1fe470ce088f050da1 SHA512 7e28e289a27097bc5b2a4caca81506c9c76898c416842e0858dc82b5a03e5f473818ccd52b43c47ee549cf1bebe7e83a0d125eb24995c1a2d74db4e998825c6d WHIRLPOOL 7ed06826c97b3d5731e8eec0b57086acb1c689f6d8db3cbf005527cbe40ea8047a51042a11d91fbb2e9e63ea571a504eceb8da30bd9e549f9ea160e84d612956 diff --git a/net-proxy/squid/files/squid-3.5.7-gentoo.patch b/net-proxy/squid/files/squid-3.5.7-gentoo.patch new file mode 100644 index 000000000000..c4def050a2d0 --- /dev/null +++ b/net-proxy/squid/files/squid-3.5.7-gentoo.patch @@ -0,0 +1,100 @@ +diff --git a/configure.ac b/configure.ac +index a863327..deb44ed 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -26,9 +26,9 @@ PRESET_CFLAGS="$CFLAGS" + PRESET_LDFLAGS="$LDFLAGS" + + dnl Set default LDFLAGS +-if test "x$LDFLAGS" = "x" ; then +- LDFLAGS="-g" +-fi ++dnl if test "x$LDFLAGS" = "x" ; then ++dnl LDFLAGS="-g" ++dnl fi + + # Check for GNU cc + AC_PROG_CC +diff --git a/src/Makefile.am b/src/Makefile.am +index 6b69267..10f506a 100644 +--- a/src/Makefile.am ++++ b/src/Makefile.am +@@ -867,8 +867,8 @@ DEFAULT_LOG_PREFIX = $(DEFAULT_LOG_DIR) + DEFAULT_CACHE_LOG = $(DEFAULT_LOG_PREFIX)/cache.log + DEFAULT_ACCESS_LOG = $(DEFAULT_LOG_PREFIX)/access.log + DEFAULT_STORE_LOG = $(DEFAULT_LOG_PREFIX)/store.log +-DEFAULT_NETDB_FILE = $(DEFAULT_LOG_PREFIX)/netdb.state +-DEFAULT_SSL_DB_DIR = $(localstatedir)/lib/ssl_db ++DEFAULT_NETDB_FILE = $(localstatedir)/lib/squid/netdb.state ++DEFAULT_SSL_DB_DIR = $(localstatedir)/lib/squid/ssl_db + DEFAULT_PINGER = $(libexecdir)/`echo pinger | sed '$(transform);s/$$/$(EXEEXT)/'` + DEFAULT_UNLINKD = $(libexecdir)/`echo unlinkd | sed '$(transform);s/$$/$(EXEEXT)/'` + DEFAULT_LOGFILED = $(libexecdir)/`echo log_file_daemon | sed '$(transform);s/$$/$(EXEEXT)/'` +diff --git a/src/debug.cc b/src/debug.cc +index 64ab0ba..062119a 100644 +--- a/src/debug.cc ++++ b/src/debug.cc +@@ -450,7 +450,7 @@ _db_init(const char *logfile, const char *options) + #if HAVE_SYSLOG && defined(LOG_LOCAL4) + + if (Debug::log_syslog) +- openlog(APP_SHORTNAME, LOG_PID | LOG_NDELAY | LOG_CONS, syslog_facility); ++ openlog(APP_SHORTNAME, LOG_PID | LOG_NDELAY, syslog_facility); + + #endif /* HAVE_SYSLOG */ + +diff --git a/src/main.cc b/src/main.cc +index d6eb01a..0b93f0e 100644 +--- a/src/main.cc ++++ b/src/main.cc +@@ -1657,7 +1657,7 @@ watch_child(char *argv[]) + if (!IamMasterProcess()) + return; + +- openlog(APP_SHORTNAME, LOG_PID | LOG_NDELAY | LOG_CONS, LOG_LOCAL4); ++ openlog(APP_SHORTNAME, LOG_PID | LOG_NDELAY, LOG_LOCAL4); + + if ((pid = fork()) < 0) + syslog(LOG_ALERT, "fork failed: %s", xstrerror()); +@@ -1720,7 +1720,7 @@ watch_child(char *argv[]) + + if ((pid = fork()) == 0) { + /* child */ +- openlog(APP_SHORTNAME, LOG_PID | LOG_NDELAY | LOG_CONS, LOG_LOCAL4); ++ openlog(APP_SHORTNAME, LOG_PID | LOG_NDELAY, LOG_LOCAL4); + prog = argv[0]; + argv[0] = const_cast<char*>(kid.name().termedBuf()); + execvp(prog, argv); +@@ -1733,7 +1733,7 @@ watch_child(char *argv[]) + } + + /* parent */ +- openlog(APP_SHORTNAME, LOG_PID | LOG_NDELAY | LOG_CONS, LOG_LOCAL4); ++ openlog(APP_SHORTNAME, LOG_PID | LOG_NDELAY, LOG_LOCAL4); + + squid_signal(SIGINT, SIG_IGN, SA_RESTART); + +--- a/src/cf.data.pre 2013-04-29 11:17:59.256167134 +0300 ++++ b/src/cf.data.pre 2013-04-29 11:20:17.043924313 +0300 +@@ -1019,6 +1019,7 @@ + acl Safe_ports port 488 # gss-http + acl Safe_ports port 591 # filemaker + acl Safe_ports port 777 # multiling http ++acl Safe_ports port 901 # SWAT + acl CONNECT method CONNECT + NOCOMMENT_END + DOC_END +@@ -5300,11 +5301,11 @@ + + NAME: cache_mgr + TYPE: string +-DEFAULT: webmaster ++DEFAULT: root + LOC: Config.adminEmail + DOC_START + Email-address of local cache manager who will receive +- mail if the cache dies. The default is "webmaster". ++ mail if the cache dies. The default is "root". + DOC_END + + NAME: mail_from diff --git a/net-proxy/squid/files/squid-cppunit-1.14.patch b/net-proxy/squid/files/squid-cppunit-1.14.patch new file mode 100644 index 000000000000..f31268fc61d5 --- /dev/null +++ b/net-proxy/squid/files/squid-cppunit-1.14.patch @@ -0,0 +1,417 @@ +# backport rev 14707 from trunk +--- Makefile.am 2016-01-30 09:09:25 +0000 ++++ Makefile.am 2016-06-13 07:46:59 +0000 +@@ -48,7 +48,7 @@ + check: have-cppunit check-recursive + + have-cppunit: +- @if test "$(SQUID_CPPUNIT_INC)$(SQUID_CPPUNIT_LA)$(SQUID_CPPUNIT_LIBS)" = "" ; then \ ++ @if test "$(LIBCPPUNIT_CFLAGS)$(LIBCPPUNIT_LIBS)" = "" ; then \ + echo "FATAL: 'make check' requires cppunit and cppunit development packages. They do not appear to be installed." ; \ + exit 1 ; \ + fi + +--- compat/Makefile.am 2016-02-09 08:57:33 +0000 ++++ compat/Makefile.am 2016-06-13 07:46:59 +0000 +@@ -94,7 +94,7 @@ + testPreCompiler_SOURCES= \ + testPreCompiler.h \ + testPreCompiler.cc +-testPreCompiler_LDADD= $(SQUID_CPPUNIT_LA) $(SQUID_CPPUNIT_LIBS) ++testPreCompiler_LDADD= $(LIBCPPUNIT_LIBS) + testPreCompiler_LDFLAGS= + + # os/ subdir prevents us using src/TestHeaders.am + +--- configure.ac 2016-06-11 05:28:18 +0000 ++++ configure.ac 2016-06-13 07:46:59 +0000 +@@ -115,10 +115,11 @@ + AC_PATH_PROG(CHMOD, chmod, $FALSE) + AC_PATH_PROG(TR, tr, $FALSE) + AC_PATH_PROG(RM, rm, $FALSE) +-AC_PATH_PROG(CPPUNITCONFIG, cppunit-config, false) + dnl Libtool 2.2.6 requires: rm -f + RM="$RM -f" + ++PKG_PROG_PKG_CONFIG ++ + AC_PATH_PROG(PERL, perl, none) + if test "x$ac_cv_path_PERL" = "xnone"; then + AC_MSG_FAILURE([Perl is required to compile Squid. Please install Perl and then re-run configure ]) +@@ -984,9 +985,6 @@ + ] + ) + +-dnl Necessary if the first PKG_CHECK_MODULES call is conditional +-PKG_PROG_PKG_CONFIG +- + dnl Perform configuration consistency checks for eCAP + if test "x$squid_opt_use_ecap" != "xno"; + then +@@ -2725,45 +2723,29 @@ + [Enable support for the X-Accelerator-Vary HTTP header]) + AC_MSG_NOTICE([X-Accelerator-Vary support enabled: $enable_x_accelerator_vary]) + +- +-if $CPPUNITCONFIG --help >/dev/null; then +- squid_cv_cppunit_version="`$CPPUNITCONFIG --version`" +- AC_MSG_NOTICE([using system installed cppunit version $squid_cv_cppunit_version]) +- unset squid_cv_cppunit_version +- SQUID_CPPUNIT_LIBS="`$CPPUNITCONFIG --libs`" +- SQUID_CPPUNIT_LA='' +- SQUID_CPPUNIT_INC="`$CPPUNITCONFIG --cflags`" +-else +- AC_MSG_WARN([cppunit does not appear to be installed. squid does not require this, but code testing with 'make check' will fail.]) +- SQUID_CPPUNIT_LA='' +- SQUID_CPPUNIT_LIBS='' +- SQUID_CPPUNIT_INC='' +-fi +- +-AC_ARG_WITH(cppunit-basedir, +- AS_HELP_STRING([--with-cppunit-basedir=PATH], +- [Path where the cppunit headers are libraries can be found ]), [ +-if test -f "$withval/include/cppunit/TestCase.h"; then +- AC_MSG_NOTICE([Using cppunit includes from $withval]) +- SQUID_CPPUNIT_INC="-I${withval}/include" +-else +- AC_MSG_ERROR(Cannot find cppunit at $withval) +-fi +-if test -f "$withval/lib/libcppunit.la"; then +- AC_MSG_NOTICE([Using cppunit lib from $withval]) +- SQUID_CPPUNIT_LA="${withval}/lib/libcppunit.la" +- SQUID_CPPUNIT_LIBS='$(SQUID_CPPUNIT_LA)' +-else +- AC_MSG_ERROR(Cannot find cppunit at $withval) +-fi +-]) +-SQUID_STATE_SAVE(squid_cppunit_state) +-CXXFLAGS="$CXXFLAGS $SQUID_CPPUNIT_INC" +-AC_CHECK_HEADERS(cppunit/extensions/HelperMacros.h) +-SQUID_STATE_ROLLBACK(squid_cppunit_state) +-AC_SUBST(SQUID_CPPUNIT_LIBS) +-AC_SUBST(SQUID_CPPUNIT_LA) +-AC_SUBST(SQUID_CPPUNIT_INC) ++AC_ARG_WITH([cppunit], AS_HELP_STRING([--without-cppunit],[Do not use cppunit test framework]),[ ++ AS_CASE($with_cppunit, [yes|no],[], ++ [ ++ AS_IF([test ! -d "$withval"],AC_MSG_ERROR([--with-cppunit PATH does not point to a directory])) ++ LIBCPPUNIT_CFLAGS="-I$with_cppunit/include" ++ LIBCPPUNIT_LIBS="-L$with_cppunit/lib -lcppunit" ++ ]) ++]) ++AS_IF([test "x$with_cppunit" != "xno"],[ ++ PKG_CHECK_MODULES([LIBCPPUNIT],[cppunit],[ ++ squid_cv_cppunit_version="`pkg-config cppunit --version`" ++ AC_MSG_NOTICE([using system installed cppunit version $squid_cv_cppunit_version]) ++ AS_UNSET(squid_cv_cppunit_version) ++ ++ SQUID_STATE_SAVE(squid_cppunit_state) ++ AS_VAR_APPEND(CXXFLAGS,[$LIBCPPUNIT_CFLAGS]) ++ AS_VAR_APPEND(LIBS,[$LIBCPPUNIT_LIBS]) ++ AC_CHECK_HEADERS(cppunit/extensions/HelperMacros.h) ++ SQUID_STATE_ROLLBACK(squid_cppunit_state) ++ ],[ ++ AC_MSG_WARN([cppunit does not appear to be installed. Squid does not require this, but code testing with 'make check' will fail.]) ++ ]) ++]) + + # Force some compilers to use ANSI features + # + +--- src/Common.am 2017-06-01 16:49:00.000000000 +0300 ++++ src/Common.am 2017-06-15 16:10:20.000000000 +0300 +@@ -26,7 +26,7 @@ + -I$(top_srcdir)/lib \ + -I$(top_srcdir)/src \ + -I$(top_builddir)/include \ +- $(SQUID_CPPUNIT_INC) ++ $(LIBCPPUNIT_CFLAGS) + + ## Kerberos headers require their include path. + ## Because we use libcompat for comm_err.h header protections ... +--- src/Makefile.am 2017-06-01 16:49:00.000000000 +0300 ++++ src/Makefile.am 2017-06-15 16:38:40.000000000 +0300 +@@ -1112,9 +1112,9 @@ + # $(TESTSOURCES) + #tests_testX_LDFLAGS = $(LIBADD_DL) + #tests_testX_LDADD=\ +-# $(SQUID_CPPUNIT_LIBS) \ +-# $(SQUID_CPPUNIT_LA) \ +-# $(COMPAT_LIB) \ ++# $(LIBCPPUNIT_LIBS) \ ++# $(COMPAT_LIB) \ ++# $(XTRA_LIBS) + #tests_testX_DEPENDENCIES= $(SQUID_CPPUNIT_LA) + + +@@ -1221,8 +1221,7 @@ + $(top_builddir)/lib/libmisccontainers.la \ + $(top_builddir)/lib/libmiscencoding.la \ + $(top_builddir)/lib/libmiscutil.la \ +- $(SQUID_CPPUNIT_LIBS) \ +- $(SQUID_CPPUNIT_LA) \ ++ $(LIBCPPUNIT_LIBS) \ + $(NETTLELIB) \ + $(SSLLIB) \ + $(COMPAT_LIB) \ +@@ -1363,7 +1362,7 @@ + $(DISK_OS_LIBS) \ + $(NETTLELIB) \ + $(REGEXLIB) \ +- $(SQUID_CPPUNIT_LIBS) \ ++ $(LIBCPPUNIT_LIBS) \ + $(SSLLIB) \ + $(COMPAT_LIB) \ + $(XTRA_LIBS) +@@ -1383,14 +1382,14 @@ + tests/stub_MemBuf.cc \ + $(TESTSOURCES) + tests_testBoilerplate_LDADD= \ +- $(SQUID_CPPUNIT_LIBS) \ + $(SSLLIB) \ + base/libbase.la \ ++ $(LIBCPPUNIT_LIBS) \ + $(COMPAT_LIB) \ + $(XTRA_LIBS) + tests_testBoilerplate_LDFLAGS = $(LIBADD_DL) + tests_testBoilerplate_DEPENDENCIES = \ +- $(SQUID_CPPUNIT_LA) ++ $(LIBCPPUNIT_LIBS) + + ## Tests of base/libbase.la objects + tests_testCharacterSet_SOURCES = \ +@@ -1405,9 +1404,8 @@ + tests_testCharacterSet_LDFLAGS = $(LIBADD_DL) + tests_testCharacterSet_LDADD= \ + base/libbase.la \ ++ $(LIBCPPUNIT_LIBS) \ + $(COMPAT_LIB) \ +- $(SQUID_CPPUNIT_LA) \ +- $(SQUID_CPPUNIT_LIBS) \ + $(XTRA_LIBS) + + ## Tests of the CacheManager module. +@@ -1646,8 +1644,7 @@ + $(top_builddir)/lib/libmiscutil.la \ + $(NETTLELIB) \ + $(REGEXLIB) \ +- $(SQUID_CPPUNIT_LIBS) \ +- $(SQUID_CPPUNIT_LA) \ ++ $(LIBCPPUNIT_LIBS) \ + $(SSLLIB) \ + $(KRB5LIBS) \ + $(COMPAT_LIB) \ +@@ -1829,8 +1826,8 @@ + $(top_builddir)/lib/libmiscutil.la \ + $(NETTLELIB) \ + $(REGEXLIB) \ +- $(SQUID_CPPUNIT_LIBS) \ + $(SSLLIB) \ ++ $(LIBCPPUNIT_LIBS) \ + $(COMPAT_LIB) \ + $(XTRA_LIBS) + +@@ -2076,9 +2073,8 @@ + $(SNMP_LIBS) \ + $(NETTLELIB) \ + $(REGEXLIB) \ +- $(SQUID_CPPUNIT_LIBS) \ +- $(SQUID_CPPUNIT_LA) \ + $(SSLLIB) \ ++ $(LIBCPPUNIT_LIBS) \ + $(KRB5LIBS) \ + $(COMPAT_LIB) \ + $(XTRA_LIBS) +@@ -2323,10 +2319,9 @@ + $(SNMP_LIBS) \ + $(NETTLELIB) \ + $(REGEXLIB) \ +- $(SQUID_CPPUNIT_LIBS) \ +- $(SQUID_CPPUNIT_LA) \ + $(SSLLIB) \ + $(KRB5LIBS) \ ++ $(LIBCPPUNIT_LIBS) \ + $(COMPAT_LIB) \ + $(XTRA_LIBS) + tests_testEventLoop_LDFLAGS = $(LIBADD_DL) +@@ -2564,10 +2559,9 @@ + $(top_builddir)/lib/libmiscutil.la \ + $(NETTLELIB) \ + $(REGEXLIB) \ +- $(SQUID_CPPUNIT_LIBS) \ +- $(SQUID_CPPUNIT_LA) \ + $(SSLLIB) \ + $(KRB5LIBS) \ ++ $(LIBCPPUNIT_LIBS) \ + $(COMPAT_LIB) \ + $(XTRA_LIBS) + tests_test_http_range_LDFLAGS = $(LIBADD_DL) +@@ -2613,7 +2607,7 @@ + base/libbase.la \ + ip/libip.la \ + $(top_builddir)/lib/libmiscutil.la \ +- $(SQUID_CPPUNIT_LIBS) \ ++ $(LIBCPPUNIT_LIBS) \ + $(COMPAT_LIB) \ + $(XTRA_LIBS) + tests_testHttpParser_LDFLAGS = $(LIBADD_DL) +@@ -2639,9 +2633,8 @@ + parser/libsquid-parser.la \ + base/libbase.la \ + $(top_builddir)/lib/libmiscutil.la \ ++ $(LIBCPPUNIT_LIBS) \ + $(COMPAT_LIB) \ +- $(SQUID_CPPUNIT_LA) \ +- $(SQUID_CPPUNIT_LIBS) \ + $(XTRA_LIBS) + + ## Tests of the HttpRequest module. +@@ -2875,10 +2868,9 @@ + $(DISK_OS_LIBS) \ + $(NETTLELIB) \ + $(REGEXLIB) \ +- $(SQUID_CPPUNIT_LIBS) \ +- $(SQUID_CPPUNIT_LA) \ + $(SSLLIB) \ + $(KRB5LIBS) \ ++ $(LIBCPPUNIT_LIBS) \ + $(COMPAT_LIB) \ + $(XTRA_LIBS) + tests_testHttpRequest_LDFLAGS = $(LIBADD_DL) +@@ -2902,9 +2894,8 @@ + icmp/libicmp-core.la \ + ip/libip.la \ + base/libbase.la \ ++ $(LIBCPPUNIT_LIBS) \ + $(COMPAT_LIB) \ +- $(SQUID_CPPUNIT_LA) \ +- $(SQUID_CPPUNIT_LIBS) \ + $(XTRA_LIBS) + + ## Tests for ip/* objects +@@ -2918,9 +2909,8 @@ + tests_testIpAddress_LDADD= \ + ip/libip.la \ + base/libbase.la \ ++ $(LIBCPPUNIT_LIBS) \ + $(COMPAT_LIB) \ +- $(SQUID_CPPUNIT_LA) \ +- $(SQUID_CPPUNIT_LIBS) \ + $(XTRA_LIBS) + tests_testIpAddress_LDFLAGS= $(LIBADD_DL) + +@@ -3087,10 +3077,10 @@ + $(top_builddir)/lib/libmiscutil.la \ + $(NETTLELIB) \ + $(REGEXLIB) \ +- $(SQUID_CPPUNIT_LIBS) \ + $(SSLLIB) \ + CommCalls.o \ + DnsLookupDetails.o \ ++ $(LIBCPPUNIT_LIBS) \ + $(COMPAT_LIB) \ + $(XTRA_LIBS) + tests_testStore_LDFLAGS = $(LIBADD_DL) +@@ -3130,8 +3120,8 @@ + ip/libip.la \ + $(top_builddir)/lib/libmiscutil.la \ + $(REGEXLIB) \ +- $(SQUID_CPPUNIT_LIBS) \ + $(SSLLIB) \ ++ $(LIBCPPUNIT_LIBS) \ + $(COMPAT_LIB) \ + $(XTRA_LIBS) + tests_testString_LDFLAGS = $(LIBADD_DL) +@@ -3326,8 +3316,8 @@ + $(top_builddir)/lib/libmiscutil.la \ + $(NETTLELIB) \ + $(REGEXLIB) \ +- $(SQUID_CPPUNIT_LIBS) \ + $(SSLLIB) \ ++ $(LIBCPPUNIT_LIBS) \ + $(COMPAT_LIB) \ + $(XTRA_LIBS) + tests_testUfs_LDFLAGS = $(LIBADD_DL) +@@ -3506,8 +3496,8 @@ + $(top_builddir)/lib/libmiscutil.la \ + $(NETTLELIB) \ + $(REGEXLIB) \ +- $(SQUID_CPPUNIT_LIBS) \ + $(SSLLIB) \ ++ $(LIBCPPUNIT_LIBS) \ + $(COMPAT_LIB) \ + $(XTRA_LIBS) + tests_testRock_LDFLAGS = $(AM_CPPFLAGS) $(LIBADD_DL) +@@ -3751,10 +3741,9 @@ + $(top_builddir)/lib/libmiscutil.la \ + $(NETTLELIB) \ + $(COMPAT_LIB) \ +- $(SQUID_CPPUNIT_LIBS) \ +- $(SQUID_CPPUNIT_LA) \ + $(SSLLIB) \ + $(KRB5LIBS) \ ++ $(LIBCPPUNIT_LIBS) \ + $(COMPAT_LIB) \ + $(XTRA_LIBS) + tests_testURL_LDFLAGS = $(LIBADD_DL) +@@ -3794,7 +3783,7 @@ + mgr/libmgr.la \ + $(top_builddir)/lib/libmiscutil.la \ + $(REGEXLIB) \ +- $(SQUID_CPPUNIT_LIBS) \ ++ $(LIBCPPUNIT_LIBS) \ + $(COMPAT_LIB) \ + $(XTRA_LIBS) + tests_testSBuf_DEPENDENCIES= $(SQUID_CPPUNIT_LA) +@@ -3838,7 +3827,7 @@ + ip/libip.la \ + mgr/libmgr.la \ + $(top_builddir)/lib/libmiscutil.la \ +- $(SQUID_CPPUNIT_LIBS) \ ++ $(LIBCPPUNIT_LIBS) \ + $(COMPAT_LIB) \ + $(XTRA_LIBS) + tests_testSBufList_DEPENDENCIES= $(SQUID_CPPUNIT_LA) +@@ -3876,8 +3865,8 @@ + ip/libip.la \ + $(top_builddir)/lib/libmiscutil.la \ + $(REGEXLIB) \ +- $(SQUID_CPPUNIT_LIBS) \ + $(SSLLIB) \ ++ $(LIBCPPUNIT_LIBS) \ + $(COMPAT_LIB) \ + $(XTRA_LIBS) + tests_testConfigParser_LDFLAGS = $(LIBADD_DL) +@@ -3922,9 +3911,9 @@ + base/libbase.la \ + $(top_builddir)/lib/libmiscutil.la \ + $(top_builddir)/lib/libmisccontainers.la \ +- $(SQUID_CPPUNIT_LIBS) \ +- $(SQUID_CPPUNIT_LA) \ +- $(COMPAT_LIB) ++ $(LIBCPPUNIT_LIBS) \ ++ $(COMPAT_LIB) \ ++ $(XTRA_LIBS) + tests_testStatHist_DEPENDENCIES = $(SQUID_CPPUNIT_LA) + + TESTS += testHeaders +--- lib/Makefile.am 2017-06-01 16:49:00.000000000 +0300 ++++ lib/Makefile.am 2017-06-16 07:19:54.000000000 +0300 +@@ -91,7 +91,7 @@ + tests/testRFC1035.cc + + tests_testRFC1035_LDADD= \ +- $(SQUID_CPPUNIT_LA) $(SQUID_CPPUNIT_LIBS) \ ++ $(LIBCPPUNIT_LIBS) \ + $(top_builddir)/lib/libmiscencoding.la \ + $(top_builddir)/lib/libmiscutil.la \ + $(COMPAT_LIB) +@@ -103,7 +103,7 @@ + tests/testRFC1738.cc + + tests_testRFC1738_LDADD= \ +- $(SQUID_CPPUNIT_LA) $(SQUID_CPPUNIT_LIBS) \ ++ $(LIBCPPUNIT_LIBS) \ + $(top_builddir)/lib/libmiscencoding.la \ + $(top_builddir)/lib/libmiscutil.la \ + $(COMPAT_LIB) diff --git a/net-proxy/squid/files/squid.confd-r1 b/net-proxy/squid/files/squid.confd-r1 new file mode 100644 index 000000000000..a29d33defb07 --- /dev/null +++ b/net-proxy/squid/files/squid.confd-r1 @@ -0,0 +1,12 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +# Config file for /etc/init.d/squid + +SQUID_OPTS="-YC" + +# Kerberos keytab file to use. This is required if you enable kerberos authentication. +SQUID_KEYTAB="" + +# Use max_filedescriptors setting in squid.conf to determine the maximum number +# of filedescriptors squid can open. diff --git a/net-proxy/squid/files/squid.cron b/net-proxy/squid/files/squid.cron new file mode 100644 index 000000000000..8726ddd72955 --- /dev/null +++ b/net-proxy/squid/files/squid.cron @@ -0,0 +1,5 @@ +#!/bin/sh +if test -e /var/run/squid.pid ; then + test -n "$(cat /var/run/squid.pid|xargs ps -p|grep squid)" && \ + /usr/sbin/squid -k rotate +fi diff --git a/net-proxy/squid/files/squid.initd-r4 b/net-proxy/squid/files/squid.initd-r4 new file mode 100644 index 000000000000..3e84eda38a6d --- /dev/null +++ b/net-proxy/squid/files/squid.initd-r4 @@ -0,0 +1,117 @@ +#!/sbin/openrc-run +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +extra_started_commands="reload rotate" + +depend() { + use dns net +} + +checkconfig() { + if [ ! -f /etc/squid/${SVCNAME}.conf ]; then + eerror "You need to create /etc/squid/${SVCNAME}.conf first." + eerror "An example can be found in /etc/squid/squid.conf.default" + return 1 + fi + + local PIDFILE=$(awk '/^[ \t]*pid_filename[ \t]+/ { print $2 }' < /etc/squid/${SVCNAME}.conf) + [ -z ${PIDFILE} ] && PIDFILE=/run/squid.pid + if [ /run/${SVCNAME}.pid != ${PIDFILE} ]; then + eerror "/etc/squid/${SVCNAME}.conf must set pid_filename to" + eerror " /run/${SVCNAME}.pid" + eerror "CAUTION: http_port, cache_dir and *_log parameters must be different than" + eerror " in any other instance of squid." + return 1 + fi + + # Maximum file descriptors squid can open is determined by: + # a basic default of N=1024 + # ... altered by ./configure --with-filedescriptors=N + # ... overridden on production by squid.conf max_filedescriptors (if, + # and only if, setrlimit() RLIMIT_NOFILE is able to be built+used). + # Since we do not configure hard coded # of filedescriptors anymore, + # there is no need for ulimit calls in the init script. + # Use max_filedescriptors in squid.conf instead. + + local CACHE_SWAP=$(awk '/^[ \t]*cache_dir[ \t]+/ { if ( $2 == "rock" ) printf "%s/rock ", $3; else if ( $2 == "coss" ) printf "%s/stripe ", $3; else printf "%s/00 ", $3; }' < /etc/squid/${SVCNAME}.conf) + [ -z "$CACHE_SWAP" ] && CACHE_SWAP="/var/cache/squid/00" + + local x + for x in $CACHE_SWAP ; do + if [ ! -e $x ] ; then + ebegin "Initializing cache directory ${x%/*}" + local ORIG_UMASK=$(umask) + umask 027 + + if ! (mkdir -p ${x%/*} && chown squid ${x%/*}) ; then + eend 1 + return 1 + fi + + local INIT_CACHE_RESPONSE="$(/usr/sbin/squid -z -N -f /etc/squid/${SVCNAME}.conf 2>&1)" + if [ $? != 0 ] || echo "$INIT_CACHE_RESPONSE" | grep -q "erminated abnormally" ; then + umask $ORIG_UMASK + eend 1 + echo "$INIT_CACHE_RESPONSE" + return 1 + fi + + umask $ORIG_UMASK + eend 0 + break + fi + done + + return 0 +} + +start() { + checkconfig || return 1 + checkpath -d -q -m 0750 -o squid:squid /run/${SVCNAME} + + ebegin "Starting ${SVCNAME}" + KRB5_KTNAME="${SQUID_KEYTAB}" /usr/sbin/squid ${SQUID_OPTS} -f /etc/squid/${SVCNAME}.conf + eend $? && sleep 1 +} + +stop() { + ebegin "Stopping ${SVCNAME}" + if /usr/sbin/squid -k shutdown -f /etc/squid/${SVCNAME}.conf ; then + # Now we have to wait until squid has _really_ stopped. + sleep 1 + if [ -f /run/${SVCNAME}.pid ] ; then + einfon "Waiting for squid to shutdown ." + cnt=0 + while [ -f /run/${SVCNAME}.pid ] ; do + cnt=$(expr $cnt + 1) + if [ $cnt -gt 60 ] ; then + # Waited 120 seconds now. Fail. + echo + eend 1 "Failed." + break + fi + sleep 2 + echo -n "." + done + echo + fi + else + eerror "Squid shutdown failed, probably service is already down." + fi + eend 0 +} + +reload() { + checkconfig || return 1 + ebegin "Reloading ${SVCNAME}" + /usr/sbin/squid -k reconfigure -f /etc/squid/${SVCNAME}.conf + eend $? +} + +rotate() { + service_started ${SVCNAME} || return 1 + ebegin "Rotating ${SVCNAME} logs" + /usr/sbin/squid -k rotate -f /etc/squid/${SVCNAME}.conf + eend $? +} diff --git a/net-proxy/squid/files/squid.logrotate b/net-proxy/squid/files/squid.logrotate new file mode 100644 index 000000000000..5bf289691aec --- /dev/null +++ b/net-proxy/squid/files/squid.logrotate @@ -0,0 +1,8 @@ +/var/log/squid/*.log { + copytruncate + compress + notifempty + missingok + sharedscripts +} + diff --git a/net-proxy/squid/files/squid.pam b/net-proxy/squid/files/squid.pam new file mode 100644 index 000000000000..75eeaa9db38d --- /dev/null +++ b/net-proxy/squid/files/squid.pam @@ -0,0 +1,7 @@ +#%PAM-1.0 +auth required pam_nologin.so +auth include system-auth +account include system-auth +password include system-auth +session optional pam_limits.so +session include system-auth diff --git a/net-proxy/squid/metadata.xml b/net-proxy/squid/metadata.xml new file mode 100644 index 000000000000..b001b2a98b0d --- /dev/null +++ b/net-proxy/squid/metadata.xml @@ -0,0 +1,31 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>eras@gentoo.org</email> + <name>Eray Aslan</name> + </maintainer> + <longdescription>A full-featured web proxy cache</longdescription> + <use> + <flag name="ecap">Adds support for loadable content adaptation modules + (http://www.e-cap.org)</flag> + <flag name="esi">Enable ESI for accelerators, will cause squid reverse proxies + to be capable of the Edge Acceleration Specification (www.esi.org)</flag> + <flag name="htcp">Enable HTCP protocol</flag> + <flag name="ipf-transparent">Adds transparent proxy support for systems + using IP-Filter (only for *bsd)</flag> + <flag name="logrotate">Use <pkg>app-admin/logrotate</pkg> for rotating + logs</flag> + <flag name="kqueue">Enables *BSD kqueue() support</flag> + <flag name="pf-transparent">Adds transparent proxy support for systems using + PF (only for *bsd)</flag> + <flag name="qos">Adds support for Quality of Service using netfilter conntrack + - see qos_flow directive for more info</flag> + <flag name="ssl-crtd">Adds support for dynamic SSL certificate generation in + SslBump environments</flag> + <flag name="tproxy">Enables real Transparent Proxy support for Linux Netfilter + TPROXY</flag> + <flag name="wccp">Enable Web Cache Coordination Protocol</flag> + <flag name="wccpv2">Enable Web Cache Coordination V2 Protocol</flag> + </use> +</pkgmetadata> diff --git a/net-proxy/squid/squid-3.5.23.ebuild b/net-proxy/squid/squid-3.5.23.ebuild new file mode 100644 index 000000000000..3022f9bcb2ba --- /dev/null +++ b/net-proxy/squid/squid-3.5.23.ebuild @@ -0,0 +1,240 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 +inherit autotools linux-info pam toolchain-funcs user + +DESCRIPTION="A full-featured web proxy cache" +HOMEPAGE="http://www.squid-cache.org/" +SRC_URI="http://www.squid-cache.org/Versions/v3/3.5/${P}.tar.xz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 sparc x86 ~x86-fbsd" +IUSE="caps ipv6 pam ldap libressl samba sasl kerberos nis radius ssl snmp selinux logrotate test \ + ecap esi ssl-crtd \ + mysql postgres sqlite \ + qos tproxy \ + +htcp +wccp +wccpv2 \ + pf-transparent ipf-transparent kqueue \ + elibc_uclibc kernel_linux" + +COMMON_DEPEND="caps? ( >=sys-libs/libcap-2.16 ) + pam? ( virtual/pam ) + ldap? ( net-nds/openldap ) + kerberos? ( virtual/krb5 ) + qos? ( net-libs/libnetfilter_conntrack ) + ssl? ( + libressl? ( dev-libs/libressl:0 ) + !libressl? ( dev-libs/openssl:0 ) + dev-libs/nettle >=net-libs/gnutls-3.1.5 ) + sasl? ( dev-libs/cyrus-sasl ) + ecap? ( net-libs/libecap:1 ) + esi? ( dev-libs/expat dev-libs/libxml2 ) + !x86-fbsd? ( logrotate? ( app-admin/logrotate ) ) + >=sys-libs/db-4:* + dev-lang/perl + dev-libs/libltdl:0" +DEPEND="${COMMON_DEPEND} + ecap? ( virtual/pkgconfig ) + test? ( dev-util/cppunit )" +RDEPEND="${COMMON_DEPEND} + samba? ( net-fs/samba ) + mysql? ( dev-perl/DBD-mysql ) + postgres? ( dev-perl/DBD-Pg ) + selinux? ( sec-policy/selinux-squid ) + sqlite? ( dev-perl/DBD-SQLite ) + !<=sci-biology/meme-4.8.1-r1" + +REQUIRED_USE="tproxy? ( caps ) + qos? ( caps )" + +pkg_pretend() { + if use tproxy; then + local CONFIG_CHECK="~NF_CONNTRACK ~NETFILTER_XT_MATCH_SOCKET ~NETFILTER_XT_TARGET_TPROXY" + linux-info_pkg_setup + fi +} + +pkg_setup() { + enewgroup squid + enewuser squid -1 -1 /var/cache/squid squid +} + +src_prepare() { + eapply "${FILESDIR}/${PN}-3.5.7-gentoo.patch" + sed -i -e 's:/usr/local/squid/etc:/etc/squid:' \ + INSTALL QUICKSTART \ + scripts/fileno-to-pathname.pl \ + scripts/check_cache.pl \ + tools/cachemgr.cgi.8 \ + tools/purge/conffile.hh \ + tools/purge/README || die + sed -i -e 's:/usr/local/squid/sbin:/usr/sbin:' \ + INSTALL QUICKSTART || die + sed -i -e 's:/usr/local/squid/var/cache:/var/cache/squid:' \ + QUICKSTART || die + sed -i -e 's:/usr/local/squid/var/logs:/var/log/squid:' \ + QUICKSTART \ + src/log/access_log.cc || die + sed -i -e 's:/usr/local/squid/logs:/var/log/squid:' \ + src/log/access_log.cc || die + sed -i -e 's:/usr/local/squid/libexec:/usr/libexec/squid:' \ + helpers/external_acl/unix_group/ext_unix_group_acl.8 \ + helpers/external_acl/session/ext_session_acl.8 \ + src/ssl/ssl_crtd.8 || die + sed -i -e 's:/usr/local/squid/cache:/var/cache/squid:' \ + scripts/check_cache.pl || die + sed -i -e 's:/usr/local/squid/ssl_cert:/etc/ssl/squid:' \ + src/ssl/ssl_crtd.8 || die + sed -i -e 's:/usr/local/squid/var/lib/ssl_db:/var/lib/squid/ssl_db:' \ + src/ssl/ssl_crtd.8 || die + sed -i -e 's:/var/lib/ssl_db:/var/lib/squid/ssl_db:' \ + src/ssl/ssl_crtd.8 || die + # /var/run/squid to /run/squid + sed -i -e 's:$(localstatedir)::' \ + src/ipc/Makefile.am || die + sed -i -e 's:_LTDL_SETUP:LTDL_INIT([installable]):' \ + libltdl/configure.ac || die + + eapply_user + eautoreconf +} + +src_configure() { + local basic_modules="MSNT-multi-domain,NCSA,POP3,getpwnam" + use samba && basic_modules+=",SMB" + use ldap && basic_modules+=",LDAP" + use pam && basic_modules+=",PAM" + use sasl && basic_modules+=",SASL" + use nis && ! use elibc_uclibc && basic_modules+=",NIS" + use radius && basic_modules+=",RADIUS" + if use mysql || use postgres || use sqlite ; then + basic_modules+=",DB" + fi + + local digest_modules="file" + use ldap && digest_modules+=",LDAP,eDirectory" + + local negotiate_modules="none" + local myconf="--without-mit-krb5 --without-heimdal-krb5" + if use kerberos ; then + negotiate_modules="kerberos,wrapper" + if has_version app-crypt/heimdal ; then + myconf="--without-mit-krb5 --with-heimdal-krb5" + else + myconf="--with-mit-krb5 --without-heimdal-krb5" + fi + fi + + local ntlm_modules="none" + use samba && ntlm_modules="smb_lm" + + local ext_helpers="file_userip,session,unix_group" + use samba && ext_helpers+=",wbinfo_group" + use ldap && ext_helpers+=",LDAP_group,eDirectory_userip" + use ldap && use kerberos && ext_helpers+=",kerberos_ldap_group" + + local storeio_modules="aufs,diskd,rock,ufs" + + local transparent + if use kernel_linux ; then + transparent+=" --enable-linux-netfilter" + use qos && transparent+=" --enable-zph-qos --with-netfilter-conntrack" + fi + + if use kernel_FreeBSD || use kernel_OpenBSD || use kernel_NetBSD ; then + transparent+=" $(use_enable kqueue)" + if use pf-transparent; then + transparent+=" --enable-pf-transparent" + elif use ipf-transparent; then + transparent+=" --enable-ipf-transparent" + fi + fi + + tc-export CC AR + + econf \ + --sysconfdir=/etc/squid \ + --libexecdir=/usr/libexec/squid \ + --localstatedir=/var \ + --with-pidfile=/run/squid.pid \ + --datadir=/usr/share/squid \ + --with-logdir=/var/log/squid \ + --with-default-user=squid \ + --enable-removal-policies="lru,heap" \ + --enable-storeio="${storeio_modules}" \ + --enable-disk-io \ + --enable-auth-basic="${basic_modules}" \ + --enable-auth-digest="${digest_modules}" \ + --enable-auth-ntlm="${ntlm_modules}" \ + --enable-auth-negotiate="${negotiate_modules}" \ + --enable-external-acl-helpers="${ext_helpers}" \ + --enable-log-daemon-helpers \ + --enable-url-rewrite-helpers \ + --enable-cache-digests \ + --enable-delay-pools \ + --enable-eui \ + --enable-icmp \ + --enable-follow-x-forwarded-for \ + --with-large-files \ + --disable-strict-error-checking \ + --disable-arch-native \ + --with-ltdl-includedir=/usr/include \ + --with-ltdl-libdir=/usr/$(get_libdir) \ + $(use_with caps libcap) \ + $(use_enable ipv6) \ + $(use_enable snmp) \ + $(use_with ssl openssl) \ + $(use_with ssl nettle) \ + $(use_with ssl gnutls) \ + $(use_enable ssl-crtd) \ + $(use_enable ecap) \ + $(use_enable esi) \ + $(use_enable htcp) \ + $(use_enable wccp) \ + $(use_enable wccpv2) \ + ${transparent} \ + ${myconf} +} + +src_install() { + emake DESTDIR="${D}" install + + # need suid root for looking into /etc/shadow + fowners root:squid /usr/libexec/squid/basic_ncsa_auth + fperms 4750 /usr/libexec/squid/basic_ncsa_auth + if use pam; then + fowners root:squid /usr/libexec/squid/basic_pam_auth + fperms 4750 /usr/libexec/squid/basic_pam_auth + fi + # pinger needs suid as well + fowners root:squid /usr/libexec/squid/pinger + fperms 4750 /usr/libexec/squid/pinger + + # cleanup + rm -f "${D}"/usr/bin/Run* + rm -rf "${D}"/run/squid "${D}"/var/cache/squid + + dodoc CONTRIBUTORS CREDITS ChangeLog INSTALL QUICKSTART README SPONSORS doc/*.txt + newdoc helpers/negotiate_auth/kerberos/README README.kerberos + newdoc helpers/basic_auth/RADIUS/README README.RADIUS + newdoc helpers/external_acl/kerberos_ldap_group/README README.kerberos_ldap_group + newdoc tools/purge/README README.purge + newdoc tools/helper-mux.README README.helper-mux + dodoc RELEASENOTES.html + + newpamd "${FILESDIR}/squid.pam" squid + newconfd "${FILESDIR}/squid.confd-r1" squid + newinitd "${FILESDIR}/squid.initd-r4" squid + if use logrotate; then + insinto /etc/logrotate.d + newins "${FILESDIR}/squid.logrotate" squid + else + exeinto /etc/cron.weekly + newexe "${FILESDIR}/squid.cron" squid.cron + fi + + diropts -m0750 -o squid -g squid + keepdir /var/log/squid /etc/ssl/squid /var/lib/squid +} diff --git a/net-proxy/squid/squid-3.5.24.ebuild b/net-proxy/squid/squid-3.5.24.ebuild new file mode 100644 index 000000000000..b499ec5ba110 --- /dev/null +++ b/net-proxy/squid/squid-3.5.24.ebuild @@ -0,0 +1,240 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 +inherit autotools linux-info pam toolchain-funcs user + +DESCRIPTION="A full-featured web proxy cache" +HOMEPAGE="http://www.squid-cache.org/" +SRC_URI="http://www.squid-cache.org/Versions/v3/3.5/${P}.tar.xz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd" +IUSE="caps ipv6 pam ldap libressl samba sasl kerberos nis radius ssl snmp selinux logrotate test \ + ecap esi ssl-crtd \ + mysql postgres sqlite \ + qos tproxy \ + +htcp +wccp +wccpv2 \ + pf-transparent ipf-transparent kqueue \ + elibc_uclibc kernel_linux" + +COMMON_DEPEND="caps? ( >=sys-libs/libcap-2.16 ) + pam? ( virtual/pam ) + ldap? ( net-nds/openldap ) + kerberos? ( virtual/krb5 ) + qos? ( net-libs/libnetfilter_conntrack ) + ssl? ( + libressl? ( dev-libs/libressl:0 ) + !libressl? ( dev-libs/openssl:0 ) + dev-libs/nettle >=net-libs/gnutls-3.1.5 ) + sasl? ( dev-libs/cyrus-sasl ) + ecap? ( net-libs/libecap:1 ) + esi? ( dev-libs/expat dev-libs/libxml2 ) + !x86-fbsd? ( logrotate? ( app-admin/logrotate ) ) + >=sys-libs/db-4:* + dev-lang/perl + dev-libs/libltdl:0" +DEPEND="${COMMON_DEPEND} + ecap? ( virtual/pkgconfig ) + test? ( dev-util/cppunit )" +RDEPEND="${COMMON_DEPEND} + samba? ( net-fs/samba ) + mysql? ( dev-perl/DBD-mysql ) + postgres? ( dev-perl/DBD-Pg ) + selinux? ( sec-policy/selinux-squid ) + sqlite? ( dev-perl/DBD-SQLite ) + !<=sci-biology/meme-4.8.1-r1" + +REQUIRED_USE="tproxy? ( caps ) + qos? ( caps )" + +pkg_pretend() { + if use tproxy; then + local CONFIG_CHECK="~NF_CONNTRACK ~NETFILTER_XT_MATCH_SOCKET ~NETFILTER_XT_TARGET_TPROXY" + linux-info_pkg_setup + fi +} + +pkg_setup() { + enewgroup squid + enewuser squid -1 -1 /var/cache/squid squid +} + +src_prepare() { + eapply "${FILESDIR}/${PN}-3.5.7-gentoo.patch" + sed -i -e 's:/usr/local/squid/etc:/etc/squid:' \ + INSTALL QUICKSTART \ + scripts/fileno-to-pathname.pl \ + scripts/check_cache.pl \ + tools/cachemgr.cgi.8 \ + tools/purge/conffile.hh \ + tools/purge/README || die + sed -i -e 's:/usr/local/squid/sbin:/usr/sbin:' \ + INSTALL QUICKSTART || die + sed -i -e 's:/usr/local/squid/var/cache:/var/cache/squid:' \ + QUICKSTART || die + sed -i -e 's:/usr/local/squid/var/logs:/var/log/squid:' \ + QUICKSTART \ + src/log/access_log.cc || die + sed -i -e 's:/usr/local/squid/logs:/var/log/squid:' \ + src/log/access_log.cc || die + sed -i -e 's:/usr/local/squid/libexec:/usr/libexec/squid:' \ + helpers/external_acl/unix_group/ext_unix_group_acl.8 \ + helpers/external_acl/session/ext_session_acl.8 \ + src/ssl/ssl_crtd.8 || die + sed -i -e 's:/usr/local/squid/cache:/var/cache/squid:' \ + scripts/check_cache.pl || die + sed -i -e 's:/usr/local/squid/ssl_cert:/etc/ssl/squid:' \ + src/ssl/ssl_crtd.8 || die + sed -i -e 's:/usr/local/squid/var/lib/ssl_db:/var/lib/squid/ssl_db:' \ + src/ssl/ssl_crtd.8 || die + sed -i -e 's:/var/lib/ssl_db:/var/lib/squid/ssl_db:' \ + src/ssl/ssl_crtd.8 || die + # /var/run/squid to /run/squid + sed -i -e 's:$(localstatedir)::' \ + src/ipc/Makefile.am || die + sed -i -e 's:_LTDL_SETUP:LTDL_INIT([installable]):' \ + libltdl/configure.ac || die + + eapply_user + eautoreconf +} + +src_configure() { + local basic_modules="MSNT-multi-domain,NCSA,POP3,getpwnam" + use samba && basic_modules+=",SMB" + use ldap && basic_modules+=",LDAP" + use pam && basic_modules+=",PAM" + use sasl && basic_modules+=",SASL" + use nis && ! use elibc_uclibc && basic_modules+=",NIS" + use radius && basic_modules+=",RADIUS" + if use mysql || use postgres || use sqlite ; then + basic_modules+=",DB" + fi + + local digest_modules="file" + use ldap && digest_modules+=",LDAP,eDirectory" + + local negotiate_modules="none" + local myconf="--without-mit-krb5 --without-heimdal-krb5" + if use kerberos ; then + negotiate_modules="kerberos,wrapper" + if has_version app-crypt/heimdal ; then + myconf="--without-mit-krb5 --with-heimdal-krb5" + else + myconf="--with-mit-krb5 --without-heimdal-krb5" + fi + fi + + local ntlm_modules="none" + use samba && ntlm_modules="smb_lm" + + local ext_helpers="file_userip,session,unix_group" + use samba && ext_helpers+=",wbinfo_group" + use ldap && ext_helpers+=",LDAP_group,eDirectory_userip" + use ldap && use kerberos && ext_helpers+=",kerberos_ldap_group" + + local storeio_modules="aufs,diskd,rock,ufs" + + local transparent + if use kernel_linux ; then + transparent+=" --enable-linux-netfilter" + use qos && transparent+=" --enable-zph-qos --with-netfilter-conntrack" + fi + + if use kernel_FreeBSD || use kernel_OpenBSD || use kernel_NetBSD ; then + transparent+=" $(use_enable kqueue)" + if use pf-transparent; then + transparent+=" --enable-pf-transparent" + elif use ipf-transparent; then + transparent+=" --enable-ipf-transparent" + fi + fi + + tc-export CC AR + + econf \ + --sysconfdir=/etc/squid \ + --libexecdir=/usr/libexec/squid \ + --localstatedir=/var \ + --with-pidfile=/run/squid.pid \ + --datadir=/usr/share/squid \ + --with-logdir=/var/log/squid \ + --with-default-user=squid \ + --enable-removal-policies="lru,heap" \ + --enable-storeio="${storeio_modules}" \ + --enable-disk-io \ + --enable-auth-basic="${basic_modules}" \ + --enable-auth-digest="${digest_modules}" \ + --enable-auth-ntlm="${ntlm_modules}" \ + --enable-auth-negotiate="${negotiate_modules}" \ + --enable-external-acl-helpers="${ext_helpers}" \ + --enable-log-daemon-helpers \ + --enable-url-rewrite-helpers \ + --enable-cache-digests \ + --enable-delay-pools \ + --enable-eui \ + --enable-icmp \ + --enable-follow-x-forwarded-for \ + --with-large-files \ + --disable-strict-error-checking \ + --disable-arch-native \ + --with-ltdl-includedir=/usr/include \ + --with-ltdl-libdir=/usr/$(get_libdir) \ + $(use_with caps libcap) \ + $(use_enable ipv6) \ + $(use_enable snmp) \ + $(use_with ssl openssl) \ + $(use_with ssl nettle) \ + $(use_with ssl gnutls) \ + $(use_enable ssl-crtd) \ + $(use_enable ecap) \ + $(use_enable esi) \ + $(use_enable htcp) \ + $(use_enable wccp) \ + $(use_enable wccpv2) \ + ${transparent} \ + ${myconf} +} + +src_install() { + emake DESTDIR="${D}" install + + # need suid root for looking into /etc/shadow + fowners root:squid /usr/libexec/squid/basic_ncsa_auth + fperms 4750 /usr/libexec/squid/basic_ncsa_auth + if use pam; then + fowners root:squid /usr/libexec/squid/basic_pam_auth + fperms 4750 /usr/libexec/squid/basic_pam_auth + fi + # pinger needs suid as well + fowners root:squid /usr/libexec/squid/pinger + fperms 4750 /usr/libexec/squid/pinger + + # cleanup + rm -f "${D}"/usr/bin/Run* + rm -rf "${D}"/run/squid "${D}"/var/cache/squid + + dodoc CONTRIBUTORS CREDITS ChangeLog INSTALL QUICKSTART README SPONSORS doc/*.txt + newdoc helpers/negotiate_auth/kerberos/README README.kerberos + newdoc helpers/basic_auth/RADIUS/README README.RADIUS + newdoc helpers/external_acl/kerberos_ldap_group/README README.kerberos_ldap_group + newdoc tools/purge/README README.purge + newdoc tools/helper-mux.README README.helper-mux + dodoc RELEASENOTES.html + + newpamd "${FILESDIR}/squid.pam" squid + newconfd "${FILESDIR}/squid.confd-r1" squid + newinitd "${FILESDIR}/squid.initd-r4" squid + if use logrotate; then + insinto /etc/logrotate.d + newins "${FILESDIR}/squid.logrotate" squid + else + exeinto /etc/cron.weekly + newexe "${FILESDIR}/squid.cron" squid.cron + fi + + diropts -m0750 -o squid -g squid + keepdir /var/log/squid /etc/ssl/squid /var/lib/squid +} diff --git a/net-proxy/squid/squid-3.5.25.ebuild b/net-proxy/squid/squid-3.5.25.ebuild new file mode 100644 index 000000000000..b499ec5ba110 --- /dev/null +++ b/net-proxy/squid/squid-3.5.25.ebuild @@ -0,0 +1,240 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 +inherit autotools linux-info pam toolchain-funcs user + +DESCRIPTION="A full-featured web proxy cache" +HOMEPAGE="http://www.squid-cache.org/" +SRC_URI="http://www.squid-cache.org/Versions/v3/3.5/${P}.tar.xz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd" +IUSE="caps ipv6 pam ldap libressl samba sasl kerberos nis radius ssl snmp selinux logrotate test \ + ecap esi ssl-crtd \ + mysql postgres sqlite \ + qos tproxy \ + +htcp +wccp +wccpv2 \ + pf-transparent ipf-transparent kqueue \ + elibc_uclibc kernel_linux" + +COMMON_DEPEND="caps? ( >=sys-libs/libcap-2.16 ) + pam? ( virtual/pam ) + ldap? ( net-nds/openldap ) + kerberos? ( virtual/krb5 ) + qos? ( net-libs/libnetfilter_conntrack ) + ssl? ( + libressl? ( dev-libs/libressl:0 ) + !libressl? ( dev-libs/openssl:0 ) + dev-libs/nettle >=net-libs/gnutls-3.1.5 ) + sasl? ( dev-libs/cyrus-sasl ) + ecap? ( net-libs/libecap:1 ) + esi? ( dev-libs/expat dev-libs/libxml2 ) + !x86-fbsd? ( logrotate? ( app-admin/logrotate ) ) + >=sys-libs/db-4:* + dev-lang/perl + dev-libs/libltdl:0" +DEPEND="${COMMON_DEPEND} + ecap? ( virtual/pkgconfig ) + test? ( dev-util/cppunit )" +RDEPEND="${COMMON_DEPEND} + samba? ( net-fs/samba ) + mysql? ( dev-perl/DBD-mysql ) + postgres? ( dev-perl/DBD-Pg ) + selinux? ( sec-policy/selinux-squid ) + sqlite? ( dev-perl/DBD-SQLite ) + !<=sci-biology/meme-4.8.1-r1" + +REQUIRED_USE="tproxy? ( caps ) + qos? ( caps )" + +pkg_pretend() { + if use tproxy; then + local CONFIG_CHECK="~NF_CONNTRACK ~NETFILTER_XT_MATCH_SOCKET ~NETFILTER_XT_TARGET_TPROXY" + linux-info_pkg_setup + fi +} + +pkg_setup() { + enewgroup squid + enewuser squid -1 -1 /var/cache/squid squid +} + +src_prepare() { + eapply "${FILESDIR}/${PN}-3.5.7-gentoo.patch" + sed -i -e 's:/usr/local/squid/etc:/etc/squid:' \ + INSTALL QUICKSTART \ + scripts/fileno-to-pathname.pl \ + scripts/check_cache.pl \ + tools/cachemgr.cgi.8 \ + tools/purge/conffile.hh \ + tools/purge/README || die + sed -i -e 's:/usr/local/squid/sbin:/usr/sbin:' \ + INSTALL QUICKSTART || die + sed -i -e 's:/usr/local/squid/var/cache:/var/cache/squid:' \ + QUICKSTART || die + sed -i -e 's:/usr/local/squid/var/logs:/var/log/squid:' \ + QUICKSTART \ + src/log/access_log.cc || die + sed -i -e 's:/usr/local/squid/logs:/var/log/squid:' \ + src/log/access_log.cc || die + sed -i -e 's:/usr/local/squid/libexec:/usr/libexec/squid:' \ + helpers/external_acl/unix_group/ext_unix_group_acl.8 \ + helpers/external_acl/session/ext_session_acl.8 \ + src/ssl/ssl_crtd.8 || die + sed -i -e 's:/usr/local/squid/cache:/var/cache/squid:' \ + scripts/check_cache.pl || die + sed -i -e 's:/usr/local/squid/ssl_cert:/etc/ssl/squid:' \ + src/ssl/ssl_crtd.8 || die + sed -i -e 's:/usr/local/squid/var/lib/ssl_db:/var/lib/squid/ssl_db:' \ + src/ssl/ssl_crtd.8 || die + sed -i -e 's:/var/lib/ssl_db:/var/lib/squid/ssl_db:' \ + src/ssl/ssl_crtd.8 || die + # /var/run/squid to /run/squid + sed -i -e 's:$(localstatedir)::' \ + src/ipc/Makefile.am || die + sed -i -e 's:_LTDL_SETUP:LTDL_INIT([installable]):' \ + libltdl/configure.ac || die + + eapply_user + eautoreconf +} + +src_configure() { + local basic_modules="MSNT-multi-domain,NCSA,POP3,getpwnam" + use samba && basic_modules+=",SMB" + use ldap && basic_modules+=",LDAP" + use pam && basic_modules+=",PAM" + use sasl && basic_modules+=",SASL" + use nis && ! use elibc_uclibc && basic_modules+=",NIS" + use radius && basic_modules+=",RADIUS" + if use mysql || use postgres || use sqlite ; then + basic_modules+=",DB" + fi + + local digest_modules="file" + use ldap && digest_modules+=",LDAP,eDirectory" + + local negotiate_modules="none" + local myconf="--without-mit-krb5 --without-heimdal-krb5" + if use kerberos ; then + negotiate_modules="kerberos,wrapper" + if has_version app-crypt/heimdal ; then + myconf="--without-mit-krb5 --with-heimdal-krb5" + else + myconf="--with-mit-krb5 --without-heimdal-krb5" + fi + fi + + local ntlm_modules="none" + use samba && ntlm_modules="smb_lm" + + local ext_helpers="file_userip,session,unix_group" + use samba && ext_helpers+=",wbinfo_group" + use ldap && ext_helpers+=",LDAP_group,eDirectory_userip" + use ldap && use kerberos && ext_helpers+=",kerberos_ldap_group" + + local storeio_modules="aufs,diskd,rock,ufs" + + local transparent + if use kernel_linux ; then + transparent+=" --enable-linux-netfilter" + use qos && transparent+=" --enable-zph-qos --with-netfilter-conntrack" + fi + + if use kernel_FreeBSD || use kernel_OpenBSD || use kernel_NetBSD ; then + transparent+=" $(use_enable kqueue)" + if use pf-transparent; then + transparent+=" --enable-pf-transparent" + elif use ipf-transparent; then + transparent+=" --enable-ipf-transparent" + fi + fi + + tc-export CC AR + + econf \ + --sysconfdir=/etc/squid \ + --libexecdir=/usr/libexec/squid \ + --localstatedir=/var \ + --with-pidfile=/run/squid.pid \ + --datadir=/usr/share/squid \ + --with-logdir=/var/log/squid \ + --with-default-user=squid \ + --enable-removal-policies="lru,heap" \ + --enable-storeio="${storeio_modules}" \ + --enable-disk-io \ + --enable-auth-basic="${basic_modules}" \ + --enable-auth-digest="${digest_modules}" \ + --enable-auth-ntlm="${ntlm_modules}" \ + --enable-auth-negotiate="${negotiate_modules}" \ + --enable-external-acl-helpers="${ext_helpers}" \ + --enable-log-daemon-helpers \ + --enable-url-rewrite-helpers \ + --enable-cache-digests \ + --enable-delay-pools \ + --enable-eui \ + --enable-icmp \ + --enable-follow-x-forwarded-for \ + --with-large-files \ + --disable-strict-error-checking \ + --disable-arch-native \ + --with-ltdl-includedir=/usr/include \ + --with-ltdl-libdir=/usr/$(get_libdir) \ + $(use_with caps libcap) \ + $(use_enable ipv6) \ + $(use_enable snmp) \ + $(use_with ssl openssl) \ + $(use_with ssl nettle) \ + $(use_with ssl gnutls) \ + $(use_enable ssl-crtd) \ + $(use_enable ecap) \ + $(use_enable esi) \ + $(use_enable htcp) \ + $(use_enable wccp) \ + $(use_enable wccpv2) \ + ${transparent} \ + ${myconf} +} + +src_install() { + emake DESTDIR="${D}" install + + # need suid root for looking into /etc/shadow + fowners root:squid /usr/libexec/squid/basic_ncsa_auth + fperms 4750 /usr/libexec/squid/basic_ncsa_auth + if use pam; then + fowners root:squid /usr/libexec/squid/basic_pam_auth + fperms 4750 /usr/libexec/squid/basic_pam_auth + fi + # pinger needs suid as well + fowners root:squid /usr/libexec/squid/pinger + fperms 4750 /usr/libexec/squid/pinger + + # cleanup + rm -f "${D}"/usr/bin/Run* + rm -rf "${D}"/run/squid "${D}"/var/cache/squid + + dodoc CONTRIBUTORS CREDITS ChangeLog INSTALL QUICKSTART README SPONSORS doc/*.txt + newdoc helpers/negotiate_auth/kerberos/README README.kerberos + newdoc helpers/basic_auth/RADIUS/README README.RADIUS + newdoc helpers/external_acl/kerberos_ldap_group/README README.kerberos_ldap_group + newdoc tools/purge/README README.purge + newdoc tools/helper-mux.README README.helper-mux + dodoc RELEASENOTES.html + + newpamd "${FILESDIR}/squid.pam" squid + newconfd "${FILESDIR}/squid.confd-r1" squid + newinitd "${FILESDIR}/squid.initd-r4" squid + if use logrotate; then + insinto /etc/logrotate.d + newins "${FILESDIR}/squid.logrotate" squid + else + exeinto /etc/cron.weekly + newexe "${FILESDIR}/squid.cron" squid.cron + fi + + diropts -m0750 -o squid -g squid + keepdir /var/log/squid /etc/ssl/squid /var/lib/squid +} diff --git a/net-proxy/squid/squid-3.5.26.ebuild b/net-proxy/squid/squid-3.5.26.ebuild new file mode 100644 index 000000000000..6a79f8eeb07e --- /dev/null +++ b/net-proxy/squid/squid-3.5.26.ebuild @@ -0,0 +1,241 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 +inherit autotools linux-info pam toolchain-funcs user + +DESCRIPTION="A full-featured web proxy cache" +HOMEPAGE="http://www.squid-cache.org/" +SRC_URI="http://www.squid-cache.org/Versions/v3/3.5/${P}.tar.xz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="alpha amd64 arm ~hppa ia64 ~mips ppc ppc64 ~sparc x86 ~x86-fbsd" +IUSE="caps ipv6 pam ldap libressl samba sasl kerberos nis radius ssl snmp selinux logrotate test \ + ecap esi ssl-crtd \ + mysql postgres sqlite \ + qos tproxy \ + +htcp +wccp +wccpv2 \ + pf-transparent ipf-transparent kqueue \ + elibc_uclibc kernel_linux" + +COMMON_DEPEND="caps? ( >=sys-libs/libcap-2.16 ) + pam? ( virtual/pam ) + ldap? ( net-nds/openldap ) + kerberos? ( virtual/krb5 ) + qos? ( net-libs/libnetfilter_conntrack ) + ssl? ( + libressl? ( dev-libs/libressl:0 ) + !libressl? ( dev-libs/openssl:0 ) + dev-libs/nettle >=net-libs/gnutls-3.1.5 ) + sasl? ( dev-libs/cyrus-sasl ) + ecap? ( net-libs/libecap:1 ) + esi? ( dev-libs/expat dev-libs/libxml2 ) + !x86-fbsd? ( logrotate? ( app-admin/logrotate ) ) + >=sys-libs/db-4:* + dev-lang/perl + dev-libs/libltdl:0" +DEPEND="${COMMON_DEPEND} + ecap? ( virtual/pkgconfig ) + test? ( dev-util/cppunit )" +RDEPEND="${COMMON_DEPEND} + samba? ( net-fs/samba ) + mysql? ( dev-perl/DBD-mysql ) + postgres? ( dev-perl/DBD-Pg ) + selinux? ( sec-policy/selinux-squid ) + sqlite? ( dev-perl/DBD-SQLite ) + !<=sci-biology/meme-4.8.1-r1" + +REQUIRED_USE="tproxy? ( caps ) + qos? ( caps )" + +pkg_pretend() { + if use tproxy; then + local CONFIG_CHECK="~NF_CONNTRACK ~NETFILTER_XT_MATCH_SOCKET ~NETFILTER_XT_TARGET_TPROXY" + linux-info_pkg_setup + fi +} + +pkg_setup() { + enewgroup squid + enewuser squid -1 -1 /var/cache/squid squid +} + +src_prepare() { + eapply "${FILESDIR}/${PN}-3.5.7-gentoo.patch" + eapply -p0 "${FILESDIR}/${PN}-cppunit-1.14.patch" + sed -i -e 's:/usr/local/squid/etc:/etc/squid:' \ + INSTALL QUICKSTART \ + scripts/fileno-to-pathname.pl \ + scripts/check_cache.pl \ + tools/cachemgr.cgi.8 \ + tools/purge/conffile.hh \ + tools/purge/README || die + sed -i -e 's:/usr/local/squid/sbin:/usr/sbin:' \ + INSTALL QUICKSTART || die + sed -i -e 's:/usr/local/squid/var/cache:/var/cache/squid:' \ + QUICKSTART || die + sed -i -e 's:/usr/local/squid/var/logs:/var/log/squid:' \ + QUICKSTART \ + src/log/access_log.cc || die + sed -i -e 's:/usr/local/squid/logs:/var/log/squid:' \ + src/log/access_log.cc || die + sed -i -e 's:/usr/local/squid/libexec:/usr/libexec/squid:' \ + helpers/external_acl/unix_group/ext_unix_group_acl.8 \ + helpers/external_acl/session/ext_session_acl.8 \ + src/ssl/ssl_crtd.8 || die + sed -i -e 's:/usr/local/squid/cache:/var/cache/squid:' \ + scripts/check_cache.pl || die + sed -i -e 's:/usr/local/squid/ssl_cert:/etc/ssl/squid:' \ + src/ssl/ssl_crtd.8 || die + sed -i -e 's:/usr/local/squid/var/lib/ssl_db:/var/lib/squid/ssl_db:' \ + src/ssl/ssl_crtd.8 || die + sed -i -e 's:/var/lib/ssl_db:/var/lib/squid/ssl_db:' \ + src/ssl/ssl_crtd.8 || die + # /var/run/squid to /run/squid + sed -i -e 's:$(localstatedir)::' \ + src/ipc/Makefile.am || die + sed -i -e 's:_LTDL_SETUP:LTDL_INIT([installable]):' \ + libltdl/configure.ac || die + + eapply_user + eautoreconf +} + +src_configure() { + local basic_modules="MSNT-multi-domain,NCSA,POP3,getpwnam" + use samba && basic_modules+=",SMB" + use ldap && basic_modules+=",LDAP" + use pam && basic_modules+=",PAM" + use sasl && basic_modules+=",SASL" + use nis && ! use elibc_uclibc && basic_modules+=",NIS" + use radius && basic_modules+=",RADIUS" + if use mysql || use postgres || use sqlite ; then + basic_modules+=",DB" + fi + + local digest_modules="file" + use ldap && digest_modules+=",LDAP,eDirectory" + + local negotiate_modules="none" + local myconf="--without-mit-krb5 --without-heimdal-krb5" + if use kerberos ; then + negotiate_modules="kerberos,wrapper" + if has_version app-crypt/heimdal ; then + myconf="--without-mit-krb5 --with-heimdal-krb5" + else + myconf="--with-mit-krb5 --without-heimdal-krb5" + fi + fi + + local ntlm_modules="none" + use samba && ntlm_modules="smb_lm" + + local ext_helpers="file_userip,session,unix_group" + use samba && ext_helpers+=",wbinfo_group" + use ldap && ext_helpers+=",LDAP_group,eDirectory_userip" + use ldap && use kerberos && ext_helpers+=",kerberos_ldap_group" + + local storeio_modules="aufs,diskd,rock,ufs" + + local transparent + if use kernel_linux ; then + transparent+=" --enable-linux-netfilter" + use qos && transparent+=" --enable-zph-qos --with-netfilter-conntrack" + fi + + if use kernel_FreeBSD || use kernel_OpenBSD || use kernel_NetBSD ; then + transparent+=" $(use_enable kqueue)" + if use pf-transparent; then + transparent+=" --enable-pf-transparent" + elif use ipf-transparent; then + transparent+=" --enable-ipf-transparent" + fi + fi + + tc-export CC AR + + econf \ + --sysconfdir=/etc/squid \ + --libexecdir=/usr/libexec/squid \ + --localstatedir=/var \ + --with-pidfile=/run/squid.pid \ + --datadir=/usr/share/squid \ + --with-logdir=/var/log/squid \ + --with-default-user=squid \ + --enable-removal-policies="lru,heap" \ + --enable-storeio="${storeio_modules}" \ + --enable-disk-io \ + --enable-auth-basic="${basic_modules}" \ + --enable-auth-digest="${digest_modules}" \ + --enable-auth-ntlm="${ntlm_modules}" \ + --enable-auth-negotiate="${negotiate_modules}" \ + --enable-external-acl-helpers="${ext_helpers}" \ + --enable-log-daemon-helpers \ + --enable-url-rewrite-helpers \ + --enable-cache-digests \ + --enable-delay-pools \ + --enable-eui \ + --enable-icmp \ + --enable-follow-x-forwarded-for \ + --with-large-files \ + --disable-strict-error-checking \ + --disable-arch-native \ + --with-ltdl-includedir=/usr/include \ + --with-ltdl-libdir=/usr/$(get_libdir) \ + $(use_with caps libcap) \ + $(use_enable ipv6) \ + $(use_enable snmp) \ + $(use_with ssl openssl) \ + $(use_with ssl nettle) \ + $(use_with ssl gnutls) \ + $(use_enable ssl-crtd) \ + $(use_enable ecap) \ + $(use_enable esi) \ + $(use_enable htcp) \ + $(use_enable wccp) \ + $(use_enable wccpv2) \ + ${transparent} \ + ${myconf} +} + +src_install() { + emake DESTDIR="${D}" install + + # need suid root for looking into /etc/shadow + fowners root:squid /usr/libexec/squid/basic_ncsa_auth + fperms 4750 /usr/libexec/squid/basic_ncsa_auth + if use pam; then + fowners root:squid /usr/libexec/squid/basic_pam_auth + fperms 4750 /usr/libexec/squid/basic_pam_auth + fi + # pinger needs suid as well + fowners root:squid /usr/libexec/squid/pinger + fperms 4750 /usr/libexec/squid/pinger + + # cleanup + rm -f "${D}"/usr/bin/Run* + rm -rf "${D}"/run/squid "${D}"/var/cache/squid + + dodoc CONTRIBUTORS CREDITS ChangeLog INSTALL QUICKSTART README SPONSORS doc/*.txt + newdoc helpers/negotiate_auth/kerberos/README README.kerberos + newdoc helpers/basic_auth/RADIUS/README README.RADIUS + newdoc helpers/external_acl/kerberos_ldap_group/README README.kerberos_ldap_group + newdoc tools/purge/README README.purge + newdoc tools/helper-mux.README README.helper-mux + dodoc RELEASENOTES.html + + newpamd "${FILESDIR}/squid.pam" squid + newconfd "${FILESDIR}/squid.confd-r1" squid + newinitd "${FILESDIR}/squid.initd-r4" squid + if use logrotate; then + insinto /etc/logrotate.d + newins "${FILESDIR}/squid.logrotate" squid + else + exeinto /etc/cron.weekly + newexe "${FILESDIR}/squid.cron" squid.cron + fi + + diropts -m0750 -o squid -g squid + keepdir /var/log/squid /etc/ssl/squid /var/lib/squid +} |