From: Justin M. Forbes <jforbes(a)fedoraproject.org>
Change pathfix.py to %py3_shebang_fix
Python 3.12 has removed the pathfix.py script. That functionality is in
the macro %py3_shebang_fix which should work on recent RHEL as well as
Fedora. This change is needed as the call to pathfix.py currently fails
the build.
Signed-off-by: Justin M. Forbes <jforbes(a)fedoraproject.org>
diff --git a/redhat/kernel.spec.template b/redhat/kernel.spec.template
index blahblah..blahblah 100644
--- a/redhat/kernel.spec.template
+++ b/redhat/kernel.spec.template
@@ -1783,7 +1783,7 @@ rm -f localversion-next
# *** ERROR: ambiguous python shebang in /usr/bin/kvm_stat: #!/usr/bin/python. Change it
to python3 (or python2) explicitly.
# We patch all sources below for which we got a report/error.
echo "Fixing Python shebangs..."
-pathfix.py -i "%{__python3} %{py3_shbang_opts}" -p -n \
+%py3_shebang_fix \
tools/kvm/kvm_stat/kvm_stat \
scripts/show_delta \
scripts/diffconfig \
--
https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2588