mirror of
https://git.FreeBSD.org/ports.git
synced 2025-01-08 06:48:28 +00:00
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>
This commit is contained in:
parent
b5138f61bb
commit
8b47eebfa5
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=250791
@ -71,6 +71,7 @@
|
||||
SUBDIR += clamassassin
|
||||
SUBDIR += clamav
|
||||
SUBDIR += clamav-devel
|
||||
SUBDIR += clamav-unofficial-sigs
|
||||
SUBDIR += clamcour
|
||||
SUBDIR += clamsmtp
|
||||
SUBDIR += clamtk
|
||||
|
60
security/clamav-unofficial-sigs/Makefile
Normal file
60
security/clamav-unofficial-sigs/Makefile
Normal file
@ -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>
|
3
security/clamav-unofficial-sigs/distinfo
Normal file
3
security/clamav-unofficial-sigs/distinfo
Normal file
@ -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
|
@ -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
|
@ -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"
|
31
security/clamav-unofficial-sigs/files/patch-clamd-status.sh
Normal file
31
security/clamav-unofficial-sigs/files/patch-clamd-status.sh
Normal file
@ -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"
|
15
security/clamav-unofficial-sigs/files/pkg-message.in
Normal file
15
security/clamav-unofficial-sigs/files/pkg-message.in
Normal file
@ -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.
|
||||
|
||||
**********************************************************************
|
29
security/clamav-unofficial-sigs/pkg-deinstall
Normal file
29
security/clamav-unofficial-sigs/pkg-deinstall
Normal file
@ -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
|
3
security/clamav-unofficial-sigs/pkg-descr
Normal file
3
security/clamav-unofficial-sigs/pkg-descr
Normal file
@ -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.
|
11
security/clamav-unofficial-sigs/pkg-plist
Normal file
11
security/clamav-unofficial-sigs/pkg-plist
Normal file
@ -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%%
|
Loading…
Reference in New Issue
Block a user