From c1a61e3e9129d0e2062eed617d922e6dfa9ede5a Mon Sep 17 00:00:00 2001 From: "Brian J. Murrell" Date: Thu, 5 May 2011 15:26:56 -0400 Subject: [PATCH] LU-284 strip .$arch off of kern vers for requires RHEL6 appends .arch to the end of the version in the utsrelease.h file. The kernel RPM however provides that value with the .arch stripped off, so do the same stripping in the lustre-modules RPM for it's Requires:. Signed-off-by: Brian J. Murrell Change-Id: Ib6ff32c006f184edceb5d667b649bb106d503faf Reviewed-on: http://review.whamcloud.com/502 Reviewed-by: Oleg Drokin Tested-by: Hudson Reviewed-by: Andreas Dilger --- lustre.spec.in | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lustre.spec.in b/lustre.spec.in index ee60800..d14a6f5 100644 --- a/lustre.spec.in +++ b/lustre.spec.in @@ -41,6 +41,9 @@ #%%global _use_internal_dependency_generator 0 %define is_client %(bash -c "if [[ %{lustre_name} = *-client ]]; then echo -n '1'; else echo -n '0'; fi") +# for those uses that don't want the -smp/-bigsmp (or the .arch) on the end +# of %kversion +%define krequires %(bash -c "echo %{kversion} | sed -e 's/\.x86_64$//' -e 's/\.i[3456]86$//' -e 's/-smp$//' -e 's/-bigsmp$//' -e 's/-ppc64$//' -e 's/-default$//'") %define sles10 %(bash -c "if [ "%sles_version" = "10" ]; then echo -n '1'; else echo -n '0'; fi") @@ -75,7 +78,7 @@ Requires: kernel-%{flavor} %if %{_vendor}=="redhat" || %{_vendor}=="fedora" # for RHEL we need to require the specific kernel still since weak-modules # support on RH is, well, weak, to be punny about it -Requires: kernel = %{kversion} +Requires: kernel = %{krequires} %endif %endif %if ! %{is_client} -- 1.8.3.1