Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 28 Jan 2019 19:37:02 +0000 (UTC)
From:      Tobias Kortkamp <tobik@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r491514 - in head/security/clamav-unofficial-sigs: . files
Message-ID:  <201901281937.x0SJb2lD086066@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: tobik
Date: Mon Jan 28 19:37:02 2019
New Revision: 491514
URL: https://svnweb.freebsd.org/changeset/ports/491514

Log:
  security/clamav-unofficial-sigs: Patch out GNU extended regex
  
  There are a couple of cases of GNU extensions being used in
  clamav-unofficial-sigs.sh; all being \s, or [[:space:]].  Patch
  these over to [[:space:]] since this script is already otherwise
  patched until our base sed becomes GNU-compatible in this respect.
  
  This worked up until this point because \s is being interpreted as
  an escaped 's', which is an ordinary character.  Future versions
  of regex(3) will disallowed escaped ordinary characters, so this
  will become an error if left unpatched.
  
  PR:		233461
  Submitted by:	kevans, Marko Njezic <sf@maxempire.com> (maintainer, final patch)

Modified:
  head/security/clamav-unofficial-sigs/Makefile
  head/security/clamav-unofficial-sigs/files/patch-clamav-unofficial-sigs.sh

Modified: head/security/clamav-unofficial-sigs/Makefile
==============================================================================
--- head/security/clamav-unofficial-sigs/Makefile	Mon Jan 28 19:24:50 2019	(r491513)
+++ head/security/clamav-unofficial-sigs/Makefile	Mon Jan 28 19:37:02 2019	(r491514)
@@ -3,6 +3,7 @@
 
 PORTNAME=	clamav-unofficial-sigs
 PORTVERSION=	5.6.2
+PORTREVISION=	1
 CATEGORIES=	security
 
 MAINTAINER=	sf@maxempire.com

Modified: head/security/clamav-unofficial-sigs/files/patch-clamav-unofficial-sigs.sh
==============================================================================
--- head/security/clamav-unofficial-sigs/files/patch-clamav-unofficial-sigs.sh	Mon Jan 28 19:24:50 2019	(r491513)
+++ head/security/clamav-unofficial-sigs/files/patch-clamav-unofficial-sigs.sh	Mon Jan 28 19:37:02 2019	(r491514)
@@ -1,4 +1,4 @@
---- clamav-unofficial-sigs.sh.orig	2018-03-27 15:43:43 UTC
+--- clamav-unofficial-sigs.sh.orig	2018-11-24 16:35:07 UTC
 +++ clamav-unofficial-sigs.sh
 @@ -1290,7 +1290,7 @@ minimum_required_config_version="72"
  minimum_yara_clamav_version="0.99"
@@ -18,6 +18,24 @@
  
  # 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[@]}" 
+       # Delete both trailing and leading whitespace
+       # Delete all trailing whitespace
+       # Delete all empty lines
+-      clean_config="$(command sed -e '/^#.*/d' -e 's/[[:space:]]#.*//' -e 's/#[[:space:]].*//' -e 's/^[ \t]*//;s/[ \t]*$//' -e '/^\s*$/d' "$config_file")"
++      clean_config="$(command sed -e '/^#.*/d' -e 's/[[:space:]]#.*//' -e 's/#[[:space:]].*//' -e 's/^[[:blank:]]*//;s/[[:blank:]]*$//' -e '/^[[:space:]]*$/d' "$config_file")"
+     fi
+ 
+     #fix eval of |
+@@ -1470,7 +1472,7 @@ for config_file in "${config_files[@]}" 
+     fi
+ 
+     # Check there is an = for every set of "" optional whitespace \s* between = and "
+-    config_check_vars="$(echo "$clean_config" | $grep_bin -c '=\s*\"' )"
++    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 "Sanesecurity Database & GPG Signature File Updates" "="
          xshok_pretty_echo_and_log "Checking for Sanesecurity updates..."



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201901281937.x0SJb2lD086066>