From mboxrd@z Thu Jan 1 00:00:00 1970 From: Danny Milosavljevic Subject: bug#22050: [PATCH v4 1/2] linux-boot: Add make-static-device-nodes. Date: Fri, 15 Dec 2017 18:27:17 +0100 Message-ID: <20171215182717.478928f4@scratchpost.org> References: <20171213223240.605-1-dannym@scratchpost.org> <20171214195636.787-1-dannym@scratchpost.org> <20171214195636.787-2-dannym@scratchpost.org> <87374cmipa.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:39439) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ePtmJ-0004pi-Gz for bug-guix@gnu.org; Fri, 15 Dec 2017 12:28:08 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ePtmE-0002Io-IL for bug-guix@gnu.org; Fri, 15 Dec 2017 12:28:07 -0500 Received: from debbugs.gnu.org ([208.118.235.43]:55548) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ePtmE-0002IJ-Fi for bug-guix@gnu.org; Fri, 15 Dec 2017 12:28:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ePtmE-0001Ju-3e for bug-guix@gnu.org; Fri, 15 Dec 2017 12:28:02 -0500 Sender: "Debbugs-submit" Resent-Message-ID: In-Reply-To: <87374cmipa.fsf@gnu.org> List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org Sender: "bug-Guix" To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: 22050@debbugs.gnu.org Hi Ludo, On Fri, 15 Dec 2017 10:41:37 +0100 ludo@gnu.org (Ludovic Court=C3=A8s) wrote: > This looks good, but would it be enough to do: >=20 > (mkdir-p (dirname (string-append "/dev/" name))) mkdir permission needs to be specified to be #o755. I've seen some variants in guix - but they are all buried somewhere deep: ./gnu/services/cups.scm: (define (mkdir-p/perms directory owner perm= s) ./gnu/services/dns.scm: (define (mkdir-p/perms directory owner perms) ./gnu/services/mail.scm: (define (mkdir-p/perms directory owner perms) ./guix/build/utils.scm:(define (mkdir-p dir) ./guix/build/graft.scm:(define* (mkdir-p* dir #:optional (mode #o755)) I don't feel good relying on magical unspecified permissions in code requir= ed to boot the system. I think mkdir-p itself subtracts the umask or somet= hing. Is the umask guaranteed to be 0 at the point of usage of make-static= -device-nodes ?