Bugzilla – Bug 360026
Split of kernel-sources package
Last modified: 2008-02-09 07:40:07 UTC
Hi, this actually is a feature request. I haven't seen so far a discussion about this. Is it possible to split the kernel-sources package for the current running kernel into 2 parts - one with the sources itself, and another one which includes only the include files. The reaso - most of the third party drivers/modules require the /usr/src/linux/include in order to compile. They do not need the kernel sources itself. And it's kind of waste of bandwidth and hdd space to install 250MB of sources, while the includes are only 24MB. It can even be made so kernel-sources depends on kernel-sources-headers (if this is the name chosen), so if someone needs to recompile the kernel itself, the includes are not left out.
Why would you only need the include files and not the rest of the kernel sources? In order to build an external module, you need the kernel build infrastructure that the kernel sources provides, so you would need to download the whole thing anyway, so there would not be any real savings.
I was not aware, that the build infrastructure is needed as well. After I checked, indeed some include files (like ./linux/version.h) are build after make oldconfig && make scripts && make prepare (according to the docs). But does it need the source files as well indeed? Or only the build infrastructure and the includes? Why not separate, so there is no need to download/install one huge thing, if only part of this is needed? If I recall correctly, when I needed to do this in Ubuntu, I had to download only the linux-headers package which corresponds to the running kernel. AFAIK thats how it is in debian as well. Here are the instructions for Ubuntu, and I do not see any need there to install the whole kernel source tree: https://help.ubuntu.com/community/VMware/Tools As the kernel packages a regular opensuse user uses is prebuild, than the include files (and all the configuration) is already created when the package was build. That should be more than enough for module build. I do remember having this problem in the past (before nvidia repo was created), that I needed to make oldconfig && make prepare aftere every kernel update (and re-download 250MB sources) in order to make the nvidia driver work. I do agree, that if I have custom build kernel, I'm on my own, and I have to download the kernel sources. But for pre-build kernels - why?
If you need to build your own kernel modules, you must install the kernel-sources package. Normal users just install pre-build kmp packages, which do not need to be built at all, and do not need the kernel-sources package. So for now, we're going to stick with what we have, very few users build their own kernel modules, they rely on companies to provide them already built.
In every installation of opensuse in a virtual machine, there is need of vmware-tools installed at least. Are there kmp packages for vmware-tools?
that's up to vmware to provide, as traditionally they have been closed source (don't know if these new ones are open or not yet.) Please contact them and ask about providing this.
I can not argue if opensuse developers are willing or not to make this change. I just point out, that there is a better solution, which saves bandwidth and hdd space. I do agree that the right thing to be done is to pursuit the vendors so they provide the drivers, but this can take time (and eventually will not end with good solutions). Meanwhile, there is a lot of new hardware, which is not officially supported by opensuse, but there are already opensource drivers, which are not yet part of the official kernel tree. In order to use this hardware, and these drivers, still there is a need self-build modules. I can not speak about the others, but besides the (old) problems with nvidia, and current with vmware-tools, I have 2 other pieces of hardware - a webcam, and IR remote, which have opensource drivers - but I need to build them every time I update the kernel, which means that I need to redownload the whole kernel source tree, and go trough the process of make oldconfig, make scripts, make prepare. It is much easier on Ubuntu, where you need to download only the headers, and they are prepared, so the driver can be build. I do not know if you have statistics, or even if you investigated how many of the kernel-source downloads are caused only by this particular reason, and how many are because people are re-configuring and rebuilding their own kernels, but I would guess, that the ones, who really are interested in kernel rebuilds, are using the KOTD versions, not with the security updates. Btw, the current request came as a result of my try to help with evaluating/bug reporting opensuse 11.0 alpha. I tried to install it on virtual machine first, and then I hit the problem with these modules. And as usual, the virtual machine is not high performer, nor has access to too much of hdd space, and when you have like 4-5 virtual machines for testing, and you probe every new kernel release on them, it is really inconvenient to spare 200MB for something you do not use. Same with the older hw I have around - this is a lot of bandwidth - for me and for your update servers.
any kernel upgrade need rebuilding modules for vmware, at least, but usually not re-download the source. As long as I remember, suse used to have a separate kernel headers package, but I dunno if it's the same thing. anything that can ease the semi-automatic module compilation is a good thing. asking hardware vendors to provide any new kernel driver is *not* a good idea, there are too many...