Your Questions
From which release of official kernel.org kernel are those two versions of the kernel derived?
Kernel version 3.2.0.
What is the relationship of the sources of the Debian Sid kernel to the Ubuntu Precise one?
They are both Debian versions (no Ubuntu changes), the Debian package (3.2.0-2) is revision 2, the Ubuntu package (3.2.0-20) is revision 20.
Are the changes made from the kernel.org sources to produce 3.2.0-2-amd64 also present in 3.2.0-20-generic on Ubuntu?
I am unsure as they are (afaik) different packages (generic vs amd64 specific).
Is the Debian Sid kernel "upstream" of the Ubuntu one?
Yes. Debian is upstream of Ubuntu. Changes made by Ubuntu (signified by revisions ending -ubuntuX
where X
is a revision) are normally merged back into Debian
Revisions Numbers
tl;dr version: The number after the hypen is the revision number given by the package maintainer after new builds/patches.
--
For Debian, the number after the hyphen is the Debian Revision Number
[source]
For Ubuntu, the number after the hypen is the Debian Revision Number
and the number after the -ubuntu
(if it exists) is the Ubuntu Revision Number
[source-2]
Generally the number after the hyphen is the revision that the package maintainer gives.
Packages from package maintainers often have patches of various kinds applied to them (such as to fix incompatibilities; security fixes; minor improvements; different build flags etc.); this is why in your example kernel version 3.2.0 has multiple revisions.
Just because one is higher than the other does not necessarily mean it is newer, better or has all the same patches applied. This is because they may be different package maintainer(s) who are looking after the package on each distro and they may (for example) patch less frequently (meaning a lower revision number) but still incorporate [some or] all of the same patches.
Note: Ubuntu is based from Debian so more often than not Ubuntu has all the patches from Debian (and often from a newer debian release such as testing)
Package Relationships
A piece of software is made (e.g. kernel). This has a version (3.2.0). A package maintainer (Dave) for a distro (Debian). He takes the software and packages it up in a format (.deb) according to the guidelines of the distro. This is version 3.2.0-1 of kernel, aka kernel-3.2.0-1.
Dave hasn't quite followed the guidelines for the distro he is packaging for (Debian) and so has to make some changes to the package. He does this and submits his updated version. This is version 3.2.0-2 of kernel, aka kernel-3.2.0-2.
In the mean time kernel 3.2.1, 3.2.2 all the way to 3.2.25 have been released. The package Dave is working on is still based on 3.2.0. He will get round to releasing 3.2.25 soon but not yet.
At the same time, another package maintainer (Harry) needs the same package for his distro (Ubuntu). Since Debian and Ubuntu are similar; instead of doing everything from scratch, he just takes a copy of Dave's kernel 3.2.0-2 and submits it. Harry releases this to Ubuntu as 3.2.0-2.
Harry then wants to make some changes to Dave's work. He makes the changes and releases his updated package. This is version 3.2.0-2-ubuntu1
In this example:
Latest version of kernel
is 3.2.25
Latest version of kernel
package for Debian is 3.2.0-2
Latest version of kernel
package for Ubuntu is 3.2.0-2-ubuntu1