X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=developers-reference.sgml;h=6ffa1bac9fcb450ea0d876a5b7e52cc1d1e00199;hb=a2c790cb659d425284a524ce8dfd748dbc84f511;hp=8d5bbf8118080faf7accad042581e6eecb8149ad;hpb=7f3396f535c65eaf2bb243eaf2587da737ce323e;p=developers-reference.git diff --git a/developers-reference.sgml b/developers-reference.sgml index 8d5bbf8..6ffa1ba 100644 --- a/developers-reference.sgml +++ b/developers-reference.sgml @@ -6,7 +6,7 @@ %commondata; - + +It is technically possible to upload a package into several distributions +at the same time but it usually doesn't make sense to use that feature +because the dependencies of the package may vary with the distribution. +In particular, it never makes sense to combine the experimental +distribution with anything else. Uploading to stable

Uploading to stable means that the package will be placed into the -proposed-updates directory of the Debian archive for further +stable-proposed-updates directory of the Debian archive for further testing before it is actually included in stable.

Extra care should be taken when uploading to stable. Basically, a @@ -1459,13 +1554,29 @@ packages (by messing with Provides or shlibs files), possibly making those other packages uninstallable, is strongly discouraged.

The Release Team (which can be reached at &email-debian-release;) will -regularly evaluate the uploads in proposed-updates and decide if +regularly evaluate the uploads in stable-proposed-updates and decide if your package can be included in stable. Please be clear (and verbose, if necessary) in your changelog entries for uploads to stable, because otherwise the package won't be considered for inclusion. - + Uploading to testing-proposed-updates +

+The testing distribution is fed with packages from unstable according to the rules +explained in . However, the release manager may stop the testing +scripts when he wants to freeze the distribution. In that case, you may want to +upload to testing-proposed-updates to provide fixed packages during the freeze. +

+Keep in mind that packages uploaded there are not automatically processed, they +have to go through the hands of the release manager. So you'd better have a good +reason to upload there. In order to know what a good reason is in the +release manager's eyes, you should read the instructions that he regularly +gives on &email-debian-devel-announce;. +

+You should not upload to testing-proposed-updates when you can update your +packages through unstable. If you can't (for example because you have a +newer development version in unstable), you may use it but it is recommended to ask +the authorization of the release manager before. Uploading a package @@ -1507,13 +1618,13 @@ maintenance software will process it by running dinstall on your changes file: dinstall -n foo.changes. Note that dput can do this for you automatically. - Uploading to non-US (pandora) + Uploading to non-US

As discussed above, export controlled software should not be uploaded to ftp-master. Instead, upload the package to non-us.debian.org, placing the files in &non-us-upload-dir; (again, both and can do this for you if invocated properly). By default, +id="dput"> can do this for you if invoked properly). By default, you can use the same account/password that works on ftp-master. If you use anonymous FTP to upload, place the files into &upload-queue;. @@ -1753,29 +1864,25 @@ distribution, i.e., stable, unstable, or experimental. Porters have slightly different rules than non-porters, due to their unique circumstances (see ).

-When a security bug is detected, a fixed package should be uploaded -as soon as possible. In this case, the Debian security officers get in -contact with the package maintainer to make sure a fixed package is -uploaded within a reasonable time (less than 48 hours). If the package -maintainer cannot provide a fixed package fast enough or if he/she -cannot be reached in time, a security officer may upload a fixed -package (i.e., do a source NMU). +When a security bug is detected, the security team may do an NMU. +Please refer to for more information.

During the release cycle (see ), NMUs which fix serious or higher severity bugs are encouraged and accepted. Even during this window, however, you should endeavor to reach the current maintainer of the package; they might be just about to upload a fix for the problem. As with any source NMU, the guidelines found in need to be followed. +id="nmu-guidelines"> need to be followed. Special exceptions are made +for .

-Bug fixes to unstable by non-maintainers are also acceptable, but only -as a last resort or with permission. The following protocol should -be respected to do an NMU : +Uploading bug fixes to unstable by non-maintainers should only be done +by following this protocol:

