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

Bug#707601: ITP: debmake -- helper script to make the Debian source package



Hi,

On Mon, May 13, 2013 at 12:36:39AM -0500, Steve Langasek wrote:
> On Fri, May 10, 2013 at 01:40:39AM +0900, Osamu Aoki wrote:
> 
> >  This package helps you to convert a upstream source package (or VCS
> >  contents) into the Debian package by adding files required for the Debian
> >  source package.  The generated debian/rules file uses the new dh command
> >  syntax from the debhelper (>9) package.
> >  .
> >  The debmake command invoked in the upstream source tree without any
> >  option can generate template files which is good enough to create a
> >  single arch=any Debian binary package for local use.  The generated files
> >  should be edited to make it conform to the Debian policy if the package
> >  is uploaded to the Debian archive.  By adding few options, this command
> >  can generate template files for the arbitrary combination of the
> >  multi-binary and multi-arch package, etc.
> >  .
> >  This debmake command also scans copyright and license texts in the source
> >  files to help crafting the proper DEP-5 compatible debian/copyright file.
> > ----
> 
> This sounds almost exactly like what dh-make already does, with a few
> incremental enhancements.  

Yes.  But seemingly incremental features are not so easy to add to
dh-make.

> Why should we have this in the archive as a
> separate package, instead of improving the existing tool?  Dividing efforts
> between two packages seems like a sure recipe for both tools falling behind
> in the long term.

The design of dh-make code is roughly:
 * It only supports fixed PACKAGE CLASSES.
   * Single binary
   * Arch-Independent
   * Multiple binary
   * Library
     ....  (Total 6 but no multi-arch support, no dh --with support etc.)  
 * Each PACKAGE CLASS is represented by a set of template files.
 * It basically copy them by choosing a PACKAGE CLASS.
 * Customization is only via text substitution while copying.

I thought this fundamental rigidness needs to be changed to make this
more flexible.  

Since accommodating "multi-arch support", "--with arguments support",
"license scan with binary check", ... require rewriting almost all of
the code.  So I did this.

Anyway, if you try this program, I think you understand.  It is already
uploaded to NEW. For example,

For simple arch any single package, you need only this:
 $ debmake
 $ debuild
So this much, it is equivalent to dh-make.

You can make multi-binary multi-arch packages with:
 $ debmake -b "foo,foo-doc,libfoo1,libfoo-dev,libfoo-dbg"

This should make 5 packages with multi-arch support.

If package is autotools based but has Python code:

 $ debmake -w python2 -b"foo:all,foo-doc"

This should make 2 packages.  This not only add -w python2 to dh but
also adjusts debian/control.

Theese packaging choices are almost impossible with dh-make program
framework.  Thus .... my reason to rewrite this.

This may be still buggy and may needs some more work.  I was thinking to
update maint-guide using this so I need to be less wordy and the debmake
program does more.

Osamu

PS: Except for scanning copyright text, code is small enough.  The whole
code is only 2275 lines including main part of the template text.


Reply to: