X-Original-To: alpine-devel@lists.alpinelinux.org Delivered-To: alpine-devel@lists.alpinelinux.org Received: from mail49.e.nsc.no (mail49.e.nsc.no [193.213.115.49]) by lists.alpinelinux.org (Postfix) with ESMTP id E2FCA170000B7 for ; Thu, 30 Oct 2008 12:28:58 +0000 (UTC) Received: from mail.nor.wtbts.org ([213.234.126.131]) by mail49.nsc.no (8.13.8/8.13.5) with ESMTP id m9UCStao011934 for ; Thu, 30 Oct 2008 13:28:56 +0100 (MET) Received: from mail.nor.wtbts.org (localhost [127.0.0.1]) by mail.nor.wtbts.org (Postfix) with ESMTP id B63A8E13587A for ; Thu, 30 Oct 2008 13:28:55 +0100 (CET) Received: from [192.168.65.211] (nc.nor.wtbts.org [192.168.65.211]) by mail.nor.wtbts.org (Postfix) with ESMTP id 97370E138F77 for ; Thu, 30 Oct 2008 13:28:55 +0100 (CET) Subject: [alpine-devel] RFC: special kernel source packages From: Natanael Copa To: Alpine Development Content-Type: text/plain Date: Thu, 30 Oct 2008 13:28:55 +0100 Message-Id: <1225369735.8417.49.camel@nc> X-Mailinglist: alpine-devel Precedence: list List-Id: Alpine Development List-Unsubscribe: List-Post: List-Help: List-Subscribe: Mime-Version: 1.0 X-Mailer: Evolution 2.22.3.1 Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV using ClamSMTP Hi, So in the long run I hope we can build everything with abuild rather than gentoo. I would like som feedback on how to deal with kernels and kernelmodules. Now the kernel modules are in the modloop loopback file, and i'd like to continue with that. But to be able to better support native harddisk installs i'd like to build the modloop from kernel/module packages. We have different kernels and I'd like to be able to support same kernel with different configurations, package flavors (i.e one kernel with smp/highmem and one without). Even if we only have a grsecurity kernel and a vsgersec kernel at the moment, I'd like to be able to scale. For example, lets say we have linux-grsec and linux-grsec-smp we have to APKBUILDS: core/linux-grsec/APKBUILD and core/linux-grsec-smp/APKBUILD. They are almost identical, but they have their own kernelconfig file. We have those alternatives: A) reuse the tmp srcdir from kernel build during build the entire kernel source is extracted to src/, the kernelconfig file is copied over and then: 'cd $srcdir/linux-2.6.26 && make'. The object files ends up in same tree as the sources, just like any other package do. The external module zaptel-grsec will reuse the temp build dir for the kernel, telling make that it will find kernel sources and configs in $startdir/../linux-grsec/src/linux-2.6.26. This requires that the kernel is actually built before the modules can be built. (so if you just want to build the module you get truoble unless you build the entire kernel first) abuild have no chance to trace the makedepends (unless we hack it to ugliness) pros: simple. no non-standard source package cons: bad usage of resources (disk space, cpu etc) on build host, abuild cannot trace build dependecies properly. B) create a special linux-sources{,-grsec,-vsgrsec} package as a makedepends The linux-sources-grsec is a make dependency for linux-grsec and linux-grsec-smp. The sources package only installs the (patched) kernel source into /usr/src, and thats it. The linux-grsec build() function will look something like this: build() { mkdir -p $srcdir/kout cd $srcdir/kout cp ../kernelconfig .config make -C /usr/src/linux-2.6.26-grsec O="$PWD" oldconfig make ... } The point is, all different flavours of the same kernel sources (i.e linux-grsec and linux-grsec-smp) will reuse the kernel sources in /usr/src and only object files ends up in the packages ends up in packages temp area. The external module package, lets say openiscsi, will use the same source package as makedepends + the binary package (where the kernel config is found). The build() will look something like: build() { mkdir -p $srcdir/kout cd $srcdir/kout cp $_kernelconfig .config make -C /usr/src/linux-2.6.26-grsec O="$PWD" oldconfig mkproper # openiscsi now finds the kernel output in $srcdir/kout ... } pros: effecive use of diskspace. you dont need compile kernel to build external modules. proper makedepends handling in abuild script. cons: slightly more complex. needs non-standard kernel source package. I guess I have made up my mind already. I think I'll go for B unless someone comes with really good arguments for A. Other ideas? -nc --- Unsubscribe: alpine-devel+unsubscribe@lists.alpinelinux.org Help: alpine-devel+help@lists.alpinelinux.org ---