=== Tool tips

==== Basic tool list.

Please read the https://www.debian.org/doc/manuals/developers-reference/tools.html[Overview of Debian Maintainer Tools] in the ``Debian Developer's Reference''.

==== VCS usage trend

Recent VCS trend is to use *git* with following wrapper scripts for the Debian packaging:

* *git-builpackage* is used with *--pristine-tar* to host the whole source in the git repo.
* *gbp-pq* or *quilt* (or alias *dquilt*) is used to manage quilt patches.
* *cowbuilder* is normally used with *pdebuild* (or *git-pbuilder*)

See:

* https://wiki.debian.org/GitPackagingWorkflow
* https://wiki.debian.org/GitPackagingWorkflow/DebConf11BOF
* http://raphaelhertzog.com/2010/11/18/4-tips-to-maintain-a-3-0-quilt-debian-source-package-in-a-vcs/
* The *systemd* packaging practice documentation on http://anonscm.debian.org/gitweb/?p=pkg-systemd/systemd.git;a=blob;f=debian/README.source[Building from source].

==== Package history

For Debian source packages named '<source-package>' recorded in the http://snapshot.debian.org/[snapshot.debian.org] archive, an initial git repo with all of the Debian version history can be generated as follows.

--------------
$ git-import-dscs --debsnap --pristine-tar '<source-package>'
--------------

==== UTF-8 conversion

If upstream documents are encoded in old encoding schemes, converting them to UTF-8 is a good idea.

Use *iconv*(1) to convert encodings of plain text files.

----
iconv -f latin1 -t utf8 foo_in.txt > foo_out.txt
----

Use *w3m*(1) to convert from HTML files to UTF-8 plain text files. When you do this, make sure to execute it under UTF-8 locale.
----
LC_ALL=en_US.UTF-8 w3m -o display_charset=UTF-8 \
        -cols 70 -dump -no-graph -T text/html \
        < foo_in.html > foo_out.txt
----

Run these scripts in the *override_dh_** target of the *debian/rules* file.


==== *debdiff*

You can compare file contents in two source Debian packages with the *debdiff* command.

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

You can also compare file lists in two sets of binary Debian packages with the *debdiff* command.

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

These are useful to identify what has been changed in the source packages and to check for inadvertent changes made when updating binary packages, such as unintentionally misplacing or removing files.

==== Deb source 3.0 migration

See https://wiki.debian.org/Projects/DebSrc3.0[ProjectsDebSrc3.0] to check the support status of the new Debian source formats by the Debian tool chains.
