HTTP Anti-Virus Proxy
http://havp.hege.li/forum/

havp spec file
http://havp.hege.li/forum/viewtopic.php?f=3&t=53
Page 1 of 1

Author:  Guest [ 23 Mar 2006 17:25 ]
Post subject:  havp spec file

below the rpm spec file and a little patch per startup script:

# havp.spec

%{!?avscanner: %define avscanner libclamav}
Summary: HAVP (HTTP AntiVirus proxy) is a proxy with an anti-virus filter.
Name: havp
Version: 0.78
Release: 4
License: GPL
Group: System Environment/Daemons
URL: http://www.server-side.de
Source0: %{name}-%{version}.tar.gz
Patch1: havp-0.78.initd
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
BuildRequires: bzip2-devel,gmp-devel,curl-devel,clamav-devel

%description
HAVP (HTTP AntiVirus proxy) is a proxy with an anti-virus filter. It does not cache or filter content. At the moment the complete traffic is scanned. The reason for this is the chance of malicious code in nearly every filetype e.g. HTML (JavaScript) or Jpeg. I aim to stop especially dialer or browser exploits. But writing a http Anti Virus Proxy is a real dilemma! Huge downloads are a problem for virus scanning proxies. A Client should not receive data which is unchecked by the virus scanner, but big downloads should not timeout.

%prep
%setup -q
%patch1 -p1 -b .initd
%build
# Choose used scanner: libclamav (default), fprot, trophie, aveserver, avg
%configure --prefix=/usr --with-scanner=%{avscanner} --enable-ssl-tunnel
make

%install
rm -rf $RPM_BUILD_ROOT

mkdir -p $RPM_BUILD_ROOT/usr/sbin
mkdir -p $RPM_BUILD_ROOT/var/log/havp
mkdir -p $RPM_BUILD_ROOT/var/tmp/havp
mkdir -p $RPM_BUILD_ROOT/var/run/havp
mkdir -p $RPM_BUILD_ROOT/etc/init.d
mkdir -p $RPM_BUILD_ROOT/etc/havp/templates

install -m755 havp/havp $RPM_BUILD_ROOT/usr/sbin
install -m755 etc/init.d/havp $RPM_BUILD_ROOT/etc/init.d/
install -m644 etc/havp/havp.config $RPM_BUILD_ROOT/etc/havp/havp.config
install -m644 etc/havp/whitelist $RPM_BUILD_ROOT/etc/havp/whitelist
install -m644 etc/havp/blacklist $RPM_BUILD_ROOT/etc/havp/blacklist
cp -r etc/havp/templates/* $RPM_BUILD_ROOT/etc/havp/templates
chmod -R a+rX $RPM_BUILD_ROOT/etc/havp/templates

%clean
rm -rf $RPM_BUILD_ROOT

%pre
if getent passwd havp >/dev/null 2>&1 ; then : ; else /usr/sbin/useradd -r -s /sbin/nologin havp >/dev/null 2>&1 || exit 1 ; fi

%post
echo ""
echo "Remember to give correct permissions:"
echo " chown <havpuser> /var/tmp/havp (after mounting if needed)"
echo " chown <havpuser> /var/log/havp"
echo ""

%files
%defattr(-,root,root,-)
%doc INSTALL COPYING ChangeLog
%config(noreplace) /etc/havp/havp.config
/usr/sbin/havp
%config(noreplace) /etc/havp/whitelist
%config(noreplace) /etc/havp/blacklist
/etc/havp/templates/*
%attr(750,havp,havp) %dir /var/log/havp
%attr(750,havp,havp) %dir /var/tmp/havp
%attr(750,havp,havp) %dir /var/run/havp

%changelog
* Tue Mar 21 2006 root <francesco.defilippo@sys-net.it> -
- Initial build.


havp-0.78.initd:

--- havp-0.78/etc/init.d/havp 2006-02-04 14:55:44.000000000 +0100
+++ havp-0.78-initd/etc/init.d/havp 2006-03-23 12:27:08.000000000 +0100
@@ -12,7 +12,7 @@
#
# Check for missing binaries
#
-HAVP_BIN=/usr/local/sbin/havp
+HAVP_BIN=/usr/sbin/havp
test -x $HAVP_BIN || exit 5

#
@@ -21,10 +21,10 @@
# havp.config to fit to your environment.
#
OPTION=
-#HAVP_CONFIG=/usr/local/etc/havp/havp.config
-#if [ -f $HAVP_CONFIG ] ; then
-#OPTION="-c $HAVP_CONFIG"
-#fi
+HAVP_CONFIG=/etc/havp/havp.config
+if [ -f $HAVP_CONFIG ] ; then
+OPTION="-c $HAVP_CONFIG"
+fi

source <<eof /dev/stdin
$($HAVP_BIN $OPTION -s)

Page 1 of 1 All times are UTC + 2 hours [ DST ]
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/