-Make sure that the package's bug is in the Debian Bug Tracking System -(BTS). If not, submit a bug. +Make sure that the package's bugs that the NMU is meant to address are all +filed in the Debian Bug Tracking System (BTS). +If they are not, submit them immediately. Wait a few days the response from the maintainer. If you don't get any response, you may want to help him by sending the patch that fixes @@ -1790,13 +1897,21 @@ Make sure your patch is as small and as non-disruptive as it can be. Upload your package to incoming in DELAYED/7-day (cf. ), send the final patch to the maintainer via -the BTS, and explain him that he has 7 days to react if he wants to cancel -the NMU. +the BTS, and explain to them that they have 7 days to react if they want +to cancel the NMU. Follow what happens, you're responsible for any bug that you introduced with your NMU. You should probably use (PTS) to stay informed of the state of the package after your NMU. - + +

+At times, the release manager or an organized group of developers can +announce a certain period of time in which the NMU rules are relaxed. +This usually involves shortening the period during which one is to wait +before uploading the fixes, and shortening the DELAYED period. It is +important to notice that even in these so-called "bug squashing party" +times, the NMU'er has to file bugs and contact the developer first, +and act later. How to do a source NMU

@@ -1844,11 +1959,7 @@ absolutely necessary for someone other than the usual maintainer to make a release based on a new upstream version then the person making the release should start with the debian-revision value `0.1'. The usual maintainer of a package should start their -debian-revision numbering at `1'. Note that if you do -this, you'll have to invoke dpkg-buildpackage with the --sa switch to force the build system to pick up the new -source package (normally it only looks for Debian revisions of '0' or -'1' — it's not yet clever enough to know about `0.1'). +debian-revision numbering at `1'. @@ -1922,7 +2033,7 @@ changes file. Acknowledging an NMU

-If one of your packages has been NMUed, you have to incorporate the +If one of your packages has been NMU'ed, you have to incorporate the changes in your copy of the sources. This is easy, you just have to apply the patch that has been sent to you. Once this is done, you have to close the bugs that have been tagged fixed by the NMU. You @@ -1931,10 +2042,10 @@ BTS or by adding the required closes: #nnnn in the changelog entry of your next upload.

In any case, you should not be upset by the NMU. An NMU is not a -personal attack against the maintainer. It is just the proof that -someone cares enough about the package and was willing to help -you in your work. You should be thankful to him and you may want to -ask him if he would be interested to help you on a more frequent +personal attack against the maintainer. It is a proof that +someone cares enough about the package and that they were willing to help +you in your work, so you should be thankful. You may also want to +ask them if they would be interested to help you on a more frequent basis as co-maintainer or backup maintainer (see ). @@ -1985,7 +2096,9 @@ environment. Within that chrooted environment, install the build-essential package and any package dependencies mentioned in Build-Depends and/or Build-Depends-Indep. Finally, try building your package -within that chrooted environment. +within that chrooted environment. These steps can be automated +by the use of the pbuilder program which is provided by +the package of the same name.

See the for instructions on setting build dependencies. @@ -2149,7 +2262,7 @@ conjunction with auto-builders, which are ``slave'' hosts which simply check out and attempt to auto-build packages which need to be ported. There is also an email interface to the system, which allows porters to ``check out'' a source package (usually one which -cannot yet be autobuilt) and work on it. +cannot yet be auto-built) and work on it.

buildd is not yet available as a package; however, most porting efforts are either using it currently or planning to use @@ -2182,12 +2295,47 @@ headers for cross-compiling in a way similar to enhanced to support cross-compiling. - Collaborative maintenance -

-&FIXME; Speak about Uploaders: field, about the intelligent use -of the PTS. Insist that it's a "must have" for base and standard -packages. - + + Collaborative maintenance +

+"Collaborative maintenance" is a term describing the sharing of Debian +package maintenance duties by several people. This collaboration is +almost always a good idea, since it generally results in higher quality and +faster bug fix turnaround time. It is strongly recommended that +packages in which a priority of Standard or which are part of +the base set have co-maintainers.

+

+Generally there is a primary maintainer and one or more +co-maintainers. The primary maintainer is the whose name is listed in +the Maintainer field of the debian/control file. +Co-maintainers are all the other maintainers.

+

+In its most basic form, the process of adding a new co-maintainer is +quite easy: + +

+Setup the co-maintainer with access to the sources you build the +package from. Generally this implies you are using a network-capable +version control system, such as CVS or +Subversion.

+ + +

+Add the co-maintainer's correct maintainer name and address to the +Uploaders field in the global part of the +debian/control file. + +Uploaders: John Buzz <jbuzz@debian.org>, Adam Rex <arex@debian.org> + +

+
+ +

+Using the PTS (), the co-maintainers +should subscribe themselves to the appropriate source package.

+
+

+ Moving, Removing, Renaming, Adopting, and Orphaning @@ -2274,10 +2422,21 @@ it. In this case, you need to follow a two-step process. First, set your debian/control file to replace and conflict with the obsolete name of the package (see the for details). Once you've uploaded -that package, and the package has moved into the archive, file a bug +the package and the package has moved into the archive, file a bug against ftp.debian.org asking to remove the package with the obsolete name. Do not forget to properly reassign the package's bugs at the same time. +

+At other times, you may make a mistake in constructing your package and +wish to replace it. The only way to do this is to increase the version +number and upload a new version. The old version will be expired in +the usual manner. Note that this applies to each part of your package, +including the sources: if you wish to replace the upstream source tarball +of your package, you will need to upload it with a different version. An +easy possibility is to replace foo_1.00.orig.tar.gz with +foo_1.00+0.orig.tar.gz. This restriction gives each file +on the ftp site a unique name, which helps to ensure consistency across the +mirror network. Orphaning a package

@@ -2326,8 +2485,8 @@ automatically once you upload a new version with an updated Maintainer: field, although it can take a few hours after the upload is done. If you do not expect to upload a new version for a while, you can use to get the bug reports. However, -make sure that the old maintainer is not embarassed by the fact that -he will continue to receive the bugs during that time. +make sure that the old maintainer has no problem with the fact that +they will continue to receive the bugs during that time. Handling package bugs @@ -2373,6 +2532,12 @@ contact the submitter and to record your mail within the bug log (that means you don't need to send a copy of the mail to 123@bugs.debian.org).

+Once you've dealt with a bug report (e.g. fixed it), mark it as +done (close it) by sending an explanation message to +123-done@bugs.debian.org. If you're fixing a bug by +changing and uploading the package, you can automate bug closing as +described in . +

You should never close bugs via the bug server close command sent to &email-bts-control;. If you do so, the original submitter will not receive any information about why the bug was @@ -2382,19 +2547,313 @@ closed.

As a package maintainer, you will often find bugs in other packages or have bugs reported against your packages which are actually bugs in -other packages. The document the technical operations of the BTS, such as -how to file, reassign, merge, and tag bugs. This section contains +other packages. The bug tracking system's features interesting to developers +are described in the . Operations such as reassigning, merging, and tagging +bug reports are described in the . This section contains some guidelines for managing your own bugs, based on the collective Debian developer experience.

Filing bugs for problems that you find in other packages is one of the "civic obligations" of maintainership, see -for details. +for details. However, handling the bugs in your own packages is +even more important. +

+Here's a list of steps that you may follow to handle a bug report: + + +Decide whether the report corresponds to a real bug or not. Sometimes +users are just calling a program in the wrong way because they haven't +read the documentation. If you diagnose this, just close the bug with +enough information to let the user correct his problem (give pointers +to the good documentation and so on). If the same report comes up +again and again you may ask yourself if the documentation is good +enough or if the program shouldn't detect its misuse in order to +give an informative error message. This is an issue that may need +to be brought to the upstream author. +

+If the bug submitter disagree with your decision to close the bug, +they may reopen it until you find an agreement on how to handle it. +If you don't find any, you may want to tag the bug wontfix +to let people know that the bug exists but that it won't be corrected. +If this situation is unacceptable, you (or the submitter) may want to +require a decision of the technical committee by reassigning the bug +to tech-ctte (you may use the clone command of +the BTS if you wish to keep it reported against your package). Before +doing so, please read the . + +If the bug is real but it's caused by another package, just reassign +the bug the right package. If you don't know which package it should +be reassigned to, you may either ask for help on &email-debian-devel; or +reassign it to debian-policy to let them decide which +package is in fault. +

+Sometimes you also have to adjust the severity of the bug so that it +matches our definition of the severity. That's because people tend to +inflate the severity of bugs to make sure their bugs are fixed quickly. +Some bugs may even be dropped to wishlist severity when the requested +change is just cosmetic. + +The bug submitter may have forgotten to provide some information, in that +case you have to ask him the information required. You may use the +moreinfo tag to mark the bug as such. Moreover if you can't +reproduce the bug, you tag it unreproducible. Anyone who +can reproduce the bug is then invited to provide more information +on how to reproduce it. After a few months, if this information has not +been sent by someone, the bug may be closed. + +If the bug is related to the packaging, you just fix it. If you are not +able to fix it yourself, then tag the bug as help. You can +also ask for help on &email-debian-devel; or &email-debian-qa;. If it's an +upstream problem, you have to forward it to the upstream author. +Forwarding a bug is not enough, you have to check at each release if +the bug has been fixed or not. If it has, you just close it, otherwise +you have to remind the author about it. If you have the required skills +you can prepare a patch that fixes the bug and that you send at the +same time to the author. Make sure to send the patch in the BTS and to +tag the bug as patch. + +If you have fixed a bug in your local copy, or if a fix has been +committed to the CVS repository, you may tag the bug as +pending to let people know that the bug is corrected and that +it will be closed with the next upload (add the closes: in +the changelog). This is particularly useful if you +are several developers working on the same package. + +Once a corrected package is available in the unstable +distribution, you can close the bug. This can be done automatically, +read . + + + Handling security-related bugs

-&FIXME;Talk about tags, forwarding bugs, or else break it into -different sections... +Due to their sensitive nature, security-related bugs must be handled +carefully. The Debian Security Team exists to coordinate this +activity, keeping track of outstanding security problems, helping +maintainers with security problems or fix them themselves, sending +security advisories, and maintaining security.debian.org. + + + + + What to do when you learn of a + security problem +

+When you become aware of a security-related bug in a Debian package, +whether or not you are the maintainer, collect pertinent information +about the problem, and promptly contact the security team at +&email-security-team;. +Useful information includes, for example: + + + What versions of the package are known to be affected by the + bug. Check each version that is present in a supported Debian + release, as well as testing and unstable. + + The nature of the fix, if any is available (patches are + especially helpful) + + Any fixed packages that you have prepared yourself (send only + the .diff.gz and .dsc files) + + Any information needed for the advisory (see ) + + + + Confidentiality +

+Unlike most other activities within Debian, information about security +issues must sometimes be kept private for a time. Whether this is the +case depends on the nature of the problem and corresponding fix, and +whether it is already a matter of public knowledge. +

+There are a few ways a developer can learn of a security problem: + + + he notices it on a public forum (mailing list, web site, etc.) + someone files a bug report + someone informs him via private email + + In the first two cases, the information is public and it is important + to have a fix as soon as possible. In the last case, however, it + might not be public information. In that case there are a few + possible options for dealing with the problem: + + + if it is a trivial problem (like insecure temporary files) + there is no need to keep the problem a secret and a fix should be + made and released. + + if the problem is severe (remotely exploitable, possibility to + gain root privileges) it is preferable to share the information with + other vendors and coordinate a release. The security team keeps + contacts with the various organizations and individuals and can take + care of that. + + +

+ In all cases if the person who reports the problem asks to not + disclose the information that should be respected, with the obvious + exception of informing the security team (make sure you tell the + security team that the information can not be disclosed). + +

+Please note that if secrecy is needed you can also not upload a fix to +unstable (or anywhere else), since the changelog and diff information +for unstable is public. + +

+There are two reasons for releasing information even though secrecy is +requested: the problem has been known for a while, or that the problem +or exploit has become public. + + Security Advisories +

+Security advisories are only issued for the current, released stable +distribution, not for testing or unstable. When released, advisories +are sent to the &email-debian-security-announce; +mailing list and posted on . +Security advisories are written and posted by the security +team. However they certainly do not mind if a maintainer can supply +some of the information for them, or write part of the +text. Information that should be in an advisory includes: + + + A description of the problem and its scope, including: + + The type of problem (privilege escalation, denial of + service, etc.) + How it can be exploited + Whether it is remotely or locally exploitable + How the problem was fixed + + Version numbers of affected packages + Version numbers of fixed packages + Information on where to obtain the updated packages + References to upstream advisories, identifiers, and any other + information useful in cross-referencing the vulnerability + + + + Preparing packages to address security issues +

+One way that you can assist the security team in their duties is to +provide fixed packages suitable for a security advisory for the stable +Debian release. +

+ When an update is made to the stable release, care must be taken to + avoid changing system behavior or introducing new bugs. In order to + do this, make as few changes as possible to fix the bug. Users and + administrators rely on the exact behavior of a release once it is + made, so any change that is made might break someone's system. + This is especially true of libraries: make sure you never change the + API or ABI, no matter how small the change. +

+This means that moving to a new upstream version is not a good +solution. Instead, the relevant changes should be back-ported to the +version present in the current stable Debian release. Generally, +upstream maintainers are willing to help if needed. If not, the +Debian security team may be able to help. +

+In some cases, it is not possible to back-port a security fix, for +example when large amounts of source code need to be modified or +rewritten. If this happens, it may be necessary to move to a new +upstream version. However, you must always coordinate that with the +security team beforehand. +

+Related to this is another important guideline: always test your +changes. If you have an exploit available, try it and see if it +indeed succeeds on the unpatched package and fails on the fixed +package. Test other, normal actions as well, as sometimes a security +fix can break seemingly unrelated features in subtle ways. +

+Review and test your changes as much as possible. Check the +differences from the previous version repeatedly +(interdiff and debdiff are useful tools for +this). + +When packaging the fix, keep the following points in mind: + + + Make sure you target the right distribution in your + debian/changelog. For stable this is stable-security and for + testing this is testing-security, and for the previous + stable release, this is oldstable-security. Do not target + distribution-proposed-updates! + + Make sure the version number is proper. It must be greater + than the current package, but less than package versions in later + distributions. If in doubt, test it with dpkg + --compare-versions. For testing, there must be + a higher version in unstable. If there is none yet (for example, + if testing and unstable have the same version) you must upload a + new version to unstable first. + + Do not make source-only uploads if your package has any + binary-all packages (do not use the -S option to + dpkg-buildpackage). The buildd infrastructure will + not build those. This point applies to normal package uploads as + well. + + If the upstream source has been uploaded to + security.debian.org before (by a previous security update), build + the upload without the upstream source (dpkg-buildpackage + -sd). Otherwise, build with full source + (dpkg-buildpackage -sa). + + Be sure to use the exact same *.orig.tar.gz as used in the + normal archive, otherwise it is not possible to move the security + fix into the main archives later. + + Be sure, when compiling a package, to compile on a clean + system which only has packages installed from the distribution you + are building for. If you do not have such a system yourself, you + can use a debian.org machine (see ) + or setup a chroot (see and + ). + + + Uploading the fixed package +

+DO NOT upload a package to the security upload queue without +prior authorization from the security team. If the package does not +exactly meet the team's requirements, it will cause many problems and +delays in dealing with the unwanted upload. +

+DO NOT upload your fix to proposed-updates without +coordinating with the security team. Packages from +security.debian.org will be copied into the proposed-updates directory +automatically. If a package with the same or a higher version number +is already installed into the archive, the security update will be +rejected by the archive system. That way, the stable distribution +will end up without a security update for this package instead. +

+Once you have created and tested the new package and it has been +approved by the security team, it needs to be uploaded so that it can +be installed in the archives. For security uploads, the place to +upload to is +ftp://security.debian.org/pub/SecurityUploadQueue/ . + +

+Once an upload to the security queue has been accepted, the package +will automatically be rebuilt for all architectures and stored for +verification by the security team. + +

+Uploads which are waiting for acceptance or verification are only +accessible by the security team. This is necessary since there might +be fixes for security problems that cannot be disclosed yet. + +

+If a member of the security team accepts a package, it will be +installed on security.debian.org as well as the proper +distribution-proposed-updates on ftp-master or in the non-US +archive. When bugs are closed by new uploads

@@ -2405,10 +2864,11 @@ been accepted into the Debian archive. Therefore, once you get notification that your updated package has been installed into the archive, you can and should close the bug in the BTS.

-If you are using a new version of dpkg-dev and you do -your changelog entry properly, the archive maintenance software will close -the bugs automatically. All you have to do is follow a certain syntax in -your debian/changelog file: +However, it's possible to avoid having to manually close bugs after the +upload -- just list the fixed bugs in your debian/changelog +file, following a certain syntax, and the archive maintenance software +will close the bugs for you. For example: + acme-cannon (3.1415) unstable; urgency=low @@ -2428,21 +2888,20 @@ The author prefers the closes: #XXX syntax, as one of the most concise and easiest to integrate with the text of the changelog.

-If you want to close bugs the old fashioned, manual way, it is usually -sufficient to mail the .changes file to +If you happen to mistype a bug number or forget one in the changelog file, +don't hesitate to undo any damage the error caused. To reopen wrongly closed +bugs, send an reopen XXX command in the bug tracking +system's control bot. To close any remaining bugs that were fixed by your +upload, email the .changes file to XXX-done@bugs.debian.org, where XXX is your bug number. +

+Bear in mind that it is not obligatory to close bugs using the changelog +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 XXX-done@bugs.debian.org. - Lintian reports -

-You should periodically get the new lintian from -`unstable' and check over all your packages. Alternatively you can -check for your maintainer email address at the . That report, which is updated -automatically, contains lintian reports against the -latest version of the distribution (usually from 'unstable') using the -latest lintian. @@ -2458,29 +2917,226 @@ faced during packaging. It also lists various advice collected on several mailing lists. By following them, you will make Debian's quality even better. + + Packaging tools and common cases + + Helper scripts +

