#894504 backportpackage: sbuild creates .changes for release rather than release-backports

#894504#5
Date:
2018-03-31 13:00:06 UTC
From:
To:
Dear Maintainer,

Using backportpackage with the -b and --builder=sbuild options produces a .changes file for release rather than release-backports.

e.g.

backportpackage -b -w build --builder=sbuild --destination=stretch --suffix=~bpo9+1 dh-golang

cat build/buildresult/dh-golang_1.34~debian9.0.1~bpo9+1_amd64.changes | grep Distribution
Distribution: stretch

This appears to be different to the behaviour with --builder=pbuilder. I think pbuilder uses the release specified in debian/changelog to produce the .changes file, whereas sbuild overrides this with the option passed to it in --dist.

If I try instead to run:

backportpackage -b -w build --builder=sbuild --destination=stretch-backports --suffix=~bpo9+1 dh-golang

Then I get the message:

dpkg-source: info: extracting dh-golang in dh-golang-stretch-backports
dpkg-source: info: unpacking dh-golang_1.34.tar.xz
backportpackage: Error: Unknown release codename stretch-backports

One possible solution would be to append -backports to the release passed to sbuild via --dist. The user would then need to have a chroot with a name like $release-backports-$arch-sbuild, $release-backports-sbuild, $release-backports-$arch or $release-backports. Alternatively the chroot name could be specified to sbuild separately with the --chroot option.

Or, backportpackage could be changed to accept release-backports as a destination.

Thanks.

Christopher Hoskin

#894504#8
Date:
2021-12-05 14:54:36 UTC
From:
To:
This is exactly what is happening.

ubuntutools/builder.py in Sbuild().build() uses --dist; that's the wrong
flag, and should most likely be --chroot, but changing this is sure to
break somebody's setup, so I'm relucanct to do it.
Not to mention that I don't use sbuild.