summaryrefslogtreecommitdiffstats
path: root/glusterfs.spec.in
diff options
context:
space:
mode:
authorKaleb S. KEITHLEY <kkeithle@redhat.com>2018-09-24 14:12:45 -0400
committerAmar Tumballi <amarts@redhat.com>2018-09-27 03:12:58 +0000
commit5b91555a583da1ad7918c3fb16a2d92be1a19e9c (patch)
tree373e02dfdf72fcaa80e79ce4a203ee0294d23118 /glusterfs.spec.in
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 (autogen.sh 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 <kkeithle@redhat.com>
Diffstat (limited to 'glusterfs.spec.in')
-rw-r--r--glusterfs.spec.in6
1 files changed, 6 insertions, 0 deletions
diff --git a/glusterfs.spec.in b/glusterfs.spec.in
index f05ead9..fea7927 100644
--- a/glusterfs.spec.in
+++ b/glusterfs.spec.in
@@ -723,6 +723,12 @@ GlusterFS Events
%prep
%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|' {} \;
+done
+%endif
%build
%if ( 0%{?rhel} && 0%{?rhel} < 6 )