Le dimanche 05 novembre 2023 à 17:27 +0100, Guido Günther a écrit :
> Hi Martin,
> On Sat, Nov 04, 2023 at 04:43:10PM +0100, Martin Quinson wrote:
> > Package: git-buildpackage
> > Version: 0.9.32
> > Severity: wishlist
> > Tags: patch
> > 
> > Hello,
> > 
> > thanks a lot for this package, that very often saves my life when
> > packaging.
> > There is one thing however where gbp could be more helpful, it's when I
> > have to
> > build my package against a build-depend that comes from experimental.
> > 
> > I finally found a way to do it, and I propose the following patch for the
> > documentation for the next person looking for this information. I fully
> > acknowledge that this documentation is somehow suboptimal, and that the gbp
> > tool could be more helpful here, but the proposed documentation would
> > already
> > be great.
> 
> Thanks for taking the time to document this. Some minor nits below:
> 
> 
> > ---
> >  docs/chapters/special.xml |   25 +++++++++++++++++++++++++
> >  1 file changed, 25 insertions(+)
> > 
> > Index: b/docs/chapters/special.xml
> > ===================================================================
> > --- a/docs/chapters/special.xml
> > +++ b/docs/chapters/special.xml
> > @@ -40,6 +40,31 @@
> >  </programlisting>
> >      </sect1>
> >  
> > +    <sect1 id="gbp.special.experimental">
> > +    <title>Using build-depends from experimental</title>
> > +    <para>
> 
> This should mention that one ought to use `gbp buildpackage
> --git-pbuilder` (as that is not the default).

Agreed.

> > +    To build your package against a build-depends taken from experimental,
> > you first need
> > +    to configure your pbuilder. To that extend, add the following to
> > +    <filename>~/.pbuilderrc</filename> to instruct pbuilder to take build
> > depends from
> > +    experimental when they cannot be satisfied from unstable.
> > +    </para>
> > +    <programlisting>
> > +PBUILDERSATISFYDEPENDSCMD=/usr/lib/pbuilder/pbuilder-satisfydepends-
> > experimental
> > +    </programlisting>
> 
> Wouldn't we want to make that conditional like:
> 
> if [ "$GBP_DIST" = "experimental" ]; then
>     echo "Using 'pbuilder-satisfydepends-experimental' for $GBP_DIST"
>     PBUILDERSATISFYDEPENDSCMD=/usr/lib/pbuilder/pbuilder-satisfydepends-
> experimental
> fi

Nice addition, thanks.

> but I *think* this is even the default nowadays for building against
> experimental.
> 
> > +    <para>
> > +    You then need to add experimental to the apt configuration within the
> > chroot.
> > +    The simplest for that is to edit the config file from outside of the
> > chroot directly,
> > +    as follows:
> > +    <programlisting>
> > +sudo bash -c "echo 'deb http://deb.debian.org/debian experimental main' >>
> > /var/cache/pbuilder/base.cow/etc/apt/sources.list"
> > +    </programlisting>
> 
> What about suggesting to bootstrap a new environment instead via:
> 
>    DIST=experimental git-pbuilder create 
> 
> This also handles adding experimental to /etc/apt/sources.list (no extra
> setup needed). Maybe we can streamline things that way a bit?

This has the drawback of taking all dependencies from experimental, which may
not be what one wants.

I agree that things could be streamlined in the tool, but documenting how to
get around the corner with the current tools is already great, IMHO.

Thanks,
Mt

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to