Revision: 14818
Author: roelf.diedericks
Date: Wed Nov  3 16:18:37 2010
Log: Fixes issue #130

http://code.google.com/p/lusca-cache/source/detail?r=14818

Added:
 /branches/LUSCA_HEAD/debian
 /branches/LUSCA_HEAD/debian/NEWS.Debian
 /branches/LUSCA_HEAD/debian/README.Debian
 /branches/LUSCA_HEAD/debian/changelog
 /branches/LUSCA_HEAD/debian/conffiles
 /branches/LUSCA_HEAD/debian/conffiles.lusca-cgi
 /branches/LUSCA_HEAD/debian/config
 /branches/LUSCA_HEAD/debian/control
 /branches/LUSCA_HEAD/debian/copyright
 /branches/LUSCA_HEAD/debian/default.lusca
 /branches/LUSCA_HEAD/debian/files
 /branches/LUSCA_HEAD/debian/logrotate
 /branches/LUSCA_HEAD/debian/lusca-cgi.8
 /branches/LUSCA_HEAD/debian/lusca.overrides
 /branches/LUSCA_HEAD/debian/lusca.rc
 /branches/LUSCA_HEAD/debian/lusca.resolvconf
 /branches/LUSCA_HEAD/debian/patched
 /branches/LUSCA_HEAD/debian/patches
 /branches/LUSCA_HEAD/debian/patches/00README
 /branches/LUSCA_HEAD/debian/patches/00list
 /branches/LUSCA_HEAD/debian/postinst
 /branches/LUSCA_HEAD/debian/postrm
 /branches/LUSCA_HEAD/debian/postrm.lusca-cgi
 /branches/LUSCA_HEAD/debian/preinst
 /branches/LUSCA_HEAD/debian/prerm
 /branches/LUSCA_HEAD/debian/prerm.lusca-cgi
 /branches/LUSCA_HEAD/debian/rules
 /branches/LUSCA_HEAD/debian/substvars
 /branches/LUSCA_HEAD/debian/templates
 /branches/LUSCA_HEAD/debian/watch

