mirror of
https://git.FreeBSD.org/ports.git
synced 2025-01-03 06:04:53 +00:00
security/clamav-unofficial-sigs: 3.7.2 -> 5.0.4, extremeshok fork
Changes: (long!) https://github.com/extremeshok/clamav-unofficial-sigs/releases This version of clamav-unofficial-sigs is eXtremeSHOK's fork. Configuration file location has changed from %PREFIX%/clamav-unofficial-sigs.conf to %PREFIX%/clamav-unofficial-sigs/ master.conf and os.conf hold default values, local changes should be placed in user.conf. PR: 208326 Submitted by: Talal Al Dik <tad@vif.com>, Lukasz Wasikowski <lukasz@wasikowski.net> Approved by: sf@maxempire.com (maintainer)
This commit is contained in:
parent
457fdb67b5
commit
85054a126a
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=412222
12
UPDATING
12
UPDATING
@ -5,6 +5,18 @@ they are unavoidable.
|
||||
You should get into the habit of checking this file for changes each time
|
||||
you update your ports collection, before attempting any port upgrades.
|
||||
|
||||
20160331:
|
||||
AFFECTS: security/clamav-unofficial-sigs
|
||||
AUTHOR: lukasz@wasikowski.net, sf@maxempire.com
|
||||
|
||||
This version of clamav-unofficial-sigs is eXtremeSHOK's fork.
|
||||
Configuration file location has changed from
|
||||
%PREFIX%/clamav-unofficial-sigs.conf to
|
||||
%PREFIX%/clamav-unofficial-sigs/
|
||||
|
||||
master.conf and os.conf hold default values, local changes should
|
||||
be placed in user.conf.
|
||||
|
||||
20160324:
|
||||
AFFECTS: print/ghostscript9-base
|
||||
AUTHOR: tijl@FreeBSD.org
|
||||
|
@ -2,49 +2,50 @@
|
||||
# $FreeBSD$
|
||||
|
||||
PORTNAME= clamav-unofficial-sigs
|
||||
PORTVERSION= 3.7.2
|
||||
PORTREVISION= 2
|
||||
PORTVERSION= 5.0.4
|
||||
CATEGORIES= security
|
||||
MASTER_SITES= SF/unofficial-sigs/
|
||||
|
||||
MAINTAINER= sf@maxempire.com
|
||||
COMMENT= Update script for third-party ClamAV databases
|
||||
|
||||
LICENSE= BSD3CLAUSE
|
||||
LICENSE_FILE= ${WRKSRC}/LICENSE
|
||||
|
||||
RUN_DEPENDS= clamscan:${PORTSDIR}/security/clamav \
|
||||
rsync:${PORTSDIR}/net/rsync \
|
||||
curl:${PORTSDIR}/ftp/curl \
|
||||
gpg:${PORTSDIR}/security/gnupg
|
||||
gpg:${PORTSDIR}/security/gnupg \
|
||||
bash:${PORTSDIR}/shells/bash
|
||||
|
||||
USES= perl5
|
||||
USE_GITHUB= yes
|
||||
GH_ACCOUNT= extremeshok
|
||||
|
||||
USES= perl5 shebangfix
|
||||
SHEBANG_FILES= clamav-unofficial-sigs.sh
|
||||
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
|
||||
@${REINPLACE_CMD} -e 's|%%PREFIX%%|${PREFIX}|g' ${WRKSRC}/clamav-unofficial-sigs.sh ${WRKSRC}/cron.d/clamav-unofficial-sigs
|
||||
|
||||
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}${ETCDIR}
|
||||
${INSTALL_DATA} ${WRKSRC}/config/master.conf ${STAGEDIR}${ETCDIR}/master.conf.sample
|
||||
${INSTALL_DATA} ${WRKSRC}/config/os.freebsd.conf ${STAGEDIR}${ETCDIR}/os.conf.sample
|
||||
${INSTALL_DATA} ${WRKSRC}/config/user.conf ${STAGEDIR}${ETCDIR}/user.conf.sample
|
||||
|
||||
@${MKDIR} ${STAGEDIR}${DOCSDIR}
|
||||
(cd ${WRKSRC} && ${INSTALL_DATA} CHANGELOG INSTALL LICENSE README ${STAGEDIR}${DOCSDIR})
|
||||
(cd ${WRKSRC} && ${INSTALL_DATA} INSTALL LICENSE README.md ${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}
|
||||
${INSTALL_DATA} ${WRKSRC}/cron.d/clamav-unofficial-sigs ${STAGEDIR}${EXAMPLESDIR}/clamav-unofficial-sigs-cron
|
||||
${INSTALL_DATA} ${WRKSRC}/logrotate.d/clamav-unofficial-sigs ${STAGEDIR}${EXAMPLESDIR}/clamav-unofficial-sigs-logrotate
|
||||
|
||||
.include <bsd.port.mk>
|
||||
|
@ -1,2 +1,2 @@
|
||||
SHA256 (clamav-unofficial-sigs-3.7.2.tar.gz) = 96e98e6e4434c5950fa9831c6a43236fed7eabae44beded16171305cf3f9bdb9
|
||||
SIZE (clamav-unofficial-sigs-3.7.2.tar.gz) = 38549
|
||||
SHA256 (extremeshok-clamav-unofficial-sigs-5.0.4_GH0.tar.gz) = 156ddea8fbb2612fac1d5f4baa0902d325821040f4b794acf81c7d7e8525f35b
|
||||
SIZE (extremeshok-clamav-unofficial-sigs-5.0.4_GH0.tar.gz) = 31931
|
||||
|
@ -1,53 +0,0 @@
|
||||
--- 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"
|
||||
|
@ -1,32 +1,32 @@
|
||||
--- clamav-unofficial-sigs.sh 2013-08-27 18:08:25.000000000 +0200
|
||||
+++ clamav-unofficial-sigs.sh.patched 2014-12-06 23:55:50.000000000 +0100
|
||||
@@ -16,7 +16,7 @@
|
||||
# #
|
||||
################################################################################
|
||||
--- clamav-unofficial-sigs.sh.orig 2016-03-31 13:04:08 UTC
|
||||
+++ clamav-unofficial-sigs.sh
|
||||
@@ -158,7 +158,7 @@ minimum_required_config_version="56"
|
||||
version_date="31 March 2016"
|
||||
|
||||
-default_config="/etc/clamav-unofficial-sigs.conf"
|
||||
+default_config="%%PREFIX%%/etc/clamav-unofficial-sigs.conf"
|
||||
#default config files
|
||||
-config_dir="/etc/clamav-unofficial-sigs"
|
||||
+config_dir="/usr/local/etc/clamav-unofficial-sigs"
|
||||
config_files=("$config_dir/master.conf" "$config_dir/os.conf" "$config_dir/user.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"
|
||||
@@ -1016,9 +1018,9 @@
|
||||
comment "======================================================================"
|
||||
comment "Sanesecurity Database & GPG Signature File Updates"
|
||||
comment "======================================================================"
|
||||
- ss_mirror_ips=`dig +ignore +short $ss_url`
|
||||
+ ss_mirror_ips=`host $ss_url | sed 's/.*\s//'`
|
||||
for ss_mirror_ip in $ss_mirror_ips ; do
|
||||
- ss_mirror_name=`dig +short -x $ss_mirror_ip | sed 's/\.$//'`
|
||||
+ ss_mirror_name=`host $ss_mirror_ip | sed 's/.*\s//' | sed 's/\.$//'`
|
||||
ss_mirror_site_info="$ss_mirror_name $ss_mirror_ip"
|
||||
comment ""
|
||||
comment "Sanesecurity mirror site used: $ss_mirror_site_info"
|
||||
|
||||
@@ -542,6 +542,8 @@ make_signature_database_from_ascii_file
|
||||
#Remove the clamav-unofficial-sigs script
|
||||
remove_script () {
|
||||
echo ""
|
||||
+ 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"
|
||||
echo " via '$pkg_mgr', use '$pkg_rm' to remove the script"
|
||||
@@ -1088,9 +1090,9 @@ if [ "$sanesecurity_enabled" == "yes" ]
|
||||
db_file=""
|
||||
|
||||
xshok_pretty_echo_and_log "Sanesecurity Database & GPG Signature File Updates" "="
|
||||
- sanesecurity_mirror_ips=`dig +ignore +short $sanesecurity_url`
|
||||
+ sanesecurity_mirror_ips=`host $sanesecurity_url | sed 's/.*\s//'`
|
||||
for sanesecurity_mirror_ip in $sanesecurity_mirror_ips ; do
|
||||
- sanesecurity_mirror_name=`dig +short -x $sanesecurity_mirror_ip | command sed 's/\.$//'`
|
||||
+ sanesecurity_mirror_name=`host $sanesecurity_mirror_ip | sed 's/.*\s//' | sed 's/\.$//'`
|
||||
sanesecurity_mirror_site_info="$sanesecurity_mirror_name $sanesecurity_mirror_ip"
|
||||
xshok_pretty_echo_and_log "Sanesecurity mirror site used: $sanesecurity_mirror_site_info"
|
||||
rsync $rsync_output_level $no_motd --files-from=$sanesecurity_include_dbs -ctuz $connect_timeout --timeout="$rsync_max_time" --stats rsync://$sanesecurity_mirror_ip/sanesecurity $sanesecurity_dir 2>/dev/null
|
||||
|
@ -1,31 +0,0 @@
|
||||
--- 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"
|
@ -0,0 +1,13 @@
|
||||
--- config/master.conf.orig 2016-03-31 01:16:02 UTC
|
||||
+++ config/master.conf
|
||||
@@ -58,8 +58,8 @@ reload_dbs="yes"
|
||||
work_dir="/var/lib/clamav-unofficial-sigs" #Top level working directory
|
||||
|
||||
# Log update information to '$log_file_path/$log_file_name'.
|
||||
-logging_enabled="yes"
|
||||
-log_file_path="/var/log/clamav-unofficial-sigs"
|
||||
+logging_enabled="no"
|
||||
+log_file_path="/var/log"
|
||||
log_file_name="clamav-unofficial-sigs.log"
|
||||
|
||||
|
@ -0,0 +1,14 @@
|
||||
--- config/os.freebsd.conf.orig 2016-03-31 01:16:02 UTC
|
||||
+++ config/os.freebsd.conf
|
||||
@@ -32,11 +32,6 @@ clamd_pid="/var/run/clamav/clamd.pid"
|
||||
|
||||
work_dir="/var/db/clamav-unofficial-sigs"
|
||||
|
||||
-log_file_path="/var/log/clamav"
|
||||
-
|
||||
clamd_restart_opt="service clamav-clamd reload"
|
||||
|
||||
#clamd_socket="/var/run/clamav/clamd.sock"
|
||||
-
|
||||
-pkg_mgr="FreeBSD ports"
|
||||
-pkg_rm="pkg remove"
|
11
security/clamav-unofficial-sigs/files/patch-config_user.conf
Normal file
11
security/clamav-unofficial-sigs/files/patch-config_user.conf
Normal file
@ -0,0 +1,11 @@
|
||||
--- config/user.conf.orig 2016-03-31 01:16:02 UTC
|
||||
+++ config/user.conf
|
||||
@@ -20,6 +20,8 @@
|
||||
# SEE MASTER.CONF FOR CONFIG EXPLAINATIONS
|
||||
################################################################################
|
||||
|
||||
+# IMPORTANT: Logging options should only be changed in master.conf file!
|
||||
+
|
||||
# Values in this file will always override those in the master.conf and os.conf files.
|
||||
# This is useful to specify your authorisation/receipt codes and to always force certain options.
|
||||
# Please note, it is your responsibility to manage the contents of this file.
|
@ -0,0 +1,8 @@
|
||||
--- cron.d/clamav-unofficial-sigs.orig 2016-03-31 01:16:02 UTC
|
||||
+++ cron.d/clamav-unofficial-sigs
|
||||
@@ -22,4 +22,4 @@
|
||||
# 60 - 600 seconds. Adjust the cron start time, user account to run the
|
||||
# script under, and path information shown below to meet your own needs.
|
||||
|
||||
-45 * * * * root /bin/bash /usr/local/bin/clamav-unofficial-sigs.sh > /dev/null
|
||||
+45 * * * * root /usr/local/bin/bash /usr/local/bin/clamav-unofficial-sigs.sh > /dev/null
|
@ -0,0 +1,20 @@
|
||||
--- logrotate.d/clamav-unofficial-sigs.orig 2016-03-31 01:16:02 UTC
|
||||
+++ logrotate.d/clamav-unofficial-sigs
|
||||
@@ -14,7 +14,7 @@
|
||||
#
|
||||
##################
|
||||
|
||||
-/var/log/clamav-unofficial-sigs/clamav-unofficial-sigs.log {
|
||||
+/var/log/clamav-unofficial-sigs.log {
|
||||
weekly
|
||||
rotate 4
|
||||
missingok
|
||||
@@ -24,7 +24,7 @@
|
||||
# UNCOMMENT the specific line for your OS
|
||||
|
||||
## Debian / Ubuntu / Archlinux / Freebsd / Gentoo / Slackware / Raspbian
|
||||
-# create 0644 clamav clamav
|
||||
+ create 0644 clamav clamav
|
||||
|
||||
## Redhat / CentOS 6
|
||||
# create 0644 clam clam
|
@ -1,15 +1,27 @@
|
||||
**********************************************************************
|
||||
|
||||
In order to start using clamav-unofficial-sigs, you need to configure
|
||||
it first. A sample configuration file has been installed to:
|
||||
it first. Sample configuration files have been installed to:
|
||||
|
||||
%%PREFIX%%/etc/clamav-unofficial-sigs.conf.sample
|
||||
%%ETCDIR%%
|
||||
|
||||
Modify it according to your needs and copy to:
|
||||
All user configuration changes should go in file "user.conf". Modify
|
||||
it according to your needs and when you are done set the value of
|
||||
"user_configuration_complete" parameter to "yes".
|
||||
|
||||
NOTE: Starting with version 5.0.0 configuration has been split into
|
||||
multiple files, which now reside in:
|
||||
|
||||
%%ETCDIR%%
|
||||
|
||||
If you had previous version installed, you can remove the old
|
||||
obsolete configuration file:
|
||||
|
||||
%%PREFIX%%/etc/clamav-unofficial-sigs.conf
|
||||
|
||||
To run the script periodically by cron, you also need to add it to
|
||||
your crontab.
|
||||
your crontab. Sample crontab and logrotate files are located in:
|
||||
|
||||
%%EXAMPLESDIR%%
|
||||
|
||||
**********************************************************************
|
||||
|
@ -1,3 +1,5 @@
|
||||
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.
|
||||
|
||||
WWW: https://github.com/extremeshok/clamav-unofficial-sigs
|
||||
|
@ -1,10 +1,10 @@
|
||||
bin/clamav-unofficial-sigs.sh
|
||||
etc/clamav-unofficial-sigs.conf.sample
|
||||
@sample %%ETCDIR%%/master.conf.sample
|
||||
@sample %%ETCDIR%%/os.conf.sample
|
||||
@sample %%ETCDIR%%/user.conf.sample
|
||||
man/man8/clamav-unofficial-sigs.8.gz
|
||||
%%PORTDOCS%%%%DOCSDIR%%/CHANGELOG
|
||||
%%PORTDOCS%%%%DOCSDIR%%/INSTALL
|
||||
%%PORTDOCS%%%%DOCSDIR%%/LICENSE
|
||||
%%PORTDOCS%%%%DOCSDIR%%/README
|
||||
%%PORTDOCS%%%%DOCSDIR%%/README.md
|
||||
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/clamav-unofficial-sigs-cron
|
||||
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/clamav-unofficial-sigs-logrotate
|
||||
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/clamd-status.sh
|
||||
|
Loading…
Reference in New Issue
Block a user