From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: A postinst equivalent in Guix? Date: Fri, 20 Jan 2017 15:09:25 +0100 Message-ID: <87efzxakmi.fsf@gnu.org> References: 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]:33781) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cUZsj-0001oj-PO for guix-devel@gnu.org; Fri, 20 Jan 2017 09:09:36 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cUZse-0001xe-RW for guix-devel@gnu.org; Fri, 20 Jan 2017 09:09:33 -0500 In-Reply-To: (Georgi Kirilov's message of "Thu, 19 Jan 2017 20:30:26 +0200") 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: Georgi Kirilov Cc: guix-devel@gnu.org Hi, Georgi Kirilov skribis: > is there anything in Guix that can do things at install time, like postin= st > scripts in Debian? No. There are =E2=80=9Cprofile hooks=E2=80=9D in (guix profiles) that are = used to a similar effect, for instance to assemble the =E2=80=98dir=E2=80=99 file tha= t contains pointers to Info documentation. > A program in a package I created is trying to access /var, but has no > permissions. (Well, /gnu/store/.../var) > The 'install' make target was doing 'chgrp' and 'install -g', but I had to > remove these because there was no such group in the chroot jail. And it > would be wrong anyway, as the gid in the jail would be different from that > in the systems where the package will be installed. > So, I guess /gnu/store/.../var has to be chgrp-ed during installation, on > the user's system. First, you probably need to pass --localstatedir=3D/var to this package=E2= =80=99s configure state, since at run time it won=E2=80=99t be able to write to /gnu/store/=E2=80=A6/var anyway. Second, it will try and fail to create /var. The way to address that is by simply commenting out or patching out the offending commands. See for instance =E2=80=98avahi-localstatedir.patch=E2=80=99 or =E2=80=98mcron-= install.patch=E2=80=99. HTH! Ludo=E2=80=99.