Debian Bug report logs - #4950
dpkg needs a way to install missing conffiles

Package: dpkg; Maintainer for dpkg is Dpkg Developers <debian-dpkg@lists.debian.org>; Source for dpkg is src:dpkg (PTS, buildd, popcon).

Reported by: "Darren/Torin/Who Ever..." <torin@daft.com>

Date: Fri, 25 Oct 1996 08:33:05 UTC

Severity: wishlist

Done: Anthony Towns <ajt@master.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-devel@lists.debian.org:
Bug#4950. (full text, mbox, link).


Acknowledgement sent to "Darren/Torin/Who Ever..." <torin@daft.com>:
New bug report received and forwarded.

Your message didn't have a Package: line at the start (in the pseudo-header following the real mail header), or didn't have a psuedo-header at all.

This makes it much harder for us to categorise and deal with your problem report; please ensure that you say which package(s) and version(s) the problem is with next time. Some time in the future the problem reports system may start rejecting such messages.

(full text, mbox, link).


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

From: "Darren/Torin/Who Ever..." <torin@daft.com>
To: submit@bugs.debian.org
Subject: dpkg needs a way to install missing conffiles
Date: 25 Oct 1996 01:19:55 -0700
-----BEGIN PGP SIGNED MESSAGE-----

Package: dpkg
Version: 1.4.0.3

Sometimes you want dpkg to install missing conffiles.  That is, dpkg
makes no mention of a conffile if it isn't on the system and there is
no way to force it drop a new one short of dpkg-deb -x and then moving it
over.

I recently had a nasty system crash where I lost my motherboard, as well
as my disc containing my root and /usr partitions.  I was able to
recover much of my system but there was an "interesting" flaw in the BRU
backup script and so rather old files weren't on the tape.
Since /var wasn't destroyed, dpkg thought I had many packages installed
that I didn't.  This wasn't much of a problem, I was able to write a
perl script that told me what packages didn't have files on the system
and purge and re-install them (to get conffiles).   Unfortunately, you
don't want to do this with essential packages and therefore you have to
determine they are missing; extract out the files with dpkg-deb -x and
then move them into place.

Darren
- -- 
<torin@daft.com> <http://www.daft.com/~torin> <torin@debian.org> <torin@io.com>
Darren Stalder/2608 Second Ave, @282/Seattle, WA 98121-1212/USA/+1-800-921-4996
@ Do you have your clothes on? I probably don't. Take yours off. Feel better. @
@ Sysadmin, webweaver, postmaster for hire.  C/Perl/CGI programmer and tutor. @

-----BEGIN PGP SIGNATURE-----
Version: 2.6.2
Comment: Processed by Mailcrypt 3.4, an Emacs/PGP interface

iQCVAwUBMnB4I44wrq++1Ls5AQEcBwP/b9I/ZqvvrMCtOKguzG6fFa24ODSDANuK
jdYwSagb0mOOcdm2a4smgOcJUI0eZ9ebtxItSPKOeVPRTfSmUKd/Aagu5juhzdR9
b6cIZFlDUoCM1d/XrcDfyLJrnYt+oyJPHFvQlN7WQ+eRtSxm/Y9jnLWnShQxoMQV
BQgHjTAwqys=
=P6Qp
-----END PGP SIGNATURE-----


Bug assigned to package `dpkg'. Request was from Guy Maor <maor@ece.utexas.edu> to control@bugs.debian.org. (full text, mbox, link).


Severity set to `wishlist'. Request was from Ian Jackson <ijackson@chiark.greenend.org.uk> to control@bugs.debian.org. (full text, mbox, link).


Information forwarded to Klee Dienes and Ian Jackson <dpkg-maint@chiark.greenend.org.uk>:
Bug#4950; Package dpkg. (full text, mbox, link).


Acknowledgement sent to remco@blaakmeer.student.utwente.nl (Remco Blaakmeer):
Extra info received and forwarded to maintainer. Copy sent to Klee Dienes and Ian Jackson <dpkg-maint@chiark.greenend.org.uk>. (full text, mbox, link).


Message #14 received at 4950-maintonly@bugs.debian.org (full text, mbox, reply):

From: remco@blaakmeer.student.utwente.nl (Remco Blaakmeer)
To: 4950-maintonly@bugs.debian.org
Subject: Old bugs need to be looked at
Date: Sun, 1 Feb 1998 12:24:05 +0100 (CET)
This is an automated message sent to all bugs older than one year.

This bug is very old. Please take a look at it and see if you can fix it.
If it has already been fixed, please close it.

