guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Patches to implement system roll-back and switch-generation


From: Chris Marusich
Subject: Patches to implement system roll-back and switch-generation
Date: Thu, 29 Sep 2016 23:21:59 -0700

Hi,

Here are some patches which, when applied to
1df00601b280db1cdfe0fc8d539ee6c6c726c355, make it possible to switch
system generations using two new "guix system" subcommands: "roll-back"
and "switch-generation".  These commands currently just rebuild the
grub.cfg file with a new default entry.  As a result, if you want to
roll back or switch to another system generation, you don't have to
manually select a previous version every single time you boot, which is
nice.

I believe my patch does NOT yet make the regenerated grub.cfg a GC root,
so it is possible that after rolling back or switching generations,
invoking GC might clean up some things you'd rather keep around (like
the grub background image file).  Please be careful not to try this
patch on a machine you care about; please use a VM instead.  I've
verified that it works in a VM.

I'm hoping for some constructive feedback.  I've had a rough time
getting this to work on my own because this is the first real work I've
tried doing with Guile or a free software project, and because a lot of
the machinery that already exists (e.g., in (guix scripts system))
assumes that we are going to get the info we need for building the grub
config from an operating system configuration file, which is not true
for this use case.  I've also had quite a hard time understanding the
relationship between monadic values in the store monad, gexps,
derivations, and how to use them effectively.  If you notice I am doing
something strange or outright incorrect, please let me know so I can fix
it and do better.

Unfortunately, these patches do not apply cleanly to the current master
branch because of commit 0f65f54ebd76324653fd5506a7dab42ee44d9255.  This
commit has thrown a wrench in my plans.  When I try to rebase onto
master, there are multiple conflicts, and I am not sure yet what the
best way to resolve them will be.  In any case, I think it will be more
productive to ask for feedback now, rather than to continue on my own
down uncertain paths.

I look forward to your feedback.

-- 
Chris

Attachment: 0001-Improve-docstring-switch-to-generation.patch
Description: Text Data

Attachment: 0002-Refactor-extract-procedure-relative-generation-spec-.patch
Description: Text Data

Attachment: 0003-Rename-previous-grub-entries-to-grub-entries.patch
Description: Text Data

Attachment: 0004-Fix-docstrings-these-procedures-return-derivations.patch
Description: Text Data

Attachment: 0005-Factor-out-procedure-device-title.patch
Description: Text Data

Attachment: 0006-gnu-system-and-gnu-system-grub-use-root-fs-device-no.patch
Description: Text Data

Attachment: 0007-gnu-build-install-Factor-out-procedure-install-grub-.patch
Description: Text Data

Attachment: 0008-grub-entries-take-a-list-of-numbers-on-input.patch
Description: Text Data

Attachment: 0009-Implement-switch-generation-and-roll-back.patch
Description: Text Data

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]