diff mbox series

[1/2] kbuild: rpm-pkg: make sure to have versioned 'Obsoletes' for kernel.spec

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

Commit Message

Rafael Aquini June 11, 2024, 9:11 p.m. UTC
Fix the following rpmbuild warning:

  $ make srcrpm-pkg
  ...
  RPM build warnings:
      line 34: It's not recommended to have unversioned Obsoletes: Obsoletes: kernel-headers

Signed-off-by: Rafael Aquini <aquini@redhat.com>
---
 scripts/package/kernel.spec | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Nathan Chancellor June 13, 2024, 7:01 p.m. UTC | #1
On Tue, Jun 11, 2024 at 05:11:21PM -0400, Rafael Aquini wrote:
> Fix the following rpmbuild warning:
> 
>   $ make srcrpm-pkg
>   ...
>   RPM build warnings:
>       line 34: It's not recommended to have unversioned Obsoletes: Obsoletes: kernel-headers
> 
> Signed-off-by: Rafael Aquini <aquini@redhat.com>

Tested-by: Nathan Chancellor <nathan@kernel.org>

> ---
>  scripts/package/kernel.spec | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/scripts/package/kernel.spec b/scripts/package/kernel.spec
> index e095eb1e290e..19e458341f45 100644
> --- a/scripts/package/kernel.spec
> +++ b/scripts/package/kernel.spec
> @@ -27,7 +27,7 @@ The Linux Kernel, the operating system core itself
>  %package headers
>  Summary: Header files for the Linux kernel for use by glibc
>  Group: Development/System
> -Obsoletes: kernel-headers
> +Obsoletes: kernel-headers < %{version}
>  Provides: kernel-headers = %{version}
>  %description headers
>  Kernel-headers includes the C header files that specify the interface
> -- 
> 2.45.1
>
Masahiro Yamada July 4, 2024, 1:58 p.m. UTC | #2
On Wed, Jun 12, 2024 at 6:11 AM Rafael Aquini <aquini@redhat.com> wrote:
>
> Fix the following rpmbuild warning:
>
>   $ make srcrpm-pkg
>   ...
>   RPM build warnings:
>       line 34: It's not recommended to have unversioned Obsoletes: Obsoletes: kernel-headers
>
> Signed-off-by: Rafael Aquini <aquini@redhat.com>
> ---
>  scripts/package/kernel.spec | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/scripts/package/kernel.spec b/scripts/package/kernel.spec
> index e095eb1e290e..19e458341f45 100644
> --- a/scripts/package/kernel.spec
> +++ b/scripts/package/kernel.spec
> @@ -27,7 +27,7 @@ The Linux Kernel, the operating system core itself
>  %package headers
>  Summary: Header files for the Linux kernel for use by glibc
>  Group: Development/System
> -Obsoletes: kernel-headers
> +Obsoletes: kernel-headers < %{version}
>  Provides: kernel-headers = %{version}
>  %description headers
>  Kernel-headers includes the C header files that specify the interface
> --
> 2.45.1
>
>

Applied to linux-kbuild.
Thanks!
diff mbox series

Patch

diff --git a/scripts/package/kernel.spec b/scripts/package/kernel.spec
index e095eb1e290e..19e458341f45 100644
--- a/scripts/package/kernel.spec
+++ b/scripts/package/kernel.spec
@@ -27,7 +27,7 @@  The Linux Kernel, the operating system core itself
 %package headers
 Summary: Header files for the Linux kernel for use by glibc
 Group: Development/System
-Obsoletes: kernel-headers
+Obsoletes: kernel-headers < %{version}
 Provides: kernel-headers = %{version}
 %description headers
 Kernel-headers includes the C header files that specify the interface