If you have problems fixing it or if you don't have the time to fix it,
please ask the people on debian-devel@lists.debian.org for help, so that
at least the oldest bugs can be solved before Debian 2.0 is released.

Remco Blaakmeer


Information forwarded to debian-bugs-dist@lists.debian.org, Ian Jackson and others <dpkg-maint@chiark.greenend.org.uk>:
Bug#4950; Package dpkg. (full text, mbox, link).


Acknowledgement sent to Ben Collins <bcollins@debian.org>:
Extra info received and forwarded to list. Copy sent to Ian Jackson and others <dpkg-maint@chiark.greenend.org.uk>. (full text, mbox, link).


Message #19 received at 4950@bugs.debian.org (full text, mbox, reply):

From: Ben Collins <bcollins@debian.org>
To: wakkerma@debian.org
Cc: debian-dpkg@lists.debian.org, debian-devel@lists.debian.org, 4950@bugs.debian.org
Subject: [PATCH] added --force-* options for conffile handling
Date: Mon, 11 Oct 1999 11:37:05 -0400
[Message part 1 (text/plain, inline)]
This patch attempts to resolve some issues referenced in bug #4950 and lots
of others. Basically it adds four new --force-* options detailed below. This
is the last step to non-interactive upgrades.

What we have now is a situation where if there are changes from the old and
new conffile, dpkg prompts for what to do about it. Given that dpkg usually
has a sane default, and the admin usually has a good idea of what he/she
wants to do with these requests, we can supply options to get the desired
affect. Also with the current dpkg, if you remove a conffile completely,
there is no simple task for resinstalling it, since dpkg will not replace
missing conffiles with new ones.

The options added are:

  --force-confnew:	Obviously this forces dpkg to _always_ install the new
			config file without prompting.

  --force-confold:	Again, this _always_ uses the old config file without
			prompting.

  --force-confdef:	This tells dpkg to use the default choice when replacing
			config files if there is a sane default. Note, there are
			cases where dpkg concludes no default is possible, so a
			prompt would still be given in those (remote) cases.

  --force-confmiss:	This tells dpkg to actually install the new config file
			if the old one is missing.

Now the interesting part. You notice in the "confdef" force mode that there is
still a chance of a prompt. If you mix --force-confdef and --force-conf{old,new},
then you will get the default choice. If there is no default then dpkg will use
the --force-conf{old,new} option to decide what to do.

Hopefully this can make for sane auto-upgrades.

