Product SiteDocumentation Site

5.3. Struktura Pakietu Źródłowego

5.3.1. Format

A source package is usually comprised of three files, a .dsc, a .orig.tar.gz, and a .debian.tar.xz (or .diff.gz). They allow creation of binary packages (.deb files described above) from the source code files of the program, which are written in a programming language.
Plik .dsc (Debian Source Control) jest krótkim plikiem tekstowym zawierającym nagłówek RFC 2882 (tak jak plik control omawiany w Sekcja 5.2.1, „Opis: plik control), który opisuje pakiet źródłowy i wskazuje, które inne pliki są jego częścią. Jest podpisany przez opiekuna, co gwarantuje jego autentyczność. Więcej szczegółów na ten temat znajduje się w Sekcja 6.6, „Sprawdzanie Autentyczności Pakietów”.

Przykład 5.1. Plik .dsc

Hash: SHA512

Format: 3.0 (quilt)
Source: zim
Binary: zim
Architecture: all
Version: 0.73.5-1
Maintainer: Zim Package Maintainers <>
Uploaders: Raphaël Hertzog <>
Standards-Version: 4.5.1
Build-Depends: debhelper-compat (= 13), python3, python3-gi, python3-xdg, gir1.2-gtk-3.0, dh-python
 zim deb x11 optional arch=all
 80d43d5c1c6a47c695079eb02bc8ad36b84d6e57 2159901 zim_0.73.5.orig.tar.gz
 b1cd86dc4819a80126efbf6ee6eba17a33f451d3 10124 zim_0.73.5-1.debian.tar.xz
 a36f15d92c3994c0d55b07f83253b3d8b826beb3714865edbabc14f1cc91d63a 2159901 zim_0.73.5.orig.tar.gz
 6c2db642d9ac1c2440ed08e0cd584006045b342b255f37ffe42bd5459fb5cb76 10124 zim_0.73.5-1.debian.tar.xz
 fa76ceb8ac7d7354fb0e2bc5607e9faa 2159901 zim_0.73.5.orig.tar.gz
 a0c824d979efb196cde0176d3cb9c719 10124 zim_0.73.5-1.debian.tar.xz

Comment: Signed by Raphael Hertzog

Note that the source package also has dependencies (Build-Depends) completely distinct from those of binary packages, since they indicate tools required to compile the software in question and construct its binary package.
The .orig.tar.gz file is an archive containing the source code as provided by the original developer. Debian package maintainers are asked to not modify this archive in order to be able to easily check the origin and integrity of the file (by simple comparison with a checksum) and to respect the wishes of some authors.
The .debian.tar.xz contains all of the modifications made by the Debian maintainer, especially the addition of a debian directory containing the instructions to execute to construct one or more Debian binary packages.

5.3.2. Usage within Debian

The source package is the foundation of everything in Debian. All Debian packages come from a source package, and each modification in a Debian package is the consequence of a modification made to the source package. The Debian maintainers work with the source package, knowing, however, the consequences of their actions on the binary packages. The fruits of their labors are thus found in the source packages available from Debian: you can easily go back to them and everything stems from them. Rozdział 15, Tworzenie pakietu Debiana contains some examples.
When a new version of a source package arrives on the Debian server, it will then be used by a network of machines of different architectures for compilation on the various architectures supported by Debian.