Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package sdbootutil for openSUSE:Factory 
checked in at 2023-11-06 21:13:37
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/sdbootutil (Old)
 and      /work/SRC/openSUSE:Factory/.sdbootutil.new.17445 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "sdbootutil"

Mon Nov  6 21:13:37 2023 rev:9 rq:1123573 version:1+git20231102.beb4c19

Changes:
--------
--- /work/SRC/openSUSE:Factory/sdbootutil/sdbootutil.changes    2023-11-02 
20:20:14.717132007 +0100
+++ /work/SRC/openSUSE:Factory/.sdbootutil.new.17445/sdbootutil.changes 
2023-11-06 21:13:40.225922038 +0100
@@ -1,0 +2,9 @@
+Thu Nov 02 14:57:57 UTC 2023 - lnus...@suse.de
+
+- Update to version 1+git20231102.beb4c19:
+  * Update sdboot in snapper hook
+  * Install command with specific snapshot
+  * Install sdbootutil marker next to loader
+  * In t-u mode, don't call sdbootutil in rpm scriptlets
+
+-------------------------------------------------------------------

Old:
----
  sdbootutil-1+git20231026.f43c33c.obscpio

New:
----
  sdbootutil-1+git20231102.beb4c19.obscpio

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ sdbootutil.spec ++++++
--- /var/tmp/diff_new_pack.oMtl9p/_old  2023-11-06 21:13:42.197994630 +0100
+++ /var/tmp/diff_new_pack.oMtl9p/_new  2023-11-06 21:13:42.197994630 +0100
@@ -27,7 +27,7 @@
 %define git_version %{nil}
 %endif
 Name:           sdbootutil
-Version:        1+git20231026.f43c33c%{git_version}
+Version:        1+git20231102.beb4c19%{git_version}
 Release:        0
 Summary:        script to install shim with sd-boot
 License:        MIT

++++++ _servicedata ++++++
--- /var/tmp/diff_new_pack.oMtl9p/_old  2023-11-06 21:13:42.233995955 +0100
+++ /var/tmp/diff_new_pack.oMtl9p/_new  2023-11-06 21:13:42.237996103 +0100
@@ -1,6 +1,6 @@
 <servicedata>
 <service name="tar_scm">
                 <param 
name="url">https://github.com/lnussel/sdbootutil.git</param>
-              <param 
name="changesrevision">f43c33c479838871b57c0f0acbb1b9ef2b06bb34</param></service></servicedata>
+              <param 
name="changesrevision">beb4c19c0ea72e9de9a6e789861baacf4b82ea24</param></service></servicedata>
 (No newline at EOF)
 

++++++ sdbootutil-1+git20231026.f43c33c.obscpio -> 
sdbootutil-1+git20231102.beb4c19.obscpio ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/sdbootutil-1+git20231026.f43c33c/10-sdbootutil.snapper 
new/sdbootutil-1+git20231102.beb4c19/10-sdbootutil.snapper
--- old/sdbootutil-1+git20231026.f43c33c/10-sdbootutil.snapper  2023-10-26 
09:53:50.000000000 +0200
+++ new/sdbootutil-1+git20231102.beb4c19/10-sdbootutil.snapper  2023-11-02 
14:56:28.000000000 +0100
@@ -43,7 +43,10 @@
 
        [ "$fs" = btrfs ] || return 1
 
-       is_transactional && /usr/bin/sdbootutil add-all-kernels "$num" || :
+       if is_transactional; then
+               /usr/bin/sdbootutil add-all-kernels "$num" || :
+               /usr/bin/sdbootutil update "$num" || :
+       fi
 
        /usr/bin/sdbootutil set-default-snapshot "$num"
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/sdbootutil-1+git20231026.f43c33c/rpm-script 
new/sdbootutil-1+git20231102.beb4c19/rpm-script
--- old/sdbootutil-1+git20231026.f43c33c/rpm-script     2023-10-26 
09:53:50.000000000 +0200
+++ new/sdbootutil-1+git20231102.beb4c19/rpm-script     2023-11-02 
14:56:28.000000000 +0100
@@ -73,10 +73,12 @@
     post)
        if [ ! -e /.buildenv ] ; then
            /usr/sbin/depmod -a "$kernelrelease-$flavor"
