From 17f76dfa6abc17a36d78b9e1dc0354cbccc98489 Mon Sep 17 00:00:00 2001 From: Michael Meffie Date: Thu, 5 Apr 2018 22:56:50 -0400 Subject: [PATCH] redhat: remove extra kernel version check Commit a1c072ac562ccf74e5afb8449db1bcef86aef362 (redhat: fix rpmbuild command line option defaults) added logic to set the default value of the kernvers variable when not specified as an rpmbuild command line option. This default value is not necessary, since 'kmodtool verrel' already returns the current running kernel version by default. The result of 'kmodtool verrel' sets the kverrel variable, which holds the value of the kernel version we are building. The kernvers variable is only used as an argument to 'kmodtool verrel' and may be empty by default to indicate the current version should be returned. Remove the unnecessary setting of the default value of kernvers. Also update the information banner to show the value of kverrel, which is the actual version we are building, instead of kernvers, which is empty be default. Reviewed-on: https://gerrit.openafs.org/12995 Tested-by: BuildBot Reviewed-by: Stephan Wiesand Reviewed-by: Benjamin Kaduk (cherry picked from commit 9f0164f4254da39c3c31e0268da58ce7a6ccda1d) Change-Id: I355e3772c6bda18a385b48be80fb7f952c2fca3b Reviewed-on: https://gerrit.openafs.org/12998 Reviewed-by: Benjamin Kaduk Tested-by: BuildBot --- src/packaging/RedHat/openafs.spec.in | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/packaging/RedHat/openafs.spec.in b/src/packaging/RedHat/openafs.spec.in index 9a039a41f..a0627c67c 100644 --- a/src/packaging/RedHat/openafs.spec.in +++ b/src/packaging/RedHat/openafs.spec.in @@ -12,14 +12,10 @@ # Determine presence of rpmbuild command line --define arguments and set # defaults if not present. # -%define kernvers_on_cmdline %{?kernvers:1}%{!?kernvers:0} %define build_userspace_on_cmdline %{?build_userspace:1}%{!?build_userspace:0} %define build_modules_on_cmdline %{?build_modules:1}%{!?build_modules:0} %define debugspec_on_cmdline %{?debugspec:1}%{!?debugspec:0} -%if !%{kernvers_on_cmdline} -%define kernvers %(uname -r) -%endif %if !%{build_userspace_on_cmdline} %define build_userspace 1 %endif @@ -417,7 +413,7 @@ krb4 lookalike services. : @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ : @@@ -: @@@ kernel version: %{kernvers} +: @@@ kernel version: %{kverrel} : @@@ kernel variations: %{kvariants} : @@@ PAM modules dir: %{pamdir} : @@@ build userspace: %{build_userspace} -- 2.39.5