From owner-svn-ports-all@freebsd.org Thu Mar 31 13:36:55 2016 Return-Path: Delivered-To: svn-ports-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1CD56AE45D9; Thu, 31 Mar 2016 13:36:55 +0000 (UTC) (envelope-from pi@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DA1261B7C; Thu, 31 Mar 2016 13:36:54 +0000 (UTC) (envelope-from pi@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u2VDasKI098838; Thu, 31 Mar 2016 13:36:54 GMT (envelope-from pi@FreeBSD.org) Received: (from pi@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u2VDar19098824; Thu, 31 Mar 2016 13:36:53 GMT (envelope-from pi@FreeBSD.org) Message-Id: <201603311336.u2VDar19098824@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pi set sender to pi@FreeBSD.org using -f From: Kurt Jaeger Date: Thu, 31 Mar 2016 13:36:53 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r412222 - in head: . security/clamav-unofficial-sigs security/clamav-unofficial-sigs/files X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 31 Mar 2016 13:36:55 -0000 Author: pi Date: Thu Mar 31 13:36:52 2016 New Revision: 412222 URL: https://svnweb.freebsd.org/changeset/ports/412222 Log: 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 , Lukasz Wasikowski Approved by: sf@maxempire.com (maintainer) Added: head/security/clamav-unofficial-sigs/files/patch-config_master.conf (contents, props changed) head/security/clamav-unofficial-sigs/files/patch-config_os.freebsd.conf (contents, props changed) head/security/clamav-unofficial-sigs/files/patch-config_user.conf (contents, props changed) head/security/clamav-unofficial-sigs/files/patch-cron.d_clamav-unofficial-sigs (contents, props changed) head/security/clamav-unofficial-sigs/files/patch-logrotate.d_clamav-unofficial-sigs (contents, props changed) Deleted: head/security/clamav-unofficial-sigs/files/patch-clamav-unofficial-sigs.conf head/security/clamav-unofficial-sigs/files/patch-clamd-status.sh Modified: head/UPDATING head/security/clamav-unofficial-sigs/Makefile head/security/clamav-unofficial-sigs/distinfo head/security/clamav-unofficial-sigs/files/patch-clamav-unofficial-sigs.sh head/security/clamav-unofficial-sigs/files/pkg-message.in head/security/clamav-unofficial-sigs/pkg-descr head/security/clamav-unofficial-sigs/pkg-plist Modified: head/UPDATING ============================================================================== --- head/UPDATING Thu Mar 31 13:33:02 2016 (r412221) +++ head/UPDATING Thu Mar 31 13:36:52 2016 (r412222) @@ -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 Modified: head/security/clamav-unofficial-sigs/Makefile ============================================================================== --- head/security/clamav-unofficial-sigs/Makefile Thu Mar 31 13:33:02 2016 (r412221) +++ head/security/clamav-unofficial-sigs/Makefile Thu Mar 31 13:36:52 2016 (r412222) @@ -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 + +USE_GITHUB= yes +GH_ACCOUNT= extremeshok -USES= perl5 +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 Modified: head/security/clamav-unofficial-sigs/distinfo ============================================================================== --- head/security/clamav-unofficial-sigs/distinfo Thu Mar 31 13:33:02 2016 (r412221) +++ head/security/clamav-unofficial-sigs/distinfo Thu Mar 31 13:36:52 2016 (r412222) @@ -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 Modified: head/security/clamav-unofficial-sigs/files/patch-clamav-unofficial-sigs.sh ============================================================================== --- head/security/clamav-unofficial-sigs/files/patch-clamav-unofficial-sigs.sh Thu Mar 31 13:33:02 2016 (r412221) +++ head/security/clamav-unofficial-sigs/files/patch-clamav-unofficial-sigs.sh Thu Mar 31 13:36:52 2016 (r412222) @@ -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 Added: head/security/clamav-unofficial-sigs/files/patch-config_master.conf ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/security/clamav-unofficial-sigs/files/patch-config_master.conf Thu Mar 31 13:36:52 2016 (r412222) @@ -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" + + Added: head/security/clamav-unofficial-sigs/files/patch-config_os.freebsd.conf ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/security/clamav-unofficial-sigs/files/patch-config_os.freebsd.conf Thu Mar 31 13:36:52 2016 (r412222) @@ -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" Added: head/security/clamav-unofficial-sigs/files/patch-config_user.conf ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/security/clamav-unofficial-sigs/files/patch-config_user.conf Thu Mar 31 13:36:52 2016 (r412222) @@ -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. Added: head/security/clamav-unofficial-sigs/files/patch-cron.d_clamav-unofficial-sigs ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/security/clamav-unofficial-sigs/files/patch-cron.d_clamav-unofficial-sigs Thu Mar 31 13:36:52 2016 (r412222) @@ -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 Added: head/security/clamav-unofficial-sigs/files/patch-logrotate.d_clamav-unofficial-sigs ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/security/clamav-unofficial-sigs/files/patch-logrotate.d_clamav-unofficial-sigs Thu Mar 31 13:36:52 2016 (r412222) @@ -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 Modified: head/security/clamav-unofficial-sigs/files/pkg-message.in ============================================================================== --- head/security/clamav-unofficial-sigs/files/pkg-message.in Thu Mar 31 13:33:02 2016 (r412221) +++ head/security/clamav-unofficial-sigs/files/pkg-message.in Thu Mar 31 13:36:52 2016 (r412222) @@ -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%% ********************************************************************** Modified: head/security/clamav-unofficial-sigs/pkg-descr ============================================================================== --- head/security/clamav-unofficial-sigs/pkg-descr Thu Mar 31 13:33:02 2016 (r412221) +++ head/security/clamav-unofficial-sigs/pkg-descr Thu Mar 31 13:36:52 2016 (r412222) @@ -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 Modified: head/security/clamav-unofficial-sigs/pkg-plist ============================================================================== --- head/security/clamav-unofficial-sigs/pkg-plist Thu Mar 31 13:33:02 2016 (r412221) +++ head/security/clamav-unofficial-sigs/pkg-plist Thu Mar 31 13:36:52 2016 (r412222) @@ -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