diff --git a/tuned-2.18.0-bootloader-initrd-no-dev-hardcode.patch b/tuned-2.18.0-bootloader-initrd-no-dev-hardcode.patch new file mode 100644 index 0000000..b008233 --- /dev/null +++ b/tuned-2.18.0-bootloader-initrd-no-dev-hardcode.patch @@ -0,0 +1,30 @@ +From f23ff066327c3212faee6bed2c6f8d2a43c9db5f Mon Sep 17 00:00:00 2001 +From: Jan Zerdik +Date: Mon, 7 Mar 2022 12:21:59 +0100 +Subject: [PATCH] Do not hardcode disk name in tuned initrd path. + +Cleaner solution by jskarvad@redhat.com + +Resolves: rhbz#2050246 + +Signed-off-by: Jan Zerdik +--- + tuned/plugins/plugin_bootloader.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/tuned/plugins/plugin_bootloader.py b/tuned/plugins/plugin_bootloader.py +index 32dd35d..ad2d4d5 100644 +--- a/tuned/plugins/plugin_bootloader.py ++++ b/tuned/plugins/plugin_bootloader.py +@@ -395,7 +395,7 @@ class BootloaderPlugin(base.Plugin): + initrd_grubpath = "/" + lc = len(curr_cmdline) + if lc: +- path = re.sub(r"^\s*BOOT_IMAGE=\s*(\S*/).*$", "\\1", curr_cmdline) ++ path = re.sub(r"^\s*BOOT_IMAGE=\s*(?:\([^)]*\))?(\S*/).*$", "\\1", curr_cmdline) + if len(path) < lc: + initrd_grubpath = path + self._initrd_val = os.path.join(initrd_grubpath, img_name) +-- +2.35.3 + diff --git a/tuned.spec b/tuned.spec index a0a784a..32e128d 100644 --- a/tuned.spec +++ b/tuned.spec @@ -35,7 +35,7 @@ Summary: A dynamic adaptive system tuning daemon Name: tuned Version: 2.18.0 -Release: 2%{?prerel1}%{?dist} +Release: 3%{?prerel1}%{?dist} License: GPLv2+ Source0: https://github.com/redhat-performance/%{name}/archive/v%{version}%{?prerel2}/%{name}-%{version}%{?prerel2}.tar.gz # RHEL-8 specific recommend.conf: @@ -98,6 +98,8 @@ Patch0: tuned-2.18.0-rhel-8-profiles.patch Patch1: tuned-2.18.0-sd-load-balance.patch # rhbz#2052886 Patch2: tuned-2.18.0-nf-conntrack-hashsize.patch +# rhbz#2050246 +Patch3: tuned-2.18.0-bootloader-initrd-no-dev-hardcode.patch %description The tuned package contains a daemon that tunes system settings dynamically. @@ -549,6 +551,10 @@ fi %{_mandir}/man7/tuned-profiles-openshift.7* %changelog +* Wed Jun 8 2022 Jaroslav Škarvada - 2.18.0-3 +- bootloader: do not hardcode device to initrd + resolves: rhbz#2050246 + * Thu Feb 10 2022 Jaroslav Škarvada - 2.18.0-2 - openshift/atomic: increased nf_conntrack_hashsize resolves: rhbz#2052886