From mboxrd@z Thu Jan 1 00:00:00 1970 From: Hartmut Goebel Subject: Re: [Patch v2] daemon: Set ownership of kept build directories to the calling user. Date: Mon, 21 Nov 2016 19:29:40 +0100 Message-ID: <58333D14.8030801@crazy-compilers.com> References: <1479382225-25227-1-git-send-email-h.goebel@crazy-compilers.com> <87shqkvs3a.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]:51130) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c8tLi-00065N-15 for guix-devel@gnu.org; Mon, 21 Nov 2016 13:29:50 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c8tLd-0002z4-5J for guix-devel@gnu.org; Mon, 21 Nov 2016 13:29:50 -0500 In-Reply-To: <87shqkvs3a.fsf@gnu.org> 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: =?UTF-8?Q?Ludovic_Court=c3=a8s?= Cc: guix-devel@gnu.org Am 21.11.2016 um 15:13 schrieb Ludovic Court=C3=A8s: > Could we instead pass them via the =E2=80=98LocalStore=E2=80=99 constru= ctor, I started implementing this, but adding clientUid/Gid as a attribute (property) of 'LocalStore' feels wrong. The LocalStore is about the store: files being there, querying and such. Even "build" is a bit of a misfit IMO. Okay, probably you mean, passing to the =E2=80=98LocalStore=E2=80=99 cons= tructor and then forward them to the goals. Which means changing `makeDerevationGoal', which is used quite some time. From there you would need to pass it onto the 'DerivationGoal' constructor. These are quite some changes for the rare case of building, and only if the build failed and only if the user passed --keep-failed. I have the impression, that 'Settings' have been introduced exactly to save passing around such information. "keep-failed" is passed to 'deleteTmpDir()' exactly this way (via Settings). Which means if passing clientUid/Gid via constructors, we would have two different ways of passing information used in the same small function - which would be inconsistent. Thus said, I'm in strong favour of using Settings. --=20 Regards Hartmut Goebel | Hartmut Goebel | h.goebel@crazy-compilers.com | | www.crazy-compilers.com | compilers which you thought are impossible |