Skip to content

Commit

Permalink
Fixes #17536: Change all python3 scripts to python2 on rhel7 at build…
Browse files Browse the repository at this point in the history
… time
  • Loading branch information
Fdall committed May 27, 2020
1 parent 7583b54 commit 6451b72
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions rudder-agent/SPECS/rudder-agent.spec
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,11 @@ FusionInventory.

cd %{_sourcedir}

# rhel7 doesn't have python 3 so we force python2 instead
%if 0%{?rhel} == 7 || ( 0%{?suse_version} && 0%{?suse_version} < 1500 )
find . -type f | xargs sed -i '1,1s|#!/usr/bin/python3|#!/usr/bin/python2|'
%endif

# libattr libtool file is looked for in /lib64 but put in /usr/lib64 on RHEL3
%if 0%{?rhel} && 0%{?rhel} < 4
cp /usr/lib64/libattr.a /usr/lib64/libattr.la /lib64 || cp /usr/lib/libattr.a /usr/lib/libattr.la /lib
Expand Down

0 comments on commit 6451b72

Please sign in to comment.