summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorMasahiro Yamada <masahiroy@kernel.org>2023-07-22 06:47:58 +0200
committerMasahiro Yamada <masahiroy@kernel.org>2023-07-24 17:59:33 +0200
commitd4f651277e9208b580b55da212e17ddd309c91e7 (patch)
treeea645cc761f29c9d6ce4f82913f653fa2235bf2b /scripts
parentkbuild: rpm-pkg: derive the Version from %{KERNELRELEASE} (diff)
downloadlinux-d4f651277e9208b580b55da212e17ddd309c91e7.tar.xz
linux-d4f651277e9208b580b55da212e17ddd309c91e7.zip
kbuild: rpm-pkg: use a dummy string for _arch when undefined
If this affects only %{buildroot}, it should be enough to use a fixed string for _arch when it is undefined. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/package/mkspec5
1 files changed, 2 insertions, 3 deletions
diff --git a/scripts/package/mkspec b/scripts/package/mkspec
index 783e1997d94a..22b980cf3d00 100755
--- a/scripts/package/mkspec
+++ b/scripts/package/mkspec
@@ -36,6 +36,8 @@ sed -e '/^DEL/d' -e 's/^\t*//' <<EOF
%define ARCH ${ARCH}
%define KERNELRELEASE ${KERNELRELEASE}
+# _arch is undefined if /usr/lib/rpm/platform/*/macros was not included.
+%{!?_arch: %define _arch dummy}
%{!?make: %define make make}
%define makeflags %{?_smp_mflags} ARCH=%{ARCH}
@@ -55,9 +57,6 @@ $S BuildRequires: bc binutils bison dwarves
$S BuildRequires: (elfutils-libelf-devel or libelf-devel) flex
$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.
- %{!?_arch: %define _arch $UTS_MACHINE}
%define __spec_install_post /usr/lib/rpm/brp-compress || :
%define debug_package %{nil}