configure.ac: Set default value for the 'prefix' variable.
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. Reviewed-by: Ludovic Courtès <ludo@gnu.org> Change-Id: I23cd12b58a842d246fbc9fdc740311c573eb0212master
parent
94c8cec999
commit
77771036f0
|
@ -73,9 +73,11 @@ AC_ARG_ENABLE([daemon],
|
||||||
[guix_build_daemon="$enableval"],
|
[guix_build_daemon="$enableval"],
|
||||||
[guix_build_daemon="yes"])
|
[guix_build_daemon="yes"])
|
||||||
|
|
||||||
# Prepare a version of $localstatedir & co. that does not contain references
|
dnl Prepare a version of $localstatedir & co. that does not contain references
|
||||||
# to shell variables.
|
dnl to shell variables. Also set some sane default directory variables for
|
||||||
guix_prefix="`eval echo $prefix | sed -e"s|NONE|/usr/local|g"`"
|
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_localstatedir="`eval echo $localstatedir | sed -e "s|NONE|$guix_prefix|g"`"
|
||||||
guix_sysconfdir="`eval echo $sysconfdir | 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"`"
|
guix_sbindir="`eval echo $sbindir | sed -e "s|NONE|$guix_prefix|g"`"
|
||||||
|
|
|
@ -235,7 +235,7 @@ more information.
|
||||||
Then, run:
|
Then, run:
|
||||||
|
|
||||||
@example
|
@example
|
||||||
./configure --localstatedir=/var --sysconfdir=/etc
|
./configure
|
||||||
@end example
|
@end example
|
||||||
|
|
||||||
@noindent
|
@noindent
|
||||||
|
@ -246,19 +246,6 @@ normal @code{sysconfdir} value. Note that you will probably not run
|
||||||
important to pass the right @code{localstatedir} and @code{sysconfdir}
|
important to pass the right @code{localstatedir} and @code{sysconfdir}
|
||||||
values, which get recorded in the @code{(guix config)} Guile module.
|
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
|
Finally, you can build Guix and, if you feel so inclined, run the tests
|
||||||
(@pxref{Running the Test Suite}):
|
(@pxref{Running the Test Suite}):
|
||||||
|
|
||||||
|
|
|
@ -5093,7 +5093,7 @@ use_guix()
|
||||||
# Predefine configure flags.
|
# Predefine configure flags.
|
||||||
configure()
|
configure()
|
||||||
@{
|
@{
|
||||||
./configure --localstatedir=/var --prefix=
|
./configure
|
||||||
@}
|
@}
|
||||||
export_function configure
|
export_function configure
|
||||||
|
|
||||||
|
|
Reference in New Issue