diff options
-rw-r--r-- | .SRCINFO | 44 | ||||
-rw-r--r-- | PKGBUILD | 113 | ||||
-rw-r--r-- | squid-rotate.service | 9 | ||||
-rw-r--r-- | squid-rotate.timer | 10 | ||||
-rw-r--r-- | squid.pam | 5 | ||||
-rw-r--r-- | squid.service | 13 | ||||
-rw-r--r-- | squid.sysusers | 2 | ||||
-rw-r--r-- | squid.tmpfiles | 4 |
8 files changed, 200 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..c96ea2bfabd9 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,44 @@ +pkgbase = squid5 + pkgdesc = Full-featured Web proxy cache server with the support SSL, eCAP, iCAP-client. Include patches for normal work with long url`s and CDN. + pkgver = 5.0.0 + pkgrel = 5 + url = http://www.squid-cache.org + arch = x86_64 + license = GPL + makedepends = krb5 + depends = libecap + depends = pam + depends = perl + depends = libltdl + depends = libcap + depends = nettle + depends = gnutls + depends = libnsl + conflicts = squid + conflicts = squid4 + conflicts = squid5 + options = emptydirs + backup = etc/squid/squid.conf + backup = etc/squid/cachemgr.conf + backup = etc/squid/errorpage.css + backup = etc/squid/mime.conf + source = http://www.squid-cache.org/Versions/v5/squid-5.0.0-20180810-rc321737.tar.xz + source = http://www.squid-cache.org/Versions/v5/squid-5.0.0-20180810-rc321737.tar.xz.asc + source = squid.pam + source = squid.service + source = squid.tmpfiles + source = squid.sysusers + source = squid-rotate.service + source = squid-rotate.timer + validpgpkeys = B06884EDB779C89B044E64E3CD6DBF8EF3B17D3E + sha256sums = SKIP + sha256sums = SKIP + sha256sums = SKIP + sha256sums = SKIP + sha256sums = SKIP + sha256sums = SKIP + sha256sums = SKIP + sha256sums = SKIP + +pkgname = squid5 + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..d03ab28fbd84 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,113 @@ +pkgname=squid5 +pkgver=5.0.0 +_pkgver=5.0.0-20180810-rc321737 +pkgrel=5 +pkgdesc='Full-featured Web proxy cache server with the support SSL, eCAP, iCAP-client. Include patches for normal work with long url`s and CDN.' +arch=('x86_64') +url='http://www.squid-cache.org' +depends=('libecap' 'pam' 'perl' 'libltdl' 'libcap' 'nettle' 'gnutls' 'libnsl') +makedepends=('krb5') +conflicts=('squid' 'squid4' 'squid5') +license=('GPL') +options=('emptydirs') +backup=('etc/squid/squid.conf' + 'etc/squid/cachemgr.conf' + 'etc/squid/errorpage.css' + 'etc/squid/mime.conf') +validpgpkeys=('B06884EDB779C89B044E64E3CD6DBF8EF3B17D3E') +source=("http://www.squid-cache.org/Versions/v$pkgrel/squid-$_pkgver.tar.xz"{,.asc} + 'squid.pam' + 'squid.service' + 'squid.tmpfiles' + 'squid.sysusers' + 'squid-rotate.service' + 'squid-rotate.timer') + +sha256sums=('SKIP' + 'SKIP' + 'SKIP' + 'SKIP' + 'SKIP' + 'SKIP' + 'SKIP' + 'SKIP') + + +prepare() { + cd "$srcdir/squid-$_pkgver" + msg "Preparing Squid..." + msg2 "Getting the client_side_request patch..." + wget https://raw.githubusercontent.com/bar0metr/squid/master/client_side_request.patch + msg2 "Patching Squid..." + patch -p0 -i client_side_request.patch + msg2 "Done!" +} + +build() { + cd "$srcdir/squid-$_pkgver" + + PKG_CONFIG_PATH=/usr/lib/openssl-1.0/pkgconfig \ + ./configure \ + --prefix=/usr \ + --sbindir=/usr/bin \ + --datadir=/usr/share/squid \ + --sysconfdir=/etc/squid \ + --libexecdir=/usr/lib/squid \ + --localstatedir=/var \ + --with-logdir=/var/log/squid \ + --with-pidfile=/run/squid.pid \ + --enable-ecap \ + --enable-icap-client \ + --enable-auth \ + --enable-auth-basic \ + --enable-auth-ntlm \ + --enable-auth-digest \ + --enable-auth-negotiate \ + --enable-removal-policies="lru,heap" \ + --enable-storeio="aufs,ufs,diskd,rock" \ + --enable-delay-pools \ + --enable-arp-acl \ + --with-openssl \ + --enable-snmp \ + --enable-linux-netfilter \ + --enable-ident-lookups \ + --enable-useragent-log \ + --enable-cache-digests \ + --enable-referer-log \ + --enable-arp-acl \ + --enable-htcp \ + --enable-carp \ + --enable-epoll \ + --with-large-files \ + --enable-arp-acl \ + --with-default-user=proxy \ + --enable-async-io \ + --enable-truncate \ + --enable-icap-client \ + --enable-ssl-crtd \ + --disable-arch-native \ + --disable-strict-error-checking \ + --enable-wccpv2 \ + --enable-ssl-crtd + make -j$(nproc) +} + +package() { + cd "$srcdir" + + make -C "squid-$_pkgver" DESTDIR="$pkgdir" install + install -Dm644 "$srcdir/squid.pam" "$pkgdir/etc/pam.d/squid" + install -Dm644 "$srcdir/squid.tmpfiles" "$pkgdir/usr/lib/tmpfiles.d/squid.conf" + install -Dm644 "$srcdir/squid.sysusers" "$pkgdir/usr/lib/sysusers.d/squid.conf" + install -Dm644 "$srcdir/squid.service" \ + "$pkgdir/usr/lib/systemd/system/squid.service" + install -Dm644 "$srcdir/squid-rotate.service" \ + "$pkgdir/usr/lib/systemd/system/squid-rotate.service" + install -Dm644 "$srcdir/squid-rotate.timer" \ + "$pkgdir/usr/lib/systemd/system/squid-rotate.timer" +# install -dm755 "$pkgdir/usr/lib/systemd/system/timers.target.wants" +# ln -s ../squid-rotate.timer \ +# "$pkgdir/usr/lib/systemd/system/timers.target.wants/squid-rotate.timer" + rm -rf "$pkgdir/run" "$pkgdir"/var/{cache,log,run} +} + diff --git a/squid-rotate.service b/squid-rotate.service new file mode 100644 index 000000000000..b29006930689 --- /dev/null +++ b/squid-rotate.service @@ -0,0 +1,9 @@ +[Unit] +Description=Squid Rotate + +[Service] +Type=oneshot +ExecStart=/usr/bin/squid -k rotate +Nice=19 +IOSchedulingClass=best-effort +IOSchedulingPriority=7 diff --git a/squid-rotate.timer b/squid-rotate.timer new file mode 100644 index 000000000000..132f94113a7f --- /dev/null +++ b/squid-rotate.timer @@ -0,0 +1,10 @@ +[Unit] +Description=Weekly rotation of squid log files + +[Timer] +OnCalendar=weekly +AccuracySec=1d +Persistent=true + +[Install] +WantedBy=timers.target diff --git a/squid.pam b/squid.pam new file mode 100644 index 000000000000..14d1141afbba --- /dev/null +++ b/squid.pam @@ -0,0 +1,5 @@ +#/etc/pam.d/squid +# +auth required pam_unix.so +account required pam_unix.so + diff --git a/squid.service b/squid.service new file mode 100644 index 000000000000..1db8860e581f --- /dev/null +++ b/squid.service @@ -0,0 +1,13 @@ +[Unit] +Description=Web Proxy Cache Server +After=network.target + +[Service] +Type=forking +PIDFile=/run/squid.pid +ExecStart=/usr/bin/squid -sYC +ExecStop=/usr/bin/squid -k shutdown +ExecReload=/usr/bin/squid -k reconfigure + +[Install] +WantedBy=multi-user.target diff --git a/squid.sysusers b/squid.sysusers new file mode 100644 index 000000000000..3769022c164b --- /dev/null +++ b/squid.sysusers @@ -0,0 +1,2 @@ +u proxy 15 - /var/empty + diff --git a/squid.tmpfiles b/squid.tmpfiles new file mode 100644 index 000000000000..edbe765215fe --- /dev/null +++ b/squid.tmpfiles @@ -0,0 +1,4 @@ +d /run/squid 0755 proxy proxy - +d /var/cache/squid 0755 proxy proxy - +d /var/log/squid 0755 proxy proxy - + |