Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 68442 - media-video/nvidia-kernel (kmod -> kernel-mod)
Summary: media-video/nvidia-kernel (kmod -> kernel-mod)
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All All
: High normal (vote)
Assignee: Gentoo X packagers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-10-21 13:04 UTC by Stefan Schweizer (RETIRED)
Modified: 2004-11-06 18:13 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
nvidia-kernel-1.0.6111-r2.ebuild (nvidia-kernel-1.0.6111-r2.ebuild,3.98 KB, text/plain)
2004-10-21 13:05 UTC, Stefan Schweizer (RETIRED)
Details
nvidia.diff (nvidia.diff,1.49 KB, patch)
2004-10-21 13:05 UTC, Stefan Schweizer (RETIRED)
Details | Diff
nvidia.diff (nvidia.diff,2.48 KB, patch)
2004-10-24 08:40 UTC, Stefan Schweizer (RETIRED)
Details | Diff
nvidia-kernel-1.0.6111-r2.ebuild (nvidia-kernel-1.0.6111-r2.ebuild,4.22 KB, text/plain)
2004-10-24 08:41 UTC, Stefan Schweizer (RETIRED)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Stefan Schweizer (RETIRED) gentoo-dev 2004-10-21 13:04:12 UTC
Hi,

Nvidia ebuild uses kmod functions, which is being removed from the tree. i've converted it to kernel-mod.eclass
Comment 1 Stefan Schweizer (RETIRED) gentoo-dev 2004-10-21 13:05:12 UTC
Created attachment 42339 [details]
nvidia-kernel-1.0.6111-r2.ebuild

I only compile-tested it, as I have no nvidia.
Comment 2 Stefan Schweizer (RETIRED) gentoo-dev 2004-10-21 13:05:32 UTC
Created attachment 42340 [details, diff]
nvidia.diff
Comment 3 Andrew Bevitt 2004-10-21 18:16:55 UTC
kernel-mod eclass does not set the variable KV_OUTPUT, nor does it provide a similar variable, as far as I have been able to ascertain.

This is the reason I have not changed the nvidia ebuilds allready.

Without the KV_OUTPUT or equivelent variable, people using koutput kernels (ie building the kernel modules outside of /usr/src/linux (or wherever you keep your sources) just wont work.

If someone can justify why this feature (which is part of nvidia's package now) should not be used fine, but until then I would prefer to see kernel-mod and kmod merged to keep said support available. (Im not asking for justification on removing kmod, im asking why we shouldnt use the ability provided in nvidias package to build the kernel module outside of /usr/src/linux).
Comment 4 Donnie Berkholz (RETIRED) gentoo-dev 2004-10-21 22:39:46 UTC
Maybe Pete can comment on that.
Comment 5 Stefan Schweizer (RETIRED) gentoo-dev 2004-10-22 03:55:32 UTC
Because we do not need this ability on kernels > 2.6.6. If you see people still using the old version please tell them to upgrade.
Comment 6 Andrew Bevitt 2004-10-22 06:14:38 UTC
What? The koutput stuff never got introduced support wise until 2.6.6!

So how can the support _not_ be needed in > 2.6.6
Comment 7 Daniel Drake (RETIRED) gentoo-dev 2004-10-22 06:31:33 UTC
The 2.6.6 release introduced a fix to the build system where you can specify output directories, and as such, external module builds do not require write access to /usr/src/linux (if passed with the right params). I believe thats one of the main reasons that config-kernel/koutput is no longer supported and kmod is being removed - the problem that we tried to solve no longer exists.
Comment 8 Andrew Bevitt 2004-10-22 08:26:13 UTC
Allright after going back through gentoo-dev and finding the mail about this...

We need to 
 1) change SUBDIRS to M in Makefile.kbuild
 2) change SYSOUT="${KV_OUTPUT}" to SYSOUT="${S}"
 3) apply the changes in the diff here

We should only do (1) for >= 2.6.6 kernels, and we should do the .ko / .o checking for 2.5 kernels aswell.

Stefan I know you think people should be made to upgrade, but im not going to put something in the tree that isnt totally fool proof, it will support 2.4, 2.5 and 2.6 kernels.
Comment 9 Stefan Schweizer (RETIRED) gentoo-dev 2004-10-24 08:40:51 UTC
Created attachment 42495 [details, diff]
nvidia.diff

