patched for 0.92a-2.ius.1 default tip
authorHeiko Schlittermann (JUMPER) <hs@schlittermann.de>
Fri, 07 Oct 2011 15:54:31 +0200
changeset 0 7c41f4841c8a
patched for 0.92a-2.ius.1 * transition to source format 3.0 (quilt) * several fixed in the init script
.hgignore
havp.init
series
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/.hgignore	Fri Oct 07 15:54:31 2011 +0200
@@ -0,0 +1,5 @@
+^\.hg
+^\.mq
+syntax: glob
+status
+guards
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/havp.init	Fri Oct 07 15:54:31 2011 +0200
@@ -0,0 +1,336 @@
+# HG changeset patch
+# Parent 83cfabd19519f55d97af051a643dfdab63639525
+fixed the init script
+
+diff --git a/debian/changelog b/debian/changelog
+--- a/debian/changelog
++++ b/debian/changelog
+@@ -1,3 +1,19 @@
++havp (0.92a-2.ius.1) stable; urgency=low
++
++  * Non-maintainer upload.
++  * fixed version string to ius
++
++ -- Heiko Schlittermann <hs@schlittermann.de>  Fri, 07 Oct 2011 15:51:29 +0200
++
++havp (0.92a-2.1) stable; urgency=low
++
++  * Non-maintainer upload.
++  * fixed init script and init script invocation 
++  * pushed to 3.0 (quilt) source format
++  * added example config line to havp.config
++
++ -- Heiko Schlittermann <hs@schlittermann.de>  Fri, 07 Oct 2011 15:41:23 +0200
++
+ havp (0.92a-2) stable; urgency=low
+ 
+   * Non-maintainer upload.
+diff --git a/debian/compat b/debian/compat
+--- a/debian/compat
++++ b/debian/compat
+@@ -1,1 +1,1 @@
+-4
++7
+diff --git a/debian/control b/debian/control
+--- a/debian/control
++++ b/debian/control
+@@ -2,8 +2,9 @@
+ Section: net
+ Priority: optional
+ Maintainer: Rene Mayrhofer <rene.mayrhofer@gibraltar.at>
+-Build-Depends: debhelper (>= 4.0.0), autotools-dev, libssl-dev, libclamav-dev, dpatch, docbook-to-man, po-debconf
+-Standards-Version: 3.8.1
++Build-Depends: debhelper (>= 7.0.0), autotools-dev, libssl-dev, libclamav-dev, docbook-to-man, po-debconf, 
++    quilt (>= 0.46-7~)
++Standards-Version: 3.9.1
+ 
+ Package: havp
+ Architecture: any
+diff --git a/debian/havp.init b/debian/havp.init
+--- a/debian/havp.init
++++ b/debian/havp.init
+@@ -1,11 +1,11 @@
+ #! /bin/sh
+ ### BEGIN INIT INFO
+ # Provides:          havp
+-# Required-Start:    $network
+-# Required-Stop:
++# Required-Start:    $network $remote_fs
++# Required-Stop:     $remote_fs $network
+ # Should-Start:	     $named $time
+ # Default-Start:     2 3 4 5
+-# Default-Stop:      0 6
++# Default-Stop:      0 1 6
+ # Short-Description: HAVP virus-scanning HTTP proxy
+ # Description: HAVP is a HTTP proxy that transparently scans all traffic for
+ #	       viruses and blocks all infected files.
+@@ -95,9 +95,9 @@
+ 	#	option to the "reload" entry above. If not, "force-reload" is
+ 	#	just the same as "restart".
+ 	#
+-+	$0 stop
++	$0 stop
+ 	sleep 1
+-+	$0 start
++	$0 start
+ 	;;
+   status)
+         if [ ! -r $PIDFILE ]; then
+diff --git a/debian/havp.postinst b/debian/havp.postinst
+--- a/debian/havp.postinst
++++ b/debian/havp.postinst
+@@ -37,7 +37,6 @@
+       fi
+       # care for proper ownership in any case (e.g. updating from an earlier 
+       # havp package with different paths)
+-      chown havp:havp /var/run/havp
+       chown havp:havp /var/log/havp
+       chown havp:havp /var/lib/havp
+       chown havp:havp /var/spool/havp
+diff --git a/debian/havp.prerm b/debian/havp.prerm
+--- a/debian/havp.prerm
++++ b/debian/havp.prerm
+@@ -1,4 +1,5 @@
+ #! /bin/sh
++set -e
+ # prerm script for havp
+ #
+ # see: dh_installdeb(1)
+diff --git a/debian/patches/00list b/debian/patches/00list
+deleted file mode 100644
+--- a/debian/patches/00list
++++ /dev/null
+@@ -1,3 +0,0 @@
+-03_havp.config
+-04_params.cpp
+-05_add_ssltimeout_option
+\ No newline at end of file
+diff --git a/debian/patches/03_havp.config.dpatch b/debian/patches/03_havp.config.dpatch
+--- a/debian/patches/03_havp.config.dpatch
++++ b/debian/patches/03_havp.config.dpatch
+@@ -1,39 +1,30 @@
+-#! /bin/sh /usr/share/dpatch/dpatch-run
+-## 03_havp.config.dpatch by  <mfladischer@home.fladi.at>
+-## adapted and cleaned up by Rene Mayrhofer
+-##
+-## All lines beginning with `## DP:' are a description of the patch.
+-## DP: Set PID file and SCANTEMPFILE to correct locations
+-
+-@DPATCH@
+-
+---- havp-0.85/etc/havp/havp.config.in.orig	2007-03-13 11:49:25.482732863 +0100
+-+++ havp-0.85/etc/havp/havp.config.in	2007-03-13 11:50:33.667542226 +0100
++--- a/etc/havp/havp.config.in
+++++ b/etc/havp/havp.config.in
+ @@ -16,7 +16,7 @@
+  # You must remove this line for HAVP to start.
+  # This makes sure you have (hopefully) reviewed the configuration. :)
+  # Hint: You must enable some scanner! Find them in the end..
+ -REMOVETHISLINE deleteme
+ +# REMOVETHISLINE deleteme
+-
++ 
+  #
+  # For reasons of security it is recommended to run a proxy program
+-@@ -103,7 +103,7 @@
++@@ -113,7 +113,7 @@
+  # These characters are used by system to create unique named files.
+  #
+  # Default:
+ -# SCANTEMPFILE /var/tmp/havp/havp-XXXXXX
+ +# SCANTEMPFILE /var/spool/havp/havp-XXXXXX
+-
++ 
+  #
+- # Is scanner error fatal?
+-@@ -342,14 +342,14 @@
++ # Directory for ClamAV and other scanner created tempfiles.
++@@ -428,14 +428,14 @@
+  ##### ClamAV Library Scanner (libclamav)
+  #####
+-
++ 
+ -ENABLECLAMLIB false
+ +ENABLECLAMLIB true
+-
++ 
+  # HAVP uses libclamav hardcoded pattern directory, which usually is
+ -# /usr/local/share/clamav. You only need to set CLAMDBDIR, if you are
+ +# /usr/share/clamav. You only need to set CLAMDBDIR, if you are
+@@ -42,6 +33,16 @@
+  # Default: NONE
+ -# CLAMDBDIR /path/to/directory
+ +# CLAMDBDIR /var/lib/clamav
+-
+- # Should we block encrypted archives?
++ 
++ # Should we block broken executables?
+  #
++@@ -662,3 +662,9 @@
++ # DRWEBSERVER 127.0.0.1
++ # DRWEBPORT 3000
++ 
+++# SSL connections may be silent for a while (mostly when "abused"
+++# for other communication than HTTP). HAVP disconnects these connections
+++# after several seconds.
+++#
+++# Default:
+++# SSLTIMEOUT 20
+diff --git a/debian/patches/04_params.cpp.dpatch b/debian/patches/04_params.cpp.dpatch
+--- a/debian/patches/04_params.cpp.dpatch
++++ b/debian/patches/04_params.cpp.dpatch
+@@ -1,20 +1,12 @@
+-#! /bin/sh /usr/share/dpatch/dpatch-run
+-## 04_params.cpp.dpatch by  <mfladischer@home.fladi.at>
+-## adapted and cleaned up by Rene Mayrhofer
+-##
+-## All lines beginning with `## DP:' are a description of the patch.
+-## DP: Set PID file and SCANTEMPFILE to correct locations
+-
+-@DPATCH@
+-
+---- havp-0.85/havp/params.cpp.orig	2007-03-13 11:50:45.812848266 +0100
+-+++ havp-0.85/havp/params.cpp	2007-03-13 11:51:19.209457684 +0100
+-@@ -62,7 +62,7 @@
++--- a/havp/params.cpp
+++++ b/havp/params.cpp
++@@ -70,8 +70,8 @@
++     SetConfig("WHITELIST",	WHITELISTFILE);
+      SetConfig("BLACKLIST",	BLACKLISTFILE);
+      SetConfig("TEMPLATEPATH",	TEMPLATEPATH);
+ -    SetConfig("TEMPDIR",	"/var/tmp");
++-    SetConfig("SCANTEMPFILE",	"/var/tmp/havp/havp-XXXXXX");
+ +    SetConfig("TEMPDIR",	"/var/spool/havp");
+--    SetConfig("SCANTEMPFILE",	"/var/tmp/havp/havp-XXXXXX");
+ +    SetConfig("SCANTEMPFILE",	"/var/spool/havp/havp-XXXXXX");
+      SetConfig("PIDFILE",	PIDFILE);
+      SetConfig("TRANSPARENT",	"false");
+diff --git a/debian/patches/05_add_ssltimeout_option.dpatch b/debian/patches/05_add_ssltimeout_option.dpatch
+--- a/debian/patches/05_add_ssltimeout_option.dpatch
++++ b/debian/patches/05_add_ssltimeout_option.dpatch
+@@ -1,12 +1,3 @@
+-#! /bin/sh /usr/share/dpatch/dpatch-run
+-## 05_add_ssltimeout_option.dpatch by Rene Mayrhofer, adapted from a patch by
+-## Heiko Schlittermann
+-##
+-## All lines beginning with `## DP:' are a description of the patch.
+-## DP: Add SSLTIMEOUT config option
+-
+-@DPATCH@
+-
+ --- a/havp/default.h.in
+ +++ b/havp/default.h.in
+ @@ -36,6 +36,7 @@
+@@ -17,11 +8,9 @@
+   "MAXDOWNLOADSIZE","SCANNERTIMEOUT","STREAMUSERAGENT","STREAMSCANSIZE","SCANIMAGES", \
+   "SKIPMIME","SCANMIME", \
+   "ENABLECLAMLIB","CLAMDBDIR","CLAMBLOCKBROKEN","CLAMBLOCKMAX","CLAMBLOCKENCRYPTED", \
+-diff --git a/havp/params.cpp b/havp/params.cpp
+-index 0f83c0c..5a18913 100644
+ --- a/havp/params.cpp
+ +++ b/havp/params.cpp
+-@@ -86,6 +86,7 @@ void Params::SetDefaults()
++@@ -86,6 +86,7 @@
+      SetConfig("SCANNERTIMEOUT",	"10");
+      SetConfig("IGNOREVIRUS",	"");
+      SetConfig("DISABLELOCKINGFOR","AVG:ALL");
+@@ -29,11 +18,9 @@
+  //SCANNERS
+      SetConfig("ENABLECLAMLIB","false");
+          SetConfig("CLAMDBDIR","");
+-diff --git a/havp/sockethandler.cpp b/havp/sockethandler.cpp
+-index 28a119a..4cb5f24 100644
+ --- a/havp/sockethandler.cpp
+ +++ b/havp/sockethandler.cpp
+-@@ -582,7 +582,7 @@ int SocketHandler::CheckForSSLData( int sockBrowser, int sockServer )
++@@ -582,7 +582,7 @@
+          fds = sockServer;
+      }
+  
+diff --git a/debian/patches/series b/debian/patches/series
+new file mode 100644
+--- /dev/null
++++ b/debian/patches/series
+@@ -0,0 +1,3 @@
++03_havp.config.dpatch
++04_params.cpp.dpatch
++05_add_ssltimeout_option.dpatch
+diff --git a/debian/rules b/debian/rules
+--- a/debian/rules
++++ b/debian/rules
+@@ -72,11 +72,12 @@
+ install: build
+ 	dh_testdir
+ 	dh_testroot
+-	dh_clean -k 
++	dh_prep
+ 	dh_installdirs
+ 
+ 	# Add here commands to install the package into debian/havp.
+ 	$(MAKE) install DESTDIR=$(CURDIR)/debian/havp
++	rmdir $(CURDIR)/debian/havp/var/run/havp
+ 
+ 	# clean up to make lintian shut up...
+ 	rm -r $(CURDIR)/debian/havp/var/tmp
+@@ -96,7 +97,7 @@
+ 	dh_installdocs
+ 	dh_installexamples
+ 	dh_installlogrotate
+-	dh_installinit --error-handler=init_error
++	dh_installinit --error-handler=init_error 
+ 	dh_installman havp.1
+ 	dh_link
+ 	dh_strip
+@@ -110,12 +111,12 @@
+ 
+ patch: patch-stamp
+ patch-stamp:
+-	dpatch apply-all
+-	dpatch cat-all >patch-stamp
++	dh_quilt_patch
++	touch patch-stamp
+ 
+ unpatch:
+-	dpatch deapply-all
+-	rm -rf patch-stamp debian/patched
++	dh_quilt_unpatch
++	rm -rf patch-stamp
+ 
+ binary: binary-indep binary-arch
+ .PHONY: build clean binary-indep binary-arch binary install 
+diff --git a/debian/source/format b/debian/source/format
+new file mode 100644
+--- /dev/null
++++ b/debian/source/format
+@@ -0,0 +1,1 @@
++3.0 (quilt)
+diff --git a/debian/source/options b/debian/source/options
+new file mode 100644
+--- /dev/null
++++ b/debian/source/options
+@@ -0,0 +1,1 @@
++tar-ignore
+diff --git a/etc/havp/templates/ru/blacklist.html b/etc/havp/templates/ru/blacklist.html
+old mode 100755
+new mode 100644
+diff --git a/etc/havp/templates/ru/dns.html b/etc/havp/templates/ru/dns.html
+old mode 100755
+new mode 100644
+diff --git a/etc/havp/templates/ru/down.html b/etc/havp/templates/ru/down.html
+old mode 100755
+new mode 100644
+diff --git a/etc/havp/templates/ru/error.html b/etc/havp/templates/ru/error.html
+old mode 100755
+new mode 100644
+diff --git a/etc/havp/templates/ru/invalid.html b/etc/havp/templates/ru/invalid.html
+old mode 100755
+new mode 100644
+diff --git a/etc/havp/templates/ru/request.html b/etc/havp/templates/ru/request.html
+old mode 100755
+new mode 100644
+diff --git a/etc/havp/templates/ru/scanner.html b/etc/havp/templates/ru/scanner.html
+old mode 100755
+new mode 100644
+diff --git a/etc/havp/templates/ru/virus.html b/etc/havp/templates/ru/virus.html
+old mode 100755
+new mode 100644
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/series	Fri Oct 07 15:54:31 2011 +0200
@@ -0,0 +1,1 @@
+havp.init