GNU bug report logs - #71022
[PATCH] configure.ac: Set default value for the 'prefix' variable.

Previous Next

Package: guix-patches;

Reported by: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>

Date: Fri, 17 May 2024 23:56:02 UTC

Severity: normal

Tags: patch

Done: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


Message #20 received at 71022 <at> debbugs.gnu.org (full text, mbox):

From: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
To: Ludovic Courtès <ludo <at> gnu.org>
Cc: Simon Tournier <zimon.toutoune <at> gmail.com>,
 Vagrant Cascadian <vagrant <at> debian.org>,
 Richard Sent <richard <at> freakingpenguin.com>, 71022 <at> debbugs.gnu.org,
 Efraim Flashner <efraim <at> flashner.co.il>,
 Florian Pelz <pelzflorian <at> pelzflorian.de>, Ricardo Wurmus <rekado <at> elephly.net>,
 Andreas Enge <andreas <at> enge.fr>, Attila Lendvai <attila <at> lendvai.name>,
 Matthew Trzcinski <matt <at> excalamus.com>,
 Janneke Nieuwenhuizen <janneke <at> gnu.org>
Subject: Re: [bug#71022] [PATCH] configure.ac: Set default value for the
 'prefix' variable.
Date: Wed, 22 May 2024 08:30:01 -0400
Hi Ludovic,

Ludovic Courtès <ludo <at> gnu.org> writes:

> Hi Maxim,
>
> Maxim Cournoyer <maxim.cournoyer <at> gmail.com> skribis:
>
>> 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.
>>
>> Change-Id: I23cd12b58a842d246fbc9fdc740311c573eb0212
>
> [...]
>
>> +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=
>
> Shouldn’t it read “prefix=/”?

This is what I went for originally, but it would cause this error:

--8<---------------cut here---------------start------------->8---
configure: error: chosen localstatedir '//var' does not match that of the existing installation '/var'
Installing may corrupt /gnu/store!
Use './configure --localstatedir=/var'.
--8<---------------cut here---------------end--------------->8---

So it seems Autoconf's generated configure script expects --prefix to
*not* contain a trailing '/', which is the case for --prefix=/.

> Might be good to check whether this breaks “make distcheck”, so I
> suppose it should be fine.

Good suggestion; I just tested the target and the tarball was
successfully generated.

> Apart from that it LGTM.  Thanks for this patch!

Thanks for reviewing it!  I'll send a v2, and wait for further comments,
if any.

-- 
Maxim




This bug report was last modified 1 year and 53 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.