* Soren Stoutner <[email protected]> [2024-11-27 00:27]:
mmdebstrap --include=ca-certificates --variant=buildd unstable ~/.cache/sbuild/
unstable-amd64.tar.xz http://deb.debian.org/debian --aptopt='Acquire::http {
Proxy "http://127.0.0.1:3142";; }’

I can reproduce the issue with this command, thanks. The problem is that this tarball contains device nodes that are not supported by piuparts in unshare mode. You can work around this by adding --skip=output/dev to the mmdebstrap call, which I think should become the default eventually.

Arguably this is a missing feature in piuparts and could be work around with mmtarfilter but not sure if it is worth the work.

# Specify the distribution, -d
$distribution = 'unstable';

As a side note to #1088304, I would recommend to not set this but pass -d unstable to sbuild in the case you need it and let sbuild figure it out in other cases.

## Run lintian after every build (in the same chroot as the build).
$run_lintian = 1;

Note that this is already the default.

$autopkgtest_root_args = [''];

This is no longer needed.

$autopkgtest_opts = ['--apt-upgrade', '--', 'unshare', '--release', '%r', '--
arch', '%a' ];

This is already the default.

$piuparts_root_args = ['PATH=/usr/sbin:/usr/bin', 'unshare', '--pid', '--
fork', '--mount-proc', '--map-root-user', '--map-auto'];

This is no longer needed.

$piuparts_opts = ["--distribution=%SBUILD_DISTRIBUTION",
'--bootstrapcmd=mmdebstrap --skip=check/empty --variant=minbase
--aptopt="Acquire::http { Proxy \"http://127.0.0.1:3142\";; }"'];

If I use this option (which I have just added to my .sbuildrc and tested,
thank you) it creates a new chroot, which takes a small amount of time, but
correctly uses apt-cacher-ng, which saves both bandwidth and time.  Given your
explanation above about the desirability of using a minimal chroot instead of
the full build chroot, I would consider this to be the optimal behavior.

Great to hear :).

My takeaway from this is that it would probably be best to update the wiki
with two example piuparts_opts, one which uses --aptopt for those using apt-
cacher-ng and one which doesn’t.  I would be fine doing so if you like based on
the information presented here (would you recommend the examples include --no-
eatmydata on unshare or not?)

Please add it to the wiki but note that the one without apt-cacher-ng is already the default so no need to add it. In general I would like to rework the wiki page so it only recommends advanced features as the new sbuild version should have a reasonable default setup.

The --no-eatmydata is a nice addition as an advanced option as well.

We can then either close this bug report, or you can keep it open if you think
Piuparts should be able to build using the pre-generated tarball, even if it
is not recommended, and want to figure out why that isn’t working.

As stated above this is a piuparts issue so please either reassign or close whatever you think makes more sense.

Cheers Jochen

Attachment: signature.asc
Description: PGP signature

Reply via email to