Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package sdbootutil for openSUSE:Factory checked in at 2025-04-10 21:57:52 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/sdbootutil (Old) and /work/SRC/openSUSE:Factory/.sdbootutil.new.1907 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "sdbootutil" Thu Apr 10 21:57:52 2025 rev:57 rq:1268381 version:1+git20250410.9086124 Changes: -------- --- /work/SRC/openSUSE:Factory/sdbootutil/sdbootutil.changes 2025-04-07 17:35:27.757926180 +0200 +++ /work/SRC/openSUSE:Factory/.sdbootutil.new.1907/sdbootutil.changes 2025-04-10 21:58:33.874886638 +0200 @@ -1,0 +2,17 @@ +Thu Apr 10 12:08:23 UTC 2025 - Alberto Planas Dominguez <apla...@suse.com> + +- Update to version 1+git20250410.9086124: + * Simplify code calling mount_chroot + * Support transactional systems without overlayfs on /etc + * Remove unnecessary umount_etc + +------------------------------------------------------------------- +Wed Apr 09 12:28:18 UTC 2025 - Alberto Planas Dominguez <apla...@suse.com> + +- Update to version 1+git20250409.7ec17ae: + * Call cleanup when snapshots change (boo#1240932) + * Add cleanup command to drop broken boot entries + * Document --all parameter + * Sync the bootloader also in MicroOS + +------------------------------------------------------------------- Old: ---- sdbootutil-1+git20250407.f84e1da.obscpio New: ---- sdbootutil-1+git20250410.9086124.obscpio ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ sdbootutil.spec ++++++ --- /var/tmp/diff_new_pack.Jcab0P/_old 2025-04-10 21:58:34.394908355 +0200 +++ /var/tmp/diff_new_pack.Jcab0P/_new 2025-04-10 21:58:34.398908522 +0200 @@ -17,7 +17,7 @@ Name: sdbootutil -Version: 1+git20250407.f84e1da +Version: 1+git20250410.9086124 Release: 0 Summary: bootctl wrapper for BLS boot loaders License: MIT ++++++ _servicedata ++++++ --- /var/tmp/diff_new_pack.Jcab0P/_old 2025-04-10 21:58:34.434910025 +0200 +++ /var/tmp/diff_new_pack.Jcab0P/_new 2025-04-10 21:58:34.438910193 +0200 @@ -1,6 +1,6 @@ <servicedata> <service name="tar_scm"> <param name="url">https://github.com/openSUSE/sdbootutil.git</param> - <param name="changesrevision">f84e1dadb523d1486bdec2aff048dd0b7b63a5e4</param></service></servicedata> + <param name="changesrevision">9086124f43b45a091e628146d54599a9e392d0a1</param></service></servicedata> (No newline at EOF) ++++++ sdbootutil-1+git20250407.f84e1da.obscpio -> sdbootutil-1+git20250410.9086124.obscpio ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sdbootutil-1+git20250407.f84e1da/10-sdbootutil.snapper new/sdbootutil-1+git20250410.9086124/10-sdbootutil.snapper --- old/sdbootutil-1+git20250407.f84e1da/10-sdbootutil.snapper 2025-04-07 15:00:40.000000000 +0200 +++ new/sdbootutil-1+git20250410.9086124/10-sdbootutil.snapper 2025-04-10 14:05:39.000000000 +0200 @@ -6,7 +6,7 @@ # check whether it's a transactional system is_transactional() { - [ "$(stat -f -c %T /etc)" = "overlayfs" ] + findmnt --fstab / -O ro >/dev/null } # when creating a snapshot we fetch all bls configs from previous snapshot dir, @@ -19,10 +19,12 @@ [ "$fs" = btrfs ] || return 1 + /usr/bin/sdbootutil update --sync "$num" || : + is_transactional && return 0 /usr/bin/sdbootutil add-all-kernels "$num" || : - /usr/bin/sdbootutil update --sync "$num" || : + /usr/bin/sdbootutil cleanup "$num" || : } delete_snapshot() @@ -34,6 +36,7 @@ [ "$fs" = btrfs ] || return 1 /usr/bin/sdbootutil remove-all-kernels "$num" || : + /usr/bin/sdbootutil cleanup "$num" || : } set_default_snapshot() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sdbootutil-1+git20250407.f84e1da/sdbootutil new/sdbootutil-1+git20250410.9086124/sdbootutil --- old/sdbootutil-1+git20250407.f84e1da/sdbootutil 2025-04-07 15:00:40.000000000 +0200 +++ new/sdbootutil-1+git20250410.9086124/sdbootutil 2025-04-10 14:05:39.000000000 +0200 @@ -93,6 +93,7 @@ --arch Manually set architecture --entry-token Override entry token --image Specify Linux kernel file name + --all List all entries (inc. from other systems) --entry-keys Comma separated list of keys --no-variables Do not update UEFI variables --no-reuse-initrd Always regenerate initrd @@ -136,6 +137,9 @@ remove-all-kernels [SNAPSHOT] Remove boot entries for all kernels in SNAPSHOT + cleanup [SNAPSHOT] + Remove boot entries with missing kernels from SNAPSHOT + list-kernels [SNAPSHOT] List all kernels related to SNAPSHOT @@ -326,9 +330,7 @@ is_transactional() { - # For running systems we can have this tests instead: - # [ "$(stat -f -c %T /etc)" = "overlayfs" ] - grep -q "^overlay /etc" /etc/fstab + findmnt --fstab / -O ro >/dev/null } keyctl_add_with_timeout() @@ -737,6 +739,9 @@ # Don't mount if we are within a transactional-update shell [ -z "$TRANSACTIONAL_UPDATE" ] || return 0 + # Only overlayfs needs special treatment + [ "$(findmnt --tab-file "${snapshot_dir}/etc/fstab" --noheadings --nofsroot --output FSTYPE /etc)" = "overlay" ] || return 0 + IFS=',' read -ra fields <<<\ "$(findmnt --tab-file "${snapshot_dir}/etc/fstab" --noheadings --nofsroot --output OPTIONS /etc | sed 's#/sysroot##g' | sed 's#:/etc,#:'"${snapshot_dir}"'/etc,#g')" @@ -751,15 +756,6 @@ mount overlay -t overlay -o ro,"lowerdir=${upper}:${lower}" "${snapshot_dir}/etc" } -umount_etc() -{ - local snapshot_dir="$1" - - # Don't umount if we are within a transactional-update shell - [ -z "$TRANSACTIONAL_UPDATE" ] || return 0 - umount "${snapshot_dir}/etc" -} - add_version_to_title() { # TW pretty name does not include the version @@ -993,20 +989,19 @@ info "Generating new initrd" - [ "$subvol" != "$root_subvol" ] && [ -n "$have_snapshots" ] && mount_chroot "${snapshot_dir}" - # In MicroOS we need to be sure to have the same /etc - # inside the snapshot. For example, /etc/crypttab can - # have modifications in the overlay that will be - # visible once the snapshot is active, but the version - # in /.snashots is still the unmodified base - is_transactional && mount_etc "${snapshot_dir}" if [ "$subvol" != "$root_subvol" ] && [ -n "$have_snapshots" ]; then + mount_chroot "${snapshot_dir}" + # In MicroOS we need to be sure to have the same /etc + # inside the snapshot. For example, /etc/crypttab can + # have modifications in the overlay that will be + # visible once the snapshot is active, but the version + # in /.snapshots is still the unmodified base + is_transactional && mount_etc "${snapshot_dir}" chroot "${snapshot_dir}" dracut "${dracut_args[@]}" "$tmpdir/initrd-0" "$kernel_version" + umount_chroot "${snapshot_dir}" else dracut "${dracut_args[@]}" "$tmpdir/initrd-0" "$kernel_version" fi - is_transactional && umount_etc "${snapshot_dir}" - [ "$subvol" != "$root_subvol" ] && [ -n "$have_snapshots" ] && umount_chroot "${snapshot_dir}" fi make_free_space_for_kernel "$snapshot" || err "No free space in $boot_root for new kernel" @@ -1118,6 +1113,34 @@ done } +cleanup_entries() +{ + info "Cleaning up boot entries" + + if [ ! -s "$entryfile" ]; then + if [ -n "$1" ]; then + update_entries_for_snapshot "$1" + else + update_entries_for_this_system + fi + fi + + local id snapshot kernel_version subvol src + while read -r id; do + read -r snapshot + read -r kernel_version + subvol="${subvol_prefix}/.snapshots/${snapshot}/snapshot" + src="${subvol#"${subvol_prefix}"}/lib/modules/$kernel_version/$image" + [ -e "$src" ] || { + info "Cleaning boot entry $id" + rm "${boot_root}/loader/entries/$id" + } + done < <(jq -r '.[] | .id, (.version | scan("(.*)@(.*)") | .[])' "$entryfile") + + dbg "Calling bootctl cleanup" + bootctl -q cleanup 2> /dev/null +} + list_entries() { info "Listing boot entries" @@ -3400,6 +3423,7 @@ [force-update]="" [add-kernel]="kernel" [remove-kernel]="kernel" + [cleanup]="" [set-default-snapshot]="" [add-all-kernels]="" [mkinitrd]="" @@ -3619,6 +3643,8 @@ remove_kernel "${3:-$root_snapshot}" "$2" ;; remove-all-kernels) remove_all_kernels "${2:-$root_snapshot}" ;; + cleanup) + cleanup_entries "${2:-}" ;; set-default-snapshot) set_default_snapshot "${2:-$root_snapshot}" ;; is-installed) ++++++ sdbootutil.obsinfo ++++++ --- /var/tmp/diff_new_pack.Jcab0P/_old 2025-04-10 21:58:34.550914870 +0200 +++ /var/tmp/diff_new_pack.Jcab0P/_new 2025-04-10 21:58:34.554915037 +0200 @@ -1,5 +1,5 @@ name: sdbootutil -version: 1+git20250407.f84e1da -mtime: 1744030840 -commit: f84e1dadb523d1486bdec2aff048dd0b7b63a5e4 +version: 1+git20250410.9086124 +mtime: 1744286739 +commit: 9086124f43b45a091e628146d54599a9e392d0a1