[PATCH 0/2] kbuild: rpm-pkg: fix rpmbuild warnings for kernel.spec

From: Rafael Aquini
Date: Tue Jun 11 2024 - 17:11:54 EST


Newer revisions of rpmbuild are throwing warnings about the current
kernel.spec template having an unversioned kernel-headers in the
'Obsoletes:' field and not being able to source the epoch's date from
the spec's missing '%changelog' section:

$ make srcrpm-pkg
UPD include/config/kernel.release
GEN rpmbuild/SPECS/kernel.spec
UPD .tmp_HEAD
ARCHIVE linux.tar.gz
rpmbuild -bs rpmbuild/SPECS/kernel.spec --define='_topdir /mnt/nfs/work/kernel/linux/rpmbuild'
warning: line 34: It's not recommended to have unversioned Obsoletes: Obsoletes: kernel-headers
warning: source_date_epoch_from_changelog set but %changelog is missing
Wrote: /mnt/nfs/work/kernel/linux/rpmbuild/SRPMS/kernel-6.10.0_rc3-1.src.rpm

RPM build warnings:
line 34: It's not recommended to have unversioned Obsoletes: Obsoletes: kernel-headers
source_date_epoch_from_changelog set but %changelog is missing

This patchset addresses both RPM build warnings.

Rafael Aquini (2):
kbuild: rpm-pkg: make sure to have versioned 'Obsoletes' for kernel.spec
kbuild: rpm-pkg: introduce a simple changelog section for kernel.spec

scripts/package/kernel.spec | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)

--
2.45.1