Differences between revisions 55 and 85 (spanning 30 versions)
Revision 55 as of 2015-08-21 22:18:05
Size: 5942
Editor: nomeata
Comment: haskell updates
Revision 85 as of 2021-05-15 02:12:27
Size: 8774
Editor: PhilMorrell
Comment: Add ognibuild (thanks #debian-til pabs) https://www.jelmer.uk/ognibuild.html
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
#language en
Line 3: Line 4:
||<rowstyle="background-color: #EEEEEE;">'''Language'''|| Any || Perl || Ruby || Python || Node.js || Haskell || Go ||
||'''Tool (package name)'''|| [[https://tracker.debian.org/dh-make|dh-make]] || [[https://tracker.debian.org/dh-make-perl|dh-make-perl]] || [[https://tracker.debian.org/gem2deb|gem2deb]] || [[https://tracker.debian.org/python3-stdeb|python3-stdeb]] || [[https://tracker.debian.org/npm2deb|npm2deb]] || [[https://tracker.debian.org/cabal-debian|cabal-debian]] || [[https://tracker.debian.org/dh-make-golang|dh-make-golang]] ||
||'''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.20150601 || 0.87-1 || 0.21.1 || 0.8.5-1 || 0.2.2-1 || 4.31-1 || 0.0~git20150726.0.fc4210a-1 ||
|| cdbs or dh? || dh || dh || dh || dh || dh || cdbs || dh ||
|| use DEBEMAIL || yes || yes || yes || yes || yes || yes || yes ||
|| Build-Depends || no || yes || yes || partial || no || yes || yes ||
|| Depends || no || yes || yes || yes || yes || at build time || yes ||
|| Homepage || no || yes || yes || yes || yes || no || yes ||
|| short/long descriptions || no || yes || yes || yes || short only || yes || yes ||
|| DEP8 tests || no || no || only template || no || basic (only require) || no || no ||
|| .docs / .examples / etc. || no || docs + examples || docs only || no || docs || no || no ||
|| debian/copyright || only template || yes || only template || no || yes || yes || yes ||
|| debian/watch || only template || yes|| yes || yes || yes || yes || no ||
|| git repo creation, pristine-tar, etc. || no || yes || no || no || no || no || yes ||
|| [[UpstreamMetadata|debian/upstream/metadata]] || no || yes || no || no || no || no || no ||
|| ITP mail template || no || no || no || no || yes || no || yes ||
== Language-agnostic ==

These are tools that generate Debian packages independently of the language. They often wrap language-specific package generators (see below).

||<rowstyle="background-color: #EEEEEE;">'''Name'''||
|| DebianPkg:debdry ||
|| DebianPkg:debmake ||


== Language-specific ==

||<rowstyle="background-color: #EEEEEE;">'''Language'''|| Any || Perl || Ruby || Python || Python || Node.js || Haskell || Go || ELPA (Emacs Lisp) ||
||'''Tool (package name)'''|| [[https://tracker.debian.org/dh-make|dh-make]] || [[https://tracker.debian.org/dh-make-perl|dh-make-perl]] || [[https://tracker.debian.org/gem2deb|gem2deb]] || [[https://tracker.debian.org/python3-stdeb|python3-stdeb]] || [[https://github.com/p1otr/pypi2deb|pypi2deb]] || [[https://tracker.debian.org/npm2deb|npm2deb]] || [[https://tracker.debian.org/cabal-debian|cabal-debian]] || [[https://tracker.debian.org/dh-make-golang|dh-make-golang]] || dh-make-elpa ||
||'''Upstream repository'''|| N/A || [[http://www.cpan.org/|CPAN.org]], [[https://anonscm.debian.org/cgit/pkg-perl/packages/dh-make-perl.git|Alioth]] || [[http://www.rubygems.org/|Rubygems.org]] || [[http://pypi.python.org/|PyPI]] || [[http://pypi.python.org/|PyPI]] || [[https://www.npmjs.com|npm]] || [[http://hackage.haskell.org/|Hackage]] || unknown || [[https://melpa.org/|MELPA]] ||
||||||||||||||||||<rowstyle="background-color: #EEEEEE;"> Features ||||
|| version || 1.20150601 || 0.89-1 || 0.21.1 || 0.8.5-1 || 0.20160809 || 0.2.2-1 || 4.31-1 || 0.0~git20150726.0.fc4210a-1 || 0.1.0 (experimental) ||
|| cdbs or dh? || dh || dh || dh || dh || dh || dh || cdbs || dh || dh ||
|| use DEBEMAIL || yes || yes || yes || yes || yes || yes || yes || yes || yes ||
|| Build-Depends || no || yes || yes || partial || yes || no || yes || yes || partial ||
|| Depends || no || yes || yes || yes || yes || yes || at build time || yes || yes ||
|| Homepage || no || yes || yes || yes || yes || yes || no || yes || yes ||
|| short/long descriptions || no || yes || yes || yes || yes || short only || yes || yes || yes ||
|| DEP8 tests || no || yes (autopkgtest-pkg-perl in pkg-perl mode) || only template || no || no || basic (only require) || no || no || no ||
|| .docs / .examples / etc. || no || docs + examples || docs only || no || docs + examples || docs || no || no || docs only ||
|| debian/copyright || only template || yes || only template || no || yes || yes || yes || yes || yes ||
|| debian/watch || only template || yes|| yes || yes || yes || yes || yes || no || yes ||
|| git repo creation, pristine-tar, etc. || no || yes || no || no || yes || no || no || yes || no ||
|| [[UpstreamMetadata|debian/upstream/metadata]] || no || yes || no || no || no || no || no || no || no ||
|| ITP mail template || no || no (use {{{dpt gen-itp}}}) || no || no || yes || yes || no || yes || no ||
|| recursive || || || || || || || || no<<FootNote(The estimate command can tell which parts of the dependency chains are missing from Debian.)>> || ||
Line 26: Line 40:
Line 30: Line 45:
 * dh-make-elpa relies on dh-elpa's dependency detection
Line 31: Line 47:
 * deb-fix-build from DebianPkg:ognibuild will parse build logs for missing dependencies to add, repeating until the build succeeds.
Line 33: Line 50:
TODO. 'cme update dpkg-copyright' is another approach.
A draft copyright file can be created in one of these ways:

 * {{{licensecheck --check '.*' --recursive --deb-machine --lines 0 * >> debian/copyright}}}
 * {{{cme update dpkg-copyright}}}

In either case, you still need to double-check the information
(licensecheck leaves FIXMEs to help you track which parts you have double-checked,
whereas cme strips those FIXMEs)

See more details and alternative tools at CopyrightReviewTools
Line 37: Line 64:
  * '''Perl:''' not supported? ({{{cpan -g Oxford::Calendar}}} does nothing here...)   * '''Perl:''' {{{cpan -g Oxford::Calendar}}} (does nothing here ...; here it works :) maybe cpan config needed?)
Line 41: Line 68:
  * '''Haskell:''' {{{cabal get PKGNAME}}}   * '''Haskell:''' {{{cabal unpack --pristine PKGNAME}}}
  * '''ELPA:''' user is expected to {{{git clone}}} upstream repository
Line 48: Line 76:
  * '''ELPA:''' {{{dh-make-elpa [make]}}}
Line 53: Line 82:
  * '''Haskell:''' not supported, need unpacked source   * '''Haskell, ELPA:''' not supported, need unpacked source
Line 58: Line 87:
  * '''npm, Haskell:''' not supported   * '''npm, Haskell, ELPA:''' not supported
Line 63: Line 92:
  * '''npm, Haskell:''' not supported   * '''npm, Haskell, ELPA:''' not supported
Line 68: Line 97:
  * '''npm, Haskell:''' not supported   * '''npm, Haskell, ELPA:''' not supported
Line 70: Line 99:
  * '''All:''' {{{cme migrate dpkg}}} or {{{cme fix dpkg}}}   * '''All:''' {{{cme migrate dpkg}}} or {{{cme fix dpkg}}} See [[https://github.com/dod38fr/config-model/wiki/Managing-Debian-packages-with-cme|Managing Debian package files with cme]]
Line 72: Line 101:
  * '''Python, Ruby:''' not supported   * '''Python:''' not supported
  * '''Ruby:''' {{{dh-make-ruby -w}}}
Line 75: Line 105:
  * '''ELPA:''' not yet

== Not (yet) covered tools ==
 * OCaml : oasis2debian and opam2debian
Line 78: Line 112:
 * Java -- see javahelper for packaging tools
* Ocaml -- see dh-ocaml for packaging tools
 * Java -- see javahelper/maven-debian-helper for packaging tools. There is also "mh_make"
Line 82: Line 115:
 * debdry: common frontend for most of the helpers described above  * debdry: common frontend for most of the helpers described above [[https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=750576|description]]
Line 85: Line 118:
 * [[Games/GameDataPackager|game-data-packager]]: converts non-free game data files to Debian binary packages
 * DebianPkg:ognibuild: {{{ogni info --explain --resolve=apt}}} will attempt to auto-discover the buildsystem
Line 89: Line 124:
 * The Rust team [[Teams/RustPackaging/Policy|seems]] to have a debcargo system

== Meetings ==

 * DebConf15:
   * [[https://summit.debconf.org/debconf15/meeting/257/automatic-packaging/|Automatic packaging BoF]]: [[https://gobby.debian.org/export/debconf15/bof/Automatic%20Packaging|notes]], [[https://meetings-archive.debian.net/pub/debian-meetings/2015/debconf15/Automatic_packaging.webm|video]]

== Footnotes ==

----

CategoryPackaging CategorySoftware

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

Language-agnostic

These are tools that generate Debian packages independently of the language. They often wrap language-specific package generators (see below).

Name

debdry

debmake

Language-specific

Language

Any

Perl

Ruby

Python

Python

Node.js

Haskell

Go

ELPA (Emacs Lisp)

Tool (package name)

dh-make

dh-make-perl

gem2deb

python3-stdeb

pypi2deb

npm2deb

cabal-debian

dh-make-golang

dh-make-elpa

Upstream repository

N/A

CPAN.org, Alioth

Rubygems.org

PyPI

PyPI

npm

Hackage

unknown

MELPA

Features

version

1.20150601

0.89-1

0.21.1

0.8.5-1

0.20160809

0.2.2-1

4.31-1

0.0~git20150726.0.fc4210a-1

0.1.0 (experimental)

cdbs or dh?

dh

dh

dh

dh

dh

dh

cdbs

dh

dh

use DEBEMAIL

yes

yes

yes

yes

yes

yes

yes

yes

yes

Build-Depends

no

yes

yes

partial

yes

no

yes

yes

partial

Depends

no

yes

yes

yes

yes

yes

at build time

yes

yes

Homepage

no

yes

yes

yes

yes

yes

no

yes

yes

short/long descriptions

no

yes

yes

yes

yes

short only

yes

yes

yes

DEP8 tests

no

yes (autopkgtest-pkg-perl in pkg-perl mode)

only template

no

no

basic (only require)

no

no

no

.docs / .examples / etc.

no

docs + examples

docs only

no

docs + examples

docs

no

no

docs only

debian/copyright

only template

yes

only template

no

yes

yes

yes

yes

yes

debian/watch

only template

yes

yes

yes

yes

yes

yes

no

yes

git repo creation, pristine-tar, etc.

no

yes

no

no

yes

no

no

yes

no

debian/upstream/metadata

no

yes

no

no

no

no

no

no

no

ITP mail template

no

no (use dpt gen-itp)

no

no

yes

yes

no

yes

no

recursive

no1

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.
  • Several tools use wrap-and-sort to unify structure of debian/ files

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
  • dh-make-elpa relies on dh-elpa's dependency detection
  • DEP-11 could end up being the proper way to generate language-specific dependencies

  • deb-fix-build from ognibuild will parse build logs for missing dependencies to add, repeating until the build succeeds.

A draft copyright file can be created in one of these ways:

  • licensecheck --check '.*' --recursive --deb-machine --lines 0 * >> debian/copyright

  • cme update dpkg-copyright

In either case, you still need to double-check the information (licensecheck leaves FIXMEs to help you track which parts you have double-checked, whereas cme strips those FIXMEs)

See more details and alternative tools at CopyrightReviewTools

Usage

  • Download upstream package from repository
    • Perl: cpan -g Oxford::Calendar (does nothing here ...; here it works :) maybe cpan config needed?)

    • 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 unpack --pristine PKGNAME

    • ELPA: user is expected to git clone upstream repository

  • 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 --official (see ?the step-by-step guide)

    • ELPA: dh-make-elpa [make]

  • 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, ELPA: 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, ELPA: 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, ELPA: 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, ELPA: not supported

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

    • Perl: dh-make-perl refresh

    • Python: not supported

    • Ruby: dh-make-ruby -w

    • npm: not supported

    • Haskell: cabal-debian --official --upgrade

    • ELPA: not yet

Not (yet) covered tools

  • OCaml : oasis2debian and opam2debian

Other languages without an automated generator

  • PHP (PEAR packages) -- see pkg-php-tools for packaging tools (and debpear for a simple generator)
  • Java -- see javahelper/maven-debian-helper for packaging tools. There is also "mh_make"

See also

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

  • alien: converts RPM/etc binary packages to deb binary packages
  • checkinstall: run an arbitrary upstream build system and auto-package the output
  • game-data-packager: converts non-free game data files to Debian binary packages

  • ognibuild: ogni info --explain --resolve=apt will attempt to auto-discover the buildsystem

TODO

Meetings

Footnotes


CategoryPackaging CategorySoftware

  1. The estimate command can tell which parts of the dependency chains are missing from Debian. (1)