Package: release.debian.org
Severity: normal
Tags: bullseye
User: release.debian....@packages.debian.org
Usertags: pu
X-Debbugs-Cc: awst...@packages.debian.org, lourisva...@figueredo.tec.br
Control: affects -1 + src:awstats

[ Reason ]
The package has a policy violation bug, caused by an error in posting file.

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1037213


The bug was introduced in version 7.8-2+deb11u1 (bullseye), and I am fixing it
backwards.


[ Impact ]
If not fixed, the package will not be able to move on to testing and will be
out of trixie.

[ Tests ]
Manual tests only. I have tested following the upgrade from buster to bullseye
and then to bookworm, testing and sid.

[ Risks ]
Trivial

[ Checklist ]
  [x] *all* changes are documented in the d/changelog
  [x] I reviewed all changes and I approve them
  [x] attach debdiff against the package in (old)stable
  [x] the issue is verified as fixed in unstable

[ Changes ]
  * debian/awstats.postinst: part of the code was moved to the awstats.preinst
    file, to avoid creating the
    /etc/logrotate.d/httpd-prerotate/awstats.dpkg-new file, and thus requiring
    user interaction when updating. (Closes: #1037213)
  * debian/awstats.preinst: created.
diffstat for awstats-7.8 awstats-7.8

 awstats.postinst |    7 -------
 awstats.preinst  |   28 ++++++++++++++++++++++++++++
 changelog        |   11 +++++++++++
 3 files changed, 39 insertions(+), 7 deletions(-)

diff -Nru awstats-7.8/debian/awstats.postinst 
awstats-7.8/debian/awstats.postinst
--- awstats-7.8/debian/awstats.postinst 2022-12-07 17:47:25.000000000 -0300
+++ awstats-7.8/debian/awstats.postinst 2023-08-22 22:57:27.000000000 -0300
@@ -17,13 +17,6 @@
                chown www-data:www-data /var/cache/awstats
                chmod 750 /var/cache/awstats
        fi
-       # clean-up old script that didn't run
-       if [ -n "$2" ]; then
-           if dpkg --compare-versions "$2" lt '7.8-1~'; then
-               rm -f /etc/logrotate.d/httpd-prerotate/awstats/prerotate.sh
-               rmdir /etc/logrotate.d/httpd-prerotate/awstats/ || true
-           fi
-       fi
     ;;
 
     abort-upgrade|abort-remove|abort-deconfigure)
diff -Nru awstats-7.8/debian/awstats.preinst awstats-7.8/debian/awstats.preinst
--- awstats-7.8/debian/awstats.preinst  1969-12-31 21:00:00.000000000 -0300
+++ awstats-7.8/debian/awstats.preinst  2023-07-08 15:51:53.000000000 -0300
@@ -0,0 +1,28 @@
+#! /bin/sh
+
+set -e
+
+case "$1" in
+    upgrade)
+       # clean-up old script that didn't run
+       if [ -n "$2" ]; then
+           if dpkg --compare-versions "$2" lt '7.8-1~'; then
+               rm -f /etc/logrotate.d/httpd-prerotate/awstats/prerotate.sh
+               rmdir /etc/logrotate.d/httpd-prerotate/awstats/ || true
+           fi
+       fi
+    ;;
+
+    install|abort-upgrade|abort-remove|abort-deconfigure)
+
+    ;;
+
+    *)
+        echo "preinst called with unknown argument \`$1'" >&2
+        exit 0
+    ;;
+esac
+
+#DEBHELPER#
+
+exit 0
diff -Nru awstats-7.8/debian/changelog awstats-7.8/debian/changelog
--- awstats-7.8/debian/changelog        2022-12-07 17:47:25.000000000 -0300
+++ awstats-7.8/debian/changelog        2023-08-22 22:57:27.000000000 -0300
@@ -1,3 +1,14 @@
+awstats (7.8-2+deb11u2) bullseye; urgency=medium
+
+  * QA upload.
+  * debian/awstats.postinst: part of the code was moved to the awstats.preinst
+    file, to avoid creating the
+    /etc/logrotate.d/httpd-prerotate/awstats.dpkg-new file, and thus requiring
+    user interaction when updating. (Closes: #1037213)
+  * debian/awstats.preinst: created.
+
+ -- Lourisvaldo Figueredo Junior <lourisva...@figueredo.tec.br>  Tue, 22 Aug 
2023 22:57:27 -0300
+
 awstats (7.8-2+deb11u1) bullseye; urgency=medium
 
   * QA upload.

Reply via email to