Debian Bug report logs - #719060
php5-cli: /etc/php5/cli/php.ini not upgraded with package

version graph

Package: php5-cli; Maintainer for php5-cli is (unknown);

Reported by: Bob Proulx <bob@proulx.com>

Date: Thu, 8 Aug 2013 05:57:02 UTC

Severity: normal

Found in version php5/5.5.1+dfsg-2

Done: Bob Proulx <bob@proulx.com>

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, Debian PHP Maintainers <pkg-php-maint@lists.alioth.debian.org>:
Bug#719060; Package php5-cli. (Thu, 08 Aug 2013 05:57:06 GMT) (full text, mbox, link).


Acknowledgement sent to Bob Proulx <bob@proulx.com>:
New Bug report received and forwarded. Copy sent to Debian PHP Maintainers <pkg-php-maint@lists.alioth.debian.org>. (Thu, 08 Aug 2013 05:57:06 GMT) (full text, mbox, link).


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

From: Bob Proulx <bob@proulx.com>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: php5-cli: /etc/php5/cli/php.ini not upgraded with package
Date: Wed, 07 Aug 2013 23:54:51 -0600
Package: php5-cli
Version: 5.5.1+dfsg-2
Severity: normal

Something appears to be wrong concerning the /etc/php5/cli/php.ini
file upgrade handling.  It is failing to prompt the user to install
the new file or keep the previous one.

  # apt-get purge php5-cli
  # apt-get install php5-cli=5.5.1+dfsg-1 php5-common=5.5.1+dfsg-1
  ...make some change to ensure that it is locally edited...
  # sed --in-place s/localhost/mailhost/ /etc/php5/cli/php.ini
  # apt-get upgrade
  ...no offer to upgrade the config file was presented...

If I go back to 5.4.4-14+deb7u2 with the same test as above then it
works okay.

  # apt-get purge php5-cli
  ...install the version from Wheezy to prep for an upgrade...
  # apt-get install php5-cli=5.4.4-14+deb7u2 php5-common=5.4.4-14+deb7u2
  ...make some change to ensure that it is locally edited...
  # sed --in-place s/localhost/mailhost/ /etc/php5/cli/php.ini
  # apt-get upgrade
  ...ucf dialog menu asking disposition of conffile...

Also trying to reinstall the same package does not prompt either.

  # apt-get purge php5-cli
  ...install the version from Wheezy to prep for an upgrade...
  # apt-get install php5-cli
  ...make some change to ensure that it is locally edited...
  # sed --in-place s/localhost/mailhost/ /etc/php5/cli/php.ini
  # apt-get install --reinstall php5-cli php5-common
  ...no offer to upgrade the config file was presented...

Bob



Information forwarded to debian-bugs-dist@lists.debian.org, Debian PHP Maintainers <pkg-php-maint@lists.alioth.debian.org>:
Bug#719060; Package php5-cli. (Thu, 08 Aug 2013 06:09:04 GMT) (full text, mbox, link).


Acknowledgement sent to Ondřej Surý <ondrej@sury.org>:
Extra info received and forwarded to list. Copy sent to Debian PHP Maintainers <pkg-php-maint@lists.alioth.debian.org>. (Thu, 08 Aug 2013 06:09:04 GMT) (full text, mbox, link).


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

From: Ondřej Surý <ondrej@sury.org>
To: Bob Proulx <bob@proulx.com>, "719060@bugs.debian.org" <719060@bugs.debian.org>
Subject: Re: [php-maint] Bug#719060: php5-cli: /etc/php5/cli/php.ini not upgraded with package
Date: Thu, 8 Aug 2013 08:05:51 +0200
ucf is correctly handling the conf file changes?

Ondřej Surý

