[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Bug#771496: overwrites user changes to configuration file /etc/dpkg-cross/cross-compile on upgrade (violates 10.7.3)

Control: severity -1 serious

On Mon, Dec 08, 2014 at 06:39:07PM +0000, Neil Williams wrote:
> On Sun, 7 Dec 2014 15:22:08 +0100
> gregor herrmann <gregoa@debian.org> wrote:
> > Yes but it does it wrong.
> There are no user-supported values in that file, it only stores debconf
> information.

You are saying that dpkg-cross does not support the Debian policy?  In
that case, it shouldn't be part of the next stable release. Setting the
severity to serious to reflect this.

For reference, section 10.7.3 says:

| Configuration file handling must conform to the following behavior:
|    * local changes must be preserved during a package upgrade, and

Clearly, /etc/dpkg-cross/cross_compile is a configuration file and
clearly local changes are not currently preserved. This makes the
package unfit for release.

> Any change on dpkg-cross behaviour caused by that file is
> a separate bug.

I agree with this. /etc/dpkg-cross/cross_compile should not exist. But
as long as it does exist, it must follow the rules of the Debian policy.

> > The .config should read existing values from the file and feed them
> > into debconf.
> NO. Absolutely no. There are no supported values in that file other
> than what is already in debconf. debconf must not be polluted by
> arbitrary values.

I am sorry to tell you that you are wrong here.

See man 7 debconf-devel:

| The issue to watch out for here is that debconf is not intended to be,
| and must not be used as a registry.

You must not store values in debconf. Instead they must be read back
from the configuration file.

Let me give a better testcase:

root# apt-get install dpkg-cross
root# echo default_arch=or1k >> /etc/dpkg-cross/cross-compile
root# dpkg-reconfigure dpkg-cross
root# grep default_arch.*= /etc/dpkg-cross/cross-compile
#default_arch = 

So you can see:
 * Whatever a user writes to that file is not preserved during upgrades.
 * Whatever is stored in debconf is used instead. (I.e. debconf is used
   as a registry.)

Have a look at similar bugs and their severities:
These kind of issues have traditionally been RC good reason: Packages
must not trash files in /etc.

I believe that the best solution to this problem is to remove
/etc/dpkg-cross/cross-compile (and .sample) from the package.

> dpkg-cross is essentially unmaintained and I'd rather it was orphaned -
> it has been dead for some time and the only real purpose for having the
> package after Jessie will be the /etc/dpkg-cross/cross-config.* files,
> not cross-compile. Any package relying on /etc/dpkg-cross/cross-compile
> for anything except the default arch already set in debconf is buggy.

You are missing an important aspect here: dpkg-cross is currently the
only way to build a cross compiler from src:gcc-4.9. It seems a bit
premature to me to declare that functionality obsolete before moving gcc
to a different method. You may want to (re)discuss this with the gcc
maintainer: He does not seem to be aware of this deprecation and
declares dpkg-cross supported.


Reply to: