Bug#852475: autopkgtest: apt-get install needs automatic conffile handling

2017-01-24 Thread Barry Warsaw
Hi Martin,

On Jan 24, 2017, at 09:19 PM, Martin Pitt wrote:

>Ah, sbuild usually copies that from the host system
>(/etc/schroot/default/nssdatabases), so indeed this tends to cause conffile
>conflicts.

Ah ha!  That was the piece I was missing.

Thanks for applying the patch.

-Barry


pgp08bth0I0vq.pgp
Description: OpenPGP digital signature


Bug#852475: autopkgtest: apt-get install needs automatic conffile handling

2017-01-24 Thread Martin Pitt
Hey Barry,

Barry Warsaw [2017-01-24 14:49 -0500]:
> Let's say one of your autopkgtest dependencies (perhaps recursively)
> needs to update a configuration file, i.e. via a conffile.  E.g. when
> running the autopkgtests for aptdaemon in an Ubuntu Zesty chroot, the
> netbase package wants to be installed, and this has conffiles for
> /etc/{protocols,rpc,services}.

Ah, sbuild usually copies that from the host system
(/etc/schroot/default/nssdatabases), so indeed this tends to cause conffile
conflicts.

> It would be better I think when setting up the testbed, to pass to the 
> `apt-get install` command an additional option: 
> - -o Dpkg::Options::="--force-confnew" so that the prompt is bypassed
> and the dependency can be installed.

Agreed. As a matter of fact, --apt-update is already doing that, but
lib/adt_testbed.py's install_apt() is missing it.

Thanks!

Martin



Bug#852475: autopkgtest: apt-get install needs automatic conffile handling

2017-01-24 Thread Martin Pitt
Control: tag -1 pending

Hey Barry,

Barry Warsaw [2017-01-24 15:01 -0500]:
> https://code.launchpad.net/~barry/autopkgtest/+git/autopkgtest/+ref/852475

Applied, thanks!

Martin


signature.asc
Description: PGP signature


Bug#852475: autopkgtest: apt-get install needs automatic conffile handling

2017-01-24 Thread Barry Warsaw
https://code.launchpad.net/~barry/autopkgtest/+git/autopkgtest/+ref/852475


pgp9syopDe3sn.pgp
Description: OpenPGP digital signature


Bug#852475: autopkgtest: apt-get install needs automatic conffile handling

2017-01-24 Thread Barry Warsaw
Package: autopkgtest
Version: 4.3
Severity: normal

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Dear Maintainer,

Let's say one of your autopkgtest dependencies (perhaps recursively)
needs to update a configuration file, i.e. via a conffile.  E.g. when
running the autopkgtests for aptdaemon in an Ubuntu Zesty chroot, the
netbase package wants to be installed, and this has conffiles for
/etc/{protocols,rpc,services}.

This can break the tests when dpkg needs to query about updating these
conffiles because the default is to --force-confdef, which prompts the
user and waits for a response.  This fails in the following way:

Setting up netbase (5.4) ...

Configuration file '/etc/protocols'
 ==> File on system created by you or by a script.
 ==> File also in package provided by package maintainer.
   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   : start a shell to examine the situation
 The default action is to keep your current version.
*** protocols (Y/I/N/O/D/Z) [default=N] ? dpkg: error processing package 
netbase (--configure):
 end of file on stdin at conffile prompt
 
Thus the test dependencies can't be installed and the entire
autopkgtest fails.

It would be better I think when setting up the testbed, to pass to the 
`apt-get install` command an additional option: 
- -o Dpkg::Options::="--force-confnew" so that the prompt is bypassed
and the dependency can be installed.

I can't think of a reason why you'd want to retain the old conffile,
since the testbed is (usually? always?) ephemeral.  If you can think
of a use case for that, then an autopkgtest option would probably be
required.  I'd opt for YAGNI and just include that dpkg option
unconditionally.  

Seems like it should be a relatively easy fix in adt_testbed.py; I'll
try to put together a branch and test it.

- -- System Information:
Debian Release: 9.0
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: amd64 (x86_64)

Kernel: Linux 4.9.0-1-amd64 (SMP w/8 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages autopkgtest depends on:
ii  apt-utils   1.4~beta4
ii  libdpkg-perl1.18.18
ii  procps  2:3.3.12-3
ii  python3 3.5.3-1
ii  python3-debian  0.1.29

Versions of packages autopkgtest recommends:
ii  autodep8  0.8

Versions of packages autopkgtest suggests:
pn  lxc  
pn  lxd-client   
pn  qemu-system  
pn  qemu-utils   
ii  schroot  1.6.10-3

- -- no debconf information

-BEGIN PGP SIGNATURE-

iQIzBAEBCAAdFiEEhBcVftvnPZ6sHlObEm61Y6dLBr8FAliHr7kACgkQEm61Y6dL
Br9yew/+NRKoZ1e5B3z2I0MRdo2qiNOF76zaP6WDAAoFeLyQaplFshvIMmKTzvKt
cERFGnijEKWfeCPOP3wyLbotqVXHYqqJmiqDDmx7jFUJEUFYO9UIPqymUz6LGU4S
//Ya1GSYucOCw/VQQfHt1hAlsnyAxWfv2e87xfgFIDhxQihoQu7VZqA8dvGIkvRt
nbXiAPf4a2s9/MRjLctEAfwwyw3HbGSzytaDyCgiZH+r562tqccClfe7VhMfGn3j
QQvzumjELwcXPQbijZAiNeMHN4JEWQzzXwbRwndlq51F+tsCzrjPrm5bcUnILiVL
jA7mrZGMAHanOPl6F4ZC5Idfby7h6gXRqZ5Nc2o/+rUU+TX6iBb/TEtT64ejiy9O
G5PxrQGuL2WxEk8ObcVi6E5PW/L9hmx/T/kLm3oVdOEFEmxhPS95uNlu7aKnOg9N
6X4BeDej7UNwRVjG45lgKw1xW0xfZ5rLBvdQtQqsXkECZDgquW298eBM1D4JuPbc
I5bZyj4w7pNkWIrBglkeX6rxy3YzH+k/21Fx/pYAtG4PRfk09p7k+YOePATRrclf
FBOnf9+KzgfDiCTqgXB1HN/nxbpcTBirg0d4CCrdpW4wcru5VEpnEe9GRxJbY/X3
pZPKAoKkE4jTYgXICqaheEHjAtsh3k0rFNuYmLL9dUHnVi9zGI8=
=rNub
-END PGP SIGNATURE-