+To help you in your packaging effort, you can use helper scripts. +The best scripts available are provided by debhelper. +With dh_make (see ), you can +generate in a few seconds a package that is mostly ready. However that +apparent simplicity is hiding many things done by the helper scripts. +You have to know what is done by them, that's why you are strongly +encouraged to read the corresponding manual pages, starting with +debhelper(1). That's required because you'll have to +understand what is going on to be able to use them wisely and to +fix bugs in a pretty way. +

+debhelper is very useful because it lets you follow the latest Debian policy +without doing many modifications since the changes that can be automated are +almost always automatically done by a debhelper script. Furthermore it +offers enough flexibility to be able to use it in conjunction with +some hand crafted shell invocations within the rules file. +

+You can however decide to not use any helper script and still write +excellent rules file. Many examples are available +at . + + + + Package with multiple patches +

+Big packages tend to have many upstream bugs that you want to fix within +the Debian package. If you just correct the bug in the source, all the +fixes are directly integrated in the .diff.gz file and you +can't easily differentiate the various patches that you applied. It gets +very messy when you have to update the package to a new upstream version +which integrates some of the fixes (but not all). +

+The good solution is to keep separate patches within the +debian/patches directory and to apply them on the fly at +build time. The package dbs provides an +implementation of such a system, you just have to build-depend on dbs to +be able to use its functionalities. The package +hello-dbs is a simple example that demonstrates how to +use dbs. +

