Bug 233461 - security/clamav-unofficial-sigs: patch out GNU extended regex
Summary: security/clamav-unofficial-sigs: patch out GNU extended regex
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Tobias Kortkamp
URL:
Keywords:
Depends on:
Blocks: 229925
  Show dependency treegraph
 
Reported: 2018-11-24 02:35 UTC by Kyle Evans
Modified: 2019-01-28 19:37 UTC (History)
1 user (show)

See Also:


Attachments
svn(1) diff against security/clamav-unofficial-sigs.sh (3.50 KB, patch)
2018-11-24 02:35 UTC, Kyle Evans
no flags Details | Diff
Replace all relevant "\s" instances with [[:space:]] (1.90 KB, patch)
2018-11-24 17:00 UTC, Marko Njezic
sf: maintainer-approval+
Details | Diff
Replace all relevant "\s" and "\t" instances with ctype classes (1.91 KB, patch)
2018-11-25 23:33 UTC, Marko Njezic
sf: maintainer-approval+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Kyle Evans freebsd_committer freebsd_triage 2018-11-24 02:35:32 UTC
Created attachment 199506 [details]
svn(1) diff against security/clamav-unofficial-sigs.sh

Hi,

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.

Thanks,

Kyle Evans
Comment 1 Marko Njezic 2018-11-24 16:58:01 UTC
Hi,

Two first sed instances that you have patched are being executed only on Solaris and MacOSX and can be ignored making patch somewhat simpler. Your patch also wrongly undoes my modification and hardcodes config directory location.

I'll upload a new patch shortly.

Regards,
Marko Njezic
Comment 2 Marko Njezic 2018-11-24 17:00:37 UTC
Created attachment 199516 [details]
Replace all relevant "\s" instances with [[:space:]]
Comment 3 Kyle Evans freebsd_committer freebsd_triage 2018-11-24 17:02:57 UTC
(In reply to Marko Njezic from comment #1)

Hi,

Sorry about that- I grabbed the wrong file for the original when I rolled the patch. =(
Comment 4 Marko Njezic 2018-11-25 23:33:23 UTC
Created attachment 199563 [details]
Replace all relevant "\s" and "\t" instances with ctype classes

There were two more instances where "\t" escape was being used, which can be replaced with [[:blank:]]

Hopefully, there should be no more escapes that have to be replaced.
Comment 5 commit-hook freebsd_committer freebsd_triage 2019-01-28 19:37:25 UTC
A commit references this bug:

Author: tobik
Date: Mon Jan 28 19:37:02 UTC 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)

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