> On 8. 8. 2013, at 7:54, Bob Proulx <bob@proulx.com> wrote:
> 
> Package: php5-cli
> Version: 5.5.1+dfsg-2
> Severity: normal
> 
> Something appears to be wrong concerning the /etc/php5/cli/php.ini
> file upgrade handling.  It is failing to prompt the user to install
> the new file or keep the previous one.
> 
>  # apt-get purge php5-cli
>  # apt-get install php5-cli=5.5.1+dfsg-1 php5-common=5.5.1+dfsg-1
>  ...make some change to ensure that it is locally edited...
>  # sed --in-place s/localhost/mailhost/ /etc/php5/cli/php.ini
>  # apt-get upgrade
>  ...no offer to upgrade the config file was presented...
> 
> If I go back to 5.4.4-14+deb7u2 with the same test as above then it
> works okay.
> 
>  # apt-get purge php5-cli
>  ...install the version from Wheezy to prep for an upgrade...
>  # apt-get install php5-cli=5.4.4-14+deb7u2 php5-common=5.4.4-14+deb7u2
>  ...make some change to ensure that it is locally edited...
>  # sed --in-place s/localhost/mailhost/ /etc/php5/cli/php.ini
>  # apt-get upgrade
>  ...ucf dialog menu asking disposition of conffile...
> 
> Also trying to reinstall the same package does not prompt either.
> 
>  # apt-get purge php5-cli
>  ...install the version from Wheezy to prep for an upgrade...
>  # apt-get install php5-cli
>  ...make some change to ensure that it is locally edited...
>  # sed --in-place s/localhost/mailhost/ /etc/php5/cli/php.ini
>  # apt-get install --reinstall php5-cli php5-common
>  ...no offer to upgrade the config file was presented...
> 
> Bob
> 
> _______________________________________________
> pkg-php-maint mailing list
> pkg-php-maint@lists.alioth.debian.org
> http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-php-maint



Information forwarded to debian-bugs-dist@lists.debian.org, Debian PHP Maintainers <pkg-php-maint@lists.alioth.debian.org>:
Bug#719060; Package php5-cli. (Thu, 08 Aug 2013 06:27:04 GMT) (full text, mbox, link).


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

From: Bob Proulx <bob@proulx.com>
To: Ondřej Surý <ondrej@sury.org>, 719060@bugs.debian.org
Subject: Re: Bug#719060: [php-maint] Bug#719060: php5-cli: /etc/php5/cli/php.ini not upgraded with package
Date: Thu, 8 Aug 2013 00:23:41 -0600
Ondřej Surý wrote:
> ucf is correctly handling the conf file changes?

In the upgrade from 5.4.4-14+deb7u2 to 5.5.1+dfsg-2 it does handle the
conf file change appropriately.  But not for the upgrade from
5.5.1+dfsg-1 to 5.5.1+dfsg-2.

  5.4.4-14+deb7u2 -> 5.5.1+dfsg-2  asks okay
  5.5.1+dfsg-1    -> 5.5.1+dfsg-2  keeps without asking

This confuses me.

Bob



Information forwarded to debian-bugs-dist@lists.debian.org, Debian PHP Maintainers <pkg-php-maint@lists.alioth.debian.org>:
Bug#719060; Package php5-cli. (Thu, 08 Aug 2013 06:42:04 GMT) (full text, mbox, link).


Acknowledgement sent to Ondřej Surý <ondrej@sury.org>:
Extra info received and forwarded to list. Copy sent to Debian PHP Maintainers <pkg-php-maint@lists.alioth.debian.org>. (Thu, 08 Aug 2013 06:42:04 GMT) (full text, mbox, link).


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

From: Ondřej Surý <ondrej@sury.org>
To: Bob Proulx <bob@proulx.com>
Cc: "719060@bugs.debian.org" <719060@bugs.debian.org>
Subject: Re: Bug#719060: [php-maint] Bug#719060: php5-cli: /etc/php5/cli/php.ini not upgraded with package
Date: Thu, 8 Aug 2013 08:38:56 +0200
Because there are no changes in the conffile in 5.5.x series?

