From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
To: 71022@debbugs.gnu.org
Cc: "Maxim Cournoyer" <maxim.cournoyer@gmail.com>,
"Simon Tournier" <zimon.toutoune@gmail.com>,
"Vagrant Cascadian" <vagrant@debian.org>,
ludo@gnu.org, "Efraim Flashner" <efraim@flashner.co.il>,
"Ricardo Wurmus" <rekado@elephly.net>,
"Andreas Enge" <andreas@enge.fr>,
"Attila Lendvai" <attila@lendvai.name>,
"Richard Sent" <richard@freakingpenguin.com>,
"Janneke Nieuwenhuizen" <janneke@gnu.org>,
"Florian Pelz" <pelzflorian@pelzflorian.de>,
"Ludovic Courtès" <ludo@gnu.org>,
"Matthew Trzcinski" <matt@excalamus.com>,
"Maxim Cournoyer" <maxim.cournoyer@gmail.com>
Subject: [bug#71022] [PATCH v2] configure.ac: Set default value for the 'prefix' variable.
Date: Wed, 22 May 2024 08:51:57 -0400 [thread overview]
Message-ID: <8e5c69aa6d108ce35c3124a969252227ce9ed178.1716382317.git.maxim.cournoyer@gmail.com> (raw)
In-Reply-To: <9ac2df37867548ae5e15e4c262458d8fc63ba9a1.1715989953.git.maxim.cournoyer@gmail.com>
The Guix standard configuration uses a localstatedir of /var and a sysconfdir
of /etc. To ease things for everyone, make the default values match that
standard expected configuration. See
<https://lists.gnu.org/archive/html/guix-devel/2024-05/msg00003.html> for a
related discussion.
* configure.ac: Default $prefix to '' unless already set.
* doc/contributing.texi (Building from Git): Streamline doc.
* doc/guix-cookbook.texi (Guix environment via direnv): Likewise.
Change-Id: I23cd12b58a842d246fbc9fdc740311c573eb0212
---
Changes in v2:
- combine comments and default directory variables manipulation
configure.ac | 8 +++++---
doc/contributing.texi | 15 +--------------
doc/guix-cookbook.texi | 2 +-
3 files changed, 7 insertions(+), 18 deletions(-)
diff --git a/configure.ac b/configure.ac
index 8c3a06da37..c7b61d56a7 100644
--- a/configure.ac
+++ b/configure.ac
@@ -73,9 +73,11 @@ AC_ARG_ENABLE([daemon],
[guix_build_daemon="$enableval"],
[guix_build_daemon="yes"])
-# Prepare a version of $localstatedir & co. that does not contain references
-# to shell variables.
-guix_prefix="`eval echo $prefix | sed -e"s|NONE|/usr/local|g"`"
+dnl Prepare a version of $localstatedir & co. that does not contain references
+dnl to shell variables. Also set some sane default directory variables for
+dnl use with the Guix. This also causes localstatedir to be /var and
+dnl sysconfdir to be /etc.
+test "$prefix" = NONE && prefix=
guix_localstatedir="`eval echo $localstatedir | sed -e "s|NONE|$guix_prefix|g"`"
guix_sysconfdir="`eval echo $sysconfdir | sed -e "s|NONE|$guix_prefix|g"`"
guix_sbindir="`eval echo $sbindir | sed -e "s|NONE|$guix_prefix|g"`"
diff --git a/doc/contributing.texi b/doc/contributing.texi
index 66f4e86d0a..539b4dd0d3 100644
--- a/doc/contributing.texi
+++ b/doc/contributing.texi
@@ -235,7 +235,7 @@ Building from Git
Then, run:
@example
-./configure --localstatedir=/var --sysconfdir=/etc
+./configure
@end example
@noindent
@@ -246,19 +246,6 @@ Building from Git
important to pass the right @code{localstatedir} and @code{sysconfdir}
values, which get recorded in the @code{(guix config)} Guile module.
-When configuring Guix on a system that already has a Guix installation,
-be sure to specify the same state directory as the existing installation
-using the @option{--localstatedir} option of the @command{configure}
-script (@pxref{Directory Variables, @code{localstatedir},, standards,
-GNU Coding Standards}). Usually, this @var{localstatedir} option is set
-to the value @file{/var}. The @command{configure} script protects
-against unintended misconfiguration of @var{localstatedir} so you do not
-inadvertently corrupt your store (@pxref{The Store}). The configuration
-directory should also be configured by setting the @option{--sysconfdir}
-option to the @file{/etc} value, which is the location used by Guix to
-store for example the access control list of authorized machines and the
-definition of offload machines.
-
Finally, you can build Guix and, if you feel so inclined, run the tests
(@pxref{Running the Test Suite}):
diff --git a/doc/guix-cookbook.texi b/doc/guix-cookbook.texi
index 3bc63cba7a..cbd088632a 100644
--- a/doc/guix-cookbook.texi
+++ b/doc/guix-cookbook.texi
@@ -5076,7 +5076,7 @@ Guix environment via direnv
# Predefine configure flags.
configure()
@{
- ./configure --localstatedir=/var --prefix=
+ ./configure
@}
export_function configure
base-commit: 5a624adfd7b14c3717237d137bd0766c77f0f570
--
2.41.0
next prev parent reply other threads:[~2024-05-22 12:54 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-17 23:52 [bug#71022] [PATCH] configure.ac: Set default value for the 'prefix' variable Maxim Cournoyer
2024-05-19 10:42 ` Ricardo Wurmus
2024-05-22 0:16 ` Maxim Cournoyer
2024-05-19 14:16 ` Ludovic Courtès
2024-05-22 12:30 ` Maxim Cournoyer
2024-05-23 9:17 ` Ludovic Courtès
2024-05-22 0:24 ` Maxim Cournoyer
2024-05-22 12:51 ` Maxim Cournoyer [this message]
2024-05-23 9:17 ` [bug#71022] [PATCH v2] " Ludovic Courtès
2024-05-26 3:38 ` bug#71022: " Maxim Cournoyer
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=8e5c69aa6d108ce35c3124a969252227ce9ed178.1716382317.git.maxim.cournoyer@gmail.com \
--to=maxim.cournoyer@gmail.com \
--cc=71022@debbugs.gnu.org \
--cc=andreas@enge.fr \
--cc=attila@lendvai.name \
--cc=efraim@flashner.co.il \
--cc=janneke@gnu.org \
--cc=ludo@gnu.org \
--cc=matt@excalamus.com \
--cc=pelzflorian@pelzflorian.de \
--cc=rekado@elephly.net \
--cc=richard@freakingpenguin.com \
--cc=vagrant@debian.org \
--cc=zimon.toutoune@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 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.