Hi, On Fri, 9 May 2025 18:29:00 +0200 Julian Andres Klode <j...@debian.org> wrote: > On Thu, May 01, 2025 at 03:28:35PM +0200, Chris Hofstaedtler wrote: > > in a clean environment without /etc/apt/sources.list(.d/*), > > command-not-found's build-time tests fail like this: > > I just want to note: > > I do not believe that a build environment lacking apt or the > apt configuration or a working apt cache is a valid build > environment. > > In particular, builds of native packages should be able to > run smoke tests against the build system state.
if you feel strongly about this, you should bring this up on debian-devel@l.d.o, I think. Because what you describe is not how we currently build packages in Debian. To implement what you describe, we at least need to add apt as a Depends to the build-essential package. A package that is not explicitly (via B-D) or implicitly (via Essential:yes and build-essential) a (direct or transitive) build dependency of a source package must not be a requirement for that source package to be buildable. Or in other words: if you say that you think that apt should be part of the build environment for source packages in Debian then it must be added either to the Essential:yes set, as a Depends of build-essential or listed as an explicit Build-Depends, Build-Depends-Indep or Build-Depends-Arch. Before you embark on this journey note though, that what you describe is currently the opposite of what is done in practice. Since apt is neither part of the explicit nor of the implicit build dependencies of source packages in general, it is also not listed in .buildinfo files and as a result, the mass rebuilds done by the rebuilderd machines of the reproducible builds projects regularly rebuild all source packages in the archive without apt and file bugs for packages which need apt without explicitly depending on it. Note also, that I am moving sbuild in a direction which will make it possible to build source packages in a chroot without apt hopefully during the Forky cycle. We have package builders like sbuild to make sure that our source packages are rebuilt in a minimal and well defined environment. Apt is neither part of the (transative) Essential:yes package set nor of the (transitive) build-essential set and hence it currently being part of the default chroots is what I consider a historic artifacts of how chroots used to be built. You know that it is not a problem to create chroots of an arbitrary package selection without having apt installed inside that chroot by using apt from the outside on that chroot. What stopped us in the past from making use of this feature in sbuild is the schroot backend. Last year, buildds switched away from schroot so my hope is that we can soon reap another benefit of that switch and get apt-less source package building also on the buildds. If you do not believe that "a build environment lacking apt or the apt configuration or a working apt cache is a valid build environment." then we need to have a bigger discussion. Because that believe is in contrast to where me and others are currently trying to move sbuild, rebuilderd and buildds. Thanks to the effort of the reproducible builds folks, the archive today is in a state where apt is *not* needed inside the chroot. If you believe this is a problem, then we should discuss this with a wider audience. Thanks! cheers, josch
signature.asc
Description: signature