[git-buildpackage] Different mirrors with pbuilder and dist?

Quanah Gibson-Mount quanah at symas.com
Wed Dec 8 17:22:19 CET 2021

--On Wednesday, December 8, 2021 10:27 AM +0100 Guido G√ľnther 
<agx at sigxcpu.org> wrote:

> Hi Quanah,
> On Tue, Dec 07, 2021 at 03:43:31PM -0800, Quanah Gibson-Mount wrote:
>> I have two versions of a piece of software I build for each distribution
>> I build on.  Currently I do this by having two different VMs with
>> git-buildpackage and pbuilder, and then create an image for each dist
>> (buster, bullseye, bionic, and focal) on each of them, but with a
>> different OTHERMIRRORS setting.
>> I'd like to get this down to a single server, but I can't find a way to
>> get pbuilder to either:
>> a) Use different OTHERMIRRORS at build time with the existing dist image
>> b) Have multiple images of a given dist with different OTHERMIRROR values
>> Anyone have any hints? :)
> Given recent deboostrap (e.g. from Debian bookwork) you should be able
> to use all of them from Debian:
> For bullseye, buster (all Debian based):
> DIST=buster git-pbuilder create
> DIST=bullseye git-pbuilder create
> For bionic, focal, ... (ubuntu based):
> sudo apt install ubuntu-archive-keyring
> DIST=bionic git-pbuilder create
> --mirror=http://us.archive.ubuntu.com/ubuntu --components="main universe"
> DIST=focal git-pbuilder create
> --mirror=http://us.archive.ubuntu.com/ubuntu --components="main universe"
> then e.g.:
> gbp buildpackage --git-dist=bionic

Hi Guido,

That doesn't appear to do what I need.  What I need is:

pbuilder image buster1 -> has othermirror "REPOA"
pbuilder image buster2 -> has othermirror "REPOB"

Currently I can set up a single system that has pbuilder's for buster, 
bullseye, bionic, and focal that all point at REPOA.  Then I can have a 
second system that has pbuilder's for buster, bullseye, bionic, and focal 
that all point at REPOB.

Alternatively, what would be best, is if I could pass (from gbp) an 
"othermirror" option like:

gbp buildpackage --othermirror="repoa"

Even better, is if I could set the othermirror in gbp.conf, since I have a 
branch for REPOA builds and a branch for REPOB builds.  Then I could just 

gbp buildpackage

from the appropriate branch, and the correct mirror would be added to the 
image just for use during the build, which is all I really need it do do.

I'm able to do something like this with git buildpackage-rpm, where I can 
point mock at custom images in the [buildpackage-rpm] section in .gbp.conf 
via the "dist" parameter.  This allows me to have one "dist" that uses 
repoA and another "dist" that uses repoB, meaning I can use a single server 
with mock installed to do all the builds.



Quanah Gibson-Mount
Product Architect
Symas Corporation
Packaged, certified, and supported LDAP solutions powered by OpenLDAP:

More information about the git-buildpackage mailing list