* Re: Changing the defaults for --localstatedir and --sysconfdir?
2024-05-02 9:00 ` Ludovic Courtès
@ 2024-05-02 9:11 ` Attila Lendvai
2024-05-02 23:23 ` Romain
2024-05-02 11:31 ` Janneke Nieuwenhuizen
` (4 subsequent siblings)
5 siblings, 1 reply; 15+ messages in thread
From: Attila Lendvai @ 2024-05-02 9:11 UTC (permalink / raw)
To: Ludovic Courtès; +Cc: Richard Sent, guix-devel
> What do others think?
i don't really understand all the consequences of this choice... but as a newcomer it surely was strange that i have to use a special incantation that i need to remember, and is added to the documentation, and is explained repeatedly on IRC... instead of making it the default.
good defaults are important. and it's better if the default value causes the least surprise to the ones who know the least.
--
• attila lendvai
• PGP: 963F 5D5F 45C7 DFCD 0A39
--
“[…] the real self is dangerous: dangerous for the established church, dangerous for the state, dangerous for the crowd, dangerous for the tradition, because once a man knows his real self, he becomes an individual.”
— Osho (1931–1990)
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Changing the defaults for --localstatedir and --sysconfdir?
2024-05-02 9:11 ` Attila Lendvai
@ 2024-05-02 23:23 ` Romain
0 siblings, 0 replies; 15+ messages in thread
From: Romain @ 2024-05-02 23:23 UTC (permalink / raw)
To: guix-devel, Attila Lendvai, Ludovic Courtès; +Cc: Richard Sent
On May 2, 2024 8:11:24 AM GMT-01:00, Attila Lendvai <attila@lendvai.name> wrote:
>> What do others think?
>
>i don't really understand all the consequences of this choice... but as a newcomer it surely was strange that i have to use a special incantation that i need to remember, and is added to the documentation, and is explained repeatedly on IRC... instead of making it the default.
>
I totally agree with this too, as a newcomer to Guix and as a person who is setting up new buildtrees somehow frequently.
Romain
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Changing the defaults for --localstatedir and --sysconfdir?
2024-05-02 9:00 ` Ludovic Courtès
2024-05-02 9:11 ` Attila Lendvai
@ 2024-05-02 11:31 ` Janneke Nieuwenhuizen
2024-05-02 18:14 ` Vagrant Cascadian via Development of GNU Guix and the GNU System distribution.
2024-05-02 12:58 ` Andreas Enge
` (3 subsequent siblings)
5 siblings, 1 reply; 15+ messages in thread
From: Janneke Nieuwenhuizen @ 2024-05-02 11:31 UTC (permalink / raw)
To: Ludovic Courtès; +Cc: Richard Sent, guix-devel, Vagrant Cascadian
Ludovic Courtès writes:
> Richard Sent <richard@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.
>
> 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’.)
>
> That was 8 years ago though (eight!). At this point I think defaulting
> to /var and /etc would do more good than harm.
>
> What do others think?
It would be certainly convenient for many us but there should probably a
warning or an error? (cc: @Vagrant) when not on Guix System?
Greetings
Janneke
--
Janneke Nieuwenhuizen <janneke@gnu.org> | GNU LilyPond https://LilyPond.org
Freelance IT https://www.JoyOfSource.com | Avatar® https://AvatarAcademy.com
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Changing the defaults for --localstatedir and --sysconfdir?
2024-05-02 11:31 ` Janneke Nieuwenhuizen
@ 2024-05-02 18:14 ` Vagrant Cascadian via Development of GNU Guix and the GNU System distribution.
0 siblings, 0 replies; 15+ messages in thread
From: Vagrant Cascadian via Development of GNU Guix and the GNU System distribution. @ 2024-05-02 18:14 UTC (permalink / raw)
To: Janneke Nieuwenhuizen, Ludovic Courtès; +Cc: Richard Sent, guix-devel
[-- Attachment #1: Type: text/plain, Size: 1697 bytes --]
On 2024-05-02, Janneke Nieuwenhuizen wrote:
> Ludovic Courtès writes:
>
>> Richard Sent <richard@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.
>>
>> 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’.)
>>
>> That was 8 years ago though (eight!). At this point I think defaulting
>> to /var and /etc would do more good than harm.
>>
>> What do others think?
>
> It would be certainly convenient for many us but there should probably a
> warning or an error? (cc: @Vagrant) when not on Guix System?
I think /var and /etc would be saner defaults from Debian's perspective
for --localstatedir and --sysconfdir.
That said, all my workflows for passing this are either building the
Debian package (for which it explicitly passes /var and /etc) and
building guix for use with "./pre-inst-env guix ..." for both of those
use cases seem /var and /etc on my systems.
I am not sure what workflows might break by changing the defaults; some
people and systems still use /usr/local for locally built software, such
as FreeBSD ports and similar systems. Not sure how relevent they are to
guix at this point, at least...
live well,
vagrant
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 227 bytes --]
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Changing the defaults for --localstatedir and --sysconfdir?
2024-05-02 9:00 ` Ludovic Courtès
2024-05-02 9:11 ` Attila Lendvai
2024-05-02 11:31 ` Janneke Nieuwenhuizen
@ 2024-05-02 12:58 ` Andreas Enge
2024-05-02 16:37 ` Efraim Flashner
2024-05-02 16:35 ` Efraim Flashner
` (2 subsequent siblings)
5 siblings, 1 reply; 15+ messages in thread
From: Andreas Enge @ 2024-05-02 12:58 UTC (permalink / raw)
To: Ludovic Courtès; +Cc: Richard Sent, guix-devel
Am Thu, May 02, 2024 at 11:00:15AM +0200 schrieb Ludovic Courtès:
> That was 8 years ago though (eight!). At this point I think defaulting
> to /var and /etc would do more good than harm.
> What do others think?
I have always been in favour of /var and /etc as defaults, and
unsurprisingly still am. That would make the "technical" default coincide
with the "social" default.
Another option discussed at the time, but which would require to start from
scratch in a sense, is to have everything Guix related under /gnu. I have
always found it weird that the database registering the contents of
/gnu/store was not close to /gnu/store; by moving it into /gnu, one could
delete/backup/restore the directory easily.
Andreas
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Changing the defaults for --localstatedir and --sysconfdir?
2024-05-02 12:58 ` Andreas Enge
@ 2024-05-02 16:37 ` Efraim Flashner
2024-05-06 10:06 ` Ludovic Courtès
0 siblings, 1 reply; 15+ messages in thread
From: Efraim Flashner @ 2024-05-02 16:37 UTC (permalink / raw)
To: Andreas Enge; +Cc: Ludovic Courtès, Richard Sent, guix-devel
[-- Attachment #1: Type: text/plain, Size: 1182 bytes --]
On Thu, May 02, 2024 at 02:58:39PM +0200, Andreas Enge wrote:
> Am Thu, May 02, 2024 at 11:00:15AM +0200 schrieb Ludovic Courtès:
> > That was 8 years ago though (eight!). At this point I think defaulting
> > to /var and /etc would do more good than harm.
> > What do others think?
>
> I have always been in favour of /var and /etc as defaults, and
> unsurprisingly still am. That would make the "technical" default coincide
> with the "social" default.
>
> Another option discussed at the time, but which would require to start from
> scratch in a sense, is to have everything Guix related under /gnu. I have
> always found it weird that the database registering the contents of
> /gnu/store was not close to /gnu/store; by moving it into /gnu, one could
> delete/backup/restore the directory easily.
It certainly would be nice to have everything Guix related under /gnu,
then we could also have the option of giving it its own btrfs subvolume.
--
Efraim Flashner <efraim@flashner.co.il> רנשלפ םירפא
GPG key = A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Changing the defaults for --localstatedir and --sysconfdir?
2024-05-02 16:37 ` Efraim Flashner
@ 2024-05-06 10:06 ` Ludovic Courtès
0 siblings, 0 replies; 15+ messages in thread
From: Ludovic Courtès @ 2024-05-06 10:06 UTC (permalink / raw)
To: Andreas Enge; +Cc: Richard Sent, guix-devel
Efraim Flashner <efraim@flashner.co.il> skribis:
> On Thu, May 02, 2024 at 02:58:39PM +0200, Andreas Enge wrote:
>> Am Thu, May 02, 2024 at 11:00:15AM +0200 schrieb Ludovic Courtès:
>> > That was 8 years ago though (eight!). At this point I think defaulting
>> > to /var and /etc would do more good than harm.
>> > What do others think?
>>
>> I have always been in favour of /var and /etc as defaults, and
>> unsurprisingly still am. That would make the "technical" default coincide
>> with the "social" default.
>>
>> Another option discussed at the time, but which would require to start from
>> scratch in a sense, is to have everything Guix related under /gnu. I have
>> always found it weird that the database registering the contents of
>> /gnu/store was not close to /gnu/store; by moving it into /gnu, one could
>> delete/backup/restore the directory easily.
>
> It certainly would be nice to have everything Guix related under /gnu,
> then we could also have the option of giving it its own btrfs subvolume.
Maybe, but that’s a much too complicated change…
Ludo’.
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Changing the defaults for --localstatedir and --sysconfdir?
2024-05-02 9:00 ` Ludovic Courtès
` (2 preceding siblings ...)
2024-05-02 12:58 ` Andreas Enge
@ 2024-05-02 16:35 ` Efraim Flashner
2024-06-07 12:54 ` Felix Lechner via Development of GNU Guix and the GNU System distribution.
2024-05-03 10:10 ` Ricardo Wurmus
2024-05-07 20:07 ` Simon Tournier
5 siblings, 1 reply; 15+ messages in thread
From: Efraim Flashner @ 2024-05-02 16:35 UTC (permalink / raw)
To: Ludovic Courtès; +Cc: Richard Sent, guix-devel
[-- Attachment #1: Type: text/plain, Size: 1335 bytes --]
On Thu, May 02, 2024 at 11:00:15AM +0200, Ludovic Courtès wrote:
> Hi Richard,
>
> Richard Sent <richard@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.
>
> 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’.)
>
> That was 8 years ago though (eight!). At this point I think defaulting
> to /var and /etc would do more good than harm.
>
> What do others think?
I think changing the defaults to use /var and /etc by default would be a
good change. If someone needs to use the /usr/local/{var,etc}
directories they're able to change back to the previous defaults
themselves.
--
Efraim Flashner <efraim@flashner.co.il> רנשלפ םירפא
GPG key = A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Changing the defaults for --localstatedir and --sysconfdir?
2024-05-02 16:35 ` Efraim Flashner
@ 2024-06-07 12:54 ` Felix Lechner via Development of GNU Guix and the GNU System distribution.
2024-06-09 0:58 ` Maxim Cournoyer
0 siblings, 1 reply; 15+ messages in thread
From: Felix Lechner via Development of GNU Guix and the GNU System distribution. @ 2024-06-07 12:54 UTC (permalink / raw)
To: Efraim Flashner, Ludovic Courtès; +Cc: Richard Sent, guix-devel
Hi everyone,
On Thu, May 02 2024, Efraim Flashner wrote:
> changing the defaults to use /var and /etc by default would be a good
> change.
If that's too complicated, someone could alternatively add
./configure --localstatedir=/var --sysconfdir=/etc
to ./bootstrap.
People needing different settings could then run ./configure again.
Kind regards
Felix
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Changing the defaults for --localstatedir and --sysconfdir?
2024-06-07 12:54 ` Felix Lechner via Development of GNU Guix and the GNU System distribution.
@ 2024-06-09 0:58 ` Maxim Cournoyer
0 siblings, 0 replies; 15+ messages in thread
From: Maxim Cournoyer @ 2024-06-09 0:58 UTC (permalink / raw)
To: Felix Lechner via Development of GNU Guix and the GNU System distribution.
Cc: Efraim Flashner, Ludovic Courtès, Felix Lechner,
Richard Sent
Hi,
Felix Lechner via "Development of GNU Guix and the GNU System
distribution." <guix-devel@gnu.org> writes:
> Hi everyone,
>
> On Thu, May 02 2024, Efraim Flashner wrote:
>
>> changing the defaults to use /var and /etc by default would be a good
>> change.
>
> If that's too complicated, someone could alternatively add
>
> ./configure --localstatedir=/var --sysconfdir=/etc
>
> to ./bootstrap.
In case someone missed it, the above is now the default (/var and /etc),
since commit 77771036f0970083c146b709d792d128f4235125 ("configure.ac:
Set default value for the 'prefix' variable.").
You can thus finally forget to use --localstatedir=/var
--sysconfdir=/etc when running the configure script.
--
Thanks,
Maxim
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Changing the defaults for --localstatedir and --sysconfdir?
2024-05-02 9:00 ` Ludovic Courtès
` (3 preceding siblings ...)
2024-05-02 16:35 ` Efraim Flashner
@ 2024-05-03 10:10 ` Ricardo Wurmus
2024-05-06 10:08 ` Ludovic Courtès
2024-05-07 20:07 ` Simon Tournier
5 siblings, 1 reply; 15+ messages in thread
From: Ricardo Wurmus @ 2024-05-03 10:10 UTC (permalink / raw)
To: Ludovic Courtès; +Cc: Richard Sent, guix-devel
Ludovic Courtès <ludo@gnu.org> writes:
> At this point I think defaulting
> to /var and /etc would do more good than harm.
Are those the only defaults that should change? These are the only ones
we are actively using, but perhaps it would be confusing to have
--prefix still point to /usr/local whereas --localstatedir and
--sysconfdir point to something appropriate for --prefix=/.
(I'm in favor of setting the expected defaults for --localstatedir and
--sysconfdir.)
--
Ricardo
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Changing the defaults for --localstatedir and --sysconfdir?
2024-05-03 10:10 ` Ricardo Wurmus
@ 2024-05-06 10:08 ` Ludovic Courtès
0 siblings, 0 replies; 15+ messages in thread
From: Ludovic Courtès @ 2024-05-06 10:08 UTC (permalink / raw)
To: Ricardo Wurmus; +Cc: Richard Sent, guix-devel
Hi,
Ricardo Wurmus <rekado@elephly.net> skribis:
> Ludovic Courtès <ludo@gnu.org> writes:
>
>> At this point I think defaulting
>> to /var and /etc would do more good than harm.
>
> Are those the only defaults that should change? These are the only ones
> we are actively using, but perhaps it would be confusing to have
> --prefix still point to /usr/local whereas --localstatedir and
> --sysconfdir point to something appropriate for --prefix=/.
Good point. Maybe we should in fact change the default prefix instead
of just localstatedir and sysconfdir?
Ludo’.
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Changing the defaults for --localstatedir and --sysconfdir?
2024-05-02 9:00 ` Ludovic Courtès
` (4 preceding siblings ...)
2024-05-03 10:10 ` Ricardo Wurmus
@ 2024-05-07 20:07 ` Simon Tournier
5 siblings, 0 replies; 15+ messages in thread
From: Simon Tournier @ 2024-05-07 20:07 UTC (permalink / raw)
To: Ludovic Courtès, Richard Sent; +Cc: guix-devel
Hi,
On jeu., 02 mai 2024 at 11:00, Ludovic Courtès <ludo@gnu.org> wrote:
> Richard Sent <richard@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
^ permalink raw reply [flat|nested] 15+ messages in thread