diff options
author | Ludovic Courtès <ludo@gnu.org> | 2016-03-19 14:45:58 +0100 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2016-03-19 15:07:46 +0100 |
commit | ef5f5c8659b1ca3999e362dfa33478e0a0150ced (patch) | |
tree | e2967b666c0434b76e4a16a9346f50fa04067958 /doc/guix.texi | |
parent | 7c49ab5b1c1aa79a06504456e4decc5112c5b9f9 (diff) | |
download | patches-ef5f5c8659b1ca3999e362dfa33478e0a0150ced.tar patches-ef5f5c8659b1ca3999e362dfa33478e0a0150ced.tar.gz |
build: Protect against misconfiguration of localstatedir.
Suggested by Jookia <166291@gmail.com>.
* m4/guix.m4 (GUIX_CURRENT_LOCALSTATEDIR, GUIX_CHECK_LOCALSTATEDIR): New
macros.
* config-daemon.ac: Use 'GUIX_CHECK_LOCALSTATEDIR'.
* Makefile.am (DISTCHECK_CONFIGURE_FLAGS): Add --localstatedir.
* doc/guix.texi (Requirements): Mention --localstatedir.
(The Store): Mention LOCALSTATEDIR as such.
Diffstat (limited to 'doc/guix.texi')
-rw-r--r-- | doc/guix.texi | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/doc/guix.texi b/doc/guix.texi index b36be05686..868948adfc 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -527,6 +527,14 @@ following packages are also needed: C++11 standard. @end itemize +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 @code{--localstatedir} option of the @command{configure} +script (@pxref{Directory Variables, @code{localstatedir},, standards, +GNU Coding Standards}). The @command{configure} script protects against +unintended misconfiguration of @var{localstatedir} so you do not +inadvertently corrupt your store (@pxref{The Store}). + When a working installation of @url{http://nixos.org/nix/, the Nix package manager} is available, you can instead configure Guix with @code{--disable-daemon}. In that case, @@ -2945,9 +2953,9 @@ Sub-directories in the store are referred to as @dfn{store items} or sometimes @dfn{store paths}. The store has an associated database that contains information such as the store paths referred to by each store path, and the list of @emph{valid} store items---results of successful -builds. This database resides in @file{/var/guix/db} (or under whatever -state directory was specified @i{via} @option{--localstatedir} at -configure time). +builds. This database resides in @file{@var{localstatedir}/guix/db}, +where @var{localstatedir} is the state directory specified @i{via} +@option{--localstatedir} at configure time, usually @file{/var}. The store is @emph{always} accessed by the daemon on behalf of its clients (@pxref{Invoking guix-daemon}). To manipulate the store, clients |