From 280685e9ea4faef5a570b1516ce38d8b0f5acee5 Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Tue, 8 Nov 2022 02:05:09 -0500 Subject: [PATCH] import grubby-8.40-47.el8 --- SOURCES/grubby-bls | 14 ++++++++++++++ SPECS/grubby.spec | 22 +++++++++++++++++++++- 2 files changed, 35 insertions(+), 1 deletion(-) diff --git a/SOURCES/grubby-bls b/SOURCES/grubby-bls index 1a89d80..360c6e8 100755 --- a/SOURCES/grubby-bls +++ b/SOURCES/grubby-bls @@ -532,6 +532,20 @@ update_bls_fragment() { fi done + if [[ $param = "ALL" ]] && [[ -n $remove_args || -n $add_args ]]; then + if [[ ! -f /etc/kernel/cmdline ]]; then + # anaconda could pre-populate this file, but until then, most of + # the time we'll just want the most recent one. This is pretty + # close to the current almost-correct behavior of falling back to + # /proc/cmdline anyhow. + echo "$(get_bls_args -1)" > /etc/kernel/cmdline + fi + + read old_args < /etc/kernel/cmdline + local new_args="$(update_args "${old_args}" "${remove_args}" "${add_args}")" + echo "$new_args" > /etc/kernel/cmdline + fi + update_grubcfg } diff --git a/SPECS/grubby.spec b/SPECS/grubby.spec index aeeeb6f..e8aef0e 100644 --- a/SPECS/grubby.spec +++ b/SPECS/grubby.spec @@ -1,6 +1,6 @@ Name: grubby Version: 8.40 -Release: 42%{?dist} +Release: 47%{?dist} Summary: Command line tool for updating BootLoaderSpec files License: GPLv2+ URL: https://github.com/rhinstaller/grubby @@ -169,6 +169,26 @@ current boot environment. %{_mandir}/man8/*.8* %changelog +* Mon Oct 10 2022 Robbie Harwood - 8.40-47 +- Backport fedora/rhel9 initial cmdline population +- Resolves: #2129740 + +* Thu Oct 06 2022 Robbie Harwood - 8.40-46 +- Fix quoting of opts in grubby-bls +- Resolves: #2129740 + +* Thu Aug 11 2022 Robbie Harwood - 8.40-44 +- Write to /etc/kernel/cmdline on non-s390x also +- Resolves: #1978226 + +* Thu Aug 11 2022 Robbie Harwood - 8.40-44 +- Write to /etc/kernel/cmdline on s390x and only s390x +- Resolves: #1978226 + +* Fri Jun 03 2022 Robbie Harwood - 8.40-43 +- Additionally write to /etc/kernel/cmdline +- Resolves: #1978226 + * Wed Jun 09 2021 Javier Martinez Canillas - 8.40-42 - grubby-bls: expand only the kernelopts variable Resolves: rhbz#1819666