[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [Pkg-octave-devel] Switch octave-pkg-dev from CDBS into dh



On Thu, Dec 28, 2017 at 08:51:42AM +0100, Rafael Laboissière wrote:
> * Sébastien Villemot <sebastien@debian.org> [2017-12-27 17:26]:
> 
> > On Wed, Dec 27, 2017 at 04:35:59PM +0100, Rafael Laboissière wrote:
> > > 
> > > It would be great to switch from CDBS into dh.  That should not be
> > > too difficult to do, because the code in octave-pkg.mk depends
> > > already heavily on debhelper.
> > > 
> > > This is something that has been in my ToDo list for ages.  I will
> > > take a look at this, as time permits.
> > 
> > That would be great. dh has become a de facto standard, and cdbs is
> > gradually becoming obsolete.
> 
> As I expected, it was not difficult to adapt the code in octave-pkg-dev for
> switching from CDBS into dh.  It is implemented in the Git branch
> dh-instead-of-cdbs.  Just for the record, I am attaching below the diff
> against master.

Thanks. Note that you forgot to drop the Depends of octave-pkg-dev on cdbs.
Also you probably want to add an (empty) override_dh_auto_check, in case there
is a top-level makefile with a "check" or "test" target.

Also, if we upload the octave-pkg-dev now, we need to also upload all Forge
packages, because otherwise they will become RC-buggy (FTBFS).

I am also wondering how we should override some targets with this new setup.
Many Forge packages have a "clean::" rule, or some "install/FOO::" rule (see
for example octave-optim). It is not immediately obvious to me how to deal with
these (without knowing the internals of octave-pkg-dev).

More fundamentally, the solution that you have come up with is quite clever,
because it needs only minimal changes to the existing setup, but in a sense it
is not very dh-ish (and it looks very cdbs-ish). The typical solution to extend
dh for a given class of package is to write some Perl code that integrates at a
deeper level with debhelper (see the myriad of dh-*, for example dh-ocaml which
is rather simple and probably not too far from what we would need). Note that,
with this setup, it is much simpler to override targets from debian/rules,
because the helper does not hijack existing targets, but adds new ones (see for
example /usr/share/perl5/Debian/Debhelper/Sequence/ocaml.pm).

So another plan would be to create a new binary package dh-octave (from the
octave-pkg-dev source), containing something similar to, say, dh-ocaml. Then we
could do the transition gradually, because the old cdbs-based octave-pkg-dev
would still be around (and could be retired when the transition is over).

I am aware that this is much more work than what you did, and I am not at this
point volunteering for doing this, so I’m not saying that this is the right
solution and that what you did should be discarded. But at the very least, if
we keep your solution, we need to solve the override problem I mentioned above.

Best,

-- 
⢀⣴⠾⠻⢶⣦⠀  Sébastien Villemot
⣾⠁⢠⠒⠀⣿⡁  Debian Developer
⢿⡄⠘⠷⠚⠋⠀  http://sebastien.villemot.name
⠈⠳⣄⠀⠀⠀⠀  http://www.debian.org

Attachment: signature.asc
Description: PGP signature


Reply to: