Skip to contentSkip to conversation

package/swugenerator: new package

PATCH Superseded Giulio Benetti 2 participants 10 messages Mar 13, 2023 – Jul 30, 2023

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package/swugenerator: new package

Add swugenerator as host utility to generate images for swupdate with all the possible options available like encryption, passkey etc. Let's also add Giulio Benetti as package maintainer to DEVELOPERS file.

---
 DEVELOPERS                             |  1 +
 package/Config.in.host                 |  1 +
 package/swugenerator/Config.in.host    |  6 ++++++
 package/swugenerator/swugenerator.hash |  4 ++++
 package/swugenerator/swugenerator.mk   | 13 +++++++++++++
 5 files changed, 25 insertions(+)
 create mode 100644 package/swugenerator/Config.in.host
 create mode 100644 package/swugenerator/swugenerator.hash
 create mode 100644 package/swugenerator/swugenerator.mk
DEVELOPERS +1 -0
index b49491da7a..3228f2b709 100644
@@ -1182,6 +1182,7 @@ F:	package/rtl8821cu/
 F:	package/sunxi-mali-utgard/
 F:	package/sunxi-mali-utgard-driver/
 F:	package/sunxi-tools/
+F:	package/swugenerator/
 F:	package/trace-cmd/
 F:	package/udisks/
 F:	package/wilc-driver/
package/Config.in.host +1 -0
index dcadbfdfc1..e47b7b5de9 100644
@@ -100,6 +100,7 @@ menu "Host utilities"
 	source "package/squashfs/Config.in.host"
 	source "package/sunxi-tools/Config.in.host"
 	source "package/swig/Config.in.host"
+	source "package/swugenerator/Config.in.host"
 	source "package/systemd/Config.in.host"
 	source "package/tegrarcm/Config.in.host"
 	source "package/ti-cgt-pru/Config.in.host"
package/swugenerator/Config.in.host new file +6 -0
new file mode 100644
index 0000000000..df0e9a5170
@@ -0,0 +1,6 @@
+config BR2_PACKAGE_HOST_SWUGENERATOR
+	bool "host swugenerator"
+	help
+	  A host tool to generate SWU update package for SWUpdate.
+
+	  https://github.com/sbabic/swugenerator
package/swugenerator/swugenerator.hash new file +4 -0
new file mode 100644
index 0000000000..2125be3d1c
@@ -0,0 +1,4 @@
+# Locally calculated
+sha256  b5c47c47be0df4df476d2bf596f58a7296a4b0cebe6c8de42251605475b37d25  swugenerator-0.2.tar.gz
+# Locally computed sha256 checksums
+sha256  3972dc9744f6499f0f9b2dbf76696f2ae7ad8af9b23dde66d6af86c9dfb36986  LICENSE
package/swugenerator/swugenerator.mk new file +13 -0
new file mode 100644
index 0000000000..506465f42d
@@ -0,0 +1,13 @@
+################################################################################
+#
+# swugenerator
+#
+################################################################################
+
+SWUGENERATOR_VERSION = 0.2
+SWUGENERATOR_SITE = https://github.com/sbabic/swugenerator/archive/refs/tags/v$(SWUGENERATOR_VERSION)
+SWUGENERATOR_LICENSE = GPL-3.0
+SWUGENERATOR_LICENSE_FILES = LICENSE
+HOST_SWUGENERATOR_SETUP_TYPE = setuptools
+
+$(eval $(host-python-package))
Signature · 6 lines
2.34.1

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#1 lore raw

Hello Giulio,

Thanks for this new package.

package/swugenerator/swugenerator.mk line 8

Quoted 2 lines · On Mon, 13 Mar 2023 23:17:05 +0100 Giulio Benetti…
package/swugenerator/swugenerator.mk new file +2 -0
+SWUGENERATOR_VERSION = 0.2
+SWUGENERATOR_SITE = https://github.com/sbabic/swugenerator/archive/refs/tags/v$(SWUGENERATOR_VERSION)

Could you please use the $(call github,...,...,...) macro here?

package/swugenerator/swugenerator.mk line 13

Quoted 5 lines
package/swugenerator/swugenerator.mk new file +5 -0
+SWUGENERATOR_LICENSE = GPL-3.0
+SWUGENERATOR_LICENSE_FILES = LICENSE
+HOST_SWUGENERATOR_SETUP_TYPE = setuptools
+
+$(eval $(host-python-package))

Thanks!

Thomas

Signature · 7 lines
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#2 lore raw

PATCH v2 1/1 package/swugenerator: new package

