<!entity % commondata SYSTEM "common.ent" > %commondata;
<!-- CVS revision of this document -->
- <!entity cvs-rev "$Revision: 1.167 $">
+ <!entity cvs-rev "$Revision: 1.173 $">
<!-- if you are translating this document, please notate the CVS
revision of the developers reference here -->
<!--
There are tools to help you create entries and finalize the
<file>changelog</file> for release — see <ref id="devscripts">
and <ref id="dpkg-dev-el">.
+ <p>
+See also <ref id="bpp-debian-changelog">.
<sect id="upload">Package uploads
<p>
For more information on <prgn>lintian</prgn>, see <ref id="lintian">.
<item>
+Optionally run <ref id="debdiff"> to analyze changes from an older version,
+if one exists.
+ <item>
Downgrade the package to the previous version (if one exists) — this
tests the <file>postrm</file> and <file>prerm</file> scripts.
<item>
priority to the new one. Be sure to explain your reasoning.
<p>
For more information about <em>override files</em>, see <manref
-name="dpkg-scanpackages" section="8">, &file-bts-mailing;, and
-&file-bts-info;.
+name="dpkg-scanpackages" section="8"> and
+<url id="&url-bts-devel;#maintincorrect">.
<p>
Note also that the term "section" is used for the separation of packages
according to their licensing, e.g. <em>main</em>, <em>contrib</em> and
like described above -- if you simply want to close bugs that don't have
anything to do with an upload of yours, do it simply by emailing an
explanation to <email>XXX-done@bugs.debian.org</email>.
+Do <strong>not</strong> close bugs in the changelog entry of a version
+if the said version of the package doesn't have anything to do with the bug.
<sect1 id="bug-security">Handling security-related bugs
<p>
Review and test your changes as much as possible. Check the
differences from the previous version repeatedly
(<prgn>interdiff</prgn> from the <package>patchutils</package> package
-and <prgn>debdiff</prgn> from <package>devscripts</package> are useful tools for
-this).
-
+and <prgn>debdiff</prgn> from <package>devscripts</package> are useful
+tools for this, see <ref id="debdiff">).
+<p>
When packaging the fix, keep the following points in mind:
<list>
<tt>Build-Depends-Indep</tt> settings in <file>debian/control</file>
are set properly. The best way to validate this is to use the
<package>debootstrap</package> package to create an unstable chroot
-environment. Within that chrooted environment, install the
+environment (see <ref id="debootstrap">).
+Within that chrooted environment, install the
<package>build-essential</package> package and any package
dependencies mentioned in <tt>Build-Depends</tt> and/or
<tt>Build-Depends-Indep</tt>. Finally, try building your package
within that chrooted environment. These steps can be automated
by the use of the <prgn>pbuilder</prgn> program which is provided by
-the package of the same name.
+the package of the same name (see <ref id="pbuilder">).
+ <p>
+If you can't set up a proper chroot, <prgn>dpkg-depcheck</prgn> may be
+of assistance (see <ref id="dpkg-depcheck">).
<p>
See the <url id="&url-debian-policy;" name="Debian Policy
Manual"> for instructions on setting build dependencies.
&file-lisp-controller;.
</list>
</sect1>
- </sect>
<!--
<sect1 id="custom-config-files">Custom configuration files
sympa may be an example package
-->
+ <sect1 id="bpp-archindepdata">Architecture-independent data
+ <p>
+ It is not uncommon to have a large amount of architecture-independent
+ data packaged with a program. For example, collection of icons,
+ wallpapers or other graphic files, or audio files. If the size of
+ this data is negligible compared to the size of the remainder of the
+ package, you can keep it all in the same package.
+
+ <p>
+ However, if the size of the data is considerable, consider splitting
+ it out into a separate, architecture-independent package
+ ("_all.deb"). By doing this, you avoid needless duplication of the
+ same data into eleven or more .debs per each architecture. While
+ this adds some extra overhead into the Packages files, it can save a
+ lot of disk space on Debian mirrors, and it also reduces processing
+ time of Lintian or Linda when run over the entire Debian archive.
+ </sect1>
+
+ </sect>
+
+ <sect id="bpp-debian-changelog">
+ <heading>Best practices for <file>debian/changelog</file></heading>
+ <p>
+The following practices supplement the <url name="Policy on changelog
+files" id="&url-debian-policy;ch-docs.html#s-changelogs">.</p>
+
+ <sect1 id="bpp-changelog-do">
+ <heading>Writing useful changelog entries</heading>
+ <p>
+The changelog entry for a package revision documents changes in that
+revision, and only them. Concentrate on describing changes you did since
+the last version that are worth mentioning.
+ <p>
+Focus on <em>what</em> was changed; who, how and when are usually less
+important. Having said that, remember to politely attribute people who have
+provided notable help in making the package (e.g. those who have sent in
+patches).
+ <p>
+There's no need to elaborate the trivial and obvious changes. You can also
+aggregate several such changes in one entry. However, don't be overly terse
+if you have undertaken a major change. Be especially clear if there are
+changes that affect the behaviour of the program -- and for further
+explanations, use the <file>README.Debian</file> file.
+ <p>
+Use common English language, one which the majority of viewers can
+understand. Avoid abbreviations, "tech-speak" and jargon when explaining
+changes that close bugs, especially if the said bugs were filed by users
+that did not strike you as particularly techically savvy. Also, be polite,
+don't swear.
+ <p>
+It is customary to prefix changelog entries with the names of the files that
+were changed. There's no need to explicitely list each and every last one of
+the changed files, especially if the change was small or repetitive -- use
+wildcard characters wisely.
+ <p>
+When referring to bugs, don't assume anything -- say what the problem was,
+how it was fixed, and append the "closes: #nnnnn" string.
+See <ref id="upload-bugfix"> for more information.
+
+ <sect1 id="bpp-changelog-dont">
+ <heading>Common misconceptions about changelog entries</heading>
+ <p>
+The changelog entries should <strong>not</strong> document generic packaging
+issues ("Hey, if you're looking for foo.conf, it's in /etc/blah/."), since
+administrators and users are supposed to be at least remotely acquainted
+with how such things are generally arranged on Debian systems. Do, however,
+mention if you change the location of a configuration file.
+ <p>
+The only bugs closed with a changelog entry should be those that are
+actually fixed in the same package revision. Closing bugs unrelated bugs in
+the changelog is considered very bad practice. See <ref id="upload-bugfix">.
+ <p>
+The changelog entries should <strong>not</strong> be used for random
+discussion with bug reporters ("I don't see segfaults when starting foo
+with option bar; send in more info.") or pleas for help ("The bug list
+on this package is huge, please lend me a hand."). Such things usually
+won't be noticed by their target audience, but will on the other hand
+annoy people who wish to read information about actual changes in the
+package. Please see <ref id="bug-answering"> for more information on
+how to use the bug tracking system.
+ <p>
+It is an old tradition to acknowledge bugs fixed in non-maintainer uploads
+in the first changelog entry of the real maintainer. You don't have to
+follow it, though: if you are certain that you will include the changes from
+the NMU in your next release, you can simply close the bugs the normal way.
+It's usually polite to note that the bugs were fixed by another developer.
+ <p>
+Changelogs shouldn't include general statements on life, the universe and
+everything ("Sorry this upload took me so long, but I caught the flu.").
+Exceptions can be made if the comment is funny ;-) Obviously, this is
+subjective, so it's likely best if it's kept out of technical documentation
+such as changelogs.
+
+ <sect2 id="bpp-changelog-dont-really-dont">
+ <heading>Common errors in changelog entries</heading>
+ <p>
+<example>
+ * Fixed all outstanding bugs.
+</example>
+ <p>
+This doesn't tell readers anything too useful, obviously. Don't do that(TM).
+
+<example>
+ * Applied patch from Jane Random.
+</example>
+ <p>
+What was the patch about?
+
+<example>
+ * Late night install target overhaul.
+</example>
+ <p>
+Overhaul which accomplished...? Is the mention of late night supposed to
+remind us that we shouldn't trust that code?
+
+<example>
+ * Fix vsync FU w/ ancient CRTs.
+</example>
+ <p>
+Too many acronyms, and it's not overly clear what the fuckup (oops,
+a curse word!) was actually about, or how it was fixed.
+
+<example>
+ * This is not a bug. Closes: #nnnnnn
+</example>
+ <p>
+First of all, there's absolutely no need to upload the package to convey
+this information. Use the bug tracking system! Secondly, there's no
+explanation as to why the report is not a bug.
+
+<example>
+ * Has been fixed for ages, but I forgot to close. Closes: #54321
+</example>
+ <p>
+If for some reason you didn't mention the bug number in a previous changelog
+entry, there's no problem, just close the bug normally in the BTS. There's
+no need to touch the changelog file, presuming the description of the fix is
+already in (this applies to the fixes by the upstream authors/maintainers as
+well, you don't have to track bugs that they fixed ages ago in your
+changelog).
+
+<example>
+ * Closes: #12345, #12346, #15432
+</example>
+ <p>
+Where's the description?! If you can't think of a descriptive message, start
+by inserting the title of each different bug.
<package>lintian</package> but has a different set of checks. Its
written in Python rather than Perl.</p>
</sect1>
+
+ <sect1 id="debdiff">
+ <heading><package>debdiff</package></heading>
+ <p>
+<prgn>debdiff</prgn> (from the <package>devscripts</package> package)
+compares file lists and control files of two packages. It is a simple
+regression test, as it will help you notice if the number of binary
+packages has changed since the last upload, or if something's changed
+in the control file. Of course, some of the changes it reports will be
+all right, but it can help you prevent various accidents.
+ <p>
+You can run it over a pair of binary packages:
+<example>
+debdiff package_1-1_arch.deb package_2-1_arch.deb
+</example>
+ <p>
+Or even a pair of changes files:
+<example>
+debdiff package_1-1_arch.changes package_2-1_arch.changes
+</example>
+ <p>
+For more information please see <manref name="debdiff" section="1">.
+ </sect1>
+
</sect>
+
<sect id="tools-helpers">
<heading>Helpers for <file>debian/rules</file></heading>
<p>
<file>debian/changelog</file>, there are handy functions for
finalizing a version and listing the package's current bugs.</p>
</sect1>
+
+ <sect1 id="dpkg-depcheck">
+ <heading><package>dpkg-depcheck</package></heading>
+ <p>
+<prgn>dpkg-depcheck</prgn> (from the <package>devscripts</package> package)
+runs a command under <prgn>strace</prgn> to determine all the packages that
+were used by the said command.
+ <p>
+For Debian packages, this is useful when you have to compose a
+<tt>Build-Depends</tt> line for your new package: running the build
+process through <prgn>dpkg-depcheck</prgn> will provide you with a
+good first approximation of the build-dependencies. For example:
+<example>
+dpkg-depcheck -b debian/rules build
+</example>
+ <p>
+<prgn>dpkg-depcheck</prgn> can also be used to check for run-time
+dependencies, especially if your package uses exec(2) to run other
+programs.
+ <p>
+For more information please see <manref name="dpkg-depcheck" section="1">.
+ </sect1>
+
</sect>