diff --git a/SOURCES/grubby-bls b/SOURCES/grubby-bls index af0d82d..f09156b 100755 --- a/SOURCES/grubby-bls +++ b/SOURCES/grubby-bls @@ -528,6 +528,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/SOURCES/grubby.8 b/SOURCES/grubby.8 index 9bcd247..1c06017 100644 --- a/SOURCES/grubby.8 +++ b/SOURCES/grubby.8 @@ -148,7 +148,8 @@ the only items that can be updated is the kernel argument list, which is modified via the \fB-\-args\fR and \fB-\-remove-args\fR options. If the \fBALL\fR argument is used the variable \fB GRUB_CMDLINE_LINUX\fR in \fB/etc/default/grub\fR is updated with the latest kernel argument list, -unless the \fB-\-no-etc-grub-update\fR option is used. +unless the \fB-\-no-etc-grub-update\fR option is used or the file does not +exist (e.g., on s390x). .TP \fB-\-zipl\fR diff --git a/SPECS/grubby.spec b/SPECS/grubby.spec index dd3b89b..a67dfde 100644 --- a/SPECS/grubby.spec +++ b/SPECS/grubby.spec @@ -1,6 +1,6 @@ Name: grubby Version: 8.40 -Release: 55%{?dist} +Release: 61%{?dist} Summary: Command line tool for updating bootloader configs License: GPLv2+ URL: https://github.com/rhinstaller/grubby @@ -94,7 +94,7 @@ fi %package deprecated Summary: Legacy command line tool for updating bootloader configs -Conflicts: %{name} <= 8.40-18 +Conflicts: grubby < %{version}-%{release} %description deprecated This package provides deprecated, legacy grubby. This is for temporary @@ -128,9 +128,33 @@ current boot environment. %attr(0755,root,root) %{_sbindir}/grubby %attr(0755,root,root) %{_sbindir}/installkernel %attr(0755,root,root) %{_sbindir}/new-kernel-pkg - %{_mandir}/man8/*.8* +%{_mandir}/man8/*.8* %changelog +* Thu Aug 25 2022 Robbie Harwood - 8.40-61 +- Sync args changes with 8.40-66.fc38 +- Resolves: #1969362 + +* Thu Aug 11 2022 Robbie Harwood - 8.40-60 +- Handle updating /etc/kernel/cmdline +- Resolves: #1969362 + +* Wed Jul 20 2022 Robbie Harwood - 8.40-59 +- Appease upgrade tests by keeping deprecated version in lockstep +- Resolves: #2105118 + +* Tue Jul 19 2022 Robbie Harwood - 8.40-58 +- Clarify that grub files aren't used on s390x in man page +- Resolves: #2105118 + +* Wed Jun 22 2022 Robbie Harwood - 8.40-57 +- Revert previous change (fedora sync) +- Resolves: #1969362 + +* Thu Jun 02 2022 Robbie Harwood - 8.40-56 +- Additionally write to /etc/kernel/cmdline (fedora sync) +- Resolves: #1969362 + * Mon Feb 07 2022 Robbie Harwood 8.40-55 - Sync grubby-bls with Fedora - Resolves: #1949904