Your message dated Sun, 05 Sep 2021 20:23:40 +0000
with message-id <e1mmyg0-000hnk...@fasolo.debian.org>
and subject line Bug#991630: fixed in snort 2.9.15.1-6
has caused the Debian Bug report #991630,
regarding snort-common: maintainer scripts must always call 
dpkg-maintscript-helper
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 ow...@bugs.debian.org
immediately.)


-- 
991630: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=991630
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems
--- Begin Message ---
Package: snort-common
Version: 2.9.15.1-5
Severity: serious
Tags: patch
User: debian...@lists.debian.org
Usertags: piuparts

Hi,

debsums reports modification of the following files,
from the attached log (scroll to the bottom...):

  /etc/cron.daily/snort-common

This happens in the following scenario:
* install snort-common/buster
* remove (nut not purge) snort-common
* upgrade system from bsuter to bullseye
* install snort-common/bullseye

dpkg-maintscript-helper gets "$@" as arguments s.t. it can decide what
to do depending on the action.
The preinst/postinst scripts only call dpkg-maintscript-helper for a limited
set of actions, especially missing "preinst install $oldversion", which
causes the wrong action being taken by the postinst in the above scenario
(it preserves the unmodified old file and moves it to the new location).

cheers,

Andreas
diff -Nru snort-2.9.15.1/debian/changelog snort-2.9.15.1/debian/changelog
--- snort-2.9.15.1/debian/changelog     2021-04-10 22:55:04.000000000 +0200
+++ snort-2.9.15.1/debian/changelog     2021-07-29 11:33:46.000000000 +0200
@@ -1,3 +1,10 @@
+snort (2.9.15.1-6) UNRELEASED; urgency=medium
+
+  * snort-common.{pre,post}inst: Call dpkg-maintscript-helper for all actions.
+    (Closes: #-1)
+
+ -- Andreas Beckmann <a...@debian.org>  Thu, 29 Jul 2021 11:33:46 +0200
+
 snort (2.9.15.1-5) unstable; urgency=medium
 
   * debian/snort-common.{preinst,postinst,postrm}:
diff -Nru snort-2.9.15.1/debian/snort-common.postrm 
snort-2.9.15.1/debian/snort-common.postrm
--- snort-2.9.15.1/debian/snort-common.postrm   2021-04-10 22:55:04.000000000 
+0200
+++ snort-2.9.15.1/debian/snort-common.postrm   2021-07-29 11:33:46.000000000 
+0200
@@ -6,17 +6,6 @@
 set -e
 test $DEBIAN_SCRIPT_DEBUG && set -v -x
 
-# summary of how this script can be called:
-#        * <postrm> `remove'
-#        * <postrm> `purge'
-#        * <old-postrm> `upgrade' <new-version>
-#        * <new-postrm> `failed-upgrade' <old-version>
-#        * <new-postrm> `abort-install'
-#        * <new-postrm> `abort-install' <old-version>
-#        * <new-postrm> `abort-upgrade' <old-version>
-#        * <disappearer's-postrm> `disappear' <r>overwrit>r> <new-version>
-# for details, see /usr/doc/packaging-manual/
-
 
 case "$1" in
        purge)
@@ -33,7 +22,8 @@
           rm -f /etc/snort/database.conf
        fi
        ;;
-       abort-install|abort-upgrade)
+esac
+
        # if installation was aborted then revert the rename of the cron job 
using dpkg-maintscript-helper
        if dpkg-maintscript-helper supports mv_conffile; then
        dpkg-maintscript-helper mv_conffile \
@@ -43,17 +33,8 @@
        if dpkg-maintscript-helper supports rm_conffile; then
            dpkg-maintscript-helper rm_conffile /etc/snort/database.conf 2.9.3~ 
snort-common  -- "$@"
        fi
-       ;;
-       remove|upgrade|failed-upgrade|abort-install|abort-upgrade)
-        # nothing
-       ;;
-esac
-
-
-
 
 # dh_installdeb will replace this with shell code automatically
 # generated by other debhelper scripts.
 
 #DEBHELPER#