+Additionally, dbs provides facilities to create the patches and to keep +track of what they are for. + + Multiple binary packages +

+A single source package will often build several binary packages, either +to provide several flavors of the same software (examples are the +vim-* packages) or to make several small packages instead of a big one +(it's interesting if the user doesn't need all the packages and can thus +save some disk space). +

+The second case can be easily managed by dh_install (from +debhelper) to move files from the build directory to +the package's temporary trees. +

+The first case is a bit more difficult since it involves multiple recompiles +of the same software but with different configure options. The +vim is an example of how to manage this with an +hand crafted rules file. + + + Handling debconf translations +

+Like porters, translators have a difficult task. They work on many +packages and must collaborate with many different +maintainers. Moreover, most of the time, they are not native English +speaker, so you may need to be particularly patient with them. +

+The goal of debconf was to make packages +configuration easier for maintainers and for users. Originally, +translation of debconf templates was handled with +debconf-mergetemplate from the +debconf-utils package. Since +debconf version 1.2.9, +debconf-mergetemplate has been deprecated and a new +system called po-debconf is strongly +encouraged. This new method is much easier both for the maintainer and +the translators, and you should upgrade your packages to use it. +Transition scripts are provided. +

+Using po-debconf, the translation is stored in +po files (drawing from gettext translation +techniques). Special template files contain the original messages and +mark which fields should be translated. When you change the original, +calling the debconf-updatepo script with no argument is +enough to mark the translation as needing attention from the +translators. Then, at build time, use the +dh_installdebconf program take care of all the needed +magic to add the template along with the up-to-date translations into +the binary packages. Refer to the manual page for details. + + + Specific packaging practices + + + + + Packages using + autoconf/automake +

