Bad coding practices ofed install/build files

I found that even in the most recent ofed version for RHEL 9.4, there is some sloppy coding that fails to take into account when a kernel version to use is indicated. One such example is fwctl-24.10/obj/default/makefile
Right at the top we have
KVER ?= $(shell uname -r)
SRC_DIR ?= $(shell pwd)
MLNX_ARCH = $(shell uname -m)
When working in a chroot environment for an image with another kernel that will be used to PXE boot another host, this kind of thing causes all kinds of build errors and failures.
I suggest you have someone go through the scripts and config files to check for this and similar issues.

Actually, I realize this isn’t a good example after all since the KVER and MLNX_ARCH variables are only set from these commands if they’re not already set, but there are definitely some issues with the specfiles in some of the source packages that cause errors with rpmbuild when trying to build against a 6.x kernel. I’m not going to pretend like I’m smart enough to figure out what those issues are.

Thanks for pointing out this.

MLNX_OFED has transitioned into DOCA-Host, and now is available as DOCA-OFED profile.