[Midnightbsd-cvs] mports [16418] trunk/security: add unofficial sigs port.
laffer1 at midnightbsd.org
laffer1 at midnightbsd.org
Wed Jul 30 17:30:24 EDT 2014
Revision: 16418
http://svnweb.midnightbsd.org/mports/?rev=16418
Author: laffer1
Date: 2014-07-30 17:30:24 -0400 (Wed, 30 Jul 2014)
Log Message:
-----------
add unofficial sigs port.
Modified Paths:
--------------
trunk/security/Makefile
Added Paths:
-----------
trunk/security/clamav-unofficial-sigs/
trunk/security/clamav-unofficial-sigs/Makefile
trunk/security/clamav-unofficial-sigs/distinfo
trunk/security/clamav-unofficial-sigs/files/
trunk/security/clamav-unofficial-sigs/files/patch-clamav-unofficial-sigs.conf
trunk/security/clamav-unofficial-sigs/files/patch-clamav-unofficial-sigs.sh
trunk/security/clamav-unofficial-sigs/files/patch-clamd-status.sh
trunk/security/clamav-unofficial-sigs/files/pkg-message.in
trunk/security/clamav-unofficial-sigs/pkg-deinstall
trunk/security/clamav-unofficial-sigs/pkg-descr
trunk/security/clamav-unofficial-sigs/pkg-plist
Modified: trunk/security/Makefile
===================================================================
--- trunk/security/Makefile 2014-07-30 21:28:37 UTC (rev 16417)
+++ trunk/security/Makefile 2014-07-30 21:30:24 UTC (rev 16418)
@@ -8,6 +8,7 @@
SUBDIR += chroot_safe
SUBDIR += clamav
SUBDIR += clamav-milter
+SUBDIR += clamav-unofficial-sigs
SUBDIR += courier-authlib
SUBDIR += courier-authlib-base
SUBDIR += courierpassd
Added: trunk/security/clamav-unofficial-sigs/Makefile
===================================================================
--- trunk/security/clamav-unofficial-sigs/Makefile (rev 0)
+++ trunk/security/clamav-unofficial-sigs/Makefile 2014-07-30 21:30:24 UTC (rev 16418)
@@ -0,0 +1,50 @@
+# $MidnightBSD$
+
+PORTNAME= clamav-unofficial-sigs
+PORTVERSION= 3.7.2
+CATEGORIES= security
+MASTER_SITES= SF/unofficial-sigs/
+
+MAINTAINER= ports at MidnightBSD.org
+COMMENT= Update script for third-party ClamAV databases
+
+LICENSE= bsd3
+
+RUN_DEPENDS= clamscan:${PORTSDIR}/security/clamav \
+ rsync:${PORTSDIR}/net/rsync \
+ curl:${PORTSDIR}/ftp/curl \
+ gpg:${PORTSDIR}/security/gnupg
+
+USES= perl5
+USE_PERL5= run
+NO_BUILD= yes
+
+SUB_FILES= pkg-message
+
+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'
+
+OPTIONS_DEFINE= DOCS EXAMPLES
+
+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 ${STAGEDIR}${PREFIX}/bin
+ ${INSTALL_MAN} ${WRKSRC}/clamav-unofficial-sigs.8 ${STAGEDIR}${MANPREFIX}/man/man8
+ ${INSTALL_DATA} ${WRKSRC}/clamav-unofficial-sigs.conf ${STAGEDIR}${PREFIX}/etc/clamav-unofficial-sigs.conf.sample
+
+ @${MKDIR} ${STAGEDIR}${DOCSDIR}
+ (cd ${WRKSRC} && ${INSTALL_DATA} CHANGELOG INSTALL LICENSE README ${STAGEDIR}${DOCSDIR})
+
+ @${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
+ ${INSTALL_DATA} ${WRKSRC}/clamav-unofficial-sigs-cron ${STAGEDIR}${EXAMPLESDIR}
+ ${INSTALL_DATA} ${WRKSRC}/clamav-unofficial-sigs-logrotate ${STAGEDIR}${EXAMPLESDIR}
+ ${INSTALL_SCRIPT} ${WRKSRC}/clamd-status.sh ${STAGEDIR}${EXAMPLESDIR}
+
+.include <bsd.port.mk>
Added: trunk/security/clamav-unofficial-sigs/distinfo
===================================================================
--- trunk/security/clamav-unofficial-sigs/distinfo (rev 0)
+++ trunk/security/clamav-unofficial-sigs/distinfo 2014-07-30 21:30:24 UTC (rev 16418)
@@ -0,0 +1,2 @@
+SHA256 (clamav-unofficial-sigs-3.7.2.tar.gz) = 96e98e6e4434c5950fa9831c6a43236fed7eabae44beded16171305cf3f9bdb9
+SIZE (clamav-unofficial-sigs-3.7.2.tar.gz) = 38549
Added: trunk/security/clamav-unofficial-sigs/files/patch-clamav-unofficial-sigs.conf
===================================================================
--- trunk/security/clamav-unofficial-sigs/files/patch-clamav-unofficial-sigs.conf (rev 0)
+++ trunk/security/clamav-unofficial-sigs/files/patch-clamav-unofficial-sigs.conf 2014-07-30 21:30:24 UTC (rev 16418)
@@ -0,0 +1,53 @@
+--- clamav-unofficial-sigs.conf 2013-08-27 18:08:25.000000000 +0200
++++ clamav-unofficial-sigs.conf.patched 2013-09-04 16:19:11.000000000 +0200
+@@ -50,10 +50,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
+@@ -84,7 +84,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
+@@ -94,8 +94,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
+@@ -227,7 +227,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
+@@ -252,7 +252,7 @@
+ comment_silence="no" # Default is "no" to report script comments
+
+ # Log update information to '$log_file_path/$log_file_name'.
+-enable_logging="yes"
++enable_logging="no"
+ log_file_path="/var/log"
+ log_file_name="clamav-unofficial-sigs.log"
+
Added: trunk/security/clamav-unofficial-sigs/files/patch-clamav-unofficial-sigs.sh
===================================================================
--- trunk/security/clamav-unofficial-sigs/files/patch-clamav-unofficial-sigs.sh (rev 0)
+++ trunk/security/clamav-unofficial-sigs/files/patch-clamav-unofficial-sigs.sh 2014-07-30 21:30:24 UTC (rev 16418)
@@ -0,0 +1,20 @@
+--- clamav-unofficial-sigs.sh 2013-08-27 18:08:25.000000000 +0200
++++ clamav-unofficial-sigs.sh.patched 2013-09-04 16:10:35.000000000 +0200
+@@ -16,7 +16,7 @@
+ # #
+ ################################################################################
+
+-default_config="/etc/clamav-unofficial-sigs.conf"
++default_config="%%PREFIX%%/etc/clamav-unofficial-sigs.conf"
+
+ version="v3.7.2 (updated 2013-08-25)"
+ output_ver="
+@@ -418,6 +418,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"
Added: trunk/security/clamav-unofficial-sigs/files/patch-clamd-status.sh
===================================================================
--- trunk/security/clamav-unofficial-sigs/files/patch-clamd-status.sh (rev 0)
+++ trunk/security/clamav-unofficial-sigs/files/patch-clamd-status.sh 2014-07-30 21:30:24 UTC (rev 16418)
@@ -0,0 +1,31 @@
+--- clamd-status.sh 2013-08-27 18:08:25.000000000 +0200
++++ clamd-status.sh.patched 2013-09-04 16:09:58.000000000 +0200
+@@ -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"
Added: trunk/security/clamav-unofficial-sigs/files/pkg-message.in
===================================================================
--- trunk/security/clamav-unofficial-sigs/files/pkg-message.in (rev 0)
+++ trunk/security/clamav-unofficial-sigs/files/pkg-message.in 2014-07-30 21:30:24 UTC (rev 16418)
@@ -0,0 +1,11 @@
+**********************************************************************
+
+In order to start using clamav-unofficial-sigs, you need to configure
+modify the configuration file according to your needs:
+
+%%PREFIX%%/etc/clamav-unofficial-sigs.conf
+
+To run the script periodically by cron, you also need to add it to
+your crontab.
+
+**********************************************************************
Added: trunk/security/clamav-unofficial-sigs/pkg-deinstall
===================================================================
--- trunk/security/clamav-unofficial-sigs/pkg-deinstall (rev 0)
+++ trunk/security/clamav-unofficial-sigs/pkg-deinstall 2014-07-30 21:30:24 UTC (rev 16418)
@@ -0,0 +1,29 @@
+#!/bin/sh
+# $FreeBSD: head/security/clamav-unofficial-sigs/pkg-deinstall 340719 2014-01-22 15:52:06Z mat $
+
+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
Added: trunk/security/clamav-unofficial-sigs/pkg-descr
===================================================================
--- trunk/security/clamav-unofficial-sigs/pkg-descr (rev 0)
+++ trunk/security/clamav-unofficial-sigs/pkg-descr 2014-07-30 21:30:24 UTC (rev 16418)
@@ -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, etc.
Added: trunk/security/clamav-unofficial-sigs/pkg-plist
===================================================================
--- trunk/security/clamav-unofficial-sigs/pkg-plist (rev 0)
+++ trunk/security/clamav-unofficial-sigs/pkg-plist 2014-07-30 21:30:24 UTC (rev 16418)
@@ -0,0 +1,12 @@
+bin/clamav-unofficial-sigs.sh
+ at sample etc/clamav-unofficial-sigs.conf.sample
+man/man8/clamav-unofficial-sigs.8.gz
+%%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%%
More information about the Midnightbsd-cvs
mailing list