-           /usr/bin/sdbootutil --image="$image" add-kernel 
"$kernelrelease-$flavor"
-           # make sure to select the latest kernel
-           [ -z "$TRANSACTIONAL_UPDATE" ] && /usr/bin/sdbootutil 
set-default-snapshot
-           [ -e /usr/lib/systemd/system/purge-kernels.service ] && { 
:>/boot/do_purge_kernels || :; }
+           if [ -z "$TRANSACTIONAL_UPDATE" ]; then
+               /usr/bin/sdbootutil --image="$image" add-kernel 
"$kernelrelease-$flavor"
+               # make sure to select the latest kernel
+               /usr/bin/sdbootutil set-default-snapshot
+               [ -e /usr/lib/systemd/system/purge-kernels.service ] && { 
:>/boot/do_purge_kernels || :; }
+           fi
        fi
        [ -z "$certs" ] || 
/usr/lib/module-init-tools/kernel-scriptlets/cert-"$op" --ca-check 1 --certs 
"$certs" "$@" || script_rc=$?
        ;;
@@ -87,7 +89,7 @@
        # can't check $1 as kernel is usually multiversion. So need to check if
        # that particular kernel was actually removed from disk.
        if [ ! -e /.buildenv ] && [ ! -e 
/lib/modules/"$kernelrelease-$flavor/$image" ] ; then
-           /usr/bin/sdbootutil --image="$image" remove-kernel 
"$kernelrelease-$flavor"
+           [ -z "$TRANSACTIONAL_UPDATE" ] && /usr/bin/sdbootutil 
--image="$image" remove-kernel "$kernelrelease-$flavor"
            [ -z "$certs" ] || 
/usr/lib/module-init-tools/kernel-scriptlets/cert-"$op" --ca-check 1 --certs 
"$certs" "$@"
        fi
        ;;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/sdbootutil-1+git20231026.f43c33c/sdbootutil 
new/sdbootutil-1+git20231102.beb4c19/sdbootutil
--- old/sdbootutil-1+git20231026.f43c33c/sdbootutil     2023-10-26 
09:53:50.000000000 +0200
+++ new/sdbootutil-1+git20231102.beb4c19/sdbootutil     2023-11-02 
14:56:28.000000000 +0100
@@ -755,23 +755,31 @@
        echo "$v"
 }
 
