From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:470:142:3::10]:42466) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hkZhB-0004cK-8S for guix-patches@gnu.org; Mon, 08 Jul 2019 15:53:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hkZhA-0001Hp-7r for guix-patches@gnu.org; Mon, 08 Jul 2019 15:53:05 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:50783) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hkZhA-0001Hj-4q for guix-patches@gnu.org; Mon, 08 Jul 2019 15:53:04 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hkZh8-00047q-BP for guix-patches@gnu.org; Mon, 08 Jul 2019 15:53:04 -0400 Subject: [bug#36555] [PATCH 0/2] Refactor out common behavior for system reconfiguration. Resent-Message-ID: Received: from eggs.gnu.org ([2001:470:142:3::10]:42356) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hkZgV-0004Y2-Pw for guix-patches@gnu.org; Mon, 08 Jul 2019 15:52:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hkZgT-00018N-JR for guix-patches@gnu.org; Mon, 08 Jul 2019 15:52:23 -0400 Received: from mx.sdf.org ([205.166.94.20]:60162) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hkZgS-000174-Lj for guix-patches@gnu.org; Mon, 08 Jul 2019 15:52:21 -0400 Received: from Upsilon (mobile-166-171-186-40.mycingular.net [166.171.186.40]) (authenticated (0 bits)) by mx.sdf.org (8.15.2/8.14.5) with ESMTPSA id x68JqGPE004411 (using TLSv1.2 with cipher AES256-GCM-SHA384 (256 bits) verified NO) for ; Mon, 8 Jul 2019 19:52:18 GMT From: zerodaysfordays@sdf.lonestar.org (Jakob L. Kreuze) Date: Mon, 08 Jul 2019 15:52:12 -0400 Message-ID: <87imsci9sj.fsf@sdf.lonestar.org> 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: 36555@debbugs.gnu.org --=-=-= Content-Type: text/plain Hello, Guix! This is the preliminary version of a patch series to turn the behavior common between 'guix deploy' and 'guix system reconfigure' into a module that both can use. I am submitting it as-is both for comments and for tracking the refactoring effort. Note that this is _not_ ready to be merged. There are several things that I need to do before I would consider it ready for upstream Guix: - This passes my old test suite for 'guix deploy', but I haven't dared to run the new 'guix system reconfigure'. I'll set up a new virtual machine so I don't put myself out of a working laptop. - 'switch-system-program', 'upgrade-services-program', and 'install-bootloader-program' omit some of the features that were present in the procedures they replace. For example, 'install-bootloader' previously supported installing the bootloader configuration without actually running the installation script. This was fine for 'guix deploy', but I'll need to add it back in for 'guix system reconfigure'. - I plan to implement system tests for '(guix scripts system reconfigure)'. I suppose I can always submit them as a separate patch, but I'll likely finish them before we're through with code review, so it may make sense to include them with as part of this patch series, albeit as a distinct commit. - I suspect that some of the effectful procedures in 'system.scm' could be refactored out in a similar fashion. Not that 'guix deploy' would necessarily be using them, but it would be more consistent to have them as 'program-file' objects, and those procedures could then also be tested. I look forward to your comments. Regards, Jakob Jakob L. Kreuze (2): guix system: Add 'reconfigure' module. guix system: Reimplement 'reconfigure'. Makefile.am | 1 + gnu/machine/ssh.scm | 235 ++++++++-------------------- guix/scripts/system.scm | 140 +++++------------ guix/scripts/system/reconfigure.scm | 158 +++++++++++++++++++ 4 files changed, 255 insertions(+), 279 deletions(-) create mode 100644 guix/scripts/system/reconfigure.scm -- 2.22.0 --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEa1VJLOiXAjQ2BGSm9Qb9Fp2P2VoFAl0jnuwACgkQ9Qb9Fp2P 2VqbpA/6AzY1X0XDF2dfGAjhaNqbU4jxAdGB3vFQzOBsZbxatDyLicV951Es7fx9 dliFCylCXw1qdnfyBOGOtXOgNeeAZredRoEMVvxkPbDu3PiJ4z0bXe8bgtearNYS x7l+tUWrEULtlUiSvR3t21Wenb9p7p3X8wxK0lRoGE4+gc/s0G9NYFyPW277Uy1E ojcmvVANiEgbQU1amWSuXz4AZaxsy3mzcZoULyt+9NnpUUXzWyHj05T/ElpsIm5R DvyeA6ahD+L2Xp+QaSua1r8MfEApGgsmvIQknYo9xQcM4fWR04ar4PCXE+FGuvm6 QPQrc566D3OBQpJJToom+37x2/zluRokiy84Zg8yueAJGOk/Qzdpn2ALsn4B6WGb r2GLcwOmvHT11X14DpGwBpEncd23cLu5VQidZniiZ/Ek+DNpiyL/6TjgwcXrx3pW eyveU9dMSmuQ6Zenr19e6KX0HHvtnldkL/EcOXbUjyQYr1WCfrursoigiYCvSeDa LT8B76Mi+Jc6/Jq9rQoHG6DldNpLR9YLGt6wPJ8vMVW/rTwn0pjgm8t/rghkMM/t zJdhGdkQ8yUo7hDJ5kd1v8gtDG6DHG5QdukWh608Da9pDJ8uqClnQyoxw/ejpY1o zkBIRNJzSNu5aX2Kf8B15Wso1pFq9BJnJrkGPdL5HwIdymRFJCE= =6Fog -----END PGP SIGNATURE----- --=-=-=--