Debian Bug report logs - #345113
mysql-server-4.1: conffile prompts during upgrade

Package: mysql-server-4.1; Maintainer for mysql-server-4.1 is (unknown);

Reported by: Justin Pryzby <justinpryzby@users.sourceforge.net>

Date: Thu, 29 Dec 2005 03:48:04 UTC

Severity: important

Done: Christian Hammers <ch@debian.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, Christian Hammers <ch@debian.org>:
Bug#345113; Package mysql-server-4.1. Full text and rfc822 format available.

Acknowledgement sent to Justin Pryzby <justinpryzby@users.sourceforge.net>:
New Bug report received and forwarded. Copy sent to Christian Hammers <ch@debian.org>. Full text and rfc822 format available.

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

From: Justin Pryzby <justinpryzby@users.sourceforge.net>
To: Debian BTS Submission <submit@bugs.debian.org>
Subject: mysql-server-4.1: conffile prompts during upgrade
Date: Wed, 28 Dec 2005 22:47:29 -0500
[Message part 1 (text/plain, inline)]
Package: mysql-server-4.1
Severity: important

Upgrading from 4.0.24-10sarge1 to 5.0.16-1 I got a large number of
unnecessary conffile prompts.  I'm including a tarball of the files
that caused prompting.  Actually I'm not sure about the package names
or versions, so I'm also including my dpkg.log fragments.

This might be useful: http://www.dpkg.org/ConffileHandling

firefox and openssh also have this problem.
[mysql.tar.bz2 (text/plain, attachment)]

Reply sent to Christian Hammers <ch@debian.org>:
You have taken responsibility. Full text and rfc822 format available.

Notification sent to Justin Pryzby <justinpryzby@users.sourceforge.net>:
Bug acknowledged by developer. Full text and rfc822 format available.

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

From: Christian Hammers <ch@debian.org>
To: Justin Pryzby <justinpryzby@users.sourceforge.net>, 345113-done@bugs.debian.org
Subject: Re: Bug#345113: mysql-server-4.1: conffile prompts during upgrade
Date: Mon, 9 Jan 2006 22:07:44 +0100
Hello

On 2005-12-28 Justin Pryzby wrote:
> Upgrading from 4.0.24-10sarge1 to 5.0.16-1 I got a large number of
> unnecessary conffile prompts.  I'm including a tarball of the files
> that caused prompting.  Actually I'm not sure about the package names
> or versions, so I'm also including my dpkg.log fragments.

You only get prompts when you have modified the config files.
If you never touched e.g. /etc/init.d/mysql then there would have been no
warning and as you did it was perfectly intended to ask you if you want
to preserve those changes or update to my version.

bye,

-christian-



Bug reopened, originator not changed. Request was from Justin Pryzby <justinpryzby@users.sourceforge.net> to control@bugs.debian.org. Full text and rfc822 format available.

Information forwarded to debian-bugs-dist@lists.debian.org, Christian Hammers <ch@debian.org>:
Bug#345113; Package mysql-server-4.1. Full text and rfc822 format available.

Acknowledgement sent to justinpryzby@users.sourceforge.net:
Extra info received and forwarded to list. Copy sent to Christian Hammers <ch@debian.org>. Full text and rfc822 format available.

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

From: justinpryzby@users.sourceforge.net
To: Christian Hammers <ch@debian.org>
Subject: this is a real bug! Re: Bug#345113: mysql-server-4.1: conffile prompts during upgrade
Date: Mon, 9 Jan 2006 19:15:54 -0500
reopen 345113
thanks

On Mon, Jan 09, 2006 at 10:07:44PM +0100, Christian Hammers wrote:
> Hello
> 
> On 2005-12-28 Justin Pryzby wrote:
> > Upgrading from 4.0.24-10sarge1 to 5.0.16-1 I got a large number of
> > unnecessary conffile prompts.  I'm including a tarball of the files
> > that caused prompting.  Actually I'm not sure about the package names
> > or versions, so I'm also including my dpkg.log fragments.
> 
> You only get prompts when you have modified the config files.
This is false.  I also observe the same problem with mozilla-firefox
=> firefox, openoffice.org => openoffice.org2-common, and ssh =>
openssh-{client,server}.  The general problem is that dpkg sees a
conffile, but doesn't take into account that the conffile used to be
owned by a different package.