-
diff -Nru snort-2.9.15.1/debian/snort-common.preinst 
snort-2.9.15.1/debian/snort-common.preinst
--- snort-2.9.15.1/debian/snort-common.preinst  2021-04-10 22:55:04.000000000 
+0200
+++ snort-2.9.15.1/debian/snort-common.preinst  2021-07-29 11:33:45.000000000 
+0200
@@ -3,20 +3,9 @@
 set -e
 test $DEBIAN_SCRIPT_DEBUG && set -v -x
 
-# summary of how this script can be called:
-#        * <new-preinst> `install'
-#        * <new-preinst> `install' <old-version>
-#        * <new-preinst> `upgrade' <old-version>
-#        * <old-preinst> `abort-upgrade' <new-version>
-
 GENCONF="/etc/snort/snort.conf" # generic configuration file
 DBCONF="/etc/snort/database.conf" # deprecated
 
-case "$1" in
-    install)
-        # Do nothing
-    ;;
-    upgrade)
          # versions previous to 2.9.3 created the /etc/snort/database.conf
          # file for configuration
          #if dpkg --compare-versions "$2" le "2.9.3" &&  [ -e "$DBCONF" ] && ! 
[ -s "$DBCONF" ] 
@@ -32,7 +21,9 @@
             if dpkg-maintscript-helper supports rm_conffile; then
                 dpkg-maintscript-helper rm_conffile $DBCONF 2.9.3~ 
snort-common -- "$@" 
             else
+              if [ "$1" = "upgrade" ]; then
                 rm -f $DBCONF
+              fi
             fi
          fi
 
@@ -44,26 +35,15 @@
             # Manually move the file, this will generate a dpkg prompt to
             # approve the changes
             if [ -e /etc/cron.daily/5snort ]; then
+              if [ "$1" = "upgrade" ]; then
                  mv /etc/cron.daily/5snort /etc/cron.daily/snort-common
+              fi
             fi
         fi
 
-    ;;
-    configure)
-        # Do nothing
-    ;;
-    abort-upgrade)
-    ;;
-    *) 
-        echo "preinst called with unknown argument \`$1'" >&2
-        exit 0
-    ;;
-esac
-
 # dh_installdeb will replace this with shell code automatically
 # generated by other debhelper scripts.
 
 #DEBHELPER#
 
 exit 0
-

Attachment: snort-common_2.9.15.1-5.log.gz
Description: application/gzip


--- End Message ---
--- Begin Message ---
Source: snort
Source-Version: 2.9.15.1-6
Done: Javier Fernández-Sanguino Peña <j...@debian.org>

