Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: iptables: Devel

[PATCH] Change default KERNEL_DIR location and add KBUILD_OUTPUT

 

 

iptables devel RSS feed   Index | Next | Previous | View Threaded


sven.wegener at stealer

Jul 14, 2007, 1:15 PM

Post #1 of 6 (1664 views)
Permalink
[PATCH] Change default KERNEL_DIR location and add KBUILD_OUTPUT

Setting KERNEL_DIR to the build symlink in /lib/modules is wrong. The
build symlink points to the location of generated object files and the
extension tests use KERNEL_DIR to check the availability of certain
source files. The tests will fail, if build and source point to
different locations. Change KERNEL_DIR from build to source and
introduce KBUILD_OUTPUT for the build symink.
Attachments: iptables-kbuild-output.patch (0.85 KB)


kaber at trash

Jul 15, 2007, 7:34 AM

Post #2 of 6 (1577 views)
Permalink
Re: [PATCH] Change default KERNEL_DIR location and add KBUILD_OUTPUT [In reply to]

Sven Wegener wrote:
> Setting KERNEL_DIR to the build symlink in /lib/modules is wrong. The
> build symlink points to the location of generated object files and the
> extension tests use KERNEL_DIR to check the availability of certain
> source files.

Good point.

> The tests will fail, if build and source point to
> different locations. Change KERNEL_DIR from build to source and
> introduce KBUILD_OUTPUT for the build symink.


What do we need KBUILD_OUTPUT for? Just the source tree should be enough.


sven.wegener at stealer

Jul 15, 2007, 8:31 AM

Post #3 of 6 (1576 views)
Permalink
Re: [PATCH] Change default KERNEL_DIR location and add KBUILD_OUTPUT [In reply to]

On Sun, Jul 15, 2007 at 04:34:24PM +0200, Patrick McHardy wrote:
> Sven Wegener wrote:
> > Setting KERNEL_DIR to the build symlink in /lib/modules is wrong. The
> > build symlink points to the location of generated object files and the
> > extension tests use KERNEL_DIR to check the availability of certain
> > source files.
>
> Good point.
>
> > The tests will fail, if build and source point to
> > different locations. Change KERNEL_DIR from build to source and
> > introduce KBUILD_OUTPUT for the build symink.
>
> What do we need KBUILD_OUTPUT for? Just the source tree should be enough.

For current kernels, true. Older kernels (before 2006-04-26) and the
whole 2.6.16.y series have a bug where include/linux/netfilter_ipv4.h
includes linux/config.h which includes linux/autoconf.h which is placed
into KBUILD_OUTPUT. Just changing KERNEL_DIR from build to source should
be enough for recent kernels. For older kernels building the iptables
package will fail with "linux/autoconf.h: No such file or directory"
unless we add the KBUILD_OUTPUT bit. That's why I added it. Do we want
to have this workaround here?

Sven


kaber at trash

Jul 15, 2007, 8:33 AM

Post #4 of 6 (1574 views)
Permalink
Re: [PATCH] Change default KERNEL_DIR location and add KBUILD_OUTPUT [In reply to]

Sven Wegener wrote:
> On Sun, Jul 15, 2007 at 04:34:24PM +0200, Patrick McHardy wrote:
>
>>What do we need KBUILD_OUTPUT for? Just the source tree should be enough.
>
>
> For current kernels, true. Older kernels (before 2006-04-26) and the
> whole 2.6.16.y series have a bug where include/linux/netfilter_ipv4.h
> includes linux/config.h which includes linux/autoconf.h which is placed
> into KBUILD_OUTPUT. Just changing KERNEL_DIR from build to source should
> be enough for recent kernels. For older kernels building the iptables
> package will fail with "linux/autoconf.h: No such file or directory"
> unless we add the KBUILD_OUTPUT bit. That's why I added it. Do we want
> to have this workaround here?


I don't see why not. A short comment in the Makefile explaining the
situation would be nice though.


sven.wegener at stealer

Jul 15, 2007, 9:01 AM

Post #5 of 6 (1576 views)
Permalink
Re: [PATCH] Change default KERNEL_DIR location and add KBUILD_OUTPUT [In reply to]

On Sun, Jul 15, 2007 at 05:33:50PM +0200, Patrick McHardy wrote:
> I don't see why not. A short comment in the Makefile explaining the
> situation would be nice though.

Updated patch attached.
Attachments: iptables-kbuild-output.patch (1.11 KB)


kaber at trash

Jul 15, 2007, 9:03 AM

Post #6 of 6 (1576 views)
Permalink
Re: [PATCH] Change default KERNEL_DIR location and add KBUILD_OUTPUT [In reply to]

Sven Wegener wrote:
> On Sun, Jul 15, 2007 at 05:33:50PM +0200, Patrick McHardy wrote:
>
>> I don't see why not. A short comment in the Makefile explaining the
>> situation would be nice though.
>>
>
> Updated patch attached.
>

Applied, thanks Sven.

iptables devel RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.