From patchwork Fri May 17 23:52:33 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxim Cournoyer X-Patchwork-Id: 64525 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 5E81F27BBEA; Sat, 18 May 2024 00:56:16 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI, SPF_HELO_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 47E8727BBE2 for ; Sat, 18 May 2024 00:56:15 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s87Qh-0004Yr-Ni; Fri, 17 May 2024 19:56:03 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1s87Qg-0004YU-2I for guix-patches@gnu.org; Fri, 17 May 2024 19:56:02 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1s87Qf-00009X-M0; Fri, 17 May 2024 19:56:01 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1s87Qg-0003ms-Kt; Fri, 17 May 2024 19:56:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#71022] [PATCH] configure.ac: Set default value for the 'prefix' variable. Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: pelzflorian@pelzflorian.de, ludo@gnu.org, matt@excalamus.com, maxim.cournoyer@gmail.com, guix-patches@gnu.org Resent-Date: Fri, 17 May 2024 23:56:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 71022 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 71022@debbugs.gnu.org Cc: Maxim Cournoyer , Simon Tournier , Vagrant Cascadian , ludo@gnu.org, Efraim Flashner , Ricardo Wurmus , Andreas Enge , Attila Lendvai , Richard Sent , Janneke Nieuwenhuizen , Florian Pelz , Ludovic =?utf-8?q?Court=C3=A8s?= , Matthew Trzcinski , Maxim Cournoyer X-Debbugs-Original-To: guix-patches@gnu.org X-Debbugs-Original-Xcc: Florian Pelz , Ludovic =?utf-8?q?Court=C3=A8s?= , Matthew Trzcinski , Maxim Cournoyer Received: via spool by submit@debbugs.gnu.org id=B.171599013514542 (code B ref -1); Fri, 17 May 2024 23:56:02 +0000 Received: (at submit) by debbugs.gnu.org; 17 May 2024 23:55:35 +0000 Received: from localhost ([127.0.0.1]:57947 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s87QF-0003mU-CJ for submit@debbugs.gnu.org; Fri, 17 May 2024 19:55:35 -0400 Received: from lists.gnu.org ([209.51.188.17]:45196) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s87QC-0003mO-A2 for submit@debbugs.gnu.org; Fri, 17 May 2024 19:55:33 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1s87O2-0004DJ-TO for guix-patches@gnu.org; Fri, 17 May 2024 19:53:18 -0400 Received: from mail-yw1-x1135.google.com ([2607:f8b0:4864:20::1135]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1s87O0-000893-QH; Fri, 17 May 2024 19:53:18 -0400 Received: by mail-yw1-x1135.google.com with SMTP id 00721157ae682-62036051972so7978907b3.1; Fri, 17 May 2024 16:53:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1715989993; x=1716594793; darn=gnu.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=Uaq2gwSO2xGxuaRVUpI2osQam0rhtAlAigodtEs01/4=; b=aj7iRlwQHXOfxAYxxLiT7JH33Hji+B6+Ntc0jMZZ4KYzbZBB9LGuVvsZX/uMn5LeYR 834E5Ws/9NHvuK21BsxxZwKoVSN/sy57ED1nQ3C6t+mfGrlL2KH49Ti2V+eAKsdKcleu Ey7xPBWIprKfYGBdl6X6dTfLfb5AnEGKcS3BDrXDbz4r4jeK9YkBt1o0tpTV9ea3jqry aAYr/OppYtahv1WVwuUckx7hTNr8En1UAr1e4X/qwdhMhD5CjycT+S80V13XBf5RX19W dEAi0UN0RC/ZkScw9N7kL6k+vvQY3Q/9aeFRspjK49fbuE1nocbyO9EZC+n4E/B5geBn PDZQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715989993; x=1716594793; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=Uaq2gwSO2xGxuaRVUpI2osQam0rhtAlAigodtEs01/4=; b=A7TC7FtgatLYsfiCIjUcDYHk1x8L3ZdgNmB9TDtLFuzoUmgx8PP5a7fICaQIipEuAO Eq7p8SMwdppMJaKPL/oDfs2K5OvZBe2NtNuS2WsCJWfoh6rAmmRbw5LZc/istQcHWztl yeo1djqWBw7eGlegXgA3iVA58GnMaTFe7vYSpgMOUQfLymK0UPzvOpf3SKRo3eZQhNuU zfQrWsQPJKRyTqS+W+pgmkzzbyMX6jrGMcRaiF85h3tf20AV6FvSUJKPLU3iyQz/6I8M iz8t8ajeSuruz0bctZQz1yYcwIEX4OQRAYlFIvkANM6t/rzAqdHwgHRH4r/pHN7EWj2n kdYA== X-Forwarded-Encrypted: i=1; AJvYcCWEbqbOcMyspNuyfRTJypM8+IzRVBfqIURoWKaJD87edpAXVw9bAXlh4OTQAUYWTAb+abof8egqjz6RPaMaUQg= X-Gm-Message-State: AOJu0YzfwBAwdlVjoKhM0ulievoNe208apQn7QviwaRar/BSCEOb4ABe Ho3mLYlGXM1ePoSlEKK+XbhM0Rbzyyw5Z14MKAfdnze1oIvprIkACZFU4MxX X-Google-Smtp-Source: AGHT+IFZkux2PKjVBZsjNvV/vJWkVk30JTk1kEI3KrCUFGHxpjhELcr/7h/pktSfxuyUoieG5XTKRw== X-Received: by 2002:a0d:e605:0:b0:627:788e:94c7 with SMTP id 00721157ae682-627788e96fbmr69281697b3.6.1715989992676; Fri, 17 May 2024 16:53:12 -0700 (PDT) Received: from localhost.localdomain (dsl-155-127.b2b2c.ca. [66.158.155.127]) by smtp.gmail.com with ESMTPSA id d75a77b69052e-43df54b590csm116150041cf.13.2024.05.17.16.53.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 May 2024 16:53:12 -0700 (PDT) From: Maxim Cournoyer Date: Fri, 17 May 2024 19:52:33 -0400 Message-ID: <9ac2df37867548ae5e15e4c262458d8fc63ba9a1.1715989953.git.maxim.cournoyer@gmail.com> X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::1135; envelope-from=maxim.cournoyer@gmail.com; helo=mail-yw1-x1135.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches 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 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 --- configure.ac | 4 ++++ doc/contributing.texi | 15 +-------------- doc/guix-cookbook.texi | 2 +- 3 files changed, 6 insertions(+), 15 deletions(-) base-commit: 5a624adfd7b14c3717237d137bd0766c77f0f570 diff --git a/configure.ac b/configure.ac index 8c3a06da37..f831416650 100644 --- a/configure.ac +++ b/configure.ac @@ -73,6 +73,10 @@ AC_ARG_ENABLE([daemon], [guix_build_daemon="$enableval"], [guix_build_daemon="yes"]) +dnl Set some sane default directory variables for use with the Guix. This +dnl also causes localstatedir to be /var and sysconfdir to be /etc. +test "$prefix" = NONE && prefix= + # 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"`" 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