From mboxrd@z Thu Jan 1 00:00:00 1970 From: Danny Milosavljevic Subject: bug#30916: Request: add a short description field for os-configuration Date: Sat, 24 Mar 2018 17:54:38 +0100 Message-ID: <20180324175438.2ff4e55e@scratchpost.org> References: <20180323141537.64xtvlgalhlzlz3z@abyayala> <06f52ff5-4019-e449-1f56-a585c759abb1@uni-bremen.de> <20180324124556.7x36ap6mfeugc7pa@abyayala> <017b6770-3168-5d63-3dd5-e6c3b590f527@uni-bremen.de> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; boundary="Sig_/c2=5QJexU.6xgpe7I=aCDdB"; protocol="application/pgp-signature" Return-path: Received: from eggs.gnu.org ([208.118.235.92]:56716) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eznNV-0004Ts-KY for bug-guix@gnu.org; Sat, 24 Mar 2018 13:55:59 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eznM4-0007kE-TH for bug-guix@gnu.org; Sat, 24 Mar 2018 13:54:30 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:43755) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ezmRa-00075m-Cx for bug-guix@gnu.org; Sat, 24 Mar 2018 12:55:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ezmRa-0003ls-3U for bug-guix@gnu.org; Sat, 24 Mar 2018 12:55:02 -0400 Sender: "Debbugs-submit" Resent-Message-ID: In-Reply-To: <017b6770-3168-5d63-3dd5-e6c3b590f527@uni-bremen.de> List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org Sender: "bug-Guix" To: Martin Castillo Cc: 30916@debbugs.gnu.org, ng0 --Sig_/c2=5QJexU.6xgpe7I=aCDdB Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Hi Martin, On Sat, 24 Mar 2018 14:56:03 +0100 Martin Castillo 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? =20 > 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 spe= cified. 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 . There's a procedure "operating-system-boot-parameters" which is used to generate instances from an declaration. (operating-system-bootcfg calls operating-system-boot-parameters) (perform-action calls operating-system-bootcfg) (perform-action is in the top-level guix script) are serialized to disk into: /var/guix/profiles/system-704-link$ cat parameters=20 (boot-parameters (version 0) (label "GNU with Linux-Libre 4.14.14 (beta)") = (root-device "dayas:/") (kernel "/gnu/store/fnk2xhicbrjsvbq082p6x0ch6npkrg0= z-linux-libre-4.14.14/bzImage") (kernel-arguments ("crashkernel=3D256M" "mo= dprobe.blacklist=3Dpcspkr,snd_pcsp" "quiet" "acpi_osi=3DLinux" "clocksource= =3Dacpi_pm" "allow-discards" "root_trim=3Dyes")) (initrd "/gnu/store/nvhkds= sz1m1p8xrggi78y8pd7jz4p3ng-raw-initrd/initrd") (bootloader-name grub) (stor= e (device "dayas:/") (mount-point "/"))) But I wouldn't change the serialization format or what fields contain. Just change operating-system-bootcfg to take a "description" parameter. And change operating-system-boot-parameters to take a "description" paramet= er and use it to calculate the label. And change perform-action to calculate the value for to "description" param= eter in this way: - Taking it from (or the command line?)=20 - Falling back to an automatic value (comparing it to the previous generati= on) otherwise. That's it. --Sig_/c2=5QJexU.6xgpe7I=aCDdB Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----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----- --Sig_/c2=5QJexU.6xgpe7I=aCDdB--