From: Masahiro Yamada Date: Sat, 22 Jul 2023 04:47:48 +0000 (+0900) Subject: kbuild: rpm-pkg: define _arch conditionally X-Git-Tag: v6.1.61~1140 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=390275d7a86314334d14851944b65608e5b42356;p=platform%2Fkernel%2Flinux-starfive.git 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 Signed-off-by: Sasha Levin --- diff --git a/scripts/package/mkspec b/scripts/package/mkspec index 70392fd..f892cf8 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}