Index: head/security/clamav-unofficial-sigs/Makefile =================================================================== --- head/security/clamav-unofficial-sigs/Makefile (revision 465958) +++ head/security/clamav-unofficial-sigs/Makefile (revision 465959) @@ -1,55 +1,53 @@ # Created by: Marko Njezic # $FreeBSD$ PORTNAME= clamav-unofficial-sigs -PORTVERSION= 5.3.2 -PORTREVISION= 1 +PORTVERSION= 5.6.2 CATEGORIES= security MAINTAINER= sf@maxempire.com COMMENT= Update script for third-party ClamAV databases LICENSE= BSD3CLAUSE LICENSE_FILE= ${WRKSRC}/LICENSE COMMON_DEPENDS= clamscan:security/clamav \ rsync:net/rsync \ curl:ftp/curl \ gpg:security/gnupg \ bash:shells/bash BUILD_DEPENDS= ${COMMON_DEPENDS} RUN_DEPENDS= ${COMMON_DEPENDS} +USES= perl5 shebangfix USE_GITHUB= yes GH_ACCOUNT= extremeshok - -USES= perl5 shebangfix SHEBANG_FILES= clamav-unofficial-sigs.sh USE_PERL5= run SUB_FILES= pkg-message OPTIONS_DEFINE= DOCS post-patch: @${CP} ${FILESDIR}/manpage.conf ${WRKSRC} @${REINPLACE_CMD} -e 's|%%WRKSRC%%|${WRKSRC}|g' ${WRKSRC}/manpage.conf @${REINPLACE_CMD} -e 's|%%PREFIX%%|${PREFIX}|g' ${WRKSRC}/clamav-unofficial-sigs.sh do-build: (cd ${WRKSRC} && ${LOCALBASE}/bin/bash ./clamav-unofficial-sigs.sh -c manpage.conf --install-man) 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}) .include Index: head/security/clamav-unofficial-sigs/distinfo =================================================================== --- head/security/clamav-unofficial-sigs/distinfo (revision 465958) +++ head/security/clamav-unofficial-sigs/distinfo (revision 465959) @@ -1,3 +1,3 @@ -TIMESTAMP = 1464946787 -SHA256 (extremeshok-clamav-unofficial-sigs-5.3.2_GH0.tar.gz) = 3abe1c22133d879318cebc18d3224a820ea1747524425d4a2efd337749596589 -SIZE (extremeshok-clamav-unofficial-sigs-5.3.2_GH0.tar.gz) = 113714 +TIMESTAMP = 1522164679 +SHA256 (extremeshok-clamav-unofficial-sigs-5.6.2_GH0.tar.gz) = 233404d767fcb7d2b82defef831d584cbbcc7105f6bbc586d69a0a960bc0d4df +SIZE (extremeshok-clamav-unofficial-sigs-5.6.2_GH0.tar.gz) = 50931 Index: head/security/clamav-unofficial-sigs/files/manpage.conf =================================================================== --- head/security/clamav-unofficial-sigs/files/manpage.conf (revision 465958) +++ head/security/clamav-unofficial-sigs/files/manpage.conf (revision 465959) @@ -1,10 +1,13 @@ # Dummy configuration file used just for auto-generating manual page logging_enabled="no" config_version="999" user_configuration_complete="yes" -work_dir="/var/db/clamav-unofficial-sigs" +work_dir="%%WRKSRC%%" man_dir="%%WRKSRC%%" enable_locking="no" setmode="no" clam_user="nobody" clam_group="nobody" +clam_dbs="%%WRKSRC%%" +pkg_mgr="" +pkg_rm="" Index: head/security/clamav-unofficial-sigs/files/patch-clamav-unofficial-sigs.sh =================================================================== --- head/security/clamav-unofficial-sigs/files/patch-clamav-unofficial-sigs.sh (revision 465958) +++ head/security/clamav-unofficial-sigs/files/patch-clamav-unofficial-sigs.sh (revision 465959) @@ -1,43 +1,43 @@ ---- clamav-unofficial-sigs.sh.orig 2016-11-18 10:05:40 UTC +--- clamav-unofficial-sigs.sh.orig 2018-03-27 15:43:43 UTC +++ clamav-unofficial-sigs.sh -@@ -753,6 +753,8 @@ function make_signature_database_from_as - #Remove the clamav-unofficial-sigs script - function remove_script () { - echo "" -+ pkg_mgr="FreeBSD ports" -+ pkg_rm="pkg delete" - if [ -n "$pkg_mgr" ] && [ -n "$pkg_rm" ] ; then - echo "This script (clamav-unofficial-sigs) was installed on the system via '$pkg_mgr'" - echo "use '$pkg_rm' to remove the script and all of its associated files and databases from the system." -@@ -1151,7 +1153,7 @@ minimum_required_config_version="65" +@@ -1290,7 +1290,7 @@ minimum_required_config_version="72" minimum_yara_clamav_version="0.99" - #default config files + # 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") + config_files=( "$config_dir/master.conf" "$config_dir/os.conf" "$config_dir/user.conf" ) - #Initialise -@@ -1879,20 +1881,11 @@ if [ "$sanesecurity_enabled" == "yes" ] + # Initialise +@@ -1302,6 +1302,8 @@ force_updates="no" + enable_log="no" + custom_config="no" + we_have_a_config="0" ++pkg_mgr="FreeBSD ports" ++pkg_rm="pkg delete" + + # Solaris which function returns garbage when the program is not found + # only define the new which function if running under Solaris +@@ -2131,20 +2133,11 @@ if [ "$sanesecurity_enabled" == "yes" ] xshok_pretty_echo_and_log "Sanesecurity Database & GPG Signature File Updates" "=" xshok_pretty_echo_and_log "Checking for Sanesecurity 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;}') +- sanesecurity_mirror_ips="$(dig +ignore +short "$sanesecurity_url")" +- # Add fallback to host if dig returns no records +- if [ ${#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/.*[[:space:]]//') - if [ "$(xshok_array_count "$sanesecurity_mirror_ips")" -ge "1" ] ; then + if [ ${#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;}') +- sanesecurity_mirror_name="$(dig +short -x "$sanesecurity_mirror_ip" | command sed 's/\.$//')" +- # Add fallback to host if dig returns no records +- if [ -z "$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/.*[[:space:]]//' | 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_bin $rsync_output_level $no_motd --files-from="$sanesecurity_include_dbs" -ctuz $connect_timeout --timeout="$rsync_max_time" "rsync://$sanesecurity_mirror_ip/sanesecurity" "$work_dir_sanesecurity" 2>/dev/null + # shellcheck disable=SC2086 Index: head/security/clamav-unofficial-sigs/files/patch-config_master.conf =================================================================== --- head/security/clamav-unofficial-sigs/files/patch-config_master.conf (revision 465958) +++ head/security/clamav-unofficial-sigs/files/patch-config_master.conf (revision 465959) @@ -1,22 +1,22 @@ ---- config/master.conf.orig 2016-05-23 23:38:56 UTC +--- config/master.conf.orig 2017-03-18 11:57:29 UTC +++ config/master.conf -@@ -58,8 +58,8 @@ reload_dbs="yes" +@@ -63,8 +63,8 @@ clamd_reload_opt="clamdscan --reload" 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" -@@ -120,7 +120,7 @@ yararulesproject_enabled="yes" # Yara- +@@ -125,7 +125,7 @@ yararulesproject_enabled="yes" # Yara- additional_enabled="yes" # Additional Databases ## Disabling this will also cause the yararulesproject to be disabled. -enable_yararules="yes" #Enables yararules in the various databases, automatically disabled if clamav is older than 0.99 +enable_yararules="no" #Enables yararules in the various databases, automatically disabled if clamav is older than 0.99 # ======================== # eXtremeSHOK Database format Index: head/security/clamav-unofficial-sigs/files/patch-config_os.freebsd.conf =================================================================== --- head/security/clamav-unofficial-sigs/files/patch-config_os.freebsd.conf (revision 465958) +++ head/security/clamav-unofficial-sigs/files/patch-config_os.freebsd.conf (revision 465959) @@ -1,11 +1,11 @@ ---- config/os.freebsd.conf.orig 2016-05-23 23:38:56 UTC +--- config/os.freebsd.conf.orig 2017-03-18 11:57:29 UTC +++ config/os.freebsd.conf -@@ -33,8 +33,6 @@ clamd_pid="/var/run/clamav/clamd.pid" +@@ -29,8 +29,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"