Hi, On jeu., 02 mai 2024 at 11:00, Ludovic Courtès <l...@gnu.org> wrote: > Richard Sent <rich...@freakingpenguin.com> skribis: > >> As everyone who's built Guix from source knows, when running ./configure >> on a system with an existing Guix installation you must remember to >> specify --localstatedir=/var and --sysconfdir=/etc. I think we should >> consider whether those variables should default to those values. > > I think it would make sense.
I have always been for changing the defaults but GNU standards… > Before I advocated that we should preferably stick to the GNU standards > and have users make informed choices (that’s how we ended up with the > ‘GUIX_CHECK_LOCALSTATEDIR’ macro that warns users but lets them > explicitly pass ‘--localstatedir’.) …and I have never understood this argument. :-) Well, these GNU Standards read: ‘sysconfdir’ [...] This directory should normally be /usr/local/etc, but write it as $(prefix)/etc. (If you are using Autoconf, write it as ‘@sysconfdir@’.) ‘localstatedir’ [...] $(localstatedir) should normally be /usr/local/var, but write it as $(prefix)/var. (If you are using Autoconf, write it as ‘@localstatedir@’.) https://www.gnu.org/prep/standards/standards.html#Directory-Variables As Ricardo pointed, it could be confusing to have some defaults as GNU Standards recommend and only 2 different. Especially, $(prefix) might appear elsewhere as recommendation: ’exec_prefix’ so then ’bindir’, ’sbindir’ etc., ‘datarootdir’ so ’datadir’, ‘sharedstatedir’, ‘includedir’, etc. Therefore, setting also by default ’prefix’ as /. would mean ’bindir’ equals to /bin. That’s fine… we need to adjust accordingly guix-install.sh, to my knowledge. Well, this ’prefix’ default matters only in one case: other distro packaging Guix, right? And I guess these distro do not run “make install” with the default GNU Standards ’prefix’ recommendation (/usr/local/bin/) and modifies it to /usr/, I guess. On foreign distro: $ ls -a /usr/local/bin/ . .. guix This ’guix’ comes from guix-install.sh. All in all, the surprise when defaulting ’prefix’, ’localstatedir’ and ’sysconfdir’ should be very limited, no? Cheers, simon