Ubuntu: What are they doing to the vanilla sources?

apt-get source package

Will get you two or three files: "original" tarball (sometimes modified, but rarely... the only change is often the file name) -- named *.orig.tar.gz, the debian changes in form of *.diff.gz file, and some metadata. Sometimes the .diff.gz file is missing: this means that package is built only for debian/ubuntu, to handle some very-specific distro work... like dak which manages the debian archive uploads. Then all the code is in the original tarball.

Reasons are multiple: fixing bugs for software (when upstream doesn't want to), adapting software to debian (f.e. adjusting file paths). Debian wants all packages to comply with FileSystem Hierarchy Standard, and this is a very common adjustment.

The original tarball is sometimes not the same as upstream created because of packaging issues. I remember seeing a program distributed in several tarballs, while they generated only one executable -- the debian maintainer decided to make its own "original" tarball consisting of tarred upstream tarballs. The other reason is when sometimes debian maintainer decides to add some binary file to the package. It is difficult to put binaries in inside the .diff.gz file, so the original tarball is modified (and this is usually clearly described in the documentation for package).

Sometimes (very rarely) the licensing is the issue. It happens that the upstream doesn't understand or want to understand implications due to some licenses. Debian wants to have all licensing issues resolved, so it happens that the debian patches do some specific things, or the original tarball is stripped from illegaly distributed files.

It also happens that some content is licensed so that you can use it but not distribute. Usually (f.e. for msttcorefonts, flashplugin-nonfree) the debian package is only some kind of an installer for a package, and no original content is inside the package.

pine package is also interesting, because the license forbids to distribute compiled forms. Therefore there is no pine binary package, but there is pine source package. You can download it using the above command and compile into a debian package for yourself.


The reasons are probably as manyfold as there are maintainers and packages. I guess usually they modify the software so that it integrates better with other software in the distro or to add features that aren't in the "official" version.

you can get the sources (and the ubuntu-specific diffs) by typing sudo apt-get source PACKAGENAME at the command line. It will download the vanilla sources and the diffs of the package to the current directory. They usually also include some comments in the source.