public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
To: git-commits@fedoraproject.org
Subject: [rpms/grubby] rawhide: grubby-bls: fix matching by kernel name
Date: Tue, 02 Jun 2026 16:10:16 GMT	[thread overview]
Message-ID: <178041661620.1.12144579946164422974.rpms-grubby-8b355fde2411@fedoraproject.org> (raw)

            A new commit has been pushed.

            Repo   : rpms/grubby
            Branch : rawhide
            Commit : 8b355fde2411bdb667662ee2653e54e6cc59e448
            Author : Ondrej Mosnáček <omosnacek@gmail.com>
            Date   : 2026-05-18T15:54:09+02:00
            Stats  : +5/-2 in 2 file(s)
            URL    : https://src.fedoraproject.org/rpms/grubby/c/8b355fde2411bdb667662ee2653e54e6cc59e448?branch=rawhide

            Log:
            grubby-bls: fix matching by kernel name

Modifying bootloader configuration based on full kernel path
(/boot/vmlinuz-...) is currently broken when /boot is on a BTRFS
subvolume (see https://bugzilla.redhat.com/show_bug.cgi?id=2422116).
Make at least using just the kernel name (vmlinuz-...) work in this
situation, so that e.g. grubby --update-kernel vmlinuz-... ... works.

The fix is to strip everything before the last slash on both sides of
the comparison instead of stripping just $param and expecting that the
value in the BLS config will always be just "/vmlinuz-...".

Signed-off-by: Ondrej Mosnáček <omosnacek@gmail.com>

---
diff --git a/grubby-bls b/grubby-bls
index 11b69b1..bdd7b18 100755
--- a/grubby-bls
+++ b/grubby-bls
@@ -175,7 +175,7 @@ param_to_indexes() {
     fi
 
     for i in ${!bls_file[@]}; do
-        if [[ $param = "${bls_linux[$i]}" || "/${param##*/}" = "${bls_linux[$i]}" ]]; then
+        if [[ $param = "${bls_linux[$i]}" || "${param##*/}" = "${bls_linux[$i]##*/}" ]]; then
             indexes="$indexes $i"
         fi
 

diff --git a/grubby.spec b/grubby.spec
index b7bd054..84c5da6 100644
--- a/grubby.spec
+++ b/grubby.spec
@@ -3,7 +3,7 @@
 
 Name: grubby
 Version: 8.40
-Release: 88%{?dist}
+Release: 89%{?dist}
 Summary: Command line tool for updating bootloader configs
 License: GPL-2.0-or-later
 Source1: grubby-bls
@@ -79,6 +79,9 @@ fi
 %config(noreplace) %{_sysconfdir}/sysconfig/kernel
 
 %changelog
+* Mon May 18 2026 Ondrej Mosnáček <omosnacek@gmail.com> - 8.40-89
+- Fix matching by kernel name
+
 * Thu Mar  5 2026 Hans de Goede <johannes.goede@oss.qualcomm.com> - 8.40-88
 - Fix 10-devicetree.install failure when /boot is fat
 

                 reply	other threads:[~2026-06-02 16:10 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=178041661620.1.12144579946164422974.rpms-grubby-8b355fde2411@fedoraproject.org \
    --to=git-commits@fedoraproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox