commit f17fda0a7996fb58775d0798180a4a2a20bd344d Author: eabdullin Date: Tue Dec 2 16:35:10 2025 +0300 Do not add /boot twice for btrfs subvolumes diff --git a/config.yaml b/config.yaml new file mode 100644 index 0000000..1053e7f --- /dev/null +++ b/config.yaml @@ -0,0 +1,15 @@ +actions: + - modify_release: + - suffix: ".alma.1" + enabled: true + + - changelog_entry: + - name: "Eduard Abdullin" + email: "eabdullin@almalinux.org" + line: + - "Do not add /boot twice for btrfs subvolumes" + + - add_files: + - type: "patch" + name: "Do-not-add-boot-twice-for-btrfs-subvolumes_raw_source_applied.patch" + number: "Latest" diff --git a/files/Do-not-add-boot-twice-for-btrfs-subvolumes_raw_source_applied.patch b/files/Do-not-add-boot-twice-for-btrfs-subvolumes_raw_source_applied.patch new file mode 100644 index 0000000..5a2e701 --- /dev/null +++ b/files/Do-not-add-boot-twice-for-btrfs-subvolumes_raw_source_applied.patch @@ -0,0 +1,36 @@ +From 89c18fac339894523134be37d986e5d63e307dff Mon Sep 17 00:00:00 2001 +From: Alexander Burmashev +Date: Mon, 7 Nov 2022 02:22:12 -0800 +Subject: [PATCH] Do not add /boot twice for btrfs subvolumes + +Upstream does not care about btrfs subvolumes, but we do. +When grubby calculates the prefix we additionaly check: +1) if /boot fs is btrfs +2) and if /boot is a subvolume +we do not append additional /boot to kernel path. + +256 is the inode nr for subvolume per BTRFS specification and docs +Without this fix grubby reports kernel path to be +/boot/boot + +Orabug: 34380742 +Signed-off-by: Alexander Burmashev +--- grubby-bls.old 2022-11-07 02:23:47.000000000 -0800 ++++ grubby-bls 2022-11-07 04:50:09.138586241 -0800 +@@ -198,10 +198,14 @@ + + get_prefix() { + if [[ $bootloader = grub2 ]] && mountpoint -q /boot; then +- echo "/boot" ++ prefix_kern="/boot" + else +- echo "" ++ prefix_kern="" + fi ++ if [[ $(stat -f --format=%T /boot) = "btrfs" ]] && [[ $(stat --format=%i /boot) = "256" ]]; then ++ prefix_kern="" ++ fi ++ echo "$prefix_kern" + } + + expand_var() {