Your message dated Sat, 24 Aug 2024 22:14:31 +0000
with message-id <[email protected]>
and subject line Bug#1079286: Removed package(s) from unstable
has caused the Debian Bug report #1028650,
regarding snort: Unnecessary use of Perl in preinst
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
1028650: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1028650
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: snort
Version: 2.9.15.1-6
Tags: patch

Dear maintainers of snort,

`snort.preinst` uses Perl to get the value of options in
`etc/snort/snort.common.parameters`. Such simple processing can be achieved also with a very similar grep invocation and without cat.

A patch to fix this issue is available at https://salsa.debian.org/jfs/pkg-snort/-/merge_requests/1

Here is a preview of the patch

diff --git a/debian/snort.preinst b/debian/snort.preinst
index 4fc54973..85bdfcf6 100644
--- a/debian/snort.preinst
+++ b/debian/snort.preinst
@@ -26,9 +26,9 @@ check_parameters() {
     [ -r "$DEFAULT" ] && return
        
     # Extract our values from there
-    logdir=`cat $PARAMETERS | perl -ne 'print $1 if /-l\s+([\w\/]+)/'`
-    user_snort=`cat $PARAMETERS | perl -ne 'print $1 if /-u\s+(\w+)/'`
-    group_snort=`cat $PARAMETERS | perl -ne 'print $1 if /-g\s+(\w+)/'`
+    logdir=`grep -P -o -- '-l\s+\K([\w\/]+)' $PARAMETERS`
+    user_snort=`grep -P -o -- '-u\s+\K(\w+)' $PARAMETERS`
+    group_snort=`grep -P -o -- '-g\s+\K(\w+)' $PARAMETERS`
extraparms=`cat $PARAMETERS | sed -e 's/-l[[:space:]]\+[\/[:alnum:]]\+[[:space:]]\+//g; s/-u[[:space:]]\+[[:alnum:]]\+[[:space:]]*//g; s/-g[[:space:]]\+[[:alnum:]]\+[[:space:]]*//g;'`
     echo "Creating new $DEFAULT configuration based on $PARAMETERS"
     cat <<EOF >$DEFAULT

--
Gioele Barabucci

--- End Message ---
--- Begin Message ---
Version: 2.9.15.1-6+rm

Dear submitter,

as the package snort has just been removed from the Debian archive
unstable we hereby close the associated bug reports.  We are sorry
that we couldn't deal with your issue properly.

For details on the removal, please see https://bugs.debian.org/1079286

The version of this package that was in Debian prior to this removal
can still be found using https://snapshot.debian.org/.

Please note that the changes have been done on the master archive and
will not propagate to any mirrors until the next dinstall run at the
earliest.

This message was generated automatically; if you believe that there is
a problem with it please contact the archive administrators by mailing
[email protected].

Debian distribution maintenance software
pp.
Scott Kitterman (the ftpmaster behind the curtain)

--- End Message ---

Reply via email to