#988419 pbuilder: please allow building given only a source package name

Package:
pbuilder
Source:
pbuilder
Submitter:
Helmut Grohne
Date:
2021-05-12 13:27:04 UTC
Severity:
wishlist
Tags:
#988419#5
Date:
2021-05-12 13:24:48 UTC
From:
To:
Hi Jessica and Mattia,

pbuilder build expects the filename of a .dsc file. In some cases
(mostly for qa), the .dsc file comes from the source distribution.
Having to download it beforehand and the copying it into the chroot is a
nuisance at best and a performance penalty at worst. Other build tools
such as sbuild allow an alternative convention where only the name of a
source package with an optional version is passed. The build tool then
automatically downloads the requested package using apt-get source from
the configured repositories. I propose pbuilder to allow doing the same.

You'll find a patch that implements the proposed behaviour. It lacks two
crucial aspects though. For one thing, the new behaviour is entirely
undocumented. For another, it requires that the base.tgz has deb-src
uris in the sources.list, which commonly is not the case. So you may
consider the patch a proof-of-concept.

So what do you think about the requested behaviour change and what do
you think about the proposed implementation?

I have more background on this feature request. I'm working on a machine
api for package build tools, an abstraction layer to provide a common
interface to both sbuild and pbuilder. In that process, I figured that
different use cases prefer different ways of supplying source packages.
The common ones seem to be:
 * A .dsc file on the disk
 * A http uri pointing to a .dsc file together with a checksum
 * A source package name with optional version
Initially, I did not consider the last way, but I noticed that when
dispatching builds across different data centers, it would be good to
not have to copy the .dsc around. A url would depend on the data center
to produce decent performance. However, a user of the api should not
have to care where her build is run. That is why I found this last
way crucial and it is what motivates this feature request.

Helmut