+Some very good packaging practices for packages using +autoconf and/or automake have been +synthesized in &file-bpp-autotools;. You're strongly encouraged to +read this file and to follow the given recommendations. + + + Libraries +

+Libraries are always difficult to package for various reasons. The policy +imposes many constraints to ease their maintenance and to make sure +upgrades are as simple as possible when a new upstream version comes out. +A breakage in a library can result in dozens of dependent packages +breaking. +

+Good practices for library packaging have been grouped in +. + + Other specific packages +

+Several subsets of packages have special sub-policies and corresponding +packaging rules and practices: + + +Perl related packages have a , +some examples of packages following that policy are +libdbd-pg-perl (binary perl module) or +libmldbm-perl (arch independent perl module). + +Python related packages have their python policy: +&file-python-policy; (in the python package). + +Emacs related packages have the . + +Java related packages have their . + +Ocaml related packages have their Ocaml policy: &file-ocaml-policy; (in +the ocaml package). A good example is the camlzip +source package. + + + + Configuration management + + + Proper use of debconf +

+Debconf is a configuration management system which +can be used by all the various packaging scripts +(postinst mainly) to request feedback from the user +concerning how to configure the package. Direct user interactions must +now be avoided in favor of debconf +interaction. This will enable non-interactive installations in the +future. +

