all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Changing the defaults for --localstatedir and --sysconfdir?
@ 2024-05-01 20:49 Richard Sent
  2024-05-02  9:00 ` Ludovic Courtès
  0 siblings, 1 reply; 15+ messages in thread
From: Richard Sent @ 2024-05-01 20:49 UTC (permalink / raw)
  To: guix-devel

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.


^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2024-06-09  0:59 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-01 20:49 Changing the defaults for --localstatedir and --sysconfdir? Richard Sent
2024-05-02  9:00 ` 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

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.