From mboxrd@z Thu Jan 1 00:00:00 1970 From: myglc2 Subject: Re: Archive authentication & =?utf-8?Q?=E2=80=98guix_challenge?= =?utf-8?Q?=E2=80=99?= Date: Tue, 14 Feb 2017 18:16:29 -0500 Message-ID: <86zihos6r6.fsf@gmail.com> References: <8737goz2ba.fsf@gnu.org> <8660kud3u4.fsf@gmail.com> <874m03z5h2.fsf_-_@gnu.org> <86o9y9fybz.fsf@gmail.com> <87shnk3iib.fsf@gnu.org> <87y3xa4z08.fsf@gmail.com> <8760kefaoc.fsf@gnu.org> <864lzy10b9.fsf@gmail.com> <87vasduo0h.fsf@gnu.org> <86mvdog50p.fsf@gmail.com> <87fujgspm4.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:43873) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cdmKs-00031G-1A for guix-devel@gnu.org; Tue, 14 Feb 2017 18:16:39 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cdmKo-0000Qr-2c for guix-devel@gnu.org; Tue, 14 Feb 2017 18:16:38 -0500 In-reply-to: <87fujgspm4.fsf@gnu.org> List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: Ludovic =?utf-8?Q?Court=C3=A8s?= Cc: guix-devel@gnu.org, Maxim Cournoyer On 02/14/2017 at 16:29 Ludovic Courtès writes: > myglc2 skribis: > >> g1@g1 ~/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 > ). > > 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 +@command{configure} script (@pxref{Directory Variables, +@code{localstatedir},, 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