eliminating -source packages
This is a proposal to change how source gets on a user's machine for
them to use to build the kernel, and associcated modules packages.
First, a bit of background and rationale. The way we do things now is to
make .deb packages that contain source code. There are two varying ways
this is done:
1. Just include the source code, unpacked, in the .deb. This leads to
monstrous lintian reports, and it can lead to problems when a built
source tree is purged. Thus, lots of people have moved over to #2:
2. Include a tarball in the .deb. The user must remember to unpack the
tarball manually each time the package is updated. It does lack the
drawbacks of #1.
I really feel that both of these are broken hacks; we're trying to fit
something that was never meant to go in a .deb into one, and it doesn't
fit very well. We end up cluttering the rules files of kernel module
packages with all sorts of junk to build a -source package, while also
being able to build modules packages. A source tree is not your typical
binary package. Really only a few things matter about a source tree:
a. It needs to be updatable somehow.
b. It needs to be in a consistent location where kernel-package can find
and build it.
c. Build depends.
So I got to thinking about apt-get source which seems like the logical
solution. It handles a. pretty well, although it doesn't update the
sources along with installed .deb's when apt-get update is run. It
doesn't handle b. at all though.
But it seems to me we could pretty easily extend apt-get source to do
these things. I'd propose the following:
* Add a "apt-get install-source" command. This will always unpack the
source into /usr/src (or some other location set in the apt config
file). It will also register the source as installed in a list
somewhere (or, perhaps no list is needed).
* Add an "apt-get upgrade-source" command. This will upgrade all installed
source packages, reading the list (or perhaps, just upgrading
everything that looks like a source package in /usr/src).
* (Later, apt really should support satisfying build-depends, but that
is somewhat orthagonal to this proposal.)
This wouldn't only be useful for kernel and modules sources, I imagine
people would find other uses for up-to-date sources in a consitent
location. For example, one unresolved thing related to build
dependancies is source build dependancies (ie, you need the source of
foo to build bar). This might allow that to be addressed eventually.
Jason, what do you think, apt bloat, or worth it? It could just be
impelmented as wrapper shell scripts. Hm.
Manoj, this wouldn't require many changes to kernel-package, although it
might need to start looking for modules source directly in /usr/src.
see shy jo