From patchwork Tue Feb 16 12:35:46 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Brice Waegeneire X-Patchwork-Id: 27082 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 289AA27BC47; Tue, 16 Feb 2021 13:01:50 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS autolearn=unavailable autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id B535E27BC45 for ; Tue, 16 Feb 2021 13:01:49 +0000 (GMT) Received: from localhost ([::1]:41842 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lBzzA-0002q3-Tg for patchwork@mira.cbaines.net; Tue, 16 Feb 2021 08:01:48 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:35258) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lBzyQ-0002VP-SF for guix-patches@gnu.org; Tue, 16 Feb 2021 08:01:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:56446) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lBzyQ-0000Ob-1a for guix-patches@gnu.org; Tue, 16 Feb 2021 08:01:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lBzyP-0001Ag-VJ for guix-patches@gnu.org; Tue, 16 Feb 2021 08:01:01 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#46560] [PATCH 0/2] Activate system when switching generations. Resent-From: Brice Waegeneire Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 16 Feb 2021 13:01:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 46560 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 46560@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.16134804554085 (code B ref -1); Tue, 16 Feb 2021 13:01:01 +0000 Received: (at submit) by debbugs.gnu.org; 16 Feb 2021 13:00:55 +0000 Received: from localhost ([127.0.0.1]:39759 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lBzyI-00013d-Q6 for submit@debbugs.gnu.org; Tue, 16 Feb 2021 08:00:55 -0500 Received: from lists.gnu.org ([209.51.188.17]:42692) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lBzyG-00011T-Kc for submit@debbugs.gnu.org; Tue, 16 Feb 2021 08:00:53 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:35128) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lBzyG-0002Rd-Ag for guix-patches@gnu.org; Tue, 16 Feb 2021 08:00:52 -0500 Received: from relay10.mail.gandi.net ([217.70.178.230]:37045) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lBzyD-0000HQ-Ia for guix-patches@gnu.org; Tue, 16 Feb 2021 08:00:51 -0500 Received: from localhost (reverse4.evolix.net [31.170.9.129]) (Authenticated sender: brice@waegenei.re) by relay10.mail.gandi.net (Postfix) with ESMTPSA id 55E5C240017 for ; Tue, 16 Feb 2021 13:00:42 +0000 (UTC) From: Brice Waegeneire Date: Tue, 16 Feb 2021 13:35:46 +0100 Message-ID: <87czx06ubt.fsf@waegenei.re> MIME-Version: 1.0 Received-SPF: pass client-ip=217.70.178.230; envelope-from=brice@waegenei.re; helo=relay10.mail.gandi.net X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches Hello, As reported on previous bug report, rolling-back or switching generation doesn't activate the system as a system reconfiguration would do. This is especially problematic when modifying in /run/setuid-programs, as it can't be reverted easily. Also it hinder modification in the activation script since it's not straight forward to revert change made by those script without a functional roll-back mechanism. I'm not sure it's the right approach but at least it work: it add the activate.scm script to the system profile and then load it when switching-generation. This is related to issues: - #37596 and #38884 (they are duplicate) - #36855 a more wider discussion Cheers, - Brice Brice Waegeneire (2): gnu: services: Add activate script to the profile system directory. scripts: system: Activate system when switching generations. gnu/services.scm | 10 +++++++++- guix/scripts/system.scm | 8 ++++++-- 2 files changed, 15 insertions(+), 3 deletions(-)