From mboxrd@z Thu Jan 1 00:00:00 1970 From: "pelzflorian (Florian Pelz)" Subject: Re: Setting TMPDIR for Guix Date: Fri, 24 Feb 2017 11:41:56 +0100 Message-ID: References: <20170223180712.GA15457@jasmine> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:37175) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1chDK7-0003za-Rv for help-guix@gnu.org; Fri, 24 Feb 2017 05:42:04 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1chDK4-0003gk-QA for help-guix@gnu.org; Fri, 24 Feb 2017 05:42:03 -0500 Received: from pelzflorian.de ([5.45.111.108]:47476 helo=mail.pelzflorian.de) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1chDK4-0003dw-F2 for help-guix@gnu.org; Fri, 24 Feb 2017 05:42:00 -0500 In-Reply-To: <20170223180712.GA15457@jasmine> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-guix-bounces+gcggh-help-guix=m.gmane.org@gnu.org Sender: "Help-Guix" To: Leo Famulari Cc: help-guix@gnu.org On 02/23/2017 07:07 PM, Leo Famulari wrote: > On Thu, Feb 23, 2017 at 12:58:21PM +0100, pelzflorian (Florian Pelz) wr= ote: >> 1) start guix-daemon with an environment in which TMPDIR is set to >> /tmpdir and >=20 > I exposed this feature in the guix-shepherd-service with commit > b191f0a6c50f2a7d47037ef8509d0351f5a2646e. >=20 > In order to use it, you'll need to use modify-services as shown in the > manual, section Using the Configuration System: > This works well. Thank you! > https://www.gnu.org/software/guix/manual/html_node/Using-the-Configurat= ion-System.html#System-Services >=20 >> 2) change my Guix system configuration so that it automatically create= s >> a /tmpdir directory. >=20 > This remains to be done in (guix-activation). Would you, or anyone else= , > like to try it? >=20 I suppose you mean changing (guix-activation) to create tmpdir if tmpdir is set? I can=92t quite wrap my head around this pattern matching and G-expression code. This attempt does not work; also I=92m afraid my trial-and-error changes break stuff. It=92s better if someone else does i= t who knows what this does. (define (guix-activation config) "Return the activation gexp for CONFIG." (match config (($ guix build-group build-accounts authorize-key? keys tmpdir) ;; Assume that the store has BUILD-GROUP as its group. We could ;; otherwise call 'chown' here, but the problem is that on a COW unionfs, ;; chown leads to an entire copy of the tree, which is a bad idea. #~(list ;; Optionally authorize hydra.gnu.org's key. #$@(if authorize-key? #~(begin #$@(map (cut hydra-key-authorization <> guix) keys)) #~#f) ;; If a tmpdir is set, create tmpdir if it does not exist. #$@(if tmpdir #~(begin (use-modules (guix build utils)) (mkdir-p tmpdir)) #~#f)))))