Commit ea9f97f8 authored by Joanne Hugé's avatar Joanne Hugé Committed by Thomas Gambier

Fix shebangs before Fedora's shebang mangling

parent 308eaa7f
......@@ -24,6 +24,8 @@ Conflicts: re6st-node
%build
make
# Fix shebangs before Fedora's shebang mangling
pathfix.py -i %{__python3} -p -n $(grep -l -R -e "#\!.*python$")
%install
set $RPM_BUILD_ROOT
......
  • Does pathfix.py exist on all RPM OS ?

  • I just realized I forgot to put "python3-devel" in "BuildRequires" which is required for pathfix, I will add it and re-compile again

  • That does not reply to my question: what about e.g. Suse ?

    On Debian et SLE12 SP5, pathfix.py does not exist in $PATH.

  • From what I read python3-devel is supposed to provide pathfix.py, pathfix.py seems to be the standard way to correct shebangs (and from what I tested compilation succeeded on Fedora and Debian, I already compiled working OBS packages with it, the problem is I had modified and uploaded the re6stnet.spec directly to OBS without editing it on re6stnet repo first, which is why I forgot python3-devel here )

  • Where do you read that ? What you're trying to solve is usually specific to the distro and there are several RPM ones that differ a lot.

    I'm not sure I checked correctly for Suse, but I see it shipped in python3-tools package, at /usr/share/doc/packages/python3-core/Tools/scripts/pathfix.py (so I doubt it's elsewhere).

    Edited by Julien Muchembled
  • You're right I read it in a Fedora doc: https://fedoraproject.org/wiki/Changes/Make_ambiguous_python_shebangs_error Maybe we can just put pathfix.py inside a %if 0%{?fedora} %endif block then ?

  • But does %{?fedora} include RHEL & CentOS ? Or:

    if command -v pathfix.py
    then pathfix.py ...
    fi
  • I know fedora doesn't include RHEL, because the %{?fedora} block around "python3-devel" BuildRequirement prevents compilation from failing on RHEL (RHEL doesn't have a "python3-devel" package) For CentOS I am not sure, anyway CentOS and RHEL are currently failing due to an unrelated issue (which I don't know how to solve yet) so maybe we can just leave %{?fedora} for now

  • The master branch is not fixed so I force-pushed it to revert the last 2 commits and moved 6bbe65f6 to a 'fedora' branch.

Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment