naemon / naemon-livestatus

Naemon - Livestatus Eventbroker Module
GNU General Public License v2.0
26 stars 30 forks source link

Fix issue #99 #100

Closed olahaye74 closed 2 years ago

olahaye74 commented 2 years ago

Add the following lines to the rpm spec file to fix build on recent rpm distributions (fedora > 32 and RHEL > 7 at least). %python macro is not allowed anymore and will produce an error. %python2 or %__python3 must be used to clarify which python version needs to be used.

BTW, python2 is deprecated.

On Fedora-33+ and RHEL-8+, %__python triggers an error.

%if 0%{?fedora} > 32 || 0%{?rhel} > 7 %define python %python3 %endif

sni commented 2 years ago

thanks, just one question. If you want rhel 8 and above and fedora 33 and above, wouldn't it be better to use >= 33 or >= 8? Does ex. 7.1 satisfy a > 7? Or is it 9/34 and above?

olahaye74 commented 2 years ago

the %__python macro was disabled on fedora-33 (and above) and then on rhel-8 (and above). This behavior change was done on distro major version change. Thus you're right: >= 33 and >= 8 is safer.

jacobbaungard commented 2 years ago

Where is that macro actually used?

olahaye74 commented 2 years ago

I'm confused, I had the error when building from rpmbuild -tb but you're right, the %__python is not used in the current spec file. Wired. I must bi tired :-/ Sorry for disturbing the project. I close this as FIX USELESS. Please cancel the merge.