unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: ludo@gnu.org (Ludovic Courtès)
To: Georgi Kirilov <kirilov.georgi.s@gmail.com>
Cc: guix-devel@gnu.org
Subject: Re: A postinst equivalent in Guix?
Date: Fri, 20 Jan 2017 15:09:25 +0100	[thread overview]
Message-ID: <87efzxakmi.fsf@gnu.org> (raw)
In-Reply-To: <CAATCAE49dz8THtNhhT8+LxjA0Rwu=mryeMgGxFbJza80Wr7XAA@mail.gmail.com> (Georgi Kirilov's message of "Thu, 19 Jan 2017 20:30:26 +0200")

Hi,

Georgi Kirilov <kirilov.georgi.s@gmail.com> skribis:

> is there anything in Guix that can do things at install time, like postinst
> scripts in Debian?

No.  There are “profile hooks” in (guix profiles) that are used to a
similar effect, for instance to assemble the ‘dir’ file that 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=/var to this package’s
configure state, since at run time it won’t be able to write to
/gnu/store/…/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 ‘avahi-localstatedir.patch’ or ‘mcron-install.patch’.

HTH!

Ludo’.

  parent reply	other threads:[~2017-01-20 14:09 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-19 18:30 A postinst equivalent in Guix? Georgi Kirilov
2017-01-20  6:23 ` John Darrington
2017-01-20 14:09 ` Ludovic Courtès [this message]
2017-01-21 14:39   ` Georgi Kirilov
2017-01-21 15:34     ` Ludovic Courtès
2017-01-21 16:36       ` Georgi Kirilov
2017-01-23  9:34         ` Ludovic Courtès
2017-01-25  0:26           ` Christopher Allan Webber
2017-01-25 13:15             ` Ludovic Courtès
2017-01-25 13:42               ` John Darrington
2017-01-25 16:19                 ` Christopher Allan Webber
2017-01-25 14:54           ` Georgi Kirilov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87efzxakmi.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=guix-devel@gnu.org \
    --cc=kirilov.georgi.s@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).