Debian Bug report logs - #337992
acidlab: sarge to sid upgrade mess with conffiles

version graph

Package: acidlab; Maintainer for acidlab is (unknown);

Reported by: Bill Allombert <ballombe@debian.org>

Date: Mon, 7 Nov 2005 18:48:04 UTC

Severity: serious

Tags: patch

Found in version acidlab/0.9.6b20-13

Fixed in version acidlab/0.9.6b20-15

Done: Javier Fernandez-Sanguino Pen~a <jfs@computer.org>

Bug is archived. No further changes may be made.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, jbouse@debian.org (Jeremy T. Bouse):
Bug#337992; Package acidlab. Full text and rfc822 format available.

Acknowledgement sent to Bill Allombert <ballombe@debian.org>:
New Bug report received and forwarded. Copy sent to jbouse@debian.org (Jeremy T. Bouse). Full text and rfc822 format available.

Message #5 received at submit@bugs.debian.org (full text, mbox):

From: Bill Allombert <ballombe@debian.org>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: acidlab: sarge to sid upgrade mess with conffiles
Date: Mon, 7 Nov 2005 19:35:04 +0100
Package: acidlab
Version: 0.9.6b20-13
Severity: serious

When upgrading from sarge, acidlab mess with conffiles and triggers the
dpkg conffiles handling for the file /etc/acidlab/acid_conf.php
while I did not modify it, which is confusing.

See the piuparts log at
<http://people.debian.org/~ballombe/misc/acidlab.piu>

<snip>
Setting up acidlab (0.9.6b20-13) ...

