All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/1] package/mender-artifact: fix module permissions
@ 2020-08-13 18:49 aduskett at gmail.com
  2020-08-13 19:23 ` Thomas Petazzoni
  0 siblings, 1 reply; 2+ messages in thread
From: aduskett at gmail.com @ 2020-08-13 18:49 UTC (permalink / raw)
  To: buildroot

From: Adam Duskett <Aduskett@gmail.com>

Modules downloaded with "go mod" are downloaded as read-only, which the Go
maintainers have intentionally done.
https://github.com/golang/go/issues/27161

As mender-artifact now uses go modules, when cleaning, a user will receive
permission-denied errors due to the above issue.

The fix, however, is relatively straight forward. Setting the "-mod=vendor"
flag in the GO_ENV will set go modules to read/write, which allows
"make clean" to work correctly.

Signed-off-by: Mirza Krak <mirza.krak@northern.tech>
Signed-off-by: Adam Duskett <Aduskett@gmail.com>
---
 package/mender-artifact/mender-artifact.mk | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/package/mender-artifact/mender-artifact.mk b/package/mender-artifact/mender-artifact.mk
index c81ec9ba53..b3869518ed 100644
--- a/package/mender-artifact/mender-artifact.mk
+++ b/package/mender-artifact/mender-artifact.mk
@@ -31,6 +31,8 @@ HOST_MENDER_ARTIFACT_LICENSE_FILES = \
 
 HOST_MENDER_ARTIFACT_DEPENDENCIES = host-xz
 
+HOST_MENDER_ARTIFACT_GO_ENV = GOFLAGS="-mod=vendor"
+
 HOST_MENDER_ARTIFACT_LDFLAGS = -X main.Version=$(HOST_MENDER_ARTIFACT_VERSION)
 
 HOST_MENDER_ARTIFACT_BUILD_TARGETS = cli/mender-artifact
-- 
2.26.2

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

* [Buildroot] [PATCH 1/1] package/mender-artifact: fix module permissions
  2020-08-13 18:49 [Buildroot] [PATCH 1/1] package/mender-artifact: fix module permissions aduskett at gmail.com
@ 2020-08-13 19:23 ` Thomas Petazzoni
  0 siblings, 0 replies; 2+ messages in thread
From: Thomas Petazzoni @ 2020-08-13 19:23 UTC (permalink / raw)
  To: buildroot

On Thu, 13 Aug 2020 11:49:47 -0700
aduskett at gmail.com wrote:

> From: Adam Duskett <Aduskett@gmail.com>
> 
> Modules downloaded with "go mod" are downloaded as read-only, which the Go
> maintainers have intentionally done.
> https://github.com/golang/go/issues/27161
> 
> As mender-artifact now uses go modules, when cleaning, a user will receive
> permission-denied errors due to the above issue.
> 
> The fix, however, is relatively straight forward. Setting the "-mod=vendor"
> flag in the GO_ENV will set go modules to read/write, which allows
> "make clean" to work correctly.
> 
> Signed-off-by: Mirza Krak <mirza.krak@northern.tech>
> Signed-off-by: Adam Duskett <Aduskett@gmail.com>

Thanks, but will this fix the host-mender-artifact download issues as
well ?

Best regards,

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

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

end of thread, other threads:[~2020-08-13 19:23 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-13 18:49 [Buildroot] [PATCH 1/1] package/mender-artifact: fix module permissions aduskett at gmail.com
2020-08-13 19:23 ` Thomas Petazzoni

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.