I'm building an UNRELEASED package and then sbuild complains with this: E: Chroot for distribution UNRELEASED, architecture amd64 not found which, fair enough, there's no such tarball in my .cache/sbuild: $ find ~/.cache/sbuild/ /home/anarcat/.cache/sbuild/ /home/anarcat/.cache/sbuild/bookworm-amd64.tar.zst /home/anarcat/.cache/sbuild/unstable-amd64.tar.zst but then sbuild says this: I: Applied base distribution name mangle rule s/(?^:^(experimental|rc-buggy|UNRELEASED)$)/unstable/ turning "UNRELEASED" into "unstable" ... so i thought "cool, that's smart, it's going to use my unstable tarball! yaay!" ... but then it did this: I: Creating chroot on-demand by running: mmdebstrap --variant=buildd --arch=amd64 --skip=output/mknod --format=tar unstable - Hmm. So it did *not* use the unstable tarball. The build works, so it's not *that* bad, considering how fast mmdebstrap is, but it would sure be nice to skip that step entirely. And I know i can make symlinks to work around that, and that i can use `$unshare_mmdebstrap_keep_tarball=1;` to keep the generated tarball, but that all seems besides the point. This is a nice feature, it just needs one last push to be perfect, IMHO. :)
Hi, Quoting Antoine Beaupre (2024-12-04 16:00:51) I wasn't yet annoyed enough about this to add this "last push". In your mind, what should sbuild add to support this? I can only think of one logical implementation and that is to add yet another mangling/mapping option which expresses equivalence relationships or aliases of distribution names and if one is requested and the other already exists, just use that. The problem then is: which extra-args or distro-mangle options do you apply? Will those be mapped too? Which one will take precedence? The headaches that answering these questions gave me, made me hesitant to implement what one can manually accomplish using symlinks. But maybe you have a concrete idea on how the solution should look like? Thanks! cheers, josch
Why not just use the existing logic from? a.
Hi, Quoting Antoine Beaupré (2024-12-22 22:39:51) that one is for retrieving a base distribution for what is otherwise an overlay. For example, experimental is an overlay to unstable and bookworm-backports is an overlay for bookworm. You cannot create a chroot of bookworm-security -- you have to create a chroot for bookworm and then you can add the security archive on top. It would be wrong to use a bookworm chroot for somebody who wants to build for bookworm-backports. So the UNSHARE_MMDEBSTRAP_DISTRO_MANGLE option cannot be used for this. Thanks! cheers, josch
I don't understand: how does that differ from the need expressed here?
Hi,
Quoting Antoine Beaupré (2024-12-23 02:31:29)
I understand that it makes sense to symlink UNRELEASED->unstable as
"UNRELEASED" is supposed to be an alias to "unstable". Indeed the schroot-based
man page of sbuild-createchroot suggests to run:
sudo sbuild-createchroot unstable ... --alias=sid --alias=UNRELEASED ...
But this would be wrong for bookworm-backports or bookworm-security, for
example which are two mangling rules that are created by default:
https://sources.debian.org/src/sbuild/0.88.1/lib/Sbuild/Conf.pm/#L427
If this variable were to be re-used then somebody who intends to build for
bookworm-backports would have a chroot for just bookworm, without backports
extracted. That is wrong.
Instead I think what you need here is what aliases used to be for schroot and
that would be a new mapping option which would replace the symlink mechanism.
Does that make sense?
Thanks!
cheers, josch
On 2024-12-23 07:49:57, Johannes Schauer Marin Rodrigues wrote: [...] Is it really? I mean if you don't have a bookworm-backports tarball, you don't, and you fallback to plain bookworm, that seems fine to me: you're building your backport without any other possible backports deps, and it might fail, but if it's a leaf package without any extra deps needed from backports, it's actually fine. And if it fails, then you just make a new backports tarball. I think I understand where you're coming from, but I think you're overthinking this and the existing mechanisms are fine, provided that you can always fallback to "just make a new tarball". a.
Hi, Quoting Antoine Beaupré (2024-12-29 16:44:41) you have to weigh different things against each other. You say that it's not that bad. I'm saying that creating an extra tarball is *also* not that bad. And in my mind, creating an extra tarball is less bad than having the surprise that building for bookworm-backports is not done inside a chroot that has bookworm-backports by default. Yes, which is an extra step that is avoided by just creating an extra tarball by default. So yes, a few hundred megabytes and a few seconds of creation time extra because an existing tarball is not re-used is bad. But I find it even worse to have the default be: then just create a new tarball manually. Oh I'm absolutely overthinking this. Stuff that I put into sbuild today will literally be used by people 10 years in the future. Thinking about that makes me overthink this all the time. That being said, you said in your initial mail that so this is just a wishlist feature. I think it's a nice wishlist feature and I think it absolutely makes sense to have a variable mapping UNRELEASED to unstable by default, similar to how aliases worked before in schroot. Thanks! cheers, josch
Hi, Quoting Johannes Schauer Marin Rodrigues (2024-12-30 07:51:28) since sbuild supports multiple backends and since finding the chroot tarball re-uses the common functionality of finding tarballs that is also shared with the schroot and autopkgtest backend, it turns out that to implement this, we need to make a change that is not unshare-backend specific. Instead, to achieve this, we need to make a change that will influence all backends. If you'd like to help, could you test-drive this change:--- /usr/share/perl5/Sbuild/ChrootInfo.pm +++ /usr/share/perl5/Sbuild/ChrootInfo.pm @@ -86,6 +86,10 @@ sub find { $distribution =~ s/^[^:]+://msx; } + if ($distribution eq "UNRELEASED") { + $distribution = "unstable"; + } + my $chroots = $self->get('Chroots'); # Don't do strict arch checking if ARCH == HOST_ARCH. Thanks! cheers, josch
Hello, Bug #1089035 in sbuild reported by you has been fixed in the Git repository and is awaiting an upload. You can see the commit message below and you can check the diff of the fix at: https://salsa.debian.org/debian/sbuild/-/commit/bd765329ea55f6f72ae53457c751c0698413c5e7 ------------------------------------------------------------------------ Add CHROOT_ALIASES configuration option, allowing one to look up chroots under a different name Closes: #1089035 ------------------------------------------------------------------------ (this message was generated automatically) -- Greetings https://bugs.debian.org/1089035
We believe that the bug you reported is fixed in the latest version of
sbuild, which is due to be installed in the Debian FTP archive.
A summary of the changes between this version and the previous one is
attached.
Thank you for reporting the bug, which will now be closed. If you
have further comments please address them to 1089035@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.
Debian distribution maintenance software
pp.
Johannes Schauer Marin Rodrigues <josch@debian.org> (supplier of updated sbuild package)
(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@ftp-master.debian.org)
Format: 1.8
Date: Thu, 16 Jan 2025 07:46:28 +0100
Source: sbuild
Architecture: source
Version: 0.88.2
Distribution: unstable
Urgency: medium
Maintainer: sbuild maintainers <sbuild@packages.debian.org>
Changed-By: Johannes Schauer Marin Rodrigues <josch@debian.org>
Closes: 1089035 1089105 1090336 1090358 1091169 1091170 1091370 1092091 1092557
Changes:
sbuild (0.88.2) unstable; urgency=medium
.
[ Johannes Schauer Marin Rodrigues ]
* lib/Sbuild/Conf.pm:
- fix examples for ENVIRONMENT_FILTER (Closes: #1090336)
- do not ignore an empty DEB_BUILD_PROFILES environment variable
- Add CHROOT_ALIASES configuration option, allowing one to look up chroots
under a different name (Closes: #1089035)
* lib/Sbuild/ConfBase.pm:
- run check after setting all values
- preserve order of configuration options
- Set variables to their default values in ~/.config/sbuild/config.pl
(Closes: #1090358)
* lib/Sbuild/ChrootUnshare.pm:
- check if mmdebstrap is installed only when needed
- instead of passing the tarball path to the decompressor, let sbuild open
it and feed it to the decompressor program via standard input (Closes:
#1091169)
* debian/tests/unshare:
- install ca-certificates for https debci hosts. Thanks to Paul Gevers
- run dpkg-deb with --root-owner-group (Closes: #1092091)
* lib/Sbuild/Build.pm: fail if dpkg --print-foreign-architectures failed
* lib/Sbuild/ResolverBase.pm: build metapackage with dpkg-deb
--root-owner-group (Closes: #1092557)
* Use dpkg-buildtree to figure out if fakeroot is required
* die if exec fails because it cannot find the program
.
[ Simon McVittie ]
* man: Cross-reference the --build-dir option in BUILD ARTIFACTS
* man: Document how and where log files are saved
.
[ Guillem Jover ]
* lib/Sbuild/Conf.pm: Do not use deprecated Dpkg::Build::Info module
.
[ Chris Hofstaedtler ]
* Remove deborphan from Suggests:, package was removed
* sbuild-update: abort if chroot-mode=unshare (Closes: #1089105, #1091370)
.
[ Santiago Ruano Rincón ]
* Add Recommends on iproute2
* Fix mmdebstrap+unshare setup-hook when handling *-security suites
.
[ Jakub Wilk ]
* man: Remove stray quotation mark
.
[ Richard Lewis ]
* man/sbuild.1.in: remove stray quotation mark
* Document the need to retain package lists in the chroot if $apt_update is 0
(Closes: #1091170)
.
[ Jochen Sprickerhof ]
* unshare: Use $BUILD_USER as the default user
* unshare: Use 'sbuild' as the default user
* Use BUILD_USER for architecture and disk space check
Checksums-Sha1:
0f0099edcbf367fae51ea461298ed81e97f28812 2643 sbuild_0.88.2.dsc
7c8afb029abcb8524160a037aee55cf1ff601080 255988 sbuild_0.88.2.tar.xz
Checksums-Sha256:
43147313e02531d784b5fed0b81ad45481bc89e0b17f13c89cdc268d91a3af47 2643 sbuild_0.88.2.dsc
569736857d4e906faf50ce25baa3e10d45d4be983237b70ce4e1e00871557116 255988 sbuild_0.88.2.tar.xz
Files:
47556984b7a862d35ab78354c7c3a68c 2643 devel optional sbuild_0.88.2.dsc
1b63edbc9459af6f09986dfc82e34a74 255988 devel optional sbuild_0.88.2.tar.xz
-----BEGIN PGP SIGNATURE-----
iQIzBAEBCgAdFiEElFhU6KL81LF4wVq58sulx4+9g+EFAmeIq2YACgkQ8sulx4+9
g+ESFQ//Y/wgtNcLRqfw/sIWtUd1OC1a/o2U26BHY9KZjW5Rqp01B4FepDwoH3c/
r+brucA3j2/0nvx6BpcF2EupcMlgPpY4J4EYmisyZrHgYBPlHyc8LyKVm2gDEnPV
LapflaCbdTWprYQoijxdjQ9lGJiz1XQCS+xhwI8EcIK+KXxx18pbB3i3DSLhEkX/
Ud5qHb0Y/tnj+xtdKVZED+Z6AmlGiT0+GEjWw1N7bC+uLy2J8IbdUB37ANopvVtE
l3u54HIh8M/+hDW7B4X/QeB+houFPXzRNZx+QlccWJvf19MiPPKpbOa213ieG5IH
raijuMEwNzH2PevH8nBKA1REcIAyYXlcdk4OaLm3rsiXLk2rPtXaVbFazxMiqP8m
3UyOMPmBfZSjOMjkbVtYHiw6YuA7uYCejyW5h//jW1v4NNBVQZKbHAddLjp4m6+A
oBSbuGLVamTvqcUJG+n94V+U1pRHCtvvvtYHi4h991k4Cph/klzYF3zHmZsxcET6
WBaOv4erPMP1BJkD7B2O5oxGr8tJ/jprEKtbJa1LsNakjDu7pBYumL+mmj4OKlhO
oIjw3ujGfVkXE+9Glmtj5WRTZTzRJ+cYz6zTQfwJRZ3WJxLtmJCUazK+uXi/VL01
M3bNHlwwCAyLDZ9yGm45YwneY7EiMfZytL6S8czYs+FTwXRC8og=
=H3Yw
-----END PGP SIGNATURE-----