squid: update to 3.0.STABLE10

This commit is contained in:
Juergen Daubert 2008-10-28 13:54:04 +01:00
parent a94ed4d4e8
commit 59e746d092
6 changed files with 45 additions and 143 deletions

View File

@ -3,17 +3,18 @@ drwxr-xr-x root/root etc/rc.d/
-rwxr-xr-x root/root etc/rc.d/squid
drwxr-xr-x root/root etc/squid/
-rw-r--r-- root/root etc/squid/cachemgr.conf
-rw-r--r-- root/root etc/squid/cachemgr.conf.default
-rw-r--r-- root/root etc/squid/mime.conf
-rw-r--r-- root/root etc/squid/mime.conf.default
-rw-r--r-- root/root etc/squid/squid.conf
-rw-r--r-- root/root etc/squid/squid.conf.default
drwxr-xr-x root/root usr/
drwxr-xr-x root/root usr/bin/
-rwxr-xr-x root/root usr/bin/cossdump
-rwxr-xr-x root/root usr/bin/squidclient
drwxr-xr-x root/root usr/lib/
drwxr-xr-x root/root usr/lib/squid/
-rwxr-xr-x root/root usr/lib/squid/cachemgr.cgi
-rwxr-xr-x root/root usr/lib/squid/logfile-daemon
-rwxr-xr-x root/root usr/lib/squid/diskd
-rwxr-xr-x root/root usr/lib/squid/unlinkd
drwxr-xr-x root/root usr/man/
drwxr-xr-x root/root usr/man/man8/
@ -30,6 +31,7 @@ drwxr-xr-x root/root usr/share/squid/errors/
-rw-r--r-- root/root usr/share/squid/errors/ERR_CANNOT_FORWARD
-rw-r--r-- root/root usr/share/squid/errors/ERR_CONNECT_FAIL
-rw-r--r-- root/root usr/share/squid/errors/ERR_DNS_FAIL
-rw-r--r-- root/root usr/share/squid/errors/ERR_ESI
-rw-r--r-- root/root usr/share/squid/errors/ERR_FORWARDING_DENIED
-rw-r--r-- root/root usr/share/squid/errors/ERR_FTP_DISABLED
-rw-r--r-- root/root usr/share/squid/errors/ERR_FTP_FAILURE
@ -39,6 +41,7 @@ drwxr-xr-x root/root usr/share/squid/errors/
-rw-r--r-- root/root usr/share/squid/errors/ERR_FTP_PUT_ERROR
-rw-r--r-- root/root usr/share/squid/errors/ERR_FTP_PUT_MODIFIED
-rw-r--r-- root/root usr/share/squid/errors/ERR_FTP_UNAVAILABLE
-rw-r--r-- root/root usr/share/squid/errors/ERR_ICAP_FAILURE
-rw-r--r-- root/root usr/share/squid/errors/ERR_INVALID_REQ
-rw-r--r-- root/root usr/share/squid/errors/ERR_INVALID_RESP
-rw-r--r-- root/root usr/share/squid/errors/ERR_INVALID_URL

View File

@ -1,3 +1,3 @@
9ce54d2a0a7959df4470178e7aac5e27 squid
5d495d285b3b951a5859c660463e9832 squid-2.7.STABLE5.tar.bz2
c3c10b52cfc18823de9d11ccc823ab9c squid.conf
cfd37717230220a9f47177594e235f18 squid-3.0.STABLE10.tar.bz2
6cdb98d3b46feceb841b1d5cc2d93b62 squid-config.patch

View File

