Differences between revisions 2 and 39 (spanning 37 versions)
Revision 2 as of 2015-04-22 07:14:37
Size: 968
Comment:
Revision 39 as of 2015-04-23 19:05:40
Size: 5017
Comment:
Deletions are marked like this. Additions are marked like this.
Line 3: Line 3:
||<rowstyle="background-color: #EEEEEE;">'''Language'''|| Any || Perl || Ruby ||
||'''Tool (package name)'''|| dh-make || dh-make-perl || gem2deb ||
||'''Upstream repository'''|| N/A || CPAN.org || Rubygems.org ||
||||||||<rowstyle="background-color: #EEEEEE;"> Use cases ||
||||||||<rowstyle="background-color: #EEEEEE;"> Features ||
|| cdbs or dh? ||
|| Fill in debian/copyright ||
|| Fill debian/watch ||
|| Refresh mode (regenerate all files, moving old ones to .bak) ||
|| Handle git repo creation, pristine-tar, etc. ||
|| Generate debian/upstream/metadata (UpstreamMetadata) ||
||<rowstyle="background-color: #EEEEEE;">'''Language'''|| Any || Perl || Ruby || Python || Node.js || Haskell ||
||'''Tool (package name)'''|| dh-make || dh-make-perl || gem2deb || python3-stdeb || npm2deb || cabal-debian ||
||'''Upstream repository'''|| N/A || [[http://www.cpan.org/|CPAN.org]] || [[http://www.rubygems.org/|Rubygems.org]] || [[http://pypi.python.org/|PyPI]] || [[https://www.npmjs.com|npm]] || [[http://hackage.haskell.org/|Hackage]] ||
||||||||||||||<rowstyle="background-color: #EEEEEE;"> Features ||
|| version || 1.20140617 || 0.84-2 || 0.14 || 0.8.2-4 || 0.2.2-1 || 4.17.4-1 ||
|| cdbs or dh? || dh || dh || dh || dh || dh || cdbs ||
|| use DEBEMAIL || yes || yes || yes || no || yes || yes ||
|| Build-Depends || no || yes || yes || partial || no || yes ||
|| Depends || no || yes || yes || yes || yes || at build time ||
|| Homepage || no || yes || yes || no || yes || no ||
|| short/long descriptions || no || yes || yes || yes || short only || yes ||
|| DEP8 tests || no || no || only template || no || basic (only require) || no ||
|| .docs / .examples / etc. || no || docs + examples || docs only || no || docs || no ||
|| debian/copyright || only template || yes || only template || no || yes || yes ||
|| debian/watch || only template || yes|| yes || no || yes || yes ||
|| git repo creation, pristine-tar, etc. || no || yes || no || no || no || no ||
|| debian/upstream/metadata (UpstreamMetadata) || no || yes || no || no || no || no ||
|| ITP mail template || no || no || no || no || yes || no ||
== Notes ==
 * There's a [[https://github.com/lnussbaum/autodeb-tests|Git repo]] with some example outputs
 * ''only template'' means that the tool provides a file that is not customized per-package
 * npm2deb only generates the Debian files from metadata, but does not create a proper source package. The upstream source is not downloaded.
Line 15: Line 26:
== TO-DO List ==
 * Look at:
  * python-stdeb (Pypi)
  * cabal-debian (haskell)
  * javahelper (Java)
  * npm2deb (Node.js)
  * pkg-php-tools (PHP, PEAR modules)
  * ocaml tool?
 * Investigate meta-helpers
  * debdry
  * https://github.com/FedericoCeratto/debian-package-init
=== Build-depends and Depends generation ===
 * dh-make-perl uses local packages and apt-file to identify packages ([[https://bugs.debian.org/783110|broken with 0.84-2 and multiarch]])
 * stdeb also uses apt-file with a fallback on module name conversion ([[https://sources.debian.net/src/stdeb/0.8.2-4/stdeb/util.py/#L265|code]])
 * npm, gem2deb and cabal-Debian only convert upstream package names found in metadata, to Debian package names
 * [[https://wiki.debian.org/DEP-11|DEP-11]] could end up being the proper way to generate language-specific dependencies

=== Copyright file generation ===
TODO. 'cme update dpkg-copyright' is another approach.

== Usage ==
 * Download upstream package from repository
  * '''Perl:''' not supported? ({{{cpan -g Oxford::Calendar}}} does nothing here...)
  * '''Python:''' {{{pypi-download NAME --release VERSION}}}, f.e. {{{pypi-download Mako --release 1.0.1}}}
  * '''npm:''' {{{npm install PKGNAME}}}
  * '''Ruby:''' {{{gem fetch GEMNAME}}}
  * '''Haskell:''' {{{cabal get PKGNAME}}}
 * Debianize an unpacked upstream source
  * '''Perl:''' {{{dh-make-perl [make] .}}}
  * '''Python:''' {{{python3 setup.py --command-packages=stdeb.command debianize}}}
  * '''Ruby:''' {{{dh-make-ruby .}}}
  * '''npm:''' not supported
  * '''Haskell:''' {{{cabal-debian}}}
 * Debianize (without building source)
  * '''Perl:''' {{{dh-make-perl [make] {SOURCE_DIR | --cpan MODULE|DIST} }}}
  * '''Python:''' not supported
  * '''Ruby:''' {{{gem2deb --only-source-dir GEMNAME|GEMFILE}}}
  * '''npm:''' {{{npm2deb create PKGNAME}}}
  * '''Haskell:''' not supported, need unpacked source
 * Debianize and build source package
  * '''Perl:''' {{{dh-make-perl [make] {SOURCE_DIR | --cpan MODULE|DIST} --build-source}}} or {{{cpan2dsc MODULE}}}
  * '''Python:''' {{{py2dsc DISTFILE}}}
  * '''Ruby:''' {{{gem2deb --only-debian-source GEMNAME|GEMFILE}}}
  * '''npm, Haskell:''' not supported
 * Debianize and build binary packages
  * '''Perl:''' {{{dh-make-perl [make] {SOURCE_DIR | --cpan MODULE|DIST} --build}}} or {{{cpan2deb MODULE}}}
  * '''Python:''' {{{py2dsc-deb DISTFILE}}}
  * '''Ruby:''' {{{gem2deb GEMNAME|GEMFILE}}}
  * '''npm, Haskell:''' not supported
 * Debianize, build, install
  * '''Perl:''' {{{dh-make-perl [make] {SOURCE_DIR | --cpan MODULE|DIST} --install}}}
  * '''Python:''' {{{pypi-install NAME}}}
  * '''Ruby:''' not supported
  * '''npm, Haskell:''' not supported
 * Refresh an already created package, moving old files to .bak:
  * '''All:''' {{{cme migrate dpkg}}} or {{{cme fix dpkg}}}
  * '''Perl:''' {{{dh-make-perl refresh}}}
  * '''Python, Ruby:''' not supported
  * '''npm:''' not supported
  * '''Haskell:''' {{{cabal-debian}}}

== Other languages without an automated generator ==
 * PHP (PEAR packages) -- see pkg-php-tools for packaging tools
 * Java -- see javahelper for packaging tools
 * Ocaml -- see dh-ocaml for packaging tools

== See also ==
 * debdry: common frontend for most of the helpers described above

This page references tools that aim at providing basic working Debian packages.

Language

Any

Perl

Ruby

Python

Node.js

Haskell

Tool (package name)

dh-make

dh-make-perl

gem2deb

python3-stdeb

npm2deb

cabal-debian

Upstream repository

N/A

CPAN.org

Rubygems.org

PyPI

npm

Hackage

Features

version

1.20140617

0.84-2

0.14

0.8.2-4

0.2.2-1

4.17.4-1

cdbs or dh?

dh

dh

dh

dh

dh

cdbs

use DEBEMAIL

yes

yes

yes

no

yes

yes

Build-Depends

no

yes

yes

partial

no

yes

Depends

no

yes

yes

yes

yes

at build time

Homepage

no

yes

yes

no

yes

no

short/long descriptions

no

yes

yes

yes

short only

yes

DEP8 tests

no

no

only template

no

basic (only require)

no

.docs / .examples / etc.

no

docs + examples

docs only

no

docs

no

debian/copyright

only template

yes

only template

no

yes

yes

debian/watch

only template

yes

yes

no

yes

yes

git repo creation, pristine-tar, etc.

no

yes

no

no

no

no

debian/upstream/metadata (UpstreamMetadata)

no

yes

no

no

no

no

ITP mail template

no

no

no

no

yes

no

Notes

  • There's a Git repo with some example outputs

  • only template means that the tool provides a file that is not customized per-package

  • npm2deb only generates the Debian files from metadata, but does not create a proper source package. The upstream source is not downloaded.

Build-depends and Depends generation

  • dh-make-perl uses local packages and apt-file to identify packages (broken with 0.84-2 and multiarch)

  • stdeb also uses apt-file with a fallback on module name conversion (code)

  • npm, gem2deb and cabal-Debian only convert upstream package names found in metadata, to Debian package names
  • DEP-11 could end up being the proper way to generate language-specific dependencies

TODO. 'cme update dpkg-copyright' is another approach.

Usage

  • Download upstream package from repository
    • Perl: not supported? (cpan -g Oxford::Calendar does nothing here...)

    • Python: pypi-download NAME --release VERSION, f.e. pypi-download Mako --release 1.0.1

    • npm: npm install PKGNAME

    • Ruby: gem fetch GEMNAME

    • Haskell: cabal get PKGNAME

  • Debianize an unpacked upstream source
    • Perl: dh-make-perl [make] .

    • Python: python3 setup.py --command-packages=stdeb.command debianize

    • Ruby: dh-make-ruby .

    • npm: not supported

    • Haskell: cabal-debian

  • Debianize (without building source)
    • Perl: dh-make-perl [make] {SOURCE_DIR | --cpan MODULE|DIST} 

    • Python: not supported

    • Ruby: gem2deb --only-source-dir GEMNAME|GEMFILE

    • npm: npm2deb create PKGNAME

    • Haskell: not supported, need unpacked source

  • Debianize and build source package
    • Perl: dh-make-perl [make] {SOURCE_DIR | --cpan MODULE|DIST} --build-source or cpan2dsc MODULE

    • Python: py2dsc DISTFILE

    • Ruby: gem2deb --only-debian-source GEMNAME|GEMFILE

    • npm, Haskell: not supported

  • Debianize and build binary packages
    • Perl: dh-make-perl [make] {SOURCE_DIR | --cpan MODULE|DIST} --build or cpan2deb MODULE

    • Python: py2dsc-deb DISTFILE

    • Ruby: gem2deb GEMNAME|GEMFILE

    • npm, Haskell: not supported

  • Debianize, build, install
    • Perl: dh-make-perl [make] {SOURCE_DIR | --cpan MODULE|DIST} --install

    • Python: pypi-install NAME

    • Ruby: not supported

    • npm, Haskell: not supported

  • Refresh an already created package, moving old files to .bak:
    • All: cme migrate dpkg or cme fix dpkg

    • Perl: dh-make-perl refresh

    • Python, Ruby: not supported

    • npm: not supported

    • Haskell: cabal-debian

Other languages without an automated generator

  • PHP (PEAR packages) -- see pkg-php-tools for packaging tools
  • Java -- see javahelper for packaging tools
  • Ocaml -- see dh-ocaml for packaging tools

See also

  • debdry: common frontend for most of the helpers described above