unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Richard Sent <richard@freakingpenguin.com>
To: guix-devel@gnu.org
Subject: Changing the defaults for --localstatedir and --sysconfdir?
Date: Wed, 01 May 2024 16:49:07 -0400	[thread overview]
Message-ID: <87sez19s1o.fsf@freakingpenguin.com> (raw)

Hi Guix,

As everyone who's built Guix from source knows, when running ./configure
on a system with an existing Guix installation you must remember to
specify --localstatedir=/var and --sysconfdir=/etc. I think we should
consider whether those variables should default to those values.

There's been discussion on this in the distant past, see [1]. At risk of
oversimplifying, I think previous consensus was in favor of making some
sort of change over the existing behavior before discussion fizzled.

The reason for the current situation is so if a user builds and installs
Guix from source, localstatedir and sysconfdir will be located in
$prefix/var and $prefix/etc. See [2] for Ludo's comments on the matter,
[3] for the convention of localstatedir and sysconfdir being under
$prefix.

However, the "guix" package packaged with Guix (that's a sentence...)
configures itself with "--localstatedir=/var" and "--sysconfdir=/etc".
See (gnu packages package-management)[guix]. Many (~70) other packages
also use the "--localstatedir=/var" configure flag.

My understanding is this means even if Guix itself was built+installed
from source with the intent of custom Guix-specific var and etc
locations, various Guix-related files will inevitably wind up in /var
anyway. They would either appear from Guix directly or from the packages
Guix installs.

(I've noticed the Guix package'd guix be built in the process of
reconfiguring my system before, although the cause or impact of that
isn't clear to me. It may or may not try placing more files in /var and
/etc.)

As such, if the benefits in [2] aren't achievable (keeping every guix
state-based file in $prefix/var), perhaps it's worth biting the bullet.
Defaulting to /var and /etc would lower the complexity of building Guix.

The number of users manually installing from source is likely lower than
the number of users building Guix for testing purposes. And a user that
wants localstatedir in $prefix/var or sysconfdir in $prefix/etc can
still choose to specify that manually.

If that's not desirable, perhaps there is a third option?

./configure is already smart enough to detect if the configured
localstatedir does not match the installed Guix's localstatedir. How
about a mechanism that follows this process:

1. If ./configure is invoked without localstatedir and/or sysconfdir,
check if there is an existing Guix installation.

2. If there is an existing Guix installation, use the existing
localstatedir and sysconfdir values.

3. If there is not an existing Guix installation, use $prefix/var and
$prefix/etc.

My autotools skill level can be described as asymptotically approaching
0, so that suggestion may or may not be achievable. But I (naively)
think it would satisfy everyone.

Sorry for the wall of text! Congrats on making it to the end. Have a
cookie: 🍪

[1]: https://lists.gnu.org/archive/html/guix-devel/2016-02/msg00718.html
[2]: https://lists.gnu.org/archive/html/guix-devel/2017-09/msg00098.html
[3]: https://www.gnu.org/prep/standards/html_node/Directory-Variables.html
-- 
Take it easy,
Richard Sent
Making my computer weirder one commit at a time.


             reply	other threads:[~2024-05-01 20:49 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-01 20:49 Richard Sent [this message]
2024-05-02  9:00 ` Changing the defaults for --localstatedir and --sysconfdir? Ludovic Courtès
2024-05-02  9:11   ` Attila Lendvai
2024-05-02 23:23     ` Romain
2024-05-02 11:31   ` Janneke Nieuwenhuizen
2024-05-02 18:14     ` Vagrant Cascadian via Development of GNU Guix and the GNU System distribution.
2024-05-02 12:58   ` Andreas Enge
2024-05-02 16:37     ` Efraim Flashner
2024-05-06 10:06       ` Ludovic Courtès
2024-05-02 16:35   ` Efraim Flashner
2024-06-07 12:54     ` Felix Lechner via Development of GNU Guix and the GNU System distribution.
2024-06-09  0:58       ` Maxim Cournoyer
2024-05-03 10:10   ` Ricardo Wurmus
2024-05-06 10:08     ` Ludovic Courtès
2024-05-07 20:07   ` Simon Tournier

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=87sez19s1o.fsf@freakingpenguin.com \
    --to=richard@freakingpenguin.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 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).