Ben
[conffile.patch (text/plain, attachment)]
[Message part 3 (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, Ian Jackson and others <dpkg-maint@chiark.greenend.org.uk>:
Bug#4950; Package dpkg. (full text, mbox, link).


Acknowledgement sent to Wichert Akkerman <wichert@liacs.nl>:
Extra info received and forwarded to list. Copy sent to Ian Jackson and others <dpkg-maint@chiark.greenend.org.uk>. (full text, mbox, link).


Message #24 received at 4950@bugs.debian.org (full text, mbox, reply):

From: Wichert Akkerman <wichert@liacs.nl>
To: Ben Collins <bcollins@debian.org>
Cc: debian-dpkg@lists.debian.org, debian-devel@lists.debian.org, 4950@bugs.debian.org
Subject: Re: [PATCH] added --force-* options for conffile handling
Date: Mon, 11 Oct 1999 17:45:40 +0200
[Message part 1 (text/plain, inline)]
Previously sparc porters wrote:
> This patch attempts to resolve some issues referenced in bug #4950 and lots
> of others. Basically it adds four new --force-* options detailed below. This
> is the last step to non-interactive upgrades.

I'm not sure I like all these options, it makes it very easy for people
to shoot themselves in the foot. I have a much more interesting patch
from Roman that I intend to add first, which will hopefully make this
patches unnecessary.

Oh, dpkg just got complete HURD support in CVS :)

Wichert.

-- 
   ________________________________________________________________
 / Generally uninteresting signature - ignore at your convenience  \
| wichert@liacs.nl                    http://www.liacs.nl/~wichert/ |
| 1024D/2FA3BC2D 576E 100B 518D 2F16 36B0  2805 3CB8 9250 2FA3 BC2D |
[Message part 2 (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, Ian Jackson and others <dpkg-maint@chiark.greenend.org.uk>:
Bug#4950; Package dpkg. (full text, mbox, link).


Acknowledgement sent to Daniel Burrows <Daniel_Burrows@brown.edu>:
Extra info received and forwarded to list. Copy sent to Ian Jackson and others <dpkg-maint@chiark.greenend.org.uk>. (full text, mbox, link).


Message #29 received at 4950@bugs.debian.org (full text, mbox, reply):

From: Daniel Burrows <Daniel_Burrows@brown.edu>
To: Ben Collins <bcollins@debian.org>
Cc: wakkerma@debian.org, debian-dpkg@lists.debian.org, debian-devel@lists.debian.org, 4950@bugs.debian.org
Subject: Re: [PATCH] added --force-* options for conffile handling
Date: Mon, 11 Oct 1999 11:50:29 -0400
On Mon, Oct 11, 1999 at 11:37:05AM -0400, Ben Collins was heard to say:
> What we have now is a situation where if there are changes from the old and
> new conffile, dpkg prompts for what to do about it. Given that dpkg usually
> has a sane default, and the admin usually has a good idea of what he/she
> wants to do with these requests, we can supply options to get the desired
> affect. Also with the current dpkg, if you remove a conffile completely,
> there is no simple task for resinstalling it, since dpkg will not replace
> missing conffiles with new ones.
> 
> The options added are:
> 
>   --force-confnew:	Obviously this forces dpkg to _always_ install the new
> 			config file without prompting.
> 
>   --force-confold:	Again, this _always_ uses the old config file without
> 			prompting.
> 
>   --force-confdef:	This tells dpkg to use the default choice when replacing
> 			config files if there is a sane default. Note, there are
> 			cases where dpkg concludes no default is possible, so a
> 			prompt would still be given in those (remote) cases.
> 
>   --force-confmiss:	This tells dpkg to actually install the new config file
> 			if the old one is missing.
> 
> Now the interesting part. You notice in the "confdef" force mode that there is
> still a chance of a prompt. If you mix --force-confdef and --force-conf{old,new},
> then you will get the default choice. If there is no default then dpkg will use
> the --force-conf{old,new} option to decide what to do.
> 
> Hopefully this can make for sane auto-upgrades.
> 
> Ben

  Hm.  While you're fixing things up, could you add an option to display a diff
of <conffile> and <conffile>.dpkg-new, and an option to mail the administrator
with a list of the conffile changes that might need to be merged? (possibly
containing these diffs)  See bug #40650 .

  Daniel

-- 
"In the Course of my Observation, these disputing, contradicting & confuting
 People are generally unfortunate in their Affairs.  They get Victory sometimes,
 but they never get Good Will, which would be of more use to them."
  -- from the autobiography of Benjamin Franklin


Information forwarded to debian-bugs-dist@lists.debian.org, Ian Jackson and others <dpkg-maint@chiark.greenend.org.uk>:
Bug#4950; Package dpkg. (full text, mbox, link).


Acknowledgement sent to Jules Bean <jmlb2@hermes.cam.ac.uk>:
Extra info received and forwarded to list. Copy sent to Ian Jackson and others <dpkg-maint@chiark.greenend.org.uk>. (full text, mbox, link).


Message #34 received at 4950@bugs.debian.org (full text, mbox, reply):

From: Jules Bean <jmlb2@hermes.cam.ac.uk>
To: Daniel Burrows <Daniel_Burrows@brown.edu>
Cc: Ben Collins <bcollins@debian.org>, wakkerma@debian.org, debian-dpkg@lists.debian.org, debian-devel@lists.debian.org, 4950@bugs.debian.org, recipient list not shown: ;
Subject: Re: [PATCH] added --force-* options for conffile handling
Date: Mon, 11 Oct 1999 17:10:10 +0100 (BST)
On Mon, 11 Oct 1999, Daniel Burrows wrote:

> On Mon, Oct 11, 1999 at 11:37:05AM -0400, Ben Collins was heard to say:
> 
>   Hm.  While you're fixing things up, could you add an option to display a diff
> of <conffile> and <conffile>.dpkg-new, and an option to mail the administrator
> with a list of the conffile changes that might need to be merged? (possibly
> containing these diffs)  See bug #40650 .

And, since the subject has come up, even better, run diff on
<cf>.dpkg-dist and <cf>.dpkg-new, and merge (perhaps using merge(1)) them
into the new conffile.

However, I've never quite satisfied myself that I understand if the
.dpkg-dist file is always there.  (It seems to always be there when I want
it..).

Jules
 
/----------------+-------------------------------+---------------------\
|  Jelibean aka  | jules@jellybean.co.uk         |  6 Evelyn Rd	       |
|  Jules aka     | jules@debian.org              |  Richmond, Surrey   |
|  Julian Bean   | jmlb2@hermes.cam.ac.uk        |  TW9 2TF *UK*       |
+----------------+-------------------------------+---------------------+
|  War doesn't demonstrate who's right... just who's left.             |
|  When privacy is outlawed... only the outlaws have privacy.          |
\----------------------------------------------------------------------/



Information forwarded to debian-bugs-dist@lists.debian.org, Ian Jackson and others <dpkg-maint@chiark.greenend.org.uk>:
Bug#4950; Package dpkg. (full text, mbox, link).


Acknowledgement sent to Ben Collins <bcollins@debian.org>:
Extra info received and forwarded to list. Copy sent to Ian Jackson and others <dpkg-maint@chiark.greenend.org.uk>. (full text, mbox, link).


Message #39 received at 4950@bugs.debian.org (full text, mbox, reply):

From: Ben Collins <bcollins@debian.org>
To: Jules Bean <jmlb2@hermes.cam.ac.uk>
Cc: Daniel Burrows <Daniel_Burrows@brown.edu>, Ben Collins <bcollins@debian.org>, wakkerma@debian.org, debian-dpkg@lists.debian.org, debian-devel@lists.debian.org, 4950@bugs.debian.org, recipient list not shown: ;
Subject: Re: [PATCH] added --force-* options for conffile handling
Date: Mon, 11 Oct 1999 12:32:12 -0400
On Mon, Oct 11, 1999 at 05:10:10PM +0100, Jules Bean wrote:
> On Mon, 11 Oct 1999, Daniel Burrows wrote:
> 
> > On Mon, Oct 11, 1999 at 11:37:05AM -0400, Ben Collins was heard to say:
> > 
> >   Hm.  While you're fixing things up, could you add an option to display a diff
> > of <conffile> and <conffile>.dpkg-new, and an option to mail the administrator
> > with a list of the conffile changes that might need to be merged? (possibly
> > containing these diffs)  See bug #40650 .
> 
> And, since the subject has come up, even better, run diff on
> <cf>.dpkg-dist and <cf>.dpkg-new, and merge (perhaps using merge(1)) them
> into the new conffile.
> 
> However, I've never quite satisfied myself that I understand if the
> .dpkg-dist file is always there.  (It seems to always be there when I want
> it..).

I've actually had a better notion which involves a version tag in the conffile.

The version number increases based on the importance of the change. For example
given these three conffiles from three package revisions.

	# conffile for foo-1.0-1
	# %DEBVER=1.0.0.0%
	option_a = 2
	# This is an option

	# conffile for foo-1.0-2
	# %DEBVER=1.0.0.1%
	option_a = 2
	# This is the only option

	# conffile for foo-1.0-3
	# %DEBVER=1.2.0.0%
	option_a = 10
	# This is the only option

Now notice between -1 and -2 we only had a simple change in the comment. No
one wants to really upgrade the conffile just for this (unless it's an important
comment), so we only increase the minor most version digit. Now from -2 to -3,
we actually changed the default of the option. Depending on the option/package,
this might be fairly important, so we increase a more significant digit in the
conffile version.

IOW, the conffiles would be rated in the importance similar to how changes in our
policy document are. Policy would have to rate each version digit and explain its
importance level for maintainers to reference. Also a sane decision has to be
made when going from non-versioned to versioned, and also for when the admin
removes the version (by mistake, or intentionally, or even changes it manually).

Also, how the user is presented this information (aswell as how they can give a
default threshold for promptless upgrades) would need some hammering out.

Ben


Information forwarded to debian-bugs-dist@lists.debian.org, Ian Jackson and others <dpkg-maint@chiark.greenend.org.uk>:
Bug#4950; Package dpkg. (full text, mbox, link).


Acknowledgement sent to Piotr Roszatycki <dexter@fnet.pl>:
Extra info received and forwarded to list. Copy sent to Ian Jackson and others <dpkg-maint@chiark.greenend.org.uk>. (full text, mbox, link).


Message #44 received at 4950@bugs.debian.org (full text, mbox, reply):

From: Piotr Roszatycki <dexter@fnet.pl>
To: Wichert Akkerman <wichert@liacs.nl>
Cc: Ben Collins <bcollins@debian.org>, debian-dpkg@lists.debian.org, Debian Development Mailing List <debian-devel@lists.debian.org>, 4950@bugs.debian.org
Subject: Re: [PATCH] added --force-* options for conffile handling
Date: Mon, 11 Oct 1999 23:53:39 +0200 (CEST)
On Mon, 11 Oct 1999, Wichert Akkerman wrote:
> > This patch attempts to resolve some issues referenced in bug #4950 and lots
> > of others. Basically it adds four new --force-* options detailed below. This
> > is the last step to non-interactive upgrades.

Good to hear it! It was my wishlist a few days ago :-)

> I'm not sure I like all these options, it makes it very easy for people
> to shoot themselves in the foot. I have a much more interesting patch
> from Roman that I intend to add first, which will hopefully make this
> patches unnecessary.

I think you could apply this patch.
The --force options are for advanced administrator who knows what
he is doing. Another option --force-remove-essential is more 
dangerous but is a standard dpkg's feature.

-- 

Piotr "Dexter" Roszatycki
mailto:dexter@fnet.pl



Information forwarded to debian-bugs-dist@lists.debian.org, Ian Jackson and others <dpkg-maint@chiark.greenend.org.uk>:
Bug#4950; Package dpkg. (full text, mbox, link).


Acknowledgement sent to Joey Hess <joey@kitenet.net>:
Extra info received and forwarded to list. Copy sent to Ian Jackson and others <dpkg-maint@chiark.greenend.org.uk>. (full text, mbox, link).


Message #49 received at 4950@bugs.debian.org (full text, mbox, reply):

From: Joey Hess <joey@kitenet.net>
To: Ben Collins <bcollins@debian.org>
Cc: Jules Bean <jmlb2@hermes.cam.ac.uk>, Daniel Burrows <Daniel_Burrows@brown.edu>, wakkerma@debian.org, debian-dpkg@lists.debian.org, debian-devel@lists.debian.org, 4950@bugs.debian.org, recipient list not shown: ;
Subject: Re: [PATCH] added --force-* options for conffile handling
Date: Mon, 11 Oct 1999 17:01:58 -0700
Ben Collins wrote:
> I've actually had a better notion which involves a version tag in the conffile.

This is an interesting idea, but it assumes conffiles can have comments in
them, and it smells like a hack to me.

I think it'd be much better if the version info was put in the
DEBIAN/conffiles file. So it would have something like:

/etc/pdmenurc 1.0.0

This might be a problem if there were conffilenames with spaces in them,
though.

-- 
see shy jo


Bug reassigned from package `dpkg' to `dpkg-iwj'. Request was from Ben Collins <bcollins@debian.org> to control@bugs.debian.org. (full text, mbox, link).


Information forwarded to debian-bugs-dist@lists.debian.org, Ian Jackson <dpkg-maint@chiark.greenend.org.uk>:
Bug#4950; Package dpkg-iwj. (full text, mbox, link).


Acknowledgement sent to Nicolás Lichtmaier <nick@debian.org>:
Extra info received and forwarded to list. Copy sent to Ian Jackson <dpkg-maint@chiark.greenend.org.uk>. (full text, mbox, link).


Message #56 received at 4950@bugs.debian.org (full text, mbox, reply):

From: Nicolás Lichtmaier <nick@debian.org>
To: Ben Collins <bcollins@debian.org>
Cc: Jules Bean <jmlb2@hermes.cam.ac.uk>, Daniel Burrows <Daniel_Burrows@brown.edu>, wakkerma@debian.org, debian-dpkg@lists.debian.org, debian-devel@lists.debian.org, 4950@bugs.debian.org, recipient list not shown: ;
Subject: Other posible conffile handling...
Date: Mon, 11 Oct 1999 19:12:49 -0300
 Each installed conffile would be copied to a private dpkg directory. This
would allow dpkg to have the previos unmodified conffile that was packaged,
so dpkg would be able to:
  1) Calculate the delta between both packaged conffiles ( d(1,2) ).
  2) Show that to the user.
  3) Optionally merge with existing conffile = p(m, d(1,2) ) .

  1--------2
   \ 
    \
      m

 Without the special dir there are other nice things that can be done as
well:

 1) Make the diff between the user-modified file and the new packaged
    version = d(m,2).
 2) Let the user edit the patch choosing wich modifications he would like
    to have applied.


 The latter form is what I'm already using for conffile handling myself.



Bug reassigned from package `dpkg-iwj' to `dpkg'. Request was from Anthony Towns <ajt@master.debian.org> to control@bugs.debian.org. (full text, mbox, link).


Bug closed, ack sent to submitter - they'd better know why ! Request was from Anthony Towns <ajt@master.debian.org> to control@bugs.debian.org. (full text, mbox, link).


Bug reassigned from package `dpkg' to `dpkg'. Request was from Anthony Towns <ajt@master.debian.org> to control@bugs.debian.org. (full text, mbox, link).


Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Thu Mar 28 10:52:55 2024; Machine Name: bembo

Debian Bug tracking system

Debbugs is free software and licensed under the terms of the GNU Public License version 2. The current version can be obtained from https://bugs.debian.org/debbugs-source/.

Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.