This chapter contains information related to creating, uploading, maintaining, and porting packages.
If you want to create a new package for the Debian distribution, you should
first check the Work-Needing
and Prospective Packages (WNPP)
list. Checking the WNPP list
ensures that no one is already working on packaging that software, and that
effort is not duplicated. Read the WNPP web pages
for more
information.
Assuming no one else is already working on your prospective package, you must
then submit a bug report (Bug
reporting, Section 7.1) against the pseudo-package wnpp
describing your plan to create a new package, including, but not limiting
yourself to, a description of the package, the license of the prospective
package and the current URL where it can be downloaded from.
You should set the subject of the bug to ``ITP: foo -- short
description'', substituting the name of the new package for
foo. The severity of the bug report must be set to
wishlist. If you feel it's necessary, send a copy to debian-devel@lists.debian.org
by putting the address in the X-Debbugs-CC: header of the message
(no, don't use CC:, because that way the message's subject won't
indicate the bug number).
Please include a Closes: bug#nnnnn entry on the changelog of the new package in order for the bug report to be automatically closed once the new package is installed on the archive (When bugs are closed by new uploads, Section 5.8.4).
There are a number of reasons why we ask maintainers to announce their intentions:
Changes that you make to the package need to be recorded in the
debian/changelog
. These changes should provide a concise
description of what was changed, why (if it's in doubt), and note if any bugs
were closed. They also record when the package was completed. This file will
be installed in
/usr/share/doc/package/changelog.Debian.gz
, or
/usr/share/doc/package/changelog.gz
for native
packages.
The debian/changelog
file conforms to a certain structure, with a
number of different fields. One field of note, the distribution, is
described in Picking a distribution, Section 5.5.
More information about the structure of this file can be found in the Debian
Policy section titled "debian/changelog
".
Changelog entries can be used to automatically close Debian bugs when the package is installed into the archive. See When bugs are closed by new uploads, Section 5.8.4.
It is conventional that the changelog entry notating of a package that contains a new upstream version of the software looks like this:
* new upstream version
There are tools to help you create entries and finalize the
changelog
for release — see devscripts
, Section A.6.1
and dpkg-dev-el
, Section
A.6.6.
See also Best
practices for debian/changelog
, Section 6.3.
Before you upload your package, you should do basic testing on it. At a minimum, you should try the following activities (you'll need to have an older version of the same Debian package around):
lintian
over the package. You can run lintian
as
follows: lintian -v package-version.changes. This will
check the source package as well as the binary package. If you don't
understand the output that lintian
generates, try adding the
-i switch, which will cause lintian
to output a very
verbose description of the problem.
Normally, a package should not be uploaded if it causes lintian to emit errors (they will start with E).
For more information on lintian
, see lintian
, Section A.2.1.
debdiff
,
Section A.2.3 to analyze changes from an older version, if one exists.
postrm
and prerm
scripts.
There are two types of Debian source packages:
For the native packages, the source package includes a Debian source control file (.dsc) and the source tarball (.tar.gz). A source package of a non-native package includes a Debian source control file, the original source tarball (.orig.tar.gz) and the Debian patches (.diff.gz).
Whether a package is native or not is determined when it is built by
dpkg-buildpackage(1)
. The rest of this section relates only to
non-native packages.
The first time a version is uploaded which corresponds to a particular upstream
version, the original source tar file should be uploaded and included in the
.changes
file. Subsequently, this very same tar file should be
used to build the new diffs and .dsc
files, and will not need to
be re-uploaded.
By default, dpkg-genchanges
and dpkg-buildpackage
will include the original source tar file if and only if the Debian revision
part of the source version number is 0 or 1, indicating a new upstream version.
This behavior may be modified by using -sa to always include it or
-sd to always leave it out.
If no original source is included in the upload, the original source tar-file
used by dpkg-source
when constructing the .dsc
file
and diff to be uploaded must be byte-for-byte identical with the one
already in the archive.
Each upload needs to specify which distribution the package is intended for.
The package build process extracts this information from the first line of the
debian/changelog
file and places it in the
Distribution field of the .changes file.
There are several possible values for this field: `stable', `unstable', `testing-proposed-updates' and `experimental'. Normally, packages are uploaded into unstable.
Actually, there are two other possible distributions: `stable-security' and `testing-security', but read Handling security-related bugs, Section 5.8.5 for more information on those.
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 (see Experimental, Section 4.6.4.3).
Uploading to stable means that the package will be placed into the
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 package should only be uploaded to stable if one of the following happens:
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 Handling security-related bugs, Section 5.8.5 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.
Packages uploaded to stable need to be compiled on systems running stable, so that their dependencies are limited to the libraries (and other packages) available in stable; for example, a package uploaded to stable that depends on a library package that only exists in unstable will be rejected. Making changes to dependencies of other 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 debian-release@lists.debian.org
)
will 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.
The testing distribution is fed with packages from unstable according to the rules explained in More information about the testing distribution, Section 4.6.4.2. 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 debian-devel-announce@lists.debian.org
.
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.
To upload a package, you need a personal account on
ftp-master.debian.org
, which you should have as an official
maintainer. If you use scp
or rsync
to transfer the
files, place them into /org/ftp.debian.org/incoming/
; if you use
anonymous FTP to upload, place them into /pub/UploadQueue/
.
If you want to use feature described in Delayed incoming, Section 4.8.1, 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 all files have been uploaded. If you don't want
to bother with transferring the changes file last, you can simply copy your
files to a temporary directory on ftp-master and then move them to
/org/ftp.debian.org/incoming/
.
Note: Do not upload to ftp-master cryptographic packages
which belong to contrib or non-free. Uploads of such
software should go to non-us (see Uploading to non-US, Section 5.6.2).
Furthermore packages containing code that is patent-restricted by the United
States government can not be uploaded to ftp-master; depending on
the case they may still be uploaded to non-US/non-free
(it's in
non-free because of distribution issues and not because of the license of the
software). If you can't upload it to ftp-master, then neither can
you upload it to the overseas upload queues on chiark or
erlangen. If you are not sure whether U.S. patent controls or
cryptographic controls apply to your package, post a message to debian-devel@lists.debian.org
and ask.
You may also find the Debian packages dupload
, Section A.5.1 or dput
, Section A.5.2 useful when
uploading packages. These handy programs help automate the process of
uploading packages into Debian.
After uploading your package, you can check how the archive 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.
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
/org/non-us.debian.org/incoming/
(again, both dupload
, Section A.5.1 and
dput
, Section A.5.2 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 /pub/UploadQueue/
.
You can check your upload the same way it's done on ftp-master, with:
dinstall -n foo.changes
Note that U.S. residents or citizens are subject to restrictions on export of cryptographic software. As of this writing, U.S. citizens are allowed to export some cryptographic software, subject to notification rules by the U.S. Department of Commerce. However, this restriction has been waived for software which is already available outside the U.S. Therefore, any cryptographic software which belongs in the main section of the Debian archive and does not depend on any package outside of main (e.g., does not depend on anything in non-US/main) can be uploaded to ftp-master or its queues, described above.
Debian policy does not prevent upload to non-US by U.S. residents or citizens, but care should be taken in doing so. It is recommended that developers take all necessary steps to ensure that they are not breaking current US law by doing an upload to non-US, including consulting a lawyer.
For packages in non-US/main, non-US/contrib, developers
should at least follow the procedure
outlined by the US Government
. Maintainers of
non-US/non-free packages should further consult the rules on notification of
export
of non-free software.
This section is for information only and does not constitute legal advice. Again, it is strongly recommended that U.S. citizens and residents consult a lawyer before doing uploads to non-US.
If you have a slow network connection to ftp-master, there are
alternatives. One is to upload files to Incoming
via a upload
queue in Europe on chiark. For details connect to ftp://ftp.chiark.greenend.org.uk/pub/debian/private/project/README.how-to-upload
.
Note: Do not upload packages containing software that is export-controlled by the United States government to the queue on chiark. Since this upload queue goes to ftp-master, the prescription found in Uploading to ftp-master, Section 5.6.1 applies here as well.
The program dupload
comes with support for uploading to
chiark; please refer to the documentation that comes with the
program for details.
Another upload queue is available in Germany: just upload the files via
anonymous FTP to ftp://ftp.uni-erlangen.de/pub/Linux/debian/UploadQueue/
.
The upload must be a complete Debian upload, as you would put it into
ftp-master's Incoming
, i.e., a .changes
files along with the other files mentioned in the .changes
. The
queue daemon also checks that the .changes
is correctly signed
with GnuPG or OpenPGP by a Debian developer, so that no bogus files can find
their way to ftp-master via this queue. Please also make sure
that the Maintainer field in the .changes
contains
your e-mail address. The address found there is used for all replies,
just as on ftp-master.
There's no need to move your files into a second directory after the upload, as on chiark. And, in any case, you should get a mail reply from the queue daemon explaining what happened to your upload. Hopefully it should have been moved to ftp-master, but in case of errors you're notified, too.
Note: Do not upload packages containing software that is export-controlled by the United States government to the queue on erlangen. Since this upload queue goes to ftp-master, the prescription found in Uploading to ftp-master, Section 5.6.1 applies here as well.
The program dupload
comes with support for uploading to
erlangen; please refer to the documentation that comes with the
program for details.
Another upload queue is available which is based in the US, and is a good
backup when there are problems reaching ftp-master. You can
upload files, just as in erlangen, to ftp://samosa.debian.org/pub/UploadQueue/
.
An upload queue is available in Japan: just upload the files via anonymous FTP
to ftp://master.debian.or.jp/pub/Incoming/upload/
.
The Debian archive maintainers are responsible for handling package uploads.
For the most part, uploads are automatically handled on a daily basis by the
archive maintenance tools, katie
. Specifically, updates to
existing packages to the `unstable' distribution are handled automatically. In
other cases, notably new packages, placing the uploaded package into the
distribution is handled manually. When uploads are handled manually, the
change to the archive may take up to a month to occur. Please be patient.
In any case, you will receive an email notification indicating that the package has been added to the archive, which also indicates which bugs will be closed by the upload. Please examine this notification carefully, checking if any bugs you meant to close didn't get triggered.
The installation notification also includes information on what section the package was inserted into. If there is a disparity, you will receive a separate email notifying you of that. Read on below.
Note also that if you upload via queues, the queue daemon software will also send you a notification by email.
The debian/control
file's Section and
Priority fields do not actually specify where the file will be
placed in the archive, nor its priority. In order to retain the overall
integrity of the archive, it is the archive maintainers who have control over
these fields. The values in the debian/control
file are actually
just hints.
The archive maintainers keep track of the canonical sections and priorities for
packages in the override file. If there is a disparity between the
override file and the package's fields as indicated in
debian/control
, then you will receive an email noting the
divergence when the package is installed into the archive. You can either
correct your debian/control
file for your next upload, or else you
may wish to make a change in the override file.
To alter the actual section that a package is put in, you need to first make
sure that the debian/control
in your package is accurate. Next,
send an email override-change@debian.org
or submit a bug against ftp.debian.org
requesting that the section
or priority for your package be changed from the old section or priority to the
new one. Be sure to explain your reasoning.
For more information about override files, see
dpkg-scanpackages(8)
and http://www.debian.org/Bugs/Developer#maintincorrect
.
Note also that the term "section" is used for the separation of packages according to their licensing, e.g. main, contrib and non-free. This is described in another section, The Debian archive, Section 4.6.
Every developer has to be able to work with the Debian bug tracking system
. This
includes knowing how to file bug reports properly (see Bug reporting, Section 7.1),
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 BTS documentation for
developers
. This includes closing bugs, sending followup messages,
assigning severities, tags, marking bugs as forwarded and other issues.
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 BTS control server
documentation
.
If you want to be a good maintainer, you should periodically check the Debian bug tracking system (BTS)
for your packages. The BTS contains all the open bugs against your packages.
You can check them by browsing this page:
http://bugs.debian.org/yourlogin@debian.org.
Maintainers interact with the BTS via email addresses at
bugs.debian.org. Documentation on available commands can be found
at http://www.debian.org/Bugs/
, or,
if you have installed the doc-debian
package, you can look at the
local files /usr/share/doc/debian/bug-*
.
Some find it useful to get periodic reports on open bugs. You can add a cron job such as the following if you want to get a weekly email outlining all the open bugs against your packages:
# ask for weekly reports of bugs in my packages 0 17 * * fri echo "index maint address" | mail request@bugs.debian.org
Replace address with your official Debian maintainer address.
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.debian.org
). If
you're writing a new mail and you don't remember the submitter email address,
you can use the 123-submitter@bugs.debian.org
email to 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
).
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.debian.org
. If
you're fixing a bug by changing and uploading the package, you can automate bug
closing as described in When bugs are closed by new
uploads, Section 5.8.4.
You should never close bugs via the bug server close
command sent to control@bugs.debian.org
. If
you do so, the original submitter will not receive any information about why
the bug was 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 bug tracking system's features interesting to developers are described in
the BTS documentation for
Debian developers
. Operations such as reassigning, merging, and
tagging bug reports are described in the BTS control server
documentation
. 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 Bug reporting, Section 7.1 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:
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 recommended procedure
.
debian-devel@lists.debian.org
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.
debian-devel@lists.debian.org
or debian-qa@lists.debian.org
.
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.
changelog
). This is
particularly useful if you are several developers working on the same package.
As bugs and problems are fixed your packages, it is your responsibility as the package maintainer to close the bug. However, you should not close the bug until the package which fixes the bug has 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.
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 * Frobbed with options (closes: Bug#98339) * Added safety to prevent operator dismemberment, closes: bug#98765, bug#98713, #98714. * Added man page. Closes: #98725.
Technically speaking, the following Perl regular expression describes how bug closing changelogs are identified:
/closes:\s*(?:bug)?\#\s*\d+(?:,\s*(?:bug)?\#\s*\d+)*/ig
We prefer the closes: #XXX syntax, as it is the most
concise entry and the easiest to integrate with the text of the
changelog
.
If you happen to mistype a bug number or forget a bug in the changelog entries,
don't hesitate to undo any damage the error caused. To reopen wrongly closed
bugs, send an reopen XXX command to the bug tracking
system's control address, control@bugs.debian.org
. 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 as
described above. If you simply want to close bugs that don't have anything to
do with an upload you made, do it by emailing an explanation to XXX-done@bugs.debian.org
. Do
not close bugs in the changelog entry of a version if the
changes in that version of the package doesn't have any bearing on the bug.
For general information on how to write your changelog entries, see Best practices
for debian/changelog
, Section 6.3.
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.
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 team@security.debian.org
as
soon as possible. Useful information includes, for example:
Unlike most other activities within Debian, information about security 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:
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:
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 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 requested: the problem has been known for a while, or that the problem or exploit has become public.
Security advisories are only issued for the current, released stable
distribution, and not for testing or unstable. When released,
advisories are sent to the debian-security-announce@lists.debian.org
mailing list and posted on the
security web page
. 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:
This information allows users to assess the threat to their systems.
CVE
identifiers, and any other
information useful in cross-referencing the vulnerability
One way that you can assist the security team in their duties is to 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.
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, 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 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
from the
patchutils
package and debdiff
from
devscripts
are useful tools for this, see debdiff
, Section A.2.3).
When packaging the fix, keep the following points in mind:
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!
dpkg-buildpackage
). The
buildd
infrastructure will not build those. This point applies to
normal package uploads as well.
*.orig.tar.gz
as used in the normal
archive, otherwise it is not possible to move the security fix into the main
archives later.
pbuilder
, Section A.4.3 and
debootstrap
, Section
A.4.2).
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.
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.
Some archive manipulation operations are not automated in the Debian upload process. These procedures should be manually followed by maintainers. This chapter gives guidelines in what to do in these cases.
Sometimes a package will change its section. For instance, a package from the `non-free' section might be GPL'd in a later version, in which case, the package should be moved to `main' or `contrib'.[2]
If you need to change the section for one of your packages, change the package
control information to place the package in the desired section, and re-upload
the package (see the Debian Policy Manual
for details). If your new section is valid, it will be moved automatically.
If it does not, then contact the ftpmasters in order to understand what
happened.
If, on the other hand, you need to change the subsection of one of your packages (e.g., ``devel'', ``admin''), the procedure is slightly different. Correct the subsection as found in the control file of the package, and re-upload that. Also, you'll need to get the override file updated, as described in Determining section and priority of a package, Section 5.7.
If for some reason you want to completely remove a package (say, if it is an old compatibility library which is no longer required), you need to file a bug against ftp.debian.org asking that the package be removed. Make sure you indicate which distribution the package should be removed from. Normally, you can only have packages removed from unstable and experimental. Packages are not removed from testing directly. Rather, they will be removed automatically after the package has been removed from unstable and no package in testing depends on it.
You also have to detail the reasons justifying that request. This is to avoid unwanted removals and to keep a trace of why a package has been removed. For example, you can provide the name of the package that supersedes the one to be removed.
Usually you only ask the removal of a package maintained by yourself. If you want to remove another package, you have to get the approval of its last maintainer.
If in doubt concerning whether a package is disposable, email debian-devel@lists.debian.org
asking for opinions. Also of interest is the apt-cache
program
from the apt
package. When invoked as apt-cache showpkg
package, the program will show details for
package, including reverse depends.
Once the package has been removed, the package's bugs should be handled. They should either be reassigned to another package in the case where the actual code has evolved into another package (e.g. libfoo12 was removed because libfoo13 supersedes it) or closed if the software is simply no more part of Debian.
Incoming
In the past, it was possible to remove packages from incoming
.
However, with the introduction of the new incoming system, this is no longer
possible. Instead, you have to upload a new revision of your package with a
higher version as the package you want to replace. Both versions will be
installed in the archive but only the higher version will actually be available
in unstable since the previous version will immediately be replaced by
the higher. However, if you do proper testing of your packages, the need to
replace a package should not occur too often anyway.
Sometimes you made a mistake naming the package and you need to rename 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 Debian Policy Manual
for details). Once you've uploaded 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.
If you can no longer maintain a package, you need to inform the others about
that, and see that the package is marked as orphaned. You should set the
package maintainer to Debian QA Group
<packages@qa.debian.org> and submit a bug report against the
pseudo package wnpp
. The bug report should be titled O:
package -- short description indicating that the
package is now orphaned. The severity of the bug should be set to
normal. If you feel it's necessary, send a copy to debian-devel@lists.debian.org
by putting the address in the X-Debbugs-CC: header of the message (no, don't
use CC:, because that way the message's subject won't indicate the bug number).
If the package is especially crucial to Debian, you should instead submit a bug
against wnpp
and title it RFA: package --
short description and set its severity to important.
RFA stands for Request For Adoption. Definitely copy the
message to debian-devel in this case, as described above.
Read instructions on the WNPP
web pages
for more information.
A list of packages in need of a new maintainer is available at in the Work-Needing and Prospective Packages
list (WNPP)
. If you wish to take over maintenance of any of the
packages listed in the WNPP, please take a look at the aforementioned page for
information and procedures.
It is not OK to simply take over a package that you feel is neglected — that would be package hijacking. You can, of course, contact the current maintainer and ask them if you may take over the package. If you have reason to believe a maintainer has gone AWOL (absent without leave), see Dealing with inactive and/or unreachable maintainers, Section 7.4.
Generally, you may not take over the package without the assent of the current
maintainer. Even if they ignore you, that is still not grounds to take over a
package. Complaints about maintainers should be brought up on the developers'
mailing list. If the discussion doesn't end with a positive conclusion, and
the issue is of a technical nature, consider bringing it to the attention of
the technical committee (see the technical committee web
page
for more information).
If you take over an old package, you probably want to be listed as the package's official maintainer in the bug system. This will happen 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 The Package Tracking System, Section 4.10 to get the bug reports. However, make sure that the old maintainer has no problem with the fact that they will continue to receive the bugs during that time.
Debian supports an ever-increasing number of architectures. Even if you are not a porter, and you don't use any architecture but one, it is part of your duty as a maintainer to be aware of issues of portability. Therefore, even if you are not a porter, you should read most of this chapter.
Porting is the act of building Debian packages for architectures that is different from the original architecture of the package maintainer's binary package. It is a unique and essential activity. In fact, porters do most of the actual compiling of Debian packages. For instance, for a single i386 binary package, there must be a recompile for each architecture, which amounts to 12 more builds.
Porters have a difficult and unique task, since they are required to deal with a large volume of packages. Ideally, every source package should build right out of the box. Unfortunately, this is often not the case. This section contains a checklist of ``gotchas'' often committed by Debian maintainers — common problems which often stymie porters, and make their jobs unnecessarily difficult.
The first and most important watchword is to respond quickly to bug or issues raised by porters. Please treat porters with courtesy, as if they were in fact co-maintainers of your package (which in a way, they are). Please be tolerant of succinct or even unclear bug reports, doing your best to hunt down whatever the problem is.
By far, most of the problems encountered by porters are caused by packaging bugs in the source packages. Here is a checklist of things you should check or be aware of.
debian/control
are
set properly. The best way to validate this is to use the
debootstrap
package to create an unstable chroot environment (see
debootstrap
, Section
A.4.2). 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. These steps can be
automated by the use of the pbuilder
program which is provided by
the package of the same name (see pbuilder
, Section A.4.3).
If you can't set up a proper chroot, dpkg-depcheck
may be of
assistance (see dpkg-depcheck
, Section
A.6.7).
See the Debian Policy
Manual
for instructions on setting build dependencies.
Debian Policy
Manual
. Setting your architecture to ``i386'' is usually incorrect.
dpkg-buildpackage
.
debian/files
or debian/substvars
files. They should be removed by the `clean'
target of debian/rules
.
/usr/local/bin
or the like. Try not to rely on programs be setup
in a special way. Try building your package on another machine, even if it's
the same architecture.
If the package builds out of the box for the architecture to be ported to, you are in luck and your job is easy. This section applies to that case; it describes how to build and upload your binary package so that it is properly installed into the archive. If you do have to patch the package in order to get it to compile for the other architecture, you are actually doing a source NMU, so consult How to do a source NMU, Section 5.11.4 instead.
For a porter upload, no changes are being made to the source. You do not need
to touch any of the files in the source package. This includes
debian/changelog
.
The way to invoke dpkg-buildpackage
is as dpkg-buildpackage
-B -mporter-email. Of course, set porter-email to
your email address. This will do a binary-only build of only the
architecture-dependent portions of the package, using the `binary-arch' target
in debian/rules
.
Sometimes the initial porter upload is problematic because the environment in
which the package was built was not good enough (outdated or obsolete library,
bad compiler, ...). Then you may just need to recompile it in an updated
environment. However, you have to bump the version number in this case, so
that the old bad package can be replaced in the Debian archive
(katie
refuses to install new packages if they don't have a
version number greater than the currently available one). Despite the required
modification of the changelog, these are called binary-only NMUs — there
is no need in this case to trigger all other architectures to consider
themselves out of date or requiring recompilation.
Such recompilations require special ``magic'' version numbering, so that the archive maintenance tools recognize that, even though there is a new Debian version, there is no corresponding source update. If you get this wrong, the archive maintainers will reject your upload (due to lack of corresponding source code).
The ``magic'' for a recompilation-only NMU is triggered by using the third-level number on the Debian part of the version. For instance, if the latest version you are recompiling against was version ``2.9-3'', your NMU should carry a version of ``2.9-3.0.1''. If the latest version was ``3.4-2.1'', your NMU should have a version number of ``3.4-2.1.1''.
Porters doing a source NMU generally follow the guidelines found in Non-Maintainer Uploads (NMUs), Section 5.11, just like non-porters. However, it is expected that the wait cycle for a porter's source NMU is smaller than for a non-porter, since porters have to cope with a large quantity of packages. Again, the situation varies depending on the distribution they are uploading to.
However, if you are a porter doing an NMU for `unstable', the above guidelines for porting should be followed, with two variations. Firstly, the acceptable waiting period — the time between when the bug is submitted to the BTS and when it is OK to do an NMU — is seven days for porters working on the unstable distribution. This period can be shortened if the problem is critical and imposes hardship on the porting effort, at the discretion of the porter group. (Remember, none of this is Policy, just mutually agreed upon guidelines.)
Secondly, porters doing source NMUs should make sure that the bug they submit to the BTS should be of severity `serious' or greater. This ensures that a single source package can be used to compile every supported Debian architecture by release time. It is very important that we have one version of the binary and source package for all architecture in order to comply with many licenses.
Porters should try to avoid patches which simply kludge around bugs in the current version of the compile environment, kernel, or libc. Sometimes such kludges can't be helped. If you have to kludge around compilers bugs and the like, make sure you #ifdef your work properly; also, document your kludge so that people know to remove it once the external problems have been fixed.
Porters may also have an unofficial location where they can put the results of their work during the waiting period. This helps others running the port have the benefit of the porter's work, even during the waiting period. Of course, such locations have no official blessing or status, so buyer, beware.
There is infrastructure and several tools to help automate the package porting. This section contains a brief overview of this automation and porting to these tools; see the package documentation or references for full information.
Web pages containing the status of each port can be found at http://www.debian.org/ports/
.
Each port of Debian has a mailing list. The list of porting mailing lists can
be found at http://lists.debian.org/ports.html
.
These lists are used to coordinate porters, and to connect the users of a given
port with the porters.
Descriptions of several porting tools can be found in Porting tools, Section A.7.
buildd
The buildd
system is used as a distributed, client-server build
distribution system. It is usually used in 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 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 it in the near future.
The actual automated builder is packaged as sbuild
, see its
description in sbuild
, Section
A.4.4. The complete buildd
system also collects a number of
as yet unpackaged components which are currently very useful and in use
continually, such as andrea
and wanna-build
.
Some of the data produced by buildd
which is generally useful to
porters is available on the web at http://buildd.debian.org/
. This
data includes nightly updated information from andrea
(source
dependencies) and quinn-diff
(packages needing recompilation).
We are quite proud of this system, since it has so many possible uses.
Independent development groups can use the system for different sub-flavors of
Debian, which may or may not really be of general interest (for instance, a
flavor of Debian built with gcc
bounds checking). It will also
enable Debian to recompile entire distributions quickly.
Under certain circumstances it is necessary for someone other than the official package maintainer to make a release of a package. This is called a non-maintainer upload, or NMU.
Debian porters, who compile packages for different architectures, occasionally do binary-only NMUs as part of their porting activity (see Porting and being ported, Section 5.10). Another reason why NMUs are done is when a Debian developers needs to fix another developers' packages in order to address serious security problems or crippling bugs, especially during the freeze, or when the package maintainer is unable to release a fix in a timely fashion.
This chapter contains information providing guidelines for when and how NMUs should be done. A fundamental distinction is made between source and binary-only NMUs, which is explained in the next section.
There are two new terms used throughout this section: ``binary-only NMU'' and ``source NMU''. These terms are used with specific technical meaning throughout this document. Both binary-only and source NMUs are similar, since they involve an upload of a package by a developer who is not the official maintainer of that package. That is why it's a non-maintainer upload.
A source NMU is an upload of a package by a developer who is not the official
maintainer, for the purposes of fixing a bug in the package. Source NMUs
always involves changes to the source (even if it is just a change to
debian/changelog
). This can be either a change to the upstream
source, or a change to the Debian bits of the source. Note, however, that
source NMUs may also include architecture-dependent packages, as well as an
updated Debian diff.
A binary-only NMU is a recompilation and upload of a binary package for a given architecture. As such, it is usually part of a porting effort. A binary-only NMU is a non-maintainer uploaded binary version of a package, with no source changes required. There are many cases where porters must fix problems in the source in order to get them to compile for their target architecture; that would be considered a source NMU rather than a binary-only NMU. As you can see, we don't distinguish in terminology between porter NMUs and non-porter NMUs.
Both classes of NMUs, source and binary-only, can be lumped by the term ``NMU''. However, this often leads to confusion, since most people think ``source NMU'' when they think ``NMU''. So it's best to be careful. In this chapter, if we use the unqualified term ``NMU'', we refer to any type of non-maintainer upload NMUs, whether source and binary, or binary-only.
Only official, registered Debian maintainers can do binary or source NMUs. An official maintainer is someone who has their key in the Debian key ring. Non-developers, however, are encouraged to download the source package and start hacking on it to fix problems; however, rather than doing an NMU, they should just submit worthwhile patches to the Bug Tracking System. Maintainers almost always appreciate quality patches and bug reports.
Guidelines for when to do a source NMU depend on the target distribution, i.e., stable, unstable, or experimental. Porters have slightly different rules than non-porters, due to their unique circumstances (see When to do a source NMU if you are a porter, Section 5.10.2.2).
When a security bug is detected, the security team may do an NMU. Please refer to Handling security-related bugs, Section 5.8.5 for more information.
During the release cycle (see Stable, testing, and unstable, Section 4.6.4.1), 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 How to do a source NMU, Section 5.11.4 need to be followed. Special exceptions are made for Bug squashing parties, Section 7.2.2.
Uploading bug fixes to unstable by non-maintainers should only be done by following this protocol:
DELAYED/7-day
(cf. Delayed incoming, Section
4.8.1), send the final patch to the maintainer via the BTS, and explain to
them that they have 7 days to react if they want to cancel the 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.
The following applies to porters insofar as they are playing the dual role of being both package bug-fixers and package porters. If a porter has to change the Debian source archive, automatically their upload is a source NMU and is subject to its rules. If a porter is simply uploading a recompiled binary package, the rules are different; see Guidelines for porter uploads, Section 5.10.2.
First and foremost, it is critical that NMU patches to source should be as non-disruptive as possible. Do not do housekeeping tasks, do not change the name of modules or files, do not move directories; in general, do not fix things which are not broken. Keep the patch as small as possible. If things bother you aesthetically, talk to the Debian maintainer, talk to the upstream maintainer, or submit a bug. However, aesthetic changes must not be made in a non-maintainer upload.
Whenever you have made a change to a package, no matter how trivial, the version number needs to change. This enables our packing system to function.
If you are doing a non-maintainer upload (NMU), you should add a new minor
version number to the debian-revision part of the version number
(the portion after the last hyphen). This extra minor number will start at
`1'. For example, consider the package `foo', which is at version 1.1-3. In
the archive, the source package control file would be
foo_1.1-3.dsc
. The upstream version is `1.1' and the Debian
revision is `3'. The next NMU would add a new minor number `.1' to the Debian
revision; the new source control file would be foo_1.1-3.1.dsc
.
The Debian revision minor number is needed to avoid stealing one of the package maintainer's version numbers, which might disrupt their work. It also has the benefit of making it visually clear that a package in the archive was not made by the official maintainer.
If there is no debian-revision component in the version number then one should be created, starting at `0.1'. If it is 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'.
A non-maintainer doing a source NMU must create a changelog entry, describing which bugs are fixed by the NMU, and generally why the NMU was required and what it fixed. The changelog entry will have the non-maintainer's email address in the log entry and the NMU version number in it.
By convention, source NMU changelog entries start with the line
* Non-maintainer upload
Maintainers other than the official package maintainer should make as few changes to the package as possible, and they should always send a patch as a unified context diff (diff -u) detailing their changes to the Bug Tracking System.
What if you are simply recompiling the package? If you just need to recompile it for a single architecture, then you may do a binary-only NMU as described in Recompilation or binary-only NMU, Section 5.10.2.1 which doesn't require any patch to be sent. If you want the package to be recompiled for all architectures, then you do a source NMU as usual and you will have to send a patch.
If the source NMU (non-maintainer upload) fixes some existing bugs, these bugs should be tagged fixed in the Bug Tracking System rather than closed. By convention, only the official package maintainer or the original bug submitter are allowed to close bugs. Fortunately, Debian's archive system recognizes NMUs and thus marks the bugs fixed in the NMU appropriately if the person doing the NMU has listed all bugs in the changelog with the Closes: bug#nnnnn syntax (see When bugs are closed by new uploads, Section 5.8.4 for more information describing how to close bugs via the changelog). Tagging the bugs fixed ensures that everyone knows that the bug was fixed in an NMU; however the bug is left open until the changes in the NMU are incorporated officially into the package by the official package maintainer.
Also, after doing an NMU, you have to open a new bug and include a patch showing all the changes you have made. Alternatively you can send that information to the existing bugs that are fixed by your NMU. The normal maintainer will either apply the patch or employ an alternate method of fixing the problem. Sometimes bugs are fixed independently upstream, which is another good reason to back out an NMU's patch. If the maintainer decides not to apply the NMU's patch but to release a new version, the maintainer needs to ensure that the new upstream version really fixes each problem that was fixed in the non-maintainer release.
In addition, the normal maintainer should always retain the entry in the changelog file documenting the non-maintainer upload.
Source NMU packages are built normally. Pick a distribution using the same rules as found in Picking a distribution, Section 5.5, follow the other prescriptions in Uploading a package, Section 5.6.
Make sure you do not change the value of the maintainer in the
debian/control
file. Your name as given in the NMU entry of the
debian/changelog
file will be used for signing the changes file.
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 can either close them manually by sending the required mails to the 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 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 Collaborative maintenance, Section 5.12).
"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:
CVS
or Subversion
.
debian/control
file.
Uploaders: John Buzz <jbuzz@debian.org>, Adam Rex <arex@debian.org>
Debian Developer's Reference
ver. 3.3.3, 16 June, 2003developers-reference@packages.debian.org