That's my understanding why we use ucf, to keep to bugging of user to minimum.

Ondřej Surý

> On 8. 8. 2013, at 8:23, Bob Proulx <bob@proulx.com> wrote:
> 
> Ondřej Surý wrote:
>> ucf is correctly handling the conf file changes?
> 
> In the upgrade from 5.4.4-14+deb7u2 to 5.5.1+dfsg-2 it does handle the
> conf file change appropriately.  But not for the upgrade from
> 5.5.1+dfsg-1 to 5.5.1+dfsg-2.
> 
>  5.4.4-14+deb7u2 -> 5.5.1+dfsg-2  asks okay
>  5.5.1+dfsg-1    -> 5.5.1+dfsg-2  keeps without asking
> 
> This confuses me.
> 
> Bob



Reply sent to Bob Proulx <bob@proulx.com>:
You have taken responsibility. (Thu, 08 Aug 2013 07:36:22 GMT) (full text, mbox, link).


Notification sent to Bob Proulx <bob@proulx.com>:
Bug acknowledged by developer. (Thu, 08 Aug 2013 07:36:22 GMT) (full text, mbox, link).


Message #23 received at 719060-done@bugs.debian.org (full text, mbox, reply):

From: Bob Proulx <bob@proulx.com>
To: Ondřej Surý <ondrej@sury.org>, 719060-done@bugs.debian.org
Subject: Re: Bug#719060: [php-maint] Bug#719060: php5-cli: /etc/php5/cli/php.ini not upgraded with package
Date: Thu, 8 Aug 2013 01:23:26 -0600
[Message part 1 (text/plain, inline)]
Ondřej Surý wrote:
> Because there are no changes in the conffile in 5.5.x series?

Hmm...  That does explain the behavior!  I tried some more
combinations.  If changing between package versions that have the same
conf file contents then there is never any prompting.  But if
switching between package versions that have different conf file
contents then it always prompts appropriately.

Since this is obviously intentional I am going to close the bug
ticket.  I don't know if I like the behavior.  I need to think about
it some more.  But at least I understand it now.  Since it is
intentional behavior I will just go with it. :-)

For example.  If the local admin messes up the ini file and wants to
get a fresh copy of it the first thing that comes to mind is:

  apt-get install --reinstall php5-cli

Except that won't offer to replace the file.  And neither will using
the -o DPkg::Options::=--force-conf* options won't work either because
dpkg isn't handling the conffile.  So there doesn't seem to be any
easy way for a local admin to recover a fresh copy of the
configuration file.  Removing the file and trying to reinstall does
not replace the file.

  rm -f /etc/php5/cli/php.cli
  apt-get install --reinstall php5-cli

Seemingly the only way is to purge the package and then install.

  cp /etc/php5/cli/php.cli /root/
  apt-get purge php5-cli
  apt-get install php5-cli
  editor /root/php.cli /etc/php5/cli/php.cli # merge customizations

I realize that if one knows then they can copy the ucf source from
/usr/share/php5/php.ini-production and restore from there.  By the
time one has arrived at that level of detail then they are beyond the
ucf interface and working the problem at the lower level of detail.

> That's my understanding why we use ucf, to keep to bugging of user to minimum.

I need to go dig into the debian-devel archives when ucf was initially
discussed and read them again.  I don't really know what the purpose
is for ucf.  For my tastes dpkg does the job fine.  (This is not a
comment upon the php5 packages's use of ucf.  Read it at face value.
I don't know and so can't really comment and do not have an opinion.)
I had thought that ucf was for dpkg-style handling of files that were
not under the knowledge or control of dpkg.  Since the above ucf
behavior was so different from dpkg's behavior it confused me.

Thank you for the discussion!

Bob
[signature.asc (application/pgp-signature, inline)]

Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Fri, 06 Sep 2013 07:33:04 GMT) (full text, mbox, link).


Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Sun Jul 2 02:19:19 2023; 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.