[OpenAFS-devel] [PATCH] change OpenAFS-1.2.10 SRPM to work better with RedHat
David Howells
dhowells@redhat.com
Mon, 18 Aug 2003 11:51:37 +0100
> > (1) I've had trouble with the script...
>
> Which script? There's a runtime script, but I want to know about the above
> change, which refers to what you're building. (You corrected yourself on
> this, but it's still a build-time change)
src/afsd/afs.rc.linux
> > (3) Modules from one version of the kernel shouldn't be changed...
>
> They were never changed. No modification is made to built modules.
It invokes /sbin/insmod with a "-P prefix" flag. This constitutes a
modification of the module.
> Let me ask a question more clearly: do your changes preclude building for
> all kernels whose sources I have installed (even if I can't do it with a
> single invocation of rpm, let's ignore than for the moment, can I at least
> build for older kernerls?)
Yes, if you add the change to the spec file that I mentioned in response to
Rudolph T Maceyko <rtm@cert.org>.
-%define krpmvers %(rpm -q --whatprovides kernel | sort | tail -1)
+%define krpmvers_on_cmdline %{?krpmvers:1}%{!?krpmvers:0}
+%if !%{krpmvers_on_cmdline}
+%define krpmvers %(rpm -q --whatprovides kernel | sort | tail -1)
+%endif
And then:
rpmbuild -bb \
--target=i686 \
--define "krpmvers kernel-2.4.20-1.1931.2.231.2.11.ent" \
/usr/src/redhat/SPECS/openafs.spec
Further command line define options could be made available to specify whether
you desire the userspace and/or kernel modules to be built.
David