]> git.michaelhowe.org Git - packages/o/openafs.git/commit
RPM: Fix dkms support on Fedora 15
authorTodd Lewis <Todd_Lewis@unc.edu>
Sun, 11 Sep 2011 11:42:47 +0000 (12:42 +0100)
committerDerrick Brashear <shadow@dementix.org>
Fri, 16 Dec 2011 11:53:12 +0000 (03:53 -0800)
commitf10ee6b52252c8e2663da0ec8786b88e570d3f32
tree002b98e658ed24c8856a3a7b1d580b09ca6176fb
parent44597ff4ce39001c7d19f8497f4fc0786d19d660
RPM: Fix dkms support on Fedora 15

Newer dkms no longer uses or supplies a $kernelver_array variable;
instead it uses $kernelver. The attached patch uses both, one of
which will be empty, so the test will do the Right Thing regardless
of your dkms version.

Further, the "mv" command at the end of the MAKE[0]= line needs
lots of back-slashes on each of its parms. We need three to make it
all the way to the final dkms.conf file -- so that's six -- plus one
more to escape the '$'; that's seven in all.

In case there's any question (and with all the back-slashes involved,
there should be) about the intent here, the whole point of this
patch is to make the final dkms.conf MAKE[0]= line look like this
(module line breaks:

MAKE[0]="KMODNAME=openafs.ko; DSTKMOD=\".\"; [ \"\`echo
\"${kernelver_array[0]}${kernelver[0]}\" | sed -e
's/^\([0-9]*\.[0-9]*\)\..*/\1/'\`\" = \"2.4\" ] && KMODNAME=\"libafs-*\"
&& DSTKMOD=openafs.o; ./configure
--with-linux-kernel-headers=${kernel_source_dir}
--with-linux-kernel-packaging; make; mv src/libafs/MODLOAD-*/\\\$KMODNAME
\\\$DSTKMOD"

This is what was required to get "dkms build ..." to work on Fedora 15,
and as near as I can tell it shouldn't break 2.4 or other builds.

FIXES 130211

Reviewed-on: http://gerrit.openafs.org/5393
Tested-by: Derrick Brashear <shadow@dementix.org>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
(cherry picked from commit 8e0aaae076f4cccfd2d6ed81ede4e355235b578e)

Change-Id: I47b0e24a0cbbd8402d5dd902e7e2af59ca1c30b7
Reviewed-on: http://gerrit.openafs.org/6312
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
src/packaging/RedHat/openafs.spec.in