Request: add a short description field for os-configuration

  • Open
  • quality assurance status badge
Details
5 participants
  • Martin Castillo
  • Danny Milosavljevic
  • Ludovic Courtès
  • ng0
  • zimoun
Owner
unassigned
Submitted by
Martin Castillo
Severity
wishlist
M
M
Martin Castillo wrote on 23 Mar 2018 13:51
(address . bug-guix@gnu.org)
d2032740-2182-6ded-a36c-14b6cdb5071b@uni-bremen.de
hi,

the grub entries for old system generations aren't very helpful. It
would be nice, if there was a field in the operating system declaration
stating what was changed in this generation, that would be added to the
boot entry label.

Martin
--
GPG: 7FDE 7190 2F73 2C50 236E 403D CC13 48F1 E644 08EC
Attachment: signature.asc
N
(name . Martin Castillo)(address . castilma@uni-bremen.de)(address . 30916@debbugs.gnu.org)
20180323141537.64xtvlgalhlzlz3z@abyayala
Martin Castillo transcribed 1.6K bytes:
Toggle quote (12 lines)
> hi,
>
> the grub entries for old system generations aren't very helpful. It
> would be nice, if there was a field in the operating system declaration
> stating what was changed in this generation, that would be added to the
> boot entry label.
>
> Martin
> --
> GPG: 7FDE 7190 2F73 2C50 236E 403D CC13 48F1 E644 08EC
>

Hi,

Could you be a more specific what you think is missing?
Your request is written in a very open way, and the space in GRUB menus is
limited as far as I assume.


--
A88C8ADD129828D7EAC02E52E22F9BBFEE348588
M
M
Martin Castillo wrote on 24 Mar 2018 13:33
(name . ng0)(address . ng0@n0.is)(address . 30916@debbugs.gnu.org)
06f52ff5-4019-e449-1f56-a585c759abb1@uni-bremen.de
Hi,

On 23.03.2018 15:15, ng0 wrote:

Toggle quote (4 lines)
> Could you be a more specific what you think is missing?
> Your request is written in a very open way, and the space in GRUB menus is
> limited as far as I assume.

Sure,

Currently the grub menu looks like
GNU with Linux-Libre 4.15.12 (beta)
GNU system, old configurations...

