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

2013-05-14 Thread Osamu Aoki
Hi,

On Tue, May 14, 2013 at 10:43:59AM +0300, Antti-Juhani Kaijanaho wrote:
> On Mon, May 13, 2013 at 02:52:17PM +0200, Alberto Garcia wrote:
> > Also, is there any relation between this and the old 'debmake' package
> > or they just happen to have the same name?
> 
> My first thought upon seeing this ITP was, whyever for would anyone want to
> resurrect debmake.

Because this inherits some code from the original debmake indirectly via
dh-make and the original debmake is no more in archive.

This serves for the same purpose under new updated packaging service and
the name is available.  I made sure version is higher.  Please consider
this is a reimplementation of debmake.  (dh-make looks to me a
reimplementation of the original debmake.)

 debmake original (1996-2006,shell)  the oldest, 
  template file based
 dh-make  (1998-,perl)   co-existed with debmake original
  template file based
 debmake mine (2013-,python) why not co-existed with dh-make?
  synthesize file contents based on parameters

Since my intended changes were targeted to the command line UI design
and internal program structure, I did not ask dh-make maintainer to
change this way since this will break its current internal elegance.

Once I decided to reimplement, I chose easiest language to do the task
for me.

Regards,

Osamu

FYI: All the codes inherited from debmake original/dh-make in my new
debmake are optional scripts copied into debian/ directory only upon
user's extra action.


-- 
To UNSUBSCRIBE, email to debian-wnpp-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/20130514094834.GA6551@goofy.localdomain



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

2013-05-14 Thread Antti-Juhani Kaijanaho
On Mon, May 13, 2013 at 02:52:17PM +0200, Alberto Garcia wrote:
> Also, is there any relation between this and the old 'debmake' package
> or they just happen to have the same name?

My first thought upon seeing this ITP was, whyever for would anyone want to
resurrect debmake.

Please choose another name.

-- 
Antti-Juhani Kaijanaho


-- 
To UNSUBSCRIBE, email to debian-wnpp-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/20130514074357.ga10...@teralehti.kaijanaho.fi



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

2013-05-13 Thread Alberto Garcia
On Mon, May 13, 2013 at 12:36:39AM -0500, Steve Langasek wrote:

> >  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.

> This sounds almost exactly like what dh-make already does, with a
> few incremental enhancements.

Also, is there any relation between this and the old 'debmake' package
or they just happen to have the same name?

https://lists.debian.org/debian-devel-announce/2006/03/msg00019.html

http://bugs.debian.org/cgi-bin/pkgreport.cgi?archive=both;package=debmake

http://archive.debian.net/en/sarge/debmake

Berto


-- 
To UNSUBSCRIBE, email to debian-wnpp-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/20130513125217.ga2...@igalia.com



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

2013-05-13 Thread Osamu Aoki
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.


-- 
To UNSUBSCRIBE, email to debian-wnpp-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/20130513120638.GA8035@goofy.localdomain



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

2013-05-13 Thread Craig Small
On Mon, May 13, 2013 at 12:36:39AM -0500, Steve Langasek wrote:
> This sounds almost exactly like what dh-make already does, with a few
> incremental enhancements.  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.
I wondered that myself actually.

 - Craig
-- 
Craig Small VK2XLZ   http://enc.com.au/  csmall at : enc.com.au
Debian GNU/Linux http://www.debian.org/  csmall at : debian.org
GPG fingerprint: 5D2F B320 B825 D939 04D2  0519 3938 F96B DF50 FEA5


-- 
To UNSUBSCRIBE, email to debian-wnpp-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/20130513105451.gb16...@enc.com.au



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

2013-05-12 Thread Steve Langasek
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.  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.

-- 
Steve Langasek   Give me a lever long enough and a Free OS
Debian Developer   to set it on, and I can move the world.
Ubuntu Developerhttp://www.debian.org/
slanga...@ubuntu.com vor...@debian.org


signature.asc
Description: Digital signature


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

2013-05-09 Thread Osamu Aoki
Package: wnpp
Severity: wishlist
Owner: Osamu Aoki 

* Package name: debmake
  Version : 4.0.0
  Upstream Author : Osamu Aoki 
* URL : 
* License : MIT
  Programming Lang: Python3
  Description : helper script to make the Debian source package

 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 is working here.  This generates proper dh command line with "--with ..."
for python2 and python3 (with override lines).  This also has options to use
upstream "make dist" or tarball as the starting point. I am cleaning up code
before upload.  No problem for running multiple times and no more extra
template files unless requested.

FYI:
The author thanks previous efforts on this topic (GPL):
 * debmake: 1996-1997 Christoph Lameter 
1997-2006 Santiago Vila 
command: deb-make, version up to 3.8 (shell script)
(not in wheezy)

 * dh-make: 1998-2012 Craig Small 
command: dh_make (perl script)

Version starts from 4.0.0 since old debmake was 3.8.

===
$ debmake -h
usage: debmake [-h] [-a upstream-version.tar.gz | -d] [-p package_name]
   [-u upstream_version] [-r debian_revision] [-z extension]
   [-b package[:type]] [-c license_file] [-e f...@example.org]
   [-f "firstname lastname"] [-i] [-m] [-n] [-o] [-q] [-v] [-x]

debmake: make Debian source packageVersion: 4.0.0
Copyright © 2013 Osamu Aoki 

debmake builds the Debian package from the upstream source.  
Normally, this is done as follows:
 * The upstream tarball is downloaded as the upstream-version.tar.gz file.
 * The upstream_version.orig.tar.gz symlink is generated pointing to the 
upstream tarball.
 * It is untared to create many files under the upstream-version/ directory.  
 * debmake is invoked in the upstream-version/ directory without any arguments.
 * Files in the upstream-version/debian/ directory are manually adjusted.
 * dpkg-buildpackage is invoked in the upstream-version/ directory to make 
debian packages.

optional arguments:
  -h, --helpshow this help message and exit
  -a upstream-version.tar.gz, --archive upstream-version.tar.gz
use the upstream source tarball directly (-p, -u, -z:
overridden)
  -d, --distrun "make dist" equivalent first to generate upstream
tarball and use it
  -p package_name, --package package_name
set the Debian package name
  -u upstream_version, --upstreamversion upstream_version
set the upstream package version
  -r debian_revision, --revision debian_revision
set the Debian package revision
  -z extension, --targz extension
set the tarball type,
extension=(tar.gz|tar.bz2|tar.xz)
  -b package[:type], --binaryspec package[:type]
set binary package specs,
package=(-|-doc|-dev|-common|-bin|-dbg),
type=(all|any|foreign|same)

   (This can have -b"package1:type1,package2:type2,package3:type3")

  -c license_file, --copyright license_file
add formatted license to debian/copyright
  -e f...@example.org, --email f...@example.org
set e-mail address
  -f "firstname lastname", --fullname "firstname lastname"
set the fullname
  -i, --initialize  set-up debhelper to run "autoreconf -ivf" to
initialize for Autotools
  -m, --monoarchforce packages to be non-multiarch
  -n, --native  make a native source package without .orig.tar.gz
  -o, --overwrite   overwrite existing configuration files
  -q, --quitearly   quit early before creating files in the debian
directory
  -v, --version show version information
  -x, --extra   generate extra configuration files as templates

Osamu


--
To UNSUBSCRIBE, email to debian-wnpp-requ...@lists.debian.org
with