+Debconf is a great tool but it is often poorly used. Many common mistakes +are listed in the man page. +It is something that you must read if you decide to use debconf. + + + - Miscellaenous advice + Miscellaneous advice Writing useful descriptions

The description of the package (as defined by the corresponding field in the control file) is usually the first information -available to the user before he installs it. As such, it should +available to the user before they install it. As such, it should provide all the required information to let him decide whether to install the package.

For example, apart from the usual description that you adapt from the upstream README, you should include the URL of the -website if there's any. If the package is not yet considered stable +web site if there's any. If the package is not yet considered stable by the author, you may also want to warn the user that the package is not ready for production use.

+For consistency and for an aesthetic concern, you should capitalize the +first letter of the description. +

Last but not least, since the first user impression is based on -that description, you should be careful to avoid english +that description, you should be careful to avoid English mistakes. Ensure that you spell check it. -ispell has a special option (-g) for that : -ispell -d american -g debian/control +ispell has a special option (-g) for that: +ispell -d american -g debian/control. +If you want someone to proofread the description that you +intend to use you may ask on &email-debian-l10n-english;. @@ -2493,7 +3149,7 @@ ways, often really critical ways, to contribute to Debian beyond simply creating and maintaining packages.

As a volunteer organization, Debian relies on the discretion of its -members in choosing what they want to work on, and choosing what is +members in choosing what they want to work on and in choosing the most critical thing to spend their time on. @@ -2525,7 +3181,7 @@ out all the bugs you submitted, you just have to visit Reporting lots of bugs at once

