From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51389) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1etS4X-0005Dh-HW for guix-patches@gnu.org; Wed, 07 Mar 2018 00:57:07 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1etS4U-00040N-DK for guix-patches@gnu.org; Wed, 07 Mar 2018 00:57:05 -0500 Received: from debbugs.gnu.org ([208.118.235.43]:40471) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1etS4U-0003zu-8R for guix-patches@gnu.org; Wed, 07 Mar 2018 00:57:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1etS4T-0002pD-OY for guix-patches@gnu.org; Wed, 07 Mar 2018 00:57:01 -0500 Subject: [bug#30572] [PATCH 3/7] system: Allow customization of the initrd's Guile. Resent-Message-ID: From: Chris Marusich References: <20180222103528.5108-1-cmmarusich@gmail.com> <20180222103528.5108-3-cmmarusich@gmail.com> <87371t8bt2.fsf@gmail.com> <87muzuz7nj.fsf@gnu.org> Date: Wed, 07 Mar 2018 06:56:12 +0100 In-Reply-To: <87muzuz7nj.fsf@gnu.org> ("Ludovic \=\?utf-8\?Q\?Court\=C3\=A8s\=22'\?\= \=\?utf-8\?Q\?s\?\= message of "Tue, 27 Feb 2018 18:04:00 +0100") Message-ID: <87o9k0ig3n.fsf@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="==-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: 30572@debbugs.gnu.org --==-=-= Content-Type: multipart/mixed; boundary="=-=-=" --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable ludo@gnu.org (Ludovic Court=C3=A8s) writes: > Chris Marusich skribis: > >> @deffn {Monadic Procedure} base-initrd @var{file-systems} @ >> - [#:mapped-devices '()] [#:qemu-networking? #f] [#:volatile-root?= #f]@ >> + [#:linux linux-libre] >> + [#:mapped-devices '()] [#:guile %guile-static-stripped] >> + [#:qemu-networking? #f] [#:volatile-root? #f]@ > > Nitpick: you need an @ at the end of intermediate lines. :-) Thank you; I appreciate nit-picking, since these are the kinds of things that are easy to overlook! I've added the @ symbols (see attached). However, are they really necessary? According to (texinfo) Multiple Spaces, inserting an @ followed by a newline inserts a single space into the output. That's what we're doing here, right? But even when I omit the @ symbols at the end of the lines, the TexInfo manual builds without error, and the procedure definition appears to render just fine in the stand-alone Info reader. Unless the intent here really is to insert just one extra space between some, but not all, of the arguments, I think we can probably omit all of these @ symbols. WDYT? =2D-=20 Chris --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0003-system-Allow-customization-of-the-initrd-s-Guile.patch Content-Transfer-Encoding: quoted-printable From=2032c9a237c4db4d42fe6542be0c418b39c3a68aa1 Mon Sep 17 00:00:00 2001 From: Chris Marusich Date: Mon, 19 Feb 2018 04:47:42 +0100 Subject: [PATCH 3/7] system: Allow customization of the initrd's Guile. * gnu/system/linux-initrd.scm (raw-initrd, base-initrd): Add the #:guile keyword argument. * doc/guix.texi (Initial Ram Disk) : Update their documentation. =2D-- doc/guix.texi | 42 ++++++++++++++++++++++++------------------ gnu/system/linux-initrd.scm | 27 ++++++++++++++++----------- 2 files changed, 40 insertions(+), 29 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index fb2834942..adac7530a 100644 =2D-- a/doc/guix.texi +++ b/doc/guix.texi @@ -18861,33 +18861,39 @@ here is how to use it and customize it further. @cindex initrd @cindex initial RAM disk @deffn {Monadic Procedure} raw-initrd @var{file-systems} @ =2D [#:linux-modules '()] [#:mapped-devices '()] @ =2D [#:helper-packages '()] [#:qemu-networking? #f] [#:volatile-root?= #f] =2DReturn a monadic derivation that builds a raw initrd. @var{file-systems= } is =2Da list of file systems to be mounted by the initrd, possibly in addition= to =2Dthe root file system specified on the kernel command line via @code{--ro= ot}. =2D@var{linux-modules} is a list of kernel modules to be loaded at boot tim= e. =2D@var{mapped-devices} is a list of device mappings to realize before =2D@var{file-systems} are mounted (@pxref{Mapped Devices}). =2D@var{helper-packages} is a list of packages to be copied in the initrd. = It may =2Dinclude @code{e2fsck/static} or other packages needed by the initrd to c= heck =2Dthe root file system. + [#:linux linux-libre]@ + [#:linux-modules '()] [#:mapped-devices '()]@ + [#:helper-packages '()] [#:guile %guile-static-stripped]@ + [#:qemu-networking? #f] [#:volatile-root? #f] +Return a monadic derivation that builds a raw initrd, with kernel +modules taken from @var{linux}. @var{file-systems} is a list of file +systems to be mounted by the initrd, possibly in addition to the root +file system specified on the kernel command line via @code{--root}. +@var{linux-modules} is a list of kernel modules to be loaded at boot +time. @var{mapped-devices} is a list of device mappings to realize +before @var{file-systems} are mounted (@pxref{Mapped Devices}). +@var{helper-packages} is a list of packages to be copied in the +initrd. It may include @code{e2fsck/static} or other packages needed by +the initrd to check root partition. @var{guile} is the Guile to use in +the initrd. =20 When @var{qemu-networking?} is true, set up networking with the standard Q= EMU =2Dparameters. When @var{virtio?} is true, load additional modules so that= the =2Dinitrd can be used as a QEMU guest with para-virtualized I/O drivers. +parameters. =20 When @var{volatile-root?} is true, the root file system is writable but an= y changes to it are lost. @end deffn =20 @deffn {Monadic Procedure} base-initrd @var{file-systems} @ =2D [#:mapped-devices '()] [#:qemu-networking? #f] [#:volatile-root? = #f]@ + [#:linux linux-libre] [#:mapped-devices '()]@ + [#:guile %guile-static-stripped]@ + [#:qemu-networking? #f] [#:volatile-root? #f]@ [#:virtio? #t] [#:extra-modules '()] =2DReturn a monadic derivation that builds a generic initrd. @var{file-sys= tems} is =2Da list of file systems to be mounted by the initrd like for @code{raw-in= itrd}. =2D@var{mapped-devices}, @var{qemu-networking?} and @var{volatile-root?} =2Dalso behaves as in @code{raw-initrd}. +Return a monadic derivation that builds a generic initrd, with kernel +modules taken from @var{linux}. @var{file-systems} is a list of file +systems to be mounted by the initrd like for @code{raw-initrd}. +@var{mapped-devices}, @var{guile}, @var{qemu-networking?} and +@var{volatile-root?} also behave as in @code{raw-initrd}. =20 When @var{virtio?} is true, load additional modules so that the initrd can be used as a QEMU guest with para-virtualized I/O drivers. diff --git a/gnu/system/linux-initrd.scm b/gnu/system/linux-initrd.scm index 330438bce..301e6cffa 100644 =2D-- a/gnu/system/linux-initrd.scm +++ b/gnu/system/linux-initrd.scm @@ -154,17 +154,18 @@ MODULES and taken from LINUX." (linux-modules '()) (mapped-devices '()) (helper-packages '()) + (guile %guile-static-stripped) qemu-networking? volatile-root? (on-error 'debug)) =2D "Return a monadic derivation that builds a raw initrd, with kernel =2Dmodules taken from LINUX. FILE-SYSTEMS is a list of file-systems to be =2Dmounted by the initrd, possibly in addition to the root file system spec= ified =2Don the kernel command line via '--root'. LINUX-MODULES is a list of kern= el =2Dmodules to be loaded at boot time. MAPPED-DEVICES is a list of device =2Dmappings to realize before FILE-SYSTEMS are mounted. =2DHELPER-PACKAGES is a list of packages to be copied in the initrd. It may= include =2De2fsck/static or other packages needed by the initrd to check root parti= tion. + "Return a monadic derivation that builds a raw initrd, with kernel modul= es +taken from LINUX. FILE-SYSTEMS is a list of file-systems to be mounted by= the +initrd, possibly in addition to the root file system specified on the kern= el +command line via '--root'. LINUX-MODULES is a list of kernel modules to be +loaded at boot time. MAPPED-DEVICES is a list of device mappings to reali= ze +before FILE-SYSTEMS are mounted. HELPER-PACKAGES is a list of packages to= be +copied in the initrd. It may include e2fsck/static or other packages neede= d by +the initrd to check root partition. GUILE is the Guile to use in the init= rd. =20 When QEMU-NETWORKING? is true, set up networking with the standard QEMU parameters. @@ -223,7 +224,8 @@ upon error." #:qemu-guest-networking? #$qemu-networking? #:volatile-root? '#$volatile-root? #:on-error '#$on-error))) =2D #:name "raw-initrd")) + #:name "raw-initrd" + #:guile guile)) =20 (define* (file-system-packages file-systems #:key (volatile-root? #f)) "Return the list of statically-linked, stripped packages to check @@ -246,6 +248,7 @@ FILE-SYSTEMS." #:key (linux linux-libre) (mapped-devices '()) + (guile %guile-static-stripped) qemu-networking? volatile-root? (virtio? #t) @@ -255,7 +258,8 @@ FILE-SYSTEMS." modules taken from LINUX. FILE-SYSTEMS is a list of file-systems to be mounted by the initrd, possibly in addition to the root file system specif= ied on the kernel command line via '--root'. MAPPED-DEVICES is a list of devi= ce =2Dmappings to realize before FILE-SYSTEMS are mounted. +mappings to realize before FILE-SYSTEMS are mounted. GUILE is the Guile to +use in the initrd. =20 QEMU-NETWORKING? and VOLATILE-ROOT? behaves as in raw-initrd. =20 @@ -325,6 +329,7 @@ loaded at boot time in the order in which they appear." #:helper-packages helper-packages #:qemu-networking? qemu-networking? #:volatile-root? volatile-root? =2D #:on-error on-error)) + #:on-error on-error + #:guile guile)) =20 ;;; linux-initrd.scm ends here =2D-=20 2.15.1 --=-=-=-- --==-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEy/WXVcvn5+/vGD+x3UCaFdgiRp0FAlqffvwACgkQ3UCaFdgi Rp2iow/+J6XkhrPhp1CCKyCRXL61ZotWQXnke2FlmStu1VIyXwEvxRNHJjy1ncbH sWebY8Yn919htja+IDx4ZLhM86/8+V2jY6JFa8WV0vuEWC5DGtKMhPkhU1uWEF6b ygeZtss0Zd99g5RC/+EkQCkUg8eAvfQjusYhDQhinUi2Af6lhYVvK02x3Gszze9P +eIBldwyWvQ8Zq3yIU5RSjYuERNZ7b7ICHNdsup4Y4ngpM/rOKylMbrmd8NerYOa fxBDA5+scZpuzjas4C2SNnZ3JIc1qDjoUlbLIBmVzHW8qO3fMLDv+pIgSNYMJiqQ PDuGiyoSdtY0sE+YKGRJOhMdZGBzDlHdwYIQnmq2syWSs7l1BtBCHxOtrp3+Skpv 8jiT2ZRbIBHMDay7LHONrzBkXOjoOTJ2hCR2fEfDbsyn+zP+S7xPfbPtdrdeI2gg pV+QqcH8dfO+CN6dN1WMKs9/KPCV2Sxcpdsj+i+TfMr6GtfdV409y+n2UTRmNzcQ ZuhDaE2ypZGIcghbel+DqFTu8XODF8ojEuyVFQAUSrUlNPKZdlumXZgf1mRSOL/3 CJDuoS+13lbetXeNuvtsj1U/4kXK8DIDW0wYmP7Yb2WduYylu9kS+DYlCrBwanu9 he/TMmAg8ASa3AkpjZv2QhdxrTUjaeJUayi/6/EQIAgBFT537p8= =ZkIc -----END PGP SIGNATURE----- --==-=-=--