From 82e8b6b67a594cbed191ae23366add75fa56ed43 Mon Sep 17 00:00:00 2001
From: Yu Ming Zhu <yzhu@redhat.com>
Date: Sep 17 2021 22:06:28 +0000
Subject: fix shebang of kojivmd for py2


---

diff --git a/koji.spec b/koji.spec
index b4ce64e..325967e 100644
--- a/koji.spec
+++ b/koji.spec
@@ -409,6 +409,11 @@ done
 %else
 %if 0%{py2_support}
 make DESTDIR=$RPM_BUILD_ROOT PYTHON=%{__python2} install
+# alter python interpreter in koji bins
+scripts='%{_bindir}/koji %{_sbindir}/kojivmd'
+for fn in $scripts ; do
+    sed -i 's|#!/usr/bin/python3|#!/usr/bin/python2|' $RPM_BUILD_ROOT$fn
+done
 %endif
 %endif
 