We believe that the bug you reported is fixed in the latest version of
snort, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 991...@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Javier Fernández-Sanguino Peña <j...@debian.org> (supplier of updated snort 
package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmas...@ftp-master.debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Format: 1.8
Date: Sun, 05 Sep 2021 15:38:14 +0200
Source: snort
Architecture: source
Version: 2.9.15.1-6
Distribution: unstable
Urgency: medium
Maintainer: Javier Fernández-Sanguino Peña <j...@debian.org>
Changed-By: Javier Fernández-Sanguino Peña <j...@debian.org>
Closes: 977394 991630 991977
Changes:
 snort (2.9.15.1-6) unstable; urgency=medium
 .
   * debian/rules: Rename the cron.daily script from snort-common to 
0snort-common
   * debian/snort-common.{pre,post}inst, debian/snort-common.postrm: Move the
     cron.daily snort-common file to cron.daily/0snort-common in order for
     Snort to send reports to the system administrator. With the previous setup
     logrotate was running before snort-common which left the log file to 0
     bytes and prevent the package from sending any email reports
     (Closes: #991977)
   * debian/snort-common.preinst, debian/snort-common.postrm: Apply patch
     provided by Andreas Beckmann to call dpkg-maintscript-helper for all 
actions (Closes: #991630)
   * Fix FTCBFS with patch provided by Helmut Grohne: (Closes: #977394)
     + Pass reasonable --build and --host to configure.
     + cross.patch: Replace a number of AC_RUN_IFELSE with cross-compatible
       variants.
   * debian/control: Update to Standards Version 4.6.0 (no changes)
   * debian/patches/snort_binary_typos: New patch fixing typos detected by
     lintian in the snort binary and libraries
   * debian/snort-rules-default.README.Debian: Fix typo [lintian fix]
   * Add debian/upstream/metadata (pointing to Snort 3 as there is no Snort 2.x
     code repository available)
Checksums-Sha1:
 6f62694b997b025882e2f6239933c1d96902f7b6 2443 snort_2.9.15.1-6.dsc
 ead85443bd51272c42409feffc084a3645a32472 759540 snort_2.9.15.1-6.debian.tar.xz
 8a357e64fc49d1f6d18bd2fa710dc63938c05011 12555 snort_2.9.15.1-6_i386.buildinfo
Checksums-Sha256:
 5bd07ca9ff19cd3dc8b7bd4a3fb43b076bdd364706cc7111d0ccec2a4bac7135 2443 
snort_2.9.15.1-6.dsc
 f944f2c2e82621fcfe7ed3eff39ac19629ea051c3bacdb0536887cfab007f727 759540 
snort_2.9.15.1-6.debian.tar.xz
 f46d5c0dd79238def86dfe0fc3757d60e03a3e2e65b5f8ddf3179db0d22a5332 12555 
snort_2.9.15.1-6_i386.buildinfo
Files:
 9efd6198d2242198433d3c6df4fa9a79 2443 net optional snort_2.9.15.1-6.dsc
 a4fa47f9fb81f0a881ed4cb9c3197677 759540 net optional 
snort_2.9.15.1-6.debian.tar.xz
 ccf4a471382ac73b90de4e6c620a0e54 12555 net optional 
snort_2.9.15.1-6_i386.buildinfo

-----BEGIN PGP SIGNATURE-----

iQIzBAEBCAAdFiEEFQ8Kq6ttIR3DT+AOix9vSKslf5gFAmE1H3gACgkQix9vSKsl
f5hKnxAArIakbRCWNP/yStKYccmbKCnqVJ3R3ocst92eDzc53xojVVszixE3vs+A
On0wahoHl7EMKHko5pJGOP8p1DiRosKpdki75S5G5HrurKq5gxeX8ZFRvAPUrMgK
rUV/PwwyDzRSbtlgreMdcWJpqMXBQT7lqpeYShS2okViR6zwlnCoBoP1JAIREIHz
snHFFS34LxUP56TZy6xokvs8YjmTqjAfAjF0zKx5iPOsvPQ1iEWZ05ZGHtekSV+W
quATlt7uCR2ugshyD/vkWOy47ZbEPr/cRhrD1ZbKXxjAn2EbyZ2NTRdDkhygGFi8
MswV8n76w85VgzZYzV0Se5866JMZl/tO/rzJOKSRgKxeLoqL5oVUC26TEP7CelH7
9yCo6/Lfrto5AgK2w9PWvEVnCyrTxLAkewr7Lf8U4dCs8mG+u2bJWX1uJSlUGgW3
ZVxmjZlZjzClpCae2SyxGiCJ6xkZUMObbV0d3FxM7bYiNWilfpEp/e4ZsJMezxix
3rKg3rRveVqmoAfjStmYWpKemPB1qzAuDYShU/mxWFzA0CqY5SFy1PceKzspDEUq
7oMoI4ELDWZZow6Gwx7FbNi1MzJ+emdAeUkmODqR4e5zFuBdH4kbchBauxugsKHg
R/J9RHwh+x6z5I0ZNqdFDyPlRTYy1QFA2/Z+cwI1jW4yJAewgoQ=
=xn6S
-----END PGP SIGNATURE-----

--- End Message ---

Reply via email to