Skip to contentSkip to conversation

package/swupdate: bump to version 2019.04

PATCH New Pierre-Jean Texier 2 participants 2 messages Jun 10, 2019

lore
Share & tools
lore
#0 lore raw

PATCH v3 1/1 package/swupdate: bump to version 2019.04

New features in this release:
- Improved documentation
- delta updates based on rdiff library
- support for libubootenv
- dry-run option
- CA certificates for signed images
- Fix security leak in parser

This commit also:
- introduce BR2_PACKAGE_LIBRSYNC for 'rdiff' Handler
- introduce BR2_PACKAGE_LIBUBOOTENV
- drop upstreamed patch
- backport upstream patches (important fix)
- regenerate the default swupdate.config. Now CONFIG_GUNZIP is always enabled because gunzip is provided by the default busybox config.

---
Changes v2 -> v3
- add missing 'Signed-off-by' in patches (after review of Arnout Vandecappelle)
- rework commit log (after review of Arnout Vandecappelle)

Changes v1 -> v2
- add librsync dependency (suggested by Peter Korsgaard)
- add libubootenv dependency (suggested by Peter Korsgaard)
- backport fixes (suggested by James Hilliard)
- Update the default config file (make swupdate-menuconfig / make swupdate-update-config)

 .../swupdate/0001-Makefile-fix-static-build.patch  | 62 ---------------------
 ...archive-handler-set-locale-for-libarchive.patch | 65 ++++++++++++++++++++++
 ...a-fix-segfault-in-image-property-handling.patch | 42 ++++++++++++++
 ...ix-script-format-when-CONFIG_UBOOT_NEWAPI.patch | 44 +++++++++++++++
 package/swupdate/Config.in                         |  4 ++
 package/swupdate/swupdate.config                   | 12 ++--
 package/swupdate/swupdate.hash                     |  2 +-
 package/swupdate/swupdate.mk                       |  9 ++-
 8 files changed, 170 insertions(+), 70 deletions(-)
 delete mode 100644 package/swupdate/0001-Makefile-fix-static-build.patch
 create mode 100644 package/swupdate/0001-archive-handler-set-locale-for-libarchive.patch
 create mode 100644 package/swupdate/0002-Lua-fix-segfault-in-image-property-handling.patch
 create mode 100644 package/swupdate/0003-u-boot-fix-script-format-when-CONFIG_UBOOT_NEWAPI.patch
