Hi, Attached is a patch that can be applied to an installed OpenAFS-1.2.10 SRPM to change it in certain ways to make it more suitable for use with a RedHat system, in particular RH Enterprise Linux.
You should be able to apply the patch by:
rpm -i openafs-1.2.10-rh9.0.1.src.rpm
cd /usr/src/redhat
bzcat beehive-1.2.10-2.diff.bz2 | patch -p0
We also do the following because our buildfarm demands certain things about
the name of the spec file. I have not made the patch do this automatically so
that the changess made to the spec file can more easily be seen.
mv SPECS/openafs-1.2.10.spec SPECS/openafs.spec
The changes that this patch makes are:
(1) The only kernel modules built are all appropriate to the currently
running kernel version and the target CPU specified on the command line.
The configurations considered are listed in the "kvariations" variable
in the spec file:
%define kvariations up smp bigmem
This will build a module for each of the three configurations:
up Uniprocessor only
smp SMP support only
bigmem SMP and big memory support
The CPU target is specified during the build:
rpmbuild -bb --target=i686 SPECS/openafs-1.2.10.spec
rpmbuild -bb --target=athlon SPECS/openafs-1.2.10.spec
(2) Each kernel module is packaged individually into its own RPM file, named
for the kernel version, kernel configuration and CPU target:
openafs-kernel-1.2.10-2.4.21_1.1931.2.384.ent_2.athlon.rpm
openafs-kernel-1.2.10-2.4.21_1.1931.2.384.ent_2.i686.rpm
openafs-kernel-bigmem-1.2.10-2.4.21_1.1931.2.384.ent_2.athlon.rpm
openafs-kernel-bigmem-1.2.10-2.4.21_1.1931.2.384.ent_2.i686.rpm
openafs-kernel-smp-1.2.10-2.4.21_1.1931.2.384.ent_2.athlon.rpm
openafs-kernel-smp-1.2.10-2.4.21_1.1931.2.384.ent_2.i686.rpm
(3) Each kernel module RPM requires the matching version of kernel to be
installed:
dhowells>rpm -qpR openafs-kernel-smp-1.2.10-2.4.21_1.1931.2.384.ent_2.i686.rpm
/bin/sh
/bin/sh
kernel-smp = 2.4.21-1.1931.2.384.ent
openafs = 1.2.10
rpmlib(CompressedFileNames) <= 3.0.4-1
rpmlib(PayloadFilesHavePrefix) <= 4.0-1
rpmlib(VersionedDependencies) <= 3.0.3-1
(4) The kernel module RPM places the module in the appropriate directory
under /lib/modules:
dhowells>rpm -qpl openafs-kernel-smp-1.2.10-2.4.21_1.1931.2.384.ent_2.i686.rpm
/lib/modules/2.4.21-1.1931.2.384.entsmp/kernel/fs/openafs/openafs.o
Note that this means that whilst you _can_ have RPMs for multiple
configurations (UP vs SMP vs Bigmem) of different kernel versions
installed simultaneously, you _can't_ have RPMs for the same kernel
version and configuration but different CPUs installed at the same time
as they'd have to go under the same path and filename.
(5) The openafs-client and -server RPMs require at least one kernel module
RPM to be installed first.
(6) The userpace tools are only built for the i386 target. Modules are only
built for non-i386 targets. Non-x86 archs are not yet supported.
(7) Service start now simply does a "modprobe openafs" to load the module
rather than trying to guess which of several modules to use and then
patching it up. Doing otherwise may cause problems.
(8) The kernel module is now given MODULE_* parameters.
(9) All lines including <net/if.h> or "net/if.h" in the module now include
<linux/if.h> instead.
(10) OpenAFS made invalid assumptions about the Linux VM works in trying to
check the "type" of bits of memory it has allocated. The code that did
this is now commented out.
David
beehive-1.2.10-2.diff.bz2
Description: Binary data
