From 178958ca863d7f0fc5d6e38bb10c64417b52da80 Mon Sep 17 00:00:00 2001 From: Koichiro Iwao Date: Thu, 7 Nov 2024 18:43:11 +0900 Subject: [PATCH] Fix for AL10 build - pathfix.py is no longer placed in %{_bindir} - %patchN is deprecated --- SPECS/raspberrypi2.spec | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/SPECS/raspberrypi2.spec b/SPECS/raspberrypi2.spec index f90793d..c771772 100644 --- a/SPECS/raspberrypi2.spec +++ b/SPECS/raspberrypi2.spec @@ -21,6 +21,12 @@ ExclusiveArch: aarch64 %define kversion 6.6 %define patchlevel 51 +%if 0%{?rhel} >= 10 +%define pathfix %{__python3} %{_rpmconfigdir}/redhat/pathfix.py +%else +%define pathfix pathfix.py +%endif + # standard kernel %define with_up %{?_without_up: 0} %{?!_without_up: 1} # tools @@ -165,8 +171,8 @@ glibc package. %prep %setup -q -n linux-stable_%{version_tag} -%patch100 -p1 -%patch101 -p1 +%patch -P 100 -p1 +%patch -P 101 -p1 perl -p -i -e "s/^EXTRAVERSION.*/EXTRAVERSION = -%{release}/" Makefile perl -p -i -e "s/^CONFIG_LOCALVERSION=.*/CONFIG_LOCALVERSION=/" arch/%{Arch}/configs/bcm2711_defconfig perl -p -i -e "s/^CONFIG_LOCALVERSION=.*/CONFIG_LOCALVERSION=/" arch/%{Arch}/configs/bcm2712_defconfig @@ -177,9 +183,9 @@ perl -p -i -e "s/^CONFIG_LOCALVERSION=.*/CONFIG_LOCALVERSION=/" arch/%{Arch}/con # -p preserves timestamps # -n prevents creating ~backup files # -i specifies the interpreter for the shebang -pathfix.py -pni "%{__python3} %{py3_shbang_opts}" scripts/ -pathfix.py -pni "%{__python3} %{py3_shbang_opts}" scripts/diffconfig scripts/bloat-o-meter scripts/show_delta scripts/jobserver-exec -pathfix.py -pni "%{__python3} %{py3_shbang_opts}" tools/ tools/perf/scripts/python/*.py tools/kvm/kvm_stat/kvm_stat scripts/clang-tools/*.py +%{pathfix} -pni "%{__python3} %{py3_shbang_opts}" scripts/ +%{pathfix} -pni "%{__python3} %{py3_shbang_opts}" scripts/diffconfig scripts/bloat-o-meter scripts/show_delta scripts/jobserver-exec +%{pathfix} -pni "%{__python3} %{py3_shbang_opts}" tools/ tools/perf/scripts/python/*.py tools/kvm/kvm_stat/kvm_stat scripts/clang-tools/*.py %endif %build