Kapitel 13. Tool usages

Inhaltsverzeichnis

13.1. debdiff
13.2. dget
13.3. mk-origtargz
13.4. origtargz
13.5. git deborig
13.6. dpkg-source -b
13.7. dpkg-source -x
13.8. debc
13.9. piuparts
13.10. bts

Here are some notable tools around Debian packaging.

[Anmerkung]Anmerkung

The descriptions in this section are intentionally brief. Prospective maintainers are strongly encouraged to search for and read all relevant documentation associated with these commands.

[Anmerkung]Anmerkung

Examples here use the gz-compression. The xz-compression may be used instead.

Sie können die Dateiinhalte in zwei Quellpaketen mit dem Befehl debdiff vergleichen.

$ debdiff old-package.dsc new-package.dsc

Sie können auch Dateilisten in zwei Gruppen von Debian-Binärpekten mit dem Befehl debdiff vergleichen.

$ debdiff old-package.changes new-package.changes

Diese sind nützlich, um herauszufinden, was sich in Quellpaketen geändert hat und zu prüfen, ob unbeabsichtigte Änderungen beim Aktualisieren der Binärpakete erfolgten, wie bespielsweise falsch angeordnete oder entfernte Dateien.

Debian now enforces the source-only upload when developing packages. So there may be 2 different *.changes files:

  • package_version-revision_source.changes for the normal source-only upload
  • package_version-revision_arch.changes for the binary upload

Mit dem Befehl dget können Sie eine Gruppe von Dateien für das Debian-Quellpaket herunterladen.

$ dget https://www.example.org/path/to/package_version-rev.dsc

You can make the upstream tarball ../foo-newversion.tar.[xg]z accessible from the Debian source tree as ../foo_newversion.orig.tar.[xg]z. This command is useful for renaming and symlinking the upstream tarball to the expected Debian naming convention.

You can fetch the pre-existing orig tarball of a Debian package from various sources, and unpack it with origtargz command.

This is basically for -2, -3, …​ revisions.

If the upstream project is hosted in a Git repository without an official tarball release, you can generate its orig tarball from the git repository for use by the Debian source package. Execute git deborig from the root of the checked-out source tree.

This is basically for -1 revisions.

The dpkg-source -b command packs the upstream source tree into the Debian source package.

It expects a series of patches in the debian/patches/ directory and their application sequence in debian/patches/series.

It is compatible with dquilt (see Abschnitt 4.4, „quilt setup““) operations and understands the patch application status from the existence of .pc/applied-patches.

The dpkg-buildpackage command invokes dpkg-source -b.

The dpkg-source -x command extracts the source tree and applies the patches in the debian/patches/ directory using the sequence specified in debian/patches/series to the upstream source tree. It also adds .pc/applied-patches. (See Abschnitt 11.6, „Patch applied Git repository““.)

The dpkg-source -x --skip-patches command extracts source tree only. It doesn’t add .pc/applied-patches. (See Abschnitt 11.5, „Patch unapplied Git repository“.)

Both extracted source trees are ready for building Debian binary packages with dpkg-buildpackage, dbuild, sbuild, etc..

Sie sollten erstellte Pakete mit dem Befehl debc lokal installieren, um sie zu testen.

$ debc package_version-rev_arch.changes

You should install generated packages with the piuparts command to test it automatically.

$ sudo piuparts package_version-rev_arch.changes
[Anmerkung]Anmerkung

This is a very slow process with remote APT package repository access.

After uploading the package, you will receive bug reports. It is an important duty of a package maintainer to manage these bugs properly, as described in 5.8. Handling bugs“ of the Debian Developer’s Reference.

The bts command is a handy tool to manage bugs on the Debian Bug Tracking System.

$ bts severity 123123 wishlist , tags -1 pending