Index: head/security/clamav-unofficial-sigs/Makefile =================================================================== --- head/security/clamav-unofficial-sigs/Makefile (revision 412380) +++ head/security/clamav-unofficial-sigs/Makefile (revision 412381) @@ -1,52 +1,51 @@ # Created by: Marko Njezic # $FreeBSD$ PORTNAME= clamav-unofficial-sigs -PORTVERSION= 5.0.4 -PORTREVISION= 1 +PORTVERSION= 5.0.5 CATEGORIES= security MAINTAINER= sf@maxempire.com COMMENT= Update script for third-party ClamAV databases LICENSE= BSD3CLAUSE LICENSE_FILE= ${WRKSRC}/LICENSE RUN_DEPENDS= clamscan:security/clamav \ rsync:net/rsync \ curl:ftp/curl \ gpg:security/gnupg \ bash:shells/bash 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 OPTIONS_DEFINE= DOCS EXAMPLES post-patch: @${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 @${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} INSTALL LICENSE README.md ${STAGEDIR}${DOCSDIR}) @${MKDIR} ${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 Index: head/security/clamav-unofficial-sigs/distinfo =================================================================== --- head/security/clamav-unofficial-sigs/distinfo (revision 412380) +++ head/security/clamav-unofficial-sigs/distinfo (revision 412381) @@ -1,2 +1,2 @@ -SHA256 (extremeshok-clamav-unofficial-sigs-5.0.4_GH0.tar.gz) = 156ddea8fbb2612fac1d5f4baa0902d325821040f4b794acf81c7d7e8525f35b -SIZE (extremeshok-clamav-unofficial-sigs-5.0.4_GH0.tar.gz) = 31931 +SHA256 (extremeshok-clamav-unofficial-sigs-5.0.5_GH0.tar.gz) = 2aeba3f281511f5acc1d79b5f3460440cd579c75ae23b28d1dabde8321a87570 +SIZE (extremeshok-clamav-unofficial-sigs-5.0.5_GH0.tar.gz) = 34027 Index: head/security/clamav-unofficial-sigs/files/patch-config_user.conf =================================================================== --- head/security/clamav-unofficial-sigs/files/patch-config_user.conf (revision 412380) +++ head/security/clamav-unofficial-sigs/files/patch-config_user.conf (nonexistent) @@ -1,11 +0,0 @@ ---- 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. Property changes on: head/security/clamav-unofficial-sigs/files/patch-config_user.conf ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/security/clamav-unofficial-sigs/files/patch-clamav-unofficial-sigs.sh =================================================================== --- head/security/clamav-unofficial-sigs/files/patch-clamav-unofficial-sigs.sh (revision 412380) +++ head/security/clamav-unofficial-sigs/files/patch-clamav-unofficial-sigs.sh (revision 412381) @@ -1,32 +1,45 @@ ---- clamav-unofficial-sigs.sh.orig 2016-03-31 14:38:13 UTC +--- clamav-unofficial-sigs.sh.orig 2016-04-02 05:47:26 UTC +++ clamav-unofficial-sigs.sh -@@ -158,7 +158,7 @@ minimum_required_config_version="56" - version_date="31 March 2016" +@@ -187,7 +187,7 @@ script_version_date="02 April 2016" + minimum_required_config_version="56" #default config files -config_dir="/etc/clamav-unofficial-sigs" +config_dir="%%PREFIX%%/etc/clamav-unofficial-sigs" config_files=("$config_dir/master.conf" "$config_dir/os.conf" "$config_dir/user.conf") - -@@ -542,6 +542,8 @@ make_signature_database_from_ascii_file + #Initialise +@@ -627,6 +627,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" ] +@@ -1175,22 +1177,13 @@ 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` +- #add fallback to host if dig returns no records +- if [ `xshok_array_count "$sanesecurity_mirror_ips"` -lt 1 ] ; then +- sanesecurity_mirror_ips=`host -t A "$sanesecurity_url" | sed -n '/has address/{s/.*address \([^ ]*\).*/\1/;p}'` +- fi + sanesecurity_mirror_ips=`host $sanesecurity_url | sed 's/.*\s//'` + + if [ `xshok_array_count "$sanesecurity_mirror_ips"` -ge "1" ] ; then + + for sanesecurity_mirror_ip in $sanesecurity_mirror_ips ; do +- sanesecurity_mirror_name="" - sanesecurity_mirror_name=`dig +short -x $sanesecurity_mirror_ip | command sed 's/\.$//'` +- #add fallback to host if dig returns no records +- if [ "$sanesecurity_mirror_name" == "" ] ; then +- sanesecurity_mirror_name=`host "$sanesecurity_mirror_ip" | sed -n '/name pointer/{s/.*pointer \([^ ]*\).*/\1/;p}'` +- fi + 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 + $rsync_bin $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 Index: head/security/clamav-unofficial-sigs/files/patch-config_os.freebsd.conf =================================================================== --- head/security/clamav-unofficial-sigs/files/patch-config_os.freebsd.conf (revision 412380) +++ head/security/clamav-unofficial-sigs/files/patch-config_os.freebsd.conf (revision 412381) @@ -1,14 +1,16 @@ ---- config/os.freebsd.conf.orig 2016-03-31 01:16:02 UTC +--- config/os.freebsd.conf.orig 2016-04-01 23:10:24 UTC +++ config/os.freebsd.conf -@@ -32,11 +32,6 @@ clamd_pid="/var/run/clamav/clamd.pid" +@@ -32,13 +32,8 @@ 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" +- + # https://eXtremeSHOK.com ######################################################