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

Few notes (Need BTS) 

* *git-builpackage* instead of *cvs-buildpackage*
* *cowbuilder* is normally used with *pbuilder*

==== Package history

The best practice for tracking previous package history is as follows.

* Search all previous Debian source package versions for the intended package at the http://snapshot.debian.org/[snapshot.debian.org] archive.
* Use the *dget* command with the URL to the **.dsc* file to download them.
* Use the *git-import-dscs* command with the *--pristine-tar* option to import all versions at once.

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


==== Deb source 3.0

https://wiki.debian.org/Projects/DebSrc3.0[ProjectsDebSrc3.0]

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

