All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christian Stewart <christian@paral.in>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH next 05/12] support/download/go-post-process: implement Go vendoring support
Date: Wed, 25 Nov 2020 13:12:00 -0800	[thread overview]
Message-ID: <CA+h8R2rmbBY5MjBTgFitdHcDMbmyMh-w+Uvs0rVz6xOrqF-h6A@mail.gmail.com> (raw)
In-Reply-To: <CALq67GBxOe=U_25AKWG9EB8bNeUveE-SX5tNyd9BG=0gqe9uEw@mail.gmail.com>

Hi Ryan, all,

On Wed, Nov 25, 2020 at 1:07 PM Ryan Barnett <ryanbarnett3@gmail.com> wrote:
> I've tried out the new go vendoring support and I am running into an
> issue with cleaning the build directory when using this series. I've
> added a new package on your pkg-mgr branch called maddy with the
> following at package/maddy/maddy.mk:

> make maddy
> make clean

> The error I get is as follows:
>
> rm -rf /home/ryan/projects/br/br-pkg-mgr/output/target
> /home/ryan/projects/br/br-pkg-mgr/output/images
> /home/ryan/projects/br/br-pkg-mgr/output/host  \
>         /home/ryan/projects/br/br-pkg-mgr/output/build
> /home/ryan/projects/br/br-pkg-mgr/output/staging \
>         /home/ryan/projects/br/br-pkg-mgr/output/legal-info
> /home/ryan/projects/br/br-pkg-mgr/output/graphs
> /home/ryan/projects/br/br-pkg-mgr/output/per-package
> rm: cannot remove
> '/home/ryan/projects/br/br-pkg-mgr/output/host/share/go-path/pkg/mod/github.com/cespare/xxhash/v2 at v2.1.1/README.md':
> Permission denied

> There are about 1000 more lines with this error. The only way I can do
> a clean is by running:
>
> sudo rm -rf output/*
>
> Here are the permissions on one of the files:
>
> $ ls -al /home/ryan/projects/br/br-pkg-mgr/output/host/share/go-path/pkg/mod/github.com/cespare/xxhash/v2 at v2.1.1/xxhash_unsafe_test.go
> -r--r--r-- 1 ryan ryan 402 Nov 25 15:01
> /home/ryan/projects/br/br-pkg-mgr/output/host/share/go-path/pkg/mod/github.com/cespare/xxhash/v2 at v2.1.1/xxhash_unsafe_test.go

This is because the Go tool sets restrictive permissions on the
gopath/pkg/mod tree to prevent source code tools from editing the
dependencies code on the filesystem.

Relevant Go issues:

 - https://github.com/golang/go/issues/27455

myitcv says: "This is, as @mark-rushakoff pointed out, working as
intended. The integrity of pkg/mod/** is important. Hence it is not
writable."

 - https://github.com/golang/go/issues/31481

We can solve this by adding "-modcacherw" flag to the "go mod"
commands. I will test this and send some more info.

Best regards,
Christian Stewart

  reply	other threads:[~2020-11-25 21:12 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-19 21:36 [Buildroot] [PATCH next 00/12] Support for Cargo and Go vendoring Thomas Petazzoni
2020-11-19 21:36 ` [Buildroot] [PATCH next 01/12] support/download/dl-wrapper: add concept of download post-processing Thomas Petazzoni
2020-11-19 21:36 ` [Buildroot] [PATCH next 02/12] package/pkg-download.mk: add <pkg>_DOWNLOAD_POST_PROCESS variable Thomas Petazzoni
2020-11-19 21:36 ` [Buildroot] [PATCH next 03/12] package/pkg-download.mk: add <pkg>_DL_ENV variable Thomas Petazzoni
2020-11-19 21:36 ` [Buildroot] [PATCH next 04/12] support/download/post-process-helpers: add helper function for post process scripts Thomas Petazzoni
2020-11-19 21:36 ` [Buildroot] [PATCH next 05/12] support/download/go-post-process: implement Go vendoring support Thomas Petazzoni
2020-11-25 20:28   ` Christian Stewart
2020-11-25 20:37     ` Thomas Petazzoni
2020-11-25 20:51       ` Christian Stewart
2020-11-25 20:45     ` Christian Stewart
2020-11-25 20:52       ` Thomas Petazzoni
2020-11-25 20:54         ` Christian Stewart
2020-11-25 21:02           ` Christian Stewart
2020-11-25 21:07   ` Ryan Barnett
2020-11-25 21:12     ` Christian Stewart [this message]
2020-11-25 21:21       ` Christian Stewart
2020-11-25 21:49         ` Ryan Barnett
2020-11-19 21:36 ` [Buildroot] [PATCH next 06/12] package/tinifier: new package Thomas Petazzoni
2020-11-21 16:37   ` Ryan Barnett
2020-11-21 18:04     ` Yann E. MORIN
2020-11-22  6:08       ` Christian Stewart
2020-11-22 20:25         ` Sam Voss
2020-11-23 14:48       ` Ryan Barnett
2020-12-10 21:46       ` Thomas Petazzoni
2020-11-19 21:36 ` [Buildroot] [PATCH next 07/12] package/pkg-cargo.mk: introduce the cargo package infrastructure Thomas Petazzoni
2020-11-25 19:46   ` Ryan Barnett
2020-11-25 20:35     ` Thomas Petazzoni
2020-12-10 15:48   ` [Buildroot] [PATCH 1/1] package/pkg-cargo.mk: make sure .cargo/config is used Patrick Havelange
2020-12-10 20:31     ` Thomas Petazzoni
2020-12-16 13:40       ` Patrick Havelange
2020-12-16 17:33         ` Sam Voss
2020-12-16 13:58   ` [Buildroot] [PATCH next 07/12] package/pkg-cargo.mk: introduce the cargo package infrastructure Patrick Havelange
2020-12-16 14:23     ` Thomas Petazzoni
2020-11-19 21:36 ` [Buildroot] [PATCH next 08/12] docs/manual/cargo: document the cargo-package infrastructure Thomas Petazzoni
2020-11-19 21:36 ` [Buildroot] [PATCH next 09/12] package/ripgrep: convert to cargo infrastructure Thomas Petazzoni
2020-11-19 21:36 ` [Buildroot] [PATCH next 10/12] package/sentry-cli: convert to host-cargo-package infrastructure Thomas Petazzoni
2020-11-19 21:36 ` [Buildroot] [PATCH next 11/12] support/download/cargo-post-process, package/pkg-cargo.mk: enable vendoring for Cargo packages Thomas Petazzoni
2020-11-19 21:36 ` [Buildroot] [PATCH next 12/12] docs/manual/adding-packages-cargo.txt: rewrite explanation about dependency management Thomas Petazzoni

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CA+h8R2rmbBY5MjBTgFitdHcDMbmyMh-w+Uvs0rVz6xOrqF-h6A@mail.gmail.com \
    --to=christian@paral.in \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.