package/mender/mender.mk: fix license list
PATCH 1/1 package/mender/mender.mk: fix license list
The license files were updated in the .hash file, but not in the .mk file.
Fixes:
http://autobuild.buildroot.org/results/42c2987e5cf2bb8918f7fdbd8303951f34b8ead1
--- package/mender/mender.mk | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-)
package/mender/mender.mk +6 -3
@@ -14,18 +14,20 @@ MENDER_LICENSE = Apache-2.0, BSD-2-Clause, BSD-3-Clause, ISC, MIT, OLDAP-2.8 MENDER_LICENSE_FILES = \ LICENSE \ LIC_FILES_CHKSUM.sha256 \ - vendor/github.com/mendersoftware/mendertesting/LICENSE \ vendor/github.com/mendersoftware/mender-artifact/LICENSE \ vendor/github.com/mendersoftware/openssl/LICENSE \ + vendor/github.com/minio/sha256-simd/LICENSE \ + vendor/github.com/mendersoftware/progressbar/LICENSE \ vendor/github.com/pkg/errors/LICENSE \ + vendor/github.com/godbus/dbus/LICENSE \ + vendor/github.com/klauspost/compress/LICENSE \ vendor/github.com/pmezard/go-difflib/LICENSE \ vendor/golang.org/x/crypto/LICENSE \ vendor/golang.org/x/sys/LICENSE \ - vendor/golang.org/x/net/LICENSE \ vendor/github.com/bmatsuo/lmdb-go/LICENSE.md \ - vendor/golang.org/x/text/LICENSE \ vendor/github.com/remyoudompheng/go-liblzma/LICENSE \ vendor/github.com/davecgh/go-spew/LICENSE \ + vendor/github.com/klauspost/pgzip/LICENSE \ vendor/github.com/sirupsen/logrus/LICENSE \ vendor/github.com/stretchr/testify/LICENSE \ vendor/github.com/ungerik/go-sysfs/LICENSE \
@@ -33,6 +35,7 @@ MENDER_LICENSE_FILES = \ vendor/github.com/stretchr/objx/LICENSE \ vendor/github.com/konsorten/go-windows-terminal-sequences/LICENSE \ vendor/gopkg.in/yaml.v3/LICENSE \ + vendor/github.com/mattn/go-isatty/LICENSE \ vendor/github.com/bmatsuo/lmdb-go/LICENSE.mdb.md MENDER_DEPENDENCIES = host-pkgconf openssl xz
Signature · 1 line
2.30.2
PATCH 1/1 package/mender: make xz optional
According to the README.md file, xz is optional.
- Remove the dependency on the xz package.
- If the xz package is not selected, add "nolzma" to MENDER_TAGS
--- package/mender/Config.in | 1 - package/mender/mender.mk | 8 +++++++- 2 files changed, 7 insertions(+), 2 deletions(-)
package/mender/Config.in +0 -1
@@ -4,7 +4,6 @@ config BR2_PACKAGE_MENDER depends on BR2_PACKAGE_HOST_GO_TARGET_CGO_LINKING_SUPPORTS depends on BR2_TOOLCHAIN_HAS_THREADS select BR2_PACKAGE_OPENSSL - select BR2_PACKAGE_XZ help Mender is an open source over-the-air (OTA) software updater for embedded Linux devices. Mender comprises a client
package/mender/mender.mk +7 -1
@@ -38,7 +38,7 @@ MENDER_LICENSE_FILES = \ vendor/github.com/mattn/go-isatty/LICENSE \ vendor/github.com/bmatsuo/lmdb-go/LICENSE.mdb.md -MENDER_DEPENDENCIES = host-pkgconf openssl xz +MENDER_DEPENDENCIES = host-pkgconf openssl MENDER_LDFLAGS = -X github.com/mendersoftware/mender/conf.Version=$(MENDER_VERSION)
@@ -81,6 +81,12 @@ endef MENDER_POST_INSTALL_TARGET_HOOKS += MENDER_INSTALL_CONFIG_FILES +ifeq ($(BR2_PACKAGE_XZ),y) +MENDER_DEPENDENCIES += xz +else +MENDER_TAGS += nolzma +endif + ifeq ($(BR2_PACKAGE_DBUS),y) define MENDER_INSTALL_DBUS_AUTHENTICATION_MANAGER_CONF $(INSTALL) -D -m 0755 $(@D)/support/dbus/io.mender.AuthenticationManager.conf \
Signature · 1 line
2.30.2
PATCH 1/1 package/mender: make xz optional
Adam, All,
On 2021-04-01 08:44 -0700, Adam Duskett spake thusly:
Quoted 6 lines
According to the README.md file, xz is optional.
- Remove the dependency on the xz package.
- If the xz package is not selected, add "nolzma" toMENDER_TAGSSigned-off-by Adam Duskett <[email protected]>---
[--SNIP--]
package/mender/mender.mk
Quoted 4 lines
package/mender/mender.mk +0
-0
[--SNIP--]
package/mender/mender.mk endef · line 87
Quoted 8 lines
package/mender/mender.mk +4
-0@@ -81,6 +81,12 @@ endef MENDER_POST_INSTALL_TARGET_HOOKS += MENDER_INSTALL_CONFIG_FILES +ifeq ($(BR2_PACKAGE_XZ),y) +MENDER_DEPENDENCIES += xz +else +MENDER_TAGS += nolzma
FOO_TAGS is supposed to be a comma-separated list (but see later):
https://golang.org/cmd/go/#hdr-Compile_packages_and_dependencies
-tags tag,list
a comma-separated list of build tags to consider satisfied during the build. For more information about build tags, see the description of build constraints in the documentation for the go/build package. (Earlier versions of Go used a space-separated list, and that form is deprecated but still recognized.)
However, the += assignment operator in Makefile will create a space-separated list. So when we have neither xz nor dbus, we'll get:
MENDER_TAGS=nolzma nodbus
which is pased -as-is to the go build command:
https://git.buildroot.org/buildroot/tree/package/pkg-golang.mk#n45 $(2)_BUILD_OPTS += \ -ldflags "$$($(2)_LDFLAGS)" \ -tags "$$($(2)_TAGS)" \ -trimpath \ -p $(PARALLEL_JOBS)
So, even though the space-separated list is still supported, we should switch over to the comma-separated list.
Either we require that packages do provide such a comma-seprated list, or we do it in the infra, with something along those lines:
diff --git a/package/pkg-golang.mk b/package/pkg-golang.mk
index d07242310d..bfa1a9e9ce 100644
--- a/package/pkg-golang.mk
+++ b/package/pkg-golang.mk
@@ -42,7 +42,7 @@ define inner-golang-package
$(2)_BUILD_OPTS += \
-ldflags "$$($(2)_LDFLAGS)" \
- -tags "$$($(2)_TAGS)" \
+ -tags "$$(subst $(space),$(comma),$$(strip $$($(2)_TAGS)))" \
-trimpath \
-p $(PARALLEL_JOBS)Note that we still need to quote, in case there is no tag, and we need to strip in case FOO_TAGS contains expansions itself, like
FOO_TAGS = $(FOO_TAG_BLARK_MAYBE) $(FOO_TAG_MEH_MOSTLY)
Care to look further into that, please?
Regards,
Yann E. MORIN.
Quoted 12 lines
package/mender/mender.mk +2
-0+endif + ifeq ($(BR2_PACKAGE_DBUS),y) define MENDER_INSTALL_DBUS_AUTHENTICATION_MANAGER_CONF $(INSTALL) -D -m 0755 $(@D)/support/dbus/io.mender.AuthenticationManager.conf \Signature · 6 lines
2.30.2 _______________________________________________ buildroot mailing list buildroot at busybox.net http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------'
PATCH 1/1 package/mender: add nodbus to tags if dbus is not selected
In reply to Adam DuskettThe README.md file suggests passing "nodbus" as a tag if dbus is not selected.
--- package/mender/mender.mk | 2 ++ 1 file changed, 2 insertions(+)
package/mender/mender.mk +2 -0
@@ -93,6 +93,8 @@ define MENDER_INSTALL_DBUS_AUTHENTICATION_MANAGER_CONF $(TARGET_DIR)/etc/dbus-1/system.d/io.mender.AuthenticationManager.conf endef MENDER_POST_INSTALL_TARGET_HOOKS += MENDER_INSTALL_DBUS_AUTHENTICATION_MANAGER_CONF +else +MENDER_TAGS += nodbus endif define MENDER_INSTALL_INIT_SYSTEMD
Signature · 1 line
2.30.2
PATCH 1/1 package/mender: add nodbus to tags if dbus is not selected
Quoted 3 lines · On Thu, 1 Apr 2021 08:44:53 -0700 Adam Duskett <[email protected]> wrote:
The README.md file suggests passing "nodbus" as a tag if dbus is not selected.
Signed-off-by Adam Duskett <[email protected]>
Interesting. What does it do, if D-Bus is not a build dependency, what there is to enable/disable within the Mender code base?
Thanks!
Thomas
Signature · 3 lines
Thomas Petazzoni, co-owner and CEO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com
PATCH 1/1 package/mender: add nodbus to tags if dbus is not selected
Hey Thomas;
It looks like passing nodbus disables building the following files:
./dbus/dbus_libgio_helpers.go
./dbus/error.go
./dbus/dbus_libgio_test.go
./dbus/dbus_libgio.go
./dbus/dbus_test.go
./dbus/error_test.go
It also looks like if dbus isn't found, config.DBus.Enabled is set to false in config.go. Although it's probably better to err on the side of caution and follow the README.md's instructions yeah?
Adam
Quoted 18 lines · Thomas Petazzoni
Quoted 3 lines · On Thu, 1 Apr 2021 08:44:53 -0700 Adam Duskett <[email protected]> wrote:
The README.md file suggests passing "nodbus" as a tag if dbus is not selected.
Signed-off-by Adam Duskett <[email protected]>Interesting. What does it do, if D-Bus is not a build dependency, what there is to enable/disable within the Mender code base?
Thanks!
Thomas
--
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
PATCH 1/1 package/mender/mender.mk: fix license list
In reply to Adam DuskettAdam, All,
On 2021-04-01 08:44 -0700, Adam Duskett spake thusly:
Quoted 5 lines
The license files were updated in the .hash file, but not in the .mk file.
Fixes:
http://autobuild.buildroot.org/results/42c2987e5cf2bb8918f7fdbd8303951f34b8ead1Signed-off-by Adam Duskett <[email protected]>
Series of three patches applied to master, thanks.
Regards,
Yann E. MORIN.
Quoted 47 lines
--- package/mender/mender.mk | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-)package/mender/mender.mk +6
-3@@ -14,18 +14,20 @@ MENDER_LICENSE = Apache-2.0, BSD-2-Clause, BSD-3-Clause, ISC, MIT, OLDAP-2.8 MENDER_LICENSE_FILES = \ LICENSE \ LIC_FILES_CHKSUM.sha256 \ - vendor/github.com/mendersoftware/mendertesting/LICENSE \ vendor/github.com/mendersoftware/mender-artifact/LICENSE \ vendor/github.com/mendersoftware/openssl/LICENSE \ + vendor/github.com/minio/sha256-simd/LICENSE \ + vendor/github.com/mendersoftware/progressbar/LICENSE \ vendor/github.com/pkg/errors/LICENSE \ + vendor/github.com/godbus/dbus/LICENSE \ + vendor/github.com/klauspost/compress/LICENSE \ vendor/github.com/pmezard/go-difflib/LICENSE \ vendor/golang.org/x/crypto/LICENSE \ vendor/golang.org/x/sys/LICENSE \ - vendor/golang.org/x/net/LICENSE \ vendor/github.com/bmatsuo/lmdb-go/LICENSE.md \ - vendor/golang.org/x/text/LICENSE \ vendor/github.com/remyoudompheng/go-liblzma/LICENSE \ vendor/github.com/davecgh/go-spew/LICENSE \ + vendor/github.com/klauspost/pgzip/LICENSE \ vendor/github.com/sirupsen/logrus/LICENSE \ vendor/github.com/stretchr/testify/LICENSE \ vendor/github.com/ungerik/go-sysfs/LICENSE \@@ -33,6 +35,7 @@ MENDER_LICENSE_FILES = \ vendor/github.com/stretchr/objx/LICENSE \ vendor/github.com/konsorten/go-windows-terminal-sequences/LICENSE \ vendor/gopkg.in/yaml.v3/LICENSE \ + vendor/github.com/mattn/go-isatty/LICENSE \ vendor/github.com/bmatsuo/lmdb-go/LICENSE.mdb.md MENDER_DEPENDENCIES = host-pkgconf openssl xzSignature · 6 lines
2.30.2 _______________________________________________ buildroot mailing list buildroot at busybox.net http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------'