]> git.ipfire.org Git - people/ms/ipfire-2.x.git/commitdiff
grub-btrfs: fix grub-btrfs build and remove bugtracker url
authorArne Fitzenreiter <arne_f@ipfire.org>
Sun, 31 Mar 2024 14:30:50 +0000 (16:30 +0200)
committerArne Fitzenreiter <arne_f@ipfire.org>
Sun, 31 Mar 2024 14:30:50 +0000 (16:30 +0200)
grub-btrfs try to reconfigure grub in the buildsystem and print always the bugtracker url on every error even when its not a bug

Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
config/rootfiles/common/grub-btrfs
lfs/grub-btrfs
src/patches/grub-btrfs/grub-btrfs-4.13-remove_bug_report_url.patch [new file with mode: 0644]

index ba7a8fc3ed8d54201f1cea1725e34840e2f43308..1a91d38b23117fc420b9f8074d7362bea5524ba7 100644 (file)
@@ -1,4 +1,3 @@
-#boot/grub/grubenv
 etc/default/grub-btrfs
 etc/default/grub-btrfs/config
 etc/grub.d/41_snapshots-btrfs
index 8dc0c4f3edac035416f1f4b2e1d020047f044924..63428258ee9e99ae707b16357a00b26d1cc565a8 100644 (file)
@@ -73,7 +73,8 @@ $(subst %,%_BLAKE2,$(objects)) :
 $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
        @$(PREBUILD)
        @rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar axf $(DIR_DL)/$(DL_FILE)
+       cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/grub-btrfs/grub-btrfs-4.13-remove_bug_report_url.patch
        $(UPDATE_AUTOMAKE)
-       cd $(DIR_APP) && make install
+       cd $(DIR_APP) && GRUB_UPDATE_EXCLUDE=true make install
        @rm -rf $(DIR_APP)
        @$(POSTBUILD)
diff --git a/src/patches/grub-btrfs/grub-btrfs-4.13-remove_bug_report_url.patch b/src/patches/grub-btrfs/grub-btrfs-4.13-remove_bug_report_url.patch
new file mode 100644 (file)
index 0000000..fae632d
--- /dev/null
@@ -0,0 +1,22 @@
+diff -Naur grub-btrfs-4.13.org/41_snapshots-btrfs grub-btrfs-4.13/41_snapshots-btrfs
+--- grub-btrfs-4.13.org/41_snapshots-btrfs     2023-06-05 08:55:44.000000000 +0200
++++ grub-btrfs-4.13/41_snapshots-btrfs 2024-03-31 15:18:56.660479209 +0200
+@@ -48,8 +48,7 @@
+ print_error()
+ {
+     local err_msg="$*"
+-    local bug_report="If you think an error has occurred, please file a bug report at \"https://github.com/Antynea/grub-btrfs\""
+-    printf "%s\n" "${err_msg}" "${bug_report}" >&2 ;
++    printf "%s\n" "${err_msg}" >&2 ;
+     exit 0
+ }
+@@ -78,7 +77,7 @@
+ [[ "${GRUB_BTRFS_DISABLE,,}" == "true" ]] && print_error "GRUB_BTRFS_DISABLE is set to true (default=false)"
+ if ! type btrfs >/dev/null 2>&1; then print_error "btrfs-progs isn't installed"; fi
+ [[ -f "${GRUB_BTRFS_MKCONFIG_LIB:-/usr/share/grub/grub-mkconfig_lib}" ]] && . "${GRUB_BTRFS_MKCONFIG_LIB:-/usr/share/grub/grub-mkconfig_lib}" || print_error "grub-mkconfig_lib couldn't be found"
+-[[ "$(btrfs filesystem df / 2>&1)" == *"not a btrfs filesystem"* ]] && print_error "Root filesystem isn't btrfs"
++[[ "$(btrfs filesystem df / 2>&1)" == *"not a btrfs filesystem"* ]] && print_error "Root filesystem isn't btrfs, skipping..."
+ printf "Detecting snapshots ...\n" >&2 ;