@ -3,23 +3,26 @@
# Maintainer: Juergen Daubert, juergen dot daubert at t-online dot de
name=squid
version=2.7.STABLE5
version=3.0.STABLE10
release=1
source=(http://www.squid-cache.org/Versions/v2/2.7/$name-$version.tar.bz2 \
squid.conf squid)
source=(http://www.squid-cache.org/Versions/v3/3.0/$name-$version.tar.bz2 \
squid squid-config.patch)
build () {
cd $name-$version
patch -p1 -i $SRC/squid-config.patch
./configure --prefix=/usr \
--mandir=/usr/man \
--sysconfdir=/etc/squid \
--libexecdir=/usr/lib/squid \
--localstatedir=/var/squid \
--localstatedir=/var \
--datadir=/usr/share/squid \
--with-default-user=squid \
--enable-linux-netfilter \
--enable-err-languages=English \
--enable-epoll \
--enable-storeio=ufs,aufs,coss \
--enable-storeio=ufs,aufs,diskd \
--with-large-files \
--with-pthreads \
--with-aufs-threads=16
@ -27,14 +30,10 @@ build () {
make all
make DESTDIR=$PKG install
rm $PKG/usr/bin/RunCache
rm -r $PKG/{var/squid/logs,etc/squid/mime.conf.default}
rm $PKG/usr/bin/{RunCache,RunAccel}
mv $PKG/usr/share/squid/errors/{English/*,.}
rm -r $PKG/usr/share/squid/errors/English
rm -r $PKG/usr/share/squid/errors/{English,templates}
mkdir -p $PKG/var/log/squid
chmod 0700 $PKG/var/{squid,log/squid}
chown -R squid:squid $PKG/var/{squid,log/squid}
install -d -m 0700 -o squid -g squid $PKG/var/{log/squid,squid}
install -D -m 755 $SRC/squid $PKG/etc/rc.d/squid
install -m 644 $SRC/squid.conf $PKG/etc/squid
}

View File

@ -1,4 +1,4 @@
README for squid 2.6
README for squid 3.x
REQUIREMENTS
@ -15,44 +15,3 @@ PRECAUTION
1. all directories used by squid must be chown to
squid.squid or to the effective cache user/group defined
in squid.conf
2. With version 2.5 the location of the squid executable has
changed from /usr/bin to /usr/sbin. Don't reject the new
startscript /etc/rc.d/squid.
CONFIGURATION OPTIONS
There are many other configuration options for squid. This
port should be a very basic one, read the docs for the more
advanced options. George Adamopoulos sent me an email with
some suggestions, which I'll not include in the port, but
put here because of his useful comments:
--enable-delay-pools
Enable delay pools to limit bandwidth usage. You need to
enable the option in order to use Squid to limit bandwith
usage. It will give fair bandwith usage for everybody.
In my case, I don't want one person sucking all of the
available bandwidth by downloading a big movie, causing
others to suffer.
--enable-storeio=diskd,ufs
Enable diskd. Improve disk I/O performance. According to
the Squid FAQ, if you enable diskd you can gain a 400%
increase of perfomance. However, you would need to
recompile the kernel because your operating system must
support message queues and shared memory.
--enable-removal-policies
Build support for the list of removal policies.
By default, Squid uses LRU, but there are two better
policies: GDSF and LFUDA. See the Squid config for a more
detailed explanation.
--disable-ident-lookups
Removes code that performs Ident (RFC 931) lookups.
Not really important. By the way, if you do transparent
proxy, ident lookups won't work.
--enable-snmp
You can monitor Squid with mrtg or rrdtool.

25
squid/squid-config.patch Normal file
View File

@ -0,0 +1,25 @@
diff -Nru squid-3.0.STABLE9.orig/src/Makefile.in squid-3.0.STABLE9/src/Makefile.in
--- squid-3.0.STABLE9.orig/src/Makefile.in 2008-10-20 18:11:15.000000000 +0200
+++ squid-3.0.STABLE9/src/Makefile.in 2008-10-20 18:03:53.000000000 +0200
@@ -2633,17 +2633,17 @@
DEFAULT_CONFIG_FILE = $(sysconfdir)/squid.conf
DEFAULT_MIME_TABLE = $(sysconfdir)/mime.conf
DEFAULT_DNSSERVER = $(libexecdir)/`echo dnsserver | sed '$(transform);s/$$/$(EXEEXT)/'`
-DEFAULT_LOG_PREFIX = $(localstatedir)/logs
+DEFAULT_LOG_PREFIX = $(localstatedir)/log/squid
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_PID_FILE = $(DEFAULT_LOG_PREFIX)/squid.pid
-DEFAULT_SWAP_DIR = $(localstatedir)/cache
+DEFAULT_PID_FILE = $(localstatedir)/run/squid.pid
+DEFAULT_SWAP_DIR = $(localstatedir)/squid
DEFAULT_PINGER = $(libexecdir)/`echo pinger | sed '$(transform);s/$$/$(EXEEXT)/'`
DEFAULT_UNLINKD = $(libexecdir)/`echo unlinkd | sed '$(transform);s/$$/$(EXEEXT)/'`
DEFAULT_DISKD = $(libexecdir)/`echo diskd | sed '$(transform);s/$$/$(EXEEXT)/'`
DEFAULT_ICON_DIR = $(datadir)/icons
-DEFAULT_ERROR_DIR = $(datadir)/errors/@ERR_DEFAULT_LANGUAGE@
+DEFAULT_ERROR_DIR = $(datadir)/errors
DEFAULT_MIB_PATH = $(datadir)/mib.txt
DEFAULT_HOSTS = @OPT_DEFAULT_HOSTS@

View File

@ -1,84 +0,0 @@
# /etc/squid/squid.conf
#
# configuration file for squid
# for all options see /etc/squid/squid.conf.default
#
# Socket address where squid will listen
http_port 3128
# email-address of cache manager who will receive
# mail if cache dies
cache_mgr root
# Effective user/group squid will run
cache_effective_user squid
cache_effective_group squid
# Directory where cache swap files will be stored
# coos: size 100MB, max. 5K/object
# aufs: size 1000MB, 16/256 subdirecctories
#cache_dir coss /var/squid/coss_01 100 block-size=512 max-size=5120
cache_dir aufs /var/squid 1000 16 256
# Log files
cache_access_log /var/log/squid/access.log
cache_log /var/log/squid/cache.log
cache_store_log /var/log/squid/store.log
cache_swap_log /var/squid/swap_%s.log
# Where the error-messages and icons are stored
icon_directory /usr/share/squid/icons
error_directory /usr/share/squid/errors
# Filename to write the process-id to
pid_filename /var/run/squid.pid
# Refresh pattern
refresh_pattern ^ftp: 1440 20% 10080
refresh_pattern ^gopher: 1440 0% 1440
refresh_pattern . 0 20% 4320
# Do not cache dynamic content
hierarchy_stoplist cgi-bin ?
refresh_pattern -i (/cgi-bin/|\?) 0 0% 0
# Minimum access lists
acl all src 0.0.0.0/0.0.0.0
acl manager proto cache_object
acl localhost src 127.0.0.1/255.255.255.255
acl SSL_ports port 443
acl Safe_ports port 80 # http
acl Safe_ports port 21 # ftp
acl Safe_ports port 443 # https, snews
acl Safe_ports port 70 # gopher
acl Safe_ports port 210 # wais
acl Safe_ports port 1025-65535 # unregistered ports
acl Safe_ports port 280 # http-mgmt
acl Safe_ports port 488 # gss-http
acl Safe_ports port 591 # filemaker
acl Safe_ports port 777 # multiling http
acl CONNECT method CONNECT
# ACL for local network
acl local_net src 192.168.0.0/24
# Allow cachemgr access from localhost and local network
http_access allow manager localhost
http_access allow manager local_net
http_access deny manager
# Deny requests to unknown ports
http_access deny !Safe_ports
# Deny CONNECT to other than SSL ports
http_access deny CONNECT !SSL_ports
# Allow access from localhost and local network
http_access allow localhost
http_access allow local_net
# Deny the rest
http_access deny all
# End of file