X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=developers-reference.git;a=blobdiff_plain;f=developers-reference.sgml;h=774f6ad9e31ca6697bb2a61d171e0bd5bea68030;hp=6b16ef3956feb056b133ba2eb01952ffb8dce1f8;hb=3966918bb01656d3808d5f544744f52cce2c8dc9;hpb=587a595333692bef36a6a7abc485afc2dbbc6b82 diff --git a/developers-reference.sgml b/developers-reference.sgml index 6b16ef3..774f6ad 100644 --- a/developers-reference.sgml +++ b/developers-reference.sgml @@ -1,20 +1,20 @@ - %versiondata; + %versiondata; - %commondata; + %commondata; - + - - FIXME: "> + + FIXME: "> ]> @@ -32,7 +32,7 @@ copyright © 1998—2003 Adam Di Carlo -copyright © 2002 Raphaël Hertzog +copyright © 2002—2003 Raphaël Hertzog copyright © 1997, 1998 Christian Schwarz

@@ -336,8 +336,8 @@ know that you're unavailable. In order to inform the other developers, there's two things that you should do. First send a mail to &email-debian-private; with "[VAC] " prepended to the subject of your messageThis is so that the message can be easily -filtered by people who don't want to read vacation notices., -giving the period of time when you will be on vacation. You can also give +filtered by people who don't want to read vacation notices. +and state the period of time when you will be on vacation. You can also give some special instructions on what to do if a problem occurs.

The other thing to do is to mark yourself as "on vacation" in the @@ -350,14 +350,15 @@ Don't forget to remove the "on vacation" flag when you come back!

A big part of your job as Debian maintainer will be to stay in contact with the upstream developers. Debian users will sometimes report bugs -to the Bug Tracking System that are not specific to Debian. You -must forward these bug reports to the upstream developers so that -they can be fixed in a future release. It's not your job to fix -non-Debian specific bugs. However, if you are able to do so, you are -encouraged to contribute to upstream development of the package by -providing a fix for the bug. Debian users and developers will often -submit patches to fix upstream bugs, and you should evaluate and -forward these patches upstream. +that are not specific to Debian to our bug tracking system. You +have to forward these bug reports to the upstream developers so that +they can be fixed in a future upstream release. +

+While it's not your job to fix non-Debian specific bugs, you may freely +do so if you're able. When you make such fixes, be sure to pass them on +to the upstream maintainers as well. Debian users and developers will +sometimes submit patches to fix upstream bugs -- you should evaluate +and forward these patches upstream.

If you need to modify the upstream sources in order to build a policy compliant package, then you should propose a nice fix to the upstream @@ -471,8 +472,10 @@ it to see the responses. Cross-posting (sending the same message to multiple lists) is discouraged. As ever on the net, please trim down the quoting of articles you're replying to. In general, please adhere to the usual conventions for -posting messages. Please read the for more information. +posting messages. +

+Please read the +for more information. Special lists

@@ -849,7 +852,7 @@ with checksums (md5sums) and some additional info about the package (maintainer, version, etc.). - Distribution directories + Distributions

The directory system described in the previous chapter is itself contained within distribution directories. Each @@ -925,7 +928,63 @@ Note that development under unstable continues during the freeze period, since the unstable distribution remains in place in parallel with testing. - Experimental + + More information about the testing distribution +

+The scripts that update the testing distribution are run each +day after the installation of the updated packages. They generate the +Packages files for the testing distribution, but +they do so in an intelligent manner trying to avoid any inconsistency +and trying to use only non-buggy packages. +

+The inclusion of a package from unstable is conditional on +the following: + + +The package must have been available in unstable for several days; +the precise number depends on the upload's urgency field. It +is 10 days for low urgency, 5 days for medium urgency and 2 days for high +urgency. Those delays may be doubled during a freeze; + +It must have less release-critical bugs than the version available +in testing; + +It must be available on all architectures on which it has been +previously built. may be of interest to +check that information; + +It must not break any dependency of a package that is already available +in testing; + +The packages on which it depends must either be available in testing +or they must be accepted into testing at the same time (and they will +if they respect themselves all the criteria); + +