Reporting a great number of bugs for the same problem on a great -number of different packages &mdash i.e., more than 10 &mdash is a deprecated +number of different packages — i.e., more than 10 — is a deprecated practice. Take all possible steps to avoid submitting bulk bugs at all. For instance, if checking for the problem can be automated, add a new check to lintian so that an error or warning @@ -2545,16 +3201,47 @@ list. Quality Assurance effort + + Daily work

Even though there is a dedicated group of people for Quality Assurance, QA duties are not reserved solely for them. You can participate in this effort by keeping your packages as bug-free as -possible, and as lintian-clean (see ) as +possible, and as lintian-clean (see ) as possible. If you do not find that possible, then you should consider orphaning some of your packages (see ). Alternatively, you may ask the help of other people in order to catch up the backlog of bugs that you have (you can ask -for help on &email-debian-qa; or &email-debian-devel;). +for help on &email-debian-qa; or &email-debian-devel;). At the same +time, you can look for co-maintainers (see ). + + Bug Squashing Parties +

+From time to time the QA group organizes bug squashing parties to get rid of +as many problems as possible. They are announced on &email-debian-devel-announce; +and the announce explains what area will be focused on during the party: +usually they focus on release critical bugs but it may happen that they +decide to help finish a major upgrade going on (like a new perl version +which requires recompilation of all the binary modules). +

+The rules for non-maintainer uploads differ during the parties because +the announce of the party is considered like a prior notice for NMU. If +you have packages that may be affected by the party (because they have +release critical bugs for example), you should send an update to each of +the corresponding bug to explain their current status and what you expect +from the party. If you don't want an NMU, or if you're only interested in a +patch, or if you will deal yourself with the bug, please explain that in +the BTS. +

+People participating in the party have special rules for NMU, they can +NMU without prior notice if they upload their NMU to +DELAYED/3-day at least. All other NMU rules applies as usually, they +should send the patch of the NMU in the BTS (in one of the open bugs +fixed by the NMU or in a new bug tagged fixed). They should +also respect the maintainer's wishes if he expressed some. +

+If someone doesn't feel confident with an NMU, he should just send a patch +to the BTS. It's far better than a broken NMU. Dealing with unreachable maintainers

