diff options
author | V3n3RiX <venerix@koprulu.sector> | 2024-07-04 08:06:08 +0100 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2024-07-04 08:06:08 +0100 |
commit | 2a8d2f71d1d9963368e0ef3d641d75979a689d12 (patch) | |
tree | 83e283f960ab2ebbc1a042b8ed6c37b78d47b37b /net-proxy | |
parent | 8435c842b9e8fbb2bcc80397ab3aa655000459e2 (diff) |
gentoo auto-resync : 04:07:2024 - 08:06:07
Diffstat (limited to 'net-proxy')
-rw-r--r-- | net-proxy/Manifest.gz | bin | 5372 -> 5377 bytes | |||
-rw-r--r-- | net-proxy/squid/Manifest | 9 | ||||
-rw-r--r-- | net-proxy/squid/files/squid.cron-r1 | 15 | ||||
-rw-r--r-- | net-proxy/squid/files/squid.initd-r7 | 133 | ||||
-rw-r--r-- | net-proxy/squid/files/squid.logrotate-r1 | 11 | ||||
-rw-r--r-- | net-proxy/squid/squid-6.9.ebuild (renamed from net-proxy/squid/squid-6.5.ebuild) | 34 |
6 files changed, 191 insertions, 11 deletions
diff --git a/net-proxy/Manifest.gz b/net-proxy/Manifest.gz Binary files differindex 8897f3de94e3..8628d0b16b64 100644 --- a/net-proxy/Manifest.gz +++ b/net-proxy/Manifest.gz diff --git a/net-proxy/squid/Manifest b/net-proxy/squid/Manifest index cad925d7e783..fec369590fb1 100644 --- a/net-proxy/squid/Manifest +++ b/net-proxy/squid/Manifest @@ -3,15 +3,20 @@ AUX squid-6.2-gentoo.patch 2494 BLAKE2B 8115a9ad312c6dd639ab92b8673532e61341acf9 AUX squid-6.4-gcc14-algorithm.patch 233 BLAKE2B f6be1bf9907397a3510987a235f963276da4b4f36ac4e558a1a12811c8d83c5fb327b0348f5ed92139bcbf3c973177a3f810c7b059386ceab6081047a49e5871 SHA512 42d78b26847af56a788412496ef19ccffa1c8953d8d2369900c5b1c26cb245dadeb0c3d3859f9bbcb2d72b64bf8b284ed812de7aec291e4cf6a7b2482da4c7ee AUX squid.confd-r2 707 BLAKE2B 9fce12f6c6d395448b1e70c95ef75418d1844e7409738df60bee7c1adab786ca7e504070eacdd2b6e30a35df8a7322cccdfb950e60bcde352d35d090d55c6be9 SHA512 37435f808b1dab1ca3ceecafd6cd9007c44e10d257f135ba6baf1a51b1e3408f2a76b71d85a08ce6dcb7f86b9841b7bfcd870b0d312a2365699290e28f72314a AUX squid.cron 143 BLAKE2B 17b1bccea20771a481a5b4745c9832a4b762132a500eaeb091349a59b870c14b680d8ea97e03bb7a0b2d67e1ca1d4ee1db31dc43b9dbf02be8953d15f214b033 SHA512 cec563c20799ffea8b4fb418d5015d6dc437bd38c35e7150ed01bc298dab5214132e10f4e7b8176da1966e16a7f53f423c36e8419642cb16716f5c346c30d749 +AUX squid.cron-r1 594 BLAKE2B 8c00bbfeb31428f3952f9af255f921cc652dd617a8ad4e3e319d0412f470eacaeab552df9f1b78adaa33172e0ba6220195633901770425e44e6453ca17399ced SHA512 93bfcb31db378bfcf1e38e9d6208334962e0fedc99b1b8586626650186d4815c48bcc4f1197123652130b277634d2dce8590358a9797c9eba36e867fc83a3696 AUX squid.initd-r6 4513 BLAKE2B 46406790dcc86048cdf4d98e648d266733ebf671ccf4f5b7c23d2fd25d97b161d00e05ff0d749af810cc9d1ad1300efef5a43caf62ac534e026b75c099dfc1b4 SHA512 4205350ace938f7eda0b62c4aedc8af3f5a14b011fad76a8e6ad6138358f835592453ac168e58ff3dcb3fb0bbcffd9b97acf4ce2060e34a47c2b92946f86164e +AUX squid.initd-r7 4473 BLAKE2B e5fd96a8bb6492c31c452791dce185fc4d6fa655f0c05d0b752ab83d7bfcbacd3df6dc26912d94489c691f43811d68362b2532ecf1d68128629f636c609942e0 SHA512 183d48913458d382665a2412f4065bcd7ed3c585a6bfe3e8cfe019899104c9c1184ca814891bfdf414f765bd903d9bb3f849b01ea46c015f499fdd9d6456689b AUX squid.logrotate 103 BLAKE2B f6d190d1914b76b08d90a2c3b3b07ff9cd332cdb2e595f4849537d1f1d32d8be1386fcdfffb40d073bcdd715a62c1c44727f1e10b75cfaff69c0d042c2a7e904 SHA512 d75a667c3ffa32fdd938ef40df8813a467d9f10b2363107bf915cb0c99834fbe8d0eb502a18a816875b67b0db1b27806ed3caf620c38516040cb644b225f5a55 +AUX squid.logrotate-r1 166 BLAKE2B 62bd821aabd7394e4644e19d2d243775154fca1c09776373d62bd56d1bbfbc3f4ec440ac17d44a29afbe0692e3b4ccb311ad5cd5790b18737ce15f2bfca5de31 SHA512 e26f661d07029c86a82e635c741252f1c5861764e5a695ab980750a238047d9fe74f80f63552f47d0a32960c74b5435d458f2f88d267c7b5950a27e62f0ecb19 AUX squid.pam 209 BLAKE2B 113fa119ce4fd96ddf34b95c1a1ca958b34aea405564076f89abdbb8d4c6a0248ec9fa1a0f5f1d6136643c9abc4c5f67e8ef75305414b374763e2055272950d5 SHA512 5501e3d9319aea99f0deed98748366d4dfbeccdde96d842474fe144a4584394d8f5563372cd7b2437a389378c49b61b646403cca1be4362c888750d027b2f594 -DIST squid-6.5.tar.xz 2554492 BLAKE2B 91ed91f9b0f56f440a7f15a63bbc3e19537b60bc8b31b5bf7e16884367d0da060c5490e1721dbd7c5fce7f4a4e958fb3554d6bdc5b55f568598f907722b651de SHA512 d3a40f5f390f0042a8e981ca28755a90dd520230a06b4246ba7bec0c98025ce1cdc7426797a666f769addd60238e28e1f04d2c701ea2ef2d7329dbe87b830d70 DIST squid-6.6.tar.xz 2554824 BLAKE2B 7c3c96f5cd5f819f6f020fb3e63ee8d9bb26b7fb4ff4405d7963a643c6766344e6492505bc1b33f3040ad800b3d7a3ad6a4b067b031ac4d178ddcac04c6e74dc SHA512 4ab261ed85ad674288467500aca9d8a48e3918b55f777635c0ba7a2551f248d35536848a5fbf2c946490a818004727f2aed33144f0a3ebab0be36cc4cffb020c DIST squid-6.6.tar.xz.asc 1193 BLAKE2B c37a400c51c30de35c6fe52123389c134d05670a36b1ffae4d67e7d06981bbf94788343daf2fdeafb782d464a977ee31bc601e3b1b92b45cd40ba6a6725b9a16 SHA512 08550569759c403a1a9747d08ea7055751fbf251355691074f6d09baca76a0987c5dff36e1f01b64edd446d568c7244b14124f6f8a1b19ccfc30293eed83a297 DIST squid-6.7.tar.xz 2427468 BLAKE2B 0cd892213085326d1f4cc065778d95d74c03edaaf98b839b4422397fdcd449716b022e74adcbac636ca98e9d5c45a8f7aa156c3edc9f306fb13fc5cc21125dd6 SHA512 6221437056c600119fe9ff1ceeeaa9955cf9f21df481ad29a3515f8439a41b779d51f37b820b75641d0d4d6de54554f6f924dbd347834bf4a6ad6b5b317084a0 DIST squid-6.7.tar.xz.asc 646 BLAKE2B 6d4e6075b261f54269577fc31b28e7cb74b835c851741542c322b226d29325128cdbaadd156070e9fe6c5af5c33149c78f71b01272934a62676e08f3f75f8628 SHA512 4a1f9d123ce6b5a600d9d2dd3af95a7ce98bfe28ba42d1281ab1f3d7f220f8738a4320afb85eeba1bf9d31e722ffaccd2d89cbefcd11e6b6ea31fe237ccf9a8c -EBUILD squid-6.5.ebuild 9625 BLAKE2B 92fa2fea7223aa8623de5c0b4699e9e562760984730e6f711707ab18227937d9e9edca0c8eebc2361ecbfeccacfff68ace2994b9a493bba44da1cc6231de07d2 SHA512 3510bfa80603db991a5fc74f5e3e86b8d4ac642a77d7e492ebcd1c963f524e8301ba761ad4c117651cb0a8f746e72e4c7e4fed83cdec6de4849cf9ecc5d15218 +DIST squid-6.9-memleak_fix.patch 22178 BLAKE2B bf87a98ac3ddcf27b817b7b09a1a7656cb6547c7c157d02a3daf4b337669180718e1df06040b9b4be252a9f60fc767d94ed698014113c072dd9b91ada08a1adc SHA512 38754b1f593dde3e7ab70601bdaaabf8c1c40beea0ae9913684d3de78d76cec4243abac8e315af2009b98e096a3b04c56181940f0528716278aaf7c44ea76dad +DIST squid-6.9.tar.xz 2557992 BLAKE2B cac10d3a16fe31a9becfcd0fc278413d53c52285cdca9ece897ca4e3a0e50806e186960091f9050243180996382c6b5209360d9fff249d26b20d1e529285a038 SHA512 2666551caca39fa6ca49b56b537645dd043ee0c99b805c433cf714172e6062590fd6ed942043df1a3b543f30c039f3ab701493187dc6a0a4a8311217417c366e +DIST squid-6.9.tar.xz.asc 646 BLAKE2B fafa49d40af849103d04c0f07e19e5b9007306ba0f85bcabed761b53f94015aefc65ec2035963c95fd938cb04dfdb878363fcf5150a06889b563fa48922ef289 SHA512 ccd053476e91544bf797cf38a7e57acdc1c02c1edb2804230f061d9b24abbbd2e06abbaaa0fe2b209951631c0369510f60f0b7137fe950f3ccf59e8a212bc0fa EBUILD squid-6.6.ebuild 9837 BLAKE2B f8b4826ed09f36b6bf1e56d01099b60b371de35fa3c0772dfe49fec939e38de5aad88362ccd2591364abe9a7390811357b9ee5b1a1dc325aff5b4b410ca034b5 SHA512 7d177f1cd2c4fcc8ca4ea630c339a76d715c9c0251668512d95b6e38500b672d6006d953d2a0b5739ef804e15479e75eef4f9902cfc6d821381457bbd500934f EBUILD squid-6.7.ebuild 9840 BLAKE2B 02eaff938405892c095b760cfc393eba182b74f0c87949605ee9d47836a48669af4bb4fbd70a03d171442c5a6ef1ea1cbb9f2d4306077e72c2faabf73be90d70 SHA512 717c71669293d9240aaf9ce64d074fc60585000170ec6633b414d2090ef18412b838bfa52384741e2e6462e62430adf0a50321e6e82aadeefdc278dcd52fa916 +EBUILD squid-6.9.ebuild 10172 BLAKE2B 8abd47831cadd34a63aa1b0c87ad6b30a269e5b66b66843770cae0e052b21c17fe36e393d78138bb5706a3158f32eba4a899ea3a0778839f3b288cf04f74541e SHA512 9a769a942aea2905cbf3e3e69119c31ea39605ac6cac3e05b1fa53bb1d8b9b12d5b7aafe12003ac7dd778466f8b05980ff2bc359e3b7869046e040f43688bf33 MISC metadata.xml 1351 BLAKE2B 8a6ea8bc939b5900572bd323fb3be78e0dfa9b4d7436f2d5e27fa59905f57af5cd9b7fe9a2903f8f57859a88176aab17c1a5d507a69765aab0f5320ceec69c96 SHA512 db7a47668d220a16f10d25319ffc4cd33270209d7d00f488d45680150f094d70776c4bf3c7b203b6ec8c69be18e5ac3a78d3d4367ec90a9ffb91ffd29f66890f diff --git a/net-proxy/squid/files/squid.cron-r1 b/net-proxy/squid/files/squid.cron-r1 new file mode 100644 index 000000000000..f0fa84ed2cb3 --- /dev/null +++ b/net-proxy/squid/files/squid.cron-r1 @@ -0,0 +1,15 @@ +#!/bin/sh + +# OpenRC init script supports multiple Squid instances, and exposes 'rotate'. +if command -v rc-service >/dev/null; then + SQUID_SERVICES=$(rc-status | awk '/ *squid.* started /{print $1}') + for SQUID_SERVICE in $SQUID_SERVICES ; do + rc-service "${SQUID_SERVICE}" rotate + done + +# Systemd unit file supports only a single default squid instance, +# and no 'rotate' support, so call squid directly. +elif command -v systemctl >/dev/null; then + SQUID_ACTIVE=$(systemctl --type=service --state=active | awk '/^ *squid\.service / {print $1}') + [ -n "${SQUID_ACTIVE}" ] && squid -k rotate +fi diff --git a/net-proxy/squid/files/squid.initd-r7 b/net-proxy/squid/files/squid.initd-r7 new file mode 100644 index 000000000000..7215b774736d --- /dev/null +++ b/net-proxy/squid/files/squid.initd-r7 @@ -0,0 +1,133 @@ +#!/sbin/openrc-run +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +SQUID_SVCNAME=$( echo "${RC_SVCNAME}" | tr -cd '[a-zA-Z0-9]' ) + +extra_started_commands="reload rotate" + +depend() { + use dns net +} + +_getconfig() { + # Make PIDFILE, CHROOTDIR, and CACHE_SWAP visible to other functions + local CONFFILES="/etc/squid/${RC_SVCNAME}.conf /etc/squid/${RC_SVCNAME}.include /etc/squid/${RC_SVCNAME}.include.*" + if [ ! -f /etc/squid/${RC_SVCNAME}.conf ]; then + eerror "You need to create /etc/squid/${RC_SVCNAME}.conf first." + eerror "The main configuration file and all included file names should have the following format:" + eerror "${CONFFILES}" + eerror "An example can be found in /etc/squid/squid.conf.default" + return 1 + fi + PIDFILE=$(cat ${CONFFILES} 2>/dev/null 3>/dev/null | awk '/^[ \t]*pid_filename[ \t]+/ { print $2 }') + CHROOTDIR=$(cat ${CONFFILES} 2>/dev/null 3>/dev/null | awk '/^[ \t]*chroot[ \t]+/ { print $2 }') + if [ -n "${CHROOTDIR}" ] && [ -n "${PIDFILE}" ]; then + CHROOTDIR="${CHROOTDIR%/}" + PIDFILE="${CHROOTDIR}${PIDFILE}" + fi + [ -z ${PIDFILE} ] && PIDFILE=/run/squid.pid + if [ "${CHROOTDIR}/run/${RC_SVCNAME}.pid" != ${PIDFILE} ]; then + eerror "/etc/squid/${RC_SVCNAME}.conf must set pid_filename to" + eerror " /run/${RC_SVCNAME}.pid" + if [ -n "${CHROOTDIR}" ]; then + eerror "with chrootdir ${CHROOTDIR} set." + fi + eerror "CAUTION: http_port, cache_dir and *_log parameters must be different than" + eerror " in any other instance of squid." + eerror "Make sure the main configuration file and all included file names have the following format:" + eerror "${CONFFILES}" + return 1 + fi + CACHE_SWAP=$(cat ${CONFFILES} 2>/dev/null 3>/dev/null | 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; }') + [ -z "$CACHE_SWAP" ] && CACHE_SWAP="/var/cache/squid/00" + + return 0 +} + +checkconfig() { + _getconfig || return 1 + 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/${RC_SVCNAME}.conf -n ${SQUID_SVCNAME} 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/${RC_SVCNAME} + + # see https://wiki.squid-cache.org/MultipleInstances + ebegin "Starting ${RC_SVCNAME} (service name ${SQUID_SVCNAME}) with KRB5_KTNAME=\"${SQUID_KEYTAB}\" /usr/sbin/squid ${SQUID_OPTS} -f /etc/squid/${RC_SVCNAME}.conf -n ${SQUID_SVCNAME}" + KRB5_KTNAME="${SQUID_KEYTAB}" /usr/sbin/squid ${SQUID_OPTS} -f /etc/squid/${RC_SVCNAME}.conf -n ${SQUID_SVCNAME} + eend $? && sleep 1 +} + +stop() { + _getconfig || return 1 + ebegin "Stopping ${RC_SVCNAME} with /usr/sbin/squid -k shutdown -f /etc/squid/${RC_SVCNAME}.conf -n ${SQUID_SVCNAME}" + if /usr/sbin/squid -k shutdown -f /etc/squid/${RC_SVCNAME}.conf -n ${SQUID_SVCNAME} ; then + if [ "x${SQUID_FAST_SHUTDOWN}" = "xyes" ]; then + einfo "Attempting fast shutdown." + /usr/sbin/squid -k shutdown -f /etc/squid/${RC_SVCNAME}.conf -n ${SQUID_SVCNAME} + fi + # Now we have to wait until squid has _really_ stopped. + sleep 1 + if [ -f ${PIDFILE} ] ; then + einfon "Waiting for squid to shutdown ." + cnt=0 + while [ -f ${PIDFILE} ] ; do + cnt=$(expr $cnt + 1) + if [ $cnt -gt 90 ] ; then + # Waited 180 seconds now. Fail. + echo + eend 1 "Failed." + break + fi + sleep 2 + printf "." + done + echo + fi + else + eerror "Squid shutdown failed, probably service is already down." + fi + eend 0 +} + +reload() { + checkconfig || return 1 + ebegin "Reloading ${RC_SVCNAME} with /usr/sbin/squid -k reconfigure -f /etc/squid/${RC_SVCNAME}.conf -n ${SQUID_SVCNAME}" + /usr/sbin/squid -k reconfigure -f /etc/squid/${RC_SVCNAME}.conf -n ${SQUID_SVCNAME} + eend $? +} + +rotate() { + service_started ${RC_SVCNAME} || return 1 + ebegin "Rotating ${RC_SVCNAME} logs with /usr/sbin/squid -k rotate -f /etc/squid/${RC_SVCNAME}.conf -n ${SQUID_SVCNAME}" + /usr/sbin/squid -k rotate -f /etc/squid/${RC_SVCNAME}.conf -n ${SQUID_SVCNAME} + eend $? +} diff --git a/net-proxy/squid/files/squid.logrotate-r1 b/net-proxy/squid/files/squid.logrotate-r1 new file mode 100644 index 000000000000..03cbca9b5f4a --- /dev/null +++ b/net-proxy/squid/files/squid.logrotate-r1 @@ -0,0 +1,11 @@ +/var/log/squid/*.log { + copytruncate + compress + notifempty + missingok + sharedscripts + postrotate + squid -k rotate 2>/dev/null + endscript +} + diff --git a/net-proxy/squid/squid-6.5.ebuild b/net-proxy/squid/squid-6.9.ebuild index d182d0e1c386..266c40c8dce1 100644 --- a/net-proxy/squid/squid-6.5.ebuild +++ b/net-proxy/squid/squid-6.9.ebuild @@ -3,25 +3,31 @@ EAPI=8 -inherit autotools flag-o-matic linux-info pam systemd toolchain-funcs +VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/squid.gpg +inherit autotools flag-o-matic linux-info pam systemd toolchain-funcs verify-sig DESCRIPTION="Full-featured web proxy cache" -HOMEPAGE="http://www.squid-cache.org/" +HOMEPAGE="https://www.squid-cache.org/" MY_PV_MAJOR=$(ver_cut 1) # Upstream patch ID for the most recent bug-fixed update to the formal release. #r=-20181117-r0022167 r= if [[ -z ${r} ]]; then - SRC_URI="http://static.squid-cache.org/Versions/v${MY_PV_MAJOR}/${P}.tar.xz" + SRC_URI=" + http://static.squid-cache.org/Versions/v${MY_PV_MAJOR}/${P}.tar.xz + https://dev.gentoo.org/~juippis/distfiles/squid-6.9-memleak_fix.patch + verify-sig? ( http://static.squid-cache.org/Versions/v${MY_PV_MAJOR}/${P}.tar.xz.asc ) + " else - SRC_URI="http://static.squid-cache.org/Versions/v${MY_PV_MAJOR}/${P}${r}.tar.bz2" + SRC_URI="http://static.squid-cache.org/Versions/v${MY_PV_MAJOR}/${P}${r}.tar.bz2 + https://dev.gentoo.org/~juippis/distfiles/squid-6.9-memleak_fix.patch" S="${S}${r}" fi LICENSE="GPL-2+" SLOT="0" -KEYWORDS="~alpha amd64 arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~riscv ~sparc x86" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86" IUSE="caps gnutls pam ldap samba sasl kerberos nis radius ssl snmp selinux logrotate test ecap" IUSE+=" esi ssl-crtd mysql postgres sqlite systemd perl qos tproxy +htcp valgrind +wccp +wccpv2" RESTRICT="!test? ( test )" @@ -72,12 +78,13 @@ BDEPEND=" dev-lang/perl ecap? ( virtual/pkgconfig ) test? ( dev-util/cppunit ) + verify-sig? ( sec-keys/openpgp-keys-squid ) " PATCHES=( "${FILESDIR}"/${PN}-6.2-gentoo.patch "${FILESDIR}"/${PN}-4.17-use-system-libltdl.patch - "${FILESDIR}"/${PN}-6.4-gcc14-algorithm.patch + "${DISTDIR}"/${PN}-6.9-memleak_fix.patch ) pkg_pretend() { @@ -87,6 +94,15 @@ pkg_pretend() { fi } +src_unpack() { + if use verify-sig ; then + # Needed for downloaded patch (which is unsigned, which is fine) + verify-sig_verify_detached "${DISTDIR}"/${P}.tar.xz{,.asc} + fi + + default +} + src_prepare() { default @@ -349,14 +365,14 @@ src_install() { fi newconfd "${FILESDIR}"/squid.confd-r2 squid - newinitd "${FILESDIR}"/squid.initd-r6 squid + newinitd "${FILESDIR}"/squid.initd-r7 squid if use logrotate ; then insinto /etc/logrotate.d - newins "${FILESDIR}"/squid.logrotate squid + newins "${FILESDIR}"/squid.logrotate-r1 squid else exeinto /etc/cron.weekly - newexe "${FILESDIR}"/squid.cron squid.cron + newexe "${FILESDIR}"/squid.cron-r1 squid.cron fi diropts -m0750 -o squid -g squid |