mbox series

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

Message ID 20240611211123.959459-1-aquini@redhat.com (mailing list archive)
Headers show
Series kbuild: rpm-pkg: fix rpmbuild warnings for kernel.spec | expand

Message

Rafael Aquini June 11, 2024, 9:11 p.m. UTC
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(-)