@@ -2566,8 +3253,8 @@ If you do not get a reply after a few weeks you should collect all useful information about this maintainer. Start by logging into the and doing a full search to check whether the maintainer is on vacation -and when he was last seen. Collect any important package names -he maintains and any Release Critical bugs filled against them. +and when they were last seen. Collect any important package names +they maintain and any Release Critical bugs filed against them.

Send all this information to &email-debian-qa;, in order to let the QA people do whatever is needed. @@ -2587,7 +3274,7 @@ email the maintainer, whatever their individual email address (or addresses) may be. Replace <package> with the name of a source or a binary package.

-You may also be interested by contacting the persons who are +You may also be interested in contacting the persons who are subscribed to a given source package via . You can do so by using the <package-name>@&pts-host; email address. @@ -2615,7 +3302,7 @@ id="&url-sponsors;">. New maintainers usually have certain difficulties creating Debian packages — this is quite understandable. That is why the sponsor is there, to check the package and verify that it is good enough for inclusion in Debian. -(Note that if the sponsored package is new, the FTP admins will also have to +(Note that if the sponsored package is new, the ftpmasters will also have to inspect it before letting it in.)

Sponsoring merely by signing the upload or just recompiling is @@ -2635,12 +3322,12 @@ the package meets minimum Debian standards. That implies that you must build and test the package on your own system before uploading.

You can not simply upload a binary .deb from the sponsoree. In -theory, you should only ask only for the diff file, and the location of the +theory, you should only ask for the diff file and the location of the original source tarball, and then you should download the source and apply the diff yourself. In practice, you may want to use the source package -built by your sponsoree. In that case you have to check that he hasn't -altered the upstream files in the .orig.tar.gz file that he's -providing. +built by your sponsoree. In that case, you have to check that they haven't +altered the upstream files in the .orig.tar.gz file that +they're providing.

Do not be afraid to write the sponsoree back and point out changes that need to be made. It often takes several rounds of back-and-forth @@ -2649,7 +3336,7 @@ means being a mentor.

Once the package meets Debian standards, build the package with dpkg-buildpackage -us -uc and sign it -with debsign -m <your-email-addr> <changes-file> +with debsign -m"FULLNAME email-addr" changes-file before uploading it to the incoming directory.

The Maintainer field of the control file and the @@ -2713,9 +3400,20 @@ they are required for any Debian maintainer.

Lintian dissects Debian packages and reports bugs and policy violations. It contains automated checks for many aspects -of Debian policy as well as some checks for common errors. The use of -lintian has already been discussed in and . +of Debian policy as well as some checks for common errors. +

+You should periodically get the newest lintian from +`unstable' and check over all your packages. Notice that the -i +option provides detailed explanations of what each error or warning means, +what is its basis in Policy, and commonly how you can fix the problem. +

+Refer to for more information on how and when +to use Lintian. +

+You can also see a summary of all problems reported by Lintian on your +packages at . Those reports contain the latest +lintian output on the whole development distribution +("unstable"). @@ -2773,6 +3471,21 @@ favor of debhelper. However, it's not a bug to use debmake. + + dh-make +

+The +While the rules files generated by yada

@@ -2806,7 +3519,7 @@ changes into the repository.

These utilities provide an infrastructure to facilitate the use of CVS by Debian maintainers. This allows one to keep separate CVS branches -of a package for stable, unstable, and possibly +of a package for stable, unstable and possibly experimental distributions, along with the other benefits of a version control system. @@ -2855,16 +3568,29 @@ depends. Or, you can test how your package behaves when installed into a bare base system. + + pbuilder +

+pbuilder constructs a chrooted system, and builds +a package inside the chroot. It is very useful to check that +a package's build-dependencies are correct, and to be sure that +unnecessary and wrong build dependencies will not exist in the +resulting package. + + devscripts

devscripts is a package containing a few wrappers -and tools which you may find helpful for maintaining your Debian +and tools which are very helpful for maintaining your Debian packages. Example scripts include debchange and dch, which manipulate your debian/changelog file from the command-line, and debuild, which is a -wrapper around dpkg-buildpackage. - +wrapper around dpkg-buildpackage. The bts +utility is also very helpful to update the state of bug reports on the +command line, as is uscan to watch for new upstream +versions of your packages. Check the devscripts(1) manual +page for a complete list of available scripts. @@ -2892,7 +3618,7 @@ thing). alien dpkg-repack grep-dctrl - pbuilder --> +-->