Hi,

Quoting Francesco Poli (wintermute) (2024-05-12 21:06:24)
> I am still trying to set up sbuild-qemu to build (and check/test) Debian
> packages.
> 
> After creating the virtual machine image:
> 
>   $ mkdir -p ~/.cache/sbuild/build
>   $ cd /dev/shm
>   $ TMPDIR=/dev/shm mmdebstrap-autopkgtest-build-qemu \
>                     --size=25G --boot=efi sid unstable-autopkgtest-amd64.img
>   $ mv -i unstable-autopkgtest-amd64.img ~/.cache/sbuild/
> 
> I prepared the following configuration file:
> 
>   $ cat ~/.sbuildrc 
>   $source_only_changes = 1;
>   $run_lintian = 1;
>   $lintian_require_success = 0;
>   $run_piuparts = 1;
>   $piuparts_root_args = '';
>   $piuparts_require_success = 1;
>   $run_autopkgtest = 1;
>   $autopkgtest_root_args = '';
>   $autopkgtest_require_success = 1;
>   $build_dir = "$HOME/.cache/sbuild/build";
>   
>   # don't remove this, Perl needs it:
>   1;
> 
> I can update the virtual machine:
> 
>   $ sbuild-qemu-update --boot=efi unstable-autopkgtest-amd64.img
> 
> and I can build a package from within the unpacked source tree:
> 
>   $ sbuild-qemu --boot=efi --overlay-dir=/dev/shm

cool!

> However, when I do so, I am not necessarily planning to upload the
> Debian package to the Debian archive: it could be still in development
> (not yet ready for an upload) and I just want to check that it can be
> built and perform the usual checks on it, namely lintian (first of all!),
> followed by piuparts and autopkgtest.
> If this is the case, my latest changelog entry will read 'UNRELEASED' in the
> distribution field, but, at the same time, I want to build the package
> with the 'unstable-autopkgtest-amd64.img' VM image (to build it for
> unstable).

Yes, doing that should be possible.

> What happens here? It turns out that sbuild-qemu modifies the Distribution
> field in the .changes file and sets it to 'unstable', despiting reading
> 'UNRELEASED' in the latest changelog entry.
> Hence lintian complains with an error:
> 
>   [...]
>   Running lintian...
>   E: $PKG_NAME changes: unreleased-changes
>   W: $PKG_NAME: changelog-distribution-does-not-match-changes-file unreleased 
> != unstable [usr/share/doc/$PKG_NAME/changelog.gz:1]
>   
>   E: Lintian run failed (runtime error)
>   [...]
> 
> How can I fix this issue?
> Shouldn't it work out of the box?

But it does. Your d/changelog has UNRELEASED as the distribution and Lintian
classifies that as an error.

> I found bug report [#934721], which, however, seems to advocate that
> this is the right behavior ?!? Or am I misinterpreting it?
> 
> [#934721]: <https://bugs.debian.org/934721>
> 
> How can I run lintian on a still-in-developed UNRELEASED package (with
> sbuild-qemu)?

You just did. And it reports a failure because in its current state, your
package is not ready to be uploaded.

> Please note that my current setup with pbuilder does not have this issue:
> pdebuild generates a .changes file with 'Distribution: UNRELEASED'
> and with the latest changelog entry correctly quoted (with 'UNRELEASED'
> after the version number parenthesis), and hence lintian is happy...

Wait... how is Lintian happy with UNRELEASED as the changelog entry?

> It has to work out of the box with sbuild-qemu, as well!
> 
> Please fix the issue and/or explain what's wrong.
> 
> Thanks for your time and patience.

The only difference between sbuild and pbuilder should be this:

>   W: $PKG_NAME: changelog-distribution-does-not-match-changes-file unreleased 
> != unstable [usr/share/doc/$PKG_NAME/changelog.gz:1]

The reason for that difference is, that sbuild-qemu calls sbuild with the -d
option and that overwrites the distribution field. Christian, why does
sbuild-qemu use the -d option?

But this lintian error should also be present with pbuilder:

>   E: $PKG_NAME changes: unreleased-changes

Can you clarify?

Thanks!

cheers, josch

Attachment: signature.asc
Description: signature

Reply via email to