guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Archive authentication & ‘guix challenge’


From: myglc2
Subject: Re: Archive authentication & ‘guix challenge’
Date: Tue, 14 Feb 2017 18:16:29 -0500
User-agent: mu4e 0.9.18; emacs 25.1.1

On 02/14/2017 at 16:29 Ludovic Courtès writes:

> myglc2 <address@hidden> skribis:
>
>> address@hidden ~/src/guix [env]$ ./configure --sysconfdir=/etc
>>
>> ... it gave this message ...
>>
>> [...]
>> checking the current installation's localstatedir... /var
>> configure: error: chosen localstatedir '/usr/local/var' does not match that 
>> of the existing installation '/var'
>> Installing may corrupt /gnu/store!
>> Use './configure --localstatedir=/var'.
>>
>> ... which left me wondering if it meant ...
>
> Do like it says.  :-)
>
> That is, it noticed that your system has /var/guix/db and that you were
> configuring with a different state directory, which is a mistake you’d
> rather avoid (see the bits about localstatedir at
> <https://www.gnu.org/software/guix/manual/html_node/Requirements.html>).
>
> So:
>
>   ./configure --localstatedir=/var --sysconfdir=/etc -C

OK, thank you. That works :-) Many thanks! 

FWIW, here are a couple patches that would make this clearer.

diff --git a/doc/guix.texi b/doc/guix.texi
index 6cdb5e592..60cc073a0 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -582,12 +582,13 @@ C++11 standard.
 
 @cindex state directory
 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}).
+you should specify the same state directory as the existing
+installation, (typically @code{/var} on GuixSD, and @code{???} on Guix
+installations) using the @code{--localstatedir} option of the
address@hidden script (@pxref{Directory Variables,
address@hidden,, standards, GNU Coding Standards}).  If in doubt,
+leave it unspecified and the @command{configure} script will recommend
+the correct value.
 
 @cindex Nix, compatibility
 When a working installation of @url{http://nixos.org/nix/, the Nix package


diff --git a/m4/guix.m4 b/m4/guix.m4
index 663059841..25de46516 100644
--- a/m4/guix.m4
+++ b/m4/guix.m4
@@ -357,10 +357,9 @@ AC_DEFUN([GUIX_CHECK_LOCALSTATEDIR], [
       case "$localstatedir" in
         NONE|\${prefix}*)
           # User kept the default value---i.e., did not pass '--localstatedir'.
-          AC_MSG_ERROR([chosen localstatedir '$guix_localstatedir' does not 
match \
-that of the existing installation '$guix_cv_current_localstatedir'
-Installing may corrupt $storedir!
-Use './configure --localstatedir=$guix_cv_current_localstatedir'.])
+          AC_MSG_ERROR([The default localstatedir '$guix_localstatedir' does 
not match \
+that of the existing installation, which is '$guix_cv_current_localstatedir'
+so you should add './configure 
--localstatedir=$guix_cv_current_localstatedir'.])
           ;;
         *)
           # User passed an explicit '--localstatedir'.  Assume they know what




reply via email to

[Prev in Thread] Current Thread [Next in Thread]