Add swugenerator as host utility to generate images for swupdate with all the possible options available like encryption, passkey etc. Let's also add Giulio Benetti as package maintainer to DEVELOPERS file.

---
V1->V2:
* use github macro for package _SITE as pointed by Thomas Petazzoni

---
 DEVELOPERS                             |  1 +
 package/Config.in.host                 |  1 +
 package/swugenerator/Config.in.host    |  6 ++++++
 package/swugenerator/swugenerator.hash |  4 ++++
 package/swugenerator/swugenerator.mk   | 13 +++++++++++++
 5 files changed, 25 insertions(+)
 create mode 100644 package/swugenerator/Config.in.host
 create mode 100644 package/swugenerator/swugenerator.hash
 create mode 100644 package/swugenerator/swugenerator.mk
DEVELOPERS +1 -0
index b49491da7a..3228f2b709 100644
@@ -1182,6 +1182,7 @@ F:	package/rtl8821cu/
 F:	package/sunxi-mali-utgard/
 F:	package/sunxi-mali-utgard-driver/
 F:	package/sunxi-tools/
+F:	package/swugenerator/
 F:	package/trace-cmd/
 F:	package/udisks/
 F:	package/wilc-driver/
package/Config.in.host +1 -0
index dcadbfdfc1..e47b7b5de9 100644
@@ -100,6 +100,7 @@ menu "Host utilities"
 	source "package/squashfs/Config.in.host"
 	source "package/sunxi-tools/Config.in.host"
 	source "package/swig/Config.in.host"
+	source "package/swugenerator/Config.in.host"
 	source "package/systemd/Config.in.host"
 	source "package/tegrarcm/Config.in.host"
 	source "package/ti-cgt-pru/Config.in.host"
package/swugenerator/Config.in.host new file +6 -0
new file mode 100644
index 0000000000..df0e9a5170
@@ -0,0 +1,6 @@
+config BR2_PACKAGE_HOST_SWUGENERATOR
+	bool "host swugenerator"
+	help
+	  A host tool to generate SWU update package for SWUpdate.
+
+	  https://github.com/sbabic/swugenerator
package/swugenerator/swugenerator.hash new file +4 -0
new file mode 100644
index 0000000000..2125be3d1c
@@ -0,0 +1,4 @@
+# Locally calculated
+sha256  b5c47c47be0df4df476d2bf596f58a7296a4b0cebe6c8de42251605475b37d25  swugenerator-0.2.tar.gz
+# Locally computed sha256 checksums
+sha256  3972dc9744f6499f0f9b2dbf76696f2ae7ad8af9b23dde66d6af86c9dfb36986  LICENSE
package/swugenerator/swugenerator.mk new file +13 -0
new file mode 100644
index 0000000000..db43b18af6
@@ -0,0 +1,13 @@
+################################################################################
+#
+# swugenerator
+#
+################################################################################
+
+SWUGENERATOR_VERSION = 0.2
+SWUGENERATOR_SITE = $(call github,sbabic,swugenerator,v$(SWUGENERATOR_VERSION))
+SWUGENERATOR_LICENSE = GPL-3.0
+SWUGENERATOR_LICENSE_FILES = LICENSE
+HOST_SWUGENERATOR_SETUP_TYPE = setuptools
+
+$(eval $(host-python-package))
Signature · 6 lines
2.34.1

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#3 lore raw

Hello Giulio,

Quoted 5 lines · On Tue, 14 Mar 2023 13:30:30 +0100 Giulio Benetti…

Add swugenerator as host utility to generate images for swupdate with all the possible options available like encryption, passkey etc. Let's also add Giulio Benetti as package maintainer to DEVELOPERS file.

I was about to apply... but realized that both setup.py and requirements.txt indicate that the libconf Python module was needed as a dependency, and we have no package for it in Buildroot, and therefore it's not selected as a runtime dependency of host-swugenerator.

Could you double check this perhaps, and make sure host-swugenerator works with the python installed as $(HOST_DIR)/bin/python3 ?

Thanks!

Thomas

Signature · 7 lines
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#4 lore raw

Hello Thomas,

Quoted 11 lines · Thomas Petazzoni via buildroot

Hello Giulio,

Quoted 5 lines · On Tue, 14 Mar 2023 13:30:30 +0100 Giulio Benetti…

Add swugenerator as host utility to generate images for swupdate with all the possible options available like encryption, passkey etc. Let's also add Giulio Benetti as package maintainer to DEVELOPERS file.

Quoted 7 lines

