From 97ccf1649f88f47aaaeac406a85842be91394aa3 Mon Sep 17 00:00:00 2001 From: Eugene Syromiatnikov Date: Mon, 21 Jan 2019 10:44:44 +0100 Subject: [PATCH] Re-add redhat-rpm-config-9.0.3-latest-kernel.patch to RHEL 9 Apply contents of redhat-rpm-config-9.0.3-latest-kernel.patch from RHEL 7 branch. Commit message from the original commit: commit 5523411675de5be36f6a2adc0f99c2c5021c87ca Author: Florian Festi Date: Wed May 11 17:09:31 2016 +0200 - Fix latest_kernel macro - Resolves: #1323087 Resolves: #1971748 Resolves: #1999607 Resolves: #2002887 Signed-off-by: Eugene Syromiatnikov --- macros.kmp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/macros.kmp b/macros.kmp index cd34337..b48e791 100644 --- a/macros.kmp +++ b/macros.kmp @@ -15,7 +15,7 @@ kernel_module_package_release 1 %global kmodtool %{-s*}%{!-s:/usr/lib/rpm/redhat/kmodtool} \ %global kmod_version %{-v*}%{!-v:%{version}} \ %global kmod_release %{-r*}%{!-r:%{release}} \ - %global latest_kernel %(rpm -q --qf '%{VERSION}-%{RELEASE}.%{ARCH}\\\\n' `rpm -q kernel-devel | /usr/lib/rpm/redhat/rpmsort -r | head -n 1` | head -n 1) \ + %global latest_kernel %(rpm -q --qf '%{VERSION}-%{RELEASE}.%{ARCH}\\\\n' `rpm -qa | egrep "^kernel(-rt|-aarch64)?-devel" | /usr/lib/rpm/redhat/rpmsort -r | head -n 1` | head -n 1) \ %{!?kernel_version:%{expand:%%global kernel_version %{latest_kernel}}} \ %global kverrel %(%{kmodtool} verrel %{?kernel_version} 2>/dev/null) \ flavors="default" \