package/swupdate/0001-Makefile-fix-static-build.patch deleted +0 -62
deleted file mode 100644
index 56901f9..0000000
@@ -1,62 +0,0 @@
-From 15a324f8c67548f219256a5a75ba8123cc5bdac6 Mon Sep 17 00:00:00 2001
-From: Fabrice Fontaine <[email protected]>
-Date: Mon, 4 Mar 2019 21:51:36 +0100
-Subject: [PATCH] Makefile: fix static build
-
-Don't build and install lua_swupdate.so if HAVE_LUA isn't set to y
-otherwise build will fail if the toolchain only suports building static
-libraries
-
-Fixes:
- - http://autobuild.buildroot.org/results/c11c4d26983e0347d96f3dda62e6d72b031967bb
-
-Signed-off-by: Fabrice Fontaine <[email protected]>
-[Upstream status: https://github.com/sbabic/swupdate/pull/49]
----
- Makefile | 12 +++++++++---
- 1 file changed, 9 insertions(+), 3 deletions(-)
-
-diff --git a/Makefile b/Makefile
-index cfeb9a6..cac99b5 100644
---- a/Makefile
-+++ b/Makefile
-@@ -369,11 +369,15 @@ tools-bins	:= $(patsubst $(tools-y)/%.c,$(tools-y)/%,$(wildcard $(tools-y)/*.c))
- tools-bins-unstr:= $(patsubst %,%_unstripped,$(tools-bins))
- tools-all	:= $(tools-objs)
- 
-+ifeq ($(HAVE_LUA),y)
-+lua_swupdate	:= lua_swupdate.so
-+endif
-+
- shared-dirs	:= $(shareds-y)
- shared-libs	:= $(patsubst %,%/built-in.o, $(shareds-y))
- shared-all	:= $(shared-libs)
- 
--all: swupdate ${tools-bins} lua_swupdate.so
-+all: swupdate ${tools-bins} ${lua_swupdate}
- 
- # Do modpost on a prelinked vmlinux. The finally linked vmlinux has
- # relevant sections renamed as per the linker script.
-@@ -434,7 +438,6 @@ install: all
- 	install -d ${DESTDIR}/usr/bin
- 	install -d ${DESTDIR}/usr/include
- 	install -d ${DESTDIR}/usr/lib
--	install -d ${DESTDIR}/usr/lib/lua/$(LUAVER)
- 	install -m 755 swupdate ${DESTDIR}/usr/bin
- 	for i in ${tools-bins};do \
- 		install -m 755 $$i ${DESTDIR}/usr/bin; \
-@@ -443,7 +446,10 @@ install: all
- 	install -m 0644 include/swupdate_status.h ${DESTDIR}/usr/include
- 	install -m 0644 include/progress_ipc.h ${DESTDIR}/usr/include
- 	install -m 0755 ipc/lib.a ${DESTDIR}/usr/lib/libswupdate.a
--	install -m 0755 lua_swupdate.so $(DESTDIR)/usr/lib/lua/$(LUAVER)
-+	if [ $(HAVE_LUA) = y ]; then \
-+		install -d ${DESTDIR}/usr/lib/lua/$(LUAVER); \
-+		install -m 0755 ${lua_swupdate} $(DESTDIR)/usr/lib/lua/$(LUAVER); \
-+	fi
- 
- PHONY += run-tests
- tests: \
--- 
-2.14.1
-
package/swupdate/0001-archive-handler-set-locale-for-libarchive.patch new file +65 -0

65 lines not on this page · raw message

package/swupdate/0002-Lua-fix-segfault-in-image-property-handling.patch new file +42 -0

42 lines not on this page · raw message

package/swupdate/0003-u-boot-fix-script-format-when-CONFIG_UBOOT_NEWAPI.patch new file +44 -0

44 lines not on this page · raw message

package/swupdate/Config.in +4 -0
index ca2eaf2..53f8b09 100644
@@ -34,6 +34,10 @@ config BR2_PACKAGE_SWUPDATE
 	    support for setting the U-Boot environment.
 	  * Select BR2_PACKAGE_ZEROMQ to add support for using a
 	    remote handler.
+	  * Select BR2_PACKAGE_LIBRSYNC to add support for using
+	    rdiff handler.
+	  * Select BR2_PACKAGE_LIBUBOOTENV and BR2_PACKAGE_ZLIB to add
+	    support for setting the U-Boot environment with the new API.
 
 	  https://sbabic.github.io/swupdate
 
package/swupdate/swupdate.config +6 -6
index 730ebe5..3cb39d8 100644
@@ -49,16 +49,13 @@ CONFIG_EXTRA_LDLIBS=""
 # CONFIG_DEBUG is not set
 # CONFIG_WERROR is not set
 # CONFIG_NOCLEANUP is not set
-
-#
-# EFI Boot Guard needs libebgenv and libz
-#
+# CONFIG_BOOTLOADER_EBG is not set
+CONFIG_BOOTLOADER_NONE=y
+# CONFIG_BOOTLOADER_GRUB is not set
 
 #
 # U-Boot support needs libubootenv, libz
 #
-CONFIG_BOOTLOADER_NONE=y
-# CONFIG_BOOTLOADER_GRUB is not set
 
 #
 # Image downloading support needs libcurl
@@ -83,6 +80,7 @@ CONFIG_MONGOOSEIPV6=y
 #
 # SSL support needs libcrypto, libssl
 #
+CONFIG_GUNZIP=y
 
 #
 # Parser Features
@@ -103,6 +101,7 @@ CONFIG_PARSERROOT=""
 # ubivol support needs libubi
 #
 CONFIG_RAW=y
+# CONFIG_RDIFFHANDLER is not set
 # CONFIG_SHELLSCRIPTHANDLER is not set
 
 #
@@ -121,3 +120,4 @@ CONFIG_RAW=y
 # SWU forwarder requires libcurl
 #
 # CONFIG_BOOTLOADERHANDLER is not set
+# CONFIG_UCFWHANDLER is not set
package/swupdate/swupdate.hash +1 -1
index 138bd6d..8194de6 100644
@@ -1,5 +1,5 @@
 # Locally calculated
-sha256  a65884ca18523cde1b0744d952d6f91462dbd4ad07941305f5684c6d4ec833dc  swupdate-2018.11.tar.gz
+sha256  96b2c59558e847ddb7c23b666c1bbe61e03ab90a64c30d233bd5e9029df8519b  swupdate-2019.04.tar.gz
 sha256  43492b377cf2fb67942d1dd231146bd4e6578646ad13ef289297c9dd75cbc478  Licenses/Exceptions
 sha256  8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643  Licenses/gpl-2.0.txt
 sha256  dc626520dcd53a22f727af3ee42c770e56c97a64fe3adb063799d8ab032fe551  Licenses/lgpl-2.1.txt
package/swupdate/swupdate.mk +8 -1
index 78f23ec..39d7d38 100644
@@ -4,7 +4,7 @@
 #
 ################################################################################
 
-SWUPDATE_VERSION = 2018.11
+SWUPDATE_VERSION = 2019.04
 SWUPDATE_SITE = $(call github,sbabic,swupdate,$(SWUPDATE_VERSION))
 SWUPDATE_LICENSE = GPL-2.0+ with OpenSSL exception, LGPL-2.1+, MIT
 SWUPDATE_LICENSE_FILES = Licenses/Exceptions Licenses/gpl-2.0.txt \
@@ -77,6 +77,9 @@ endif
 ifeq ($(BR2_PACKAGE_UBOOT_TOOLS),y)
 SWUPDATE_DEPENDENCIES += uboot-tools
 SWUPDATE_MAKE_ENV += HAVE_LIBUBOOTENV=y
+else ifeq ($(BR2_PACKAGE_LIBUBOOTENV),y)
+SWUPDATE_DEPENDENCIES += libubootenv
+SWUPDATE_MAKE_ENV += HAVE_LIBUBOOTENV=y
 else
 SWUPDATE_MAKE_ENV += HAVE_LIBUBOOTENV=n
 endif
@@ -95,6 +98,10 @@ else
 SWUPDATE_MAKE_ENV += HAVE_ZLIB=n
 endif
 
+ifeq ($(BR2_PACKAGE_LIBRSYNC),y)
+SWUPDATE_DEPENDENCIES += librsync
+endif
+
 SWUPDATE_BUILD_CONFIG = $(@D)/.config
 
 SWUPDATE_KCONFIG_FILE = $(call qstrip,$(BR2_PACKAGE_SWUPDATE_CONFIG))
Signature · 1 line
2.7.4
#1 lore raw

PATCH v3 1/1 package/swupdate: bump to version 2019.04

Quoted 17 lines · Pierre-Jean Texier

New features in this release:
- Improved documentation
- delta updates based on rdiff library
- support for libubootenv
- dry-run option
- CA certificates for signed images
- Fix security leak in parser

This commit also:
- introduce BR2_PACKAGE_LIBRSYNC for 'rdiff' Handler
- introduce BR2_PACKAGE_LIBUBOOTENV
- drop upstreamed patch
- backport upstream patches (important fix)
- regenerate the default swupdate.config. Now CONFIG_GUNZIP is always enabled because gunzip is provided by the default busybox config.

Quoted 1 line

Applied to master with the change mentioned below, thanks.

[snip]

package/swupdate/Config.in config BR2_PACKAGE_SWUPDATE · line 39

Quoted 11 lines
package/swupdate/Config.in +3 -0
index ca2eaf2..53f8b09 100644
@@ -34,6 +34,10 @@ config BR2_PACKAGE_SWUPDATE
 	    support for setting the U-Boot environment.
 	  * Select BR2_PACKAGE_ZEROMQ to add support for using a
 	    remote handler.
+	  * Select BR2_PACKAGE_LIBRSYNC to add support for using
+	    rdiff handler.
+	  * Select BR2_PACKAGE_LIBUBOOTENV and BR2_PACKAGE_ZLIB to add

ZLIB is seleced by libubootenv, so there's no need to mention it here.

Regards,
Arnout

Quoted 3 lines
package/swupdate/Config.in +1 -0
+	    support for setting the U-Boot environment with the new API.
 
 	  https://sbabic.github.io/swupdate

[snip]