Source Packages and Binary Packages

Learn the difference between source and binary packages, and the context of the term "upstream developers".

Source packages and binary packages

The Debian project has a very strong focus on free and open-software. One manifestation of this focus is support for source packagesDebian packages that contain source code instead of compiled, binary executables.. This allows us to download the source code that was used to build a package, including all patches and the packaging information. We can then install all build dependencies and build our own binary package.

Architectures

There is also a very practical aspect to this. Debian runs on many computer architectures, like AMD64 and Intel’s 64 bit i386 processors (amd64), 64 bit ARM (arm64), big-endian MIPS (mips), and so on. We can’t expect each Debian developer to have hardware available to build binaries for each of these architectures. So, a Debian developer only uploads a source package to a central server, and a build system takes care of building the package on all supported architectures.

The source package contains a list of architectures to build for or the special value any if it’s supposed to be built for all available architectures.

The special architecture all is reserved for packages that don’t contain architecture-specific files, like documentation, header files, and applications written in scripting languages, and can therefore be installed on all architectures.

Reproducible builds

When a build is reproducible, building a package from the source produces a byte-for-byte identical binary package with the official build. Debian strives to make its builds reproducible and has succeeded with the majority of its packages.

Note: A Debian package contains timestamps, and to reproduce a build, we have to apply the same timestamps as in the original build. Such extra information from the original build is available in *.buildinfo files, which we need in addition to the source package and the build dependencies to truly reproduce a build.

Upstream developers

Most software in the Debian and Ubuntu software archives hasn’t been specifically developed for these distributions and has been packaged by Debian or Ubuntu developers. In Debian parlance, the original developers of a software are called the upstream developers.

The idea behind this naming is that there is a stream of value creation that starts with the developers, flows through the packaging (which enables users to install it), and moves on to the users who consume the value. From the perspective of the people creating the packages, the original developers are the upstream developers.