This page gathers information about two related issues:

mass-bug-filings were done for both issues in August 2023.

Please help improve this page!

Discussion on debian-devel@l.d.o: https://lists.debian.org/debian-devel/2023/08/msg00031.html

Context: Debian Policy section 4.9

https://www.debian.org/doc/debian-policy/ch-source.html#main-building-script-debian-rules

  clean (required)
     This must undo any effects that the build and binary targets may
     have had, except that it should leave alone any output files
     created in the parent directory by a run of a binary target.

How to reproduce

using dpkg-buildpackage

source build:

dpkg-buildpackage -b && dpkg-buildpackage -S

binary build:

dpkg-buildpackage -b && dpkg-buildpackage -b

using sbuild

source build:

sbuild -A -d unstable -v --no-run-lintian \
--finished-build-commands="cd %SBUILD_PKGBUILD_DIR && runuser -u $(id -un) -- dpkg-buildpackage --sanitize-env -us -uc -rfakeroot -S" \
package

binary build:

sbuild -A -d unstable -v --no-run-lintian \
--finished-build-commands="cd %SBUILD_PKGBUILD_DIR && runuser -u $(id -un) -- dpkg-buildpackage --sanitize-env -us -uc -rfakeroot -b" \
package

using pbuilder

pbuilder build --twice

Common issues (and ways to solve them)

        # ignore changes on config.{sub,guess}
        extend-diff-ignore = "(^|/)(config.sub|config.guess)$"

using Salsa CI

Salsa CI include an opt-in test job to check how a package build twice in a row. Instructions to use it can be found at https://salsa.debian.org/salsa-ci-team/pipeline/#enable-building-packages-twice-in-a-row

Preventing future issues

sbuild users can easily integrate a clean-up validation step in their packaging workflow. Guidance on how to set this up is given on the sbuild wiki page.

All bugs