summaryrefslogtreecommitdiff
path: root/network/havp/patches
diff options
context:
space:
mode:
authorWilliam Bowman <wilbowma@indiana.edu>2011-12-20 23:19:12 -0600
committerRobby Workman <rworkman@slackbuilds.org>2011-12-20 23:19:12 -0600
commitcf8d6e29ed99b62469a816f3d96885073909a548 (patch)
tree79a66e2ecd62170e88d084e172bf9d5e729f8991 /network/havp/patches
parentc36593f743727071b5334fdd643f62e29e445dcf (diff)
downloadslackbuilds-cf8d6e29ed99b62469a816f3d96885073909a548.tar.gz
network/havp: Added (HTTP Anti Virus Proxy)
Signed-off-by: Robby Workman <rworkman@slackbuilds.org>
Diffstat (limited to 'network/havp/patches')
-rw-r--r--network/havp/patches/fixup_and_install_init_script.diff38
-rw-r--r--network/havp/patches/put_templates_in_usrshare.diff46
-rw-r--r--network/havp/patches/use_clamav_group_by_default.diff16
-rw-r--r--network/havp/patches/use_vartmphavp_for_tempdir.diff26
4 files changed, 126 insertions, 0 deletions
diff --git a/network/havp/patches/fixup_and_install_init_script.diff b/network/havp/patches/fixup_and_install_init_script.diff
new file mode 100644
index 0000000000..80ea40ba33
--- /dev/null
+++ b/network/havp/patches/fixup_and_install_init_script.diff
@@ -0,0 +1,38 @@
+Fix paths to havp binary, config file, and init script, and make
+sure the init script is installed to the correct directory.
+
+diff -Nur havp-0.92a.orig/etc/init.d/havp havp-0.92a/etc/init.d/havp
+--- havp-0.92a.orig/etc/init.d/havp 2006-03-24 11:26:26.000000000 -0600
++++ havp-0.92a/etc/init.d/havp 2011-12-20 10:28:49.449889309 -0600
+@@ -9,8 +9,8 @@
+ # Any configuration of HAVP is done in havp.config
+ # Type havp --help for help and read havp.config you should have received.
+
+-HAVP_BIN=/usr/local/sbin/havp
+-HAVP_CONFIG=/usr/local/etc/havp/havp.config
++HAVP_BIN=/usr/sbin/havp
++HAVP_CONFIG=/etc/havp/havp.config
+ PIDFILE=/var/run/havp/havp.pid
+
+ # Return values acc. to LSB for all commands but status:
+@@ -54,6 +54,7 @@
+ echo "Error: $HAVP_BIN not found"
+ exit 5
+ fi
++ mkdir -p `dirname $PIDFILE`
+ $HAVP_BIN -c $HAVP_CONFIG
+ exit $?
+ ;;
+diff -Nur havp-0.92a.orig/havp/Makefile.in havp-0.92a/havp/Makefile.in
+--- havp-0.92a.orig/havp/Makefile.in 2007-09-11 13:42:44.000000000 -0500
++++ havp-0.92a/havp/Makefile.in 2011-12-20 10:27:42.992846172 -0600
+@@ -29,7 +29,8 @@
+ $(INSTALL) -d -m 755 $(DESTDIR)$(localstatedir)/log/havp
+ $(INSTALL) -d -m 755 $(DESTDIR)$(localstatedir)/tmp/havp
+ $(INSTALL) -d -m 755 $(DESTDIR)$(localstatedir)/run/havp
+- $(INSTALL) -d $(DESTDIR)/etc/init.d
++ $(INSTALL) -d $(DESTDIR)/etc/rc.d
++ $(INSTALL) -m 755 ../etc/init.d/havp $(DESTDIR)/etc/rc.d/rc.havp.new
+ $(INSTALL) -m 644 ../etc/havp/havp.config $(DESTDIR)$(sysconfdir)/havp/havp.config.default
+ @if [ ! -f $(DESTDIR)$(sysconfdir)/havp/havp.config ]; then \
+ echo "$(INSTALL) -m 644 ../etc/havp/havp.config $(DESTDIR)$(sysconfdir)/havp/havp.config"; \
diff --git a/network/havp/patches/put_templates_in_usrshare.diff b/network/havp/patches/put_templates_in_usrshare.diff
new file mode 100644
index 0000000000..5bf54cfa29
--- /dev/null
+++ b/network/havp/patches/put_templates_in_usrshare.diff
@@ -0,0 +1,46 @@
+Use @datadir@/havp/ (e.g. /usr/share/havp) instead of
+@sysconfdir@/havp (e.g. /etc/havp) for the templates
+(use for error messages and such)
+
+diff -Nur havp-0.92a.orig/etc/havp/havp.config.in havp-0.92a/etc/havp/havp.config.in
+--- havp-0.92a.orig/etc/havp/havp.config.in 2011-12-20 22:00:20.651052966 -0600
++++ havp-0.92a/etc/havp/havp.config.in 2011-12-20 22:00:06.253243044 -0600
+@@ -203,7 +203,7 @@
+ # Path to template files.
+ #
+ # Default:
+-# TEMPLATEPATH @sysconfdir@/havp/templates/en
++TEMPLATEPATH @datadir@/havp/templates/en
+
+ #
+ # Set to true if you want to prefer Whitelist.
+diff -Nur havp-0.92a.orig/havp/Makefile.in havp-0.92a/havp/Makefile.in
+--- havp-0.92a.orig/havp/Makefile.in 2011-12-20 21:59:41.434570700 -0600
++++ havp-0.92a/havp/Makefile.in 2011-12-20 22:02:28.130369990 -0600
+@@ -9,6 +9,7 @@
+ sbindir = @sbindir@
+ sysconfdir = @sysconfdir@
+ localstatedir = @localstatedir@
++datadir = @datadir@
+
+ OBJECTS = helper.o logfile.o scannerhandler.o connectiontobrowser.o \
+ genericscanner.o httphandler.o params.o sockethandler.o \
+@@ -29,6 +30,7 @@
+ $(INSTALL) -d -m 755 $(DESTDIR)$(localstatedir)/log/havp
+ $(INSTALL) -d -m 755 $(DESTDIR)$(localstatedir)/tmp/havp
+ $(INSTALL) -d -m 755 $(DESTDIR)$(localstatedir)/run/havp
++ $(INSTALL) -d -m 755 $(DESTDIR)$(datadir)/havp
+ $(INSTALL) -d $(DESTDIR)/etc/rc.d
+ $(INSTALL) -m 755 ../etc/init.d/havp $(DESTDIR)/etc/rc.d/rc.havp.new
+ $(INSTALL) -m 644 ../etc/havp/havp.config $(DESTDIR)$(sysconfdir)/havp/havp.config.default
+@@ -49,8 +51,8 @@
+ else \
+ echo "Not overwriting old $(DESTDIR)$(sysconfdir)/havp/blacklist"; \
+ fi
+- cp -r ../etc/havp/templates $(DESTDIR)$(sysconfdir)/havp/
+- chmod -R a+rX $(DESTDIR)$(sysconfdir)/havp/templates
++ cp -r ../etc/havp/templates $(DESTDIR)$(datadir)/havp/
++ chmod -R a+rX $(DESTDIR)$(datadir)/havp/templates
+
+ clean:
+ cd scanners && $(MAKE) clean
diff --git a/network/havp/patches/use_clamav_group_by_default.diff b/network/havp/patches/use_clamav_group_by_default.diff
new file mode 100644
index 0000000000..d7b1099421
--- /dev/null
+++ b/network/havp/patches/use_clamav_group_by_default.diff
@@ -0,0 +1,16 @@
+Set user and group to havp:clamav by default in the config file
+
+diff -Nur havp-0.92a.orig/etc/havp/havp.config.in havp-0.92a/etc/havp/havp.config.in
+--- havp-0.92a.orig/etc/havp/havp.config.in 2010-04-02 08:33:34.000000000 -0500
++++ havp-0.92a/etc/havp/havp.config.in 2011-12-20 21:56:34.749035312 -0600
+@@ -24,8 +24,8 @@
+ # used by any other program.
+ #
+ # Default:
+-# USER havp
+-# GROUP havp
++USER havp
++GROUP clamav
+
+ # If this is true HAVP is running as daemon in background.
+ # For testing you may run HAVP at your text console.
diff --git a/network/havp/patches/use_vartmphavp_for_tempdir.diff b/network/havp/patches/use_vartmphavp_for_tempdir.diff
new file mode 100644
index 0000000000..b114afdca1
--- /dev/null
+++ b/network/havp/patches/use_vartmphavp_for_tempdir.diff
@@ -0,0 +1,26 @@
+Set the working dir (TEMPDIR) to /var/tmp/havp instead of /var/tmp
+
+diff -Nur havp-0.92a.orig/etc/havp/havp.config.in havp-0.92a/etc/havp/havp.config.in
+--- havp-0.92a.orig/etc/havp/havp.config.in 2011-12-20 22:08:18.907739050 -0600
++++ havp-0.92a/etc/havp/havp.config.in 2011-12-20 22:08:55.267259030 -0600
+@@ -120,7 +120,7 @@
+ # Needs to be writable by HAVP user. Use ramdisk for best performance.
+ #
+ # Default:
+-# TEMPDIR /var/tmp
++# TEMPDIR /var/tmp/havp
+
+ #
+ # HAVP reloads scanners virus database by receiving a signal
+diff -Nur havp-0.92a.orig/havp/params.cpp havp-0.92a/havp/params.cpp
+--- havp-0.92a.orig/havp/params.cpp 2010-04-02 08:32:42.000000000 -0500
++++ havp-0.92a/havp/params.cpp 2011-12-20 22:08:44.061406971 -0600
+@@ -70,7 +70,7 @@
+ SetConfig("WHITELIST", WHITELISTFILE);
+ SetConfig("BLACKLIST", BLACKLISTFILE);
+ SetConfig("TEMPLATEPATH", TEMPLATEPATH);
+- SetConfig("TEMPDIR", "/var/tmp");
++ SetConfig("TEMPDIR", "/var/tmp/havp");
+ SetConfig("SCANTEMPFILE", "/var/tmp/havp/havp-XXXXXX");
+ SetConfig("PIDFILE", PIDFILE);
+ SetConfig("TRANSPARENT", "false");