Without packaging system we have (A) source code, which can be translated/compiled to (B) binary code.
In case of debian/ubuntu packages we have (1) source code, (2) source package - dsc file and (3) binary package - deb file. How is it that (2) source package related to (1) and (3)? Why do we need it? And, the most important question: what is the workflow generating (2) and (3) from (1)?
A DSC file is a settings file used by WPS Office (previously known as Kingsoft Office), an office suite which includes the Writer, Spreadsheets, and Presentation applications. It stores the settings for the Design Science Equation Editor, which includes the window size, interface style, and zoom magnification.
A . dsc file is a file related to the packages created, and the relevant related files of, a Debian Source Package (which is just the type of package - it's ultimately a package for Ubuntu and not Debian itself), which is what is uploaded to the builders for the repositories.
dsc (Debian Source Control) file is a short text file containing an RFC 2822 header (just like the control file studied in Section 5.2. 1, “Description: the control File”) which describes the source package and indicates which other files are part thereof. It is signed by its maintainer, which guarantees authenticity.
A Debian source package contains the source material used to construct one or more binary packages. A source package consists of a . dsc file (see Debian source control files – . dsc), one or more compressed tar files, and possibly other files depending on the type and format of source package.
The workflow usually goes approximately like this:
Someone at Debian downloads the source code, and writes
A set of patch files to make the source build on Debian and conform to Debian guidelines. Run
curl -s 'http://archive.ubuntu.com/ubuntu/pool/universe/s/splint/splint_3.1.2.dfsg1-2.diff.gz' | gunzip -dc | less
to see this for the example package.
.dsc
file and debian/control
file. “DSC” is an acronym for Debian Source Control..deb
packages are built for each architecture from the original upstream source code with the Debian-specific patches applied. Here is one such file. The Debian Binary Package Building HOWTO explains the format of these files and how to inspect them.The .dsc
file is not used for build logic, it is more for metadata. However many tools along the way require it. For example, the Build-Depends:
field is used to install required build dependencies.
It's actually much more complicated than that. The idea behind Debian packages is that they contain all the information needed to buld a page. Usually, the source is modified to include a debian
directory that includes a control
file describing the dependencies of that package and other packages that it interacts with (e.g, breaks, replaces, provides virtual package). A rules
file explains how to build and install the package. There are also descriptions of how to package since a single source package can become many binary packages (e.g., foo-utils
, libfoo0
, libfoo-dev
). debuild
actually reads this information, does the compilation, and produces the binary packages. A subtlety: if foo
uses libbar-dev
, I may not actually know/care what version of the libbar
binary package I use. pbuilder
runs debuild
in a clean environment so there is no chance of compiling against things you have not explicitly specified.
Consult the Debian New Maintainers' Guide for details.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With