I was about to apply... but realized that both setup.py and requirements.txt indicate that the libconf Python module was needed as a dependency, and we have no package for it in Buildroot, and therefore it's not selected as a runtime dependency of host-swugenerator.

Could you double check this perhaps, and make sure host-swugenerator works with the python installed as $(HOST_DIR)/bin/python3 ?

You are right, I'm not very used to python. So yes it fails on runtime on a machine where I don't have libconf installed and it's required. So I'm going to provide a patch for adding host-python-libconf package too and make swugenerator depend on it.

Thank you!
Best regards

Signature · 6 lines
Giulio Benetti
Benetti Engineering sas
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#5 lore raw

PATCH v2 1/2 package/python-libconf: new package

In reply to Thomas Petazzoni via buildroot

python-libconf is a pure-Python reader/writer for configuration files in libconfig format, which is often used in C/C++ projects.

https://github.com/ChrisAichinger/python-libconf

---
V1->V2:
* add python-libconf package since it's required by swugenerator as pointed by Thomas Petazzoni

---
 DEVELOPERS                                 |  1 +
 package/Config.in.host                     |  1 +
 package/python-libconf/Config.in.host      |  7 +++++++
 package/python-libconf/python-libconf.hash |  4 ++++
 package/python-libconf/python-libconf.mk   | 13 +++++++++++++
 5 files changed, 26 insertions(+)
 create mode 100644 package/python-libconf/Config.in.host
 create mode 100644 package/python-libconf/python-libconf.hash
 create mode 100644 package/python-libconf/python-libconf.mk
DEVELOPERS +1 -0
index b6d288c54f..8ddffbf428 100644
@@ -1171,6 +1171,7 @@ F:	package/mali-driver/
 F:	package/minicom/
 F:	package/mmc-utils/
 F:	package/nfs-utils/
+F:	package/python-libconf/
 F:	package/python-uvloop/
 F:	package/qt5/
 F:	package/rockchip-mali/
package/Config.in.host +1 -0
index dcadbfdfc1..edfe7ce4b3 100644
@@ -80,6 +80,7 @@ menu "Host utilities"
 	source "package/python-greenlet/Config.in.host"
 	source "package/python-iniparse/Config.in.host"
 	source "package/python-kflash/Config.in.host"
+	source "package/python-libconf/Config.in.host"
 	source "package/python-lxml/Config.in.host"
 	source "package/python-pyyaml/Config.in.host"
 	source "package/python-six/Config.in.host"
package/python-libconf/Config.in.host new file +7 -0
new file mode 100644
index 0000000000..65e8d3a241
@@ -0,0 +1,7 @@
+config BR2_PACKAGE_HOST_PYTHON_LIBCONF
+	bool "host python-libconf"
+	help
+	  libconf is a pure-Python reader/writer for configuration files
+	  in libconfig format, which is often used in C/C++ projects.
+
+	  https://github.com/ChrisAichinger/python-libconf/
\ No newline at end of file
package/python-libconf/python-libconf.hash new file +4 -0
new file mode 100644
index 0000000000..d05efd37fd
@@ -0,0 +1,4 @@
+# Locally calculated
+sha256  66897870fcafce05624eafcc99e2dc8e150124e91019d9c29cc4f3bef64311dd  python-libconf-2.0.1.tar.gz
+# Locally computed sha256 checksums
+sha256  3c2afc8c9f7a12032f225e6fa870e85af14d1b71236afe28d94a4b67e5e8c873  LICENSE
package/python-libconf/python-libconf.mk new file +13 -0
new file mode 100644
index 0000000000..b349e3e60e
@@ -0,0 +1,13 @@
+################################################################################
+#
+# python-libconf
+#
+################################################################################
+
+PYTHON_LIBCONF_VERSION = 2.0.1
+PYTHON_LIBCONF_SITE = $(call github,ChrisAichinger,python-libconf,$(PYTHON_LIBCONF_VERSION))
+PYTHON_LIBCONF_SETUP_TYPE = setuptools
+PYTHON_LIBCONF_LICENSE = MIT
+PYTHON_LIBCONF_LICENSE_FILES = LICENSE
+
+$(eval $(host-python-package))
Signature · 6 lines
2.34.1

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#6 lore raw

PATCH v2 2/2 package/swugenerator: new package

Add swugenerator as host utility to generate images for swupdate with all the possible options available like encryption, passkey etc. Let's also add Giulio Benetti as package maintainer to DEVELOPERS file.

---
V1->V2:
* add host dependency to python-libconf

