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 <buildbot@rampaginggeek.com>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
(cherry picked from commit
9f0164f4254da39c3c31e0268da58ce7a6ccda1d)
Change-Id: I355e3772c6bda18a385b48be80fb7f952c2fca3b
Reviewed-on: https://gerrit.openafs.org/12998
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
# 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
: @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
: @@@
-: @@@ kernel version: %{kernvers}
+: @@@ kernel version: %{kverrel}
: @@@ kernel variations: %{kvariants}
: @@@ PAM modules dir: %{pamdir}
: @@@ build userspace: %{build_userspace}