Source-only uploads


Source-only are uploads to the Debian archive that do not include a binary build of the Debian package, the buildd network handles the build and distributes it to the archive.

Since circa August 2014, the Debian archive accepts source-only uploads and since August 2015, Architecture: all packages are built on the buildds.

Since July 2019, binaries uploaded by maintainers are not allowed to migrate to testing. In other words, packages must have source-only uploads before they can reach the next release.


NEW uploads and uploads with NEW binary packages currently cannot be source-only. This is also true for backports-NEW.

This means you need to upload a source+binary package in these situations. After your package has passed the checks and is in the archive, you need to do a source-only upload to allow the package to migrate to testing. The source+binary package you did initially will NOT be allowed to migrate.

For Architecture: any packages, the release team might proactively schedule a binNMU, which will then be allowed to migrate; this is not possible for Architecture: all packages and needs manual action from you in any case.

dupload has various checks for when source-only or sourceful uploads are appropriate, and will warn and prompt on how to proceed in those cases.


Historically, the uploads of packages required them to be built on the developer's machine. The binary, arch-specific packages would be taken as-it-is by the archive after the upload (along with all binary packages, which are architecture agnostic). This means in particular that when you install an amd64 package it is very likely the exact version that was compiled by the maintainer.

There are a few problems with this approach:

Source-only uploads address these issues by essentially having a central authority to compile all code. However, the disadvantage is that if the archive is compromised then every package is compromised. This is true, but it is true even now for more than 90% packages that are built by the archive.

A complementary project is ReproducibleBuilds which aims to make builds fully, bit-per-bit, reproducible. In the future one can imagine that packages are built both by the developer and the archive, the results are tested for equality and the package is only accepted if they match. All this work is about distributing trust and detecting problems early.

How to make a source-only upload

Generating _source.changes with debuild

If the package just cleared NEW, you can add a new changelog entry for source-only upload (dch -i and dch -r). See this commit and resulting changelog file is given below.

ruby-cose (1.2.0-2) unstable; urgency=medium

  * Source only upload for migration to testing

 -- Pirate Praveen <>  Sun, 08 Nov 2020 15:13:34 +0530

ruby-cose (1.2.0-1) unstable; urgency=medium

  * Initial release (Closes: #973864)

 -- Pirate Praveen <>  Fri, 06 Nov 2020 14:43:15 +0530

The dpkg-buildpackage program accepts the --changes-option=-S flag which builds the packages as always, but the final .changes file will contain only the source code. You can then use dput to upload the .changes file (see this thread). Example:

$ cd nghttp2
$ dpkg-buildpackage --changes-option=-S
$ cd ..
$ ls *nghttp2*.*
libnghttp2-doc_1.3.4-1_all.deb  nghttp2_1.3.4-1_amd64.changes  nghttp2_1.3.4-1.dsc     nghttp2_1.3.4-1.debian.tar.xz  nghttp2_1.3.4.orig.tar.bz2
$ egrep '^ \S{32} ' nghttp2_1.3.4-1_amd64.changes 
 01c9325805a6fe7fc444c890cf43e0fa 2008 httpd optional nghttp2_1.3.4-1.dsc
 cce2f954f27981191e539f43066e939a 1504585 httpd optional nghttp2_1.3.4.orig.tar.bz2
 e0be575279e76a872eac15708374499e 10060 httpd optional nghttp2_1.3.4-1.debian.tar.xz

You can also use the -S flag which only creates the source-only upload (the package is not even built in this case). Please make sure that the package builds properly before.

If you like debuild command, you can do:

$ debuild -S

Generating _source.changes with sbuild and pbuilder

While you should not build binary packages to upload directly with dpkg-buildpackage, it is fine to use dpkg-buildpackage -S to prepare source-only uploads.

If you build binaries for testing with sbuild and pbuilder, as a convenience feature, they can be made to emit a _source.changes using the --source-only-changes option.

Typical build commands are:

sbuild -A -s -d unstable --source-only-changes --run-lintian
pbuilder --build --source-only-changes package.dsc

Alternatively, you can set is globally in the configuration and avoid needing to give the option on the command-line:

Generating _source.changes with git-buildpackage tool chain

If you are using git-buildpackage without pbuilder or sbuild, it will happily accept -S or --changes-option=-S switch:

gbp buildpackage --changes-option=-S

This also works with --git-pbuilder too in jessie and below.

If you are using --git-pbuilder in stretch or later, you should use --git-pbuilder-options=--source-only-changes:

gbp buildpackage --git-pbuilder --git-pbuilder-options=--source-only-changes

This will give a binary+source .changes file and a source-only .changes file. Naturally, you must discard the .changes file that includes information about binary packages (.deb files) and only sign and upload the source-only .changes file in order to make a source-only upload.

When using git-buildpackage with sbuild (≥ 0.70.0-1), specify --source-only-changes in order to get both a binary .changes file and a source-only .changes file, e.g.:

gbp buildpackage --git-builder='sbuild --source-only-changes -v -As --dist=unstable'

You can also set it globally in the builder configuration (see above).

Generating source-only upload with dgit


dgit push-source unstable

For dgit-maint-gbp(7)

dgit push-source --gbp