Version in base suite: 2024.12.1+dfsg-3 Base version: swupdate_2024.12.1+dfsg-3 Target version: swupdate_2024.12.1+dfsg-3+deb13u1 Base file: /srv/ftp-master.debian.org/ftp/pool/main/s/swupdate/swupdate_2024.12.1+dfsg-3.dsc Target file: /srv/ftp-master.debian.org/policy/pool/main/s/swupdate/swupdate_2024.12.1+dfsg-3+deb13u1.dsc changelog | 6 + patches/series | 1 patches/suricatta-wfx-Fix-rebooting.diff | 126 +++++++++++++++++++++++++++++++ 3 files changed, 133 insertions(+) diff -Nru swupdate-2024.12.1+dfsg/debian/changelog swupdate-2024.12.1+dfsg/debian/changelog --- swupdate-2024.12.1+dfsg/debian/changelog 2025-07-14 10:55:55.000000000 +0000 +++ swupdate-2024.12.1+dfsg/debian/changelog 2025-11-18 07:52:59.000000000 +0000 @@ -1,3 +1,9 @@ +swupdate (2024.12.1+dfsg-3+deb13u1) trixie; urgency=medium + + * Backport: suricatta/wfx: Fix rebooting (Closes: #1118485) + + -- Bastian Germann Tue, 18 Nov 2025 08:52:59 +0100 + swupdate (2024.12.1+dfsg-3) unstable; urgency=medium [ Quirin Gylstorff ] diff -Nru swupdate-2024.12.1+dfsg/debian/patches/series swupdate-2024.12.1+dfsg/debian/patches/series --- swupdate-2024.12.1+dfsg/debian/patches/series 2025-07-14 10:55:24.000000000 +0000 +++ swupdate-2024.12.1+dfsg/debian/patches/series 2025-11-18 07:52:59.000000000 +0000 @@ -1,3 +1,4 @@ Link-config-to-swupdate-www-path.diff Replace-Font-Awesome-5-with-Fork-Awesome.diff use-gcc-compiler.diff +suricatta-wfx-Fix-rebooting.diff diff -Nru swupdate-2024.12.1+dfsg/debian/patches/suricatta-wfx-Fix-rebooting.diff swupdate-2024.12.1+dfsg/debian/patches/suricatta-wfx-Fix-rebooting.diff --- swupdate-2024.12.1+dfsg/debian/patches/suricatta-wfx-Fix-rebooting.diff 1970-01-01 00:00:00.000000000 +0000 +++ swupdate-2024.12.1+dfsg/debian/patches/suricatta-wfx-Fix-rebooting.diff 2025-11-18 07:52:59.000000000 +0000 @@ -0,0 +1,126 @@ +Origin: upstream, 6281f3783a303904981523ed8388b468d58eb5a0 +From: "Storm, Christian" +Date: Tue, 15 Jul 2025 08:59:07 +0000 +Subject: suricatta/wfx: Fix rebooting via tools/swupdate-progress.c + +The changes leading to commit 077ef4f broke rebooting via +tools/swupdate-progress.c. Hence, adapt the C Lua bridge +lua_notify_progress() and update its invocation in +suricatta/server_wfx.lua as well as updating / fixing +Lua annotations. + +Signed-off-by: Christian Storm +--- + corelib/lua_interface.c | 17 +++++++++-------- + doc/source/suricatta.rst | 8 ++++---- + handlers/swupdate.lua | 5 +++-- + suricatta/server_wfx.lua | 6 ++++-- + suricatta/suricatta.lua | 5 +++-- + 5 files changed, 23 insertions(+), 18 deletions(-) + +diff --git a/corelib/lua_interface.c b/corelib/lua_interface.c +index 8d57aaa9..1ff3e5e4 100644 +--- a/corelib/lua_interface.c ++++ b/corelib/lua_interface.c +@@ -1232,17 +1232,18 @@ static int l_stat(lua_State *L) + * @brief Dispatch a message to the progress interface. + * + * @param [Lua] Message to dispatch to progress interface. ++ * @param [Lua] progress_cause_t number (optional), default: CAUSE_NONE + * @return [Lua] nil. + */ + int lua_notify_progress(lua_State *L) { +- /* +- * NOTE: level is INFOLEVEL for the sake of specifying a level. +- * It is unused in core/notifier.c :: progress_notifier() as the +- * progress emitter doesn't know about log levels. +- */ +- notify(PROGRESS, RECOVERY_NO_ERROR, INFOLEVEL, luaL_checkstring(L, -1)); +- lua_pop(L, 1); +- return 0; ++ lua_Number cause = CAUSE_NONE; ++ if (lua_isnumber(L, -1) == 1) { ++ cause = lua_tonumber(L, -1); ++ lua_pop(L, 1); ++ } ++ notify(PROGRESS, (progress_cause_t)cause, INFOLEVEL, luaL_checkstring(L, -1)); ++ lua_pop(L, 1); ++ return 0; + } + + /** +diff --git a/doc/source/suricatta.rst b/doc/source/suricatta.rst +index 474d02cc..a4081a63 100644 +--- a/doc/source/suricatta.rst ++++ b/doc/source/suricatta.rst +@@ -557,10 +557,10 @@ The ``suricatta.status`` table exposes the ``server_op_res_t`` enum values defin + The ``suricatta.notify`` table provides the usual logging functions to the Lua + suricatta module matching their uppercase-named pendants available in the C realm. + +-One notable exception is ``suricatta.notify.progress(message)`` which dispatches the +-message to the progress interface (see :doc:`progress`). Custom progress client +-implementations listening and acting on custom progress messages can be realized +-using this function. ++One notable exception is ``suricatta.notify.progress(message, cause)`` which ++dispatches the message to the progress interface (see :doc:`progress`). Custom ++progress client implementations listening and acting on custom progress messages ++can be realized using this function. + + All notify functions return ``nil``. + +diff --git a/handlers/swupdate.lua b/handlers/swupdate.lua +index aa8a31d0..d32f83b9 100644 +--- a/handlers/swupdate.lua ++++ b/handlers/swupdate.lua +@@ -63,8 +63,9 @@ swupdate.warn = function(format, ...) end + swupdate.debug = function(format, ...) end + + --- Lua equivalent of `notify(PROGRESS, ..., msg)`. +---- @param msg string Message to send to progress interface +-swupdate.progress = function(msg) end ++--- @param msg string Message to send to progress interface ++--- @param cause number | nil `progress_cause_t` value as defined in `include/progress_ipc.h` ++swupdate.progress = function(msg, cause) end + + --- Lua equivalent of `notify(status, error, INFOLEVEL, msg)`. + --- @param status swupdate.RECOVERY_STATUS Current status, one of `swupdate.RECOVERY_STATUS`'s values +diff --git a/suricatta/server_wfx.lua b/suricatta/server_wfx.lua +index 0978ed50..d0b01bad 100644 +--- a/suricatta/server_wfx.lua ++++ b/suricatta/server_wfx.lua +@@ -1471,8 +1471,10 @@ M.job.workflow.dispatch:set( + suricatta.notify.warn("Cannot initialize progress reporting channel, won't send progress.") + end + +- suricatta.notify.progress(M.utils.string.escape([[{"%s": { "reboot-mode" : "no-reboot"}}]]) +- :format(suricatta.ipc.progress_cause.CAUSE_REBOOT_MODE)) ++ suricatta.notify.progress( ++ M.utils.string.escape([[{ "reboot-mode" : "no-reboot"}]]), ++ suricatta.ipc.progress_cause.CAUSE_REBOOT_MODE ++ ) + + suricatta.notify.debug( + "%s Version '%s' (Type: %s).", +diff --git a/suricatta/suricatta.lua b/suricatta/suricatta.lua +index 24d6eb8f..b8707a25 100644 +--- a/suricatta/suricatta.lua ++++ b/suricatta/suricatta.lua +@@ -47,6 +47,7 @@ suricatta.status = { + -- + -- Translates to `notify(string.format(message, ...))`, + -- @see `corelib/lua_interface.c` ++-- except for `suricatta.notify.progress()`. + -- + --- @class suricatta.notify + suricatta.notify = { +@@ -60,8 +61,8 @@ suricatta.notify = { + info = function(message, ...) end, + --- @type fun(message: string, ...: any) + warn = function(message, ...) end, +- --- @type fun(message: string, ...: any) +- progress = function(message, ...) end, ++ --- @type fun(message: string, cause:suricatta.ipc.progress_cause?) ++ progress = function(message, cause) end, + } + +