From: Alex Vong <alexvong1995@gmail.com>
To: Mark H Weaver <mhw@netris.org>
Cc: guix-devel@gnu.org
Subject: Re: Using ``chmod'' in build phases
Date: Fri, 05 Jan 2018 02:06:53 +0800 [thread overview]
Message-ID: <878tdd33cy.fsf@gmail.com> (raw)
In-Reply-To: <87o9mavx8t.fsf@netris.org> (Mark H. Weaver's message of "Thu, 04 Jan 2018 03:33:54 -0500")
[-- Attachment #1: Type: text/plain, Size: 1251 bytes --]
Mark H Weaver <mhw@netris.org> writes:
> Alex Vong <alexvong1995@gmail.com> writes:
>
>> Running ``LC_ALL=C grep -r chmod'' on ``guix/gnu/packages'', gives the
>> following result. As you can see, various modes are used, such as 644,
>> 755, 555, 666, 777, 664. Do we have a guide on which mode should be
>> prefered? I personally always used 644 for non-executable files, and 755
>> for directories and executable files. Any idea?
>
> I agree that it would be good to have some guidelines for this, and for
> most purposes, I agree that 644 and 755 are good choices. In some
> cases, it might make more sense to use 444 or 555. It's probably
> inadvisable to use 666 or 777.
>
> However, it should be noted that when files are added to the store,
> their modes are canonicalized to one of only two possible values: 444
> and 555. Directories in the store always have mode 555. In the NAR
> format, there's only one permission bit (executable) stored per file,
> and none for directories. For details, see section 5.2.1 (File system
> objects) in the Eelco Dolstra's thesis "The Purely Functional Software
> Deployment Model".
>
I see, so this is merely a stylish issue. It will not affected how the
files are stored in the store.
> Mark
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]
prev parent reply other threads:[~2018-01-04 18:07 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-02 14:36 Using ``chmod'' in build phases Alex Vong
2018-01-02 16:28 ` ng0
2018-01-04 13:05 ` Alex Vong
2018-01-04 8:33 ` Mark H Weaver
2018-01-04 18:06 ` Alex Vong [this message]
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
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=878tdd33cy.fsf@gmail.com \
--to=alexvong1995@gmail.com \
--cc=guix-devel@gnu.org \
--cc=mhw@netris.org \
/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.
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).