package/mender-artifact: fix module permissions
PATCH 1/1 package/mender-artifact: fix module permissions
From: Adam Duskett <[email protected]>
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.
--- package/mender-artifact/mender-artifact.mk | 2 ++ 1 file changed, 2 insertions(+)
package/mender-artifact/mender-artifact.mk +2 -0
@@ -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
Signature · 1 line
2.26.2
PATCH 1/1 package/mender-artifact: fix module permissions
Quoted 9 lines · On Thu, 13 Aug 2020 11:49:47 -0700 aduskett at gmail.com wrote:
From: Adam Duskett <[email protected]>
Modules downloaded with "go mod" are downloaded as read-only, which the Go maintainers have intentionally done.
https://github.com/golang/go/issues/27161As mender-artifact now uses go modules, when cleaning, a user will receive permission-denied errors due to the above issue.
Quoted 6 lines
The fix, however, is relatively straight forward. Setting the "-mod=vendor" flag in the
GO_ENVwill set go modules to read/write, which allows "make clean" to work correctly.Signed-off-by Mirza Krak <[email protected]>Signed-off-by Adam Duskett <[email protected]>
Thanks, but will this fix the host-mender-artifact download issues as well ?
Best regards,
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com