All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Petazzoni via buildroot <buildroot@buildroot.org>
To: "Jon Henrik Bjørnstad via buildroot" <buildroot@buildroot.org>
Cc: "Christian Stewart" <christian@aperture.us>,
	"Jon Henrik Bjørnstad" <jonhenrik@qbee.io>,
	"Anisse Astier" <anisse@astier.eu>
Subject: Re: [Buildroot] [PATCH 1/1] package/qbee-agent: new package
Date: Sun, 12 May 2024 12:05:44 +0200	[thread overview]
Message-ID: <20240512120544.002e958a@windsurf> (raw)
In-Reply-To: <20240305093839.3152030-2-jonhenrik@qbee.io>

Hello Jon,

Thanks for your patch, and sorry for the long delay in getting back to
you. I have applied your patch, with some fixes (see below).

On Tue,  5 Mar 2024 10:38:39 +0100
Jon Henrik Bjørnstad via buildroot <buildroot@buildroot.org> wrote:

> diff --git a/package/qbee-agent/Config.in b/package/qbee-agent/Config.in
> new file mode 100644
> index 0000000000..02e35827ef
> --- /dev/null
> +++ b/package/qbee-agent/Config.in
> @@ -0,0 +1,17 @@
> +config BR2_PACKAGE_QBEE_AGENT
> +	bool "qbee-agent"
> +	depends on BR2_PACKAGE_HOST_GO_TARGET_ARCH_SUPPORTS
> +	select BR2_PACKAGE_IPTABLES # runtime
> +	select BR2_PACKAGE_BUSYBOX_SHOW_OTHERS # runtime
> +	select BR2_PACKAGE_SHADOW # runtime
> +	select BR2_PACKAGE_BASH # runtime

When you select something, you need to replicate the "depends on" of
the thing you are selecting. So here:

+       depends on BR2_USE_MMU # bash
+       depends on !BR2_STATIC_LIBS # shadow
+       depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_14 # shadow

> +	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

And you need to add a Config.in comment about those dependencies:

+comment "qbee-agent needs a toolchain w/ headers >= 4.14, dynamic library"
+       depends on BR2_PACKAGE_HOST_GO_TARGET_ARCH_SUPPORTS
+       depends on BR2_USE_MMU
+       depends on BR2_STATIC_LIBS || \
+               !BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_14

> diff --git a/package/qbee-agent/qbee-agent.hash b/package/qbee-agent/qbee-agent.hash
> new file mode 100644
> index 0000000000..1c6a361ff6
> --- /dev/null
> +++ b/package/qbee-agent/qbee-agent.hash
> @@ -0,0 +1,3 @@
> +# Locally calculated
> +sha256  b1b5a6d4e18fbd8536d05616c632f10ef309d26036a19c5ce28d0635c45d8cab  qbee-agent-2024.09.tar.gz

I had to update the hash and the filename, due to the recent changes in
the download infrastructure (not your fault, the changes were committed
very recently).

> +sha256  02d07d96be99eb042b01ba650079a440ce26a78c5e0e1e8060c33a8c9e200404  LICENSE
> diff --git a/package/qbee-agent/qbee-agent.mk b/package/qbee-agent/qbee-agent.mk
> new file mode 100644
> index 0000000000..66037195c1
> --- /dev/null
> +++ b/package/qbee-agent/qbee-agent.mk
> @@ -0,0 +1,35 @@
> +################################################################################
> +#
> +# qbee-agent package
> +#
> +################################################################################
> +
> +QBEE_AGENT_VERSION = 2024.09

Added a comment above this line, saying that QBEE_AGENT_COMMIT_ID
should be kept in sync.

> +QBEE_AGENT_SITE = $(call github,qbee-io,qbee-agent,$(QBEE_AGENT_VERSION))
> +QBEE_AGENT_LICENSE = Apache-2.0
> +QBEE_AGENT_LICENSE_FILES = LICENSE
> +
> +QBEE_AGENT_COMMIT_ID = c30d43b8e64cfef960cee9475b58ae083e4ad246
> +
> +QBEE_AGENT_GOMOD = go.qbee.io/agent
> +
> +QBEE_AGENT_LDFLAGS = -s -w \
> +	-X $(QBEE_AGENT_GOMOD)/app.Version=$(QBEE_AGENT_VERSION) \
> +	-X $(QBEE_AGENT_GOMOD)/app.Commit=$(QBEE_AGENT_COMMIT_ID)
> +
> +define QBEE_AGENT_INSTALL_TARGET_CMDS
> +	$(INSTALL) -m 0755 $(@D)/bin/qbee-agent $(TARGET_DIR)/usr/bin/qbee-agent
> +	$(INSTALL) -D -m 0600 $(@D)/package/share/ssl/ca.cert $(TARGET_DIR)/etc/qbee/ppkeys/ca.cert
> +endef

As suggested by Yann E. Morin in a previous iteration, I dropped the
installation of the binary from there, and turned this into a
post-install target hook. Indeed, the golang-package infrastructure
already takes care of installing the binary.

Thanks a lot!

Thomas
-- 
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

  reply	other threads:[~2024-05-12 10:05 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-05  9:38 [Buildroot] [PATCH 0/1] package/qbee-agent: new package Jon Henrik Bjørnstad via buildroot
2024-03-05  9:38 ` [Buildroot] [PATCH 1/1] " Jon Henrik Bjørnstad via buildroot
2024-05-12 10:05   ` Thomas Petazzoni via buildroot [this message]
2024-05-16 11:00     ` Jon Henrik Bjørnstad via buildroot
  -- strict thread matches above, loose matches on Subject: below --
2023-11-10 10:45 Jon Henrik Bjørnstad via buildroot
2023-11-10 14:35 ` yann.morin
2023-11-10 17:14 ` Christian Stewart via buildroot
2023-11-10 19:28   ` Arnout Vandecappelle via buildroot
2023-11-11  8:35     ` Yann E. MORIN
2023-11-09 14:20 [Buildroot] [PATCH 0/1] Regarding review of qbee-agent patch Jon Henrik Bjørnstad via buildroot
2023-11-09 14:20 ` [Buildroot] [PATCH 1/1] package/qbee-agent: new package Jon Henrik Bjørnstad via buildroot
2023-11-09 16:03   ` yann.morin
2023-11-10  8:43     ` Jon Henrik Bjørnstad via buildroot
2023-11-10  9:39       ` yann.morin
2023-11-09  8:09 Jon Henrik Bjørnstad via buildroot
2023-11-09 10:25 ` Thomas Petazzoni via buildroot
2023-11-10 18:56   ` Arnout Vandecappelle via buildroot
2023-11-13  9:06     ` Thomas Petazzoni via buildroot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240512120544.002e958a@windsurf \
    --to=buildroot@buildroot.org \
    --cc=anisse@astier.eu \
    --cc=christian@aperture.us \
    --cc=jonhenrik@qbee.io \
    --cc=thomas.petazzoni@bootlin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.