Skip to content

Commit

Permalink
kbuild: rpm-pkg: use a dummy string for _arch when undefined
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
masahir0y committed Jul 24, 2023
1 parent d5d2d4c commit d4f6512
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions scripts/package/mkspec
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand All @@ -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}
Expand Down

0 comments on commit d4f6512

Please sign in to comment.