and in the submenu
GNU with Linux-Libre 4.15.6 (beta) (#1, 2017-12-18 13:45)
GNU with Linux-Libre 4.15.8 (beta) (#2, 2017-12-22 12:15)
GNU with Linux-Libre 4.15.11 (beta) (#3, 2018-03-23 15:32)

but I'd like to have something like

GNU with Linux-Libre 4.15.12 (beta) [Add ssh-service on port 2222]
GNU system, old configurations...

and in the submenu
GNU with Linux-Libre 4.15.6 (beta) (#1, 2017-12-18 13:45)
GNU with Linux-Libre 4.15.8 (beta) (#2, 2017-12-22 12:15) [Add user bob]
GNU with Linux-Libre 4.15.11 (beta) (#3, 2018-03-23 15:32) [Add xfce]

where the description at the end comes from a field in the operating
system configuration (or the bootloader configuration).

--
GPG: 7FDE 7190 2F73 2C50 236E 403D CC13 48F1 E644 08EC
Attachment: signature.asc
N
(name . Martin Castillo)(address . castilma@uni-bremen.de)
20180324124556.7x36ap6mfeugc7pa@abyayala
Martin Castillo transcribed 2.5K bytes:
Toggle quote (36 lines)
> Hi,
>
> On 23.03.2018 15:15, ng0 wrote:
>
> > Could you be a more specific what you think is missing?
> > Your request is written in a very open way, and the space in GRUB menus is
> > limited as far as I assume.
>
> Sure,
>
> Currently the grub menu looks like
> GNU with Linux-Libre 4.15.12 (beta)
> GNU system, old configurations...
>
> and in the submenu
> GNU with Linux-Libre 4.15.6 (beta) (#1, 2017-12-18 13:45)
> GNU with Linux-Libre 4.15.8 (beta) (#2, 2017-12-22 12:15)
> GNU with Linux-Libre 4.15.11 (beta) (#3, 2018-03-23 15:32)
>
> but I'd like to have something like
>
> GNU with Linux-Libre 4.15.12 (beta) [Add ssh-service on port 2222]
> GNU system, old configurations...
>
> and in the submenu
> GNU with Linux-Libre 4.15.6 (beta) (#1, 2017-12-18 13:45)
> GNU with Linux-Libre 4.15.8 (beta) (#2, 2017-12-22 12:15) [Add user bob]
> GNU with Linux-Libre 4.15.11 (beta) (#3, 2018-03-23 15:32) [Add xfce]
>
> where the description at the end comes from a field in the operating
> system configuration (or the bootloader configuration).
>
> --
> GPG: 7FDE 7190 2F73 2C50 236E 403D CC13 48F1 E644 08EC
>

So basically you want a field in the operating-system declaration where you
can _manually_ set a description of a certain maximum length which will be
added to the GRUB entry of the generated system generation?
I don't see automatic generation happening, as there's so much that can be
changed and automated summary would easily mess up the GRUB list. I wouldn't
want that. If anything, optional entry with a manual note is the way to do it.


--
A88C8ADD129828D7EAC02E52E22F9BBFEE348588
-----BEGIN PGP SIGNATURE-----

iQIzBAABCgAdFiEEqIyK3RKYKNfqwC5S4i+bv+40hYgFAlq2SIQACgkQ4i+bv+40
hYgZHxAAgK9SsG9V3Oeefo0Utf+Tio/J7JfEwDvZbEfGy+cjUifdX9XT0JAelwUS
DGXMGUxgYJxyPhc/oay/t79Oymmo9Me5VjrYwHRg9nww7f416H0WW/XMbsocTavn
gCSj/XxSzH3n15q2rJuGWLmeN/w9GSXM1noG1nUTiNRYr6a9vv25k7uKqU4F8x/N
vw5RzinyDqBRRDFf8mZy2dsk0PtoyzAISXWJDrYmkPpWkoSh382Wk4Nnd/JHaFHB
SBf72kZdMNZWjGfwLbIjxpb1A7CBUY1qL/qX1zWwvM2MYCYZdUPpmO3HraG8pAow
26VqtH+tWqYHqBoTD1CLttmXSU4JbKt/hP/Xbdpjt4LPRQns+loKstCLsxgaHHR5
txNdTIhyuJ5nffMrokuY5qsavoiACb/3B7hl2LfMKJ2pK1SCJHHDh5nbgH5bK61c
CXZwiDo54AAXWhj//ECY4eoJt1gSzvCr1YsD6icKD12EQHt2iLqwZQpIFxzIqAZS
SuigWtg5K2ZlVHcM7XmWbRJAc8osbuLtORna+b7QWf3V36VSmaMgVsYHIEtscZR3
adbtFUbRoQA36vBYw/Iag2AyZlKK+yHLgBD05fIxot+pAt1sGR5ul3YRzYhXmj8C
zUQpxLcd2pTc1rYs/HE3djmBPHJKKdyj8o7fkPnOiv1t1Rc+hmk=
=k1/6
-----END PGP SIGNATURE-----


M
M
Martin Castillo wrote on 24 Mar 2018 14:56
(name . ng0)(address . ng0@n0.is)(address . 30916@debbugs.gnu.org)
017b6770-3168-5d63-3dd5-e6c3b590f527@uni-bremen.de
Toggle quote (3 lines)
> So basically you want a field in the operating-system declaration where you
> can _manually_ set a description of a certain maximum length which will be
> added to the GRUB entry of the generated system generation?
yes

--
GPG: 7FDE 7190 2F73 2C50 236E 403D CC13 48F1 E644 08EC
Attachment: signature.asc
D
D
Danny Milosavljevic wrote on 24 Mar 2018 17:54
(name . Martin Castillo)(address . castilma@uni-bremen.de)
20180324175438.2ff4e55e@scratchpost.org
Hi Martin,

On Sat, 24 Mar 2018 14:56:03 +0100
Martin Castillo <castilma@uni-bremen.de> wrote:

Toggle quote (6 lines)
> ng0 wrote:
> > So basically you want a field in the operating-system declaration where you
> > can _manually_ set a description of a certain maximum length which will be
> > added to the GRUB entry of the generated system generation?
> yes

I wonder whether this description can be generated instead - we have all
the information we need - the packages, the users that are there etc.

Or a description could be generated only if a custom description is not specified.

In fact it's easy to add this and would be a nice intro project for a
person interested in Guix development. I can mentor.

The thing used to fill the Guix bootloader entries is <boot-parameters>.

There's a procedure "operating-system-boot-parameters" which is used
to generate <boot-parameters> instances from an <operating-system>
declaration.

(operating-system-bootcfg calls operating-system-boot-parameters)
(perform-action calls operating-system-bootcfg)
(perform-action is in the top-level guix script)

<boot-parameters> are serialized to disk into:

/var/guix/profiles/system-704-link$ cat parameters
(boot-parameters (version 0) (label "GNU with Linux-Libre 4.14.14 (beta)") (root-device "dayas:/") (kernel "/gnu/store/fnk2xhicbrjsvbq082p6x0ch6npkrg0z-linux-libre-4.14.14/bzImage") (kernel-arguments ("crashkernel=256M" "modprobe.blacklist=pcspkr,snd_pcsp" "quiet" "acpi_osi=Linux" "clocksource=acpi_pm" "allow-discards" "root_trim=yes")) (initrd "/gnu/store/nvhkdssz1m1p8xrggi78y8pd7jz4p3ng-raw-initrd/initrd") (bootloader-name grub) (store (device "dayas:/") (mount-point "/")))

But I wouldn't change the serialization format or what fields <boot-parameters> contain.

Just change operating-system-bootcfg to take a "description" parameter.
And change operating-system-boot-parameters to take a "description" parameter and
use it to calculate the label.

And change perform-action to calculate the value for to "description" parameter in this way:
- Taking it from <operating-system> (or the command line?)
- Falling back to an automatic value (comparing it to the previous generation) otherwise.

That's it.
-----BEGIN PGP SIGNATURE-----

iQEzBAEBCAAdFiEEds7GsXJ0tGXALbPZ5xo1VCwwuqUFAlq2gs4ACgkQ5xo1VCww
uqXK2wf+JRU+ccGTCUrN6TkxUNfe2EiSPiRBLOER+ulLQbrPr8mmrivbyEl8vw4N
TGBkMoS9ZnMXgzpHjOCUR26FAiVV9BoFmyTTFLBeKgi6lhkLASwVU9EN7z+Fx44c
okvnObBPvS/w3rTHjLPY9/inRubJaoZwvKYxzuND+N3IvW4EwCnIBpN6KD+bHz+L
pwvicAIaTXBDBzJCi+8fJfsuXV2dgnkHruFZIUR3KlmS3MVa7KOyXYzM8cFWDHWk
YvGXNktNKxQB5aJRSLfF4QTb6d9X9U952enksgsZbY625vSLMrkOb+64fmow8FZ6
2r8LMTFmIpIWzW0lV0gGP+i9rlamEA==
=p25B
-----END PGP SIGNATURE-----


N
(name . Danny Milosavljevic)(address . dannym@scratchpost.org)
20180324170046.sl4hpkmblp5tzpzz@abyayala
Danny Milosavljevic transcribed 2.9K bytes:
Toggle quote (14 lines)
> Hi Martin,
>
> On Sat, 24 Mar 2018 14:56:03 +0100
> Martin Castillo <castilma@uni-bremen.de> wrote:
>
> > ng0 wrote:
> > > So basically you want a field in the operating-system declaration where you
> > > can _manually_ set a description of a certain maximum length which will be
> > > added to the GRUB entry of the generated system generation?
> > yes
>
> I wonder whether this description can be generated instead - we have all
> the information we need - the packages, the users that are there etc.

But how much space do we have in the GRUB descriptions? I have computers with 800x600 or what
it was resolution for the screen, and while this would be a nice feature I wonder if there's
some implications in GRUB menu readability.
I'm not an expert in GRUB, I can boot without a menu, but GRUB is a small operating system
on its own :)

Toggle quote (34 lines)
> Or a description could be generated only if a custom description is not specified.
>
> In fact it's easy to add this and would be a nice intro project for a
> person interested in Guix development. I can mentor.
>
> The thing used to fill the Guix bootloader entries is <boot-parameters>.
>
> There's a procedure "operating-system-boot-parameters" which is used
> to generate <boot-parameters> instances from an <operating-system>
> declaration.
>
> (operating-system-bootcfg calls operating-system-boot-parameters)
> (perform-action calls operating-system-bootcfg)
> (perform-action is in the top-level guix script)
>
> <boot-parameters> are serialized to disk into:
>
> /var/guix/profiles/system-704-link$ cat parameters
> (boot-parameters (version 0) (label "GNU with Linux-Libre 4.14.14 (beta)") (root-device "dayas:/") (kernel "/gnu/store/fnk2xhicbrjsvbq082p6x0ch6npkrg0z-linux-libre-4.14.14/bzImage") (kernel-arguments ("crashkernel=256M" "modprobe.blacklist=pcspkr,snd_pcsp" "quiet" "acpi_osi=Linux" "clocksource=acpi_pm" "allow-discards" "root_trim=yes")) (initrd "/gnu/store/nvhkdssz1m1p8xrggi78y8pd7jz4p3ng-raw-initrd/initrd") (bootloader-name grub) (store (device "dayas:/") (mount-point "/")))
>
> But I wouldn't change the serialization format or what fields <boot-parameters> contain.
>
> Just change operating-system-bootcfg to take a "description" parameter.
> And change operating-system-boot-parameters to take a "description" parameter and
> use it to calculate the label.
>
> And change perform-action to calculate the value for to "description" parameter in this way:
> - Taking it from <operating-system> (or the command line?)
> - Falling back to an automatic value (comparing it to the previous generation) otherwise.
>
> That's it.



--
A88C8ADD129828D7EAC02E52E22F9BBFEE348588
-----BEGIN PGP SIGNATURE-----

iQIzBAABCgAdFiEEqIyK3RKYKNfqwC5S4i+bv+40hYgFAlq2hD0ACgkQ4i+bv+40
hYgVWBAArZpmWR2Ve24lj2wzSYV/evR1ry4b+2+Zdjxp1WNKiweTuHm/EsN4KyC8
hMyiVGDNGK3SZ7kGKZ7g0ERpfhDUllHggonYP8wzw4ExdUDytMon210htjyYilsD
+GUEpseqUlw9CWJVvb2FkIfTxDwRZ3LOzaOuDxzaJD50fmICsJRkge+8h69+BOKs
XuckfcV2ZgizoQsvdjwmYjlJTTKDQDZQXT1o7GBol7Hdxl+seDWQcsgPr2ySxoPe
KsFgywGykAu4KyiMq2begI0xJ0snQXrYSs92+vfIjheGNrj1P0/754hA/2KK3WrZ
1jiBTfqyihH0a+NwZ+5wIhI6aV4CZy/DUl6cS7itLGaEb4ZfQ8clEmjOv7IVmv7n
gGZouUGXoL8lyyYymt4Lvhug968LWWIxvlAGh1ukqIojiuqY6HgMU4Iji6TxSUdk
a6lhKaYLogoW1+32fXtDRIg/dymKEbQOUc11EqUcIXizcAl/jJ4/c7Uqh27rjCKS
ZfSHqErPgkkd8hzznVb5LGC9oDFERn2l6bs8ai5CREVPpiFsMGKRfVTgtl/hMW8y
Acqk7Phh2MoRNLBvHRGNNJIQ8ww/IA8R6EFZ2axrS13vW8tg8KbYlyUWNawNj9BO
59jg1NoYKruW/cBCKqa5IMa02nKOs3vOzmW+NMYSjBFArQcWIio=
=qCWm
-----END PGP SIGNATURE-----


L
L
Ludovic Courtès wrote on 26 Mar 2018 15:05
(name . Danny Milosavljevic)(address . dannym@scratchpost.org)
87vadjdm1s.fsf@gnu.org
Hello,

What about offering a way to specific the label of the new menu entry,
or otherwise a suffix or prefix of the label?

That is, you’d do:

guix system reconfigure -m "The config that works just fine, I think." config.scm

and that string would be used as the label itself in the GRUB menu, or
as a prefix/suffix of the automatically generated label.

Thoughts?

Ludo’.
Z
Z
zimoun wrote on 25 Nov 2021 00:55
control message for bug #30916
(address . control@debbugs.gnu.org)
86mtltrtwj.fsf@gmail.com
severity 30916 wishlist
quit
?