To build the fglrx kernel package with make-kpkg, one has to use
fakeroot make-kpkg, as the documentation
http://xoomer.virgilio.it/flavio.stanchina/debian/fglrx-installer.html#install correctly states.
Ideally, however, one could run make-kpkg --rootcmd fakeroot. Trying to
run this command give the indication that the functionality should be
supported:
Perhaps /usr/src/modules/fglrx does not understand --rootcmd?
If you see messages that indicate that it is not
in fact being built as root, please file a bug
against /usr/src/modules/fglrx.
There are a couple of ways to enable --rootcmd to work. The easiest
would be a "$(ROOT_CMD) make -C ./" in the kdist target. I believe the
intention of Manoj Srivastava when he added $(ROOT_CMD) was to limit
fakeroot (or friends) to be used only when necessary. The rationale
behind this is more easily understood when the root command is sudo.
The Right Thing according to Manoj (as far as I can see) is to add
($ROOT_CMD) in front of every command that actually need a root
environment. This messes up the debian/rules file a bit, but is the most
flexible solution. I attached a patch with the necessary changes.
I leave it to you to determine if you want to include the patch in a
future release. I've tested the patch with make-kpkg --rootcmd fakeroot,
make-kpkg --rootcmd sudo and module-assistant together with
fglrx-kernel_8.14.13-1 and Linux vanilla 2.6.12.
Alexandru: Your 2.6.12 patch works fine for me, but gives some warnings
I'm sure you know about.
Cheers,
Øystein Gisnås
Attachment:
root_cmd.patch
Description: Text Data