=======================================
--- /dev/null
+++ /branches/LUSCA_HEAD/debian/NEWS.Debian     Wed Nov  3 16:18:37 2010
@@ -0,0 +1,6 @@
+lusca (0.1-HEAD-1) unstable; urgency=low
+
+   Debianisation of Lusca HEAD
+
+ -- Roelf Diedericks <[email protected]>  Mon Oct 18 12:09:37 SAST 2010
+
=======================================
--- /dev/null
+++ /branches/LUSCA_HEAD/debian/README.Debian   Wed Nov  3 16:18:37 2010
@@ -0,0 +1,62 @@
+
+The lusca homepage is at http://www.lusca.org/
+
+
+**** Configuration File ****
+
+The upstream squid.conf contains ACLs so that squid denies all
+requests by default, forcing you to configure it first. The Debian
+package allows access from 'localhost'. To use it you need to
+configure your browser to use proxyserver 'localhost', port 3128.
+
+Please see /usr/share/doc/lusca/example/squid.conf for documentation
+on the configuration file.
+
+You can increase the maximum number of filedescriptors that squid
+uses through /etc/default/lusca.
+
+You can also run lusca with a userid different from root from the beginning
+(no just dropping root privileges after running). To do so add a CHUID=user
+line in /etc/default/lusca where 'user' is the user you want lusca to run
+as. Please adjust permission accordingly, expecially for squid.conf that
+is installed as root with permission set to 0600.
+
+The default /etc/squid/squid.conf file turns off icmp, htcp and snmp.
+
+The following flags were passed to the squid Makefile
+to customize some locations:
+
+bindir       = /usr/sbin
+libexecdir   = /usr/lib/squid
+sysconfdir   = /etc/squid
+logdir       = /var/log/squid
+docdir       = /usr/share/doc/lusca
+datadir      = /usr/share/lusca
+
+DEFAULTS     = logdir=$(logdir) \
+DEFAULT_CACHE_LOG=$(logdir)/cache.log \
+DEFAULT_ACCESS_LOG=$(logdir)/access.log \
+DEFAULT_STORE_LOG=$(logdir)/store.log \
+DEFAULT_PID_FILE=/var/run/squid.pid \
+DEFAULT_SWAP_DIR=/var/spool/squid \
+DEFAULT_ICON_DIR=$(datadir)/icons \
+DEFAULT_ERROR_DIR=$(datadir)/errors/English \
+DEFAULT_MIME_TABLE=$(datadir)/mime.conf \
+DEFAULT_MIB_PATH=$(datadir)/mib.txt
+
+So lusca uses the following paths:
+
+- configfile:  /etc/squid/squid.conf
+- binary:      /usr/sbin/squid
+- private dir: /usr/share/squid (mime.conf, error messages, modules)
+- logfiles:    /var/log/squid
+- cache:       /var/spool/squid
+
+**** TroubleShooting ****
+
+If you are in doubt as to why lusca doesn't cache a certain
+object or webpage, you can try the "cacheability service" at
+http://www.ircache.net/cgi-bin/cacheability.py . It will check
+an URL for you and tell you if it is or isn't cachable and why.
+
+-- Roelf Diedericks (TheRoDent) <[email protected]> Thu, 04 Nov 2010 00:12:28 +02
=======================================
--- /dev/null
+++ /branches/LUSCA_HEAD/debian/changelog       Wed Nov  3 16:18:37 2010
@@ -0,0 +1,7 @@
+lusca (0.1-HEAD-5) unstable; urgency=low
+
+  * Lusca - Head debianized
+
+ -- Roelf Diedericks (TheRoDent) <[email protected]> Thu, 04 Nov 2010 00:14:17 +0200
+
+
=======================================
--- /dev/null
+++ /branches/LUSCA_HEAD/debian/conffiles       Wed Nov  3 16:18:37 2010
@@ -0,0 +1,3 @@
+/etc/init.d/squid
+/etc/logrotate.d/squid
+/etc/resolvconf/update-libc.d/lusca
=======================================
--- /dev/null
+++ /branches/LUSCA_HEAD/debian/conffiles.lusca-cgi     Wed Nov  3 16:18:37 2010
@@ -0,0 +1,1 @@
+/etc/squid/cachemgr.conf
=======================================
--- /dev/null
+++ /branches/LUSCA_HEAD/debian/config  Wed Nov  3 16:18:37 2010
@@ -0,0 +1,73 @@
+#!/bin/sh -e
+
+#
+#       check for old config-style in squid.conf
+#       (include "ufs" (Unix File System) after "cache_dir".)
+#
+
+# Source debconf library.
+. /usr/share/debconf/confmodule
+db_version 2.0
+
+grepconf () {
+       w="        " # space tab
+       sq=/etc/squid/squid.conf
+       # sed is cool.
+       res=`sed -ne '
+               s/^'$1'['"$w"']\+\([^'"$w"']\+\).*$/\1/p;
+               t end;
+               d;
+               :end q' < $sq`
+       [ -n "$res" ] || res=$2
+       echo "$res"
+}
+
+grepconf2 () {
+       w="        " # space tab
+       sq=/etc/squid/squid.conf
+       # sed is cool.
+       res=`sed -ne '
+               s/^'$1'['"$w"']\+[^'"$w"']\+['"$w"']\+\([^'"$w"']\+\).*$/\1/p;
+               t end;
+               d;
+               :end q' < $sq`
+       [ -n "$res" ] || res=$2
+       echo "$res"
+}
+
+conf_fix_check_cache_dir () {
+
+  if [ -f "/etc/squid/squid.conf" ]; then
+
+    sq=/etc/squid/squid.conf
+    w="     " # space tab
+    grep -q "^cache_dir[$w]*[^/$w]" /etc/squid/squid.conf && return
+    umask 022
+
+ if grep -q '^dns_children\|^dns_defnames\|^cache_dns_program' $sq || ( grep -q '^cache_dir' $sq && ! grep -q '^cache_dir.*ufs' $sq ); then
+
+       # ask debconf-question here
+       db_input high lusca/fix_lines || true
+       db_go
+
+    fi
+
+  fi
+}
+
+conf_fix_cachedir_perms () {
+
+  if [ -f "/etc/squid/squid.conf" ]; then
+       dir=`grepconf2 cache_dir /var/spool/squid`
+       usr=`grepconf cache_effective_user proxy`
+       grp=`grepconf cache_effective_group proxy`
+
+ if [ "$(/usr/bin/stat -L -c %U $dir)" != "$usr" ] || [ "$(/usr/bin/stat -L -c %G $dir)" != "$grp" ] ; then
+         db_input high "lusca/fix_cachedir_perms" || true
+         db_go
+       fi
+  fi
+}
+
+conf_fix_check_cache_dir
+conf_fix_cachedir_perms
=======================================
--- /dev/null
+++ /branches/LUSCA_HEAD/debian/control Wed Nov  3 16:18:37 2010
@@ -0,0 +1,42 @@
+Source: lusca
+Section: web
+Priority: optional
+Maintainer: Roelf Diedericks <[email protected]>
+Homepage: http://www.lusca.org/
+Standards-Version: 3.7.3
+Build-Depends: sharutils, dpatch (>= 2.0.9), po-debconf, libcap-dev, automake
+
+Package: lusca
+Architecture: any
+Section: web
+Priority: optional
+Pre-Depends: debconf (>= 1.2.9) | debconf-2.0
+Depends: ${shlibs:Depends}, netbase, adduser, logrotate (>= 3.5.4-1), lusca-common (>= ${source:Version}), lsb-base
+Conflicts: squid
+Replaces: squid
+Suggests: lusca-cgi, logcheck-database, resolvconf (>= 0.40), smbclient, winbind
+Description: Internet object cache (WWW proxy cache)
+ This package provides the Lusca Cache
+ Lusca is a fork of the Squid-2 development tree.
+ The Lusca project aims to fix the shortcomings in the Squid-2 codebase whilst
+ maintaining the the Squid-2 functionality and stability.
+
+Package: lusca-common
+Architecture: all
+Section: web
+Conflicts: squid-common
+Replaces: squid-common
+Priority: optional
+Description: Lusca object cache (WWW proxy cache) - common files
+ This package contains common files (errors and icons)
+
+Package: lusca-cgi
+Architecture: any
+Section: web
+Conflicts: squid-cgi
+Replaces: squid-cgi
+Priority: optional
+Depends: apache2 | httpd, ${shlibs:Depends}, debconf | debconf-2.0
+Description: Lusca cache manager CGI program
+ This CGI program can be used to query and administrate a Lusca proxy
+ cache through your web browser.
=======================================
--- /dev/null
+++ /branches/LUSCA_HEAD/debian/copyright       Wed Nov  3 16:18:37 2010
@@ -0,0 +1,25 @@
+By accepting this notice, you agree to be bound by the following
+agreements:
+
+This software product, SQUID, is developed by a team of individuals,
+and copyrighted (C) 2001 by the Regents of the University of
+California, with all rights reserved.  UCSD administered the NLANR
+Cache grants, NCR 9616602 and NCR 9521745 under which most of this
+code was developed.
+
+This program is free software; you can redistribute it and/or modify it
+under the terms of the GNU General Public License (version 2) as
+published by the Free Software Foundation.  It is distributed in the
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even the
+implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+PURPOSE.  See the GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License along
+with this program; if not, write to:
+
+                       The Free Software Foundation
+                       59 Temple Place
+                       Suite 330
+                       Boston, MA 02111, USA
+
+Or contact [email protected]
=======================================
--- /dev/null
+++ /branches/LUSCA_HEAD/debian/default.lusca   Wed Nov  3 16:18:37 2010
@@ -0,0 +1,8 @@
+#
+# /etc/default/lusca Configuration settings for the Lusca proxy server.
+#
+
+# Max. number of filedescriptors to use. You can increase this on a busy
+# cache to a maximum of (currently) 65536 filedescriptors. Default is 65536.
+SQUID_MAXFD=65536
+
=======================================
--- /dev/null
+++ /branches/LUSCA_HEAD/debian/files   Wed Nov  3 16:18:37 2010
@@ -0,0 +1,3 @@
+lusca-common_0.1-HEAD-5_all.deb web optional
+lusca_0.1-HEAD-5_amd64.deb web optional
+lusca-cgi_0.1-HEAD-5_amd64.deb web optional
=======================================
--- /dev/null
+++ /branches/LUSCA_HEAD/debian/logrotate       Wed Nov  3 16:18:37 2010
@@ -0,0 +1,18 @@
+#
+#      Logrotate fragment for squid.
+#
+/var/log/squid/*.log {
+       daily
+       compress
+       delaycompress
+       rotate 2
+       missingok
+       nocreate
+       sharedscripts
+       firstaction
+               test ! -x /usr/sbin/sarg-maint || /usr/sbin/sarg-maint
+       endscript
+       lastaction
+               test ! -e /var/run/squid.pid || /usr/sbin/squid -k rotate
+       endscript
+}
=======================================
--- /dev/null
+++ /branches/LUSCA_HEAD/debian/lusca-cgi.8     Wed Nov  3 16:18:37 2010
@@ -0,0 +1,13 @@
+.TH LUSCA-CGI 8 "October 2010" "Lusca CGI Interface" "Debian Linux"
+.SH NAME
+lusca-cgi \- CGI interface to lusca
+.SH SYNOPSIS
+.B /usr/lib/cgi-bin/squid-cgi
+.SH DESCRIPTION
+.B Squid-cgi
+is a CGI program that can be used as a WWW-based frontend to the
+squid/lusca object cache. It should be run as a CGI script through your
+WWW server.
+.PP
+.SH "SEE ALSO"
+.BR squid (8)
=======================================
--- /dev/null
+++ /branches/LUSCA_HEAD/debian/lusca.overrides Wed Nov  3 16:18:37 2010
@@ -0,0 +1,7 @@
+lusca: non-standard-file-perm usr/share/doc/lusca/examples/squid.conf 0600 != 0644
+lusca: setgid-binary usr/lib/squid/pam_auth 2750 proxy/shadow
+lusca: setgid-binary usr/lib/squid/getpwnam_auth 2750 proxy/shadow
+lusca: executable-is-not-world-readable usr/lib/squid/pam_auth 2750
+lusca: executable-is-not-world-readable usr/lib/squid/getpwnam_auth 2750
+lusca: non-standard-dir-perm var/log/squid/ 0750 != 0755
+lusca: non-standard-dir-perm var/spool/squid/ 0750 != 0755
=======================================
--- /dev/null
+++ /branches/LUSCA_HEAD/debian/lusca.rc        Wed Nov  3 16:18:37 2010
@@ -0,0 +1,181 @@
+#! /bin/sh
+#
+# lusca Startup script for the LUSCA HTTP proxy-cache.
+#
+# Version:     @(#)squid.rc  2.20  01-Oct-2001  [email protected]
+#
+### BEGIN INIT INFO
+# Provides:          lusca
+# Required-Start:    $local_fs $network
+# Required-Stop:     $local_fs $network
+# Should-Start:      $named
+# Should-Stop:       $named
+# Default-Start:     2 3 4 5
+# Default-Stop:      0 1 6
+# Short-Description: Lusca/Squid HTTP Proxy
+### END INIT INFO
+
+NAME=squid
+DAEMON=/usr/sbin/squid
+LIB=/usr/lib/squid
+PIDFILE=/var/run/$NAME.pid
+SQUID_ARGS="-D -YC"
+
+#check for either 'version' of the default file
+[ ! -f /etc/default/squid ] || . /etc/default/squid
+#prefer the Lusca one...
+[ ! -f /etc/default/lusca ] || . /etc/default/lusca
+
+. /lib/lsb/init-functions
+
+PATH=/bin:/usr/bin:/sbin:/usr/sbin
+
+[ -x $DAEMON ] || exit 0
+
+grepconf () {
+       w="        " # space tab
+       sq=/etc/squid/squid.conf
+       # sed is cool.
+       res=`sed -ne '
+               s/^'$1'['"$w"']\+\([^'"$w"']\+\).*$/\1/p;
+               t end;
+               d;
+               :end q' < $sq`
+       [ -n "$res" ] || res=$2
+       echo "$res"
+}
+
+grepconf2 () {
+       w="        " # space tab
+       sq=/etc/squid/$NAME.conf
+       # sed is cool.
+       res=`sed -ne '
+               s/^'$1'['"$w"']\+[^'"$w"']\+['"$w"']\+\([^'"$w"']\+\).*$/\1/p;
+               t end;
+               d;
+               :end q' < $sq`
+       [ -n "$res" ] || res=$2
+       echo "$res"
+}
+
+#
+#      Try to increase the # of filedescriptors we can open.
+#   Default to 8196 FD's which is rather "modern" compared
+#   to the old squid defaults of 1024 and will stop a lot of
+#   useless bug reporting
+#
+maxfds () {
+       [ -n "$SQUID_MAXFD" ] || SQUID_MAXFD=8196
+       [ -f /proc/sys/fs/file-max ] || return 0
+       global_file_max=`cat /proc/sys/fs/file-max`
+       minimal_file_max=$(($SQUID_MAXFD + 4096))
+       if [ "$global_file_max" -lt $minimal_file_max ]
+       then
+               echo $minimal_file_max > /proc/sys/fs/file-max
+       fi
+       ulimit -n $SQUID_MAXFD
+}
+
+start () {
+       cdr=`grepconf2 cache_dir /var/spool/$NAME`
+       ctp=`grepconf cache_dir ufs`
+
+       case "$cdr" in
+               [0-9]*)
+ log_failure_msg "lusca: squid.conf contains 2.2.5 syntax - not starting!"
+                       log_end_msg 1
+                       exit 1
+                       ;;
+       esac
+
+       #
+    # Create spool dirs if they don't exist.
+    #
+       if [ -d "$cdr" -a ! -d "$cdr/00" ] || [ "$ctp" = "coss" -a ! -f "$cdr" ]
+       then
+               log_warning_msg "Creating squid cache structure"
+               $DAEMON $SQUID_ARGS -z
+       fi
+
+       if [ "$CHUID" = "" ]; then
+               CHUID=root
+       fi
+
+       maxfds
+       umask 027
+       start-stop-daemon --quiet --start \
+               --pidfile $PIDFILE \
+               --chuid $CHUID \
+               --exec $DAEMON -- $SQUID_ARGS < /dev/null
+       return $?
+}
+
+stop () {
+       PID=`cat $PIDFILE 2>/dev/null`
+       start-stop-daemon --stop --quiet --pidfile $PIDFILE --name squid
+       #
+       #       Now we have to wait until squid has _really_ stopped.
+       #
+       sleep 2
+       if test -n "$PID" && kill -0 $PID 2>/dev/null
+       then
+               log_action_begin_msg " Waiting"
+               cnt=0
+               while kill -0 $PID 2>/dev/null
+               do
+                       cnt=`expr $cnt + 1`
+                       if [ $cnt -gt 24 ]
+                       then
+                               log_action_end_msg 1
+                               return 1
+                       fi
+                       sleep 5
+                       log_action_cont_msg ""
+               done
+               log_action_end_msg 0
+               return 0
+       else
+               return 0
+       fi
+}
+
+case "$1" in
+    start)
+       log_daemon_msg "Starting Lusca/Squid HTTP proxy" "squid"
+       if start ; then
+               log_end_msg $?
+       else
+               log_end_msg $?
+       fi
+       ;;
+    stop)
+       log_daemon_msg "Stopping Lusca/Squid HTTP proxy" "squid"
+       if stop ; then
+               log_end_msg $?
+       else
+               log_end_msg $?
+       fi
+       ;;
+    reload|force-reload)
+       log_action_msg "Reloading Lusca/Squid configuration files"
+       start-stop-daemon --stop --signal 1 \
+               --pidfile $PIDFILE --quiet --exec $DAEMON
+       log_action_end_msg 0
+       ;;
+    restart)
+       log_daemon_msg "Restarting Lusca/Squid HTTP proxy" "squid"
+       stop
+       if start ; then
+               log_end_msg $?
+       else
+               log_end_msg $?
+       fi
+       ;;
+    *)
+       echo "Usage: /etc/init.d/$NAME {start|stop|reload|force-reload|restart}"
+       exit 3
+       ;;
+esac
+
+exit 0
+
=======================================
--- /dev/null
+++ /branches/LUSCA_HEAD/debian/lusca.resolvconf        Wed Nov  3 16:18:37 2010
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+# Make Lusca aware of changes to resolv.conf
+/etc/init.d/squid reload || true
=======================================
--- /dev/null
+++ /branches/LUSCA_HEAD/debian/patches/00README        Wed Nov  3 16:18:37 2010
@@ -0,0 +1,6 @@
+Debian Specific patches for Lusca
+------------------------------------------
+
+[currently none]
+
+
=======================================
--- /dev/null
+++ /branches/LUSCA_HEAD/debian/postinst        Wed Nov  3 16:18:37 2010
@@ -0,0 +1,196 @@
+#! /bin/sh
+
+# Source debconf library.
+. /usr/share/debconf/confmodule
+db_version 2.0
+
+grepconf () {
+       w="        " # space tab
+       sq=/etc/squid/squid.conf
+       # sed is cool.
+       res=`sed -ne '
+               s/^'$1'['"$w"']\+\([^'"$w"']\+\).*$/\1/p;
+               t end;
+               d;
+               :end q' < $sq`
+       [ -n "$res" ] || res=$2
+       echo "$res"
+}
+
+grepconf2 () {
+       w="        " # space tab
+       sq=/etc/squid/squid.conf
+       # sed is cool.
+       res=`sed -ne '
+               s/^'$1'['"$w"']\+[^'"$w"']\+['"$w"']\+\([^'"$w"']\+\).*$/\1/p;
+               t end;
+               d;
+               :end q' < $sq`
+       [ -n "$res" ] || res=$2
+       echo "$res"
+}
+
+#
+#      Fix old style "cache_dir /var/spool/squid 100 16 256"
+#      to include "aufs" (Async Unix File System) after "cache_dir".
+#
+conf_fix_cache_dir () {
+
+   # get value for squid/fix_lines
+   db_get squid/fix_lines
+
+   # handle it!
+   if [ "$RET" = "true" ] ; then
+      sed -e 's/^cache_dir\(.*\)$/cache_dir aufs\1/' \
+      -e 's/^\(dns_children.*\)$/#NOT IN 2.3#\1/' \
+      -e 's/^\(dns_defnames.*\)$/#NOT IN 2.3#\1/' \
+      -e 's/^\(cache_dns_program.*\)$/#NOT IN 2.3#\1/' \
+      < /etc/squid/squid.conf > /etc/squid/squid.conf.TMP && \
+      mv /etc/squid/squid.conf.TMP /etc/squid/squid.conf
+   fi
+
+}
+#
+#      We moved from /etc/cron.d/squid to /etc/logrotate.d/squid
+#
+conf_fix_logrotate () {
+       c=/etc/cron.daily/squid
+       if [ -f $c ]
+       then
+               ##db_text high squid/logrotate || true
+               ##db_go
+               cp -a $c $c.disabled
+               ( head -1 $c
+                 echo "#"
+                 echo "# DISABLED - lusca now uses /etc/logrotate.d/squid"
+                 echo "#            please remove this file."
+                 echo "#"
+               ) > $c.disabled
+               tail +2 $c >> $c.disabled
+               rm -f $c
+       fi
+}
+
+
+#
+#
+#
+conf_fix_http_port () {
+       w="        " # space tab
+       if ! grep -q "^http_port[$w]*" /etc/squid/squid.conf
+       then
+               if grep -q "^# http_port[$w]*" /etc/squid/squid.conf
+               then
+               sed -e 's/^# http_port\(.*\)$/http_port\1/' \
+                       < /etc/squid/squid.conf > /etc/squid/squid.conf.TMP && \
+               mv /etc/squid/squid.conf.TMP /etc/squid/squid.conf
+               else
+                       echo >> /etc/squid/squid.conf
+                       echo "http_port 3128" >> /etc/squid/squid.conf
+               fi
+       fi
+}
+
+
+case "$1" in
+       configure)
+               if [ -e /etc/squid/conffile-moved ] ; then
+                       rm /etc/squid/conffile-moved
+               fi
+
+               if [ ! -f /etc/squid/squid.conf ]; then
+                       cp /usr/share/doc/squid/examples/squid.conf \
+                               /etc/squid/squid.conf
+                       chmod 0600 /etc/squid/squid.conf
+               fi
+
+               # Check for old incompatible configs
+               case "$2" in
+                       2.[12].*)
+                               conf_fix_cache_dir
+                               FIXLINES="$RET"
+                               ;;
+               esac
+               conf_fix_logrotate
+               conf_fix_http_port
+
+               #
+               # Chown the directories.
+               #
+               dir=`grepconf2 cache_dir /var/spool/squid`
+        usr=`grepconf cache_effective_user proxy`
+               grp=`grepconf cache_effective_group proxy`
+
+               if [ "$FIXLINES" = "false" ]; then
+                 echo "squid.conf contains 2.2.5 syntax - not doing anything!"
+               else
+ if [ "$(/usr/bin/stat -c %U $dir)" != "$usr" ] || [ "$(/usr/bin/stat -c %G $dir)" != "$grp" ] ; then
+                               db_get "squid/fix_cachedir_perms"
+                               if [ "$RET" = "true" ] ; then
+                               chown $usr:$grp $dir -R
+                               fi
+                               db_reset "squid/fix_cachedir_perms"
+                       fi
+ if [ "$(/usr/bin/stat -c %U /var/log/squid)" != "$usr" ] || [ "$(/usr/bin/stat -c %G /var/log/squid)" != "$grp" ] ; then
+                               # Check if there is an override of ownership
+ if [ "$(/usr/sbin/dpkg-statoverride --list /var/log/squid)" = "" ] ; then
+                                       chown $usr:$grp /var/log/squid -R
+                               fi
+                       fi
+               fi
+
+               #
+               # Create spool dirs if they don't exist.
+               #
+               if [ -d "$dir" -a ! -d "$dir/00" ]
+               then
+                       echo "Creating lusca/squid spool directory structure"
+                       /usr/sbin/squid -z
+               fi
+
+               #
+               # Install /etc/default/lusca file if it doesn't
+               # exist yet.
+               #
+               if [ ! -f /etc/default/lusca ]
+               then
+                       cp /usr/share/doc/lusca/examples/default.lusca \
+                               /etc/default/lusca
+                       chmod 644 /etc/default/lusca
+               fi
+
+               #
+               # If winbind is installed, add proxy user to winbindd_priv
+               # group
+               #
+               getent group winbindd_priv >/dev/null 2>&1 &&
+                       adduser --quiet proxy winbindd_priv
+
+               ;;
+       abort-upgrade|abort-remove|abort-deconfigure)
+               ;;
+       *)
+               #
+               #       Unknown action - do nothing.
+               #
+               exit 0
+               ;;
+esac
+
+db_stop
+
+#
+#      Update links if needed and start squid.
+#
+update-rc.d squid defaults 30 >/dev/null
+
+cd /
+
+if [ "$FIXLINES" = "false" ]; then
+ echo "squid.conf contains 2.2.5 syntax - cache_dir directive - not starting "
+  echo "Run 'dpkg-reconfigure -plow squid' to fix this automatically,"
+  echo "or fix the 'cache_dir'-entry in your squid.conf manually."
+  echo "See documentation in /usr/share/doc/lusca for more instructions."
+else
+  invoke-rc.d squid restart
+fi
=======================================
--- /dev/null
+++ /branches/LUSCA_HEAD/debian/postrm  Wed Nov  3 16:18:37 2010
@@ -0,0 +1,43 @@
+#! /bin/sh
+
+case "$1" in
+       remove)
+               ;;
+       purge)
+               if [ -e /usr/share/debconf/confmodule ]; then
+                       # Source debconf library.
+                       . /usr/share/debconf/confmodule
+                       # Remove my changes to the db.
+                       db_purge
+               fi
+               echo "Purging startup links .."
+               rm -f /etc/init.d/squid
+               update-rc.d squid remove > /dev/null
+               echo "Purging logfiles .."
+               rm -rf /var/log/squid
+               if [ -f /etc/squid/squid.conf ]; then
+                       echo "Removing the config-file .."
+                       rm -f /etc/squid/squid.conf
+               fi
+               if [ -f /etc/default/lusca ]; then
+                       rm -f /etc/default/lusca
+               fi
+
+               #
+               # We do not remove /var/spool/squid because that might
+               # take a lot of time. Most of the time it is on a seperate
+               # disk anyway and it is faster to do a mkfs on it..
+               #
+               echo "Remove the proxy cache in /var/spool/squid yourself!"
+               ;;
+       failed-upgrade)
+ if (dpkg --compare-versions "$2" le '2.5.4-4' && [ -e /etc/squid/conffile-moved ])
+               then
+                       mv /etc/squid/squid.conf /etc/squid.conf
+                       rm /etc/squid/conffile-moved
+               fi
+               ;;
+       upgrade|abort-install|abort-upgrade|disappear)
+               ;;
+esac
+
=======================================
--- /dev/null
+++ /branches/LUSCA_HEAD/debian/postrm.lusca-cgi        Wed Nov  3 16:18:37 2010
@@ -0,0 +1,8 @@
+#! /bin/sh
+
+if [ "$1" = "purge" -a -e /usr/share/debconf/confmodule ]; then
+       # Source debconf library.
+       . /usr/share/debconf/confmodule
+       # Remove my changes to the db.
+       db_purge
+fi
=======================================
--- /dev/null
+++ /branches/LUSCA_HEAD/debian/preinst Wed Nov  3 16:18:37 2010
@@ -0,0 +1,53 @@
+#! /bin/sh
+
+# Source debconf library.
+. /usr/share/debconf/confmodule
+db_version 2.0
+
+case "$1" in
+       upgrade|install-upgrade)
+               ;;
+       abort-upgrade)
+               exit 0
+               ;;
+esac
+
+#
+# See if we upgraded from < 2.5.5-3 and need to move config file
+#
+if ([ "$1" = upgrade ] && dpkg --compare-versions "$2" le '2.5.5-3' )
+then
+       if [ -e /etc/squid.conf ]
+       then
+               if [ ! -d /etc/squid ]
+               then
+                       mkdir /etc/squid
+               fi
+               if [ -e /etc/squid/squid.conf ]
+               then
+                       mv /etc/squid/squid.conf /etc/squid/squid.conf.dpkg-old
+               fi
+               mv /etc/squid.conf /etc/squid/squid.conf
+               touch /etc/squid/conffile-moved
+       fi
+fi
+
+#
+# Add the "proxy" user/group to /etc/passwd if needed.
+#
+
+if ! grep -q "^proxy:" /etc/passwd
+then
+       #
+       #       Let's hope that this works; if /var/spool/squid is
+       #       already present this fails :(
+       #
+       adduser --system --home /var/spool/squid --group proxy
+       #
+       # Change the shell so that cron jobs will work.
+       # (They run as root now, but you can never know).
+       #
+       chsh -s /bin/sh proxy
+fi
+
+exit 0
=======================================
--- /dev/null
+++ /branches/LUSCA_HEAD/debian/prerm   Wed Nov  3 16:18:37 2010
@@ -0,0 +1,19 @@
+#!/bin/sh
+
+set -e
+
+case "$1" in
+       remove|remove-in-favour|deconfigure-in-favour)
+               #
+               #       Stop the daemon
+               #
+               invoke-rc.d squid stop
+               ;;
+       upgrade)
+               [ -L /usr/doc/lusca ] && rm -f /usr/doc/lusca
+               ;;
+       failed-upgrade)
+               ;;
+esac
+
+exit 0
=======================================
--- /dev/null
+++ /branches/LUSCA_HEAD/debian/prerm.lusca-cgi Wed Nov  3 16:18:37 2010
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+set -e
+
+case "$1" in
+       remove|upgrade)
+               [ -L /usr/doc/lusca-cgi ] && rm -f /usr/doc/lusca-cgi
+               ;;
+       *)
+               ;;
+esac
+
+exit 0
=======================================
--- /dev/null
+++ /branches/LUSCA_HEAD/debian/rules   Wed Nov  3 16:18:37 2010
@@ -0,0 +1,381 @@
+#! /usr/bin/make -f
+#
+#      debian/rules file for lusca.
+#
+
+# Version.
+package = lusca
+
+# Include dpatch stuff.
+include /usr/share/dpatch/dpatch.make
+
+SHELL  = /bin/bash
+LC_ALL = POSIX
+
+#roelf: debug build
+DEB_BUILD_OPTIONS=nostrip noopt
+
+DEB_HOST_ARCH_CPU := $(shell dpkg-architecture -qDEB_HOST_ARCH_CPU 2>/dev/null) +DEB_HOST_ARCH_OS := $(shell dpkg-architecture -qDEB_HOST_ARCH_OS 2>/dev/null)
+
+CFLAGS = -Wall -g
+INSTALL = install
+INSTALL_FILE    = $(INSTALL) -p    -o root -g root  -m  644
+INSTALL_PROGRAM = $(INSTALL) -p    -o root -g root  -m  755
+INSTALL_SCRIPT  = $(INSTALL) -p    -o root -g root  -m  755
+INSTALL_DIR     = $(INSTALL) -p -d -o root -g root  -m  755
+
+ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
+CFLAGS += -O0
+else
+CFLAGS += -O2
+endif
+
+ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
+INSTALL_PROGRAM += -s
+endif
+
+# Take account of old dpkg-architecture output.
+ifeq ($(DEB_HOST_ARCH_CPU),)
+  DEB_HOST_ARCH_CPU := $(shell dpkg-architecture -qDEB_HOST_GNU_CPU)
+  ifeq ($(DEB_HOST_ARCH_CPU),x86_64)
+    DEB_HOST_ARCH_CPU := amd64
+  endif
+endif
+ifeq ($(DEB_HOST_ARCH_OS),)
+ DEB_HOST_ARCH_OS := $(subst -gnu,,$(shell dpkg-architecture -qDEB_HOST_GNU_SYSTEM))
+  ifeq ($(DEB_HOST_ARCH_OS),gnu)
+    DEB_HOST_ARCH_OS := hurd
+  endif
+endif
+
+tmp         = debian/tmp
+bindir       = /usr/sbin
+libexecdir   = /usr/lib/squid
+sysconfdir   = /etc/squid
+logdir       = /var/log/squid
+docdir       = /usr/share/doc/lusca
+datadir      = /usr/share/lusca
+mibdir       = /usr/share/snmp/mibs
+
+DEFAULTS     = logdir=$(logdir) \
+               DEFAULT_CACHE_LOG=$(logdir)/cache.log \
+               DEFAULT_ACCESS_LOG=$(logdir)/access.log \
+               DEFAULT_STORE_LOG=$(logdir)/store.log \
+               DEFAULT_PID_FILE=/var/run/squid.pid \
+               DEFAULT_SWAP_DIR=/var/spool/squid \
+               DEFAULT_ICON_DIR=$(datadir)/icons \
+               DEFAULT_ERROR_DIR=$(datadir)/errors/English \
+               DEFAULT_MIME_TABLE=$(datadir)/mime.conf \
+               DEFAULT_MIB_PATH=$(mibdir)/SQUID.txt
+
+# The HURD doesn't have pthreads yet.
+ifeq ($(DEB_HOST_ARCH_OS), gnu)
+       with_pthreads = --enable-storeio=aufs,coss,null
+       with_netfilter =
+       with_arp_acl =
+       with_epoll =
+else
+ifeq ($(DEB_HOST_ARCH_OS), kfreebsd)
+       with_pthreads = --enable-async-io --with-pthreads \
+               --enable-storeio=aufs,coss,null
+       with_netfilter =
+       with_arp_acl =
+       with_epoll = --enable-kqueue
+else
+       with_pthreads = --enable-async-io --with-pthreads \
+               --enable-storeio=aufs,coss,null --with-aufs-threads=90
+       with_netfilter = --enable-linux-netfilter --enable-linux-tproxy4
+       with_arp_acl =
+       with_epoll = --enable-epoll
+endif
+endif
+
+# setresuid is broken on sparc
+ifeq ($(DEB_HOST_ARCH_CPU), sparc)
+       opt_ac_cv_func_setresuid = ac_cv_func_setresuid=no
+else
+       opt_ac_cv_func_setresuid = ac_cv_func_setresuid=yes
+endif
+
+define checkdir
+       test -f src/squid.h
+endef
+
+
+# Build the binaries.
+build: patch config.status
+       $(checkdir)
+       $(MAKE) $(DEFAULTS) all
+       # Authentication modules
+       cd helpers/basic_auth/NCSA && make
+ cd helpers/basic_auth/SMB && make SAMBAPREFIX=/usr INSTALLBIN=/usr/lib/squid
+       cd helpers/basic_auth/PAM && make
+       cd helpers/basic_auth/LDAP && make
+       cd helpers/basic_auth/YP && make
+       cd helpers/basic_auth/MSNT && make
+       cd helpers/basic_auth/getpwnam && make
+       cd helpers/digest_auth/password && make
+       cd helpers/digest_auth/ldap && make
+       cd helpers/external_acl/ip_user && make
+       cd helpers/external_acl/ldap_group && make
+       cd helpers/external_acl/session && make
+       cd helpers/external_acl/unix_group && make
+       cd helpers/external_acl/wbinfo_group && make
+       cd helpers/ntlm_auth/SMB && make
+       touch build
+
+# Configure the package.
+config.status:
+
+       # use automake to create ./configure
+       ./bootstrap.sh
+       $(opt_ac_cv_func_setresuid) \
+       ./configure \
+       --enable-stacktraces \
+       --prefix=/usr \
+       --exec_prefix=/usr \
+       --bindir=/usr/sbin --sbindir=/usr/sbin \
+       --libexecdir=/usr/lib/squid \
+       --sysconfdir=$(sysconfdir) \
+       --localstatedir=/var/spool/squid \
+       --datadir=$(datadir) \
+       $(with_pthreads) \
+       $(with_netfilter) \
+       $(with_arp_acl) \
+       $(with_epoll) \
+       --enable-removal-policies=lru,heap \
+       --enable-snmp \
+       --enable-delay-pools \
+       --enable-cache-digests \
+       --enable-underscores \
+       --enable-referer-log \
+       --enable-useragent-log \
+       --enable-auth="basic,digest,ntlm,negotiate" \
+       --enable-carp \
+       --enable-follow-x-forwarded-for \
+       --with-large-files \
+       --with-maxfd=65535 \
+       --enable-http-violations \
+       $(DEB_HOST_ARCH_CPU)-debian-$(DEB_HOST_ARCH_OS)
+
+# Architecture independant files.
+binary-indep:  build checkroot
+       rm -rf $(tmp) debian/files
+       $(checkdir)
+       #
+       #       Build lusca-common package.
+       #
+       $(INSTALL_DIR) $(tmp)/DEBIAN
+       $(INSTALL_DIR) $(tmp)/usr/share/doc/$(package)-common
+       #TODO: need one for lusca
+ #$(INSTALL_FILE) ChangeLog.Cacheboy $(tmp)/usr/share/doc/$(package)-common/changelog + $(INSTALL_FILE) ChangeLog.Cacheboy $(tmp)/usr/share/doc/$(package)-common/changelog
+       $(INSTALL_FILE) debian/changelog \
+               $(tmp)/usr/share/doc/$(package)-common/changelog.Debian
+       $(INSTALL_FILE) debian/copyright $(tmp)/usr/share/doc/$(package)-common
+       $(INSTALL_DIR) $(tmp)/usr/share/$(package)
+       $(INSTALL_DIR) $(tmp)/usr/share/$(package)/errors
+       $(INSTALL_DIR) $(tmp)/usr/share/$(package)/icons
+       $(INSTALL_DIR) $(tmp)/usr/share/snmp/mibs
+       $(INSTALL_FILE) src/mib.txt ./$(tmp)$(mibdir)/SQUID.txt
+       $(INSTALL_FILE) src/mime.conf.default ./$(tmp)$(datadir)/mime.conf
+       #
+       cp -R errors/* ./$(tmp)$(datadir)/errors
+       rm -f ./$(tmp)$(datadir)/errors/Makefile*
+       rm -f ./$(tmp)$(datadir)/errors/list
+       chmod 755 ./$(tmp)$(datadir)/errors/*
+       chmod 644 ./$(tmp)$(datadir)/errors/*/*
+       chown -R root:root ./$(tmp)$(datadir)/errors
+       $(INSTALL_FILE) icons/*.gif ./$(tmp)$(datadir)/icons
+       $(INSTALL_DIR) $(tmp)/usr/share/doc/$(package)
+       $(INSTALL_DIR) $(tmp)/usr/share/doc/$(package)/examples
+       $(INSTALL_FILE) helpers/basic_auth/SMB/README \
+               $(tmp)$(docdir)/README.auth_module.smb_auth
+       umask 022; head -19 helpers/basic_auth/NCSA/ncsa_auth.c > \
+               $(tmp)$(docdir)/README.auth_module.ncsa_auth
+       umask 022; head -56 helpers/basic_auth/PAM/pam_auth.c > \
+               $(tmp)$(docdir)/README.auth_module.pam_auth
+       $(INSTALL_FILE) helpers/basic_auth/MSNT/README.html \
+               $(tmp)$(docdir)/README.auth_module.msnt_auth.html
+       umask 022; head -21 helpers/basic_auth/getpwnam/getpwnam_auth.c > \
+               $(tmp)$(docdir)/README.auth_module.getpwnam_auth
+       umask 022; head -26 helpers/digest_auth/password/digest_pw_auth.c > \
+               $(tmp)$(docdir)/README.auth_module.digest_pw_auth
+       $(INSTALL_FILE) helpers/external_acl/ip_user/README \
+               $(tmp)$(docdir)/README.auth_module.ip_user
+       $(INSTALL_FILE) helpers/external_acl/ip_user/example.conf \
+               $(tmp)$(docdir)/examples/ip_user-example.conf
+       $(INSTALL_FILE) helpers/external_acl/unix_group/README \
+               $(tmp)$(docdir)/README.auth_module.unix_group
+       $(INSTALL_FILE) helpers/negotiate_auth/squid_kerb_auth/readme.txt \
+               $(tmp)$(docdir)/README.squid_kerb_auth
+       dpkg-gencontrol -isp -p$(package)-common
+       dpkg --build $(tmp) ..
+       rm -f debian/substvars
+       rm -rf $(tmp)
+
+# Make a binary package (.deb file)
+binary-arch:   build checkroot
+       #
+       #       Build lusca package.
+       #
+       $(INSTALL_DIR) $(tmp)/DEBIAN
+       $(INSTALL_DIR) $(tmp)/etc/squid
+       $(INSTALL_DIR) $(tmp)/etc/logrotate.d
+       $(INSTALL_DIR) $(tmp)/etc/init.d
+       $(INSTALL_DIR) $(tmp)/etc/resolvconf/update-libc.d
+       $(INSTALL_DIR) $(tmp)/usr/sbin
+       $(INSTALL_DIR) $(tmp)/usr/share/doc/$(package)
+       $(INSTALL_DIR) $(tmp)/usr/share/doc/$(package)/examples
+       $(INSTALL_DIR) $(tmp)/usr/lib/squid
+       $(INSTALL_DIR) $(tmp)/var/{log,spool}
+       install -m 750 -o proxy -g proxy -d $(tmp)/var/log/squid
+       install -m 750 -o proxy -g proxy -d $(tmp)/var/spool/squid
+       $(INSTALL_DIR) $(tmp)/usr/share/man/man8
+       #
+       $(INSTALL_PROGRAM) src/squid $(tmp)/usr/sbin
+
+       $(INSTALL_PROGRAM) src/unlinkd src/logfile-daemon $(tmp)/usr/lib/squid
+ $(INSTALL_PROGRAM) app/ufs_rebuild/ufs_rebuild app/ufs_newfs/ufs_newfs $(tmp)/usr/lib/squid + $(INSTALL_PROGRAM) app/coss_rebuild/coss_rebuild app/coss_newfs/coss_newfs $(tmp)/usr/lib/squid
+       $(INSTALL_FILE) debian/logrotate $(tmp)/etc/logrotate.d/squid
+ $(INSTALL_SCRIPT) debian/lusca.resolvconf $(tmp)/etc/resolvconf/update-libc.d/lusca
+       $(INSTALL_PROGRAM) helpers/basic_auth/SMB/smb_auth $(tmp)$(libexecdir)
+       $(INSTALL_SCRIPT) helpers/basic_auth/SMB/smb_auth.sh $(tmp)$(libexecdir)
+       $(INSTALL_PROGRAM) helpers/basic_auth/NCSA/ncsa_auth $(tmp)$(libexecdir)
+       $(INSTALL_PROGRAM) -m 2754 -o proxy -g shadow \
+               helpers/basic_auth/PAM/pam_auth $(tmp)$(libexecdir)
+       $(INSTALL_PROGRAM) helpers/basic_auth/LDAP/squid_ldap_auth \
+               $(tmp)$(libexecdir)/ldap_auth
+       $(INSTALL_PROGRAM) helpers/basic_auth/YP/yp_auth \
+               $(tmp)$(libexecdir)/yp_auth
+       $(INSTALL_PROGRAM) helpers/basic_auth/MSNT/msnt_auth \
+               $(tmp)$(libexecdir)/msnt_auth
+       $(INSTALL_PROGRAM) -m 2754 -o proxy -g shadow \
+               helpers/basic_auth/getpwnam/getpwname_auth \
+               $(tmp)$(libexecdir)/getpwnam_auth
+       $(INSTALL_PROGRAM) helpers/digest_auth/password/digest_pw_auth \
+               $(tmp)$(libexecdir)/digest_pw_auth
+       $(INSTALL_PROGRAM) helpers/external_acl/ip_user/ip_user_check \
+               $(tmp)$(libexecdir)/ip_user_check
+       $(INSTALL_PROGRAM) helpers/external_acl/ldap_group/squid_ldap_group \
+               $(tmp)$(libexecdir)/squid_ldap_group
+       $(INSTALL_FILE) helpers/external_acl/ldap_group/squid_ldap_group.8 \
+               $(tmp)/usr/share/man/man8/squid_ldap_group.8
+       $(INSTALL_PROGRAM) helpers/external_acl/session/squid_session \
+               $(tmp)$(libexecdir)/squid_session
+       $(INSTALL_FILE) helpers/external_acl/session/squid_session.8 \
+               $(tmp)/usr/share/man/man8/squid_session.8
+       $(INSTALL_PROGRAM) helpers/external_acl/unix_group/squid_unix_group \
+               $(tmp)$(libexecdir)/squid_unix_group
+       $(INSTALL_FILE) helpers/external_acl/unix_group/squid_unix_group.8 \
+               $(tmp)/usr/share/man/man8/squid_unix_group.8
+       $(INSTALL_SCRIPT) helpers/external_acl/wbinfo_group/wbinfo_group.pl \
+               $(tmp)$(libexecdir)/wbinfo_group.pl
+       $(INSTALL_PROGRAM) helpers/ntlm_auth/SMB/ntlm_auth \
+               $(tmp)$(libexecdir)/ntlm_auth
+       # the examples.
+       $(INSTALL_FILE) src/squid.conf.default \
+               $(tmp)/usr/share/doc/$(package)/examples/squid.conf
+       $(INSTALL_FILE) debian/default.lusca\
+               $(tmp)/usr/share/doc/$(package)/examples
+
+       # TODO: needs one for lusca
+       #$(INSTALL_FILE) ChangeLog $(tmp)/usr/share/doc/$(package)/changelog
+ $(INSTALL_FILE) ChangeLog.Cacheboy $(tmp)/usr/share/doc/$(package)/changelog + $(INSTALL_FILE) ChangeLog.Squid $(tmp)/usr/share/doc/$(package)/changelog.squid
+       $(INSTALL_FILE) debian/changelog \
+               $(tmp)/usr/share/doc/$(package)/changelog.Debian
+       $(INSTALL_FILE) debian/README.Debian \
+               $(tmp)/usr/share/doc/$(package)/README.Debian
+       $(INSTALL_FILE) debian/NEWS.Debian \
+               $(tmp)/usr/share/doc/$(package)/NEWS.Debian
+       gzip -9f `find debian/tmp/usr/share/doc/$(package)/* | grep -v examples`
+       $(INSTALL_FILE) debian/copyright $(tmp)/usr/share/doc/$(package)
+       $(INSTALL_FILE) doc/squid.8 $(tmp)/usr/share/man/man8
+       gzip -9f $(tmp)/usr/share/man/man?/*
+       $(INSTALL_SCRIPT) debian/lusca.rc $(tmp)/etc/init.d/squid
+       #
+       $(INSTALL_SCRIPT) debian/preinst $(tmp)/DEBIAN/preinst
+       $(INSTALL_SCRIPT) debian/postinst $(tmp)/DEBIAN/postinst
+       $(INSTALL_SCRIPT) debian/prerm $(tmp)/DEBIAN/prerm
+       $(INSTALL_SCRIPT) debian/postrm $(tmp)/DEBIAN/postrm
+       $(INSTALL_FILE) debian/conffiles $(tmp)/DEBIAN/conffiles
+       $(INSTALL_FILE) debian/templates $(tmp)/DEBIAN/templates
+       #no translations yet:(
+       #po2debconf debian/templates > debian/templates.merged
+       $(INSTALL_FILE) debian/templates $(tmp)/DEBIAN/templates
+       $(INSTALL_SCRIPT) debian/config $(tmp)/DEBIAN/config
+
+       # overrides file
+       $(INSTALL_DIR) $(tmp)/usr/share/lintian/overrides/
+       $(INSTALL_FILE) debian/lusca.overrides \
+               $(tmp)/usr/share/lintian/overrides/lusca
+
+       dpkg-shlibdeps $(tmp)/usr/sbin/* $(tmp)$(libexecdir)/*
+       dpkg-gencontrol -isp -p$(package)
+       dpkg --build $(tmp) ..
+       rm -f debian/substvars
+       rm -rf $(tmp)
+       #
+       #       Generate lusca-cgi package.
+       #
+       $(INSTALL_DIR) $(tmp)/DEBIAN
+       $(INSTALL_DIR) $(tmp)/etc/squid
+       $(INSTALL_DIR) $(tmp)/usr/lib/cgi-bin
+       $(INSTALL_DIR) $(tmp)/usr/share/doc/lusca-cgi
+       $(INSTALL_DIR) $(tmp)/usr/share/man/man8
+       #
+       $(INSTALL_FILE) tools/cachemgr.conf $(tmp)/etc/squid/cachemgr.conf
+       $(INSTALL_PROGRAM) tools/cachemgr.cgi $(tmp)/usr/lib/cgi-bin/
+       $(INSTALL_FILE) debian/lusca-cgi.8 $(tmp)/usr/share/man/man8
+       #TODO: need one for lusca
+       #$(INSTALL_FILE) ChangeLog $(tmp)/usr/share/doc/lusca-cgi/changelog
+ $(INSTALL_FILE) ChangeLog.Cacheboy $(tmp)/usr/share/doc/lusca-cgi/changelog
+       $(INSTALL_FILE) debian/changelog \
+               $(tmp)/usr/share/doc/lusca-cgi/changelog.Debian
+       gzip -9f $(tmp)/usr/share/doc/lusca-cgi/*
+       $(INSTALL_FILE) debian/copyright $(tmp)/usr/share/doc/lusca-cgi
+       gzip -9f $(tmp)/usr/share/man/man8/*
+       $(INSTALL_DIR) $(tmp)/usr/share/doc/lusca-cgi/examples
+       $(INSTALL_SCRIPT) debian/postrm.lusca-cgi $(tmp)/DEBIAN/postrm
+       $(INSTALL_SCRIPT) debian/prerm.lusca-cgi $(tmp)/DEBIAN/prerm
+       $(INSTALL_FILE) debian/conffiles.lusca-cgi $(tmp)/DEBIAN/conffiles
+       $(INSTALL_FILE) debian/templates $(tmp)/DEBIAN/templates
+       dpkg-shlibdeps tools/cachemgr.cgi
+       dpkg-gencontrol -isp -plusca-cgi
+       dpkg --build $(tmp) ..
+       rm -rf $(tmp)
+
+# Clean up.
+clean: clean1 unpatch
+clean1:        checkroot
+       [ ! -f Makefile ] || $(MAKE) distclean
+       rm -f helpers/basic_auth/NCSA/{Makefile,ncsa_auth.o,ncsa_auth}
+       rm -f helpers/basic_auth/SMB/{smb_auth.o,smb_auth}
+       rm -f helpers/basic_auth/PAM/{pam_auth.o,pam_auth}
+       rm -f helpers/basic_auth/YP/{Makefile,yp_auth,yp_auth.o,nis_support.o}
+       rm -f helpers/basic_auth/MSNT/{Makefile,msnt_auth,*.o}
+       rm -f helpers/basic_auth/LDAP/{Makefile,squid_ldap_auth,*.o}
+       rm -f 
helpers/basic_auth/getpwnam/{Makefile,getpwnam_auth.o,getpwnam_auth}
+ rm -f helpers/digest_auth/password/{Makefile,digest_pw_auth,digest_pw_auth.o} + rm -f helpers/external_acl/ip_user/{Makefile,ip_user,dict.o,main.o,match.o} + rm -f helpers/external_acl/ldap_group/{Makefile,squid_ldap_group,squid_ldap_group.o} + rm -f helpers/external_acl/unix_group/{Makefile,squid_unix_group,check_group.o}
+       rm -f helpers/ntlm_auth/SMB/{Makefile,ntlm_auth,*.o,smbval/*.o}
+       rm -f build debian/{substvars,files,templates.merged}
+       rm -rf $(tmp) *~
+       find . -name '*.bak' -o -name '*~' | xargs -r rm -f --
+       #cd icons && /bin/sh ./icons.shar
+
+binary:        binary-indep binary-arch
+
+checkroot:
+       $(checkdir)
+       test root = "`whoami`"
+
+dist:  binary
+       dpkg-source -b
+
+.PHONY: binary binary-arch binary-indep clean checkroot clean1 patch unpatch
=======================================
--- /dev/null
+++ /branches/LUSCA_HEAD/debian/substvars       Wed Nov  3 16:18:37 2010
@@ -0,0 +1,1 @@
+shlibs:Depends=libc6 (>= 2.7-1)
=======================================
--- /dev/null
+++ /branches/LUSCA_HEAD/debian/templates       Wed Nov  3 16:18:37 2010
@@ -0,0 +1,27 @@
+# These templates need translation
+
+Template: lusca/fix_lines
+Type: boolean
+Default: true
+_Description: Upgrade squid.conf automatically?
+ Incompatible settings have been found in the existing squid.conf file.
+ .
+ They will prevent Lusca/Squid from starting or working correctly.
+ .
+ These settings can be corrected now. Please choose whether you want
+ to apply the needed changes.
+
+Template: lusca/fix_cachedir_perms
+Type: boolean
+Default: false
+_Description: Fix permissions of 'cache_dir'?
+ The values for 'cache_effective_user' and/or 'cache_effective_group'
+ in Lusca/Squid's configuration file are incompatible with the owner/group of the cache
+ directories.
+ .
+ Please choose whether this should be fixed automatically.
+ .
+ However, please note that if you specified a cache directory
+ different from /var/spool/squid (such as /tmp), this could affect
+ any other programs using that directory.
+
=======================================
--- /dev/null
+++ /branches/LUSCA_HEAD/debian/watch   Wed Nov  3 16:18:37 2010
@@ -0,0 +1,1 @@
+

--
You received this message because you are subscribed to the Google Groups 
"lusca-commit" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/lusca-commit?hl=en.

Reply via email to