Fix shebangs before Fedora's shebang mangling
-
Owner
Does pathfix.py exist on all RPM OS ?
-
Maintainer
I just realized I forgot to put "python3-devel" in "BuildRequires" which is required for pathfix, I will add it and re-compile again
-
Owner
That does not reply to my question: what about e.g. Suse ?
On Debian et SLE12 SP5, pathfix.py does not exist in $PATH.
-
Maintainer
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 )
-
Owner
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). -
Maintainer
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 ?
-
Owner
Yes.
-
Owner
But does
%{?fedora}
include RHEL & CentOS ? Or:if command -v pathfix.py then pathfix.py ... fi
-
Maintainer
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