This page summarizes information concerning the switch to the new source package formats "3.0 (quilt)" and "3.0 (native)". This switch is planned to happen in the Debian 6.0 'squeeze' development cycle.

Advantages of new formats



How to convert a source package?

You need to put "3.0 (quilt)" or "3.0 (native)" in debian/source/format to indicate the desired format to dpkg-source (see dpkg-source(1) for more information):

mkdir debian/source ; echo '3.0 (quilt)' > debian/source/format ; dch 'Switch to dpkg-source 3.0 (quilt) format'

Native packages should not need any other change.

When you switch to "3.0 (quilt)", there are other changes that you might want to do:

Does a 3.0 (quilt) source package need to build-depend on quilt?

No because you're supposed to remove the quilt usage in debian/rules (patch/unpatch logic).

Is the README.source file needed with 3.0 (quilt) source packages?

No. Since dpkg-source -x applies the patch, you don't have to explain how the patch system works. If lintian gives you the patch-system-but-no-source-readme warning, upgrade to the latest version in sid.

How to use multiple upstream tarballs in 3.0 (quilt) format?

Simply put a file  <source>_<version>.orig-<component>.tar.{gz,bz2,lzma,xz}  near the traditional  .orig  tarball. The content of that tarball should also be already unpacked in the  component  subdir of the unpacked source package. The next  dpkg-source -b  will pick it up automatically.

You can check this article as well: How to use multiple upstream tarballs in Debian source packages

Note: using a dash in the  component  requires dpkg >= 1.14.27, so you can't upload such packages until lenny's 4th point release (Debian 5.0.4, released 2010-01-30).

Why should I convert my package to 3.0 (quilt) format?

Pick the reasons that matter to you:

I converted my package but it fails to build or fails to unpack on all buildds

If you get a failure like:

dpkg-source: info: applying XXXX
1 out of 1 hunk FAILED -- saving rejects to file xxx.rej

You probably have quilt patches that only applies with fuzz (i.e. they only apply if patch ignores context lines). quilt applies those without failing but dpkg-source doesn't. The solution is to refresh the patches, for example with those commands :

quilt pop -a
while quilt push; do quilt refresh -p ab; done

dpkg-dev and later prevent you from building source packages with such patches.

Why aren't -p0 patch supported in 3.0 (quilt) format?

See sub-thread starting here.

How many packages have already been converted?

But, how do I actually work with the 3.0 (quilt) format?

To actually take advantage of this new format, see

They explain how to add and edit patches and integrate things in your workflow.

Are there more docs?


How to convert back to 1.0?

We have no idea why you should want this, but DpkgV3toV1 has the instructions from the old site.

Can I avoid the multiple patches? All my patches are in version control

Yes. Just create a file debian/source/local-options with content:


This option creates a single "debian-changes" patch in debian/patches, similar to the .diff.gz of the v1 source format. The local-options file is *not* shipped with the source package, so this means that any NMUs or downstream changes will still use a separate patch file. This is a feature, not a bug; it allows you to use your preferred workflow while not impacting others.

Validation of all tools with new source formats

For all applications, please be sure to test the 3 important cases:

It's also interesting to test with various compressions methods (gz, bz2, lzma, xz).

Some sample source packages are available here. You can add it to /etc/apt/sources.list with deb-src debsrc3.0/. They have the following characteristics:

Current test results:

Possible improvements:

Please try using new source packages with all your usual tools (in particular if you maintain them) and file bugs if you encounter problems and usertag them appropriately (user / tag 3.0-quilt-by-default). Also update the list above with any relevant information (including pointers to bugs).

CategorySpec CategoryDeveloper CategoryPackaging