[arch-commits] Commit in squid/repos (16 files)
Dave Reisner
dreisner at archlinux.org
Sat Jun 9 22:30:45 UTC 2012
Date: Saturday, June 9, 2012 @ 18:30:45
Author: dreisner
Revision: 161335
archrelease: copy trunk to staging-i686, staging-x86_64
Added:
squid/repos/staging-i686/
squid/repos/staging-i686/PKGBUILD
(from rev 161334, squid/trunk/PKGBUILD)
squid/repos/staging-i686/squid
(from rev 161334, squid/trunk/squid)
squid/repos/staging-i686/squid.conf.d
(from rev 161334, squid/trunk/squid.conf.d)
squid/repos/staging-i686/squid.cron
(from rev 161334, squid/trunk/squid.cron)
squid/repos/staging-i686/squid.install
(from rev 161334, squid/trunk/squid.install)
squid/repos/staging-i686/squid.pam
(from rev 161334, squid/trunk/squid.pam)
squid/repos/staging-i686/squid.service
(from rev 161334, squid/trunk/squid.service)
squid/repos/staging-x86_64/
squid/repos/staging-x86_64/PKGBUILD
(from rev 161334, squid/trunk/PKGBUILD)
squid/repos/staging-x86_64/squid
(from rev 161334, squid/trunk/squid)
squid/repos/staging-x86_64/squid.conf.d
(from rev 161334, squid/trunk/squid.conf.d)
squid/repos/staging-x86_64/squid.cron
(from rev 161334, squid/trunk/squid.cron)
squid/repos/staging-x86_64/squid.install
(from rev 161334, squid/trunk/squid.install)
squid/repos/staging-x86_64/squid.pam
(from rev 161334, squid/trunk/squid.pam)
squid/repos/staging-x86_64/squid.service
(from rev 161334, squid/trunk/squid.service)
------------------------------+
staging-i686/PKGBUILD | 94 +++++++++++++++++++++++++++++++++++++++++
staging-i686/squid | 48 ++++++++++++++++++++
staging-i686/squid.conf.d | 4 +
staging-i686/squid.cron | 9 +++
staging-i686/squid.install | 26 +++++++++++
staging-i686/squid.pam | 4 +
staging-i686/squid.service | 13 +++++
staging-x86_64/PKGBUILD | 94 +++++++++++++++++++++++++++++++++++++++++
staging-x86_64/squid | 48 ++++++++++++++++++++
staging-x86_64/squid.conf.d | 4 +
staging-x86_64/squid.cron | 9 +++
staging-x86_64/squid.install | 26 +++++++++++
staging-x86_64/squid.pam | 4 +
staging-x86_64/squid.service | 13 +++++
14 files changed, 396 insertions(+)
Copied: squid/repos/staging-i686/PKGBUILD (from rev 161334, squid/trunk/PKGBUILD)
===================================================================
--- staging-i686/PKGBUILD (rev 0)
+++ staging-i686/PKGBUILD 2012-06-09 22:30:45 UTC (rev 161335)
@@ -0,0 +1,94 @@
+# $Id$
+# Maintainer: Kevin Piche <kevin at archlinux.org>
+# Contributor: Tom Newsom <Jeepster at gmx.co.uk>
+
+pkgname=squid
+pkgver=3.1.20
+pkgrel=2
+pkgdesc="A full-featured Web proxy cache server."
+arch=('i686' 'x86_64')
+url="http://www.squid-cache.org"
+depends=('openssl' 'pam' 'cron' 'perl' 'libltdl')
+makedepends=('libcap')
+license=('GPL')
+backup=('etc/squid/squid.conf'
+ 'etc/squid/mime.conf'
+ 'etc/conf.d/squid')
+install=squid.install
+source=("http://www.squid-cache.org/Versions/v3/3.1/$pkgname-$pkgver.tar.bz2"
+ 'squid'
+ 'squid.conf.d'
+ 'squid.pam'
+ 'squid.cron'
+ 'squid.service')
+md5sums=('c4d733a383c0508fd0746d64a2d7278a'
+ '02f7b5bd793f778e40834fd6457d2199'
+ '2383772ef94efddc7b920628bc7ac5b0'
+ '270977cdd9b47ef44c0c427ab9034777'
+ 'b499c2b725aefd7bd60bec2f1a9de392'
+ '20e00e1aa1198786795f3da32db3c1d8')
+
+build() {
+ cd "$pkgname-$pkgver"
+
+ # gcc 4.6 doesn't support -fhuge-objects.
+ sed '/^ HUGE_OBJECT_FLAG=/ s/"-fhuge-objects"//' -i configure
+
+ # fix cache_dir, cache_dir size, and effective group.
+ sed '/^DEFAULT_SWAP_DIR/ s@/cache@/cache/squid@' -i src/Makefile.in
+ sed '/^#cache_dir/ s/100/256/
+ /^NAME: cache_effective_group/ {n;n;s/none/proxy/}' -i src/cf.data.pre
+
+ ./configure \
+ --prefix=/usr \
+ --datadir=/usr/share/squid \
+ --sysconfdir=/etc/squid \
+ --libexecdir=/usr/lib/squid \
+ --localstatedir=/var \
+ --with-logdir=/var/log/squid \
+ --with-pidfile=/run/squid.pid \
+ --enable-auth="basic,digest,ntlm" \
+ --enable-removal-policies="lru,heap" \
+ --enable-digest-auth-helpers="password" \
+ --enable-storeio="aufs,ufs,diskd" \
+ --enable-basic-auth-helpers="getpwnam,YP,NCSA,SMB,MSNT,PAM,multi-domain-NTLM" \
+ --enable-external-acl-helpers="ip_user,unix_group,wbinfo_group" \
+ --enable-ntlm-auth-helpers="smb_lm,fakeauth,no_check" \
+ --enable-delay-pools \
+ --enable-arp-acl \
+ --enable-ssl \
+ --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-filedescriptors=4096 \
+ --with-large-files \
+ --enable-arp-acl \
+ --with-default-user=proxy \
+ --enable-async-io \
+ --enable-truncate
+
+ make
+}
+
+package() {
+ make -C "$pkgname-$pkgver" DESTDIR="$pkgdir" install
+
+ install -Dm755 "$srcdir"/squid "$pkgdir"/etc/rc.d/squid
+ install -Dm755 "$srcdir"/squid.cron "$pkgdir"/etc/cron.weekly/squid
+ install -Dm644 "$srcdir"/squid.conf.d "$pkgdir"/etc/conf.d/squid
+ install -Dm644 "$srcdir"/squid.pam "$pkgdir"/etc/pam.d/squid
+
+ install -Dm644 "$srcdir/squid.service" "$pkgdir/usr/lib/systemd/system/squid.service"
+
+ # random unneeded empty dir...
+ rmdir "$pkgdir/usr/include"
+}
+
+# vim: ts=2 sw=2 et ft=sh
Copied: squid/repos/staging-i686/squid (from rev 161334, squid/trunk/squid)
===================================================================
--- staging-i686/squid (rev 0)
+++ staging-i686/squid 2012-06-09 22:30:45 UTC (rev 161335)
@@ -0,0 +1,48 @@
+#!/bin/bash
+
+# source application-specific settings
+[[ -f /etc/conf.d/squid ]] && . /etc/conf.d/squid
+
+. /etc/rc.conf
+. /etc/rc.d/functions
+
+pidfile=/run/squid.pid
+{ read -r PID </run/squid.pid; } 2>/dev/null
+if [[ $pid && ! /proc/$pid/exe -ef /usr/sbin/squid ]]; then
+ rm /run/squid.pid
+fi
+
+case $1 in
+ start)
+ stat_busy "Starting squid"
+ if [[ $PID ]] || ! squid $SQUID_ARGS; then
+ stat_fail
+ else
+ add_daemon squid
+ stat_done
+ fi
+ ;;
+
+ stop)
+ stat_busy "Stopping squid"
+ if [[ -z $PID ]] || ! squid -k shutdown &>/dev/null; then
+ stat_fail
+ else
+ # squid takes forever to shutdown all its listening FDs
+ while [[ /proc/$PID/exe -ef /usr/sbin/squid ]]; do
+ stat_append "."
+ sleep 3
+ done
+ rm_daemon squid
+ stat_done
+ fi
+ ;;
+
+ restart)
+ $0 stop
+ $0 start
+ ;;
+ *)
+ echo "usage: $0 {start|stop|restart}"
+esac
+exit 0
Copied: squid/repos/staging-i686/squid.conf.d (from rev 161334, squid/trunk/squid.conf.d)
===================================================================
--- staging-i686/squid.conf.d (rev 0)
+++ staging-i686/squid.conf.d 2012-06-09 22:30:45 UTC (rev 161335)
@@ -0,0 +1,4 @@
+#
+# Parameters to be passed to squid
+#
+SQUID_ARGS="-sYC"
Copied: squid/repos/staging-i686/squid.cron (from rev 161334, squid/trunk/squid.cron)
===================================================================
--- staging-i686/squid.cron (rev 0)
+++ staging-i686/squid.cron 2012-06-09 22:30:45 UTC (rev 161335)
@@ -0,0 +1,9 @@
+#!/bin/sh
+
+# exit without error if no pidfile exists
+{ read pid </run/squid.pid; } 2>/dev/null || exit 0
+
+# make sure found PID really is a squid process
+if [ /proc/$pid/exec -ef /usr/sbin/squid ]; then
+ /usr/sbin/squid -k rotate
+fi
Copied: squid/repos/staging-i686/squid.install (from rev 161334, squid/trunk/squid.install)
===================================================================
--- staging-i686/squid.install (rev 0)
+++ staging-i686/squid.install 2012-06-09 22:30:45 UTC (rev 161335)
@@ -0,0 +1,26 @@
+post_install() {
+ if [ -z "$(grep ^proxy: /etc/group)" ]; then
+ usr/sbin/groupadd -g 15 proxy &>/dev/null
+ fi
+
+ id proxy &>/dev/null || \
+ usr/sbin/useradd -u 15 -g proxy -d /var/empty proxy
+
+ chown proxy.proxy var/{cache,log}/squid
+
+# cat << EOF
+#Release notes: http://www.squid-cache.org/Versions/v3/3.1/RELEASENOTES.html
+#EOF
+}
+
+post_upgrade() {
+ post_install $1
+}
+
+pre_remove() {
+ usr/sbin/userdel proxy &> /dev/null
+ if [ ! -z "$(grep ^proxy: /etc/group)" ]; then
+ usr/sbin/groupdel proxy &>/dev/null
+ fi
+}
+
Copied: squid/repos/staging-i686/squid.pam (from rev 161334, squid/trunk/squid.pam)
===================================================================
--- staging-i686/squid.pam (rev 0)
+++ staging-i686/squid.pam 2012-06-09 22:30:45 UTC (rev 161335)
@@ -0,0 +1,4 @@
+#/etc/pam.d/squid
+#
+auth required pam_unix.so
+account required pam_unix.so
Copied: squid/repos/staging-i686/squid.service (from rev 161334, squid/trunk/squid.service)
===================================================================
--- staging-i686/squid.service (rev 0)
+++ staging-i686/squid.service 2012-06-09 22:30:45 UTC (rev 161335)
@@ -0,0 +1,13 @@
+[Unit]
+Description=Web Proxy Cache Server
+After=network.target
+
+[Service]
+Type=forking
+PIDFile=/run/squid.pid
+ExecStart=/usr/sbin/squid -sYC
+ExecStop=/usr/sbin/squid -k shutdown
+ExecReload=/usr/sbin/squid -k reconfigure
+
+[Install]
+WantedBy=multi-user.target
Copied: squid/repos/staging-x86_64/PKGBUILD (from rev 161334, squid/trunk/PKGBUILD)
===================================================================
--- staging-x86_64/PKGBUILD (rev 0)
+++ staging-x86_64/PKGBUILD 2012-06-09 22:30:45 UTC (rev 161335)
@@ -0,0 +1,94 @@
+# $Id$
+# Maintainer: Kevin Piche <kevin at archlinux.org>
+# Contributor: Tom Newsom <Jeepster at gmx.co.uk>
+
+pkgname=squid
+pkgver=3.1.20
+pkgrel=2
+pkgdesc="A full-featured Web proxy cache server."
+arch=('i686' 'x86_64')
+url="http://www.squid-cache.org"
+depends=('openssl' 'pam' 'cron' 'perl' 'libltdl')
+makedepends=('libcap')
+license=('GPL')
+backup=('etc/squid/squid.conf'
+ 'etc/squid/mime.conf'
+ 'etc/conf.d/squid')
+install=squid.install
+source=("http://www.squid-cache.org/Versions/v3/3.1/$pkgname-$pkgver.tar.bz2"
+ 'squid'
+ 'squid.conf.d'
+ 'squid.pam'
+ 'squid.cron'
+ 'squid.service')
+md5sums=('c4d733a383c0508fd0746d64a2d7278a'
+ '02f7b5bd793f778e40834fd6457d2199'
+ '2383772ef94efddc7b920628bc7ac5b0'
+ '270977cdd9b47ef44c0c427ab9034777'
+ 'b499c2b725aefd7bd60bec2f1a9de392'
+ '20e00e1aa1198786795f3da32db3c1d8')
+
+build() {
+ cd "$pkgname-$pkgver"
+
+ # gcc 4.6 doesn't support -fhuge-objects.
+ sed '/^ HUGE_OBJECT_FLAG=/ s/"-fhuge-objects"//' -i configure
+
+ # fix cache_dir, cache_dir size, and effective group.
+ sed '/^DEFAULT_SWAP_DIR/ s@/cache@/cache/squid@' -i src/Makefile.in
+ sed '/^#cache_dir/ s/100/256/
+ /^NAME: cache_effective_group/ {n;n;s/none/proxy/}' -i src/cf.data.pre
+
+ ./configure \
+ --prefix=/usr \
+ --datadir=/usr/share/squid \
+ --sysconfdir=/etc/squid \
+ --libexecdir=/usr/lib/squid \
+ --localstatedir=/var \
+ --with-logdir=/var/log/squid \
+ --with-pidfile=/run/squid.pid \
+ --enable-auth="basic,digest,ntlm" \
+ --enable-removal-policies="lru,heap" \
+ --enable-digest-auth-helpers="password" \
+ --enable-storeio="aufs,ufs,diskd" \
+ --enable-basic-auth-helpers="getpwnam,YP,NCSA,SMB,MSNT,PAM,multi-domain-NTLM" \
+ --enable-external-acl-helpers="ip_user,unix_group,wbinfo_group" \
+ --enable-ntlm-auth-helpers="smb_lm,fakeauth,no_check" \
+ --enable-delay-pools \
+ --enable-arp-acl \
+ --enable-ssl \
+ --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-filedescriptors=4096 \
+ --with-large-files \
+ --enable-arp-acl \
+ --with-default-user=proxy \
+ --enable-async-io \
+ --enable-truncate
+
+ make
+}
+
+package() {
+ make -C "$pkgname-$pkgver" DESTDIR="$pkgdir" install
+
+ install -Dm755 "$srcdir"/squid "$pkgdir"/etc/rc.d/squid
+ install -Dm755 "$srcdir"/squid.cron "$pkgdir"/etc/cron.weekly/squid
+ install -Dm644 "$srcdir"/squid.conf.d "$pkgdir"/etc/conf.d/squid
+ install -Dm644 "$srcdir"/squid.pam "$pkgdir"/etc/pam.d/squid
+
+ install -Dm644 "$srcdir/squid.service" "$pkgdir/usr/lib/systemd/system/squid.service"
+
+ # random unneeded empty dir...
+ rmdir "$pkgdir/usr/include"
+}
+
+# vim: ts=2 sw=2 et ft=sh
Copied: squid/repos/staging-x86_64/squid (from rev 161334, squid/trunk/squid)
===================================================================
--- staging-x86_64/squid (rev 0)
+++ staging-x86_64/squid 2012-06-09 22:30:45 UTC (rev 161335)
@@ -0,0 +1,48 @@
+#!/bin/bash
+
+# source application-specific settings
+[[ -f /etc/conf.d/squid ]] && . /etc/conf.d/squid
+
+. /etc/rc.conf
+. /etc/rc.d/functions
+
+pidfile=/run/squid.pid
+{ read -r PID </run/squid.pid; } 2>/dev/null
+if [[ $pid && ! /proc/$pid/exe -ef /usr/sbin/squid ]]; then
+ rm /run/squid.pid
+fi
+
+case $1 in
+ start)
+ stat_busy "Starting squid"
+ if [[ $PID ]] || ! squid $SQUID_ARGS; then
+ stat_fail
+ else
+ add_daemon squid
+ stat_done
+ fi
+ ;;
+
+ stop)
+ stat_busy "Stopping squid"
+ if [[ -z $PID ]] || ! squid -k shutdown &>/dev/null; then
+ stat_fail
+ else
+ # squid takes forever to shutdown all its listening FDs
+ while [[ /proc/$PID/exe -ef /usr/sbin/squid ]]; do
+ stat_append "."
+ sleep 3
+ done
+ rm_daemon squid
+ stat_done
+ fi
+ ;;
+
+ restart)
+ $0 stop
+ $0 start
+ ;;
+ *)
+ echo "usage: $0 {start|stop|restart}"
+esac
+exit 0
Copied: squid/repos/staging-x86_64/squid.conf.d (from rev 161334, squid/trunk/squid.conf.d)
===================================================================
--- staging-x86_64/squid.conf.d (rev 0)
+++ staging-x86_64/squid.conf.d 2012-06-09 22:30:45 UTC (rev 161335)
@@ -0,0 +1,4 @@
+#
+# Parameters to be passed to squid
+#
+SQUID_ARGS="-sYC"
Copied: squid/repos/staging-x86_64/squid.cron (from rev 161334, squid/trunk/squid.cron)
===================================================================
--- staging-x86_64/squid.cron (rev 0)
+++ staging-x86_64/squid.cron 2012-06-09 22:30:45 UTC (rev 161335)
@@ -0,0 +1,9 @@
+#!/bin/sh
+
+# exit without error if no pidfile exists
+{ read pid </run/squid.pid; } 2>/dev/null || exit 0
+
+# make sure found PID really is a squid process
+if [ /proc/$pid/exec -ef /usr/sbin/squid ]; then
+ /usr/sbin/squid -k rotate
+fi
Copied: squid/repos/staging-x86_64/squid.install (from rev 161334, squid/trunk/squid.install)
===================================================================
--- staging-x86_64/squid.install (rev 0)
+++ staging-x86_64/squid.install 2012-06-09 22:30:45 UTC (rev 161335)
@@ -0,0 +1,26 @@
+post_install() {
+ if [ -z "$(grep ^proxy: /etc/group)" ]; then
+ usr/sbin/groupadd -g 15 proxy &>/dev/null
+ fi
+
+ id proxy &>/dev/null || \
+ usr/sbin/useradd -u 15 -g proxy -d /var/empty proxy
+
+ chown proxy.proxy var/{cache,log}/squid
+
+# cat << EOF
+#Release notes: http://www.squid-cache.org/Versions/v3/3.1/RELEASENOTES.html
+#EOF
+}
+
+post_upgrade() {
+ post_install $1
+}
+
+pre_remove() {
+ usr/sbin/userdel proxy &> /dev/null
+ if [ ! -z "$(grep ^proxy: /etc/group)" ]; then
+ usr/sbin/groupdel proxy &>/dev/null
+ fi
+}
+
Copied: squid/repos/staging-x86_64/squid.pam (from rev 161334, squid/trunk/squid.pam)
===================================================================
--- staging-x86_64/squid.pam (rev 0)
+++ staging-x86_64/squid.pam 2012-06-09 22:30:45 UTC (rev 161335)
@@ -0,0 +1,4 @@
+#/etc/pam.d/squid
+#
+auth required pam_unix.so
+account required pam_unix.so
Copied: squid/repos/staging-x86_64/squid.service (from rev 161334, squid/trunk/squid.service)
===================================================================
--- staging-x86_64/squid.service (rev 0)
+++ staging-x86_64/squid.service 2012-06-09 22:30:45 UTC (rev 161335)
@@ -0,0 +1,13 @@
+[Unit]
+Description=Web Proxy Cache Server
+After=network.target
+
+[Service]
+Type=forking
+PIDFile=/run/squid.pid
+ExecStart=/usr/sbin/squid -sYC
+ExecStop=/usr/sbin/squid -k shutdown
+ExecReload=/usr/sbin/squid -k reconfigure
+
+[Install]
+WantedBy=multi-user.target
More information about the arch-commits
mailing list