> If you never touched e.g. /etc/init.d/mysql then there would have been no
> warning and as you did it was perfectly intended to ask you if you want
> to preserve those changes or update to my version.
Please look at a diff of the config files included in the original
report, in particular the mysql-server log rotate conffiles.  The only
changes present are in '#' comments.  I don't know the first thing
about sql adminisistration, so I know that I didn't change that file.
Even if I did, the change would not have been about comments, and
would not have been the changes that are present.

You will get the 4 conffile prompts as documented:

 dpkg -P mysql(tab-tab-put-everything-here)
 rm -fr /etc/mysql/ and/other/relevent/stuff
 apt-get install mysql-server=4.0.24-10sarge1
 apt-get install mysql-server-4.1

-- 
Clear skies,
Justin



Information forwarded to debian-bugs-dist@lists.debian.org, Christian Hammers <ch@debian.org>:
Bug#345113; Package mysql-server-4.1. Full text and rfc822 format available.

Acknowledgement sent to Olaf van der Spek <OvdSpek@LIACS.NL>:
Extra info received and forwarded to list. Copy sent to Christian Hammers <ch@debian.org>. Full text and rfc822 format available.

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

From: Olaf van der Spek <OvdSpek@LIACS.NL>
To: 345113@bugs.debian.org
Subject: Re: Bug#345113: mysql-server-4.1: conffile prompts during upgrade
Date: Mon, 23 Jan 2006 00:01:20 +0100
> You only get prompts when you have modified the config files.
> If you never touched e.g. /etc/init.d/mysql then there would have 
been > no
> warning and as you did it was perfectly intended to ask you if you
> want
> to preserve those changes or update to my version.

I think that's not true. The only-if-modified appears to only apply to 
files from the same package.
When packages (or package names) change I frequently get those questions.



Information forwarded to debian-bugs-dist@lists.debian.org, Christian Hammers <ch@debian.org>:
Bug#345113; Package mysql-server-4.1. 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 Christian Hammers <ch@debian.org>. Full text and rfc822 format available.

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

From: Justin Pryzby <justinpryzby@users.sourceforge.net>
To: Olaf van der Spek <OvdSpek@LIACS.NL>, 345113@bugs.debian.org
Subject: Re: Bug#345113: mysql-server-4.1: conffile prompts during upgrade
Date: Sun, 22 Jan 2006 18:09:47 -0500
On Mon, Jan 23, 2006 at 12:01:20AM +0100, Olaf van der Spek wrote:
> > You only get prompts when you have modified the config files.
> > If you never touched e.g. /etc/init.d/mysql then there would have 
> been > no
> > warning and as you did it was perfectly intended to ask you if you
> > want
> > to preserve those changes or update to my version.
> 
> I think that's not true. The only-if-modified appears to only apply to 
> files from the same package.
> When packages (or package names) change I frequently get those questions.
Yea, and it is at least an important bug.  Please don't hesitate to
file such bugs.  See also Bill Allombert's message "Some bits of
experience gained from handling upgrade-reports".  It is probably a
release blocker, though nothing in policy specifically says so.

-- 
Clear skies,
Justin



Information forwarded to debian-bugs-dist@lists.debian.org, Christian Hammers <ch@debian.org>:
Bug#345113; Package mysql-server-4.1. 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 Christian Hammers <ch@debian.org>. Full text and rfc822 format available.

Message #32 received at 345113@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, Christian Hammers <ch@debian.org>:
Bug#345113; Package mysql-server-4.1. 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 Christian Hammers <ch@debian.org>. Full text and rfc822 format available.

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

From: Justin Pryzby <justinpryzby@users.sourceforge.net>
To: 345113@bugs.debian.org
Subject: conffile prompts during upgrade
Date: Wed, 1 Mar 2006 14:19:25 -0500
Can I expect to see this bug fixed for etch?

http://bugs.debian.org/345113

Justin



Reply sent to Christian Hammers <ch@debian.org>:
You have taken responsibility. Full text and rfc822 format available.

Notification sent to Justin Pryzby <justinpryzby@users.sourceforge.net>:
Bug acknowledged by developer. Full text and rfc822 format available.

Message #42 received at 345113-done@bugs.debian.org (full text, mbox):

From: Christian Hammers <ch@debian.org>
To: 345113-done@bugs.debian.org
Cc: seanius@debian.org
Subject: Re: conffile prompts during upgrade
Date: Wed, 29 Mar 2006 16:11:58 +0200
Hello Justin

