On Mon, 01 Jul 2013 13:58:51 +0200, Franck Joncourt wrote:

> Do you think you would have time to fix the RC bug against psad? I
> have not found the time to work on it yet, and as I am going to be
> on holidays by the end on the week, it will still be opened for some
> weeks. I should have taken more time to fix it but I have focused on
> fwknop so far.

Hey, why not looking at this nasty bug again :)

Ok, so first of all I can (unsurprisingly) reproduce it with Andreas'
recipe.

And I think I found a solution; preinst scripts can also be called as
preinst install old-version
so we can just extend the condition and should be done.

In my test with the same steps this works (and the upgrade case of
course till works too).

No guarantees about side effects :)


If this looks good to both of you I'm happy to upload if you can't do
it in the next days.


Cheers,
gregor

-- 
 .''`.  Homepage: http://info.comodo.priv.at/ - OpenPGP key 0xBB3A68018649AA06
 : :' : Debian GNU/Linux user, admin, and developer  -  http://www.debian.org/
 `. `'  Member of VIBE!AT & SPI, fellow of the Free Software Foundation Europe
   `-   NP: Tracy Chapman: Open Arms
diff -Nru psad-2.2.1/debian/changelog psad-2.2.1/debian/changelog
--- psad-2.2.1/debian/changelog	2013-01-06 11:38:52.000000000 +0100
+++ psad-2.2.1/debian/changelog	2013-07-01 19:15:26.000000000 +0200
@@ -1,3 +1,14 @@
+psad (2.2.1-2.1) UNRELEASED; urgency=low
+
+  * Non-maintainer upload.
+  * Fix "prompting due to modified conffiles which were not modified by
+    the user":
+    d/psad.preinst: also revert changes to conffile when we install with an
+    old version.
+    (Closes: #675231)
+
+ -- gregor herrmann <gre...@debian.org>  Mon, 01 Jul 2013 18:56:46 +0200
+
 psad (2.2.1-2) unstable; urgency=low
 
   * Enabled back the kmsgsd daemon.
diff -Nru psad-2.2.1/debian/psad.preinst psad-2.2.1/debian/psad.preinst
--- psad-2.2.1/debian/psad.preinst	2013-01-06 11:38:52.000000000 +0100
+++ psad-2.2.1/debian/psad.preinst	2013-07-01 19:36:36.000000000 +0200
@@ -34,14 +34,19 @@
         rm $conffile.old
 }
 
-if [ "$1" = "upgrade" ]; then
+if [ "$1" = "upgrade" -o "$1" = "install" ]; then
 
     # Revert changes added to the configuration file by the postinst script
     # if we are upgrading from a version which changed it (#688891)
+    # or if we are installed with a prior version (#675231)
     if [ -n "$2" ] && dpkg --compare-versions 2.2-3 gt $2 ; then
         update_conf "_CHANGEME_" "HOSTNAME" "/etc/psad/psad.conf"
     fi
 
+fi
+
+if [ "$1" = "upgrade" ]; then
+
     # This script is only intended to fix bug #497574.
     # We check for an upgrade from Psad older than 2.1.5 and remove the old
     # Psad process if needed.

Attachment: signature.asc
Description: Digital signature

Reply via email to