path: root/
diff options
authorKaleb S. KEITHLEY <>2018-09-24 14:12:45 -0400
committerAmar Tumballi <>2018-09-27 03:12:58 +0000
commit5b91555a583da1ad7918c3fb16a2d92be1a19e9c (patch)
tree373e02dfdf72fcaa80e79ce4a203ee0294d23118 /
parent4756e27bbcd8ccc11180843ad23b833e8a5cf22c (diff)
python3: assume python3 unless building _packages_ on sys without py3
The jenkins release-new job runs on a CentOS 7 box, which does not have python3. As a result it runs ( and) configure before producing the dist tar file, converting all the python3 shebangs to python2 shebangs in the dist tar file. Then when that tar file is "carried" to, e.g. Fedora koji build system to build packages, the shebangs are incorrect, despite having originally been correct in the git repo. Change-Id: I5154baba3f6d29d3c4823bafc2b57abecbf90e5b updates: #411 Signed-off-by: Kaleb S. KEITHLEY <>
Diffstat (limited to '')
1 files changed, 6 insertions, 0 deletions
diff --git a/ b/
index f05ead9..fea7927 100644
--- a/
+++ b/
@@ -723,6 +723,12 @@ GlusterFS Events
%setup -q -n %{name}-%{version}%{?prereltag}
+%if ( ! %{_usepython3} )
+echo "fixing python shebangs..."
+for f in api events extras geo-replication libglusterfs tools xlators; do
+find $f -type f -exec sed -i 's|/usr/bin/python3|/usr/bin/python2|' {} \;
%if ( 0%{?rhel} && 0%{?rhel} < 6 )