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=a89556f668a8265d8dba7b26fd8c29558cf54f62;hb=3966918bb01656d3808d5f544744f52cce2c8dc9;hpb=ff99d41c88ce000f57ddc3c52bd6d1a651355e0e diff --git a/developers-reference.sgml b/developers-reference.sgml index a89556f..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

@@ -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 @@ -851,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 @@ -927,6 +928,62 @@ Note that development under unstable continues during the freeze period, since the unstable distribution remains in place in parallel with testing. + + 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. @@ -1123,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

@@ -1392,7 +1395,71 @@ 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

@@ -1598,7 +1665,8 @@ 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 (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 @@ -1607,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 @@ -1634,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 @@ -1664,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 @@ -1903,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 @@ -1912,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 @@ -2070,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 @@ -2088,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 ) @@ -2098,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: @@ -2116,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 @@ -2146,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 @@ -2176,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 @@ -2196,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 @@ -2220,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 @@ -2244,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 ) @@ -2254,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. @@ -2289,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 @@ -2537,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. @@ -3493,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. @@ -3956,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