We do not support 2.5 kernels and 2.6 kernels < 2.6.6. And we do not need to,
as they have security problems.
Comment 10 Stefan Schweizer (RETIRED) gentoo-dev 2004-10-24 08:41:20 UTC
Created attachment 42496 [details]
nvidia-kernel-1.0.6111-r2.ebuild
Comment 11 Andrew Bevitt 2004-10-24 15:31:56 UTC
OK that new patch is much better, but there still is one 2.6.5 kernel in the tree, so we WILL be supporting them, until such time as it is removed. Yes people should upgrade, especially those using 2.5 kernels, but im not going to just because im lazy and wont put one if statement in the ebuild.

Donnie : Im going to commit this and a few other changes this afternoon, I'll make 6111 stable at the same time.
Comment 12 Daniel Drake (RETIRED) gentoo-dev 2004-10-24 16:03:58 UTC
The if statement won't resolve problems for people using 2.5.* or <2.6.6 kernels. There was a problem in the build system, where even if you fed it a valid SUBDIRS= parameter, it still writes stuff into /usr/src/linux (this is not currently an issue in the kmod ebuild because we call addwrite).

2.6.6 introduced a fix, where *all* writing is now done in the directory supplied in SUBDIRS. This pretty much removed the need for kmod. At the same time, they renamed the SUBDIRS variable to M, and although SUBDIRS still works (as well as M), SUBDIRS may well be removed from the build system soon.

Does this make sense now?
Comment 13 Andrew Bevitt 2004-10-24 22:12:06 UTC
Its called dieing and telling them to disable sandbox (or preferably upgrade).

Its what we did when 2.6.6 was first released and the support for M= was introduced. I didnt like it then, I dont now .. well not really .. Actually maybe it should just die, and tell them to upgrade (like at the moment it doesnt do anything to deal with the issue, it will simply fail for no apparent reason with sandbox, or some undefined symbol error).
Comment 14 Radoslaw Szkodzinski 2004-10-25 10:08:26 UTC
Both this and original nvidia-kernel-1.0.6111-r2 ebuild are broken when using O= kernel option. I'm using kernel 2.6.9-cko2, but 2.6.9 is broken too.
Comment 15 Stefan Schweizer (RETIRED) gentoo-dev 2004-10-25 10:33:54 UTC
Why do you need O=?
Comment 16 Radoslaw Szkodzinski 2004-10-25 12:48:18 UTC
I don't need it actually, it just seemed like an elegant way to keep kernel sources and object files separate. Yes, I know distclean will remove them without any problem.

With O= it is possible to update different kernel configs (add patches) without recompiling most everything, for say e.g. different archs.
Well, nvidia-kernel works only on two, but other packages may support more.

KV_OUTPUT isn't detected properly in kmod.eclass and required one tiny modification to enable overriding of that variable.
Comment 17 Andrew Bevitt 2004-10-25 15:19:29 UTC
> KV_OUTPUT isn't detected properly in kmod.eclass and required one tiny 
> modification to enable overriding of that variable.

Well its important that we support O=. What is the modification?

Actually come to think of it, kmod.eclass has nothing to do with M=, kmod.eclass as it is currently being used in the ebuild is required only to determine where the built objects and headers are, in the system.
Comment 18 Radoslaw Szkodzinski 2004-10-26 13:03:32 UTC
The diff:
--- eclass/kmod.eclass  2004-06-25 03:13:00.000000000 +0200
+++ eclass/kmod.eclass.new      2004-10-26 22:02:37.329487952 +0200
@@ -146,11 +146,14 @@
        KV_TYPE="${KV_MK_TYPE}"

        # if we found an output location, use that. otherwise use KERNEL_DIR.
-       if [ ! -z "${KV_MK_OUTPUT}" ]
+       if [ -n "${KV_MK_OUTPUT}" ]
        then
                KV_OUTPUT="${ROOT}/${KV_MK_OUTPUT}"
        else
-               KV_OUTPUT="${KERNEL_DIR}"
+               if [ -z "${KV_OUTPUT}" ]
+               then
+                       KV_OUTPUT="${KERNEL_DIR}"
+               fi
        fi

        # KV_OBJ can be used when manually installing kernel modules

* end *
Comment 19 Daniel Drake (RETIRED) gentoo-dev 2004-10-26 13:11:48 UTC
I'm a little confused. We are working on migrating away from kmod (its no longer needed, not supported, will be removed, hence this bug), so why are we worrying about it?

As for the O= thing, no, I don't think we'll be supporting this (even with kernel-mod) just yet. johnm is planning to rewrite config-kernel, maybe we'll have this kind of functionality then.
Comment 20 Andrew Bevitt 2004-11-06 18:13:22 UTC
Fixed in 6629 and 6111-r3, removing blocks on both.