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 <arne_f@ipfire.org>
This commit is contained in:
Arne Fitzenreiter
2024-03-31 16:30:50 +02:00
parent 2d4f4ebfa2
commit 5f04e70f74
3 changed files with 24 additions and 2 deletions

View File

@@ -1,4 +1,3 @@
#boot/grub/grubenv
etc/default/grub-btrfs
etc/default/grub-btrfs/config
etc/grub.d/41_snapshots-btrfs

View 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)

View File

@@ -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 ;