Azure / WALinuxAgent

Microsoft Azure Linux Guest Agent

Home Page:http://azure.microsoft.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Failure in RPM Build

sabman3 opened this issue · comments

On RHEL 8 during RPM build an error occurs because "/usr/lib/rpm/redhat/brp-mangle-shebangs" requires that /bin/waagent and /bin/waagent2.0 require the specific python version for the shebang line. So instead of "#!/usr/bin/env python" it should be "#!/usr/bin/env python2". The change to the shebang should be backwards compatible to RHEL 7, since that version if the OS recognizes python2 as a valid interpreter (Not tested). I can branch and then do a pull request if you want.

Okay. Actually just tested the RPM I created on RHEL 8 and using python2 in the shebang forces it to have a dependency on python2. I redid the RPM using python3 in the shebang an all worked well. Now I don't know if the problem is with Red Hats rpmbuild package and /usr/lib/rpm/redhat/brp-mangle-shebangs, or with python ez_setup. Maybe someone else has input into this issue.

@sabman3 sorry, i did not quite get what the issue is.

As a note, we are using now bin/py3/waagent for distros in which only Python 3 is installed