X-Original-To: alpine-devel@lists.alpinelinux.org Delivered-To: alpine-devel@lists.alpinelinux.org Received: from rv-out-0506.google.com (unknown [209.85.198.234]) by lists.alpinelinux.org (Postfix) with ESMTP id A991C1EC80C for ; Tue, 7 Apr 2009 14:25:53 +0000 (UTC) Received: by rv-out-0506.google.com with SMTP id l9so2528608rvb.25 for ; Tue, 07 Apr 2009 07:25:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type; bh=66gs+6kZ4Y7NGUp0EeSt3w9H1j5g439T9i8H6uGiJtg=; b=cMJmJBaXTZTQRarpzoV1hZpvi3eh32Q+qhtavAG2vUkgGNQUqCBgGEJMu7qOxf95HN dDhPJNko5VnWdZ0ezPk/LjGq9T5CLpTWvP8c6Sq2Tu4Gkoi3f54+jT5LmL2rdxgCTfx8 aUqIzhbcqa1bitwVHo+2YZzBI9Mg+HUxxE0Hc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=WuvhrYSXVpUeJsaFWmIDRKMDLbWAoh4zHud1EuLnebi9WQWLu8B5YeFUo8Co46TqVq JzFScoDaLdm+yCbuQ3Vq43v8//CeJJ7sdksyN0uKfv3flAXnqoIc/TLwLDYdYtk4AA5G PHg45zjP+zHql6VzpbEYTGvnhqscSDPCE7VCA= X-Mailinglist: alpine-devel Precedence: list List-Id: Alpine Development List-Unsubscribe: List-Post: List-Help: List-Subscribe: MIME-Version: 1.0 Received: by 10.220.97.75 with SMTP id k11mr375708vcn.39.1239114351575; Tue, 07 Apr 2009 07:25:51 -0700 (PDT) In-Reply-To: <49DB58C3.4080505@iki.fi> References: <1239110538.15720.63.camel@nc> <49DB58C3.4080505@iki.fi> Date: Tue, 7 Apr 2009 09:25:51 -0500 Message-ID: <531b02ea0904070725u7318f7bfu40eb9d4f758b2ef9@mail.gmail.com> Subject: Re: [alpine-devel] dealing with kernel module apkbuilds From: Cameron Banta To: =?ISO-8859-1?Q?Timo_Ter=E4s?= Cc: Natanael Copa , Alpine-devel Content-Type: multipart/alternative; boundary=0016e64c2412c30f2f0466f7caa5 --0016e64c2412c30f2f0466f7caa5 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable 2009/4/7 Timo Ter=E4s > Natanael Copa wrote: > > 2. we include the kernel version in the kernel module package pkgver. > > This is doe by sourcing the kernel APKBUILD. For example: > > > > # source kernel version > > . ../linux-grsec/APKBUILD > > pkgname=3Ddahdi-linux-grsec > > _dahdiver=3D2.1.0.4 > > pkgver=3D$pkgver.$pkgrel.$_dahdiver > > pkgrel=3D1 > > ... > > > > If kernel is 2.6.28.9-r4, the dadhdi-linux-grsec would here end up as > > 2.6.28.9.4.2.1.0.4-r1 > > > > Alternatively we could just add the pkgrels so reduce one digit: > > # source kernel version > > . ../linux-grsec/APKBUILD > > pkgname=3Ddahdi-linux-grsec > > _dahdiver=3D2.1.0.4 > > _rel=3D1 > > pkgver=3D$pkgver.$_dahdiver > > pkgrel=3D$(( $_rel + $pkgrel )) > > ... > > > > In this example we would end up with > > dahdi-linux-grsec-2.6.28.9.2.1.0.4-r4 > > > > If we now upgrade the kernel to 2.6.28.9-r5 then will 'abuild up2date' > > detect that the package is missing and will trigger a rebuild and thing= s > > just works. However, it is somewhat hackish, creates ugly version > > numbers and is not so simple. > > But the drawback is that it will not auto rebuild if kernel is updated. > > > > What do you prefer? > > I'd prefer something like option 2. > > But I would not include the kernel version in the package version. > Instead apk-tools should do versioned dependencies. Then during build > you could just rebuild packages that have no longer valid dependencies > after kernel package upgrade. > > Ideally you should not need to specify the kernel flavor in apkbuild. > Instead the build system should know all available kernel variants, > and rebuild the modules for each variant. > > - Timo > > Speaking of ideally, I think it would be nice to have a parameter in APKBUILD that specified this package was a kernel or a kernel module. Then abuild would have a couple extra options for building kernels and kernel modules. For example, if you were building a module, you would need to specify to abuild which kernel you wanted to build it for. e.g: abuild -K ../linux-grsec If you were building a kernel, you could specify to build all the modules with it and it would would find them dynamically and build them. e.g: abuild -m Any scripts to build all the packages could simply ignore the kernel modules, and tell each kernel it builds to build the modules with it. Perhaps the extra work to abuild is not worth it, though. -Cameron --0016e64c2412c30f2f0466f7caa5 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
2009/4/7 Timo Ter=E4s <timo.teras@iki.fi>
Natanael Copa wrote:
> 2. we include the kernel version in the kernel module package pkgver.<= br> > This is doe by sourcing the kernel APKBUILD. For example:
>
> # source kernel version
> . ../linux-grsec/APKBUILD
> pkgname=3Ddahdi-linux-grsec
> _dahdiver=3D2.1.0.4
> pkgver=3D$pkgver.$pkgrel.$_dahdiver
> pkgrel=3D1
> ...
>
> If kernel is 2.6.28.9-r4, the dadhdi-linux-grsec would here end up as<= br> > 2.6.28.9.4.2.1.0.4-r1
>
> Alternatively we could just add the pkgrels so reduce one digit:
> # source kernel version
> . ../linux-grsec/APKBUILD
> pkgname=3Ddahdi-linux-grsec
> _dahdiver=3D2.1.0.4
> _rel=3D1
> pkgver=3D$pkgver.$_dahdiver
> pkgrel=3D$(( $_rel + $pkgrel ))
> ...
>
> In this example we would end up with
> dahdi-linux-grsec-2.6.28.9.2.1.0.4-r4
>
> If we now upgrade the kernel to 2.6.28.9-r5 then will 'abuild up2d= ate'
> detect that the package is missing and will trigger a rebuild and thin= gs
> just works. However, it is somewhat hackish, creates ugly version
> numbers and is not so simple.
> But the drawback is that it will not aut= o rebuild if kernel is updated.
>
> What do you prefer?

I'd prefer something like option 2.

But I would not include the kernel version in the package version.
Instead apk-tools should do versioned dependencies. Then during build
you could just rebuild packages that have no longer valid dependencies
after kernel package upgrade.

Ideally you should not need to specify the kernel flavor in apkbuild.
Instead the build system should know all available kernel variants,
and rebuild the modules for each variant.

- Timo


Speaking of ideally, I think it would be= nice to have a parameter in APKBUILD that specified this package was a ker= nel or a kernel module. Then abuild would have a couple extra options for b= uilding kernels and kernel modules.

For example, if you were building a module, you would need to specify t= o abuild which kernel you wanted to build it for.=A0 e.g:
abuild -K ../l= inux-grsec

If you were building a kernel, you could specify to build= all the modules with it and it would would find them dynamically and build= them.=A0 e.g:
abuild -m

Any scripts to build all the packages could simply ignore = the kernel modules, and tell each kernel it builds to build the modules wit= h it.

Perhaps the extra work to abuild is not worth it, though.

-Cameron
--0016e64c2412c30f2f0466f7caa5-- --- Unsubscribe: alpine-devel+unsubscribe@lists.alpinelinux.org Help: alpine-devel+help@lists.alpinelinux.org ---