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

Guido G√ľnther agx at sigxcpu.org
Thu Dec 9 11:27:09 CET 2021

On Wed, Dec 08, 2021 at 02:45:24PM -0800, Quanah Gibson-Mount wrote:
> --On Wednesday, December 8, 2021 12:15 PM -0800 Quanah Gibson-Mount
> <quanah at symas.com> wrote:
> > --On Wednesday, December 8, 2021 11:03 AM -0800 Quanah Gibson-Mount
> > <quanah at symas.com> wrote:
> > 
> > > That got me farther, but then I ran into a known bug that OTHERMIRROR is
> > > broken.
> > > 
> > > <https://www.mail-archive.com/ubuntu-bugs@lists.ubuntu.com/msg5978783.htm
> > > l>
> > 
> > 
> > So override config has an annoying behavior of resetting everything,
> > rather than overriding just what you specify.  I've been able to get this
> > to work now using the repo hook as noted in the bug description.  I'll
> > need a config per branch + distribution, which is annoying, but at least
> > I can get it down to a single system. :)
> So the config override seems to caused some sort of bug in gbp buildpackage
> (or lower?).  Builds now no longer include the source orig.tar.gz file.  I
> workaround this by passing the "-sa" argument to gbp buildpackage and can
> work around it by adding DEBBUILDOPTS=-sa to the profile.  However, the man
> page says nothing about the deb build opts being reset by pointing at a
> different profile.

gbp itself is pretty much out of the equation it mostly just passed on
to pbuilder.

What you can always do (and what I've done in the past to keep chroots
apart) is create a chroot with

 DIST=focal gbp-pbuilder <all kinds of options including othermirror>

and then keep that chroot for a special purpose 'purpose':

 mv /var/cache/pbuilder/base-focal.cow/ /var/cache/pbuilder/base-focal-purpose.cow/

and from there on use

 gbp buildpackage --git-dist=focal-purpose

to build in that chroot. This might be simpler than messing with
different pbuilder configurations. Updating the chroot etc still works
if you pass DIST=focal-purpose from there on. 

As a last resort you can even make all kinds of modifications in
/var/cache/pbuilder/base-focal-puprpose.cow/ like adding files to
/var/cache/pbuilder/base-focal-purpose.cow/etc/apt/sources.lists.d - i
wouldn't do that - just mentioning in so there's always a way to fix
things up.

As a related note: gbp is not tied to pbuilder you can also use sbuild
as --git-builder which is more maintained these days.

 -- Guido

More information about the git-buildpackage mailing list