addpackages removed in FAI 2.9?

Ludwig Schwardt schwardt at sun.ac.za
Thu Jan 12 08:40:18 CET 2006


Hi,

If I may come back to the original subject line... I miss $addpackages, $kernelversion and $kernelimage.

My cluster is quite heterogeneous, with everything from Celerons to K6s to P4s floating around. I also have 
an (admittedly unhealthy) desire to have homemade kernels optimized for each CPU type, combined with 
kernel-dependent driver packages for things such as NVidia, NForce and ALSA.

My previous solution looks like this:

- Define CPU classes such as CPU_P2_SINGLE, CPU_P2_SMP, CPU_P4_SMP and CPU_K7_SINGLE.
- Define driver classes such as ALSA, VID_NVIDIA and NET_NFORCE2.
- Define LINUX26 for 2.6 kernel, else 2.4 kernel is used
- Define the major kernel version in only one place (currently DEFAULT.var):

ifclass LINUX26 || kernelversion=2.4.32
ifclass LINUX26 && kernelversion=2.6.15

- For each CPU class I source the appropriate variables and customize the kernel version, e.g.

CPU_P2_SINGLE.var:
kernelversion="${kernelversion}-dsp.p2.single"
kernelimage="kernel-image-${kernelversion}"

- For each driver class I add the new kernel version to the package name, e.g.

ALSA.var:
addpackages="$addpackages alsa-modules-${kernelversion}"

 From the new 'simple' examples it now seems I have to explicitly list the kernel and driver packages in 
package_config/DEFAULT or similar, e.g.

package_config/DEFAULT:
PACKAGES install CPU_P2_SINGLE
kernel-image-2.4.32-dsp.p2.single
PACKAGES install CPU_P2_SMP
kernel-image-2.4.32-dsp.p2.smp

The one problem is that a new kernel version means a lot of places to edit (which is error-prone). The other 
problem is that selecting the appropriate driver becomes more difficult. Ideally I want to say

if (CPU_P2_SINGLE && LINUX26 && ALSA) then
alsa-modules-2.6.15-dsp.p2.single

Unfortunately, the current package_config file format allows only two classes to be ANDed...

e.g. package_config/CPU_P2_SINGLE:
PACKAGES install ALSA
alsa-modules-2.6.15-dsp.p2.single

is equivalent to "if (CPU_P2_SINGLE && ALSA)"

(BTW, although this practice is discouraged in the FAI guide, I find this very useful, not just for DEFAULT. 
E.g. I have a DEVEL class for development packages, with subsections for AUDIO, CORBA, QT, etc.)

Am I correct to say that the following (undocumented) snippet

package_config/CLASS1:
PACKAGES install CLASS2 CLASS3
package

is equivalent to "if (CLASS1 && (CLASS2 || CLASS3)) then install package"?

Any help/comments would be appreciated. Maybe I'm taking this class concept too seriously :-)

Thanks,
Ludwig



More information about the linux-fai-devel mailing list