---
 DEVELOPERS                             |  1 +
 package/Config.in.host                 |  1 +
 package/swugenerator/Config.in.host    |  6 ++++++
 package/swugenerator/swugenerator.hash |  4 ++++
 package/swugenerator/swugenerator.mk   | 14 ++++++++++++++
 5 files changed, 26 insertions(+)
 create mode 100644 package/swugenerator/Config.in.host
 create mode 100644 package/swugenerator/swugenerator.hash
 create mode 100644 package/swugenerator/swugenerator.mk
DEVELOPERS +1 -0
index 8ddffbf428..453fbf4b0f 100644
@@ -1186,6 +1186,7 @@ F:	package/rtl8821cu/
 F:	package/sunxi-mali-utgard/
 F:	package/sunxi-mali-utgard-driver/
 F:	package/sunxi-tools/
+F:	package/swugenerator/
 F:	package/trace-cmd/
 F:	package/udisks/
 F:	package/wilc-driver/
package/Config.in.host +1 -0
index edfe7ce4b3..7059d78eb8 100644
@@ -101,6 +101,7 @@ menu "Host utilities"
 	source "package/squashfs/Config.in.host"
 	source "package/sunxi-tools/Config.in.host"
 	source "package/swig/Config.in.host"
+	source "package/swugenerator/Config.in.host"
 	source "package/systemd/Config.in.host"
 	source "package/tegrarcm/Config.in.host"
 	source "package/ti-cgt-pru/Config.in.host"
package/swugenerator/Config.in.host new file +6 -0
new file mode 100644
index 0000000000..df0e9a5170
@@ -0,0 +1,6 @@
+config BR2_PACKAGE_HOST_SWUGENERATOR
+	bool "host swugenerator"
+	help
+	  A host tool to generate SWU update package for SWUpdate.
+
+	  https://github.com/sbabic/swugenerator
package/swugenerator/swugenerator.hash new file +4 -0
new file mode 100644
index 0000000000..2125be3d1c
@@ -0,0 +1,4 @@
+# Locally calculated
+sha256  b5c47c47be0df4df476d2bf596f58a7296a4b0cebe6c8de42251605475b37d25  swugenerator-0.2.tar.gz
+# Locally computed sha256 checksums
+sha256  3972dc9744f6499f0f9b2dbf76696f2ae7ad8af9b23dde66d6af86c9dfb36986  LICENSE
package/swugenerator/swugenerator.mk new file +14 -0
new file mode 100644
index 0000000000..f4ead1d229
@@ -0,0 +1,14 @@
+################################################################################
+#
+# swugenerator
+#
+################################################################################
+
+SWUGENERATOR_VERSION = 0.2
+SWUGENERATOR_SITE = $(call github,sbabic,swugenerator,v$(SWUGENERATOR_VERSION))
+SWUGENERATOR_LICENSE = GPL-3.0
+SWUGENERATOR_LICENSE_FILES = LICENSE
+HOST_SWUGENERATOR_SETUP_TYPE = setuptools
+HOST_SWUGENERATOR_DEPENDENCIES = host-python-libconf
+
+$(eval $(host-python-package))
Signature · 6 lines
2.34.1

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#7 lore raw

This is V3... Sorry!

Quoted 7 lines · Giulio Benetti

Add swugenerator as host utility to generate images for swupdate with all the possible options available like encryption, passkey etc. Let's also add Giulio Benetti as package maintainer to DEVELOPERS file.

---
V1->V2:

* use github macro for package _SITE as pointed by Thomas Petazzoni V2->V3:

Quoted 1 line

* add host dependency to python-libconf

Sorry again for the noise
Best regards

Signature · 2 lines
Giulio Benetti
Benetti Engineering sas
Quoted 67 lines
---
  DEVELOPERS                             |  1 +
  package/Config.in.host                 |  1 +
  package/swugenerator/Config.in.host    |  6 ++++++
  package/swugenerator/swugenerator.hash |  4 ++++
  package/swugenerator/swugenerator.mk   | 14 ++++++++++++++
  5 files changed, 26 insertions(+)

create mode 100644 package/swugenerator/Config.in.host create mode 100644 package/swugenerator/swugenerator.hash create mode 100644 package/swugenerator/swugenerator.mk

DEVELOPERS +1 -0
index 8ddffbf428..453fbf4b0f 100644
@@ -1186,6 +1186,7 @@ F:	package/rtl8821cu/
  F:	package/sunxi-mali-utgard/
  F:	package/sunxi-mali-utgard-driver/
  F:	package/sunxi-tools/
+F:	package/swugenerator/
  F:	package/trace-cmd/
  F:	package/udisks/
  F:	package/wilc-driver/
