Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] package/mender/mender.mk: fix license list
@ 2021-04-01 15:44 Adam Duskett
  2021-04-01 15:44 ` [Buildroot] [PATCH] package/mender: make xz optional Adam Duskett
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Adam Duskett @ 2021-04-01 15:44 UTC (permalink / raw)
  To: buildroot

The license files were updated in the .hash file, but not in the .mk file.

Fixes:
http://autobuild.buildroot.org/results/42c2987e5cf2bb8918f7fdbd8303951f34b8ead1
Signed-off-by: Adam Duskett <aduskett@gmail.com>
---
 package/mender/mender.mk | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/package/mender/mender.mk b/package/mender/mender.mk
index 317e533532..794dd4be8c 100644
--- a/package/mender/mender.mk
+++ b/package/mender/mender.mk
@@ -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
-- 
2.30.2

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [Buildroot] [PATCH] package/mender: make xz optional
  2021-04-01 15:44 [Buildroot] [PATCH] package/mender/mender.mk: fix license list Adam Duskett
@ 2021-04-01 15:44 ` Adam Duskett
  2021-04-03  7:29   ` Yann E. MORIN
  2021-04-01 15:44 ` [Buildroot] [PATCH] package/mender: add nodbus to tags if dbus is not selected Adam Duskett
  2021-04-03  7:31 ` [Buildroot] [PATCH] package/mender/mender.mk: fix license list Yann E. MORIN
  2 siblings, 1 reply; 7+ messages in thread
From: Adam Duskett @ 2021-04-01 15:44 UTC (permalink / raw)
  To: buildroot

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

Signed-off-by: Adam Duskett <aduskett@gmail.com>
---
 package/mender/Config.in | 1 -
 package/mender/mender.mk | 8 +++++++-
 2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/package/mender/Config.in b/package/mender/Config.in
index accee4676a..5ac8bb1676 100644
--- a/package/mender/Config.in
+++ b/package/mender/Config.in
@@ -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
diff --git a/package/mender/mender.mk b/package/mender/mender.mk
index 794dd4be8c..1ebd5a2e83 100644
--- a/package/mender/mender.mk
+++ b/package/mender/mender.mk
@@ -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 \
-- 
2.30.2

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [Buildroot] [PATCH] package/mender: add nodbus to tags if dbus is not selected
  2021-04-01 15:44 [Buildroot] [PATCH] package/mender/mender.mk: fix license list Adam Duskett
  2021-04-01 15:44 ` [Buildroot] [PATCH] package/mender: make xz optional Adam Duskett
@ 2021-04-01 15:44 ` Adam Duskett
  2021-04-01 15:59   ` Thomas Petazzoni
  2021-04-03  7:31 ` [Buildroot] [PATCH] package/mender/mender.mk: fix license list Yann E. MORIN
  2 siblings, 1 reply; 7+ messages in thread
From: Adam Duskett @ 2021-04-01 15:44 UTC (permalink / raw)
  To: buildroot

The README.md file suggests passing "nodbus" as a tag if dbus is not selected.

Signed-off-by: Adam Duskett <aduskett@gmail.com>
---
 package/mender/mender.mk | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/package/mender/mender.mk b/package/mender/mender.mk
index 1ebd5a2e83..c2bee71d93 100644
--- a/package/mender/mender.mk
+++ b/package/mender/mender.mk
@@ -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
-- 
2.30.2

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [Buildroot] [PATCH] package/mender: add nodbus to tags if dbus is not selected
  2021-04-01 15:44 ` [Buildroot] [PATCH] package/mender: add nodbus to tags if dbus is not selected Adam Duskett
@ 2021-04-01 15:59   ` Thomas Petazzoni
  2021-04-01 16:38     ` Adam Duskett
  0 siblings, 1 reply; 7+ messages in thread
From: Thomas Petazzoni @ 2021-04-01 15:59 UTC (permalink / raw)
  To: buildroot

On Thu,  1 Apr 2021 08:44:53 -0700
Adam Duskett <aduskett@gmail.com> wrote:

> The README.md file suggests passing "nodbus" as a tag if dbus is not selected.
> 
> Signed-off-by: Adam Duskett <aduskett@gmail.com>

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Buildroot] [PATCH] package/mender: add nodbus to tags if dbus is not selected
  2021-04-01 15:59   ` Thomas Petazzoni
@ 2021-04-01 16:38     ` Adam Duskett
  0 siblings, 0 replies; 7+ messages in thread
