Using a vanilla kernel from git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git fails as (at least) on this branch @* master bf923ab Add linux-next specific files for 20091211 some header files moved from linux/ to generated/ So all module emerges fail. I assume that the all kernel trees will move to this layout (I may be wrong at this topic), so I file a patched virtualbox-modules file here. I also patched nvidia-drivers, but that beast is a bit more complex, so I installed it by hand. I might completely patch those modules if you give me a git overlay repository/repository branch that I can publish to.
Created attachment 213731 [details, diff] git patch mail to compile against linux-next.git kernels against virtualbox-modules-3.1.0.ebuild
Hi, I assume this also works for 2.6.33-rc? I also get errors about autoconf.h when trying to emerge virtualbox-modules with this newer kernel. However I can't get the patch to apply properly, it produces errors. Here's the part i modified in the ebuild: src_prepare() { # Apply 2.6.32 Patch epatch "${FILESDIR}/virtualbox-modules-2.6.32.patch" } And here's some output from the patching attempt: PATCH COMMAND: patch -p4 -g0 -E --no-backup-if-mismatch < /usr/local/portage/myoverlay/app-emulation/virtualbox-modules/files/virtualbox-modules-2.6.32.patch =========================================== missing header for unified diff at line 17 of patch can't find file to patch at input line 17 Perhaps you used the wrong -p or --strip option? The text leading up to this was: -------------------------- |From 1f713a0d637ad4ab05e2ed9cec6b040cca966df5 Mon Sep 17 00:00:00 2001 |From: Ingo Krabbe <ingo.krabbe@eoa.de> |Date: Tue, 22 Dec 2009 08:47:05 +0100 |Subject: [PATCH] new version works now for 2.6.32 kernels | |--- | app-emulation/virtualbox-modules/Manifest | 3 +- | ...32-moves-linux-autoconf.h-generated-autoc.patch | 123 ++++++++++++++++++++ | .../virtualbox-modules-3.1.0.ebuild | 6 + | 3 files changed, 131 insertions(+), 1 deletions(-) | create mode 100644 app-emulation/virtualbox-modules/files/kernel-2.6.32-moves-linux-autoconf.h-generated-autoc.patch | |diff --git a/app-emulation/virtualbox-modules/Manifest b/app-emulation/virtualbox-modules/Manifest |index ac40080..c1d5332 100644 |--- a/app-emulation/virtualbox-modules/Manifest |+++ b/app-emulation/virtualbox-modules/Manifest -------------------------- No file to patch. Skipping patch. 1 out of 1 hunk ignored patching file kernel-2.6.32-moves-linux-autoconf.h-generated-autoc.patch missing header for unified diff at line 161 of patch can't find file to patch at input line 161 Perhaps you used the wrong -p or --strip option? The text leading up to this was: -------------------------- |diff --git a/app-emulation/virtualbox-modules/virtualbox-modules-3.1.0.ebuild b/app-emulation/virtualbox-modules/virtualbox-modules-3.1.0.ebuild |index 0695489..a78fb4b 100644 |--- a/app-emulation/virtualbox-modules/virtualbox-modules-3.1.0.ebuild |+++ b/app-emulation/virtualbox-modules/virtualbox-modules-3.1.0.ebuild -------------------------- No file to patch. Skipping patch. 1 out of 1 hunk ignored
Your patch command looks a bit strange to me. What I actually did to create and apply this patch, was to "git init" my portage overlay, and then git am 0001-new-version[...].git (or git apply, what you prefer) What also works is cd $(your-overlay)/app-emulation/virtualbox-modules patch -p3 0001-new[...]patch Sorry for the inconvenience, but I find it most easy to just use git.
*** Bug 300326 has been marked as a duplicate of this bug. ***
*** Bug 298258 has been marked as a duplicate of this bug. ***
Created attachment 218379 [details, diff] files/virtualbox-modules-2.6.32.patch I read your patch and if I correctly understood the problem we can simply sed s/ linux/autoconf.h in generated/autoconf.h I did it and produced a useful patch The ebuild compiles fine
Created attachment 218381 [details] virtualbox-modules-3.1.2.ebuild
Created attachment 221149 [details, diff] 0001-autoconf.h-was-moved-in-2.6.33.patch This fixes building virtualbox-modules against 2.6.33 while keeping it compilable against earlier versions using #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 33) Works fine here.
3.1.4 has a fix already :) I don't care for old versions, if you use a ~arch kernel use ~arch modules, or else. I must say that that patch is a bit nicer than mine, if you feel like making upstream happy you can check if they've already adapted to it and if not provide them your patch. Thanks!