From mboxrd@z Thu Jan 1 00:00:00 1970 From: Chris Marusich Subject: Re: Seeking guidance regarding system roll-back and switch-generation Date: Sun, 24 Jul 2016 23:22:27 -0700 Message-ID: <87mvl6nsnw.fsf@gmail.com> References: <87twfo7h5v.fsf@gmail.com> <87vb03nlq8.fsf@gnu.org> <874m7mvxcz.fsf@gmail.com> <87vazxk70h.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:37843) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bRZHf-0005YG-G7 for guix-devel@gnu.org; Mon, 25 Jul 2016 02:22:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bRZHe-0001Rs-B0 for guix-devel@gnu.org; Mon, 25 Jul 2016 02:22:35 -0400 In-Reply-To: <87vazxk70h.fsf@gnu.org> ("Ludovic \=\?utf-8\?Q\?Court\=C3\=A8s\=22'\?\= \=\?utf-8\?Q\?s\?\= message of "Fri, 22 Jul 2016 17:49:18 +0200") List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: Ludovic =?utf-8?Q?Court=C3=A8s?= Cc: guix-devel@gnu.org --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hi Ludo, Thank you for the concrete suggestions. I've looked into using the parameters file. It contains almost all the info I need, but I think some is still missing. > The output of =E2=80=98guix system build=E2=80=99 contains the =E2=80=98p= arameters=E2=80=99 file, which > is enough to generate grub.cfg (see =E2=80=98previous-grub-entries=E2=80= =99 in (guix > scripts system)). What if someone specifies extra "menu-entries" in their operating system configuration file? (as described in "(guix) GRUB Configuration")? Those extra entries don't appear to be stored in the parameters file. It would be very convenient if we could just store the entire in the built system output (e.g., the parameters file). Is that possible? > However, the activation script is indeed missing. We can add it to the > output of =E2=80=98guix system build=E2=80=99 by extending =E2=80=98syste= m-service-type=E2=80=99: > > > diff --git a/gnu/services.scm b/gnu/services.scm > index 5479bfa..fc3e17e 100644 > --- a/gnu/services.scm > +++ b/gnu/services.scm > @@ -352,11 +352,18 @@ ACTIVATION-SCRIPT-TYPE." >=20=20 > (define (second-argument a b) b) >=20=20 > +(define (gexps->activation-system-entry gexps) > + "Return a directory entry to add to the result of the 'system' derivat= ion." > + (mlet %store-monad ((script (activation-script gexps))) > + (return `(("activate" ,script))))) > + > (define activation-service-type > (service-type (name 'activate) > (extensions > (list (service-extension boot-service-type > - gexps->activation-gexp))) > + gexps->activation-gexp) > + (service-extension system-service-type > + gexps->activation-system-entry= ))) > (compose append) > (extend second-argument))) >=20=20 > > > This way we have direct access to each generation=E2=80=99s activation sc= ript > and we should be fine with (3). > > WDYT? I'm afraid I don't yet know enough about gexps and the activation process to give an informed opinion on that suggestion. After I finish the first milestone (switch symlinks and rebuild grub.cfg), I'll study those topics in more detail and revisit your proposal. Thank you, =2D-=20 Chris --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJXlbAkAAoJEN1AmhXYIkad+esP/1LJ9uxXAbs8aMKscsKiI03C kxhNzPTFZ4oJGvZK7poYhJRT+icL+i4N0XEBE/HoFnUT5kcaWinLxVRbmsRdcffu PveuZeMk84hN+kPZNyswqk24LSKGyKPUdxP68Jm/MYH3StF9QmMoQLiGDEEmvg8u jsVY6zA1WI2VmddkKzXtxrhkQsmOFaqUvWdGn8lUAQwJBwrzNd9c+5x7P109ciu3 3sNORhB81B2raWm/1kNPhdS8QMsariqhq4IBVnJeIbTC23Y3uax1CjUQY4WSrI15 +sEjZYjwytQCKuMHam5xVZmOitvuUrATG/Sx+RMpiXPNBvOas8oyn2slk3Yp5NZ6 ABmG23BN1q6d3KLWnbkK2ZLZV00FGNlu6YHcjpK5P3QpPuXz4PunF1t3/EWr9yMx PnublajK+3G8DIioRzuw1mDJgPCZf91x92yxLxm/8HTq8Tg9d9O2L3q8nYa0mT4K NPyeBL0kqNpfl33Rrd4zO7CdrtaN6rdqzVaX64yoIynxGuT2S5zvAdYOCmhylDoF oaDdx+5X7pe7BD6BwaegwLLbCNHcFgH997/aWn+6b0fXFIaFRb1BUdXH9p7Xc2TZ poIhUp6Woh6OtslWda909CH0KgqubHHKKH/08EtmjjMgF3QOwpYp/+f8wdZYGxVT A6VUcO1Sxl9eLezy87RB =5Ppu -----END PGP SIGNATURE----- --=-=-=--