Hi,
On Sun, Jul 23, 2017 at 09:00:53PM +0200, Raphaël Halimi wrote:
> Package: git-buildpackage
> Version: 0.8.17
> 
> Hi,
> 
> Since version 0.8.17, git-pbuilder now unsets environment variables
> DIST, BUILDER and ARCH (commit 021fe9d).
> 
> IMHO this is very wrong, since it's now impossible to pass DIST or ARCH
> to pbuilder when it's supposed to rely on ~/.pbuilderrc to analyze those
> environment variables to set BASETGZ and the like (which is supposed to
> work since git-pbuilder provides a GIT_PBUILDER_AUTOCONF environment
> variable precisely for this purpose).
> 
> If you really don't want to revert commit 021fe9d, please at least run
> the unset_env function only when GIT_PBUILDER_AUTOCONF isn't set to "no".
> 
> That being said, maybe my workflow is completely broken.
> 
> Basically, here's what it does:
> 
> My ~/.gbp.conf has the "builder" option set to:
> 
> BUILDER=pbuilder GIT_PBUILDER_AUTOCONF=no /usr/bin/git-pbuilder
> 
> ...and my ~/.pbuilderrc basically takes DIST and ARCH from the
> environment, tries to guess DIST from the changelog if it's not defined,
> and sets them to the host's values in last resort.
> 
> I really don't think this type of configuration is uncommon, since it's
> heavily based on what you can find on Debian and Ubuntu wikis:

I think this is a valid use case.

> 
> https://wiki.debian.org/PbuilderTricks#How_to_build_for_different_distributions
> https://wiki.ubuntu.com/PbuilderHowto#Multiple_pbuilders
> 
> If you think there's something wrong in this workflow, or if there is a
> way to create a ~/.pbuilderrc which would work for both plain pbuilder
> (or pdebuild) and gbp with its new behavior, please let me know.

All of this was prompted by

    https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=865637

so not cleaning e.g. DIST and ARCH breaks builds and generic names like
this really shouldn't end up in the process's environment. We don't
clean things like

    GIT_PBUILDER_*

(see 
https://github.com/agx/git-buildpackage/blob/master/gbp/scripts/buildpackage.py#L488)
so all we'd need to do is teach pbuilder to read DIST, ARCH and BUILDER
with a GIT_PBUILDER_ prefix as well. What do you think? A patch would be
welcome.
Cheers,
 -- Guido

Reply via email to