Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package grub2 for openSUSE:Factory checked in at 2025-10-10 17:10:13 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/grub2 (Old) and /work/SRC/openSUSE:Factory/.grub2.new.5300 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "grub2" Fri Oct 10 17:10:13 2025 rev:375 rq:1310602 version:2.12 Changes: -------- --- /work/SRC/openSUSE:Factory/grub2/grub2.changes 2025-10-08 18:12:49.798149458 +0200 +++ /work/SRC/openSUSE:Factory/.grub2.new.5300/grub2.changes 2025-10-10 17:11:40.979130571 +0200 @@ -2,6 +1,0 @@ -Fri Sep 26 07:53:25 UTC 2025 - Radoslav Kolev <[email protected]> - -- make grub plugin compatible with snapper's plugin API (bsc#1246172) -- clean up some unused code - -------------------------------------------------------------------- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ grub2.spec ++++++ --- /var/tmp/diff_new_pack.IHonYM/_old 2025-10-10 17:11:45.699329527 +0200 +++ /var/tmp/diff_new_pack.IHonYM/_new 2025-10-10 17:11:45.703329696 +0200 @@ -1,6 +1,7 @@ # # spec file for package grub2 # +# Copyright (c) 2025 SUSE LLC # Copyright (c) 2025 SUSE LLC and contributors # # All modifications and additions to the file contributed by third parties @@ -1307,7 +1308,7 @@ # Defaults install -m 644 -D %{SOURCE2} %{buildroot}/%{_sysconfdir}/default/grub install -m 755 -D %{SOURCE6} %{buildroot}/%{_sbindir}/grub2-once -install -m 755 -D %{SOURCE12} %{buildroot}/%{_libdir}/snapper/plugins/00-grub +install -m 755 -D %{SOURCE12} %{buildroot}/%{_libdir}/snapper/plugins/grub install -m 755 -D %{SOURCE14} %{buildroot}/%{_sysconfdir}/grub.d/80_suse_btrfs_snapshot %if 0%{?has_systemd:1} install -m 644 -D %{SOURCE15} %{buildroot}/%{_unitdir}/grub2-once.service @@ -1679,7 +1680,7 @@ %dir %{_libdir}/snapper %dir %{_libdir}/snapper/plugins %config(noreplace) %{_sysconfdir}/grub.d/80_suse_btrfs_snapshot -%{_libdir}/snapper/plugins/00-grub +%{_libdir}/snapper/plugins/grub %ifarch %{ix86} x86_64 %files %{grubxenarch} -f %{grubxenarch}-mod.lst ++++++ grub2-snapper-plugin.sh ++++++ --- /var/tmp/diff_new_pack.IHonYM/_old 2025-10-10 17:11:46.943381964 +0200 +++ /var/tmp/diff_new_pack.IHonYM/_new 2025-10-10 17:11:46.947382132 +0200 @@ -204,6 +204,26 @@ } +set_grub_setting () { + + name=$1 + val=$2 + + if grep -q "$name" "$grub_setting"; then + sed -i -e "s!.*\($name\)=.*!\1=\"$val\"!" "$grub_setting" + else + echo "$name=\"$val\"" >> "$grub_setting" + fi +} + +enable_grub_settings () { + set_grub_setting SUSE_BTRFS_SNAPSHOT_BOOTING "true" +} + +disable_grub_settings () { + set_grub_setting SUSE_BTRFS_SNAPSHOT_BOOTING "false" +} + update_grub () { "${grub_mkconfig}" -o "${grub_cfg}" } @@ -224,13 +244,13 @@ shift case "$option" in - -e | --enable | create-config-post) + -e | --enable) opt_enable=true ;; - -d | --disable | delete-config-pre) + -d | --disable) opt_enable=false ;; - -r | --refresh | create-snapshot-post | modify-snapshot-post | delete-snapshot-post | set-read-only-post) + -r | --refresh) opt_refresh=true ;; -c | --clean) @@ -242,8 +262,11 @@ done if [ "x${opt_enable}" = "xtrue" ]; then + #enable_grub_settings + #update_grub snapper_snapshots_cfg_refresh elif [ "x${opt_enable}" = "xfalse" ]; then + #disable_grub_settings update_grub snapshot_submenu_clean fi
