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: > > Again, thanks for this great tool and for your time. > Mt > > > -- System Information: > Debian Release: trixie/sid > APT prefers testing > APT policy: (500, 'testing'), (90, 'unstable') > Architecture: amd64 (x86_64) > Foreign Architectures: i386 > > Kernel: Linux 6.4.0-4-amd64 (SMP w/12 CPU threads; PREEMPT) > Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_USER, TAINT_OOT_MODULE, > TAINT_UNSIGNED_MODULE > Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8), LANGUAGE not > set > Shell: /bin/sh linked to /usr/bin/dash > Init: systemd (via /run/systemd/system) > LSM: AppArmor: enabled > > Versions of packages git-buildpackage depends on: > ii devscripts 2.23.6 > ii git 1:2.40.1-1 > ii man-db 2.11.2-3 > ii python3 3.11.4-5+b1 > ii python3-dateutil 2.8.2-3 > ii python3-pkg-resources 68.1.2-1 > ii python3-yaml 6.0.1-1 > ii sensible-utils 0.0.20 > > Versions of packages git-buildpackage recommends: > ii cowbuilder 0.89 > ii pbuilder 0.231 > ii pristine-tar 1.50 > ii python3-requests 2.31.0+dfsg-1 > > Versions of packages git-buildpackage suggests: > ii python3-notify2 0.3-5 > ii sudo 1.9.14p2-1 > ii unzip 6.0-28 > > -- no debconf information > > --- > 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). > + 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 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? Cheers, -- Guido > + <para> > + Once everything is setup (and once you updated apt cache files with > + <command>git-pbuilder update</command>), you can force the build of your > package against > + a given package from experimental by specifying the relevant version in > the > + <filename>debian/control</filename>. > + </sect1> > + > <sect1 id="gbp.special.nmus"> > <title>Importing NMUs</title> > <para>