From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alex Vong Subject: Re: Using ``chmod'' in build phases Date: Fri, 05 Jan 2018 02:06:53 +0800 Message-ID: <878tdd33cy.fsf@gmail.com> References: <87h8s42uqs.fsf@gmail.com> <87o9mavx8t.fsf@netris.org> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:57935) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eX9v8-0006if-O6 for guix-devel@gnu.org; Thu, 04 Jan 2018 13:07:15 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eX9v5-0007D5-Fn for guix-devel@gnu.org; Thu, 04 Jan 2018 13:07:14 -0500 Received: from mail-pg0-x22e.google.com ([2607:f8b0:400e:c05::22e]:34209) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eX9v5-0007CL-8y for guix-devel@gnu.org; Thu, 04 Jan 2018 13:07:11 -0500 Received: by mail-pg0-x22e.google.com with SMTP id j4so986072pgp.1 for ; Thu, 04 Jan 2018 10:07:11 -0800 (PST) In-Reply-To: <87o9mavx8t.fsf@netris.org> (Mark H. Weaver's message of "Thu, 04 Jan 2018 03:33:54 -0500") List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: Mark H Weaver Cc: guix-devel@gnu.org --=-=-= Content-Type: text/plain Mark H Weaver writes: > Alex Vong 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 --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEdZDkzSn0Cycogr9IxYq4eRf1Ea4FAlpObT4ACgkQxYq4eRf1 Ea7ECQ/+ONhRNGT+wfrLFigG7kG0LhuB1sTHK9bZLGkrQkl71WUYBYhVBrp2da7C e3lIxh0KswtSRdmAAe9pwozS98mtKof65gJyCQBPOxJw65bInwRvxNMvvm0kk56A W1YZa/5FCxlUC8jPP8xY8bofOw3xrsApt3kmNeQz9eDVui/L4mL5hQqwPec6tgN8 pg15uSGZFIeRlWmJ6l/bvZMpVWUHS+S29Oh5V9UQFNjZHLxvUzno5S2w9E/HwpJv PEcbrzc/DF9HP8GzLCQNCwkKYy6Nk0zNlR2JihaXujxr0YJUpNgEXRPtMTI5W4ar 62B1Mm42dJWC1fiNUNtMRPXPqwtF5Duo/WMlilH6jkchnPe496ouaToCyNwWMbYB XX0RDuBUSNnBVgzVclN0B294EtE9UkYr6blWWLRDuVbFeZHpEi/MJZqW3qcZ1Jl+ AGqcp1QQWY74yi/5hsyt40ZGacVqVIyJLO27hCjxjiLg5x3oq1MyPxqFw3eBDDr6 QcVzfqrOI9tStQb9+NzUqFofrUl13Sn9kWIDnSUeWuPw7vTRq7JbMOlyHWbwAJwa Yomrk8RyHK0e4dNBrA3OIxigmYkWV/woKSp3LV28e+nCHFQ3RV1z5Kqc+aqWXCmF eJkAcfukfsL/k26jNG/0bpzRcOWuTaCYuEI6TpLS7P07z8duvvQ= =Es5Y -----END PGP SIGNATURE----- --=-=-=--