Building kernel rpm

I can’t seem to assemble the kernel. For some reason, this error always appears on all distributions (Alma, Oracle, Fedora):
It’s not recommended to have unversioned Obsoletes: Obsoletes: kernel-headers.
How can this be avoided?

I do this:
tar --extract --file linux-6.1.55.tar.xz --directory “/usr/src/kernels/”
cd “/usr/src/kernels/linux-6.1.55/”
make mrproper
make oldconfig
make --jobs 2 rpm-pkg

You will be better off using an SRPM that was packaged for your operating system release (even if you end up replacing the sources it uses). It looks like you’re after something like ELRepo’s kernel-lt package. If you’re just interested in the end result, binaries, they have those, but you could also use their SRPM to build your own.

1 Like