diff options
author | Masahiro Yamada <masahiroy@kernel.org> | 2023-07-22 13:47:48 +0900 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2023-09-19 12:27:58 +0200 |
commit | 390275d7a86314334d14851944b65608e5b42356 (patch) | |
tree | e81e5d73a79eaefd995562b17c1b966648f71708 /scripts | |
parent | 31cf7853a940181593e4472fc56f46574123f9f6 (diff) | |
download | linux-stable-390275d7a86314334d14851944b65608e5b42356.tar.gz linux-stable-390275d7a86314334d14851944b65608e5b42356.tar.bz2 linux-stable-390275d7a86314334d14851944b65608e5b42356.zip |
kbuild: rpm-pkg: define _arch conditionally
[ Upstream commit 233046a2afd12a4f699305b92ee634eebf1e4f31 ]
Commit 3089b2be0cce ("kbuild: rpm-pkg: fix build error when _arch is
undefined") does not work as intended; _arch is always defined as
$UTS_MACHINE.
The intention was to define _arch to $UTS_MACHINE only when it is not
defined.
Fixes: 3089b2be0cce ("kbuild: rpm-pkg: fix build error when _arch is undefined")
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/package/mkspec | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/package/mkspec b/scripts/package/mkspec index 70392fd2fd29..f892cf8e37f0 100755 --- a/scripts/package/mkspec +++ b/scripts/package/mkspec @@ -51,7 +51,7 @@ $S Source: kernel-$__KERNELRELEASE.tar.gz Provides: $PROVIDES # $UTS_MACHINE as a fallback of _arch in case # /usr/lib/rpm/platform/*/macros was not included. - %define _arch %{?_arch:$UTS_MACHINE} + %{!?_arch: %define _arch $UTS_MACHINE} %define __spec_install_post /usr/lib/rpm/brp-compress || : %define debug_package %{nil} |