Configuration file `/etc/acidlab/acid_conf.php'
 ==> Modified (by you or by a script) since installation.
 ==> Package distributor has shipped an updated version.
   What would you like to do about it ?  Your options are:
    Y or I  : install the package maintainer's version
    N or O  : keep your currently-installed version
      D     : show the differences between the versions
      Z     : background this process to examine the situation
 The default action is to keep your current version.
*** acid_conf.php (Y/I/N/O/D/Z) [default=N] ? D
--- /etc/acidlab/acid_conf.php	2005-11-07 18:01:39.000000000 +0000
+++ /etc/acidlab/acid_conf.php.dpkg-new	2005-11-01 13:44:36.000000000 +0000
@@ -9,7 +9,7 @@
  *        $foo = "c:\tmp"    [OK]
  *        $foo = "c:\tmp\"   [WRONG]
  */
-$DBlib_path = "/usr/share/adodb";
+$DBlib_path = "/usr/share/php/adodb";
 
 /* The type of underlying alert database
  * 
@@ -17,7 +17,7 @@
  *  PostgresSQL : "postgres"
  *  MS SQL Server : "mssql"
  */
-$DBtype = "mysql";
+$DBtype = "DBTYPE";
 
 /* Alert DB connection parameters
  *   - $alert_dbname   : MySQL database name of Snort alert DB
@@ -29,18 +29,18 @@
  *  This information can be gleaned from the Snort database
  *  output plugin configuration.
  */
-$alert_dbname   = "snort_log";
-$alert_host     = "localhost";
-$alert_port     = "";
-$alert_user     = "root";
-$alert_password = "mypassword";
+$alert_dbname   = "ALERT_NAME";
+$alert_host     = "ALERT_HOST";
+$alert_port     = "ALERT_PORT";
+$alert_user     = "ALERT_USER";
+$alert_password = "ALERT_PASSWORD";
 
 /* Archive DB connection parameters */
-$archive_dbname   = "snort_archive";
-$archive_host     = "localhost";
-$archive_port     = "";
-$archive_user     = "root";
-$archive_password = "mypassword";
+$archive_dbname   = "ARCHIVE_NAME";
+$archive_host     = "ARCHIVE_HOST";
+$archive_port     = "ARCHIVE_PORT";
+$archive_user     = "ARCHIVE_USER";
+$archive_password = "ARCHIVE_PASSWORD";
 
 /* Type of DB connection to use
  *   1  : use a persistant connection (pconnect)
@@ -221,22 +221,27 @@
 /* Whois query */
 $external_whois_link = "http://www.samspade.org/t/ipwhois?a=";
 //$external_whois_link = "http://www.geektools.com/cgi-bin/proxy.cgi?targetnic=auto&query="
+// Alternative:
+// $external_dns_link = "http://www.dnsstuff.com/tools/whois.ch?ip=";
 
  /* DNS query */
 $external_dns_link = "http://www.samspade.org/t/dns?a=";
+// Alternative:
+// $external_dns_link = "http://www.dnsstuff.com/tools/lookup.ch?type=A&name=";
 
 /* SamSpade "all" query */
 $external_all_link = "http://www.samspade.org/t/lookat?a=";
 
 /* TCP/UDP port database */
-$external_port_link = "http://www.snort.org/ports.html?port=";
-//$external_port_link = "http://www.portsdb.org/bin/portsdb.cgi?portnumber=";
+// No longer available:
+// $external_port_link = "http://www.snort.org/ports.html?port=";
+$external_port_link = "http://www.portsdb.org/bin/portsdb.cgi?portnumber=";
 
 /* Signature references */
 $external_sig_link = array("bugtraq"   => array("http://www.securityfocus.com/bid/", ""),
-                           "snort"     => array("http://www.snort.org/snort-db/sid.html?sid=", ""),
+                           "snort"     => array("http://www.snort.org/pub-bin/sigs.cgi?sid=", ""),
                            "cve"       => array("http://cve.mitre.org/cgi-bin/cvename.cgi?name=", ""),
-                           "nessus"       => array("http://cgi.nessus.org/plugins/dump.php3?id=", ""),
+                           "nessus"       => array("http://www.nessus.org/plugins/index.php?view=single&id=", ""),
                            "arachnids" => array("http://www.whitehats.com/info/ids", ""),
                            "mcafee"    => array("http://vil.nai.com/vil/content/v_", ".htm"),
                            "icat"      => array("http://icat.nist.gov/icat.cfm?cvename=", ""));
1
</snip>

Cheers,
-- 
Bill. <ballombe@debian.org>

Imagine a large red swirl here. 



Information forwarded to debian-bugs-dist@lists.debian.org, jbouse@debian.org (Jeremy T. Bouse):
Bug#337992; Package acidlab. Full text and rfc822 format available.

Acknowledgement sent to Justin Pryzby <justinpryzby@users.sourceforge.net>:
Extra info received and forwarded to list. Copy sent to jbouse@debian.org (Jeremy T. Bouse). Full text and rfc822 format available.

Message #10 received at 337992@bugs.debian.org (full text, mbox):

From: Justin Pryzby <justinpryzby@users.sourceforge.net>
To: 337992@bugs.debian.org
Subject: acidlib conffiles
Date: Fri, 20 Jan 2006 12:03:13 -0500
Hello Jeremy,

WRT bug #337992, what does acidlib do with its conffiles?

-- 
Clear skies,
Justin



Information forwarded to debian-bugs-dist@lists.debian.org, jbouse@debian.org (Jeremy T. Bouse):
Bug#337992; Package acidlab. Full text and rfc822 format available.

Acknowledgement sent to Justin Pryzby <justinpryzby@users.sourceforge.net>:
Extra info received and forwarded to list. Copy sent to jbouse@debian.org (Jeremy T. Bouse). Full text and rfc822 format available.

Message #15 received at 337992@bugs.debian.org (full text, mbox):

From: Justin Pryzby <justinpryzby@users.sourceforge.net>
To: 335276@bugs.debian.org, 345112@bugs.debian.org, 304066@bugs.debian.org, 345113@bugs.debian.org, 346282@bugs.debian.org, 337992@bugs.debian.org
Subject: transferring ownership of conffile to avoid dpkg prompt; incomplete solution
Date: Wed, 25 Jan 2006 22:56:27 -0500
At least 4 major packages are presently affected by conffile prompts
during upgrades from Sarge to current testing, because the name of the
package owning some conffile changed.  When dpkg queries "what is the
md5sum of the old conffile", it probably looks only for md5sums of
files owned by the old package, and so finds nothing, and the usual
logic doesn't apply.

See also bullet 3 of Bill Allombert's message titled "Some bits of
experience gained from handling upgrade-reports"; this is a similar
situation:
  http://lists.debian.org/debian-devel-announce/2005/06/msg00006.html

Bill's simple recipe is to remove the conffile in preinst if the
md5sum of the conffile matches that of the stable version.
http://dpkg.org/ has an even better example, which plays nicely even
for upgrades from versions not in the stable release; it works by
parsing the dpkg status database with sed (and not distinguising
between which package owns a conffile).

During preinst, status contains the old md5sums, and immediately
before calling postinst configure, new conffiles are put into place,
with a prompt if the current md5sum matches neither the stored value
nor the new value.

At the very least, I would expect no unnecessary conffile prompts on
upgrade from sarge to etch; so, I'm sending this now instead of
waiting for myself or someone else to come up with a more complete
solution.

Check out the minimal packages, conf-owner-transfer and
conf-owner-test, which you can use to help understand what is going
on:
  http://justinpryzby.com/debian/conf-owner-transfer_1.tar.gz

I note that it does not preserve conffile removal, and keybuk notes
that errors are not handled (for example, aborted abgrades).

# Start from a fresh state
sudo dpkg -P conf-owner-{test,transfer}

# Start with a single package "conf-owner-test" which owns the
# conffile /etc/confowner.conf; ignore the presence of the second
# package "conf-owner-transfer".
./debian/rules v1

# Build and install version 1.  Note that "conf-owner-transfer" either
# doesn't exist at version 1, or doesn't own the conffile.
dpkg-buildpackage -rfakeroot
sudo dpkg -i ../conf-owner-test_1_all.deb

# Increase the binary package version, and switch which binary package
# owns the conffile.  For simplity, I don't rename the directory.
./debian/rules v2

# Build and install version 2; note that both packages are installed
# in the same dpkg run.  Note the the conffile has been updated
# without prompting.  Repeat the process, after commenting out the
# "rm" line, and note how much nicer it was to not be prompted.
dpkg-buildpackage -rfakeroot
sudo dpkg -i  ../conf-owner-{test,transfer}_2_all.deb

-- 
Clear skies,
Justin



Information forwarded to debian-bugs-dist@lists.debian.org, jbouse@debian.org (Jeremy T. Bouse):
Bug#337992; Package acidlab. Full text and rfc822 format available.

Acknowledgement sent to Matt Brown <matt@mattb.net.nz>:
Extra info received and forwarded to list. Copy sent to jbouse@debian.org (Jeremy T. Bouse). Full text and rfc822 format available.

Message #20 received at 337992@bugs.debian.org (full text, mbox):

From: Matt Brown <matt@mattb.net.nz>
To: 337992@bugs.debian.org
Subject: NMU Patch to fix this bug
Date: Mon, 13 Feb 2006 23:46:22 +1300
[Message part 1 (text/plain, inline)]
Hi, 

I have prepared a NMU patch to fix this bug as a part of the T & S
portion of my NM application. 

The problem is not that the package owning the file has changed name.
acid_conf.php should never have been a conffile in the first place as
the postinst script always updated its contents based on the results of
debconf questions to substitute in the database connection parameters. 

This patch migrates acid_conf.php to be handled by ucf rather than as a
conffile. Additionally I have added logic to try and detect an upgrade
from an "unmodified" acid_conf.php so that the user is not prompted
unnecessarily during the Sarge -> Etch upgrade. This is achieved by
shipping a copy of the configuration file as it was in the 0.9.6b20-10
version of the package, recreating the original file with the
appropriate debconf values substituted in and creating an md5sum of that
file to pass to ucf. This results in the user being prompted only if
they have modified the file by hand. 

Obviously I'm not yet a DD so this NMU will be made by my AM (formorer)
at a later date. In the meantime packages are available in my repository
at http://www.mattb.net.nz/debian/

Kind Regards

-- 
Matt Brown
matt@mattb.net.nz
Mob +64 21 611 544 www.mattb.net.nz
[acidlab-0.9.6b20-13.1-nmu.patch (text/x-patch, attachment)]
[signature.asc (application/pgp-signature, inline)]

Tags added: patch Request was from Matt Brown <matt@mattb.net.nz> to control@bugs.debian.org. Full text and rfc822 format available.

Reply sent to Javier Fernandez-Sanguino Pen~a <jfs@computer.org>:
You have taken responsibility. Full text and rfc822 format available.

Notification sent to Bill Allombert <ballombe@debian.org>:
Bug acknowledged by developer. Full text and rfc822 format available.

Message #27 received at 337992-close@bugs.debian.org (full text, mbox):

From: Javier Fernandez-Sanguino Pen~a <jfs@computer.org>
To: 337992-close@bugs.debian.org
Subject: Bug#337992: fixed in acidlab 0.9.6b20-15
Date: Fri, 03 Mar 2006 13:47:09 -0800
Source: acidlab
Source-Version: 0.9.6b20-15

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

acidlab-doc_0.9.6b20-15_all.deb
  to pool/main/a/acidlab/acidlab-doc_0.9.6b20-15_all.deb
acidlab-mysql_0.9.6b20-15_all.deb
  to pool/main/a/acidlab/acidlab-mysql_0.9.6b20-15_all.deb
acidlab-pgsql_0.9.6b20-15_all.deb
  to pool/main/a/acidlab/acidlab-pgsql_0.9.6b20-15_all.deb
acidlab_0.9.6b20-15.diff.gz
  to pool/main/a/acidlab/acidlab_0.9.6b20-15.diff.gz
acidlab_0.9.6b20-15.dsc
  to pool/main/a/acidlab/acidlab_0.9.6b20-15.dsc
acidlab_0.9.6b20-15_all.deb
  to pool/main/a/acidlab/acidlab_0.9.6b20-15_all.deb



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 337992@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Javier Fernandez-Sanguino Pen~a <jfs@computer.org> (supplier of updated acidlab 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 ftpmaster@debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.7
Date: Fri,  3 Mar 2006 18:32:50 +0100
Source: acidlab
Binary: acidlab-doc acidlab-pgsql acidlab acidlab-mysql
Architecture: source all
Version: 0.9.6b20-15
Distribution: unstable
Urgency: low
Maintainer: Jeremy T. Bouse <jbouse@debian.org>
Changed-By: Javier Fernandez-Sanguino Pen~a <jfs@computer.org>
Description: 
 acidlab    - Analysis Console for Intrusion Databases
 acidlab-doc - Analysis Console for Intrusion Databases (documentation)
 acidlab-mysql - Analysis Console for Intrusion Databases for MySQL
 acidlab-pgsql - Analysis Console for Intrusion Databases for Postgres
Closes: 337992 341131
Changes: 
 acidlab (0.9.6b20-15) unstable; urgency=low
 .
   [ Matt Brown ]
    * Fixed incorrect handling of /etc/acidlab/acid_conf.php (Closes: #337992)
       - acid_conf.php cannot be a conffile as the maintainer scripts modify it
       - Added dependency on ucf and use that to manage acid_conf.php
       - Attempt to recreate previous 'unmodified' acid_conf.php from the
         0.9.6b20-10 package and use its md5sum to prevent unnecessary prompting
         if possible. This should make sarge -> etch upgrades go smoothly if
         the user has not modified the conf file.
       Note: This will only work for upgrades from 0.9.6b20-10{,.1} but not
       from upgrades of other versions of the package, since there archive only
       hold these it shouldn't be much of an issue now.
   [ Javier Fernandez-Sanguino ]
   * Fix the issue that prevent alerts from being removed (Closes: #341131)
   * When purging, remove the /etc/acidlab/acid_conf.php.md5sum file too
Files: 
 e3d568967dd2d1bd8ad9e21c7a1d236a 840 web extra acidlab_0.9.6b20-15.dsc
 0fc2806d15c886db15fba9938851af8e 358577 web extra acidlab_0.9.6b20-15.diff.gz
 0a7a76bc082692af0b537bc8f1b9d9b4 5684 web extra acidlab-mysql_0.9.6b20-15_all.deb
 c435cd31fd36952d75b8e73e325a0093 5684 web extra acidlab-pgsql_0.9.6b20-15_all.deb
 7275ad4ad20258d701e8c7a5b078a77c 277168 web extra acidlab-doc_0.9.6b20-15_all.deb
 34e76b12c926b1b6e55c40860f12bb6b 664266 web extra acidlab_0.9.6b20-15_all.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)

iQCVAwUBRAiDNvtEPvakNq0lAQL8VAP/VhyZLPofbtcZHX2oCIkIZWEMOpFbGq21
6OzLh7f5nrcBMSTC+PJQJnB5WFRXEzKVvEQnGgtCK+iRJs//qGkrwWpdb8UrwieB
gzS319nngA4QFLavhLbFoZDC/fb7Ase4ql665dAeoG1plJonL4RozibHlTHigg/C
e+EUCc7QgC0=
=NykG
-----END PGP SIGNATURE-----




Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Wed, 27 Jun 2007 04:04:29 GMT) Full text and rfc822 format available.

Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Mon Apr 21 02:17:43 2014; Machine Name: buxtehude.debian.org

Debian Bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.