Product SiteDocumentation Site

5.3. ساختار یک بسته سورس

5.3.1. قالب

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.
فایل .dsc یا Debian Source Control فایل کوتاهی است مبتنی بر استاندارد RFC 2822 (درست مانند فایل control که در قسمت قسمت 5.2.1, “توضیح: فایل control بررسی شد) که بسته سورس و محتویات آن را مشخص می‌نماید. این فایل توسط توسعه‌دهنده آن امضا شده است که صحت آن را نمایش می‌دهد. برای مطالعه بیشتر در این زمینه به قسمت 6.6, “بررسی صحت بسته‌ها” مراجعه کنید.

مثال 5.1. یک فایل .dsc

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Format: 3.0 (quilt)
Source: zim
Binary: zim
Architecture: all
Version: 0.68-1
Maintainer: Zim Package Maintainers <zim@packages.debian.org>
Uploaders: Raphaël Hertzog <hertzog@debian.org>
Homepage: http://zim-wiki.org
Standards-Version: 4.1.3
Vcs-Browser: https://salsa.debian.org/debian/zim
Vcs-Git: https://salsa.debian.org/debian/zim.git
Build-Depends: debhelper (>= 11), xdg-utils, python (>= 2.6.6-3~), libgtk2.0-0 (>= 2.6), python-gtk2, python-xdg, dh-python
Package-List:
 zim deb x11 optional arch=all
Checksums-Sha1:
 a3b50aa8e44126cc7edd2c1912adf9820f50ad58 2044224 zim_0.68.orig.tar.gz
 4e13b37625789334da2d95b93e51e41ffd3b6b01 9300 zim_0.68-1.debian.tar.xz
Checksums-Sha256:
 d91518e010f6a6e951a75314138b5545a4c51151fc99f513aa7768a18858df15 2044224 zim_0.68.orig.tar.gz
 23f4ddc69af74509932acc3b5f0d4cd2af943016e4fd5740b9d98ec4d49fd8c2 9300 zim_0.68-1.debian.tar.xz
Files:
 336041a16687abb66fd9f604b98407e8 2044224 zim_0.68.orig.tar.gz
 1714f67b35ab69e709849ad707206ca8 9300 zim_0.68-1.debian.tar.xz

-----BEGIN PGP SIGNATURE-----
Comment: Signed by Raphael Hertzog

iQEzBAEBCgAdFiEE1823g1EQnhJ1LsbSA4gdq+vCmrkFAlqyOxkACgkQA4gdq+vC
mrnCqAf/Ww9wg97VragtVhSFvehoVoJ0ZhoqNaSuCP/W1Fuf+P0YklzL2BlkVRXW
X23c8Qs1v6VE2iRY3mEkdWwgBs1QwF0MX7H1jjQfPHCynGHKlH5dfo5fqLizgCeu
c9Pug3ZisjF90CgsseO7SVDqHVmO6QsfAaGWpHAw92HDz/xwjrS/4Ejntqjy0b+r
Gmw2AZuBdhp+7C6p7In/Gg6DHPBLQGMLCKypoZKQdl+L0fWjjeykOzMIbjry2sRH
H0J4FLVGAGumh3zIZlm/t3ehGfP9Dg8FvzMaCNsf8OtYCSAEutrQEDBaskcTSIpq
L0GQhKlViDuu8gzsqm7efPEhPcsF1A==
=6jGR
-----END PGP SIGNATURE-----
نکته اینکه بسته‌های سورس نیز وابستگی‌های مربوط به خود را دارند (Build-Depends) که کاملاً با وابستگی‌های موجود در بسته‌های باینری تفاوت دارد، چرا که شامل ابزاری جهت کامپایل کردن نرم‌افزار مورد نظر و ایجاد فایل باینری آن هستند.
فایل .orig.tar.gz آرشیو شامل سورس کد از توسعه‌دهنده اصلی برنامه است. از توسعه‌دهندگان بسته در دبیان تقاضا می‌شود که این فایل را به منظور سازگاری هر چه بیشتر با فایل اصلی برنامه، تغییر ندهند (که این کار توسط یک عملیات مقایسه‌ای انجام می‌شود) و به نقظه نظرات نویسنده اصلی احترام بگذارند.
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 a Debian package.

5.3.2. کاربرد در دبیان

بسته سورس پایه و اساس هر چیز دیگری در دبیان است. تمام بسته‌های دبیان از یک بسته سورس نشات می‌گیرند، تغییر در هر بسته دبیان مستلزم تغییر در بسته سورس آن است. توسعه‌دهندگان دبیان که روی بسته‌های سورس کار می‌کنند، می‌دانند که کوچکترین تغییر در آن‌ها روی بسته‌های دبیان تاثیر خواهد گذاشت. حاصل کار نهایی آن‌ها در بسته‌های سورس قرار می‌گیرد: به راحتی می‌توانید به آن‌ها مراجعه کنید و ببینید که تمام تغییرات از آنجا شروع می‌شود.
When a new version of a package (source package and one or more binary packages) arrives on the Debian server, the source package is the most important. Indeed, it will then be used by a network of machines of different architectures for compilation on the various architectures supported by Debian. The fact that the developer also sends one or more binary packages for a given architecture (usually i386 or amd64) is relatively unimportant, since these could just as well have been automatically generated.