From patchwork Mon Jul 22 18:54:00 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Jakob L. Kreuze" X-Patchwork-Id: 14743 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 2D47117216; Mon, 22 Jul 2019 19:57:10 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTP id DE7D417206 for ; Mon, 22 Jul 2019 19:57:09 +0100 (BST) Received: from localhost ([::1]:36800 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hpdUj-000598-Ib for patchwork@mira.cbaines.net; Mon, 22 Jul 2019 14:57:09 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50398) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hpdUd-00058w-OQ for guix-patches@gnu.org; Mon, 22 Jul 2019 14:57:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hpdUc-0007bY-KU for guix-patches@gnu.org; Mon, 22 Jul 2019 14:57:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:53046) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hpdUc-0007bQ-Hc for guix-patches@gnu.org; Mon, 22 Jul 2019 14:57:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hpdUc-0007LL-EZ for guix-patches@gnu.org; Mon, 22 Jul 2019 14:57:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#36555] [PATCH v5 0/3] Refactor out common behavior for system reconfiguration. Resent-From: zerodaysfordays@sdf.lonestar.org (Jakob L. Kreuze) Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 22 Jul 2019 18:57:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 36555 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Ludovic =?utf-8?q?Court=C3=A8s?= Received: via spool by 36555-submit@debbugs.gnu.org id=B36555.156382179228187 (code B ref 36555); Mon, 22 Jul 2019 18:57:02 +0000 Received: (at 36555) by debbugs.gnu.org; 22 Jul 2019 18:56:32 +0000 Received: from localhost ([127.0.0.1]:33634 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hpdU8-0007KZ-Bi for submit@debbugs.gnu.org; Mon, 22 Jul 2019 14:56:32 -0400 Received: from mx.sdf.org ([205.166.94.20]:57387) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hpdU5-0007KN-Ik for 36555@debbugs.gnu.org; Mon, 22 Jul 2019 14:56:30 -0400 Received: from Epsilon (pool-173-76-53-40.bstnma.fios.verizon.net [173.76.53.40]) (authenticated (0 bits)) by mx.sdf.org (8.15.2/8.14.5) with ESMTPSA id x6MIuRQ8015164 (using TLSv1.2 with cipher AES256-GCM-SHA384 (256 bits) verified NO); Mon, 22 Jul 2019 18:56:28 GMT From: zerodaysfordays@sdf.lonestar.org (Jakob L. Kreuze) References: <87imsci9sj.fsf@sdf.lonestar.org> <87ef30i9fl.fsf@sdf.lonestar.org> <87y3129qsn.fsf@gnu.org> <87sgr9bziq.fsf@sdf.lonestar.org> <87pnmc7nt1.fsf@gnu.org> <8736j7nwcb.fsf@sdf.lonestar.org> <87muhfjm14.fsf@gnu.org> <87ftn63l7d.fsf@sdf.lonestar.org> <87v9w1zgon.fsf_-_@sdf.lonestar.org> <87y30v3qke.fsf@sdf.lonestar.org> <871rylrjt8.fsf_-_@sdf.lonestar.org> <87wogdq575.fsf_-_@sdf.lonestar.org> <87r26lq531.fsf_-_@sdf.lonestar.org> <87muh9q51e.fsf_-_@sdf.lonestar.org> <87wogc4v6e.fsf@gnu.org> <87zhl69box.fsf@sdf.lonestar.org> Date: Mon, 22 Jul 2019 14:54:00 -0400 In-Reply-To: <87zhl69box.fsf@sdf.lonestar.org> (Jakob L. Kreuze's message of "Mon, 22 Jul 2019 14:16:46 -0400") Message-ID: <87o91laojb.fsf_-_@sdf.lonestar.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.2 (gnu/linux) MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: 36555@debbugs.gnu.org Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches I'm feeling pretty good about this :) jakob@Epsilon ~/Code/guix [env] $ sudo -E ./pre-inst-env guix system reconfigure ~/.config/guix/system/config.scm substitute: updating substitutes from 'https://ci.guix.gnu.org'... 100.0% The following derivation will be built: /gnu/store/327py2dv6xjlm0xanqiqj1paxxx8g1rq-grub.cfg.drv building /gnu/store/327py2dv6xjlm0xanqiqj1paxxx8g1rq-grub.cfg.drv... /gnu/store/h45l455dg3wi6b24m0v8as5wdjskpfsm-system /gnu/store/razfpshw9n33dvm4bp0d2jwpdf4255hf-grub.cfg activating system... making '/gnu/store/h45l455dg3wi6b24m0v8as5wdjskpfsm-system' the current system... setting up setuid programs in '/run/setuid-programs'... populating /etc from /gnu/store/glzrd1cb6ngzwqvnph3q3pbxxjv8nprs-etc... substitute: updating substitutes from 'https://ci.guix.gnu.org'... 100.0% building /gnu/store/8vn3dlcmhri0f3ygfhqavlab2q35q2yn-install-bootloader.scm.drv... guix system: bootloader successfully installed on '/dev/sda' substitute: updating substitutes from 'https://ci.guix.gnu.org'... 100.0% building /gnu/store/43cyy0nnrdr6wg9xzcph6shs4w7gfxi6-upgrade-shepherd-services.scm.drv... shepherd: Evaluating user expression (let* ((services (map primitive-load (?))) # ?) ?). 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 | 189 ++------------------ gnu/services/herd.scm | 6 + gnu/tests/reconfigure.scm | 262 ++++++++++++++++++++++++++++ guix/scripts/system.scm | 186 +++++--------------- guix/scripts/system/reconfigure.scm | 237 +++++++++++++++++++++++++ tests/services.scm | 4 - 8 files changed, 560 insertions(+), 326 deletions(-) create mode 100644 gnu/tests/reconfigure.scm create mode 100644 guix/scripts/system/reconfigure.scm