packge/swupdate: bump to version 2025.12
PATCH 1/1 packge/swupdate: bump to version 2025.12
* libconfig is required by default so let's select it
* from this version crypto is required to let's add Backends:
Openssl(by default), WolfSSL, MbedTLS
* align swupdate.config to the most basic one
--- package/swupdate/Config.in | 25 +++++++++++++++++++++++-- package/swupdate/swupdate.config | 6 ++---- package/swupdate/swupdate.hash | 2 +- package/swupdate/swupdate.mk | 17 +++++------------ 4 files changed, 31 insertions(+), 19 deletions(-)
package/swupdate/Config.in +23 -2
@@ -5,7 +5,9 @@ config BR2_PACKAGE_SWUPDATE depends on BR2_USE_MMU # fork() depends on BR2_TOOLCHAIN_HAS_SYNC_4 # json-c select BR2_PACKAGE_JSON_C + select BR2_PACKAGE_LIBCONFIG select BR2_PACKAGE_LIBUBOOTENV + select BR2_PACKAGE_OPENSSL if !(BR2_PACKAGE_MBEDTLS || BR2_PACKAGE_WOLFSSL) help swupdate provides a reliable way to update the software on an embedded system.
@@ -25,8 +27,6 @@ config BR2_PACKAGE_SWUPDATE want to have Lua support. * Select BR2_PACKAGE_LIBCURL if you want to use the download feature. - * Select BR2_PACKAGE_OPENSSL or BR2_PACKAGE_MBEDTLS if you - want to add encryption support. * Select BR2_PACKAGE_MTD if you want to use swupdate with UBI partitions. * Select BR2_PACKAGE_ZLIB if you want to deal with gzip
@@ -83,6 +83,27 @@ config BR2_PACKAGE_SWUPDATE_INSTALL_WEBSITE This is necessary if you want to run swupdate with the embedded webserver and do not provide an own website to be installed to /var/www/swupdate. + +choice + prompt "Crypto Backends" + help + Select crypto libraries to be used in swupdate. + +config BR2_PACKAGE_SWUPDATE_OPENSSL + bool "openssl" + default y + depends on BR2_PACKAGE_OPENSSL + +config BR2_PACKAGE_SWUPDATE_WOLFSSL + bool "wolfssl" + depends on BR2_PACKAGE_WOLFSSL + +config BR2_PACKAGE_SWUPDATE_MBEDTLS + bool "mbedtls" + depends on BR2_PACKAGE_MBEDTLS + +endchoice + endif comment "swupdate needs a toolchain w/ dynamic library, threads"
package/swupdate/swupdate.config +2 -4
@@ -2,7 +2,6 @@ # Automatically generated file; DO NOT EDIT. # Swupdate Configuration # -CONFIG_HAVE_DOT_CONFIG=y # # Swupdate Settings
@@ -24,7 +23,6 @@ CONFIG_SW_VERSIONS_FILE="/etc/sw-versions" # CONFIG_SOCKET_CTRL_PATH="/tmp/sockinstctrl" CONFIG_SOCKET_PROGRESS_PATH="/tmp/swupdateprog" -CONFIG_SOCKET_REMOTE_HANDLER_DIRECTORY="/tmp/" # # MTD support needs libmtd
@@ -60,7 +58,7 @@ CONFIG_BOOTLOADER_NONE=y # # U-Boot support needs libubootenv, libz # -CONFIG_SSL_IMPL_NONE=y +CONFIG_SSL_IMPL_OPENSSL=y # # Image downloading support needs libcurl
@@ -105,7 +103,7 @@ CONFIG_PARSERROOT="" # ubivol support needs libubi # # CONFIG_DISKPART is not set -CONFIG_RAW=y +# CONFIG_RAW is not set # CONFIG_RDIFFHANDLER is not set # CONFIG_SHELLSCRIPTHANDLER is not set
package/swupdate/swupdate.hash +1 -1
@@ -1,5 +1,5 @@ # Locally calculated -sha256 678b47fd2419727c4d0abf5c9f3bc0dc4b67e95951132bd1c8f5603e88947779 swupdate-2025.05.tar.gz +sha256 8517f3730eeb66e20e651b881dd4b9c10ca9ae05e3883db59b5df18ab1eaa533 swupdate-2025.12.tar.gz sha256 4cf04ed34ff0ebbf5c71345b56e6af5093fc17206364cca0ebbae92ef3940683 LICENSES/BSD-1-Clause.txt sha256 e27a3e87706b3aa5ff2e50eaafe2e6ed5397fbf2d7679eaf444a6d000518a3a6 LICENSES/BSD-3-Clause.txt sha256 0558101984550fa84d1d13c2af11d116c20079d2be58711e8d99cadce7009192 LICENSES/CC0-1.0.txt
package/swupdate/swupdate.mk +5 -12
@@ -4,7 +4,7 @@ # ################################################################################ -SWUPDATE_VERSION = 2025.05 +SWUPDATE_VERSION = 2025.12 SWUPDATE_SITE = $(call github,sbabic,swupdate,$(SWUPDATE_VERSION)) SWUPDATE_LICENSE = GPL-2.0, GPL-2.0+, LGPL-2.1+, MIT, ISC, BSD-1-Clause, BSD-3-Clause, CC0-1.0, CC-BY-SA-4.0, OFL-1.1 SWUPDATE_LICENSE_FILES = LICENSES/BSD-1-Clause.txt \
@@ -18,7 +18,7 @@ SWUPDATE_LICENSE_FILES = LICENSES/BSD-1-Clause.txt \ LICENSES/MIT.txt \ LICENSES/OFL-1.1.txt SWUPDATE_INSTALL_STAGING = YES -SWUPDATE_DEPENDENCIES = json-c libubootenv +SWUPDATE_DEPENDENCIES = json-c libconfig libubootenv # swupdate uses $CROSS-cc instead of $CROSS-gcc, which is not # available in all external toolchains, and use CC for linking. Ensure
@@ -51,13 +51,6 @@ else SWUPDATE_MAKE_ENV += HAVE_LIBBLKID=n endif -ifeq ($(BR2_PACKAGE_LIBCONFIG),y) -SWUPDATE_DEPENDENCIES += libconfig -SWUPDATE_MAKE_ENV += HAVE_LIBCONFIG=y -else -SWUPDATE_MAKE_ENV += HAVE_LIBCONFIG=n -endif - ifeq ($(BR2_PACKAGE_LIBCURL),y) SWUPDATE_DEPENDENCIES += libcurl SWUPDATE_MAKE_ENV += HAVE_LIBCURL=y
@@ -107,7 +100,7 @@ else SWUPDATE_MAKE_ENV += HAVE_LUA=n endif -ifeq ($(BR2_PACKAGE_MBEDTLS),y) +ifeq ($(BR2_PACKAGE_SWUPDATE_MBEDTLS),y) SWUPDATE_DEPENDENCIES += mbedtls SWUPDATE_MAKE_ENV += HAVE_MBEDTLS=y else
@@ -123,7 +116,7 @@ SWUPDATE_MAKE_ENV += HAVE_LIBMTD=n SWUPDATE_MAKE_ENV += HAVE_LIBUBI=n endif -ifeq ($(BR2_PACKAGE_OPENSSL),y) +ifeq ($(BR2_PACKAGE_SWUPDATE_OPENSSL),y) SWUPDATE_DEPENDENCIES += openssl SWUPDATE_MAKE_ENV += HAVE_LIBSSL=y SWUPDATE_MAKE_ENV += HAVE_LIBCRYPTO=y
@@ -152,7 +145,7 @@ define SWUPDATE_SET_SYSTEMD endef endif -ifeq ($(BR2_PACKAGE_WOLFSSL),y) +ifeq ($(BR2_PACKAGE_SWUPDATE_WOLFSSL),y) SWUPDATE_DEPENDENCIES += wolfssl SWUPDATE_MAKE_ENV += HAVE_WOLFSSL=y else
Signature · 6 lines
2.47.3 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Quoted 19 lines · Giulio Benetti
* libconfig is required by default so let's select it
* from this version crypto is required to let's add Backends:
Openssl(by default), WolfSSL, MbedTLS
* align swupdate.config to the most basic oneSigned-off-by Giulio Benetti <[email protected]>--- package/swupdate/Config.in | 25 +++++++++++++++++++++++-- package/swupdate/swupdate.config | 6 ++---- package/swupdate/swupdate.hash | 2 +- package/swupdate/swupdate.mk | 17 +++++------------ 4 files changed, 31 insertions(+), 19 deletions(-)package/swupdate/Config.in +0
-0
package/swupdate/Config.in config BR2_PACKAGE_SWUPDATE · line 10
Quoted 6 lines
package/swupdate/Config.in +2
-0@@ -5,7 +5,9 @@ config BR2_PACKAGE_SWUPDATE depends on BR2_USE_MMU # fork() depends on BR2_TOOLCHAIN_HAS_SYNC_4 # json-c select BR2_PACKAGE_JSON_C + select BR2_PACKAGE_LIBCONFIG select BR2_PACKAGE_LIBUBOOTENV + select BR2_PACKAGE_OPENSSL if !(BR2_PACKAGE_MBEDTLS || BR2_PACKAGE_WOLFSSL)
Hmm, I don't think it's intentional for swupdate to require a crypto backend, although there were some bugs that may have inadvertently made one effectively required, is a crypto backend actually required on swupdate master? This was one bug I fixed that might have been causing runtime issues with no crypto backend:
https://github.com/sbabic/swupdate/commit/1d886b41078448f3444a183269a49a5485744941
If there's still a bug still causing no-crypto builds to fail it probably should be fixed in upstream swupdate.
Quoted 28 lines
package/swupdate/Config.in +11
-2help swupdate provides a reliable way to update the software on an embedded system.@@ -25,8 +27,6 @@ config BR2_PACKAGE_SWUPDATE want to have Lua support. * Select BR2_PACKAGE_LIBCURL if you want to use the download feature. - * Select BR2_PACKAGE_OPENSSL or BR2_PACKAGE_MBEDTLS if you - want to add encryption support. * Select BR2_PACKAGE_MTD if you want to use swupdate with UBI partitions. * Select BR2_PACKAGE_ZLIB if you want to deal with gzip@@ -83,6 +83,27 @@ config BR2_PACKAGE_SWUPDATE_INSTALL_WEBSITE This is necessary if you want to run swupdate with the embedded webserver and do not provide an own website to be installed to /var/www/swupdate. + +choice + prompt "Crypto Backends" + help + Select crypto libraries to be used in swupdate. + +config BR2_PACKAGE_SWUPDATE_OPENSSL + bool "openssl" + default y + depends on BR2_PACKAGE_OPENSSL +
package/swupdate/Config.in config BR2_PACKAGE_SWUPDATE_INSTALL_WEBSITE · line 106
Quoted 10 lines
package/swupdate/Config.in +10
-0+config BR2_PACKAGE_SWUPDATE_WOLFSSL + bool "wolfssl" + depends on BR2_PACKAGE_WOLFSSL + +config BR2_PACKAGE_SWUPDATE_MBEDTLS + bool "mbedtls" + depends on BR2_PACKAGE_MBEDTLS + +endchoice +
This looks wrong, swupdate supports multiple providers at the same time with runtime backend selection, a choice menu implies they are mutually exclusive build time dependencies which is not the case:
https://github.com/sbabic/swupdate/blob/2025.12/doc/source/swupdate.rst#crypto-selection-parameters
Enabling/disabling providers can be done here in swupdate's kconfig which indicates a crypto provider is only required for certain features like hash verification, encryption and signed images:
https://github.com/sbabic/swupdate/blob/2025.12/crypto/Kconfig
Quoted 108 lines
package/swupdate/Config.in +0
-0endif comment "swupdate needs a toolchain w/ dynamic library, threads"package/swupdate/swupdate.config +2
-4@@ -2,7 +2,6 @@ # Automatically generated file; DO NOT EDIT. # Swupdate Configuration # -CONFIG_HAVE_DOT_CONFIG=y # # Swupdate Settings@@ -24,7 +23,6 @@ CONFIG_SW_VERSIONS_FILE="/etc/sw-versions" # CONFIG_SOCKET_CTRL_PATH="/tmp/sockinstctrl" CONFIG_SOCKET_PROGRESS_PATH="/tmp/swupdateprog" -CONFIG_SOCKET_REMOTE_HANDLER_DIRECTORY="/tmp/" # # MTD support needs libmtd@@ -60,7 +58,7 @@ CONFIG_BOOTLOADER_NONE=y # # U-Boot support needs libubootenv, libz # -CONFIG_SSL_IMPL_NONE=y +CONFIG_SSL_IMPL_OPENSSL=y # # Image downloading support needs libcurl@@ -105,7 +103,7 @@ CONFIG_PARSERROOT="" # ubivol support needs libubi # # CONFIG_DISKPART is not set -CONFIG_RAW=y +# CONFIG_RAW is not set # CONFIG_RDIFFHANDLER is not set # CONFIG_SHELLSCRIPTHANDLER is not setpackage/swupdate/swupdate.hash +1
-1@@ -1,5 +1,5 @@ # Locally calculated -sha256 678b47fd2419727c4d0abf5c9f3bc0dc4b67e95951132bd1c8f5603e88947779 swupdate-2025.05.tar.gz +sha256 8517f3730eeb66e20e651b881dd4b9c10ca9ae05e3883db59b5df18ab1eaa533 swupdate-2025.12.tar.gz sha256 4cf04ed34ff0ebbf5c71345b56e6af5093fc17206364cca0ebbae92ef3940683 LICENSES/BSD-1-Clause.txt sha256 e27a3e87706b3aa5ff2e50eaafe2e6ed5397fbf2d7679eaf444a6d000518a3a6 LICENSES/BSD-3-Clause.txt sha256 0558101984550fa84d1d13c2af11d116c20079d2be58711e8d99cadce7009192 LICENSES/CC0-1.0.txtpackage/swupdate/swupdate.mk +4
-11@@ -4,7 +4,7 @@ # ################################################################################ -SWUPDATE_VERSION = 2025.05 +SWUPDATE_VERSION = 2025.12 SWUPDATE_SITE = $(call github,sbabic,swupdate,$(SWUPDATE_VERSION)) SWUPDATE_LICENSE = GPL-2.0, GPL-2.0+, LGPL-2.1+, MIT, ISC, BSD-1-Clause, BSD-3-Clause, CC0-1.0, CC-BY-SA-4.0, OFL-1.1 SWUPDATE_LICENSE_FILES = LICENSES/BSD-1-Clause.txt \@@ -18,7 +18,7 @@ SWUPDATE_LICENSE_FILES = LICENSES/BSD-1-Clause.txt \ LICENSES/MIT.txt \ LICENSES/OFL-1.1.txt SWUPDATE_INSTALL_STAGING = YES -SWUPDATE_DEPENDENCIES = json-c libubootenv +SWUPDATE_DEPENDENCIES = json-c libconfig libubootenv # swupdate uses $CROSS-cc instead of $CROSS-gcc, which is not # available in all external toolchains, and use CC for linking. Ensure@@ -51,13 +51,6 @@ else SWUPDATE_MAKE_ENV += HAVE_LIBBLKID=n endif -ifeq ($(BR2_PACKAGE_LIBCONFIG),y) -SWUPDATE_DEPENDENCIES += libconfig -SWUPDATE_MAKE_ENV += HAVE_LIBCONFIG=y -else -SWUPDATE_MAKE_ENV += HAVE_LIBCONFIG=n -endif - ifeq ($(BR2_PACKAGE_LIBCURL),y) SWUPDATE_DEPENDENCIES += libcurl SWUPDATE_MAKE_ENV += HAVE_LIBCURL=y@@ -107,7 +100,7 @@ else SWUPDATE_MAKE_ENV += HAVE_LUA=n endif -ifeq ($(BR2_PACKAGE_MBEDTLS),y) +ifeq ($(BR2_PACKAGE_SWUPDATE_MBEDTLS),y) SWUPDATE_DEPENDENCIES += mbedtls SWUPDATE_MAKE_ENV += HAVE_MBEDTLS=y else@@ -123,7 +116,7 @@ SWUPDATE_MAKE_ENV += HAVE_LIBMTD=n SWUPDATE_MAKE_ENV += HAVE_LIBUBI=n endif -ifeq ($(BR2_PACKAGE_OPENSSL),y) +ifeq ($(BR2_PACKAGE_SWUPDATE_OPENSSL),y) SWUPDATE_DEPENDENCIES += openssl SWUPDATE_MAKE_ENV += HAVE_LIBSSL=y SWUPDATE_MAKE_ENV += HAVE_LIBCRYPTO=y
package/swupdate/swupdate.mk define SWUPDATE_SET_SYSTEMD · line 151
Quoted 8 lines
package/swupdate/swupdate.mk +1
-1@@ -152,7 +145,7 @@ define SWUPDATE_SET_SYSTEMD endef endif -ifeq ($(BR2_PACKAGE_WOLFSSL),y) +ifeq ($(BR2_PACKAGE_SWUPDATE_WOLFSSL),y) SWUPDATE_DEPENDENCIES += wolfssl SWUPDATE_MAKE_ENV += HAVE_WOLFSSL=y else
We should continue passing all available crypto providers to swupdate rather than only passing one.
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
Hi James,
Quoted 28 lines
Il giorno 23 mar 2026, alle ore 19:47, James Hilliard <[email protected]> ha scritto:
On Mon, Mar 23, 2026 at 9:03 AM Giulio Benetti
Quoted 24 lines · <[email protected]> wrote:
* libconfig is required by default so let's select it
* from this version crypto is required to let's add Backends:
Openssl(by default), WolfSSL, MbedTLS
* align swupdate.config to the most basic oneSigned-off-by Giulio Benetti <[email protected]>---
package/swupdate/Config.in | 25 +++++++++++++++++++++++-- package/swupdate/swupdate.config | 6 ++---- package/swupdate/swupdate.hash | 2 +- package/swupdate/swupdate.mk | 17 +++++------------ 4 files changed, 31 insertions(+), 19 deletions(-)package/swupdate/Config.in +1
-0@@ -5,7 +5,9 @@ config BR2_PACKAGE_SWUPDATE depends on BR2_USE_MMU # fork() depends on BR2_TOOLCHAIN_HAS_SYNC_4 # json-c select BR2_PACKAGE_JSON_C + select BR2_PACKAGE_LIBCONFIG select BR2_PACKAGE_LIBUBOOTENV
Quoted 8 lines
package/swupdate/Config.in config BR2_PACKAGE_SWUPDATE · line 10
Quoted 1 line
package/swupdate/Config.in +1
-0+ select BR2_PACKAGE_OPENSSL if !(BR2_PACKAGE_MBEDTLS || BR2_PACKAGE_WOLFSSL)Hmm, I don't think it's intentional for swupdate to require a crypto backend, although there were some bugs that may have inadvertently made one effectively required, is a crypto backend actually required on swupdate master? This was one bug I fixed that might have been causing runtime issues with no crypto backend:
https://github.com/sbabic/swupdate/commit/1d886b41078448f3444a183269a49a5485744941
Ouch, totally forgotten about this patch.
With this everything changes, so I’m going to send a V2 with that patch backported locally.
Thanks a lot James for repeating :-)
Kind regards
Giulio
Quoted 164 lines
If there's still a bug still causing no-crypto builds to fail it probably should be fixed in upstream swupdate.
Quoted 28 lines
package/swupdate/Config.in +11
-2help swupdate provides a reliable way to update the software on an embedded system.@@ -25,8 +27,6 @@ config BR2_PACKAGE_SWUPDATE want to have Lua support. * Select BR2_PACKAGE_LIBCURL if you want to use the download feature. - * Select BR2_PACKAGE_OPENSSL or BR2_PACKAGE_MBEDTLS if you - want to add encryption support. * Select BR2_PACKAGE_MTD if you want to use swupdate with UBI partitions. * Select BR2_PACKAGE_ZLIB if you want to deal with gzip@@ -83,6 +83,27 @@ config BR2_PACKAGE_SWUPDATE_INSTALL_WEBSITE This is necessary if you want to run swupdate with the embedded webserver and do not provide an own website to be installed to /var/www/swupdate. + +choice + prompt "Crypto Backends" + help + Select crypto libraries to be used in swupdate. + +config BR2_PACKAGE_SWUPDATE_OPENSSL + bool "openssl" + default y + depends on BR2_PACKAGE_OPENSSL +package/swupdate/Config.in config BR2_PACKAGE_SWUPDATE_INSTALL_WEBSITE · line 106
Quoted 10 lines
package/swupdate/Config.in +10
-0+config BR2_PACKAGE_SWUPDATE_WOLFSSL + bool "wolfssl" + depends on BR2_PACKAGE_WOLFSSL + +config BR2_PACKAGE_SWUPDATE_MBEDTLS + bool "mbedtls" + depends on BR2_PACKAGE_MBEDTLS + +endchoice +This looks wrong, swupdate supports multiple providers at the same time with runtime backend selection, a choice menu implies they are mutually exclusive build time dependencies which is not the case:
https://github.com/sbabic/swupdate/blob/2025.12/doc/source/swupdate.rst#crypto-selection-parametersEnabling/disabling providers can be done here in swupdate's kconfig which indicates a crypto provider is only required for certain features like hash verification, encryption and signed images:
https://github.com/sbabic/swupdate/blob/2025.12/crypto/KconfigQuoted 111 lines
endif
comment "swupdate needs a toolchain w/ dynamic library, threads"
package/swupdate/swupdate.config +0
-1@@ -2,7 +2,6 @@ # Automatically generated file; DO NOT EDIT. # Swupdate Configuration # -CONFIG_HAVE_DOT_CONFIG=y # # Swupdate Settings@@ -24,7 +23,6 @@ CONFIG_SW_VERSIONS_FILE="/etc/sw-versions" #
CONFIG_SOCKET_CTRL_PATH="/tmp/sockinstctrl"CONFIG_SOCKET_PROGRESS_PATH="/tmp/swupdateprog"
-CONFIG_SOCKET_REMOTE_HANDLER_DIRECTORY="/tmp/"#
# MTD support needs libmtdpackage/swupdate/swupdate.config +2
-2@@ -60,7 +58,7 @@ CONFIG_BOOTLOADER_NONE=y # # U-Boot support needs libubootenv, libz # -CONFIG_SSL_IMPL_NONE=y +CONFIG_SSL_IMPL_OPENSSL=y # # Image downloading support needs libcurl@@ -105,7 +103,7 @@ CONFIG_PARSERROOT="" # ubivol support needs libubi # # CONFIG_DISKPART is not set -CONFIG_RAW=y +# CONFIG_RAW is not set # CONFIG_RDIFFHANDLER is not set # CONFIG_SHELLSCRIPTHANDLER is not setpackage/swupdate/swupdate.hash +1
-1@@ -1,5 +1,5 @@ # Locally calculated -sha256 678b47fd2419727c4d0abf5c9f3bc0dc4b67e95951132bd1c8f5603e88947779 swupdate-2025.05.tar.gz +sha256 8517f3730eeb66e20e651b881dd4b9c10ca9ae05e3883db59b5df18ab1eaa533 swupdate-2025.12.tar.gzsha256 4cf04ed34ff0ebbf5c71345b56e6af5093fc17206364cca0ebbae92ef3940683 LICENSES/BSD-1-Clause.txt sha256 e27a3e87706b3aa5ff2e50eaafe2e6ed5397fbf2d7679eaf444a6d000518a3a6 LICENSES/BSD-3-Clause.txt sha256 0558101984550fa84d1d13c2af11d116c20079d2be58711e8d99cadce7009192 LICENSES/CC0-1.0.txtpackage/swupdate/swupdate.mk +1
-1@@ -4,7 +4,7 @@ # ################################################################################ -SWUPDATE_VERSION = 2025.05 +SWUPDATE_VERSION = 2025.12 SWUPDATE_SITE = $(call github,sbabic,swupdate,$(SWUPDATE_VERSION))
SWUPDATE_LICENSE= GPL-2.0, GPL-2.0+, LGPL-2.1+, MIT, ISC, BSD-1-Clause, BSD-3-Clause, CC0-1.0, CC-BY-SA-4.0, OFL-1.1SWUPDATE_LICENSE_FILES=LICENSES/BSD-1-Clause.txt\package/swupdate/swupdate.mk +0
-0@@ -18,7 +18,7 @@ SWUPDATE_LICENSE_FILES = LICENSES/BSD-1-Clause.txt \ LICENSES/MIT.txt \ LICENSES/OFL-1.1.txt
SWUPDATE_INSTALL_STAGING= YESpackage/swupdate/swupdate.mk +1
-1-SWUPDATE_DEPENDENCIES = json-c libubootenv +SWUPDATE_DEPENDENCIES = json-c libconfig libubootenv# swupdate uses $CROSS-cc instead of $CROSS-gcc, which is not # available in all external toolchains, and use CC for linking. Ensurepackage/swupdate/swupdate.mk +0
-0@@ -51,13 +51,6 @@ else
SWUPDATE_MAKE_ENV+= HAVE_LIBBLKID=n
endifpackage/swupdate/swupdate.mk +0
-7-ifeq ($(BR2_PACKAGE_LIBCONFIG),y) -SWUPDATE_DEPENDENCIES += libconfig -SWUPDATE_MAKE_ENV += HAVE_LIBCONFIG=y -else -SWUPDATE_MAKE_ENV += HAVE_LIBCONFIG=n -endif -ifeq ($(BR2_PACKAGE_LIBCURL),y)
SWUPDATE_DEPENDENCIES+= libcurlSWUPDATE_MAKE_ENV+= HAVE_LIBCURL=ypackage/swupdate/swupdate.mk +0
-0@@ -107,7 +100,7 @@ else
SWUPDATE_MAKE_ENV+= HAVE_LUA=n
endifpackage/swupdate/swupdate.mk +1
-1-ifeq ($(BR2_PACKAGE_MBEDTLS),y) +ifeq ($(BR2_PACKAGE_SWUPDATE_MBEDTLS),y)
SWUPDATE_DEPENDENCIES+= mbedtlsSWUPDATE_MAKE_ENV+= HAVE_MBEDTLS=y
elsepackage/swupdate/swupdate.mk +0
-0@@ -123,7 +116,7 @@ SWUPDATE_MAKE_ENV += HAVE_LIBMTD=n
SWUPDATE_MAKE_ENV+= HAVE_LIBUBI=n
endifpackage/swupdate/swupdate.mk +1
-1-ifeq ($(BR2_PACKAGE_OPENSSL),y) +ifeq ($(BR2_PACKAGE_SWUPDATE_OPENSSL),y)
SWUPDATE_DEPENDENCIES+= opensslSWUPDATE_MAKE_ENV+= HAVE_LIBSSL=ySWUPDATE_MAKE_ENV+= HAVE_LIBCRYPTO=ypackage/swupdate/swupdate.mk +0
-0@@ -152,7 +145,7 @@ define SWUPDATE_SET_SYSTEMDendef
endif
Quoted 8 lines
Quoted 5 lines
package/swupdate/swupdate.mk +1
-1-ifeq ($(BR2_PACKAGE_WOLFSSL),y) +ifeq ($(BR2_PACKAGE_SWUPDATE_WOLFSSL),y)
SWUPDATE_DEPENDENCIES+= wolfsslSWUPDATE_MAKE_ENV+= HAVE_WOLFSSL=y
elseWe should continue passing all available crypto providers to swupdate rather than only passing one.
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
Hi James,
Quoted 35 lines · James Hilliard
Quoted 19 lines · Giulio Benetti
* libconfig is required by default so let's select it
* from this version crypto is required to let's add Backends:
Openssl(by default), WolfSSL, MbedTLS
* align swupdate.config to the most basic oneSigned-off-by Giulio Benetti <[email protected]>--- package/swupdate/Config.in | 25 +++++++++++++++++++++++-- package/swupdate/swupdate.config | 6 ++---- package/swupdate/swupdate.hash | 2 +- package/swupdate/swupdate.mk | 17 +++++------------ 4 files changed, 31 insertions(+), 19 deletions(-)package/swupdate/Config.in +0
-0package/swupdate/Config.in config BR2_PACKAGE_SWUPDATE · line 10
Quoted 6 lines
package/swupdate/Config.in +2
-0@@ -5,7 +5,9 @@ config BR2_PACKAGE_SWUPDATE depends on BR2_USE_MMU # fork() depends on BR2_TOOLCHAIN_HAS_SYNC_4 # json-c select BR2_PACKAGE_JSON_C + select BR2_PACKAGE_LIBCONFIG select BR2_PACKAGE_LIBUBOOTENV + select BR2_PACKAGE_OPENSSL if !(BR2_PACKAGE_MBEDTLS || BR2_PACKAGE_WOLFSSL)Hmm, I don't think it's intentional for swupdate to require a crypto backend, although there were some bugs that may have inadvertently made one effectively required, is a crypto backend actually required on swupdate master? This was one bug I fixed that might have been causing runtime issues with no crypto backend:
https://github.com/sbabic/swupdate/commit/1d886b41078448f3444a183269a49a5485744941
Quoted 2 lines
If there's still a bug still causing no-crypto builds to fail it probably should be fixed in upstream swupdate.
It is not a bug, it's simply wanted, now at least one crypto backend is required, check here [1]. So I'm going to modify the actual patch and fix to have at least one crypto backend.
[1]: https://groups.google.com/g/swupdate/c/bLY3DyLzII0
Best regards
Giulio
Quoted 160 lines
Quoted 28 lines
package/swupdate/Config.in +11
-2help swupdate provides a reliable way to update the software on an embedded system.@@ -25,8 +27,6 @@ config BR2_PACKAGE_SWUPDATE want to have Lua support. * Select BR2_PACKAGE_LIBCURL if you want to use the download feature. - * Select BR2_PACKAGE_OPENSSL or BR2_PACKAGE_MBEDTLS if you - want to add encryption support. * Select BR2_PACKAGE_MTD if you want to use swupdate with UBI partitions. * Select BR2_PACKAGE_ZLIB if you want to deal with gzip@@ -83,6 +83,27 @@ config BR2_PACKAGE_SWUPDATE_INSTALL_WEBSITE This is necessary if you want to run swupdate with the embedded webserver and do not provide an own website to be installed to /var/www/swupdate. + +choice + prompt "Crypto Backends" + help + Select crypto libraries to be used in swupdate. + +config BR2_PACKAGE_SWUPDATE_OPENSSL + bool "openssl" + default y + depends on BR2_PACKAGE_OPENSSL +package/swupdate/Config.in config BR2_PACKAGE_SWUPDATE_INSTALL_WEBSITE · line 106
Quoted 10 lines
package/swupdate/Config.in +10
-0+config BR2_PACKAGE_SWUPDATE_WOLFSSL + bool "wolfssl" + depends on BR2_PACKAGE_WOLFSSL + +config BR2_PACKAGE_SWUPDATE_MBEDTLS + bool "mbedtls" + depends on BR2_PACKAGE_MBEDTLS + +endchoice +This looks wrong, swupdate supports multiple providers at the same time with runtime backend selection, a choice menu implies they are mutually exclusive build time dependencies which is not the case:
https://github.com/sbabic/swupdate/blob/2025.12/doc/source/swupdate.rst#crypto-selection-parametersEnabling/disabling providers can be done here in swupdate's kconfig which indicates a crypto provider is only required for certain features like hash verification, encryption and signed images:
https://github.com/sbabic/swupdate/blob/2025.12/crypto/KconfigQuoted 111 lines
package/swupdate/Config.in +0
-0endif comment "swupdate needs a toolchain w/ dynamic library, threads"package/swupdate/swupdate.config +2
-4@@ -2,7 +2,6 @@ # Automatically generated file; DO NOT EDIT. # Swupdate Configuration # -CONFIG_HAVE_DOT_CONFIG=y # # Swupdate Settings@@ -24,7 +23,6 @@ CONFIG_SW_VERSIONS_FILE="/etc/sw-versions" # CONFIG_SOCKET_CTRL_PATH="/tmp/sockinstctrl" CONFIG_SOCKET_PROGRESS_PATH="/tmp/swupdateprog" -CONFIG_SOCKET_REMOTE_HANDLER_DIRECTORY="/tmp/" # # MTD support needs libmtd@@ -60,7 +58,7 @@ CONFIG_BOOTLOADER_NONE=y # # U-Boot support needs libubootenv, libz # -CONFIG_SSL_IMPL_NONE=y +CONFIG_SSL_IMPL_OPENSSL=y # # Image downloading support needs libcurl@@ -105,7 +103,7 @@ CONFIG_PARSERROOT="" # ubivol support needs libubi # # CONFIG_DISKPART is not set -CONFIG_RAW=y +# CONFIG_RAW is not set # CONFIG_RDIFFHANDLER is not set # CONFIG_SHELLSCRIPTHANDLER is not setpackage/swupdate/swupdate.hash +1
-1@@ -1,5 +1,5 @@ # Locally calculated -sha256 678b47fd2419727c4d0abf5c9f3bc0dc4b67e95951132bd1c8f5603e88947779 swupdate-2025.05.tar.gz +sha256 8517f3730eeb66e20e651b881dd4b9c10ca9ae05e3883db59b5df18ab1eaa533 swupdate-2025.12.tar.gz sha256 4cf04ed34ff0ebbf5c71345b56e6af5093fc17206364cca0ebbae92ef3940683 LICENSES/BSD-1-Clause.txt sha256 e27a3e87706b3aa5ff2e50eaafe2e6ed5397fbf2d7679eaf444a6d000518a3a6 LICENSES/BSD-3-Clause.txt sha256 0558101984550fa84d1d13c2af11d116c20079d2be58711e8d99cadce7009192 LICENSES/CC0-1.0.txtpackage/swupdate/swupdate.mk +4
-11@@ -4,7 +4,7 @@ # ################################################################################ -SWUPDATE_VERSION = 2025.05 +SWUPDATE_VERSION = 2025.12 SWUPDATE_SITE = $(call github,sbabic,swupdate,$(SWUPDATE_VERSION)) SWUPDATE_LICENSE = GPL-2.0, GPL-2.0+, LGPL-2.1+, MIT, ISC, BSD-1-Clause, BSD-3-Clause, CC0-1.0, CC-BY-SA-4.0, OFL-1.1 SWUPDATE_LICENSE_FILES = LICENSES/BSD-1-Clause.txt \@@ -18,7 +18,7 @@ SWUPDATE_LICENSE_FILES = LICENSES/BSD-1-Clause.txt \ LICENSES/MIT.txt \ LICENSES/OFL-1.1.txt SWUPDATE_INSTALL_STAGING = YES -SWUPDATE_DEPENDENCIES = json-c libubootenv +SWUPDATE_DEPENDENCIES = json-c libconfig libubootenv # swupdate uses $CROSS-cc instead of $CROSS-gcc, which is not # available in all external toolchains, and use CC for linking. Ensure@@ -51,13 +51,6 @@ else SWUPDATE_MAKE_ENV += HAVE_LIBBLKID=n endif -ifeq ($(BR2_PACKAGE_LIBCONFIG),y) -SWUPDATE_DEPENDENCIES += libconfig -SWUPDATE_MAKE_ENV += HAVE_LIBCONFIG=y -else -SWUPDATE_MAKE_ENV += HAVE_LIBCONFIG=n -endif - ifeq ($(BR2_PACKAGE_LIBCURL),y) SWUPDATE_DEPENDENCIES += libcurl SWUPDATE_MAKE_ENV += HAVE_LIBCURL=y@@ -107,7 +100,7 @@ else SWUPDATE_MAKE_ENV += HAVE_LUA=n endif -ifeq ($(BR2_PACKAGE_MBEDTLS),y) +ifeq ($(BR2_PACKAGE_SWUPDATE_MBEDTLS),y) SWUPDATE_DEPENDENCIES += mbedtls SWUPDATE_MAKE_ENV += HAVE_MBEDTLS=y else@@ -123,7 +116,7 @@ SWUPDATE_MAKE_ENV += HAVE_LIBMTD=n SWUPDATE_MAKE_ENV += HAVE_LIBUBI=n endif -ifeq ($(BR2_PACKAGE_OPENSSL),y) +ifeq ($(BR2_PACKAGE_SWUPDATE_OPENSSL),y) SWUPDATE_DEPENDENCIES += openssl SWUPDATE_MAKE_ENV += HAVE_LIBSSL=y SWUPDATE_MAKE_ENV += HAVE_LIBCRYPTO=y@@ -152,7 +145,7 @@ define SWUPDATE_SET_SYSTEMD endef endif
Quoted 8 lines
package/swupdate/swupdate.mk define SWUPDATE_SET_SYSTEMD · line 151
Quoted 5 lines
package/swupdate/swupdate.mk +1
-1-ifeq ($(BR2_PACKAGE_WOLFSSL),y) +ifeq ($(BR2_PACKAGE_SWUPDATE_WOLFSSL),y) SWUPDATE_DEPENDENCIES += wolfssl SWUPDATE_MAKE_ENV += HAVE_WOLFSSL=y elseWe should continue passing all available crypto providers to swupdate rather than only passing one.
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
Quoted 39 lines · Giulio Benetti
Hi James,
Quoted 35 lines · James Hilliard
Quoted 19 lines · Giulio Benetti
* libconfig is required by default so let's select it
* from this version crypto is required to let's add Backends:
Openssl(by default), WolfSSL, MbedTLS
* align swupdate.config to the most basic oneSigned-off-by Giulio Benetti <[email protected]>--- package/swupdate/Config.in | 25 +++++++++++++++++++++++-- package/swupdate/swupdate.config | 6 ++---- package/swupdate/swupdate.hash | 2 +- package/swupdate/swupdate.mk | 17 +++++------------ 4 files changed, 31 insertions(+), 19 deletions(-)package/swupdate/Config.in +0
-0package/swupdate/Config.in config BR2_PACKAGE_SWUPDATE · line 10
Quoted 6 lines
package/swupdate/Config.in +2
-0@@ -5,7 +5,9 @@ config BR2_PACKAGE_SWUPDATE depends on BR2_USE_MMU # fork() depends on BR2_TOOLCHAIN_HAS_SYNC_4 # json-c select BR2_PACKAGE_JSON_C + select BR2_PACKAGE_LIBCONFIG select BR2_PACKAGE_LIBUBOOTENV + select BR2_PACKAGE_OPENSSL if !(BR2_PACKAGE_MBEDTLS || BR2_PACKAGE_WOLFSSL)Hmm, I don't think it's intentional for swupdate to require a crypto backend, although there were some bugs that may have inadvertently made one effectively required, is a crypto backend actually required on swupdate master? This was one bug I fixed that might have been causing runtime issues with no crypto backend:
https://github.com/sbabic/swupdate/commit/1d886b41078448f3444a183269a49a5485744941
Quoted 6 lines
Quoted 2 lines
If there's still a bug still causing no-crypto builds to fail it probably should be fixed in upstream swupdate.
It is not a bug, it's simply wanted, now at least one crypto backend is required, check here [1]. So I'm going to modify the actual patch and fix to have at least one crypto backend.
I'm confused, it's stated there that it's "not wanted" to require a crypto backend and he confirms it was accidentally broken but wasn't caught due to being an uncommon use case.
I think easiest option is just make the crypto object depend on a crypto feature being enabled here or something like that:
https://github.com/sbabic/swupdate/blob/2025.12/Makefile#L372
Quoted 176 lines
[1]: https://groups.google.com/g/swupdate/c/bLY3DyLzII0
Best regards
GiulioQuoted 168 lines
Quoted 28 lines
package/swupdate/Config.in +11
-2help swupdate provides a reliable way to update the software on an embedded system.@@ -25,8 +27,6 @@ config BR2_PACKAGE_SWUPDATE want to have Lua support. * Select BR2_PACKAGE_LIBCURL if you want to use the download feature. - * Select BR2_PACKAGE_OPENSSL or BR2_PACKAGE_MBEDTLS if you - want to add encryption support. * Select BR2_PACKAGE_MTD if you want to use swupdate with UBI partitions. * Select BR2_PACKAGE_ZLIB if you want to deal with gzip@@ -83,6 +83,27 @@ config BR2_PACKAGE_SWUPDATE_INSTALL_WEBSITE This is necessary if you want to run swupdate with the embedded webserver and do not provide an own website to be installed to /var/www/swupdate. + +choice + prompt "Crypto Backends" + help + Select crypto libraries to be used in swupdate. + +config BR2_PACKAGE_SWUPDATE_OPENSSL + bool "openssl" + default y + depends on BR2_PACKAGE_OPENSSL +package/swupdate/Config.in config BR2_PACKAGE_SWUPDATE_INSTALL_WEBSITE · line 106
Quoted 10 lines
package/swupdate/Config.in +10
-0+config BR2_PACKAGE_SWUPDATE_WOLFSSL + bool "wolfssl" + depends on BR2_PACKAGE_WOLFSSL + +config BR2_PACKAGE_SWUPDATE_MBEDTLS + bool "mbedtls" + depends on BR2_PACKAGE_MBEDTLS + +endchoice +This looks wrong, swupdate supports multiple providers at the same time with runtime backend selection, a choice menu implies they are mutually exclusive build time dependencies which is not the case:
https://github.com/sbabic/swupdate/blob/2025.12/doc/source/swupdate.rst#crypto-selection-parametersEnabling/disabling providers can be done here in swupdate's kconfig which indicates a crypto provider is only required for certain features like hash verification, encryption and signed images:
https://github.com/sbabic/swupdate/blob/2025.12/crypto/KconfigQuoted 108 lines
package/swupdate/Config.in +0
-0endif comment "swupdate needs a toolchain w/ dynamic library, threads"package/swupdate/swupdate.config +2
-4@@ -2,7 +2,6 @@ # Automatically generated file; DO NOT EDIT. # Swupdate Configuration # -CONFIG_HAVE_DOT_CONFIG=y # # Swupdate Settings@@ -24,7 +23,6 @@ CONFIG_SW_VERSIONS_FILE="/etc/sw-versions" # CONFIG_SOCKET_CTRL_PATH="/tmp/sockinstctrl" CONFIG_SOCKET_PROGRESS_PATH="/tmp/swupdateprog" -CONFIG_SOCKET_REMOTE_HANDLER_DIRECTORY="/tmp/" # # MTD support needs libmtd@@ -60,7 +58,7 @@ CONFIG_BOOTLOADER_NONE=y # # U-Boot support needs libubootenv, libz # -CONFIG_SSL_IMPL_NONE=y +CONFIG_SSL_IMPL_OPENSSL=y # # Image downloading support needs libcurl@@ -105,7 +103,7 @@ CONFIG_PARSERROOT="" # ubivol support needs libubi # # CONFIG_DISKPART is not set -CONFIG_RAW=y +# CONFIG_RAW is not set # CONFIG_RDIFFHANDLER is not set # CONFIG_SHELLSCRIPTHANDLER is not setpackage/swupdate/swupdate.hash +1
-1@@ -1,5 +1,5 @@ # Locally calculated -sha256 678b47fd2419727c4d0abf5c9f3bc0dc4b67e95951132bd1c8f5603e88947779 swupdate-2025.05.tar.gz +sha256 8517f3730eeb66e20e651b881dd4b9c10ca9ae05e3883db59b5df18ab1eaa533 swupdate-2025.12.tar.gz sha256 4cf04ed34ff0ebbf5c71345b56e6af5093fc17206364cca0ebbae92ef3940683 LICENSES/BSD-1-Clause.txt sha256 e27a3e87706b3aa5ff2e50eaafe2e6ed5397fbf2d7679eaf444a6d000518a3a6 LICENSES/BSD-3-Clause.txt sha256 0558101984550fa84d1d13c2af11d116c20079d2be58711e8d99cadce7009192 LICENSES/CC0-1.0.txtpackage/swupdate/swupdate.mk +4
-11@@ -4,7 +4,7 @@ # ################################################################################ -SWUPDATE_VERSION = 2025.05 +SWUPDATE_VERSION = 2025.12 SWUPDATE_SITE = $(call github,sbabic,swupdate,$(SWUPDATE_VERSION)) SWUPDATE_LICENSE = GPL-2.0, GPL-2.0+, LGPL-2.1+, MIT, ISC, BSD-1-Clause, BSD-3-Clause, CC0-1.0, CC-BY-SA-4.0, OFL-1.1 SWUPDATE_LICENSE_FILES = LICENSES/BSD-1-Clause.txt \@@ -18,7 +18,7 @@ SWUPDATE_LICENSE_FILES = LICENSES/BSD-1-Clause.txt \ LICENSES/MIT.txt \ LICENSES/OFL-1.1.txt SWUPDATE_INSTALL_STAGING = YES -SWUPDATE_DEPENDENCIES = json-c libubootenv +SWUPDATE_DEPENDENCIES = json-c libconfig libubootenv # swupdate uses $CROSS-cc instead of $CROSS-gcc, which is not # available in all external toolchains, and use CC for linking. Ensure@@ -51,13 +51,6 @@ else SWUPDATE_MAKE_ENV += HAVE_LIBBLKID=n endif -ifeq ($(BR2_PACKAGE_LIBCONFIG),y) -SWUPDATE_DEPENDENCIES += libconfig -SWUPDATE_MAKE_ENV += HAVE_LIBCONFIG=y -else -SWUPDATE_MAKE_ENV += HAVE_LIBCONFIG=n -endif - ifeq ($(BR2_PACKAGE_LIBCURL),y) SWUPDATE_DEPENDENCIES += libcurl SWUPDATE_MAKE_ENV += HAVE_LIBCURL=y@@ -107,7 +100,7 @@ else SWUPDATE_MAKE_ENV += HAVE_LUA=n endif -ifeq ($(BR2_PACKAGE_MBEDTLS),y) +ifeq ($(BR2_PACKAGE_SWUPDATE_MBEDTLS),y) SWUPDATE_DEPENDENCIES += mbedtls SWUPDATE_MAKE_ENV += HAVE_MBEDTLS=y else@@ -123,7 +116,7 @@ SWUPDATE_MAKE_ENV += HAVE_LIBMTD=n SWUPDATE_MAKE_ENV += HAVE_LIBUBI=n endif -ifeq ($(BR2_PACKAGE_OPENSSL),y) +ifeq ($(BR2_PACKAGE_SWUPDATE_OPENSSL),y) SWUPDATE_DEPENDENCIES += openssl SWUPDATE_MAKE_ENV += HAVE_LIBSSL=y SWUPDATE_MAKE_ENV += HAVE_LIBCRYPTO=ypackage/swupdate/swupdate.mk define SWUPDATE_SET_SYSTEMD · line 151
Quoted 8 lines
package/swupdate/swupdate.mk +1
-1@@ -152,7 +145,7 @@ define SWUPDATE_SET_SYSTEMD endef endif -ifeq ($(BR2_PACKAGE_WOLFSSL),y) +ifeq ($(BR2_PACKAGE_SWUPDATE_WOLFSSL),y) SWUPDATE_DEPENDENCIES += wolfssl SWUPDATE_MAKE_ENV += HAVE_WOLFSSL=y elseWe should continue passing all available crypto providers to swupdate rather than only passing one.
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot