Skip to contentSkip to conversation

mender-artifact support

PATCH Superseded Mirza Krak 3 participants 11 messages Aug 26, 2018 – Sep 5, 2018

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Mirza Krak

author
#0 lore raw

cover mender-artifact support

First patch adds "host" support in pkg-golang.mk.

Second patch adds a new package, mender-artifact. This is a host tool to generate update images in Mender Artifact format compatible with Mender client and the Mender server. More information about the Mender artifact format can be found here:

https://github.com/mendersoftware/mender-artifact/blob/master/Documentation/artifact-format.md

Third patch adds the mender-artifact package to Mirza Krak in DEVELOPERS.

Patch 2-3 depend on:

package/pkg-golang: add support for host target

Mirza Krak (3):
package/pkg-golang: add support for host target
package/mender-artifact: initial support
DEVELOPERS: add mender-artifact to Mirza Krak

 DEVELOPERS                                   |  1 +
 package/Config.in.host                       |  1 +
 package/mender-artifact/Config.in.host       |  7 +++++
 package/mender-artifact/mender-artifact.hash | 29 +++++++++++++++++++++
 package/mender-artifact/mender-artifact.mk   | 21 +++++++++++++++
 package/pkg-golang.mk                        | 38 ++++++++++++++++++++++++----
 6 files changed, 92 insertions(+), 5 deletions(-)
 create mode 100644 package/mender-artifact/Config.in.host
 create mode 100644 package/mender-artifact/mender-artifact.hash
 create mode 100644 package/mender-artifact/mender-artifact.mk

--
2.11.0

author
#1 lore raw

PATCH 1/3 package/pkg-golang: add support for host target

With this you can add:

    $(eval $(host-golang-package))

to a package .mk file to build for host.

---
 package/pkg-golang.mk | 38 +++++++++++++++++++++++++++++++++-----
 1 file changed, 33 insertions(+), 5 deletions(-)
package/pkg-golang.mk +33 -5
index 6eacd14180..7d9956378f 100644
@@ -23,10 +23,13 @@
 
 GO_BIN = $(HOST_DIR)/bin/go
 
-# We pass an empty GOBIN, otherwise "go install: cannot install
-# cross-compiled binaries when GOBIN is set"
 GO_TARGET_ENV = \
 	$(HOST_GO_TARGET_ENV) \
+	$(GO_HOST_ENV)
+
+# We pass an empty GOBIN, otherwise "go install: cannot install
+# cross-compiled binaries when GOBIN is set"
+GO_HOST_ENV = \
 	PATH=$(BR_PATH) \
 	GOBIN= \
 	CGO_ENABLED=$(HOST_GO_CGO_ENABLED)
@@ -44,7 +47,6 @@ GO_TARGET_ENV = \
 #             packages
 #  argument 4 is the type (target or host)
 #
-# NOTE Only type target is supported at the moment
 ################################################################################
 
 define inner-golang-package
@@ -96,6 +98,9 @@ endif
 # Build step. Only define it if not already defined by the package .mk
 # file.
 ifndef $(2)_BUILD_CMDS
+ifeq ($(4),target)
+
+# Build package for target
 define $(2)_BUILD_CMDS
 	$$(foreach d,$$($(2)_BUILD_TARGETS),\
 		cd $$($(2)_SRC_PATH); \
@@ -107,10 +112,23 @@ define $(2)_BUILD_CMDS
 			./$$(d)
 	)
 endef
+else
+	# Build package for host
+define $(2)_BUILD_CMDS
+	$$(foreach d,$$($(2)_BUILD_TARGETS),\
+		cd $$($(2)_SRC_PATH); \
+		$$(GO_HOST_ENV) \
+			GOPATH="$$(@D)/$$($(2)_WORKSPACE)" \
+			$$($(2)_GO_ENV) \
+			$$(GO_BIN) build -v $$($(2)_BUILD_OPTS) \
+			-o $$(@D)/bin/$$(or $$($(2)_BIN_NAME),$$(notdir $$(d))) \
+			./$$(d)
+	)
+endef
+endif
 endif
 
-# Target installation step. Only define it if not already defined by the
-# package .mk file.
+# Target installation step
 ifndef $(2)_INSTALL_TARGET_CMDS
 define $(2)_INSTALL_TARGET_CMDS
 	$$(foreach d,$$($(2)_INSTALL_BINS),\
@@ -119,6 +137,15 @@ define $(2)_INSTALL_TARGET_CMDS
 endef
 endif
 
+# Host installation step
+ifndef $(2)_INSTALL_CMDS
+define $(2)_INSTALL_CMDS
+	$$(foreach d,$$($(2)_INSTALL_BINS),\
+		$(INSTALL) -D -m 0755 $$(@D)/bin/$$(d) $(HOST_DIR)/usr/bin/$$(d)
+	)
+endef
+endif
+
 # Call the generic package infrastructure to generate the necessary make
 # targets
 $(call inner-generic-package,$(1),$(2),$(3),$(4))
@@ -130,3 +157,4 @@ endef # inner-golang-package
 ################################################################################
 
 golang-package = $(call inner-golang-package,$(pkgname),$(call UPPERCASE,$(pkgname)),$(call UPPERCASE,$(pkgname)),target)
+host-golang-package = $(call inner-golang-package,host-$(pkgname),$(call UPPERCASE,host-$(pkgname)),$(call UPPERCASE,$(pkgname)),host)
Signature · 1 line
2.11.0
#2 lore raw

PATCH 1/3 package/pkg-golang: add support for host target

Hello Mirza,

Quoted 7 lines · Mirza Krak

With this you can add:

    $(eval $(host-golang-package))

to a package .mk file to build for host.

Thanks for this contribution! I believe the title should be improved, because "host target" is a bit confusion. Perhaps:

package/pkg-golang: add support for building host packages

This commit also needs a small update to the Buildroot manual, to add something like "The ability to build host packages is also available, with the host-golang-package macro."

Quoted 9 lines
---
 package/pkg-golang.mk | 38 +++++++++++++++++++++++++++++++++-----
 1 file changed, 33 insertions(+), 5 deletions(-)
package/pkg-golang.mk +0 -0
index 6eacd14180..7d9956378f 100644

package/pkg-golang.mk line 28

Quoted 8 lines
package/pkg-golang.mk +1 -2
@@ -23,10 +23,13 @@
 
 GO_BIN = $(HOST_DIR)/bin/go
 
-# We pass an empty GOBIN, otherwise "go install: cannot install
-# cross-compiled binaries when GOBIN is set"
 GO_TARGET_ENV = \
 	$(HOST_GO_TARGET_ENV) \
+	$(GO_HOST_ENV)

I think it's a bit weird and dangerous to re-use GO_HOST_ENV in GO_TARGET_ENV. Indeed, there is the risk that we add something host-specific, and it will be re-used for both target and host.

So either your duplicate the definitions (which is reasonable if they aren't a lot of them), or you add something like GO_COMMON_ENV, re-used between target and host.

package/pkg-golang.mk endif · line 102

Quoted 7 lines
package/pkg-golang.mk +2 -0
 define inner-golang-package
@@ -96,6 +98,9 @@ endif
 # Build step. Only define it if not already defined by the package .mk
 # file.
 ifndef $(2)_BUILD_CMDS
+ifeq ($(4),target)
+

Drop this empty line.

package/pkg-golang.mk define $(2)_BUILD_CMDS · line 116

Quoted 10 lines
package/pkg-golang.mk +3 -0
+# Build package for target
 define $(2)_BUILD_CMDS
 	$$(foreach d,$$($(2)_BUILD_TARGETS),\
 		cd $$($(2)_SRC_PATH); \
@@ -107,10 +112,23 @@ define $(2)_BUILD_CMDS
 			./$$(d)
 	)
 endef
+else
+	# Build package for host

Don't indent this comment.

Quoted 6 lines
package/pkg-golang.mk +6 -0
+define $(2)_BUILD_CMDS
+	$$(foreach d,$$($(2)_BUILD_TARGETS),\
+		cd $$($(2)_SRC_PATH); \
+		$$(GO_HOST_ENV) \
+			GOPATH="$$(@D)/$$($(2)_WORKSPACE)" \
+			$$($(2)_GO_ENV) \

package/pkg-golang.mk define $(2)_BUILD_CMDS · line 113

Quoted 10 lines
package/pkg-golang.mk +6 -2
+			$$(GO_BIN) build -v $$($(2)_BUILD_OPTS) \
+			-o $$(@D)/bin/$$(or $$($(2)_BIN_NAME),$$(notdir $$(d))) \
+			./$$(d)
+	)
+endef
+endif
 endif
 
-# Target installation step. Only define it if not already defined by the
-# package .mk file.

Why are you changing this comment ?

package/pkg-golang.mk define $(2)_INSTALL_TARGET_CMDS · line 144

Quoted 13 lines
package/pkg-golang.mk +6 -0
+# Target installation step
 ifndef $(2)_INSTALL_TARGET_CMDS
 define $(2)_INSTALL_TARGET_CMDS
 	$$(foreach d,$$($(2)_INSTALL_BINS),\
@@ -119,6 +137,15 @@ define $(2)_INSTALL_TARGET_CMDS
 endef
 endif
 
+# Host installation step
+ifndef $(2)_INSTALL_CMDS
+define $(2)_INSTALL_CMDS
+	$$(foreach d,$$($(2)_INSTALL_BINS),\
+		$(INSTALL) -D -m 0755 $$(@D)/bin/$$(d) $(HOST_DIR)/usr/bin/$$(d)

Install in $(HOST_DIR)/bin, not $(HOST_DIR)/usr/bin. We no longer use $(HOST_DIR)/usr/bin in fact, and $(HOST_DIR)/usr is a symlink to $(HOST_DIR).

Thanks!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#3 lore raw

PATCH 1/3 package/pkg-golang: add support for host target

Hi Mirza,

Quoted 11 lines · Thomas Petazzoni

Hello Mirza,

Quoted 7 lines · Mirza Krak

With this you can add:

    $(eval $(host-golang-package))

to a package .mk file to build for host.

Quoted 8 lines

Thanks for this contribution! I believe the title should be improved, because "host target" is a bit confusion. Perhaps:

package/pkg-golang: add support for building host packages

This commit also needs a small update to the Buildroot manual, to add something like "The ability to build host packages is also available, with the host-golang-package macro."

Could you repost this patch? I found it very useful and I think you could post it sooner than the rest of the series.

Thanks!

Quoted 99 lines
Quoted 10 lines
---
 package/pkg-golang.mk | 38 +++++++++++++++++++++++++++++++++-----
 1 file changed, 33 insertions(+), 5 deletions(-)
package/pkg-golang.mk +0 -0
index 6eacd14180..7d9956378f 100644

package/pkg-golang.mk line 28

Quoted 8 lines
package/pkg-golang.mk +1 -2
@@ -23,10 +23,13 @@
 
 GO_BIN = $(HOST_DIR)/bin/go
 
-# We pass an empty GOBIN, otherwise "go install: cannot install
-# cross-compiled binaries when GOBIN is set"
 GO_TARGET_ENV = \
      $(HOST_GO_TARGET_ENV) \
+     $(GO_HOST_ENV)

I think it's a bit weird and dangerous to re-use GO_HOST_ENV in GO_TARGET_ENV. Indeed, there is the risk that we add something host-specific, and it will be re-used for both target and host.

So either your duplicate the definitions (which is reasonable if they aren't a lot of them), or you add something like GO_COMMON_ENV, re-used between target and host.

package/pkg-golang.mk endif · line 102

Quoted 7 lines
package/pkg-golang.mk +2 -0
 define inner-golang-package
@@ -96,6 +98,9 @@ endif
 # Build step. Only define it if not already defined by the package .mk
 # file.
 ifndef $(2)_BUILD_CMDS
+ifeq ($(4),target)
+

Drop this empty line.

package/pkg-golang.mk define $(2)_BUILD_CMDS · line 116

Quoted 10 lines
package/pkg-golang.mk +3 -0
+# Build package for target
 define $(2)_BUILD_CMDS
      $$(foreach d,$$($(2)_BUILD_TARGETS),\
              cd $$($(2)_SRC_PATH); \
@@ -107,10 +112,23 @@ define $(2)_BUILD_CMDS
                      ./$$(d)
      )
 endef
+else
+     # Build package for host

Don't indent this comment.

Quoted 6 lines
package/pkg-golang.mk +6 -0
+define $(2)_BUILD_CMDS
+     $$(foreach d,$$($(2)_BUILD_TARGETS),\
+             cd $$($(2)_SRC_PATH); \
+             $$(GO_HOST_ENV) \
+                     GOPATH="$$(@D)/$$($(2)_WORKSPACE)" \
+                     $$($(2)_GO_ENV) \

package/pkg-golang.mk define $(2)_BUILD_CMDS · line 113

Quoted 10 lines
package/pkg-golang.mk +6 -2
+                     $$(GO_BIN) build -v $$($(2)_BUILD_OPTS) \
+                     -o $$(@D)/bin/$$(or $$($(2)_BIN_NAME),$$(notdir $$(d))) \
+                     ./$$(d)
+     )
+endef
+endif
 endif
 
-# Target installation step. Only define it if not already defined by the
-# package .mk file.

Why are you changing this comment ?

package/pkg-golang.mk define $(2)_INSTALL_TARGET_CMDS · line 144

Quoted 13 lines
package/pkg-golang.mk +6 -0
+# Target installation step
 ifndef $(2)_INSTALL_TARGET_CMDS
 define $(2)_INSTALL_TARGET_CMDS
      $$(foreach d,$$($(2)_INSTALL_BINS),\
@@ -119,6 +137,15 @@ define $(2)_INSTALL_TARGET_CMDS
 endef
 endif
 
+# Host installation step
+ifndef $(2)_INSTALL_CMDS
+define $(2)_INSTALL_CMDS
+     $$(foreach d,$$($(2)_INSTALL_BINS),\
+             $(INSTALL) -D -m 0755 $$(@D)/bin/$$(d) $(HOST_DIR)/usr/bin/$$(d)

Install in $(HOST_DIR)/bin, not $(HOST_DIR)/usr/bin. We no longer use $(HOST_DIR)/usr/bin in fact, and $(HOST_DIR)/usr is a symlink to $(HOST_DIR).

Thanks!

Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot

#4 lore raw

PATCH 1/3 package/pkg-golang: add support for host target

Hi Mirza,

Quoted 18 lines · Angelo Compagnucci

Hi Mirza,

Quoted 14 lines · Thomas Petazzoni

Hello Mirza,

Quoted 7 lines · Mirza Krak

With this you can add:

    $(eval $(host-golang-package))

to a package .mk file to build for host.

Thanks for this contribution! I believe the title should be improved, because "host target" is a bit confusion. Perhaps:

Quoted 8 lines
Quoted 5 lines

package/pkg-golang: add support for building host packages

This commit also needs a small update to the Buildroot manual, to add something like "The ability to build host packages is also available, with the host-golang-package macro."

Could you repost this patch? I found it very useful and I think you could post it sooner than the rest of the series.

Just found your patch repost, sorry for the noise!

Thanks!

Quoted 102 lines

Thanks!

Quoted 99 lines
Quoted 10 lines
---
 package/pkg-golang.mk | 38 +++++++++++++++++++++++++++++++++-----
 1 file changed, 33 insertions(+), 5 deletions(-)
package/pkg-golang.mk +0 -0
index 6eacd14180..7d9956378f 100644

package/pkg-golang.mk line 28

Quoted 8 lines
package/pkg-golang.mk +1 -2
@@ -23,10 +23,13 @@
 
 GO_BIN = $(HOST_DIR)/bin/go
 
-# We pass an empty GOBIN, otherwise "go install: cannot install
-# cross-compiled binaries when GOBIN is set"
 GO_TARGET_ENV = \
      $(HOST_GO_TARGET_ENV) \
+     $(GO_HOST_ENV)

I think it's a bit weird and dangerous to re-use GO_HOST_ENV in GO_TARGET_ENV. Indeed, there is the risk that we add something host-specific, and it will be re-used for both target and host.

So either your duplicate the definitions (which is reasonable if they aren't a lot of them), or you add something like GO_COMMON_ENV, re-used between target and host.

package/pkg-golang.mk endif · line 102

Quoted 7 lines
package/pkg-golang.mk +2 -0
 define inner-golang-package
@@ -96,6 +98,9 @@ endif
 # Build step. Only define it if not already defined by the package .mk
 # file.
 ifndef $(2)_BUILD_CMDS
+ifeq ($(4),target)
+

Drop this empty line.

package/pkg-golang.mk define $(2)_BUILD_CMDS · line 116

Quoted 10 lines
package/pkg-golang.mk +3 -0
+# Build package for target
 define $(2)_BUILD_CMDS
      $$(foreach d,$$($(2)_BUILD_TARGETS),\
              cd $$($(2)_SRC_PATH); \
@@ -107,10 +112,23 @@ define $(2)_BUILD_CMDS
                      ./$$(d)
      )
 endef
+else
+     # Build package for host

Don't indent this comment.

Quoted 6 lines
package/pkg-golang.mk +6 -0
+define $(2)_BUILD_CMDS
+     $$(foreach d,$$($(2)_BUILD_TARGETS),\
+             cd $$($(2)_SRC_PATH); \
+             $$(GO_HOST_ENV) \
+                     GOPATH="$$(@D)/$$($(2)_WORKSPACE)" \
+                     $$($(2)_GO_ENV) \

package/pkg-golang.mk define $(2)_BUILD_CMDS · line 113

Quoted 10 lines
package/pkg-golang.mk +6 -2
+                     $$(GO_BIN) build -v $$($(2)_BUILD_OPTS) \
+                     -o $$(@D)/bin/$$(or $$($(2)_BIN_NAME),$$(notdir $$(d))) \
+                     ./$$(d)
+     )
+endef
+endif
 endif
 
-# Target installation step. Only define it if not already defined by the
-# package .mk file.

Why are you changing this comment ?

package/pkg-golang.mk define $(2)_INSTALL_TARGET_CMDS · line 144

Quoted 13 lines
package/pkg-golang.mk +6 -0
+# Target installation step
 ifndef $(2)_INSTALL_TARGET_CMDS
 define $(2)_INSTALL_TARGET_CMDS
      $$(foreach d,$$($(2)_INSTALL_BINS),\
@@ -119,6 +137,15 @@ define $(2)_INSTALL_TARGET_CMDS
 endef
 endif
 
+# Host installation step
+ifndef $(2)_INSTALL_CMDS
+define $(2)_INSTALL_CMDS
+     $$(foreach d,$$($(2)_INSTALL_BINS),\
+             $(INSTALL) -D -m 0755 $$(@D)/bin/$$(d) $(HOST_DIR)/usr/bin/$$(d)

Install in $(HOST_DIR)/bin, not $(HOST_DIR)/usr/bin. We no longer use $(HOST_DIR)/usr/bin in fact, and $(HOST_DIR)/usr is a symlink to $(HOST_DIR).

Thanks!

Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot

author
#5 lore raw

PATCH 2/3 package/mender-artifact: initial support

In reply to Mirza Krak

mender-artifact is a host tool to generate update images in the Mender artifact file format.

See https://github.com/mendersoftware/mender-artifact for more information about the format and the tool.

---
 package/Config.in.host                       |  1 +
 package/mender-artifact/Config.in.host       |  7 +++++++
 package/mender-artifact/mender-artifact.hash | 29 ++++++++++++++++++++++++++++
 package/mender-artifact/mender-artifact.mk   | 21 ++++++++++++++++++++
 4 files changed, 58 insertions(+)
 create mode 100644 package/mender-artifact/Config.in.host
 create mode 100644 package/mender-artifact/mender-artifact.hash
 create mode 100644 package/mender-artifact/mender-artifact.mk
package/Config.in.host +1 -0
index 7838ffc219..2b85d2b189 100644
@@ -30,6 +30,7 @@ menu "Host utilities"
 	source "package/jsmin/Config.in.host"
 	source "package/lpc3250loader/Config.in.host"
 	source "package/lttng-babeltrace/Config.in.host"
+	source "package/mender-artifact/Config.in.host"
 	source "package/mfgtools/Config.in.host"
 	source "package/mkpasswd/Config.in.host"
 	source "package/mtd/Config.in.host"
package/mender-artifact/Config.in.host new file +7 -0
new file mode 100644
index 0000000000..bb03e96018
@@ -0,0 +1,7 @@
+config BR2_PACKAGE_HOST_MENDER_ARTIFACT
+    depends on BR2_PACKAGE_HOST_GO_ARCH_SUPPORTS
+    depends on BR2_PACKAGE_HOST_GO_CGO_LINKING_SUPPORTS
+    depends on BR2_TOOLCHAIN_HAS_THREADS
+    bool "host mender-artifact"
+    help
+      Mender image artifact tool
package/mender-artifact/mender-artifact.hash new file +29 -0
new file mode 100644
index 0000000000..af003fe7de
@@ -0,0 +1,29 @@
+# Locally computed:
+sha256 2a0322d8707c8ea7cada12c8f96144382264c898cadc35e8058bb9ea6bf8b041 mender-artifact-2.2.0.tar.gz
+
+# License, locally computed
+
+
+# Vendor licenses
+# Generated with sed '/^[A-Za-z0-9_]/s/^/sha256  /' LIC_FILES_CHKSUM.sha256
+
+# Apache-2.0 license.
+sha256 b40930bbcf80744c86c46a12bc9da056641d722716c378f5659b9e555ef833e1 LICENSE
+sha256 ceb1b36ff073bd13d9806d4615b931707768ca9023805620acc32dd1cfc2f680 vendor/github.com/mendersoftware/mendertesting/LICENSE
+
+# BSD 2 Clause licenses.
+sha256 8d427fd87bc9579ea368fde3d49f9ca22eac857f91a9dec7e3004bdfab7dee86 vendor/github.com/pkg/errors/LICENSE
+
+# BSD 3 Clause licenses.
+sha256 2eb550be6801c1ea434feba53bf6d12e7c71c90253e0a9de4a4f46cf88b56477 vendor/github.com/pmezard/go-difflib/LICENSE
+
+# ISC licenses.
+sha256 3525392c6db3b804af76980b2c560ee9ec1abdadd907d76a26091df7c78f3a25 vendor/github.com/davecgh/go-spew/LICENSE
+
+# MIT licenses.
+sha256 402f39eed8a1851385d0703999aa9f23d067c2ea3e15c63c074e389cbf8f8f8f vendor/github.com/stretchr/testify/LICENSE
+sha256 402f39eed8a1851385d0703999aa9f23d067c2ea3e15c63c074e389cbf8f8f8f vendor/github.com/stretchr/testify/LICENCE.txt
+sha256 da277af11b85227490377fbcac6afccc68be560c4fff36ac05ca62de55345fd7 vendor/github.com/urfave/cli/LICENSE
+
+# sha256 of all the vendor licenses combined
+sha256 a9d3dea05c34f2bf7eb3fa677dafe09e9a80edd024cb31da750616c10f2bbcbb LIC_FILES_CHKSUM.sha256
package/mender-artifact/mender-artifact.mk new file +21 -0
new file mode 100644
index 0000000000..590895de8c
@@ -0,0 +1,21 @@
+################################################################################
+#
+# mender-artifact
+#
+################################################################################
+
+MENDER_ARTIFACT_VERSION = 2.2.0
+MENDER_ARTIFACT_SITE = $(call github,mendersoftware,mender-artifact,$(MENDER_ARTIFACT_VERSION))
+MENDER_ARTIFACT_LICENSE = Apache-2.0, BSD-2-Clause, BSD-3-Clause, ISC, MIT
+MENDER_ARTIFACT_LICENSE_FILES = \
+	LICENSE \
+	LIC_FILES_CHKSUM.sha256 \
+	vendor/github.com/mendersoftware/mendertesting/LICENSE \
+	vendor/github.com/pkg/errors/LICENSE \
+	vendor/github.com/pmezard/go-difflib/LICENSE \
+	vendor/github.com/davecgh/go-spew/LICENSE \
+	vendor/github.com/stretchr/testify/LICENSE \
+	vendor/github.com/stretchr/testify/LICENCE.txt \
+	vendor/github.com/urfave/cli/LICENSE
+
+$(eval $(host-golang-package))
Signature · 1 line
2.11.0
#6 lore raw

PATCH 2/3 package/mender-artifact: initial support

Hello,

Quoted 7 lines · Mirza Krak

mender-artifact is a host tool to generate update images in the Mender artifact file format.

See https://github.com/mendersoftware/mender-artifact for more information about the format and the tool.

Great to see this being packaged!

package/mender-artifact/Config.in.host line 7

Quoted 13 lines
package/mender-artifact/Config.in.host new file +7 -0
new file mode 100644
index 0000000000..bb03e96018
@@ -0,0 +1,7 @@
+config BR2_PACKAGE_HOST_MENDER_ARTIFACT
+    depends on BR2_PACKAGE_HOST_GO_ARCH_SUPPORTS
+    depends on BR2_PACKAGE_HOST_GO_CGO_LINKING_SUPPORTS
+    depends on BR2_TOOLCHAIN_HAS_THREADS
+    bool "host mender-artifact"
+    help
+      Mender image artifact tool

Please run ./utils/check-package on this new package. You will notice that the indentation is not good, and that the "depends on" lines should go after the "bool" line.

Please add an upstream URL in the Config.in help text (see other packages).

package/mender-artifact/mender-artifact.hash line 5

Quoted 11 lines
package/mender-artifact/mender-artifact.hash new file +5 -0
new file mode 100644
index 0000000000..af003fe7de
@@ -0,0 +1,29 @@
+# Locally computed:
+sha256 2a0322d8707c8ea7cada12c8f96144382264c898cadc35e8058bb9ea6bf8b041 mender-artifact-2.2.0.tar.gz
+
+# License, locally computed
+

This comment feels a bit lonely, no ? Is it here to say that among the below license hashes, the hash of "LICENSE" was locally computed, while the hashes for the licenses in vendor/ were extracted from LIC_FILES_CHKSUM.sha256 ?

Thanks,

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
author
#7 lore raw

PATCH 2/3 package/mender-artifact: initial support

Quoted 31 lines · Thomas Petazzoni

Hello,

Quoted 7 lines · Mirza Krak

mender-artifact is a host tool to generate update images in the Mender artifact file format.

See https://github.com/mendersoftware/mender-artifact for more information about the format and the tool.

Great to see this being packaged!

package/mender-artifact/Config.in.host line 7

Quoted 13 lines
package/mender-artifact/Config.in.host new file +7 -0
new file mode 100644
index 0000000000..bb03e96018
@@ -0,0 +1,7 @@
+config BR2_PACKAGE_HOST_MENDER_ARTIFACT
+    depends on BR2_PACKAGE_HOST_GO_ARCH_SUPPORTS
+    depends on BR2_PACKAGE_HOST_GO_CGO_LINKING_SUPPORTS
+    depends on BR2_TOOLCHAIN_HAS_THREADS
+    bool "host mender-artifact"
+    help
+      Mender image artifact tool

Please run ./utils/check-package on this new package. You will notice that the indentation is not good, and that the "depends on" lines should go after the "bool" line.

Quoted 2 lines

Please add an upstream URL in the Config.in help text (see other packages).

Will do. Thanks.

Quoted 17 lines

package/mender-artifact/mender-artifact.hash line 5

Quoted 12 lines
package/mender-artifact/mender-artifact.hash new file +5 -0
new file mode 100644
index 0000000000..af003fe7de
@@ -0,0 +1,29 @@
+# Locally computed:
+sha256 2a0322d8707c8ea7cada12c8f96144382264c898cadc35e8058bb9ea6bf8b041 mender-artifact-2.2.0.tar.gz
+
+# License, locally computed
+

This comment feels a bit lonely, no ? Is it here to say that among the below license hashes, the hash of "LICENSE" was locally computed, while the hashes for the licenses in vendor/ were extracted from LIC_FILES_CHKSUM.sha256 ?

Actually the "LICENSE" sha256 can also be found in LIC_FILES_CHKSUM.sha256. So no license sums are locally computed. Will update comment to better reflect this.

Thanks.

Signature · 3 lines
Mirza Krak | Embedded Solutions Architect | https://mender.io

 Northern.tech AS | @northerntechHQ
#9 lore raw

PATCH 3/3 DEVELOPERS: add mender-artifact to Mirza Krak

Hello,

Quoted 1 line · Mirza Krak

This should be merged into PATCH 2/3.

DEVELOPERS F: package/shadowsocks-libev/ · line 1442

Quoted 13 lines
---
 DEVELOPERS | 1 +
 1 file changed, 1 insertion(+)
DEVELOPERS +1 -0
index a6d76dd9c4..b69a75fdfd 100644
@@ -1439,6 +1439,7 @@ F:	package/shadowsocks-libev/
 
 N:	Mirza Krak <[email protected]>
 F:	package/mender/
+F:  package/mender-artifact/

Please respect the indentation of the file.

Thanks,

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
author
#10 lore raw

PATCH 3/3 DEVELOPERS: add mender-artifact to Mirza Krak

Quoted 6 lines · Thomas Petazzoni

Hello,

Quoted 1 line · Mirza Krak

This should be merged into PATCH 2/3.

Will do. Thanks!

Quoted 10 lines
Quoted 10 lines
---
 DEVELOPERS | 1 +
 1 file changed, 1 insertion(+)
DEVELOPERS +0 -0
index a6d76dd9c4..b69a75fdfd 100644
@@ -1439,6 +1439,7 @@ F:      package/shadowsocks-libev/
 
Quoted 5 lines

DEVELOPERS F: package/shadowsocks-libev/ · line 1442

Quoted 3 lines
DEVELOPERS +1 -0
 N:   Mirza Krak <[email protected]>
 F:   package/mender/
+F:  package/mender-artifact/

Please respect the indentation of the file.

Doh! Will fix. Thanks!.

Signature · 3 lines
Mirza Krak | Embedded Solutions Architect | https://mender.io

 Northern.tech AS | @northerntechHQ