Skip to content

Commit

Permalink
kbuild: rpm-pkg: define _arch conditionally
Browse files Browse the repository at this point in the history
[ Upstream commit 233046a ]

Commit 3089b2b ("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: 3089b2b ("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>
  • Loading branch information
masahir0y authored and gregkh committed Sep 19, 2023
1 parent 5c6cc19 commit edd005a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/package/mkspec
Expand Up @@ -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}
Expand Down

0 comments on commit edd005a

Please sign in to comment.