aboutsummaryrefslogtreecommitdiff
path: root/security/clamav-unofficial-sigs
diff options
context:
space:
mode:
authorMartin Wilke <miwi@FreeBSD.org>2010-03-09 22:34:08 +0000
committerMartin Wilke <miwi@FreeBSD.org>2010-03-09 22:34:08 +0000
commit8b47eebfa5ced9e39a37b04ba0d6d9218facc0cc (patch)
tree04492cd01827ab90b637d6e019c8030639178554 /security/clamav-unofficial-sigs
parentb5138f61bb1f540d6a76ab9f7829b5613d44978a (diff)
downloadports-8b47eebfa5ced9e39a37b04ba0d6d9218facc0cc.tar.gz
ports-8b47eebfa5ced9e39a37b04ba0d6d9218facc0cc.zip
The clamav-unofficial-sigs script provides the capability to download, test,
and update the third-party ClamAV signature databases provided by Sanesecurity, SecuriteInfo, MalwarePatrol, OITC, INetMsg and ScamNailer. PR: ports/144509 Submitted by: Marko Njezic <sf at maxempire.com>
Notes
Notes: svn path=/head/; revision=250791
Diffstat (limited to 'security/clamav-unofficial-sigs')
-rw-r--r--security/clamav-unofficial-sigs/Makefile60
-rw-r--r--security/clamav-unofficial-sigs/distinfo3
-rw-r--r--security/clamav-unofficial-sigs/files/patch-clamav-unofficial-sigs.conf44
-rw-r--r--security/clamav-unofficial-sigs/files/patch-clamav-unofficial-sigs.sh20
-rw-r--r--security/clamav-unofficial-sigs/files/patch-clamd-status.sh31
-rw-r--r--security/clamav-unofficial-sigs/files/pkg-message.in15
-rw-r--r--security/clamav-unofficial-sigs/pkg-deinstall29
-rw-r--r--security/clamav-unofficial-sigs/pkg-descr3
-rw-r--r--security/clamav-unofficial-sigs/pkg-plist11
9 files changed, 216 insertions, 0 deletions
diff --git a/security/clamav-unofficial-sigs/Makefile b/security/clamav-unofficial-sigs/Makefile
new file mode 100644
index 000000000000..e38c07f6450a
--- /dev/null
+++ b/security/clamav-unofficial-sigs/Makefile
@@ -0,0 +1,60 @@
+# New ports collection makefile for: clamav-unofficial-sigs
+# Date created: 2010-03-06
+# Whom: Marko Njezic <sf@maxempire.com>
+#
+# $FreeBSD$
+#
+
+PORTNAME= clamav-unofficial-sigs
+PORTVERSION= 3.7
+CATEGORIES= security
+MASTER_SITES= http://www.inetmsg.com/pub/ \
+ http://www.inetmsg.com/pub/archive/
+
+MAINTAINER= sf@maxempire.com
+COMMENT= Update script for third-party ClamAV databases
+
+RUN_DEPENDS= clamscan:${PORTSDIR}/security/clamav \
+ rsync:${PORTSDIR}/net/rsync \
+ curl:${PORTSDIR}/ftp/curl \
+ gpg:${PORTSDIR}/security/gnupg
+
+USE_PERL5_RUN= yes
+NO_BUILD= yes
+
+SUB_FILES= pkg-message
+
+MAN8= clamav-unofficial-sigs.8
+MANCOMPRESSED= no
+
+SED_CONF= -e 's|%%CLAM_DBS%%|/var/db/clamav|g' \
+ -e 's|%%CLAMD_PID%%|/var/run/clamav/clamd.pid|g' \
+ -e 's|%%CLAMD_SOCKET%%|/var/run/clamav/clamd.sock|g' \
+ -e 's|%%START_CLAMD%%|${PREFIX}/etc/rc.d/clamav-clamd start|g' \
+ -e 's|%%WORK_DIR%%|/var/db/clamav-unofficial-sigs|g'
+
+post-patch:
+ @${REINPLACE_CMD} -e 's|%%PREFIX%%|${PREFIX}|g' ${WRKSRC}/clamav-unofficial-sigs.sh
+ @${REINPLACE_CMD} ${SED_CONF} ${WRKSRC}/clamav-unofficial-sigs.conf
+ @${REINPLACE_CMD} ${SED_CONF} ${WRKSRC}/clamd-status.sh
+
+do-install:
+ ${INSTALL_SCRIPT} ${WRKSRC}/clamav-unofficial-sigs.sh ${PREFIX}/bin
+ ${INSTALL_MAN} ${WRKSRC}/clamav-unofficial-sigs.8 ${MANPREFIX}/man/man8
+ ${INSTALL_DATA} ${WRKSRC}/clamav-unofficial-sigs.conf ${PREFIX}/etc/clamav-unofficial-sigs.conf.sample
+
+.ifndef(NOPORTDOCS)
+ @${MKDIR} ${DOCSDIR}
+ cd ${WRKSRC} && ${INSTALL_DATA} CHANGELOG INSTALL LICENSE README ${DOCSDIR}
+.endif
+
+.ifndef(NOPORTEXAMPLES)
+ @${MKDIR} ${EXAMPLESDIR}
+ ${INSTALL_DATA} ${WRKSRC}/clamav-unofficial-sigs-cron ${EXAMPLESDIR}
+ ${INSTALL_DATA} ${WRKSRC}/clamav-unofficial-sigs-logrotate ${EXAMPLESDIR}
+ ${INSTALL_SCRIPT} ${WRKSRC}/clamd-status.sh ${EXAMPLESDIR}
+.endif
+
+ @${CAT} ${PKGMESSAGE}
+
+.include <bsd.port.mk>
diff --git a/security/clamav-unofficial-sigs/distinfo b/security/clamav-unofficial-sigs/distinfo
new file mode 100644
index 000000000000..f8da0a880842
--- /dev/null
+++ b/security/clamav-unofficial-sigs/distinfo
@@ -0,0 +1,3 @@
+MD5 (clamav-unofficial-sigs-3.7.tar.gz) = 86f319c5806e6ca76d4de47e6a49a710
+SHA256 (clamav-unofficial-sigs-3.7.tar.gz) = 2dc968c76b5d06a84eb85cae490d354207b57226ac450b4bad1d92cdc83395d1
+SIZE (clamav-unofficial-sigs-3.7.tar.gz) = 36400
diff --git a/security/clamav-unofficial-sigs/files/patch-clamav-unofficial-sigs.conf b/security/clamav-unofficial-sigs/files/patch-clamav-unofficial-sigs.conf
new file mode 100644
index 000000000000..63680369aa99
--- /dev/null
+++ b/security/clamav-unofficial-sigs/files/patch-clamav-unofficial-sigs.conf
@@ -0,0 +1,44 @@
+--- clamav-unofficial-sigs.conf 2010-03-06 09:52:30.000000000 +0100
++++ clamav-unofficial-sigs.conf.patched 2010-03-06 09:54:08.000000000 +0100
+@@ -42,10 +42,10 @@
+
+ # Set path to ClamAV database files location. If unsure, check
+ # your clamd.conf file for the "DatabaseDirectory" path setting.
+-clam_dbs="/var/lib/clamav"
++clam_dbs="%%CLAM_DBS%%"
+
+ # Set path to clamd.pid file (see clamd.conf for path location).
+-clamd_pid="/var/run/clamd.pid"
++clamd_pid="%%CLAMD_PID%%"
+
+ # To enable "ham" (non-spam) directory scanning and removal of
+ # signatures that trigger on ham messages, uncomment the following
+@@ -76,7 +76,7 @@
+ # the script will still run). You will also need to set the correct
+ # path to your clamd socket file (if unsure of the path, check the
+ # "LocalSocket" setting in your clamd.conf file for socket location).
+-#clamd_socket="/var/run/clamd.socket"
++#clamd_socket="%%CLAMD_SOCKET%%"
+
+ # If you would like to attempt to restart ClamD if detected not running,
+ # uncomment the next 2 lines. Confirm the path to the "clamd_lock" file
+@@ -86,8 +86,8 @@
+ # NOTE: these 2 variables are dependant on the "clamd_socket" variable
+ # shown above - if not enabled, then the following 2 variables will be
+ # ignored, whether enabled or not.
+-#clamd_lock="/var/lock/subsys/clamd"
+-#start_clamd="service clamd start"
++#clamd_lock=""
++#start_clamd="%%START_CLAMD%%"
+
+ # Enable or disable download time randomization. This allows the script to
+ # be executed via cron, but the actual database file checking will pause
+@@ -216,7 +216,7 @@
+ # Set working directory paths (edit to meet your own needs). If these
+ # directories do not exist, the script will attempt to create them.
+ # Top level working directory path:
+-work_dir="/usr/unofficial-dbs" #Top level working directory
++work_dir="%%WORK_DIR%%" #Top level working directory
+ # Sub-directory names:
+ ss_dir="$work_dir/ss-dbs" # Sanesecurity sub-directory
+ si_dir="$work_dir/si-dbs" # SecuriteInfo sub-directory
diff --git a/security/clamav-unofficial-sigs/files/patch-clamav-unofficial-sigs.sh b/security/clamav-unofficial-sigs/files/patch-clamav-unofficial-sigs.sh
new file mode 100644
index 000000000000..860cb149bf3d
--- /dev/null
+++ b/security/clamav-unofficial-sigs/files/patch-clamav-unofficial-sigs.sh
@@ -0,0 +1,20 @@
+--- clamav-unofficial-sigs.sh 2010-01-24 02:38:29.000000000 +0100
++++ clamav-unofficial-sigs.sh.patched 2010-03-06 08:52:32.000000000 +0100
+@@ -19,7 +19,7 @@
+ # #
+ ################################################################################
+
+-default_config="/etc/clamav-unofficial-sigs.conf"
++default_config="%%PREFIX%%/etc/clamav-unofficial-sigs.conf"
+
+ version="v3.7 (updated 2010-01-23)"
+ output_ver="
+@@ -407,6 +407,8 @@
+ exit
+ ;;
+ r) no_default_config
++ pkg_mgr="FreeBSD ports"
++ pkg_rm="pkg_delete"
+ if [ -n "$pkg_mgr" -a -n "$pkg_rm" ]
+ then
+ echo " This script (clamav-unofficial-sigs) was installed on the system"
diff --git a/security/clamav-unofficial-sigs/files/patch-clamd-status.sh b/security/clamav-unofficial-sigs/files/patch-clamd-status.sh
new file mode 100644
index 000000000000..c3b42c06fde4
--- /dev/null
+++ b/security/clamav-unofficial-sigs/files/patch-clamd-status.sh
@@ -0,0 +1,31 @@
+--- clamd-status.sh 2010-01-24 02:38:29.000000000 +0100
++++ clamd-status.sh.patched 2010-03-06 09:57:03.000000000 +0100
+@@ -24,7 +24,7 @@
+ export PATH
+
+ # Set path to clamd.pid file (see clamd.conf for path location).
+-clamd_pid="/var/run/clamav/clamd.pid"
++clamd_pid="%%CLAMD_PID%%"
+
+ # If running clamd in "LocalSocket" mode (*NOT* in TCP/IP mode), and
+ # either "SOcket Cat" (socat) or the "IO::Socket::UNIX" perl module
+@@ -34,7 +34,7 @@
+ # the script will still run). You will also need to set the correct
+ # path to your clamd socket file (if unsure of the path, check the
+ # "LocalSocket" setting in your clamd.conf file for socket location).
+-clamd_socket="/var/run/clamav/clamd.sock"
++clamd_socket="%%CLAMD_SOCKET%%"
+
+ # If you would like to attemtp to restart ClamD if detected not running,
+ # uncomment the next 2 lines. Confirm the path to the "clamd_lock" file
+@@ -44,8 +44,8 @@
+ # NOTE: these 2 variables are dependant on the "clamd_socket" variable
+ # shown above - if not enabled, then the following 2 variables will be
+ # ignored, whether enabled or not.
+-clamd_lock="/var/lock/subsys/clamd"
+-start_clamd="service clamd start"
++clamd_lock=""
++start_clamd="%%START_CLAMD%%"
+
+ # To only report issues, set the following variable to "yes".
+ only_report_issues="yes"
diff --git a/security/clamav-unofficial-sigs/files/pkg-message.in b/security/clamav-unofficial-sigs/files/pkg-message.in
new file mode 100644
index 000000000000..4fbaa34a954c
--- /dev/null
+++ b/security/clamav-unofficial-sigs/files/pkg-message.in
@@ -0,0 +1,15 @@
+**********************************************************************
+
+In order to start using clamav-unofficial-sigs, you need to configure
+it first. A sample configuration file has been installed to:
+
+%%PREFIX%%/etc/clamav-unofficial-sigs.conf.sample
+
+Modify it according to your needs and copy to:
+
+%%PREFIX%%/etc/clamav-unofficial-sigs.conf
+
+To run the script periodically by cron, you also need to add it to
+your crontab.
+
+**********************************************************************
diff --git a/security/clamav-unofficial-sigs/pkg-deinstall b/security/clamav-unofficial-sigs/pkg-deinstall
new file mode 100644
index 000000000000..8a390f834be9
--- /dev/null
+++ b/security/clamav-unofficial-sigs/pkg-deinstall
@@ -0,0 +1,29 @@
+#!/bin/sh
+# $FreeBSD$
+
+PATH="/bin:/sbin:/usr/bin:/usr/sbin"
+
+if [ "$2" = "POST-DEINSTALL" ]; then
+
+ echo "**********************************************************************"
+ echo ""
+ echo "In order to completely remove clamav-unofficial-sigs you need to"
+ echo "completely remove its working directory and installed third-party"
+ echo "signature databases from ClamAV's database directory."
+
+ if [ -f "/var/db/clamav-unofficial-sigs/configs/purge.txt" ]; then
+
+ echo ""
+ echo "As a guide what needs to be removed you can take a look at the:"
+ echo ""
+ echo "/var/db/clamav-unofficial-sigs/configs/purge.txt"
+ echo ""
+ echo "file, which lists all files related to clamav-unofficial-sigs."
+ fi
+
+ echo ""
+ echo "**********************************************************************"
+
+fi
+
+exit 0
diff --git a/security/clamav-unofficial-sigs/pkg-descr b/security/clamav-unofficial-sigs/pkg-descr
new file mode 100644
index 000000000000..d4f0c98548e7
--- /dev/null
+++ b/security/clamav-unofficial-sigs/pkg-descr
@@ -0,0 +1,3 @@
+The clamav-unofficial-sigs script provides the capability to download, test,
+and update the third-party ClamAV signature databases provided by
+Sanesecurity, SecuriteInfo, MalwarePatrol, OITC, INetMsg and ScamNailer.
diff --git a/security/clamav-unofficial-sigs/pkg-plist b/security/clamav-unofficial-sigs/pkg-plist
new file mode 100644
index 000000000000..596cb56f866b
--- /dev/null
+++ b/security/clamav-unofficial-sigs/pkg-plist
@@ -0,0 +1,11 @@
+bin/clamav-unofficial-sigs.sh
+etc/clamav-unofficial-sigs.conf.sample
+%%PORTDOCS%%%%DOCSDIR%%/CHANGELOG
+%%PORTDOCS%%%%DOCSDIR%%/INSTALL
+%%PORTDOCS%%%%DOCSDIR%%/LICENSE
+%%PORTDOCS%%%%DOCSDIR%%/README
+%%PORTDOCS%%@dirrm %%DOCSDIR%%
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/clamav-unofficial-sigs-cron
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/clamav-unofficial-sigs-logrotate
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/clamd-status.sh
+%%PORTEXAMPLES%%@dirrm %%EXAMPLESDIR%%