From: Michael Meffie Date: Fri, 6 Apr 2018 02:56:50 +0000 (-0400) Subject: redhat: remove extra kernel version check X-Git-Tag: openafs-devel-1_9_0~587 X-Git-Url: https://git.openafs.org/?p=openafs.git;a=commitdiff_plain;h=9f0164f4254da39c3c31e0268da58ce7a6ccda1d;hp=909d8358109445fdb316b68a8e55e17626cf17c9 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. Change-Id: I45ded3b4f61ec60a64288b89c1d553df9fa7b867 Reviewed-on: https://gerrit.openafs.org/12995 Tested-by: BuildBot Reviewed-by: Stephan Wiesand Reviewed-by: Benjamin Kaduk --- diff --git a/src/packaging/RedHat/openafs.spec.in b/src/packaging/RedHat/openafs.spec.in index 71e4625..c68dde5 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}