All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH v2 1/8] package/swupdate: let buildroot handle stripping
@ 2021-08-29  2:46 James Hilliard
  2021-08-29  2:46 ` [Buildroot] [PATCH v2 2/8] package/swupdate: don't require website for services James Hilliard
                   ` (8 more replies)
  0 siblings, 9 replies; 16+ messages in thread
From: James Hilliard @ 2021-08-29  2:46 UTC (permalink / raw)
  To: buildroot; +Cc: James Hilliard

In buildroot, stripping for the target is configured and implemented
with the global `BR2_STRIP_strip` option that drive the stripping in
the target-finalize step.

So, we explicitly disable stripping at build time for swupdate.

Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
---
 package/swupdate/swupdate.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/package/swupdate/swupdate.mk b/package/swupdate/swupdate.mk
index 402aa0a91f..42008cddd7 100644
--- a/package/swupdate/swupdate.mk
+++ b/package/swupdate/swupdate.mk
@@ -22,7 +22,7 @@ SWUPDATE_LICENSE_FILES = LICENSES/BSD-1-Clause.txt \
 # swupdate uses $CROSS-cc instead of $CROSS-gcc, which is not
 # available in all external toolchains, and use CC for linking. Ensure
 # TARGET_CC is used for both.
-SWUPDATE_MAKE_ENV = CC="$(TARGET_CC)" LD="$(TARGET_CC)"
+SWUPDATE_MAKE_ENV = CC="$(TARGET_CC)" LD="$(TARGET_CC)" SKIP_STRIP=y
 
 # swupdate bundles its own version of mongoose (version 6.16)
 
-- 
2.25.1

_______________________________________________
buildroot mailing list
buildroot@busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [Buildroot] [PATCH v2 2/8] package/swupdate: don't require website for services
  2021-08-29  2:46 [Buildroot] [PATCH v2 1/8] package/swupdate: let buildroot handle stripping James Hilliard
@ 2021-08-29  2:46 ` James Hilliard
  2021-09-12 20:17   ` Peter Korsgaard
  2021-08-29  2:46 ` [Buildroot] [PATCH v2 3/8] package/swupdate: use package make install for target install James Hilliard
                   ` (7 subsequent siblings)
  8 siblings, 1 reply; 16+ messages in thread
From: James Hilliard @ 2021-08-29  2:46 UTC (permalink / raw)
  To: buildroot; +Cc: James Hilliard

The swupdate services do not depend on
BR2_PACKAGE_SWUPDATE_INSTALL_WEBSITE, so install them unconditionally.

Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
---
 package/swupdate/swupdate.mk | 2 --
 1 file changed, 2 deletions(-)

