From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:470:142:3::10]:42191) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hjXux-0006sy-2z for guix-patches@gnu.org; Fri, 05 Jul 2019 19:47:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hjXuw-0004oS-0a for guix-patches@gnu.org; Fri, 05 Jul 2019 19:47:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:45161) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hjXuv-0004oM-TN for guix-patches@gnu.org; Fri, 05 Jul 2019 19:47:01 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hjXuv-0007bn-Po for guix-patches@gnu.org; Fri, 05 Jul 2019 19:47:01 -0400 Subject: [bug#36404] [PATCH 0/3] Refactor out common behavior for system reconfiguration. Resent-Message-ID: From: zerodaysfordays@sdf.lonestar.org (Jakob L. Kreuze) References: <87o92ianbj.fsf@sdf.lonestar.org> <87o92glap5.fsf@dustycloud.org> <878sthoqzi.fsf@gnu.org> <87r2799tzd.fsf@sdf.lonestar.org> <87d0isrsmk.fsf@sdf.lonestar.org> <878std3fw0.fsf@sdf.lonestar.org> <87wogwoqrg.fsf@gnu.org> Date: Fri, 05 Jul 2019 19:45:41 -0400 In-Reply-To: <87wogwoqrg.fsf@gnu.org> ("Ludovic \=\?utf-8\?Q\?Court\=C3\=A8s\=22'\?\= \=\?utf-8\?Q\?s\?\= message of "Fri, 05 Jul 2019 10:00:03 +0200") Message-ID: <87bly8f3kq.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: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: 36404@debbugs.gnu.org --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Ludovic Court=C3=A8s writes: > Note that writing tests could be tricky because it=E2=80=99s about testin= g the > effect of these reconfigure actions. At any rate, let us know how it > goes! This is a _very_ preliminary patch series. I'm not nearly done with it yet; the procedures in guix/scripts/system.scm that I've replaced have some handling for i.e. installing the bootloader configuration without running the installer script, which my reimplementations don't yet support. I'm sending this tonight to make sure I'm on the right track: is this sort of what you meant by extracting the common behavior into scripts? Also, I didn't include any tests as part of this series, but implementing reconfiguration like this does, indeed, make testing for 'guix deploy' much, much easier. And we'll get some tests for the behavior of 'guix system reconfigure' out of it, too! Jakob L. Kreuze (3): guix system: Add 'reconfigure' module. machine: Reimplement 'managed-host-environment-type' deployment. guix system: Reimplement 'reconfigure'. Makefile.am | 1 + gnu/machine/ssh.scm | 235 ++++++++-------------------- guix/scripts/system.scm | 162 ++++++------------- guix/scripts/system/reconfigure.scm | 157 +++++++++++++++++++ 4 files changed, 270 insertions(+), 285 deletions(-) create mode 100644 guix/scripts/system/reconfigure.scm =2D-=20 2.22.0 --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEa1VJLOiXAjQ2BGSm9Qb9Fp2P2VoFAl0f4SYACgkQ9Qb9Fp2P 2Vpi5A/9HUXchiXj+CK9NqXFQPqESOW3hZAJnUKlzNvi83E07Czv6JTCnohPaiPG ZqVAkmY2rH+gNPn8uiEDgRViW1pSqB72UOO+C7POtoCu0hw7RDlslEidL+Lf55/H L1Abv4vYOLqd5Snry5vCWpQFCgeNW27yaZqqY4gcRR4acYvYBWUkWk383OG04E0n 5UNp+Dq9pxxg7aBHt3o8DTDXLOMr8kB1E9DJjmJV+BteDONSEIy8WdBwAdjtcI9n h6Jjpz82/qY/4wdejNNoDfwbEXcZ7AItUa8mqyn+fk3AALKTJRvrAUWmmV/aX9a1 3sfcwn08n7SHN5aRfFCHYuMcrmXBUJIPl80xH225JjEWe3nnRCLUZOsneZOODRF/ VOaQXVZys6bUhYeQqUUkdOqcp930t3zvt8KUzkyyGPe3A2YRCPZtIXd0Ubq4bPYR 2CuNSMw2kuda/YAGErXmDVxH145ccH1OaIJ2OVz6ymTT/7zApQOrVJcYVGrZ9O31 Op/+qjtDp1k18c8y+GTKB5QvtyoZdjLM0/c+KDGtbBrlWZoPb5jjk6AIUiSVYuV0 4RBKjQL3tLD/vj6NV99XFEYpyFLL9GpKJ2QmEz/mMUOmfPQjmtfSoba6REArDMBZ C8uBvCdPm+05yFQjq9kJIWSjwuou6aWcpRRH85SoOgSXfUyaoms= =0FvD -----END PGP SIGNATURE----- --=-=-=--