build fails in multi-arch environment (missing changes file)

Bug #1762890 reported by Rolf Leggewie
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
pbuilder (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

I've recently switched my i386 system to amd64. My pbuilder and cowbuilder chroots are still i386. This setup fails to build when it could and should succeed.

dpkg-deb: building package `gjots2' in `../gjots2_3.0.1-0rl3_all.deb'.
 dpkg-genchanges >../gjots2_3.0.1-0rl3_i386.changes
dpkg-genchanges: including full source code in upload
 dpkg-source --after-build gjots2-3.0.1
dpkg-buildpackage: full upload (original source is included)
I: copying local configuration
E: Missing changes file: /home/rolf/pbuilder/buildplace/19548/build/gjots2_3.0.1-0rl3_amd64.changes
I: unmounting dev/ptmx filesystem
I: unmounting dev/pts filesystem
I: unmounting dev/shm filesystem

Notice how gjots2_3.0.1-0rl3_i386.changes but the amd64 version is the one being looked for. This fails and thus the build fails.

Tags: bionic
Revision history for this message
Rolf Leggewie (r0lf) wrote :

I've just added the "--architecture i386" switch to the pbuilder-dist call and that resulted in a successful build. I assume the same would be true for cowbuilder. Thus, you might not consider this a bug or in need of improvement. It's certainly easy enough to deal with. I will leave the ticket open for you to decide.

Revision history for this message
Rolf Leggewie (r0lf) wrote :

possibly related to https://bugs.debian.org/635763

Revision history for this message
Mattia Rizzolo (mapreri) wrote :

It's just that by default it is expecting the chroot to be of the same architecture of the host system, unless instructed otherwise.

Fixed that particular case here of the .changes file, but I wouldn't be surprised if anything else was doing same bad assumption.

https://salsa.debian.org/pbuilder-team/pbuilder/commit/00c5ac2c9c12c2696d9c7834e1527feab9cdfbdf

Changed in pbuilder (Ubuntu):
status: New → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package pbuilder - 0.230

---------------
pbuilder (0.230) unstable; urgency=medium

  [ Mattia Rizzolo ]
  * d/control:
    + Bump Standards-Version to 4.2.1, no changes needed.
    + Use the new debhelper-compat(=11) notation and drop d/compat.
  * d/rules: Change Ubuntu default DISTRIBUTION to "devel".
  * t: Add regression tests for 54e072c5ebb7d353e674873c96e5d837e52f345c.
  * checkparams:
    + Add a --no-source-only-chnages option to override a configured
      SOURCE_ONLY_CHANGES=yes. Closes: #904716
    + Add more information in the slice name and scope description
      to ease the life of those running many pbuilder instances.
  * buildpackage:
    + Don't explicitly pass -rfakeroot to dpkg-buildpackage.
      dpkg-buildpackage uses it by default if present since v1.14.7, so no
      need to tell it to. LP: #1206215
    + Unless specified, look for .changes file of the architecture of the
      chroot, not of the host's system. LP: #1762890
  * modules:
    + Shut down some extra translators in umountproc. Closes: #912636
      Thanks to Samuel Thibault for the patch.

  [ Thorsten Glaser ]
  * buildpackage:
    + Create consistent /etc/hosts in build chroots with USENETWORK=no.
      Policy 4.2.0 §4.9 explicitly allows loopback access, which is already
      allowed, and we also already clean resolv.con.
      Add a clean hosts file which ships 127.0.0.1 as localhost and ::1 as
      localhost6 to avoid trouble. See also the policy bug #904248.
      Closes: #905307

  [ Daniel Schepler ]
  * Wrap the chroot calls inside a systemd slice when running on Linux systems
    with systemd. Closes: #905550
    This allows proper cleanup of stray processes left behind, among easier
    resource control by the system administrator.

  [ James Clarke ]
  * modules: Mount fdescfs under /dev/fd on kFreeBSD.
  * pbuilderrc.5: Update link to the user manual.
  * t/test_pbuilder-apt-config:
    + Fix Ubuntu-related tests on non-Ubuntu architectures.

 -- Mattia Rizzolo <email address hidden> Fri, 09 Nov 2018 13:51:04 +0100

Changed in pbuilder (Ubuntu):
status: Fix Committed → Fix Released
Revision history for this message
Rolf Leggewie (r0lf) wrote :

Thx

Revision history for this message
Markus Ueberall (ueberall) wrote :

For the record, I still see this with

[2020-07-30T13:22:27+0200] ubuntu@pbuilder:/tmp% apt-cache policy pbuilder
pbuilder:
  Installed: 0.230.4
  Candidate: 0.230.4
  Version table:
 *** 0.230.4 500
        500 http://archive.ubuntu.com/ubuntu focal/universe amd64 Packages
        500 http://archive.ubuntu.com/ubuntu focal/universe i386 Packages
        100 /var/lib/dpkg/status
[2020-07-30T13:23:15+0200] ubuntu@pbuilder:/tmp% grep -B6 "Missing changes file" pbuilder12.log
dpkg-deb: building package 'libzfs2linux' in '../libzfs2linux_0.8.4-1ubuntu10+ubuntu18.04+projektzentrisch.de+1_i386.deb'.
 dpkg-genbuildinfo
 dpkg-genchanges -sa >../zfs-linux_0.8.4-1ubuntu10+ubuntu18.04+projektzentrisch.de+1_i386.changes
dpkg-genchanges: info: including full source code in upload
 dpkg-source --after-build zfs-linux-0.8.4
dpkg-buildpackage: info: full upload (original source is included)
E: Missing changes file: /var/cache/pbuilder/build/19772/build/zfs-linux_0.8.4-1ubuntu10+ubuntu18.04+projektzentrisch.de+1_amd64.changes
[2020-07-30T13:23:19+0200] ubuntu@pbuilder:/tmp%

The use of "--architecture i386" fixes this, but it's still required.

Revision history for this message
Jessica Clarke (jrtc27) wrote :

That's not a particularly helpful comment. What's your pbuilder command line? What's your pbuilderrc?

Revision history for this message
Mattia Rizzolo (mapreri) wrote :

for example, are you sure you are not setting ARCHITECTURE in your pbuilderrc? That would cause what you are seeing.

Revision history for this message
Markus Ueberall (ueberall) wrote :

Good catch, thanks a lot!

The command line was
`` sudo -E pbuilder build --loglevel W --compressprog zstdmt --use-network no --basetgz /opt/build/_buildimages/ubuntu-bionic-i386.tzstd --debbuildopts -sa /tmp/pbuilder.tmp/zfs-linux_0.8.4-1ubuntu10+ubuntu18.04+projektzentrisch.de+1.dsc ''

But ARCHITECTURE was indeed set to the wrong default (amd64) in ~/.pbuilderrc which is not supported by the build image in question:
`` [ -z "$ARCHITECTURE" ] && ARCHITECTURE="$(dpkg --print-architecture)" ''

(ARCHITECTURE should have either been set to the correct value (here, i386) -- as provided by a wrapper script which constructed the command line and initialised required environment variables in the first place -- or not at all.)

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.