From: Adam Duskett @ 2021-04-01 16:38 UTC (permalink / raw)
  To: buildroot

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

On Thu, Apr 1, 2021 at 8:59 AM Thomas Petazzoni
<thomas.petazzoni@bootlin.com> wrote:
>
> On Thu,  1 Apr 2021 08:44:53 -0700
> Adam Duskett <aduskett@gmail.com> wrote:
>
> > The README.md file suggests passing "nodbus" as a tag if dbus is not selected.
> >
> > Signed-off-by: Adam Duskett <aduskett@gmail.com>
>
> 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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Buildroot] [PATCH] package/mender: make xz optional
  2021-04-01 15:44 ` [Buildroot] [PATCH] package/mender: make xz optional Adam Duskett
@ 2021-04-03  7:29   ` Yann E. MORIN
  0 siblings, 0 replies; 7+ messages in thread
From: Yann E. MORIN @ 2021-04-03  7:29 UTC (permalink / raw)
  To: buildroot

Adam, All,

On 2021-04-01 08:44 -0700, Adam Duskett spake thusly:
> 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
> 
> Signed-off-by: Adam Duskett <aduskett@gmail.com>
> ---
[--SNIP--]
> diff --git a/package/mender/mender.mk b/package/mender/mender.mk
> index 794dd4be8c..1ebd5a2e83 100644
> --- a/package/mender/mender.mk
> +++ b/package/mender/mender.mk
[--SNIP--]
> @@ -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.

> +endif
> +
>  ifeq ($(BR2_PACKAGE_DBUS),y)
>  define MENDER_INSTALL_DBUS_AUTHENTICATION_MANAGER_CONF
>  	$(INSTALL) -D -m 0755 $(@D)/support/dbus/io.mender.AuthenticationManager.conf \
> -- 
> 2.30.2
> 
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot

-- 
.-----------------.--------------------.------------------.--------------------.
|  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.  |
'------------------------------^-------^------------------^--------------------'

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Buildroot] [PATCH] package/mender/mender.mk: fix license list
  2021-04-01 15:44 [Buildroot] [PATCH] package/mender/mender.mk: fix license list Adam Duskett
  2021-04-01 15:44 ` [Buildroot] [PATCH] package/mender: make xz optional Adam Duskett
  2021-04-01 15:44 ` [Buildroot] [PATCH] package/mender: add nodbus to tags if dbus is not selected Adam Duskett
@ 2021-04-03  7:31 ` Yann E. MORIN
  2 siblings, 0 replies; 7+ messages in thread
From: Yann E. MORIN @ 2021-04-03  7:31 UTC (permalink / raw)
  To: buildroot

Adam, All,

On 2021-04-01 08:44 -0700, Adam Duskett spake thusly:
> The license files were updated in the .hash file, but not in the .mk file.
> 
> Fixes:
> http://autobuild.buildroot.org/results/42c2987e5cf2bb8918f7fdbd8303951f34b8ead1
> Signed-off-by: Adam Duskett <aduskett@gmail.com>

Series of three patches applied to master, thanks.

Regards,
Yann E. MORIN.

> ---
>  package/mender/mender.mk | 9 ++++++---
>  1 file changed, 6 insertions(+), 3 deletions(-)
> 
> diff --git a/package/mender/mender.mk b/package/mender/mender.mk
> index 317e533532..794dd4be8c 100644
> --- a/package/mender/mender.mk
> +++ b/package/mender/mender.mk
> @@ -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
> -- 
> 2.30.2
> 
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot

-- 
.-----------------.--------------------.------------------.--------------------.
|  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.  |
'------------------------------^-------^------------------^--------------------'

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2021-04-03  7:31 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-04-01 15:44 [Buildroot] [PATCH] package/mender/mender.mk: fix license list Adam Duskett
2021-04-01 15:44 ` [Buildroot] [PATCH] package/mender: make xz optional Adam Duskett
2021-04-03  7:29   ` Yann E. MORIN
2021-04-01 15:44 ` [Buildroot] [PATCH] package/mender: add nodbus to tags if dbus is not selected Adam Duskett
2021-04-01 15:59   ` Thomas Petazzoni
2021-04-01 16:38     ` Adam Duskett
2021-04-03  7:31 ` [Buildroot] [PATCH] package/mender/mender.mk: fix license list Yann E. MORIN

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox