From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:470:142:3::10]:58784) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hkvT9-0001bS-Jc for guix-patches@gnu.org; Tue, 09 Jul 2019 15:08:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hkvT8-0003b4-7T for guix-patches@gnu.org; Tue, 09 Jul 2019 15:08:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:53682) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hkvT8-0003ai-2m for guix-patches@gnu.org; Tue, 09 Jul 2019 15:08:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hkvT7-00045X-QP for guix-patches@gnu.org; Tue, 09 Jul 2019 15:08:01 -0400 Subject: [bug#36555] [PATCH v2 0/3] Refactor out common behavior for system reconfiguration. Resent-Message-ID: From: zerodaysfordays@sdf.lonestar.org (Jakob L. Kreuze) In-Reply-To: <87imsbtk3o.fsf@dustycloud.org> (Christopher Lemmer Webber's message of "Tue, 09 Jul 2019 09:26:19 -0400") References: <87imsci9sj.fsf@sdf.lonestar.org> <87imsbtk3o.fsf@dustycloud.org> Date: Tue, 09 Jul 2019 15:07:20 -0400 Message-ID: <875zobvxg7.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: Christopher Lemmer Webber Cc: 36555@debbugs.gnu.org --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable I've implemented the features missing from 'switch-system-program', 'upgrade-services-program', and 'install-bootloader-program' and successful= ly ran the new 'guix system reconfigure' in a virtual machine. Also tests for 'switch-system-program' have been implement, but I realized = that I'll need to be a bit more clever to test 'upgrade-services-program' and 'install-bootloader-program' -- the latter, in particular, requires boot parameters from the machine being tested at build time, so I suspect I'll h= ave to provide some constant boot parameters to avoid spinning up the virtual machine outside of the test derivation. Anyway, I've reverted a change in my previous patch series that updated 'upgrade-shepherd-services' to use 'call-with-service-upgrade-info', since = I'd neglected to check the parameters that it passes to 'mproc'. Basically, it = _has_ to be called from 'upgrade-services-program', which already has some functionality comparible to 'shepherd-service-upgrade'. If someone could ta= ke a look and ensure that it sufficiently implements 'shepherd-service-upgrade',= that would be greatly appreciated. On that note, I've changed 'upgrade-services-program' to collect Shepherd e= rror messages as it goes. Is this the right way to go about it? My thinking is t= hat, this way, both 'guix system reconfigure' and 'guix deploy' will be able to report Shepherd errors without stopping half-way through because Shepherd e= rrors out. Either way, I believe this fixes the issue that Ricardo was having with 'guix deploy'. Regards, Jakob Jakob L. Kreuze (3): guix system: Add 'reconfigure' module. guix system: Reimplement 'reconfigure'. tests: Add reconfigure system test. Makefile.am | 1 + gnu/local.mk | 1 + gnu/machine/ssh.scm | 229 +++++++--------------------- gnu/tests/reconfigure.scm | 99 ++++++++++++ guix/scripts/system.scm | 143 +++++------------ guix/scripts/system/reconfigure.scm | 170 +++++++++++++++++++++ 6 files changed, 364 insertions(+), 279 deletions(-) create mode 100644 gnu/tests/reconfigure.scm create mode 100644 guix/scripts/system/reconfigure.scm =2D-=20 2.22.0 --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEa1VJLOiXAjQ2BGSm9Qb9Fp2P2VoFAl0k5egACgkQ9Qb9Fp2P 2VrBpw//ch4SAJzvHIlDoVkygwlH/WuX/FeAQQZujDcgwj/m86sx4Vtq//FyD9oH g53lI4AONVAVvURmVbcHTzimArSQvpK12iJe1HC5iEFMogsLQAK/esHtDFOC60CQ u1JyWlYdyeAkQOM9gbFUaN9FOlSFk4pfP4NJMGatqi/2OnRQpCT6v66pPF1rXAb+ MYq3aj/XGNMwTVx98IvT762RBbb7tjEoMmaUUemF5D8EIGm8chzQgApQx5LwJpKL KQOOL8AHcZJE+5mAN+0WI3AytJlZQAxgUmihcgdmbqxypgRvwgk8y+GOdbXjAagH C9bv0r1AkucAhwaNm97KFNPDAThqZQJeRPmAk1fwKkA4i9u1saCt1GYf5tCCyQb1 Jm0a7qjzmnMQjzbt/RZGY/jwgj2UNqoAnZYbTpmQSij8z2kSj2D/qmvFeSfhz8RX c4+Dfvseo75KIVeLA9ao1M6PkNUPTFkdJsM8HZFcPWPh6jCPHN//Tg06FKSvy5QZ bcoscowpie6PpA0yz0AupVBUObpi4ZHTIPoUdYr4mwvUXRGqBd5DxQC3r3zqkbvN I1cvSUwWhJazdHsM9QzwRPOmbpfpExjB0uI63JroQVMCkmBoXrG+fqmtWN19H49z AXKZ3i/NQaFbKmAWxZK8/zxvGFm6PU97mbh+LygJW57Cjl4hCI4= =qOlU -----END PGP SIGNATURE----- --=-=-=--