--- sqcwa-0.3.orig/daemon.c +++ sqcwa-0.3/daemon.c @@ -17,13 +17,14 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#include "daemon.h" - #include #include #include #include #include +#include + +#include "daemon.h" void run_daemon_run (char * name, int uid, int gid) { daemon_fork(); --- sqcwa-0.3.orig/sqcwa.init.d +++ sqcwa-0.3/sqcwa.init.d @@ -1,4 +1,13 @@ #! /bin/sh +### BEGIN INIT INFO +# Provides: sqcwa +# Required-Start: $remote_fs $syslog +# Required-Stop: $remote_fs $syslog +# Should-Start: squid +# Should-Stop: squid +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +### END INIT INFO # # this init.d script was build from an example found at # /etc/init.d/skeleton in a Debian GNU system. @@ -26,13 +35,13 @@ ;; stop) echo -n "Stopping $DESC: $NAME " - start-stop-daemon --stop --quiet --pidfile /var/run/$NAME.pid \ + start-stop-daemon --stop --oknodo --quiet --pidfile /var/run/$NAME.pid \ --exec $DAEMON echo "." ;; restart|force-reload) echo -n "Restarting $DESC: $NAME" - start-stop-daemon --stop --quiet --pidfile \ + start-stop-daemon --stop --oknodo --quiet --pidfile \ /var/run/$NAME.pid --exec $DAEMON sleep 1 start-stop-daemon --start --quiet --pidfile \ --- sqcwa-0.3.orig/url.c +++ sqcwa-0.3/url.c @@ -17,8 +17,9 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#include "url.h" #include +#include +#include "url.h" void url_filter (char * urlunf, char * urlfil) { --- sqcwa-0.3.orig/debian/dirs +++ sqcwa-0.3/debian/dirs @@ -0,0 +1,2 @@ +usr/sbin +etc/init.d --- sqcwa-0.3.orig/debian/README.Debian +++ sqcwa-0.3/debian/README.Debian @@ -0,0 +1,7 @@ +sqcwa will only run properly if squid log format is set to native squid2 +format. This is the default in squid configuration. + +If you set 'emulate_httpd_log on' in squid.conf file, sqcwa will not +run properly. + + --- sqcwa-0.3.orig/debian/docs +++ sqcwa-0.3/debian/docs @@ -0,0 +1 @@ +README --- sqcwa-0.3.orig/debian/changelog +++ sqcwa-0.3/debian/changelog @@ -0,0 +1,34 @@ +sqcwa (0.3-3.1) unstable; urgency=low + + * Non-maintainer upload. + * Added LSB formatted dependency info in init.d script (closes: #469804) + * Converted debian/copyright to UTF-8 and removed old FSF address + + -- Peter Eisentraut Wed, 02 Apr 2008 12:13:27 +0200 + +sqcwa (0.3-3) unstable; urgency=low + + * "/etc/init.d/sqcwa stop" does not fail anymore if the daemon + is not running. This is the real bugfix. Previous upload did not + fix it correctly. Closes: #344211. + * Uploaded by Pedro Zorzenon Neto + + -- Celso Providelo Tue, 20 Dec 2005 21:33:55 -0200 + +sqcwa (0.3-2) unstable; urgency=low + + * "/etc/init.d/sqcwa stop" does not fail anymore if the daemon + is not running. Thanks to David Andel for reporting this bug. + Closes: #238264. + * Uploaded by Pedro Zorzenon Neto + + -- Celso Providelo Tue, 16 Mar 2004 16:52:53 -0300 + +sqcwa (0.3-1) unstable; urgency=low + + * Initial Release. + * First upload, closing ITP. (Closes #185792) + * Uploaded by Pedro Zorzenon Neto + + -- Celso Providelo Wed, 19 Mar 2003 21:37:29 -0300 + --- sqcwa-0.3.orig/debian/copyright +++ sqcwa-0.3/debian/copyright @@ -0,0 +1,24 @@ +This package was debianized by Celso Providelo on +Wed, 19 Mar 2003 21:37:29 -0300. + +It was downloaded from http://www.autsens.com/sqcwa/sqcwa-0.3.tar.gz + +Upstream Authors: Pedro Zorzenon Neto + José Roberto Monteiro + +Copyright: Pedro Zorzenon Neto + José Roberto Monteiro + + +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2 of the License, or +(at your option) any later version. + +This program 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. + +On Debian GNU/Linux systems, the complete text of the GNU General +Public License can be found in /usr/share/common-licenses/GPL. --- sqcwa-0.3.orig/debian/control +++ sqcwa-0.3/debian/control @@ -0,0 +1,23 @@ +Source: sqcwa +Section: web +Priority: optional +Maintainer: Celso Providelo +Build-Depends: debhelper (>> 3.0.0) +Standards-Version: 3.6.1 + +Package: sqcwa +Architecture: any +Depends: ${shlibs:Depends}, squid, squidclient +Description: Workaround for Squid not caching some pages + This program reads squid/access.log on the fly, analyses it and + searches inside all text/html objects for some tags, and + if found, tells squidclient to purge the page. + . + It is needed for some webservers that do not put http-equiv tags + in http headers. + . + Currently these tags are: + + + + --- sqcwa-0.3.orig/debian/sqcwa.1 +++ sqcwa-0.3/debian/sqcwa.1 @@ -0,0 +1,42 @@ +.\" Hey, EMACS: -*- nroff -*- +.\" First parameter, NAME, should be all caps +.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection +.\" other parameters are allowed: see man(7), man(1) +.TH SQCWA 1 "March 19, 2003" +.\" Please adjust this date whenever revising the manpage. +.\" +.\" Some roff macros, for reference: +.\" .nh disable hyphenation +.\" .hy enable hyphenation +.\" .ad l left justify +.\" .ad b justify to both left and right margins +.\" .nf disable filling +.\" .fi enable filling +.\" .br insert line break +.\" .sp insert n+1 empty lines +.\" for manpage-specific macros, see man(7) +.SH NAME +sqcwa \- workarround for Squid to not cache some pages +.SH SYNOPSIS +.B sqcwa +.RI [squidlogfile] +.br +.SH DESCRIPTION +This manual page documents briefly the +.B sqcwa +command. +.PP +.\" TeX users may be more comfortable with the \fB\fP and +.\" \fI\fP escape sequences to invode bold face and italics, +.\" respectively. +\fBsqcwa\fP accepts no command-line option, just if you want, you +can specify the logfile to read, by default it is +/var/log/squid/access.log + +.SH SEE ALSO +.BR squid (1), +.BR squidclient (1). +.br +.SH AUTHOR +This manual page was written by Celso Providelo , +for the Debian GNU/Linux system (but may be used by others). --- sqcwa-0.3.orig/debian/rules +++ sqcwa-0.3/debian/rules @@ -0,0 +1,98 @@ +#!/usr/bin/make -f +# Sample debian/rules that uses debhelper. +# GNU copyright 1997 to 1999 by Joey Hess. + +# Uncomment this to turn on verbose mode. +export DH_VERBOSE=1 + +# This is the debhelper compatibility version to use. +export DH_COMPAT=3 + + + +ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS))) + CFLAGS += -g +endif +ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS))) + INSTALL_PROGRAM += -s +endif + +configure: configure-stamp +configure-stamp: + dh_testdir + # Add here commands to configure the package. + + touch configure-stamp + + +build: build-stamp + +build-stamp: configure-stamp + dh_testdir + + # Add here commands to compile the package. + $(MAKE) + #/usr/bin/docbook-to-man debian/sqcwa.sgml > sqcwa.1 + + touch build-stamp + +clean: + dh_testdir + dh_testroot + rm -f build-stamp configure-stamp + + # Add here commands to clean up after the build process. + + $(MAKE) clean + rm -f debian/init.d + + dh_clean + +install: build + dh_testdir + dh_testroot + dh_clean -k + dh_installdirs + + cp -f sqcwa.init.d debian/init.d + + # Add here commands to install the package into debian/sqcwa. + $(MAKE) install DESTDIR=$(CURDIR)/debian/sqcwa + + +# Build architecture-independent files here. +binary-indep: build install +# We have nothing to do by default. + +# Build architecture-dependent files here. +binary-arch: build install + dh_testdir + dh_testroot +# dh_installdebconf + dh_installdocs +# dh_installexamples +# dh_installmenu +# dh_installlogrotate +# dh_installemacsen +# dh_installpam +# dh_installmime + dh_installinit -- start 31 2 3 4 5 . stop 29 0 1 6 . +# dh_installcron + dh_installman debian/sqcwa.1 + dh_installinfo +# dh_undocumented + dh_installchangelogs Changelog + dh_link + dh_strip + dh_compress + dh_fixperms +# dh_makeshlibs + dh_installdeb +# dh_perl + dh_shlibdeps + dh_gencontrol + dh_md5sums + dh_builddeb + +binary: binary-indep binary-arch +.PHONY: build clean binary-indep binary-arch binary install configure