OpenVPN / ovpn-dco

OpenVPN Data Channel Offload in the linux kernel
101 stars 23 forks source link

Makefile does not recognize CentOS Stream 8 as EL8 #32

Closed opoplawski closed 7 months ago

opoplawski commented 1 year ago

The check is:

cat /etc/redhat-release 2>/dev/null | grep -c " 8."

but /etc/redhat-release has:

CentOS Stream release 8

without a trailing . so it fails.

pjperry commented 1 year ago

That's probably a good thing as the CentOS Stream 8 kernel if not the same as the RHEL 8 kernel.

CentOS Stream 8 kernel is essentially a rolling development kernel of what the next RHEL kernel will look like in 6 months time with lots of stuff backported. They should be treated as two separate distinct distros/kernels.

A better way would be to use the defines that RHEL already provides within the source, but that won't solve the CentOS Stream issue. For example,

if RHEL_MAJOR == 8

define EL8

elif RHEL_MAJOR == 9

define EL9

endif

ordex commented 1 year ago

That's probably a good thing as the CentOS Stream 8 kernel if not the same as the RHEL 8 kernel.

CentOS Stream 8 kernel is essentially a rolling development kernel of what the next RHEL kernel will look like in 6 months time with lots of stuff backported. They should be treated as two separate distinct distros/kernels.

A better way would be to use the defines that RHEL already provides within the source, but that won't solve the CentOS Stream issue. For example,

if RHEL_MAJOR == 8 #define EL8 #elif RHEL_MAJOR == 9 #define EL9 #endif

should we truly expect more features to be backported within a major release? or can we assume that once RHEL8 is out, following CentOS kernel releases are only about bugfixes? In the latter case, it still makes sense to treat CentOS8 as RHEL8. Otherwise, this is going to be messy because it's basically impossible to ensure ovpn-dco will always compile against a certain CentOS release.

pjperry commented 1 year ago

No, the CentOS model has changed. CentOS Linux no longer exists as a downstream rebuild project. CentOS Stream replaced it, and now exists UPSTREAM of RHEL (CentOS stream is like Rawhide to RHEL). So CentOS Stream now is backporting all the new stuff (that changes kABIs) that will be in the next release of RHEL 8. So yes, to have a linux-compat that will build against CentOS Stream is a constantly moving target and will be different from RHEL (which should be fixed for 6 months between releases).

pjperry commented 1 year ago

WRT using cat /etc/redhat-release 2>/dev/null | grep -c " 8."

Instead testing for RHEL_MAJOR at least solves that issue as that will be defined on CentOS Stream, same as on RHEL, even if the kernels are not ABI compatible. So at least may work for CentOS as opposed to won't work for CentOS.

Other compat projects have also tested the value of RHEL_MINOR to distinguish between RHEL or CentOS. RHEL is currently 8.7 (RHEL_MINOR == 7), CentOS would return 8.8 (RHEL_MINOR == 8) as it's the 'next' release.

ordex commented 7 months ago

At the end we went for checking RHEL_MAJOR/MINOR and distinguish based on that.

Checking MINOR was required because we found out that RHEL shipped different backported features when moving to 9.3 compared to 9.2.

Given the above, this issue with CentOS should be solved as well.

I am closing this issue, but feel free to re-open should the problem persist.