all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de>
To: Jookia <166291@gmail.com>
Cc: guix-devel@gnu.org
Subject: Re: The tricky case of "--localstatedir=/var"
Date: Tue, 16 Feb 2016 15:29:02 +0100	[thread overview]
Message-ID: <idjvb5o685t.fsf@bimsb-sys02.mdc-berlin.net> (raw)
In-Reply-To: <20160216135729.GB13560@novena-choice-citizen.lan>


Jookia <166291@gmail.com> writes:

> Hey there,
>
> Over the past month a few people (myself included) have been hit by the 'gotcha'
> of not running ./configure with "--localstatedir=/var". It doesn't say this in
> the documentation but I question whether not having it as /var is a sane
> default. I'm sure this is somehow tied to the conventions of /usr/local.
> Here's how this issue could be fixed, in order of usefulness:
>
> * Change localstatedir to /var by default.
>
> This makes a lot of sense considering that's where it's expected to be. Even
> patches within Guix assume it's in /var , so installing and building Guix
> without localstatedir in /var would not only be a weird idea, it will actually
> *break* things. See avahi, xorg-server, findutils.

I like this because I assume most people really don’t want to have
localstatedir somewhere in /usr/local.

> * Put the localstatedir in /gnu.
>
> This is actually what Nix does, so I'm a little surprised as to why Guix has
> deviated from this practice. This will require updating all the patches to use
> /gnu/var as the localstatedir. What you get from this is the idea that the state
> is linked with the store (which it is!) and more importantly, comes in to the
> territory of GNU.

I’m actually doing this on my cluster installation.  It’s very
convenient at first because you can just mount /gnu and be done with it,
but since enabling users to manage their profiles from all cluster nodes
over the network “/gnu” and “/gnu/var” have to be mounted separately and
sequentially with different flags: “/gnu” should be read-only in general
(in particular “/gnu/store”) and “/gnu/var/guix/profiles” must be
read-writeable for users to be able to install things into their
profiles.

One thing that doesn’t work out of the box is users installing guix with
guix, because that’s preconfigured for a localstatedir in “/var”.  (The
easy fix is to overwrite the guix package definition.)

> * Instruct people to always pass "--localstatedir=/var" to configure.
>
> Sure, this could be done. But people are going to forget to do this and we'll
> have to explain on IRC to read the manual, then have them need to redo their
> entire Guix setup once they find something broken. Manually moving the state
> directory around is fragile enough since it involves moving symlinks around for
> profiles and isn't easily explained to people.
>
> More importantly, people are going to come away from their Guix experience with
> the feeling that something easily avoided has cost them a lot of their time, and
> they'd be right.

I think we already have too many steps to set up Guix.  Having one fewer
flag to understand and pay attention to would be an improvement.  We can
mention the “localstatedir” flag (and its default value) in the manual,
but I’d like to cast my vote for one of the two previous suggestions.

> The advantage this approach has is that localstatedir is configurable.
> Unfortunately, packages will still be broken. Perhaps it's time to substitute
> patch files too and introduce localstatedir as a build variable.

Is this really so?  Could you give us an example please?

> * Do nothing.
>
> Software will still be confusing and debatedly broken. No doubt people will be
> having this discussion again.

Agreed.

~~ Ricardo

  reply	other threads:[~2016-02-16 14:29 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-16 13:57 The tricky case of "--localstatedir=/var" Jookia
2016-02-16 14:29 ` Ricardo Wurmus [this message]
2016-02-16 14:52   ` Jookia
2016-02-16 16:41   ` Andreas Enge
2016-02-16 17:12     ` Jookia
2016-02-16 17:16       ` Andreas Enge
2016-02-16 16:04 ` Tobias Geerinckx-Rice
2016-02-16 16:08   ` Tobias Geerinckx-Rice
2016-02-16 19:11 ` Christopher Allan Webber
2016-02-16 19:59 ` Danny Milosavljevic
2016-02-16 22:42   ` Mark H Weaver
2016-02-17  9:29     ` Ricardo Wurmus
2016-02-17  8:06 ` Chris Marusich
2016-02-17  8:38   ` Jookia
2016-02-17  9:15     ` Chris Marusich
2016-02-17 10:08       ` Jookia
2016-02-17 17:50         ` Chris Marusich
2016-02-17 18:00           ` Jookia
2016-02-17 18:23           ` Andreas Enge
2016-03-17 22:11 ` Ludovic Courtès
2016-03-17 22:19   ` Mathieu Lirzin
2016-03-18  1:12   ` Jookia
2016-03-18 18:45     ` Ludovic Courtès
2016-03-19  3:27       ` Jookia
2016-03-19 14:11   ` Ludovic Courtès

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

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

  git send-email \
    --in-reply-to=idjvb5o685t.fsf@bimsb-sys02.mdc-berlin.net \
    --to=ricardo.wurmus@mdc-berlin.de \
    --cc=166291@gmail.com \
    --cc=guix-devel@gnu.org \
    /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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.