From: Arne Fitzenreiter Date: Sun, 31 Mar 2024 14:30:50 +0000 (+0200) Subject: grub-btrfs: fix grub-btrfs build and remove bugtracker url X-Git-Tag: v2.29-core186~125 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=5f04e70f746261430f4600de2e5bff6922a7a511;p=ipfire-2.x.git grub-btrfs: fix grub-btrfs build and remove bugtracker url 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 --- diff --git a/config/rootfiles/common/grub-btrfs b/config/rootfiles/common/grub-btrfs index ba7a8fc3ed..1a91d38b23 100644 --- a/config/rootfiles/common/grub-btrfs +++ b/config/rootfiles/common/grub-btrfs @@ -1,4 +1,3 @@ -#boot/grub/grubenv etc/default/grub-btrfs etc/default/grub-btrfs/config etc/grub.d/41_snapshots-btrfs diff --git a/lfs/grub-btrfs b/lfs/grub-btrfs index 8dc0c4f3ed..63428258ee 100644 --- a/lfs/grub-btrfs +++ b/lfs/grub-btrfs @@ -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 index 0000000000..fae632dd3e --- /dev/null +++ b/src/patches/grub-btrfs/grub-btrfs-4.13-remove_bug_report_url.patch @@ -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 ; +