package/Config.in.host +1 -0
index edfe7ce4b3..7059d78eb8 100644
@@ -101,6 +101,7 @@ menu "Host utilities"
  	source "package/squashfs/Config.in.host"
  	source "package/sunxi-tools/Config.in.host"
  	source "package/swig/Config.in.host"
+	source "package/swugenerator/Config.in.host"
  	source "package/systemd/Config.in.host"
  	source "package/tegrarcm/Config.in.host"
  	source "package/ti-cgt-pru/Config.in.host"
package/swugenerator/Config.in.host new file +6 -0
new file mode 100644
index 0000000000..df0e9a5170
@@ -0,0 +1,6 @@
+config BR2_PACKAGE_HOST_SWUGENERATOR
+	bool "host swugenerator"
+	help
+	  A host tool to generate SWU update package for SWUpdate.
+
+	  https://github.com/sbabic/swugenerator
package/swugenerator/swugenerator.hash new file +4 -0
new file mode 100644
index 0000000000..2125be3d1c
@@ -0,0 +1,4 @@
+# Locally calculated
+sha256  b5c47c47be0df4df476d2bf596f58a7296a4b0cebe6c8de42251605475b37d25  swugenerator-0.2.tar.gz
+# Locally computed sha256 checksums
+sha256  3972dc9744f6499f0f9b2dbf76696f2ae7ad8af9b23dde66d6af86c9dfb36986  LICENSE
package/swugenerator/swugenerator.mk new file +4 -0
new file mode 100644
index 0000000000..f4ead1d229
@@ -0,0 +1,14 @@
+################################################################################
+#
+# swugenerator
+#

package/swugenerator/swugenerator.mk line 14

Quoted 10 lines
package/swugenerator/swugenerator.mk new file +10 -0
+################################################################################
+
+SWUGENERATOR_VERSION = 0.2
+SWUGENERATOR_SITE = $(call github,sbabic,swugenerator,v$(SWUGENERATOR_VERSION))
+SWUGENERATOR_LICENSE = GPL-3.0
+SWUGENERATOR_LICENSE_FILES = LICENSE
+HOST_SWUGENERATOR_SETUP_TYPE = setuptools
+HOST_SWUGENERATOR_DEPENDENCIES = host-python-libconf
+
+$(eval $(host-python-package))

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

#8 lore raw
In reply to Giulio Benetti
Quoted 8 lines · On Wed, 15 Mar 2023 11:08:48 +0100 Giulio Benetti…

Add swugenerator as host utility to generate images for swupdate with all the possible options available like encryption, passkey etc. Let's also add Giulio Benetti as package maintainer to DEVELOPERS file.

---
V1->V2:
* add host dependency to python-libconf

Quoted 10 lines
---
 DEVELOPERS                             |  1 +
 package/Config.in.host                 |  1 +
 package/swugenerator/Config.in.host    |  6 ++++++
 package/swugenerator/swugenerator.hash |  4 ++++
 package/swugenerator/swugenerator.mk   | 14 ++++++++++++++
 5 files changed, 26 insertions(+)
 create mode 100644 package/swugenerator/Config.in.host
 create mode 100644 package/swugenerator/swugenerator.hash
 create mode 100644 package/swugenerator/swugenerator.mk

Applied to master, thanks.

Thomas

Signature · 7 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#9 lore raw

Re: [Buildroot] [PATCH v2 1/2] package/python-libconf: new package

In reply to Giulio Benetti
Quoted 10 lines · On Wed, 15 Mar 2023 11:08:47 +0100 Giulio Benetti…

python-libconf is a pure-Python reader/writer for configuration files in libconfig format, which is often used in C/C++ projects.

https://github.com/ChrisAichinger/python-libconf

---
V1->V2:
* add python-libconf package since it's required by swugenerator as pointed by Thomas Petazzoni

Quoted 10 lines
---
 DEVELOPERS                                 |  1 +
 package/Config.in.host                     |  1 +
 package/python-libconf/Config.in.host      |  7 +++++++
 package/python-libconf/python-libconf.hash |  4 ++++
 package/python-libconf/python-libconf.mk   | 13 +++++++++++++
 5 files changed, 26 insertions(+)
 create mode 100644 package/python-libconf/Config.in.host
 create mode 100644 package/python-libconf/python-libconf.hash
 create mode 100644 package/python-libconf/python-libconf.mk

I've dropped the Config.in.host file and option, as we don't need it:
for now, this package is only needed as a build dependency for host-swugenerator. Applied with this change. Thanks!

Thomas

Signature · 7 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot