On Tue, Apr 27, 2010 at 12:39:21AM +0900, Osamu Aoki wrote: > Package: doc-debian > Version: 4.0.2 > Severity: normal > > source-unpack.txt document really old format and 1.0 format. > (I never knew package without *.dsc).
I think we probably no longer need to document pre-1.0 formats. They haven't been used since well before I joined Debian, and that was a decade ago. The dpkg-dev changelog doesn't seem to mention it explicitly, but it looks as though .dsc files were introduced around 1996. > We need to include 3.0 source format too. Yes. I've attached a rewritten version of the page here, which documents all formats currently in use in the Debian archive. (CCing Ian in case he has comments on this.) > (Maybe a pointer to the dpkg-source manpage since we never know when > this situation changes.) I included such a pointer, although the audiences are a bit different. The purpose of source-unpack.txt is mainly to explain how people using other systems can unpack our source packages. If you have the dpkg-source manual page, then you probably also have dpkg-source, and in that case you should just use it. The structure of my rewritten document reflects that. -- Colin Watson [cjwat...@debian.org]
=== modified file 'doc/source-unpack.txt' --- doc/source-unpack.txt 2002-04-30 19:02:09 +0000 +++ doc/source-unpack.txt 2010-10-17 11:10:54 +0000 @@ -1,33 +1,68 @@ HOW TO UNPACK A DEBIAN SOURCE PACKAGE -There are two kinds of Debian source packages: old ones and new ones. +If you have `dpkg-source', you can use it to unpack any Debian source +package: put all the files in the same directory and type `dpkg-source +-x <whatever>.dsc'. The remainder of this document explains how to +unpack Debian source packages on non-Debian systems, or on Debian +systems without the `dpkg-dev' package installed. + +There are several kinds of Debian source packages, identified by the +Format: field in the .dsc file. If there is no Format: field, treat +it as "1.0". + + +"1.0" packages can be either native or non-native. Native packages +(where the Debian source is the upstream source) look like this: + hello_1.3.dsc + hello_1.3.tar.gz +To unpack this kind of package, just untar the .tar.gz file. -A. Old ones look like this: - hello-1.3-4.tar.gz - hello-1.3-4.diff.gz - You unpack them by untarring the .tar.gz. There is NO need to apply - the diff. - -B. New ones look like this: +Non-native "1.0" packages look like this: hello_1.3-11.dsc hello_1.3-11.diff.gz - hello_1.3-11.orig.tar.gz - note the `.orig' part - Here you MUST use dpkg-source or apply the diff manually - see below. - - If you have `dpkg-source' you should put the files in the same - directory and type `dpkg-source -x <whatever>.dsc'. + hello_1.3.orig.tar.gz - note the `.orig' part - If you do not you can extract the Debian source as follows: 1. untar P_V.orig.tar.gz. 2. rename the resulting P-V.orig directory to P-V. If some other directory results, rename *it* to P-V. 3. mkdir P-V/debian. 4. apply the diff with patch -p0. 5. do `chmod +x P-V/debian/rules' - (where P is the package name and V the version.) + (where P is the package name and V the upstream version - `hello' and + `1.3' respectively in this example.) + + +"3.0 (native)" packages are the same as native "1.0" packages, except +that the source tarball may be compressed using methods other than +gzip. + + +"3.0 (quilt)" packages look like this: + hello_1.3-11.dsc + hello_1.3-11.debian.tar.gz + hello_1.3.orig.tar.gz + hello_1.3.orig-COMPONENT.tar.gz + (optional, for one or more values of COMPONENT) +The compressed files may be compressed using methods other than gzip. + +To unpack this kind of package, you will need to install `quilt' +(http://savannah.nongnu.org/projects/quilt), then: + 1. untar P_V.orig.tar.gz. + 2. rename the resulting P-V.orig directory to P-V. If some other + directory results, rename *it* to P-V. + 3. if there are any orig-COMPONENT tarballs, untar each of them to + P-V/COMPONENT. + 4. remove P-V/debian if it exists. + 5. change to the P-V directory. + 6. untar P_V-R.debian.tar.gz; it will unpack to a `debian' + subdirectory. + 7. run `QUILT_PATCHES=debian/patches quilt push -a'. + (where P is the package name, V the upstream version, and R the + Debian revision - `hello', `1.3', and `11' in this example.) + -C. There are some packages where the Debian source is the upstream - source. In this case there will be no .diff.gz and you can just use - the .tar.gz. If a .dsc is provided you can use `dpkg-source -x'. +See the dpkg-source(1) manual page for full details of all formats, +including experimental ones. -- Ian Jackson <ijack...@gnu.ai.mit.edu> Sat, 31 Aug 1996 + -- Colin Watson <cjwat...@debian.org> Sun, 17 Oct 2010