+is_installed()
+{
+       sdboot_version > /dev/null && [ -e 
"$boot_root/$sdboot_dst/installed_by_sdbootutil" ]
+}
+
 find_sdboot()
 {
+       local prefix="/.snapshots/${1-$root_snapshot}/snapshot"
        # XXX: this is a hack in case we need to inject a signed
        # systemd-boot from a separate package
-       local sdboot="/usr/lib/systemd-boot/systemd-boot$firmware_arch.efi"
-       [ -e "$sdboot" ] || 
sdboot="/usr/lib/systemd/boot/efi/systemd-boot$firmware_arch.efi"
+       local 
sdboot="$prefix/usr/lib/systemd-boot/systemd-boot$firmware_arch.efi"
+       [ -e "$sdboot" ] || 
sdboot="$prefix/usr/lib/systemd/boot/efi/systemd-boot$firmware_arch.efi"
        [ -e "$sdboot" ] || err "missing $sdboot"
        echo "$sdboot"
 }
 
 sdboot_needs_update()
 {
+       local snapshot="${1-$root_snapshot}"
+       local prefix="/.snapshots/${snapshot}/snapshot"
        local v nv
        v="$(sdboot_version)"
        [ -n "$v" ] || return 1
        log_info "deployed version $v"
-       nv="$(sdboot_version "$(find_sdboot)")"
+       nv="$(sdboot_version "$(find_sdboot "$snapshot")")"
        [ -n "$v" ] || return 1
        log_info "system version $nv"
        systemd-analyze compare-versions "$v" lt "$nv" 2>/dev/null || return 1
@@ -781,9 +789,11 @@
 
 install_sdboot()
 {
+       local snapshot="${1:-$root_snapshot}"
+       local prefix="/.snapshots/${root_snapshot}/snapshot"
        local sdboot blkpart drive partno
 
-       sdboot=$(find_sdboot)
+       sdboot=$(find_sdboot "$1")
 
        mkdir -p "$boot_root/loader/entries"
 
@@ -795,19 +805,19 @@
        drive="/dev/${drive##*/}"
        read -r partno < "/sys/class/block/${blkpart##*/}"/partition
 
-       if [ -e "$shimdir/shim.efi" ]; then
+       if [ -e "$prefix$shimdir/shim.efi" ]; then
                log_info "Installing systemd-boot with shim into $boot_root"
                entry="$sdboot_dst/shim.efi"
                for i in MokManager shim; do
-                       install -D "$shimdir/$i.efi" 
"$boot_root$sdboot_dst/$i.efi"
+                       install -D "$prefix$shimdir/$i.efi" 
"$boot_root$sdboot_dst/$i.efi"
                done
                install -D "$sdboot" "$boot_root$sdboot_dst/grub.efi"
 
                # boot entry point
                for i in MokManager fallback; do
-                       install -D "$shimdir/$i.efi" 
"$boot_root/EFI/BOOT/$i.efi"
+                       install -D "$prefix$shimdir/$i.efi" 
"$boot_root/EFI/BOOT/$i.efi"
                done
-               install -D "$shimdir/shim.efi" 
"$boot_root/EFI/BOOT/BOOT${firmware_arch^^}.EFI"
+               install -D "$prefix$shimdir/shim.efi" 
"$boot_root/EFI/BOOT/BOOT${firmware_arch^^}.EFI"
        else
                log_info "Installing systemd-boot into $boot_root"
                entry="$sdboot_dst/${sdboot##*/}"
@@ -818,7 +828,7 @@
        echo "${entry##*/},openSUSE Boot Manager" | iconv -f ascii -t ucs2 > 
"$boot_root/$sdboot_dst/boot.csv"
 
        mkdir -p "$boot_root/$entry_token"
-       :> "$boot_root/$entry_token/installed_by_sdbootutil"
+       echo "$entry_token" > "$boot_root/$sdboot_dst/installed_by_sdbootutil"
        mkdir -p "/etc/kernel"
        [ -s /etc/kernel/entry-token ] || echo "$entry_token" > 
/etc/kernel/entry-token
        update_random_seed
@@ -957,7 +967,7 @@
 done
 
 case "$1" in
-       
install|needs-update|update|add-kernel|remove-kernel|set-default-snapshot|add-all-kernels|remove-all-kernels|is-installed|list-kernels|is-bootable)
 ;;
+       
install|needs-update|update|force-update|add-kernel|remove-kernel|set-default-snapshot|add-all-kernels|remove-all-kernels|is-installed|list-kernels|is-bootable)
 ;;
        kernels|snapshots|entries|"") stty_size; interactive=1 ;;
        *) err "unknown command $1" ;;
 esac
@@ -992,11 +1002,13 @@
 root_snapshot="${root_snapshot%/snapshot}"
 
 if [ "$1" = "install" ]; then
-       install_sdboot
+       install_sdboot "${2:-$root_snapshot}"
 elif [ "$1" = "needs-update" ]; then
-       sdboot_needs_update
+       sdboot_needs_update "${2:-$root_snapshot}"
 elif [ "$1" = "update" ]; then
-       sdboot_needs_update && install_sdboot
+       sdboot_needs_update "${2:-$root_snapshot}" && install_sdboot 
"${2:-$root_snapshot}"
+elif [ "$1" = "force-update" ]; then
+       is_installed && install_sdboot "${2:-$root_snapshot}"
 elif [ "$1" = "add-kernel" ]; then
        install_kernel "${3:-$root_subvol}" "$2"
 elif [ "$1" = "add-all-kernels" ]; then
@@ -1008,7 +1020,7 @@
 elif [ "$1" = "set-default-snapshot" ]; then
        set_default_snapshot "${2:-$root_snapshot}"
 elif [ "$1" = "is-installed" ]; then
-       if sdboot_version > /dev/null && [ -e 
"$boot_root/$entry_token/installed_by_sdbootutil" ]; then
+       if is_installed; then
                log_info "systemd-boot was installed using sdbootutil"
                exit 0
        else

++++++ sdbootutil.obsinfo ++++++
--- /var/tmp/diff_new_pack.oMtl9p/_old  2023-11-06 21:13:42.346000078 +0100
+++ /var/tmp/diff_new_pack.oMtl9p/_new  2023-11-06 21:13:42.350000226 +0100
@@ -1,5 +1,5 @@
 name: sdbootutil
-version: 1+git20231026.f43c33c
-mtime: 1698306830
-commit: f43c33c479838871b57c0f0acbb1b9ef2b06bb34
+version: 1+git20231102.beb4c19
+mtime: 1698933388
+commit: beb4c19c0ea72e9de9a6e789861baacf4b82ea24
 

Reply via email to