"changelog format debian is unknown" with read-only testbeds on < xenial

Bug #1646544 reported by Omer Akram
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
autopkgtest (Ubuntu)
Fix Released
Low
Unassigned

Bug Description

Please see the attached error message for ubuntu-system-tests http://paste.ubuntu.com/23563649/ the test setup fails with these errors:

dpkg-source: error: changelog format debian is unknown
blame: /home/om26er/code/canonical/ubuntu-system-tests
badpkg: rules extract failed with exit code 2
adt-run [20:11:46]: ERROR: erroneous package: rules extract failed with exit code 2

I downgraded autopkg test to yakkety version and my test setup ran successfully.

ProblemType: Bug
DistroRelease: Ubuntu 17.04
Package: autopkgtest 4.2.2
ProcVersionSignature: Ubuntu 4.8.0-28.30-generic 4.8.6
Uname: Linux 4.8.0-28-generic x86_64
ApportVersion: 2.20.3-0ubuntu8
Architecture: amd64
CurrentDesktop: Unity
Date: Thu Dec 1 21:47:06 2016
InstallationDate: Installed on 2016-11-13 (17 days ago)
InstallationMedia: Ubuntu 16.10 "Yakkety Yak" - Release amd64 (20161012.2)
PackageArchitecture: all
SourcePackage: autopkgtest
UpgradeStatus: Upgraded to zesty on 2016-11-22 (9 days ago)

Revision history for this message
Omer Akram (om26er) wrote :
Revision history for this message
Martin Pitt (pitti) wrote :

You run this on your local directory -- do you have a pointer to that project? In particular, how does debian/changelog looks like in that branch?

You run this with --unbuilt-tree and so it's trying to parse debian/control and debian/changelog. If you *only* have debian/tests/ in that tree, then use -B.

BTW, please move from "adt-run" to "autopkgtest". The old "adt-run" CLI has been deprecated for a while. The new CLI tries to avoid these kinds of traps.

Changed in autopkgtest (Ubuntu):
status: New → Incomplete
Revision history for this message
Omer Akram (om26er) wrote :

Here is the project: https://launchpad.net/ubuntu-system-tests

And we do have debian/control and debian/changelog

Revision history for this message
Martin Pitt (pitti) wrote :

I can reproduce this with

$ runner/autopkgtest -B /tmp/ubuntu-system-tests --setup-commands ro-apt -- qemu /srv/vm/autopkgtest-trusty-amd64.img

This works in xenial, so apparently a more recent autopkgtest started using some dpkg feature that got introduced after vivid.

This also works without the "ro-apt" bit, i. e. when using "regular" apt instead of the "unpack into /tmp dir" mode.

It's not specific to ubuntu-system-tests, the same also happens with an apt-get source'd gzip-1.6/ tree.

Changed in autopkgtest (Ubuntu):
assignee: nobody → Martin Pitt (pitti)
status: Incomplete → Triaged
Revision history for this message
Martin Pitt (pitti) wrote :

This apparently broke with http://anonscm.debian.org/cgit/autopkgtest/autopkgtest.git/commit/?id=85621d2f0 . With -d I see

+ export PATH=/tmp/autopkgtest.a5vAMh/deps/sbin:/tmp/autopkgtest.a5vAMh/deps/bin:/tmp/autopkgtest.a5vAMh/deps/usr/sbin:/tmp/autopkgtest.a5vAMh/deps/usr/bin:/tmp/autopkgtest.a5vAMh/deps/usr/games:/sbin:/usr/sbin:/bin:/usr/bin
+ mktemp -d /tmp/autopkgtest.a5vAMh/build.XXX
+ builddir=/tmp/autopkgtest.a5vAMh/build.ktb
+ cd /tmp/autopkgtest.a5vAMh/build.ktb
+ cp -rd --preserve=timestamps -- /tmp/autopkgtest.a5vAMh/ubtree- real-tree
+ [ -x real-tree/debian/rules ]
+ dpkg-source --before-build real-tree
dpkg-source: error: changelog format debian is unknown

while this looks different without the read-only apt:

+ dpkg-source --before-build real-tree
sh: 1: gcc: not found
dpkg-source: warning: couldn't determine gcc system type, falling back to default (native compilation)
+ chmod -R a+rX .
+ cd real-tree/.

So obviously dpkg-source fails when being called from /tmp/, which is easy to reproduce in the VM (with -s):

ubuntu@autopkgtest:/tmp/autopkgtest.QZEKZ1/build.wod$ PERL5LIB=../deps/usr/share/perl5 ../deps/usr/bin/dpkg-source --before-build real-tree
dpkg-source: error: changelog format debian is unknown

It should just use ../deps/usr/share/perl5/Dpkg/Changelog/Debian.pm here:

    # Find the right changelog parser.
    my $format = ucfirst lc $options{changelogformat};
    my $changes;
    eval qq{
        require Dpkg::Changelog::$format;
        \$changes = Dpkg::Changelog::$format->new();
    };
    error(g_('changelog format %s is unknown: %s'), $format, $@) if $@;

But in strace I cannot see any attempt to open "Changelog.*ebian" whereas I totally can when dpkg-dev is installed:

  open("/usr/share/perl5/Dpkg/Changelog/Debian.pm", O_RDONLY) = 3

At this point this becomes a bit tedious to track down.

I also suppose this is not really an issue any more as it works fine in xenial and vivid is dead now?

summary: - adt-run in zesty fails
+ "changelog format debian is unknown" with read-only testbeds on < xenial
Changed in autopkgtest (Ubuntu):
assignee: Martin Pitt (pitti) → nobody
importance: Undecided → Low
Revision history for this message
Martin Pitt (pitti) wrote :

This was fixed in xenial, and there's no point in trying to fix this in earlier releases any more.

Changed in autopkgtest (Ubuntu):
status: Triaged → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.