> Can I expect to see this bug fixed for etch?
>
> http://bugs.debian.org/345113
> 
> Justin

It seems to me that this bug report is obsolete now, there must have
been a change in dpkg that solves the problem more elegant.

When updating from oldname version 1 to oldname version 2 which does no
longer provide the config file, dpkg still does assign the config file
to that package - as it would be orphaned else - but writes
	Conffiles:
	  /etc/whatever.conf aaaaa1111aaaaa32222aaa obsolete
in /var/lib/dpkg/status.

When installing package newname which now provides the config file, the
transition goes smothly.

I've just checked it by installing mysql-common-4.1 (4.1.11a-4sarge2)
which provides /etc/mysql/my.cnf and then upgraded to the latest
mysql-server-5.0 (5.0.19-2) and mysql-common (5.0.19-2). There was
no question whatsoever and the configfile is now owned by mysql-common
(5.0.19-2).

bye,

-christian-





Information forwarded to debian-bugs-dist@lists.debian.org, Christian Hammers <ch@debian.org>:
Bug#345113; Package mysql-server-4.1. 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 Christian Hammers <ch@debian.org>. Full text and rfc822 format available.

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

From: Justin Pryzby <justinpryzby@users.sourceforge.net>
To: Bill.Allombert@math.u-bordeaux1.fr, Ian Jackson <iwj@ubuntu.com>, 346282@bugs.debian.org, 345113@bugs.debian.org, 335276@bugs.debian.org
Cc: control@bugs.debian.org
Subject: Re: transferring ownership of conffile to avoid dpkg prompt
Date: Mon, 19 Jun 2006 12:50:45 -0400
# openoffice:
found 346282 2.0.1-5

# openssh:
found 335276 1:4.2p1-8
thanks

# This seems to affect upgrades from sarge "mysql-server" but not
# "mysql-server-4.1":
reassign 345113 mysql-server-5.0
reopen 345113
found 345113 5.0.22-2

On Thu, Jun 15, 2006 at 11:34:00AM -0400, pryzbyj wrote:
> On Thu, Jun 15, 2006 at 11:46:41AM +0200, Bill.Allombert@math.u-bordeaux1.fr wrote:
> > On Wed, Jan 25, 2006 at 10:56:27PM -0500, Justin Pryzby wrote:
> > > 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).
> > 
> > Hello Rene,
> > 
> > We really have to fix this problem before the release.
> > 
> > What can I do so that this bug is finally addressed ?
> > Would you accept a patch that remove the offending file in the preinst
> > if the md5sum match the sarge version ?
> Were you able to reproduce the bug?  I tried briefly (with current
> dpkg) and failed.  I suspect that upgrading dpkg first will solve the
> problem; but, for etch, there should probably be a package-specific
> "workarounds", so that users don't get prompted even if they don't
> upgrade dpkg first (I don't know if this will be in the release notes,
> or why it would be..).
The prompt is experienced for these three packages when upgrading with
the sarge dpkg, but not with current etch dpkg.  Upgrading dpkg wasn't
in the sarge release notes, only aptitude and doc-base were.  I don't
suppose openoffice can justify a predepency on dpkg (and even that
might not guarantee a new dpkg invocation before installing OOO).
There's no reason to have to manually upgrade it; whatever packages
haven't fixed this yet should still do so; etch+1 won't need such
things, since dpkg will be guaranteed to be of a sufficiently recent
version.

Please see jadetex as an example of how to implement this using dpkg
error handling rollbacks, too.  You should probably run sed on the
dpkg status database instead of using a hardcoded value, though.

BTW, it occurs to me that the dpkg "obsolete" field destroys most
peoples' md5sum extraction from the status file, since dpkg.org
recommends s/.* //, the md5sum will be "obsolete".  I'm not sure when
this interaction will happen, but it means alot of scripts are
broken..  Note that people using awk '{print $2}' or cut -d' ' -f3 or
whatever will get the right result.  I don't know if this matters much
in practice, since I guess dpkg will handle the removal automatically.
I suspect that it won't do the right thing on conffile "move" though I
don't have an example.

Justin



Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Sun, 17 Jun 2007 15:03:51 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: Thu Apr 24 05:34:16 2014; Machine Name: beach.debian.org

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