+To find out whether a package is progressing into testing or not, see the +testing script output on the , or use the program grep-excuses +which is in the devscripts package. This utility can +easily be used in a to keep one +informed of the progression of their packages into testing. +

+The update_excuses file does not always give the precise reason +why the package is refused, one may have to find it on their own by looking +what would break with the inclusion of the package. The gives some more information +about the usual problems which may be causing such troubles. +

+Sometimes, some packages never enter testing because the set of +inter-relationship is too complicated and can not be sorted out +by the scripts. In that case, the release manager must be +contacted, and he will force the inclusion of the packages. +

+In general, please refer to the for more information. It also includes +answers to some of the frequently asked questions. + + + Experimental

The experimental distribution is a special distribution. It is not a full distribution in the same sense as `stable' and @@ -938,6 +997,13 @@ packages from experimental are expected to have been duly warned. In short, all bets are off for the experimental distribution.

+These are the lines for +experimental: + +deb http://ftp.xy.debian.org/debian/ ../project/experimental main +deb-src http://ftp.xy.debian.org/debian/ ../project/experimental main + +

If there is a chance that the software could do grave damage to a system, it is likely to be better to put it into experimental. For instance, an experimental compressed file system should probably go @@ -1114,60 +1180,6 @@ easily upload a package in one of the delayed directories: DELAY=5 dupload --to delayed <changes-file> - - The "testing" distribution -

-The scripts that update the testing distribution are run each day -after the installation of the -updated packages. They generate the Packages files for -the testing distribution, but they do so in an intelligent manner -trying to avoid any inconsistency and trying to use only -non-buggy packages. -

The inclusion of a package from unstable is conditional on the following: - - -The package must have been available in unstable for several days; -the precise number depends on the upload's urgency field. It -is 10 days for low urgency, 5 days for medium urgency and 2 days for high -urgency. Those delays may be doubled during a freeze; - -It must have less release-critical bugs than the version available -in testing; - -It must be available on all architectures on which it has been -previously built. may be of interest to -check that information; - -It must not break any dependency of a package that is already available -in testing; - -The packages on which it depends must either be available in testing -or they must be accepted into testing at the same time (and they will -if they respect themselves all the criteria); - -

-To find out whether a package is progressing into testing or not, see the -testing script output on the , or use the program grep-excuses -which is in the devscripts package. This utility can -easily be used in a to keep one -informed of the progression of their packages into testing. -

-The update_excuses file does not always give the precise reason -why the package is refused, one may have to find it on their own by looking -what would break with the inclusion of the package. The gives some more information -about the usual problems which may be causing such troubles. -

-Sometimes, some packages never enter testing because the set of -inter-relationship is too complicated and can not be sorted out -by the scripts. In that case, the release manager must be -contacted, and he will force the inclusion of the packages. -

-In general, please refer to the for more information. It also includes -answers to some of the frequently asked questions. - Package information

@@ -1240,7 +1252,11 @@ override disparity for the section or priority field). default Any non-automatic mail sent to the PTS by people who wanted to -contact the subscribers of the package. +contact the subscribers of the package. This can be done by sending mail +to srcpackage@&pts-host;. In order to prevent spam, +mails sent to these addresses must contain the header "X-PTS-Approved" +with a non-empty string. + summary @@ -1365,6 +1381,86 @@ notifications, you just have to make sure it sends a copy of those mails to srcpackage_cvs@&pts-host;. Only people who accepts the cvs keyword will receive the notifications. + The PTS web interface +

+The PTS has been extended with a web interface that puts together +many information about each source package. It features many useful +links (BTS, QA stats, contact information, DDTP translation status, +buildd logs) and gathers many more information from various places +(30 latest changelog entries, testing status, ...). It's a very useful +tool if you want to know what's going on with a specific source +package. Furthermore there's a form that let you easily subscribe to +the mail service offered by the PTS. +

+You can jump directly to the web page concerning a specific source package +with an url like http://&pts-host;/srcpackage. Otherwise +you can go through the . +

+This web interface has been designed like a portal for the development of +packages: you can add custom content on the pages of your packages. You can +add "static information" (news item that are meant to stay available +indefinitely) and news items in the "latest news" section. +

+Static news can be used to indicate: + +the availability of a project hosted on alioth.debian.org for co-maintaining the package +a link to the upstream website +a link to the upstream bugtracker +the existence of an IRC channel dedicated to the software +any other available resource that could be useful in the maintenance of the package + +Usual news item may be used to announce that: + +beta packages are available for test +final packages are expected for next week +the packaging is about to be redone from scratch +backports are available +the maintainer is on vacation (if he wishes to publish this information) +a NMU is being worked on +something important will affect the package + +

+Both kind of news are generated in a similar manner: you just have to send a mail +either to pts-static-news@qa.debian.org or to +pts-news@qa.debian.org. The mail should indicate which package is +concerned by the news by giving the name of the source package in a +X-PTS-Package mail header or in a Package pseudo-header (like the +BTS reports). If an URL is available in the X-PTS-Url mail header or in +the Url pseudo-header, then the result is a link to that URL instead +of a complete news item. +

+Some examples of valid mails used to generate news item in the PTS are following. The first one +adds a link to the cvsweb interface of debian-cd in the "Static information" section. + +From: Raphael Hertzog <hertzog@debian.org> +To: pts-static-news@qa.debian.org +Subject: Browse debian-cd CVS repository with cvsweb + +Package: debian-cd +Url: http://cvs.debian.org/debian-cd/ + +The second one is an announce sent to a mailing list which is also sent +to the PTS so that it is published on the PTS web page of the package. Note the +use of the BCC field to avoid answers sent to the PTS by mistake ... + +From: Raphael Hertzog <hertzog@debian.org> +To: debian-gtk-gnome@lists.debian.org +Bcc: pts-news@qa.debian.org +Subject: Galeon 2.0 backported for woody +X-PTS-Package: galeon + +Hello gnomers ! + +I'm glad to announce that galeon has been backported for woody. You'll find +everything here: +... + +

+Think twice before adding a news to the PTS because you won't be able to +remove it later and you wan't be able to edit it either. The only thing that you +can do is send a second news that will deprecate the information contained in +the first news. + Developer's packages overview

A QA (quality assurance) web portal is available at experimental -distribution with anything else. +distribution with anything else (see ). - Uploads to stable + + Special case: uploads to the stable distribution

Uploading to stable means that the package will be placed into the stable-proposed-updates directory of the Debian archive for further @@ -1578,17 +1675,20 @@ testing before it is actually included in stable. Extra care should be taken when uploading to stable. Basically, a package should only be uploaded to stable if one of the following happens: - a security problem (e.g. a Debian security advisory) a truly critical functionality problem the package becomes uninstallable a released architecture lacks the package +

+In the past, uploads to stable were used to address security +problems as well. However, this practice is deprecated, as uploads +used for Debian security advisories are automatically copied to the +appropriate proposed-updates archive when the advisory is +released. See for detailed information on +handling security problems.

It is discouraged to change anything else in the package that isn't -important, because even trivial fixes can cause bugs later on. Uploading -new upstream versions to fix security problems is deprecated; applying the -specific patch from the new upstream version to the old one ("back-porting" -the patch) is the right thing to do in most cases. +important, because even trivial fixes can cause bugs later on.

Packages uploaded to stable need to be compiled on systems running stable, so that their dependencies are limited to the libraries @@ -1605,7 +1705,8 @@ verbose, if necessary) in your changelog entries for uploads to stable, because otherwise the package won't be considered for inclusion. - Uploads to testing-proposed-updates + + Special case: uploads 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 @@ -1635,6 +1736,10 @@ to transfer the files, place them into &us-upload-dir;; if you use anonymous FTP to upload, place them into &upload-queue;.

+If you want to use feature described in , +you'll have to upload to ftp-master. It is the only upload +point that supported delayed incoming. +

Please note that you should transfer the changes file last. Otherwise, your upload may be rejected because the archive maintenance software will parse the changes file and see that not @@ -1830,13 +1935,23 @@ according to their licensing, e.g. main, contrib and non-free. This is described in another section, . - Handling package bugs + Handling bugs +

+Every developer has to be able to work with the Debian . This includes knowing how to file bug +reports properly (see ), how to update them and +reorder them, and how to process and close them. +

+The bug tracking system's features interesting to developers are described +in the . +This includes closing bugs, sending followup messages, assigning severities, +tags, marking bugs as forwarded and other issues.

-Often as a package maintainer, you find bugs in other packages or else -have bugs reported to your packages which need to be reassigned. The - can tell you how -to do this. Some information on filing bugs can be found in . +Operations such as reassigning bugs to other packages, merging separate +bug reports about the same issue, or reopening bugs when they are +prematurely closed, are handled using the so-called control mail server. +All of the commands available in this server are described in the +. Monitoring bugs

@@ -1864,7 +1979,8 @@ maintainer address. Responding to bugs

-Make sure that any discussion you have about bugs are sent both to +When responding to bugs, make sure that any discussion you have about +bugs are sent both to the original submitter of the bug, and the bug itself (e.g., 123@&bugs-host;). If you're writing a new mail and you don't remember the submitter email address, you can @@ -1873,6 +1989,9 @@ 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-host;).

+If you get a bug which mentions "FTBFS", that means "Fails to build +from source". Porters frequently use this acronym. +

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-host;. If you're fixing a bug by @@ -2031,14 +2150,12 @@ 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: +about the problem, and promptly contact the security team at +&email-security-team; as soon as possible. Useful information +includes, for example: What versions of the package are known to be affected by the @@ -2049,7 +2166,11 @@ Useful information includes, for example: especially helpful) Any fixed packages that you have prepared yourself (send only - the .diff.gz and .dsc files) + the .diff.gz and .dsc files and read first) + + Any assistance you can provide to help with testing (exploits, + regression testing, etc.) Any information needed for the advisory (see ) @@ -2059,9 +2180,12 @@ Useful information includes, for example: Confidentiality

Unlike most other activities within Debian, information about security -issues must sometimes be kept private for a time. Whether this is the +issues must sometimes be kept private for a time. +This allows software distributors to coordinate their disclosure in +order to minimize their users' exposure. 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: @@ -2077,27 +2201,28 @@ There are a few ways a developer can learn of a security problem: 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 security exposure is minor, there is sometimes 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 + If the problem is severe, 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). + In all cases if the person who reports the problem asks that it not + be disclosed, such requests should be honored, with the obvious + exception of informing the security team in order that a fix may be + produced for a stable release of Debian. When sending confidential + information to the security team, be sure to mention this fact.

-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. +Please note that if secrecy is needed you may not upload a fix to +unstable (or anywhere else, such as a public CVS repository). It is +not sufficient to obfuscate the details of the change, as the code +itself is public, and can (and will) be examined by the general public.

There are two reasons for releasing information even though secrecy is @@ -2107,27 +2232,34 @@ 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 +distribution, and 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: +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.) + What privileges may be gained, and by whom (if any) How it can be exploited Whether it is remotely or locally exploitable How the problem was fixed + + This information allows users to assess the threat to their systems. + Version numbers of affected packages Version numbers of fixed packages Information on where to obtain the updated packages + (usually from the Debian security archive) References to upstream advisories, identifiers, and any other information useful in cross-referencing the vulnerability @@ -2137,16 +2269,17 @@ text. Information that should be in an advisory includes: 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 +provide them with 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. + 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 @@ -2157,8 +2290,8 @@ 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. +upstream version. However, this is only done in extreme situations, +and 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 @@ -2181,6 +2314,11 @@ When packaging the fix, keep the following points in mind: stable release, this is oldstable-security. Do not target distribution-proposed-updates! + Make descriptive, meaningful changelog entries. Others will + rely on them to determine whether a particular bug was fixed. + Whenever possible, include an external reference, preferably a CVE + identifier, so that it can be cross-referenced. + 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 @@ -2205,7 +2343,7 @@ When packaging the fix, keep the following points in mind: 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 + Be sure to build the package 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 ) @@ -2215,7 +2353,8 @@ When packaging the fix, keep the following points in mind: Uploading the fixed package

-DO NOT upload a package to the security upload queue without +DO NOT upload a package to the security upload queue +(oldstable-security, stable-security, etc.) 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. @@ -2250,7 +2389,6 @@ installed on security.debian.org as well as the proper distribution-proposed-updates on ftp-master or in the non-US archive. - Moving, removing, renaming, adopting, and orphaning packages @@ -2498,7 +2636,7 @@ Make sure your debian/rules contains separate ``binary-arch'' and ``binary-indep'' targets, as the Debian Policy Manual requires. Make sure that both targets work independently, that is, that you can call the target without having called the other before. To test this, -try to run dpkg-buildpackage -b. +try to run dpkg-buildpackage -B. @@ -3067,22 +3205,22 @@ documentation and examples (in /usr/share/doc/dpatch). 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 +either to provide several flavors of the same software (e.g., +the vim source package) or to make several small packages instead of a big one (e.g., if the user can install only the subset she needs, and thus save some disk space).

The second case can be easily managed in debian/rules. You just need to move the appropriate files from the build directory into the package's temporary trees. You can do this using -install (vanilla approach) or dh_install -(from debhelper). Be sure to check the different +install or dh_install +from debhelper. Be sure to check the different permutations of the various packages, ensuring that you have the inter-package dependencies set right in debian/control.

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 +recompiles of the same software but with different configuration +options. The vim source package is an example of how to manage this using an hand-crafted debian/rules file. @@ -3434,7 +3592,7 @@ 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. +are listed in the man page. It is something that you must read if you decide to use debconf. @@ -3644,21 +3802,39 @@ members in choosing what they want to work on and in choosing the most critical thing to spend their time on. - Bug reporting + Bug reporting

We encourage you to file bugs as you find them in Debian packages. In fact, Debian developers are often the first line testers. Finding and -reporting bugs in other developer's packages improves the quality of +reporting bugs in other developers' packages improves the quality of Debian.

+Read the in the Debian . +

Try to submit the bug from a normal user account at which you are -likely to receive mail. Do not submit bugs as root. +likely to receive mail, so that people can reach you if they need +further information about the bug. Do not submit bugs as root. +

+You can use a tool like to +submit bugs. It can automate and generally ease the process. +

+Make sure the bug is not already filed against a package. +Each package has a bug list easily reachable at +http://&bugs-host;/packagename +Utilities like can also +provide you with this information (and reportbug +will usually invoke querybts before sending, too). +

+Try to direct your bugs to the proper location. When for example +your bug is about a package that overwrites files from another package, +check the bug lists for both of those packages in order to +avoid filing duplicate bug reports.

-Make sure the bug is not already filed against a package. Try to do a -good job reporting a bug and redirecting it to the proper location. For extra credit, you can go through other packages, merging bugs -which are reported more than once, or setting bug severities to -`fixed' when they have already been fixed. Note that when you are +which are reported more than once, or tagging bugs `fixed' +when they have already been fixed. Note that when you are neither the bug submitter nor the package maintainer, you should not actually close the bug (unless you secure permission from the maintainer). @@ -3667,7 +3843,7 @@ From time to time you may want to check what has been going on with the bug reports that you submitted. Take this opportunity to close those that you can't reproduce anymore. To find out all the bugs you submitted, you just have to visit -http://&bugs-host;/from:<your-email-addr>. +http://&bugs-host;/from:<your-email-addr>. Reporting lots of bugs at once

@@ -3879,9 +4055,8 @@ that need to be made. It often takes several rounds of back-and-forth email before the package is in acceptable shape. Being a sponsor means being a mentor.

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

The Maintainer field of the control file and the @@ -4375,6 +4550,9 @@ it.