Package: squid
Version: 2.5.9-10
Severity: wishlist
Tags: patch

I found a bit difficult to use CHUID option without a directory
/var/run/squid/. So I give this patch for create it at installation and
"force" squid to use it.
It is only the first step to use CHUID (must change ACL on this directory).
I tested it with patch -p0 < squid.patch on squid-2.5.9-10 source.
It seems to work, hope it is right and Debian's policy compliant.

I modified source to compile with directory, FAQ, postinst and everywhere
/var/run appeared (included the /var/run/runcache.pid, I don't know this
option, I hope it's okay).

-- System Information:
Debian Release: 3.1
Architecture: i386 (i686)
Kernel: Linux 2.6.10
Locale: [EMAIL PROTECTED], [EMAIL PROTECTED] (charmap=ISO-8859-15)

Versions of packages squid depends on:
ii  adduser                     3.63         Add and remove users and groups
ii  coreutils                   5.2.1-2      The GNU core utilities
ii  debconf                     1.4.47       Debian configuration management sy
ii  libc6                       2.3.2.ds1-22 GNU C Library: Shared libraries an
ii  libldap2                    2.1.30-8     OpenLDAP libraries
ii  libpam0g                    0.76-22      Pluggable Authentication Modules l
ii  logrotate                   3.7-5        Log rotation utility
ii  netbase                     4.21         Basic TCP/IP networking system
ii  squid-common                2.5.9-10     Internet Object Cache (WWW proxy c

-- debconf information excluded
+++ ./debian/doc/FAQ-3.html     2005-07-22 05:22:52.000000000 +0200
@@ -217,7 +217,7 @@
         cd $C
         umask 022
         sleep 10
-        while [ -f /var/run/squid/nosquid ]; do
+        while [ -f /var/run/nosquid ]; do
                 sleep 1
         done
         /usr/bin/tail -20 $C/logs/cache.log \
+++ ./debian/logrotate  2005-07-22 05:22:52.000000000 +0200
@@ -13,6 +13,6 @@
                test ! -x /usr/sbin/sarg-maint || /usr/sbin/sarg-maint
        endscript
        postrotate
-               test ! -e /var/run/squid/squid.pid || /usr/sbin/squid -k rotate
+               test ! -e /var/run/squid.pid || /usr/sbin/squid -k rotate
        endscript
 }
+++ ./debian/postinst   2005-07-22 05:22:52.000000000 +0200
@@ -113,9 +113,6 @@
 
 case "$1" in
        configure)
-               if [ ! -d /var/run/squid/ ]; then
-                       mkdir /var/run/squid/
-               fi
                if [ -e /etc/squid/conffile-moved ] ; then
                        rm /etc/squid/conffile-moved
                fi
+++ ./debian/README.Debian      2005-07-22 05:22:52.000000000 +0200
@@ -90,7 +90,7 @@
 DEFAULT_CACHE_LOG=$(logdir)/cache.log \
 DEFAULT_ACCESS_LOG=$(logdir)/access.log \
 DEFAULT_STORE_LOG=$(logdir)/store.log \
-DEFAULT_PID_FILE=/var/run/squid/squid.pid \
+DEFAULT_PID_FILE=/var/run/squid.pid \
 DEFAULT_SWAP_DIR=/var/spool/squid \
 DEFAULT_ICON_DIR=$(datadir)/icons \
 DEFAULT_ERROR_DIR=$(datadir)/errors/English \
+++ ./debian/rules      2005-07-22 05:22:52.000000000 +0200
@@ -27,7 +27,7 @@
                DEFAULT_CACHE_LOG=$(logdir)/cache.log \
                DEFAULT_ACCESS_LOG=$(logdir)/access.log \
                DEFAULT_STORE_LOG=$(logdir)/store.log \
-               DEFAULT_PID_FILE=/var/run/squid/squid.pid \
+               DEFAULT_PID_FILE=/var/run/squid.pid \
                DEFAULT_SWAP_DIR=/var/spool/squid \
                DEFAULT_ICON_DIR=$(datadir)/icons \
                DEFAULT_ERROR_DIR=$(datadir)/errors/English \
+++ ./debian/squid.rc   2005-07-22 05:22:52.000000000 +0200
@@ -8,7 +8,7 @@
 NAME=squid
 DAEMON=/usr/sbin/squid
 LIB=/usr/lib/squid
-PIDFILE=/var/run/squid/$NAME.pid
+PIDFILE=/var/run/$NAME.pid
 SQUID_ARGS="-D -sYC"
 
 [ ! -f /etc/default/squid ] || . /etc/default/squid
+++ ./debian/squid.RunCache     2005-07-22 05:22:52.000000000 +0200
@@ -21,7 +21,7 @@
                ;;
 esac
 
-PIDFILE=/var/run/squid/runcache.pid
+PIDFILE=/var/run/runcache.pid
 PATH=/usr/lib/squid:/bin:/sbin:/usr/sbin:/usr/bin
 export PATH
 umask 022
@@ -29,9 +29,9 @@
 #
 #      Just to be sure, check if squid is not already running.
 #
-if [ -f /var/run/squid/squid.pid ]
+if [ -f /var/run/squid.pid ]
 then
-       spid=`cat /var/run/squid/squid.pid`
+       spid=`cat /var/run/squid.pid`
        kill -CONT $spid 2>/dev/null
        if [ $? = 0 ]
        then
+++ ./src/cf.data       2005-07-22 05:23:20.000000000 +0200
@@ -977,7 +977,7 @@
 
 NAME: pid_filename
 TYPE: string
-DEFAULT: /var/run/squid/squid.pid
+DEFAULT: /var/run/squid.pid
 LOC: Config.pidFilename
 DOC_START
        A filename to write the process-id to.  To disable, enter "none".
+++ ./src/cf_parser.h   2005-07-22 05:23:20.000000000 +0200
@@ -69,7 +69,7 @@
 #if USE_REFERER_LOG
        /* No default for referer_log */
 #endif
-       default_line("pid_filename /var/run/squid/squid.pid");
+       default_line("pid_filename /var/run/squid.pid");
        default_line("debug_options ALL,1");
        default_line("log_fqdn off");
        default_line("client_netmask 255.255.255.255");
+++ ./src/squid.conf.default    2005-07-22 05:23:20.000000000 +0200
@@ -809,7 +809,7 @@
 #      A filename to write the process-id to.  To disable, enter "none".
 #
 #Default:
-# pid_filename /var/run/squid/squid.pid
+# pid_filename /var/run/squid.pid
 
 #  TAG: debug_options
 #      Logging options are set as section,level where each source file

Reply via email to