summaryrefslogtreecommitdiff
path: root/scripts/package
diff options
context:
space:
mode:
authorMasahiro Yamada <masahiroy@kernel.org>2023-07-22 13:47:48 +0900
committerMasahiro Yamada <masahiroy@kernel.org>2023-07-25 00:59:32 +0900
commit233046a2afd12a4f699305b92ee634eebf1e4f31 (patch)
tree2651c9838df8b44263c96c485de61c2327f4f7aa /scripts/package
parent4d15c9fa058e6dee09324cfc93f48858d4296019 (diff)
kbuild: rpm-pkg: define _arch conditionally
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>
Diffstat (limited to 'scripts/package')
-rwxr-xr-xscripts/package/mkspec2
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/package/mkspec b/scripts/package/mkspec
index 8049f0e2c110..c9299f9c1f3e 100755
--- a/scripts/package/mkspec
+++ b/scripts/package/mkspec
@@ -57,7 +57,7 @@ $S BuildRequires: gcc make openssl openssl-devel perl python3 rsync
# $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}