diff --git a/package/swupdate/swupdate.mk b/package/swupdate/swupdate.mk
index 42008cddd7..f4a398ac8e 100644
--- a/package/swupdate/swupdate.mk
+++ b/package/swupdate/swupdate.mk
@@ -213,7 +213,6 @@ $(error No Swupdate configuration file specified, check your BR2_PACKAGE_SWUPDAT
 endif
 endif
 
-ifeq ($(BR2_PACKAGE_SWUPDATE_INSTALL_WEBSITE),y)
 define SWUPDATE_INSTALL_COMMON
 	mkdir -p $(TARGET_DIR)/etc/swupdate/conf.d \
 		$(TARGET_DIR)/usr/lib/swupdate/conf.d
@@ -230,6 +229,5 @@ define SWUPDATE_INSTALL_INIT_SYSV
 	$(INSTALL) -D -m 755 package/swupdate/S80swupdate \
 		$(TARGET_DIR)/etc/init.d/S80swupdate
 endef
-endif
 
 $(eval $(kconfig-package))
-- 
2.25.1

_______________________________________________
buildroot mailing list
buildroot@busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [Buildroot] [PATCH v2 3/8] package/swupdate: use package make install for target install
  2021-08-29  2:46 [Buildroot] [PATCH v2 1/8] package/swupdate: let buildroot handle stripping James Hilliard
  2021-08-29  2:46 ` [Buildroot] [PATCH v2 2/8] package/swupdate: don't require website for services James Hilliard
@ 2021-08-29  2:46 ` James Hilliard
  2021-09-13  9:37   ` Peter Korsgaard
  2021-08-29  2:46 ` [Buildroot] [PATCH v2 4/8] package/swupdate: enable/disable systemd support automatically James Hilliard
                   ` (6 subsequent siblings)
  8 siblings, 1 reply; 16+ messages in thread
From: James Hilliard @ 2021-08-29  2:46 UTC (permalink / raw)
  To: buildroot; +Cc: James Hilliard

This ensures all tools/libraries will be properly installed.

Update SWUPDATE_BUILD_CMDS param ordering for consistency.

Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
---
 package/swupdate/swupdate.mk | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/package/swupdate/swupdate.mk b/package/swupdate/swupdate.mk
index f4a398ac8e..fd0fb763c9 100644
--- a/package/swupdate/swupdate.mk
+++ b/package/swupdate/swupdate.mk
@@ -195,11 +195,12 @@ define SWUPDATE_KCONFIG_FIXUP_CMDS
 endef
 
 define SWUPDATE_BUILD_CMDS
-	$(TARGET_MAKE_ENV) $(SWUPDATE_MAKE_ENV) $(MAKE) $(SWUPDATE_MAKE_OPTS) -C $(@D)
+	$(TARGET_MAKE_ENV) $(SWUPDATE_MAKE_ENV) $(MAKE) -C $(@D) $(SWUPDATE_MAKE_OPTS)
 endef
 
 define SWUPDATE_INSTALL_TARGET_CMDS
-	$(INSTALL) -D -m 0755 $(@D)/swupdate $(TARGET_DIR)/usr/bin/swupdate
+	$(TARGET_MAKE_ENV) $(SWUPDATE_MAKE_ENV) $(MAKE) -C $(@D) \
+		$(SWUPDATE_MAKE_OPTS) DESTDIR=$(TARGET_DIR) install
 	$(if $(BR2_PACKAGE_SWUPDATE_INSTALL_WEBSITE), \
 		mkdir -p $(TARGET_DIR)/var/www/swupdate; \
 		cp -dpfr $(@D)/examples/www/v2/* $(TARGET_DIR)/var/www/swupdate)
-- 
2.25.1

_______________________________________________
buildroot mailing list
buildroot@busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [Buildroot] [PATCH v2 4/8] package/swupdate: enable/disable systemd support automatically
  2021-08-29  2:46 [Buildroot] [PATCH v2 1/8] package/swupdate: let buildroot handle stripping James Hilliard
  2021-08-29  2:46 ` [Buildroot] [PATCH v2 2/8] package/swupdate: don't require website for services James Hilliard
  2021-08-29  2:46 ` [Buildroot] [PATCH v2 3/8] package/swupdate: use package make install for target install James Hilliard
@ 2021-08-29  2:46 ` James Hilliard
  2021-09-13  9:46   ` Peter Korsgaard
  2021-08-29  2:46 ` [Buildroot] [PATCH v2 5/8] package/swupdate: add comment on origin of services/configs James Hilliard
                   ` (5 subsequent siblings)
  8 siblings, 1 reply; 16+ messages in thread
From: James Hilliard @ 2021-08-29  2:46 UTC (permalink / raw)
  To: buildroot; +Cc: James Hilliard

This needs to be set properly so that services work correctly.

Enable disable automatically based on BR2_PACKAGE_SYSTEMD state.

Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
---
 package/swupdate/swupdate.mk | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/package/swupdate/swupdate.mk b/package/swupdate/swupdate.mk
index fd0fb763c9..c9bd486127 100644
--- a/package/swupdate/swupdate.mk
+++ b/package/swupdate/swupdate.mk
@@ -139,6 +139,13 @@ endif
 
 ifeq ($(BR2_PACKAGE_SYSTEMD),y)
 SWUPDATE_DEPENDENCIES += systemd
+define SWUPDATE_SET_SYSTEMD
+	$(call KCONFIG_ENABLE_OPT,CONFIG_SYSTEMD)
+endef
+else
+define SWUPDATE_SET_SYSTEMD
+	$(call KCONFIG_DISABLE_OPT,CONFIG_SYSTEMD)
+endef
 endif
 
 ifeq ($(BR2_PACKAGE_LIBUBOOTENV),y)
@@ -192,6 +199,7 @@ SWUPDATE_MAKE_OPTS = \
 
 define SWUPDATE_KCONFIG_FIXUP_CMDS
 	$(SWUPDATE_SET_LUA_VERSION)
+	$(SWUPDATE_SET_SYSTEMD)
 endef
 
 define SWUPDATE_BUILD_CMDS
-- 
2.25.1

_______________________________________________
buildroot mailing list
buildroot@busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [Buildroot] [PATCH v2 5/8] package/swupdate: add comment on origin of services/configs
  2021-08-29  2:46 [Buildroot] [PATCH v2 1/8] package/swupdate: let buildroot handle stripping James Hilliard
                   ` (2 preceding siblings ...)
  2021-08-29  2:46 ` [Buildroot] [PATCH v2 4/8] package/swupdate: enable/disable systemd support automatically James Hilliard
@ 2021-08-29  2:46 ` James Hilliard
  2021-09-13  9:48   ` Peter Korsgaard
  2021-08-29  2:46 ` [Buildroot] [PATCH v2 6/8] package/swupdate: add webserver config option James Hilliard
                   ` (4 subsequent siblings)
  8 siblings, 1 reply; 16+ messages in thread
From: James Hilliard @ 2021-08-29  2:46 UTC (permalink / raw)
  To: buildroot; +Cc: James Hilliard

Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
---
 package/swupdate/swupdate.mk | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/package/swupdate/swupdate.mk b/package/swupdate/swupdate.mk
index c9bd486127..256f0930ce 100644
--- a/package/swupdate/swupdate.mk
+++ b/package/swupdate/swupdate.mk
@@ -222,6 +222,8 @@ $(error No Swupdate configuration file specified, check your BR2_PACKAGE_SWUPDAT
 endif
 endif
 
+# Services and configs derived from meta-swupdate(MIT license)
+# https://github.com/sbabic/meta-swupdate/tree/master/recipes-support/swupdate/swupdate
 define SWUPDATE_INSTALL_COMMON
 	mkdir -p $(TARGET_DIR)/etc/swupdate/conf.d \
 		$(TARGET_DIR)/usr/lib/swupdate/conf.d
-- 
2.25.1

_______________________________________________
buildroot mailing list
buildroot@busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [Buildroot] [PATCH v2 6/8] package/swupdate: add webserver config option
  2021-08-29  2:46 [Buildroot] [PATCH v2 1/8] package/swupdate: let buildroot handle stripping James Hilliard
                   ` (3 preceding siblings ...)
  2021-08-29  2:46 ` [Buildroot] [PATCH v2 5/8] package/swupdate: add comment on origin of services/configs James Hilliard
@ 2021-08-29  2:46 ` James Hilliard
  2021-09-13 13:26   ` Peter Korsgaard
  2021-08-29  2:46 ` [Buildroot] [PATCH v2 7/8] package/swupdate: prevent systemd from removing swupdate tmp folders James Hilliard
                   ` (3 subsequent siblings)
  8 siblings, 1 reply; 16+ messages in thread
From: James Hilliard @ 2021-08-29  2:46 UTC (permalink / raw)
  To: buildroot; +Cc: James Hilliard

Since the website depends on the webserver being enabled we should
add a config option for it and make the website depend on that.

We should also ensure that the mongoose(webserver) config is present.

Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
---
 package/swupdate/10-mongoose-args |  1 +
 package/swupdate/Config.in        |  7 +++++++
 package/swupdate/swupdate.mk      | 14 ++++++++++++++
 3 files changed, 22 insertions(+)
 create mode 100644 package/swupdate/10-mongoose-args

diff --git a/package/swupdate/10-mongoose-args b/package/swupdate/10-mongoose-args
new file mode 100644
index 0000000000..d0b0f8be94
--- /dev/null
+++ b/package/swupdate/10-mongoose-args
@@ -0,0 +1 @@
+SWUPDATE_WEBSERVER_ARGS="-r /var/www/swupdate ${SWUPDATE_MONGOOSE_EXTRA_ARGS:--p 8080}"
diff --git a/package/swupdate/Config.in b/package/swupdate/Config.in
index f601e45fcd..6b832cfcbf 100644
--- a/package/swupdate/Config.in
+++ b/package/swupdate/Config.in
@@ -60,9 +60,16 @@ config BR2_PACKAGE_SWUPDATE_CONFIG
 	  I you wish to use your own modified swupdate configuration
 	  file specify the config file location with this option.
 
+config BR2_PACKAGE_SWUPDATE_WEBSERVER
+	bool "swupdate webserver"
+	default y
+	help
+	  Enable update from remote using a web server on the target.
+
 config BR2_PACKAGE_SWUPDATE_INSTALL_WEBSITE
 	bool "install default website"
 	default y
+	depends on BR2_PACKAGE_SWUPDATE_WEBSERVER
 	help
 	  Install the provided website to /var/www/swupdate.
 
diff --git a/package/swupdate/swupdate.mk b/package/swupdate/swupdate.mk
index 256f0930ce..cf3607a661 100644
--- a/package/swupdate/swupdate.mk
+++ b/package/swupdate/swupdate.mk
@@ -187,6 +187,16 @@ ifeq ($(BR2_PACKAGE_LIBRSYNC),y)
 SWUPDATE_DEPENDENCIES += librsync
 endif
 
+ifeq ($(BR2_PACKAGE_SWUPDATE_WEBSERVER),y)
+define SWUPDATE_SET_WEBSERVER
+	$(call KCONFIG_ENABLE_OPT,CONFIG_WEBSERVER)
+endef
+else
+define SWUPDATE_SET_WEBSERVER
+	$(call KCONFIG_DISABLE_OPT,CONFIG_WEBSERVER)
+endef
+endif
+
 SWUPDATE_BUILD_CONFIG = $(@D)/.config
 
 SWUPDATE_KCONFIG_FILE = $(call qstrip,$(BR2_PACKAGE_SWUPDATE_CONFIG))
@@ -200,6 +210,7 @@ SWUPDATE_MAKE_OPTS = \
 define SWUPDATE_KCONFIG_FIXUP_CMDS
 	$(SWUPDATE_SET_LUA_VERSION)
 	$(SWUPDATE_SET_SYSTEMD)
+	$(SWUPDATE_SET_WEBSERVER)
 endef
 
 define SWUPDATE_BUILD_CMDS
@@ -229,6 +240,9 @@ define SWUPDATE_INSTALL_COMMON
 		$(TARGET_DIR)/usr/lib/swupdate/conf.d
 	$(INSTALL) -D -m 755 package/swupdate/swupdate.sh \
 		$(TARGET_DIR)/usr/lib/swupdate/swupdate.sh
+	$(if $(BR2_PACKAGE_SWUPDATE_WEBSERVER), \
+		$(INSTALL) -D -m 644 package/swupdate/10-mongoose-args \
+			$(TARGET_DIR)/usr/lib/swupdate/conf.d/10-mongoose-args)
 endef
 define SWUPDATE_INSTALL_INIT_SYSTEMD
 	$(SWUPDATE_INSTALL_COMMON)
-- 
2.25.1

_______________________________________________
buildroot mailing list
buildroot@busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [Buildroot] [PATCH v2 7/8] package/swupdate: prevent systemd from removing swupdate tmp folders
  2021-08-29  2:46 [Buildroot] [PATCH v2 1/8] package/swupdate: let buildroot handle stripping James Hilliard
                   ` (4 preceding siblings ...)
  2021-08-29  2:46 ` [Buildroot] [PATCH v2 6/8] package/swupdate: add webserver config option James Hilliard
@ 2021-08-29  2:46 ` James Hilliard
  2021-09-13 13:26   ` Peter Korsgaard
  2021-08-29  2:46 ` [Buildroot] [PATCH v2 8/8] package/swupdate: add progress/usb services James Hilliard
                   ` (2 subsequent siblings)
  8 siblings, 1 reply; 16+ messages in thread
From: James Hilliard @ 2021-08-29  2:46 UTC (permalink / raw)
  To: buildroot; +Cc: James Hilliard

Ensure these folders are excluded from being cleaned up by systemd.

Fixes:
[ERROR] : SWUPDATE failed [0] ERROR : I cannot open /tmp/scripts/format.lua 2
[ERROR] : SWUPDATE failed [0] ERROR : extracting script to /tmp/scripts/ failed
[ERROR] : SWUPDATE failed [1] Installation failed !

Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
---
 package/swupdate/swupdate.mk            | 2 ++
 package/swupdate/tmpfiles-swupdate.conf | 2 ++
 2 files changed, 4 insertions(+)
 create mode 100644 package/swupdate/tmpfiles-swupdate.conf

diff --git a/package/swupdate/swupdate.mk b/package/swupdate/swupdate.mk
index cf3607a661..4bcdb96602 100644
--- a/package/swupdate/swupdate.mk
+++ b/package/swupdate/swupdate.mk
@@ -248,6 +248,8 @@ define SWUPDATE_INSTALL_INIT_SYSTEMD
 	$(SWUPDATE_INSTALL_COMMON)
 	$(INSTALL) -D -m 644 package/swupdate/swupdate.service \
 		$(TARGET_DIR)/usr/lib/systemd/system/swupdate.service
+	$(INSTALL) -D -m 644 package/swupdate/tmpfiles-swupdate.conf \
+		$(TARGET_DIR)/usr/lib/tmpfiles.d/tmpfiles-swupdate.conf
 endef
 define SWUPDATE_INSTALL_INIT_SYSV
 	$(SWUPDATE_INSTALL_COMMON)
diff --git a/package/swupdate/tmpfiles-swupdate.conf b/package/swupdate/tmpfiles-swupdate.conf
new file mode 100644
index 0000000000..4743672fcc
--- /dev/null
+++ b/package/swupdate/tmpfiles-swupdate.conf
@@ -0,0 +1,2 @@
+X /tmp/datadst
+X /tmp/scripts
-- 
2.25.1

_______________________________________________
buildroot mailing list
buildroot@busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [Buildroot] [PATCH v2 8/8] package/swupdate: add progress/usb services
  2021-08-29  2:46 [Buildroot] [PATCH v2 1/8] package/swupdate: let buildroot handle stripping James Hilliard
                   ` (5 preceding siblings ...)
  2021-08-29  2:46 ` [Buildroot] [PATCH v2 7/8] package/swupdate: prevent systemd from removing swupdate tmp folders James Hilliard
@ 2021-08-29  2:46 ` James Hilliard
  2021-09-11 14:11 ` [Buildroot] [PATCH v2 1/8] package/swupdate: let buildroot handle stripping Arnout Vandecappelle
  2021-09-12 19:57 ` Peter Korsgaard
  8 siblings, 0 replies; 16+ messages in thread
From: James Hilliard @ 2021-08-29  2:46 UTC (permalink / raw)
  To: buildroot; +Cc: James Hilliard

Install progress/usb services for swupdate based on meta-swupdate
configs.

Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
---
 package/swupdate/90-start-progress         |  1 +
 package/swupdate/swupdate-progress.service |  9 +++++++++
 package/swupdate/swupdate-usb@.service     |  8 ++++++++
 package/swupdate/swupdate.mk               |  8 ++++++++
 package/swupdate/swupdate.socket           | 11 +++++++++++
 5 files changed, 37 insertions(+)
 create mode 100644 package/swupdate/90-start-progress
 create mode 100644 package/swupdate/swupdate-progress.service
 create mode 100644 package/swupdate/swupdate-usb@.service
 create mode 100644 package/swupdate/swupdate.socket

diff --git a/package/swupdate/90-start-progress b/package/swupdate/90-start-progress
new file mode 100644
index 0000000000..3b0eb5e7d7
--- /dev/null
+++ b/package/swupdate/90-start-progress
@@ -0,0 +1 @@
+exec /usr/bin/swupdate-progress -w -r &
diff --git a/package/swupdate/swupdate-progress.service b/package/swupdate/swupdate-progress.service
new file mode 100644
index 0000000000..0d464bb420
--- /dev/null
+++ b/package/swupdate/swupdate-progress.service
@@ -0,0 +1,9 @@
+[Unit]
+Description=swupdate progress service
+After=swupdate.service
+
+[Service]
+ExecStart=/usr/bin/swupdate-progress -r -w
+
+[Install]
+WantedBy=swupdate.service
diff --git a/package/swupdate/swupdate-usb@.service b/package/swupdate/swupdate-usb@.service
new file mode 100644
index 0000000000..eda9d1539c
--- /dev/null
+++ b/package/swupdate/swupdate-usb@.service
@@ -0,0 +1,8 @@
+[Unit]
+Description=usb media swupdate service
+Requires=swupdate-progress.service
+
+[Service]
+ExecStartPre=/bin/mount /dev/%I /mnt
+ExecStart=/bin/sh -c "swupdate-client -v /mnt/*.swu"
+ExecStopPost=/bin/umount /mnt
diff --git a/package/swupdate/swupdate.mk b/package/swupdate/swupdate.mk
index 4bcdb96602..c49af7ebf7 100644
--- a/package/swupdate/swupdate.mk
+++ b/package/swupdate/swupdate.mk
@@ -248,6 +248,12 @@ define SWUPDATE_INSTALL_INIT_SYSTEMD
 	$(SWUPDATE_INSTALL_COMMON)
 	$(INSTALL) -D -m 644 package/swupdate/swupdate.service \
 		$(TARGET_DIR)/usr/lib/systemd/system/swupdate.service
+	$(INSTALL) -D -m 644 package/swupdate/swupdate.socket \
+		$(TARGET_DIR)/usr/lib/systemd/system/swupdate.socket
+	$(INSTALL) -D -m 644 package/swupdate/swupdate-usb@.service \
+		$(TARGET_DIR)/usr/lib/systemd/system/swupdate-usb@.service
+	$(INSTALL) -D -m 644 package/swupdate/swupdate-progress.service \
+		$(TARGET_DIR)/usr/lib/systemd/system/swupdate-progress.service
 	$(INSTALL) -D -m 644 package/swupdate/tmpfiles-swupdate.conf \
 		$(TARGET_DIR)/usr/lib/tmpfiles.d/tmpfiles-swupdate.conf
 endef
@@ -255,6 +261,8 @@ define SWUPDATE_INSTALL_INIT_SYSV
 	$(SWUPDATE_INSTALL_COMMON)
 	$(INSTALL) -D -m 755 package/swupdate/S80swupdate \
 		$(TARGET_DIR)/etc/init.d/S80swupdate
+	$(INSTALL) -D -m 644 package/swupdate/90-start-progress \
+		$(TARGET_DIR)/usr/lib/swupdate/conf.d/90-start-progress
 endef
 
 $(eval $(kconfig-package))
diff --git a/package/swupdate/swupdate.socket b/package/swupdate/swupdate.socket
new file mode 100644
index 0000000000..2b756714c5
--- /dev/null
+++ b/package/swupdate/swupdate.socket
@@ -0,0 +1,11 @@
+[Unit]
+Description=SWUpdate socket listener
+Documentation=https://github.com/sbabic/swupdate
+Documentation=https://sbabic.github.io/swupdate
+
+[Socket]
+ListenStream=/tmp/sockinstctrl
+ListenStream=/tmp/swupdateprog
+
+[Install]
+WantedBy=sockets.target
-- 
2.25.1

_______________________________________________
buildroot mailing list
buildroot@busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 16+ messages in thread

* Re: [Buildroot] [PATCH v2 1/8] package/swupdate: let buildroot handle stripping
  2021-08-29  2:46 [Buildroot] [PATCH v2 1/8] package/swupdate: let buildroot handle stripping James Hilliard
                   ` (6 preceding siblings ...)
  2021-08-29  2:46 ` [Buildroot] [PATCH v2 8/8] package/swupdate: add progress/usb services James Hilliard
@ 2021-09-11 14:11 ` Arnout Vandecappelle
  2021-09-12 19:57 ` Peter Korsgaard
  8 siblings, 0 replies; 16+ messages in thread
From: Arnout Vandecappelle @ 2021-09-11 14:11 UTC (permalink / raw)
  To: James Hilliard, buildroot

 Hi James,

On 29/08/2021 04:46, James Hilliard wrote:
> In buildroot, stripping for the target is configured and implemented
> with the global `BR2_STRIP_strip` option that drive the stripping in
> the target-finalize step.
> 
> So, we explicitly disable stripping at build time for swupdate.
> 
> Signed-off-by: James Hilliard <james.hilliard1@gmail.com>

 Series applied to master, thanks.

 I first had some misgivings about some of the patches, but after investigating
more and trying things out in qemu it turns out to be all perfect!

 Regards,
 Arnout

> ---
>  package/swupdate/swupdate.mk | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/package/swupdate/swupdate.mk b/package/swupdate/swupdate.mk
> index 402aa0a91f..42008cddd7 100644
> --- a/package/swupdate/swupdate.mk
> +++ b/package/swupdate/swupdate.mk
> @@ -22,7 +22,7 @@ SWUPDATE_LICENSE_FILES = LICENSES/BSD-1-Clause.txt \
>  # swupdate uses $CROSS-cc instead of $CROSS-gcc, which is not
>  # available in all external toolchains, and use CC for linking. Ensure
>  # TARGET_CC is used for both.
> -SWUPDATE_MAKE_ENV = CC="$(TARGET_CC)" LD="$(TARGET_CC)"
> +SWUPDATE_MAKE_ENV = CC="$(TARGET_CC)" LD="$(TARGET_CC)" SKIP_STRIP=y
>  
>  # swupdate bundles its own version of mongoose (version 6.16)
>  
> 
_______________________________________________
buildroot mailing list
buildroot@lists.buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [Buildroot] [PATCH v2 1/8] package/swupdate: let buildroot handle stripping
  2021-08-29  2:46 [Buildroot] [PATCH v2 1/8] package/swupdate: let buildroot handle stripping James Hilliard
                   ` (7 preceding siblings ...)
  2021-09-11 14:11 ` [Buildroot] [PATCH v2 1/8] package/swupdate: let buildroot handle stripping Arnout Vandecappelle
@ 2021-09-12 19:57 ` Peter Korsgaard
  8 siblings, 0 replies; 16+ messages in thread
From: Peter Korsgaard @ 2021-09-12 19:57 UTC (permalink / raw)
  To: James Hilliard; +Cc: buildroot

>>>>> "James" == James Hilliard <james.hilliard1@gmail.com> writes:

 > In buildroot, stripping for the target is configured and implemented
 > with the global `BR2_STRIP_strip` option that drive the stripping in
 > the target-finalize step.

 > So, we explicitly disable stripping at build time for swupdate.

 > Signed-off-by: James Hilliard <james.hilliard1@gmail.com>

Committed to 2021.02.x, 2021.05.x and 2021.08.x, thanks.

-- 
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
buildroot@lists.buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [Buildroot] [PATCH v2 2/8] package/swupdate: don't require website for services
  2021-08-29  2:46 ` [Buildroot] [PATCH v2 2/8] package/swupdate: don't require website for services James Hilliard
@ 2021-09-12 20:17   ` Peter Korsgaard
  0 siblings, 0 replies; 16+ messages in thread
From: Peter Korsgaard @ 2021-09-12 20:17 UTC (permalink / raw)
  To: James Hilliard; +Cc: buildroot

>>>>> "James" == James Hilliard <james.hilliard1@gmail.com> writes:

 > The swupdate services do not depend on
 > BR2_PACKAGE_SWUPDATE_INSTALL_WEBSITE, so install them unconditionally.

 > Signed-off-by: James Hilliard <james.hilliard1@gmail.com>

Committed to 2021.02.x, 2021.05.x and 2021.08.x, thanks.

-- 
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
buildroot@lists.buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [Buildroot] [PATCH v2 3/8] package/swupdate: use package make install for target install
  2021-08-29  2:46 ` [Buildroot] [PATCH v2 3/8] package/swupdate: use package make install for target install James Hilliard
@ 2021-09-13  9:37   ` Peter Korsgaard
  0 siblings, 0 replies; 16+ messages in thread
From: Peter Korsgaard @ 2021-09-13  9:37 UTC (permalink / raw)
  To: James Hilliard; +Cc: buildroot

>>>>> "James" == James Hilliard <james.hilliard1@gmail.com> writes:

 > This ensures all tools/libraries will be properly installed.
 > Update SWUPDATE_BUILD_CMDS param ordering for consistency.

 > Signed-off-by: James Hilliard <james.hilliard1@gmail.com>

Committed to 2021.02.x, 2021.05.x and 2021.08.x, thanks.

-- 
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
buildroot@lists.buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [Buildroot] [PATCH v2 4/8] package/swupdate: enable/disable systemd support automatically
  2021-08-29  2:46 ` [Buildroot] [PATCH v2 4/8] package/swupdate: enable/disable systemd support automatically James Hilliard
@ 2021-09-13  9:46   ` Peter Korsgaard
  0 siblings, 0 replies; 16+ messages in thread
From: Peter Korsgaard @ 2021-09-13  9:46 UTC (permalink / raw)
  To: James Hilliard; +Cc: buildroot

>>>>> "James" == James Hilliard <james.hilliard1@gmail.com> writes:

 > This needs to be set properly so that services work correctly.
 > Enable disable automatically based on BR2_PACKAGE_SYSTEMD state.

 > Signed-off-by: James Hilliard <james.hilliard1@gmail.com>

Committed to 2021.02.x, 2021.05.x and 2021.08.x, thanks.

-- 
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
buildroot@lists.buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [Buildroot] [PATCH v2 5/8] package/swupdate: add comment on origin of services/configs
  2021-08-29  2:46 ` [Buildroot] [PATCH v2 5/8] package/swupdate: add comment on origin of services/configs James Hilliard
@ 2021-09-13  9:48   ` Peter Korsgaard
  0 siblings, 0 replies; 16+ messages in thread
From: Peter Korsgaard @ 2021-09-13  9:48 UTC (permalink / raw)
  To: James Hilliard; +Cc: buildroot

>>>>> "James" == James Hilliard <james.hilliard1@gmail.com> writes:

 > Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
 > ---
 >  package/swupdate/swupdate.mk | 2 ++
 >  1 file changed, 2 insertions(+)

 > diff --git a/package/swupdate/swupdate.mk b/package/swupdate/swupdate.mk
 > index c9bd486127..256f0930ce 100644
 > --- a/package/swupdate/swupdate.mk
 > +++ b/package/swupdate/swupdate.mk
 > @@ -222,6 +222,8 @@ $(error No Swupdate configuration file specified, check your BR2_PACKAGE_SWUPDAT
 >  endif
 >  endif
 
 > +# Services and configs derived from meta-swupdate(MIT license)

It would have been nice with a space before '(MIT', but OK.

Committed to 2021.02.x, 2021.05.x and 2021.08.x, thanks.

-- 
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
buildroot@lists.buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [Buildroot] [PATCH v2 6/8] package/swupdate: add webserver config option
  2021-08-29  2:46 ` [Buildroot] [PATCH v2 6/8] package/swupdate: add webserver config option James Hilliard
@ 2021-09-13 13:26   ` Peter Korsgaard
  0 siblings, 0 replies; 16+ messages in thread
From: Peter Korsgaard @ 2021-09-13 13:26 UTC (permalink / raw)
  To: James Hilliard; +Cc: buildroot

>>>>> "James" == James Hilliard <james.hilliard1@gmail.com> writes:

 > Since the website depends on the webserver being enabled we should
 > add a config option for it and make the website depend on that.

 > We should also ensure that the mongoose(webserver) config is present.

 > Signed-off-by: James Hilliard <james.hilliard1@gmail.com>

Committed to 2021.02.x, 2021.05.x and 2021.08.x, thanks.

-- 
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
buildroot@lists.buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [Buildroot] [PATCH v2 7/8] package/swupdate: prevent systemd from removing swupdate tmp folders
  2021-08-29  2:46 ` [Buildroot] [PATCH v2 7/8] package/swupdate: prevent systemd from removing swupdate tmp folders James Hilliard
@ 2021-09-13 13:26   ` Peter Korsgaard
  0 siblings, 0 replies; 16+ messages in thread
From: Peter Korsgaard @ 2021-09-13 13:26 UTC (permalink / raw)
  To: James Hilliard; +Cc: buildroot

>>>>> "James" == James Hilliard <james.hilliard1@gmail.com> writes:

 > Ensure these folders are excluded from being cleaned up by systemd.
 > Fixes:
 > [ERROR] : SWUPDATE failed [0] ERROR : I cannot open /tmp/scripts/format.lua 2
 > [ERROR] : SWUPDATE failed [0] ERROR : extracting script to /tmp/scripts/ failed
 > [ERROR] : SWUPDATE failed [1] Installation failed !

 > Signed-off-by: James Hilliard <james.hilliard1@gmail.com>

Committed to 2021.02.x, 2021.05.x and 2021.08.x, thanks.

-- 
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
buildroot@lists.buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2021-09-14 17:51 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-29  2:46 [Buildroot] [PATCH v2 1/8] package/swupdate: let buildroot handle stripping James Hilliard
2021-08-29  2:46 ` [Buildroot] [PATCH v2 2/8] package/swupdate: don't require website for services James Hilliard
2021-09-12 20:17   ` Peter Korsgaard
2021-08-29  2:46 ` [Buildroot] [PATCH v2 3/8] package/swupdate: use package make install for target install James Hilliard
2021-09-13  9:37   ` Peter Korsgaard
2021-08-29  2:46 ` [Buildroot] [PATCH v2 4/8] package/swupdate: enable/disable systemd support automatically James Hilliard
2021-09-13  9:46   ` Peter Korsgaard
2021-08-29  2:46 ` [Buildroot] [PATCH v2 5/8] package/swupdate: add comment on origin of services/configs James Hilliard
2021-09-13  9:48   ` Peter Korsgaard
2021-08-29  2:46 ` [Buildroot] [PATCH v2 6/8] package/swupdate: add webserver config option James Hilliard
2021-09-13 13:26   ` Peter Korsgaard
2021-08-29  2:46 ` [Buildroot] [PATCH v2 7/8] package/swupdate: prevent systemd from removing swupdate tmp folders James Hilliard
2021-09-13 13:26   ` Peter Korsgaard
2021-08-29  2:46 ` [Buildroot] [PATCH v2 8/8] package/swupdate: add progress/usb services James Hilliard
2021-09-11 14:11 ` [Buildroot] [PATCH v2 1/8] package/swupdate: let buildroot handle stripping Arnout Vandecappelle
2021-09-12 19:57 ` Peter Korsgaard

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.