Index: Makefile =================================================================== --- Makefile (revision 511147) +++ Makefile (working copy) @@ -2,11 +2,10 @@ # $FreeBSD$ PORTNAME= clamav-unofficial-sigs -PORTVERSION= 5.6.2 -PORTREVISION= 1 +PORTVERSION= 6.1.1 CATEGORIES= security -MAINTAINER= sf@maxempire.com +MAINTAINER= ports@FreeBSD.org COMMENT= Update script for third-party ClamAV databases LICENSE= BSD3CLAUSE @@ -45,10 +44,10 @@ @${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/os/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}) + (cd ${WRKSRC} && ${INSTALL_DATA} INSTALL.md LICENSE README.md ${STAGEDIR}${DOCSDIR}) .include Index: distinfo =================================================================== --- distinfo (revision 511147) +++ distinfo (working copy) @@ -1,3 +1,3 @@ -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 +TIMESTAMP = 1567631464 +SHA256 (extremeshok-clamav-unofficial-sigs-6.1.1_GH0.tar.gz) = bac14809c8106ebae6c13f4db1c330a75f0a284924b3ab3668c49e30619b299f +SIZE (extremeshok-clamav-unofficial-sigs-6.1.1_GH0.tar.gz) = 55340 Index: files/patch-clamav-unofficial-sigs.sh =================================================================== --- files/patch-clamav-unofficial-sigs.sh (revision 511147) +++ files/patch-clamav-unofficial-sigs.sh (working copy) @@ -1,15 +1,6 @@ ---- clamav-unofficial-sigs.sh.orig 2018-11-24 16:35:07 UTC +--- clamav-unofficial-sigs.sh.orig 2019-09-02 22:41:48 UTC +++ clamav-unofficial-sigs.sh -@@ -1290,7 +1290,7 @@ minimum_required_config_version="72" - minimum_yara_clamav_version="0.99" - - # 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" ) - - # Initialise -@@ -1302,6 +1302,8 @@ force_updates="no" +@@ -1422,25 +1422,14 @@ force_wget="no" enable_log="no" custom_config="no" we_have_a_config="0" @@ -16,9 +7,44 @@ +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 -@@ -1455,7 +1457,7 @@ for config_file in "${config_files[@]}" +- +-# Attempt to scan for a valid config dir +-if [ -f "/etc/clamav-unofficial-sigs/master.conf" ] ; then +- config_dir="/etc/clamav-unofficial-sigs" +-elif [ -f "/usr/local/etc/clamav-unofficial-sigs/master.conf" ] ; then +- config_dir="/usr/local/etc/clamav-unofficial-sigs/" +-elif [ -f "/opt/zimbra/config/clamav-unofficial-sigs/master.conf" ] ; then +- config_dir="/opt/zimbra/config/clamav-unofficial-sigs/" +-else +- xshok_pretty_echo_and_log "ERROR: config_dir (/etc/clamav-unofficial-sigs/master.conf) could not be found" +- exit 1 +-fi + # Default config files ++config_dir="%%PREFIX%%/etc/clamav-unofficial-sigs" + config_files=("${config_dir}/master.conf") +-#find the a suitable os.conf or os.*.conf file +-config_file="$(find "$config_dir" -type f -iname "os.conf" -o -iname "os.*.conf" | tail -n1)" +-if [ -r "${config_file}" ]; then +- config_files+=( "${config_file}" ) ++if [ -r "${config_dir}/os.conf" ] ; then ++ config_files+=( "${config_dir}/os.conf" ) + fi + if [ -r "${config_dir}/user.conf" ] ; then + config_files+=( "${config_dir}/user.conf" ) +@@ -1576,10 +1565,8 @@ if [ "$custom_config" != "no" ] ; then + else + xshok_pretty_echo_and_log "WARNING: ${config_dir}/master.conf not found" + fi +- #find the a suitable os.conf or os.*.conf file +- config_file="$(find "$config_dir" -type f -iname "os.conf" -o -iname "os.*.conf" | tail -n1)" +- if [ -r "${config_file}" ] ; then +- config_files+=( "${config_file}" ) ++ if [ -r "${config_dir}/os.conf" ] ; then ++ config_files+=( "${config_dir}/os.conf" ) + else + xshok_pretty_echo_and_log "WARNING: ${config_dir}/os.conf not found" + fi +@@ -1625,7 +1612,7 @@ for config_file in "${config_files[@]}" ; do # Delete both trailing and leading whitespace # Delete all trailing whitespace # Delete all empty lines @@ -27,7 +53,7 @@ fi #fix eval of | -@@ -1470,7 +1472,7 @@ for config_file in "${config_files[@]}" +@@ -1640,7 +1627,7 @@ for config_file in "${config_files[@]}" ; do fi # Check there is an = for every set of "" optional whitespace \s* between = and " @@ -35,27 +61,32 @@ + config_check_vars="$(echo "$clean_config" | $grep_bin -c '=[[:space:]]*\"' )" if [ $(( ${#config_check} / 2 )) -ne "$config_check_vars" ] ; then - xshok_pretty_echo_and_log "ERROR: Your configuration has errors, every = requires a pair of \"\"" "=" -@@ -2131,20 +2133,11 @@ if [ "$sanesecurity_enabled" == "yes" ] + xshok_pretty_echo_and_log "ERROR: Your configuration has errors, every = requires a pair of \"\"" +@@ -2316,24 +2303,12 @@ if [ "$sanesecurity_enabled" == "yes" ] ; then + echo "$current_time" > "${work_dir_work_configs}/last-ss-update.txt" 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")" +- # shellcheck disable=SC2086 +- sanesecurity_mirror_ips="$(dig $dig_proxy +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;}')" +- # shellcheck disable=SC2086 +- sanesecurity_mirror_ips="$(host $host_proxy -t A "$sanesecurity_url" | sed -n '/has address/{s/.*address \([^ ]*\).*/\1/;p;}')" - fi + + sanesecurity_mirror_ips=$(host "$sanesecurity_url" | sed 's/.*[[:space:]]//') - ++ 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/\.$//')" +- # shellcheck disable=SC2086 +- sanesecurity_mirror_name="$(dig $dig_proxy +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;}')" +- # shellcheck disable=SC2086 +- sanesecurity_mirror_name="$(host $host_proxy "$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" + xshok_pretty_echo_and_log "Sanesecurity mirror site used: ${sanesecurity_mirror_site_info}" # shellcheck disable=SC2086 Index: files/patch-config_master.conf =================================================================== --- files/patch-config_master.conf (revision 511147) +++ files/patch-config_master.conf (working copy) @@ -1,4 +1,4 @@ ---- config/master.conf.orig 2017-03-18 11:57:29 UTC +--- config/master.conf.orig 2019-09-02 22:41:48 UTC +++ config/master.conf @@ -63,8 +63,8 @@ clamd_reload_opt="clamdscan --reload" work_dir="/var/lib/clamav-unofficial-sigs" #Top level working directory @@ -9,14 +9,14 @@ +logging_enabled="no" +log_file_path="/var/log" log_file_name="clamav-unofficial-sigs.log" + ## Use a program to log messages + #log_pipe_cmd="/usr/bin/logger -it 'clamav-unofficial-sigs'" +@@ -487,8 +487,6 @@ selinux_fixes="no" # Default is "no" ignore ssl errors + #rsync_proxy="username:password@proxy_host:proxy_port" + #curl_proxy="--proxy http://username:password@proxy_host:proxy_port" + #wget_proxy="-e http_proxy=http://username:password@proxy_host:proxy_port -e https_proxy=https://username:password@proxy_host:proxy_port" +-#dig_proxy="@proxy_host -p proxy_host:proxy_port" +-#host_proxy="@proxy_host" #does not support port - -@@ -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 + # Custom Cron install settings, these are detected and only used if you want to override + # the automatic detection and generation of the values when not set, this is mainly to aid package maintainers Index: files/patch-config_os.freebsd.conf =================================================================== --- files/patch-config_os.freebsd.conf (revision 511147) +++ files/patch-config_os.freebsd.conf (nonexistent) @@ -1,11 +0,0 @@ ---- config/os.freebsd.conf.orig 2017-03-18 11:57:29 UTC -+++ config/os.freebsd.conf -@@ -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" Property changes on: files/patch-config_os.freebsd.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: files/patch-config_os_os.freebsd.conf =================================================================== --- files/patch-config_os_os.freebsd.conf (nonexistent) +++ files/patch-config_os_os.freebsd.conf (working copy) @@ -0,0 +1,11 @@ +--- config/os/os.freebsd.conf.orig 2019-09-02 22:41:48 UTC ++++ config/os/os.freebsd.conf +@@ -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" Property changes on: files/patch-config_os_os.freebsd.conf ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: files/patch-config_user.conf =================================================================== --- files/patch-config_user.conf (nonexistent) +++ files/patch-config_user.conf (working copy) @@ -0,0 +1,18 @@ +--- config/user.conf.orig 2019-09-02 22:41:48 UTC ++++ config/user.conf +@@ -49,14 +49,12 @@ + #) #END ADDITIONAL DATABASES + + # Uncomment the following line to enable the script +-user_configuration_complete="yes" ++#user_configuration_complete="yes" + + # Proxy Support + # If necessary to proxy database downloads, define the rsync, curl, wget, dig, hosr proxy settings here. + #rsync_proxy="username:password@proxy_host:proxy_port" + #curl_proxy="--proxy http://username:password@proxy_host:proxy_port" + #wget_proxy="-e http_proxy=http://username:password@proxy_host:proxy_port -e https_proxy=https://username:password@proxy_host:proxy_port" +-#dig_proxy="@proxy_host -p proxy_host:proxy_port" +-#host_proxy="@proxy_host" #does not support port + + # https://eXtremeSHOK.com ###################################################### Property changes on: files/patch-config_user.conf ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: pkg-plist =================================================================== --- pkg-plist (revision 511147) +++ pkg-plist (working copy) @@ -3,6 +3,6 @@ @sample %%ETCDIR%%/os.conf.sample @sample %%ETCDIR%%/user.conf.sample man/man8/clamav-unofficial-sigs.8.gz -%%PORTDOCS%%%%DOCSDIR%%/INSTALL +%%PORTDOCS%%%%DOCSDIR%%/INSTALL.md %%PORTDOCS%%%%DOCSDIR%%/LICENSE %%PORTDOCS%%%%DOCSDIR%%/README.md