package/qbee-agent: new package
PATCH 1/1 package/qbee-agent: new package
This patch add qbee-agent, an open source device management software for Linux devices.
--- package/Config.in | 1 + package/qbee-agent/Config.in | 16 +++++++++++ package/qbee-agent/qbee-agent.hash | 3 ++ package/qbee-agent/qbee-agent.mk | 45 ++++++++++++++++++++++++++++++ 4 files changed, 65 insertions(+) create mode 100644 package/qbee-agent/Config.in create mode 100644 package/qbee-agent/qbee-agent.hash create mode 100644 package/qbee-agent/qbee-agent.mk
package/Config.in +1 -0
@@ -2741,6 +2741,7 @@ menu "System tools" source "package/procs/Config.in" source "package/psmisc/Config.in" source "package/pwgen/Config.in" + source "package/qbee-agent/Config.in" source "package/quota/Config.in" source "package/quotatool/Config.in" source "package/rauc/Config.in"
package/qbee-agent/Config.in new file +16 -0
@@ -0,0 +1,16 @@ +config BR2_PACKAGE_QBEE_AGENT + bool "qbee-agent" + select BR2_PACKAGE_OPENSSH if !BR2_PACKAGE_DROPBEAR_CLIENT # runtime + select BR2_PACKAGE_IPTABLES # runtime + select BR2_PACKAGE_BUSYBOX_SHOW_OTHERS # runtime + select BR2_PACKAGE_SHADOW # runtime + select BR2_PACKAGE_BASH # runtime + help + Qbee is a device management platform that comprise + of an open-source agent and a hosted SaaS backend. + This config installs pre-built static binaries made + with the official public signing key for qbee.io. The + binaries will work seamlessly with the qbee.io device + management backend. + https://github.com/qbee-io/qbee-agent + https://qbee.io
package/qbee-agent/qbee-agent.hash new file +3 -0
@@ -0,0 +1,3 @@ +md5 6e4dc7323b99d8c5a981b7b2c5da4f66 qbee-agent-2023.44.tar.gz +sha1 a0d02c1180fd97228f23859a8dea91fe81a31626 qbee-agent-2023.44.tar.gz +sha256 edcf319c4ce17e9844df598fa796aa87303a1bf238299dbeeb41c94ff5de5e1d qbee-agent-2023.44.tar.gz
package/qbee-agent/qbee-agent.mk new file +45 -0
45 lines not on this page · raw message
Signature · 6 lines
2.25.1 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Hello Jon,
Thanks a lot for this contribution. See below a small number of comments/questions.
Quoted 10 lines · On Thu, 9 Nov 2023 09:09:19 +0100 Jon Henrik Bjørnstad via buildroot…
This patch add qbee-agent, an open source device management software for Linux devices.
Signed-off-by Jon Henrik Bjørnstad <[email protected]>--- package/Config.in | 1 + package/qbee-agent/Config.in | 16 +++++++++++ package/qbee-agent/qbee-agent.hash | 3 ++ package/qbee-agent/qbee-agent.mk | 45 ++++++++++++++++++++++++++++++ 4 files changed, 65 insertions(+)
Could you add an entry in the DEVELOPERS file for this package, that associates your name/e-mail with the package, so that we can notify you when there are build failures, or needed security updates?
package/Config.in menu "System tools" · line 2744
Quoted 9 lines
package/Config.in +1
-0@@ -2741,6 +2741,7 @@ menu "System tools" source "package/procs/Config.in" source "package/psmisc/Config.in" source "package/pwgen/Config.in" + source "package/qbee-agent/Config.in"
The indentation is not correct here.
Quoted 9 lines
package/Config.in +0
-0source "package/quota/Config.in" source "package/quotatool/Config.in" source "package/rauc/Config.in"package/qbee-agent/Config.in new file +0
-0
package/qbee-agent/Config.in line 7
Quoted 7 lines
package/qbee-agent/Config.in new file +7
-0@@ -0,0 +1,16 @@ +config BR2_PACKAGE_QBEE_AGENT + bool "qbee-agent" + select BR2_PACKAGE_OPENSSH if !BR2_PACKAGE_DROPBEAR_CLIENT # runtime + select BR2_PACKAGE_IPTABLES # runtime + select BR2_PACKAGE_BUSYBOX_SHOW_OTHERS # runtime + select BR2_PACKAGE_SHADOW # runtime + select BR2_PACKAGE_BASH # runtime
Minor nit: only one space before the "# runtime" comment.
package/qbee-agent/Config.in line 14
Quoted 7 lines
package/qbee-agent/Config.in new file +7
-0+ help + Qbee is a device management platform that comprise + of an open-source agent and a hosted SaaS backend. + This config installs pre-built static binaries made + with the official public signing key for qbee.io. The + binaries will work seamlessly with the qbee.io device + management backend.
Please put one empty line betwen the help text and the upstream URL.
But the bigger question is why do we package a pre-built static binary, rather than building from source?
Also, if this package is provided with pre-built binaries, then most likely it is only supported for a specific subset of CPU architectures, so you need some "depends on". If you however decide to build if from source, it should have:
depends on BR2_PACKAGE_HOST_GO_TARGET_ARCH_SUPPORTS
package/qbee-agent/qbee-agent.hash
Quoted 8 lines
package/qbee-agent/Config.in new file +2
-0+ https://github.com/qbee-io/qbee-agent + https://qbee.iopackage/qbee-agent/qbee-agent.hash new file +0
-0@@ -0,0 +1,3 @@
Please add a comment that says where the hash comes from. If it's just calculated locally by you, then:
# Locally calculated
package/qbee-agent/qbee-agent.hash line 3
Quoted 3 lines
package/qbee-agent/qbee-agent.hash new file +3
-0+md5 6e4dc7323b99d8c5a981b7b2c5da4f66 qbee-agent-2023.44.tar.gz +sha1 a0d02c1180fd97228f23859a8dea91fe81a31626 qbee-agent-2023.44.tar.gz +sha256 edcf319c4ce17e9844df598fa796aa87303a1bf238299dbeeb41c94ff5de5e1d qbee-agent-2023.44.tar.gz
The sha256 hash is sufficient.
Quoted 6 lines
package/qbee-agent/qbee-agent.mk new file +0
-0
package/qbee-agent/qbee-agent.mk line 10
Quoted 10 lines
package/qbee-agent/qbee-agent.mk new file +10
-0@@ -0,0 +1,45 @@ +################################################################################ +# +# qbee-agent package +# +################################################################################ + +QBEE_AGENT_VERSION = 2023.44 +#QBEE_AGENT_SOURCE = qbee-agent-$(QBEE_AGENT_VERSION).tar.gz +QBEE_AGENT_SITE = https://cdn.qbee.io/software/qbee-agent/$(QBEE_AGENT_VERSION)/binaries +QBEE_AGENT_LICENSE = Apache-2.0
Is there are license file?
package/qbee-agent/qbee-agent.mk line 20
Quoted 10 lines
package/qbee-agent/qbee-agent.mk new file +10
-0+ +ifeq ($(BR2_arm),y) +QBEE_AGENT_GOARCH = arm +else ifeq ($(BR2_aarch64),y) +QBEE_AGENT_GOARCH = arm64 +else ifeq ($(BR2_i386),y) +QBEE_AGENT_GOARCH = 386 +else ifeq ($(BR2_x86_64),y) +QBEE_AGENT_GOARCH = amd64 +endif
Perhaps you can directly use $(GO_GOARCH) ?
package/qbee-agent/qbee-agent.mk line 22
Quoted 2 lines
package/qbee-agent/qbee-agent.mk new file +2
-0+define QBEE_AGENT_BUILD_CMDS +endef
Just don't define build commands in this case.
package/qbee-agent/qbee-agent.mk line 26
Quoted 2 lines
package/qbee-agent/qbee-agent.mk new file +2
-0+define QBEE_AGENT_INSTALL_TARGET_CMDS + $(INSTALL) -m 0755 $(@D)/qbee-agent-$(QBEE_AGENT_VERSION)/qbee-agent-$(QBEE_AGENT_GOARCH) $(TARGET_DIR)/usr/bin/qbee-agent
It's a bit surprising, why do you have a qbee-agent-$(QBEE_AGENT_VERSION) ? It looks like your tarball has one too many path embedded maybe? If so, you can do:
QBEE_AGENT_STRIP_COMPONENTS = 2
this will simplify the paths.
package/qbee-agent/qbee-agent.mk line 27
Quoted 1 line
package/qbee-agent/qbee-agent.mk new file +1
-0+ $(INSTALL) -d -m 0700 $(TARGET_DIR)/etc/qbee/ppkeys
No need to do this...
package/qbee-agent/qbee-agent.mk line 28
Quoted 1 line
package/qbee-agent/qbee-agent.mk new file +1
-0+ $(INSTALL) -m 0600 $(@D)/qbee-agent-$(QBEE_AGENT_VERSION)/share/ssl/ca.cert $(TARGET_DIR)/etc/qbee/ppkeys/ca.cert
... just add -D as an option here, which will create all needed destination directories.
package/qbee-agent/qbee-agent.mk line 33
Quoted 5 lines
package/qbee-agent/qbee-agent.mk new file +5
-0+endef + +define QBEE_AGENT_INSTALL_INIT_SYSTEMD + $(INSTALL) -D -m 0644 $(@D)/qbee-agent-$(QBEE_AGENT_VERSION)/init-scripts/systemd/qbee-agent.service \ + $(TARGET_DIR)/usr/lib/systemd/system/qbee-agent.service
Tab for the indentation.
package/qbee-agent/qbee-agent.mk line 38
Quoted 5 lines
package/qbee-agent/qbee-agent.mk new file +5
-0+endef + +define QBEE_AGENT_INSTALL_INIT_SYSV + $(INSTALL) -D -m 755 $(@D)/qbee-agent-$(QBEE_AGENT_VERSION)/init-scripts/sysvinit/qbee-agent \ + $(TARGET_DIR)/etc/init.d/S99qbee-agent
Likewise.
Thanks a lot!
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
Quoted 6 lines · Thomas Petazzoni via buildroot
package/qbee-agent/qbee-agent.mk line 27
Quoted 1 line
package/qbee-agent/qbee-agent.mk new file +1
-0+ $(INSTALL) -d -m 0700 $(TARGET_DIR)/etc/qbee/ppkeysNo need to do this...
package/qbee-agent/qbee-agent.mk line 28
Quoted 1 line
package/qbee-agent/qbee-agent.mk new file +1
-0+ $(INSTALL) -m 0600 $(@D)/qbee-agent-$(QBEE_AGENT_VERSION)/share/ssl/ca.cert $(TARGET_DIR)/etc/qbee/ppkeys/ca.cert... just add -D as an option here, which will create all needed destination directories.
No, with -D, the mode of the directory will be 0755 instead of 0700, so you
want to create the directory explicitly here (that is, assuming that 0700 is the proper mode for the directory, but for something called "ppkeys" it sounds that that would be the case.
Regards,
Arnout
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
Quoted 8 lines · On Fri, 10 Nov 2023 19:56:41 +0100 Arnout Vandecappelle <[email protected]> wrote:
Quoted 3 lines
package/qbee-agent/qbee-agent.mk line 28
Quoted 1 line
package/qbee-agent/qbee-agent.mk new file +1
-0+ $(INSTALL) -m 0600 $(@D)/qbee-agent-$(QBEE_AGENT_VERSION)/share/ssl/ca.cert $(TARGET_DIR)/etc/qbee/ppkeys/ca.cert... just add -D as an option here, which will create all needed destination directories.
No, with -D, the mode of the directory will be 0755 instead of 0700, so you
want to create the directory explicitly here (that is, assuming that 0700 is the proper mode for the directory, but for something called "ppkeys" it sounds that that would be the case.
Ah, indeed, makes sense!
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