unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* File permissions on git fetched packages.
@ 2017-09-14 12:46 Mathieu Othacehe
  2017-09-17 20:08 ` Ludovic Courtès
  0 siblings, 1 reply; 3+ messages in thread
From: Mathieu Othacehe @ 2017-09-14 12:46 UTC (permalink / raw)
  To: guix-devel


Hi Guix,

I'm trying to package a specific version of libgit2, fetched from a git
repo. I noticed that when cloned in /gnu/store/xxx-git-checkout, all
files have 444 permissions, because /gnu/store is mounted read-only I guess.

The problem is when /gnu/store/xxx-git-checkout/tests/resources/ are
copied to /tmp and tests are run, they fail when trying to write on read
only files.

Any idea on how to overcome this issue and preserve file permissions on
git fetched packages ?

Thanks,

Mathieu

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

* Re: File permissions on git fetched packages.
  2017-09-14 12:46 File permissions on git fetched packages Mathieu Othacehe
@ 2017-09-17 20:08 ` Ludovic Courtès
  2017-09-17 20:25   ` Carlo Zancanaro
  0 siblings, 1 reply; 3+ messages in thread
From: Ludovic Courtès @ 2017-09-17 20:08 UTC (permalink / raw)
  To: Mathieu Othacehe; +Cc: guix-devel

Hello,

Mathieu Othacehe <m.othacehe@gmail.com> skribis:

> I'm trying to package a specific version of libgit2, fetched from a git
> repo. I noticed that when cloned in /gnu/store/xxx-git-checkout, all
> files have 444 permissions, because /gnu/store is mounted read-only I guess.
>
> The problem is when /gnu/store/xxx-git-checkout/tests/resources/ are
> copied to /tmp and tests are run, they fail when trying to write on read
> only files.
>
> Any idea on how to overcome this issue and preserve file permissions on
> git fetched packages ?

I think you just have to “chmod -R +w” those files.

I was looking for examples of packages that use ‘git-fetch’ and that do
that, but I couldn’t easily find one.  I suppose that’s what they do
when they have to, though.

HTH!

Ludo’.

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

* Re: File permissions on git fetched packages.
  2017-09-17 20:08 ` Ludovic Courtès
@ 2017-09-17 20:25   ` Carlo Zancanaro
  0 siblings, 0 replies; 3+ messages in thread
From: Carlo Zancanaro @ 2017-09-17 20:25 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: guix-devel

[-- Attachment #1: Type: text/plain, Size: 391 bytes --]

On Sun, Sep 17 2017, Ludovic Courtès wrote:
> I think you just have to “chmod -R +w” those files.
>
> I was looking for examples of packages that use ‘git-fetch’ and that do
> that, but I couldn’t easily find one.  I suppose that’s what they do
> when they have to, though.

One example is kakoune. It has a fix-test-permissions phase which does
exactly that.

Carlo

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]

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

end of thread, other threads:[~2017-09-17 20:25 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-09-14 12:46 File permissions on git fetched packages Mathieu Othacehe
2017-09-17 20:08 ` Ludovic Courtès
2017-09-17 20:25   ` Carlo Zancanaro

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).