From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id OATOLGPNMWP/KQEAbAwnHQ (envelope-from ) for ; Mon, 26 Sep 2022 18:03:47 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id oJnVLGPNMWOnpQAA9RJhRA (envelope-from ) for ; Mon, 26 Sep 2022 18:03:47 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 3906E3A0DE for ; Mon, 26 Sep 2022 18:03:47 +0200 (CEST) Received: from localhost ([::1]:47950 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ocqaA-0007cp-AH for larch@yhetil.org; Mon, 26 Sep 2022 12:03:46 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44474) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ocqEB-0006iu-35 for bug-guix@gnu.org; Mon, 26 Sep 2022 11:41:05 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:52306) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ocqEA-0007Lo-G8 for bug-guix@gnu.org; Mon, 26 Sep 2022 11:41:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ocqEA-0003Nu-0t for bug-guix@gnu.org; Mon, 26 Sep 2022 11:41:02 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#58084: guix deploy fails, leaving the newly installed system generation active Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Mon, 26 Sep 2022 15:41:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 58084 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: Maxim Cournoyer Cc: 58084@debbugs.gnu.org Received: via spool by 58084-submit@debbugs.gnu.org id=B58084.166420680212891 (code B ref 58084); Mon, 26 Sep 2022 15:41:01 +0000 Received: (at 58084) by debbugs.gnu.org; 26 Sep 2022 15:40:02 +0000 Received: from localhost ([127.0.0.1]:51384 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ocqDB-0003Lq-Pw for submit@debbugs.gnu.org; Mon, 26 Sep 2022 11:40:02 -0400 Received: from eggs.gnu.org ([209.51.188.92]:46174) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ocqD8-0003LE-VY for 58084@debbugs.gnu.org; Mon, 26 Sep 2022 11:40:00 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:37724) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ocqD3-00070c-Jl; Mon, 26 Sep 2022 11:39:53 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To: From; bh=BDAsilR/LimPCcmTDlk7SD6FhylCgbqNYeo6gsHsYpE=; b=iEvOpUq19aJ+tR65gFjZ xGdiLSPGkDVzRCu35AItVNQYu472kMB92gp2IRyt2SUwuXAqqFueGG/g5D3HJBRrBaGf+LEOlxjUN C03+acmYNDR4ZONTWudZTS0WTloBGVpx4dg1neer5oBA2MHXUbB5o7r2XmlK7RE/IGACLlN8trzoj qukLTk7tYaLchr/vwmhuPN9kHArZO4AyYPGwhkAAsb7VDEmEIwxllgt2GvUOfAzyebE3Lll0FP7oA Oflx/iOIqHZSoy7M+XoVnP52C5ECEsoYuKXtZgcHM+oRVjsk0Fjx0H8oEZCRPPk1xgM2+Uzfbfa9O TJQqpkXhAWJPXg==; Received: from [2001:660:6102:320:e120:2c8f:8909:cdfe] (port=60584 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ocqD3-0007uI-60; Mon, 26 Sep 2022 11:39:53 -0400 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: <8735ce7tdv.fsf@gmail.com> Date: Mon, 26 Sep 2022 17:39:48 +0200 In-Reply-To: <8735ce7tdv.fsf@gmail.com> (Maxim Cournoyer's message of "Sun, 25 Sep 2022 22:37:48 -0400") Message-ID: <87h70ukuuz.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: "bug-Guix" X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1664208227; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=BDAsilR/LimPCcmTDlk7SD6FhylCgbqNYeo6gsHsYpE=; b=vDvJaBavbB9ICgdWCI/alpm9jHAH/JeLG68mLI5YAWwpinR796YjtE1xby2CFWGCb4NMUD 7aXRNqZX0tNdrbsYYoN7j92ReBLEPvf93jmSMhso+xqItCNIgPmuoa37w4NPW8Mx3LcrSV JjCJY4bVIa7MzL5E0EBRVEDhwDpBmoWquJbWI+cxWR9rkGNB5rDi0NsHBmjqWnWiMyj31R hHlobV6Gi68706YpqA5Kwupitw/wD0rqmB1yKEN/j72h8moClJe/EQtRCvC8/UfQx6qzxG qkqfp7f8rpzq11oJyYTHUkavLXDfr0Ey7dy4cUA9M8utkUbyeFkayAU+7rjZEQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1664208227; a=rsa-sha256; cv=none; b=nFodQHL9MbiqCoJVgUncBGqRlQJtyy/BDUFMYudgZBjSH90xD6dbCP6uQ4p7JLXzKZCqdi FvEjpneVRyj1hDK1lbBbU7hFTPaZdvDNGeTv+lEo3C7eIEhAHDMPJvcf7Up9tpUx3C/3uC AeRoHDZii71QN/beLzLAbMuRLB9Ebv7q+AMlCqLrHkdKFVZAjoQklSbqXGzzJsGF+vy+l4 7DdIDzVL8la79p6JxyqSdOQibp3xqplGnSah8Cl/StMAOrauMve30Dd2D2gkYWBwPIpoDu ZTGpT6wIteCZU+R++G4R6P1wAzN/0nWCeDHpNl64feaDZbsTSKvKoK55DQFvbQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=iEvOpUq1; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -2.05 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=iEvOpUq1; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 3906E3A0DE X-Spam-Score: -2.05 X-Migadu-Scanner: scn0.migadu.com X-TUID: 8kn8kLFrPm7f Hi, Maxim Cournoyer skribis: > While attempting to deploy to overdrive1, using the 9971141 commit in > the maintenance repo, I encountered the following error: > > maxim@hurd ~/src/guix-maintenance/hydra$ guix time-machine --commit=3D08d= 515233241ee0921b8b5ab706f98170c62437c -- deploy -L modules deploy-overdrive= 1.scm > The following 1 machine will be deployed: > overdrive1 > > guix deploy: deploying to overdrive1... > guix deploy: sending 0 store items (0 MiB) to 'overdrive1.guix.gnu.org'... > guix deploy: sending 0 store items (0 MiB) to 'overdrive1.guix.gnu.org'... > guix deploy: sending 0 store items (0 MiB) to 'overdrive1.guix.gnu.org'... > guix deploy: error: failed to deploy overdrive1: failed to switch systems= while deploying 'overdrive1': > system-error "symlink" "~A" ("File exists") (17) I can reproduce it. The failing code is in /gnu/store/=E2=80=A6-switch-to-system.scm: --8<---------------cut here---------------start------------->8--- (begin (use-modules (guix config) (guix profiles) (guix utils)) (define profile (or #f (string-append %state-directory "/profiles/system"))) (let* ((number (#{1+} # (generation-number profile))) (generation (generation-file-name profile number))) (switch-symlinks generation "/gnu/store/kifxq4hmp4ihn6nb06ia8wms33qrndx= n-system") (switch-symlinks profile generation) (setenv "GUIX_NEW_SYSTEM" "/gnu/store/kifxq4hmp4ihn6nb06ia8wms33qrndxn-= system") (primitive-load "/gnu/store/1wdwlaqkmixb1d7by7fj23lxppw8x44r-activate.s= cm"))) --8<---------------cut here---------------end--------------->8--- We can run it manually to get debugging data: --8<---------------cut here---------------start------------->8--- ludo@overdrive1 ~$ sudo -E env -i COLUMNS=3D100 "/gnu/store/xv7j4im9ap92mv= 0mbsm1wa4px93zxrms-switch-to-system.scm" making '/gnu/store/kifxq4hmp4ihn6nb06ia8wms33qrndxn-system' the current sys= tem... WARNING: (guile-user): imported module (guix build utils) overrides core bi= nding `delete' setting up setuid programs in '/run/setuid-programs'... populating /etc from /gnu/store/hf3qxlaiajvapwis0lq20avgl2whfa5w-etc... Backtrace: 6 (primitive-load "/gnu/store/xv7j4im9ap92mv0mbsm1wa4px93zxrms-s= witch-to-system.scm") 5 (primitive-load "/gnu/store/1wdwlaqkmixb1d7by7fj23lxppw8x44r-a= ctivate.scm") In ice-9/boot-9.scm: 260:13 4 (for-each # _) In unknown file: 3 (primitive-load "/gnu/store/v03vaksmkpj7wv4dhm0yrd3y65lzbixz-a= ctivate-service.scm") In srfi/srfi-1.scm: 634:9 2 (for-each # _) In gnu/build/activation.scm: 267:20 1 (_ "modprobe.d") In unknown file: 0 (symlink "/etc/static/modprobe.d" "/etc/modprobe.d") ERROR: In procedure symlink: In procedure symlink: File exists --8<---------------cut here---------------end--------------->8--- This is because =E2=80=98zram-device-service-type=E2=80=99 contributes a fi= le to /etc/modprobe.d: --8<---------------cut here---------------start------------->8--- (define %zram-device-config `("modprobe.d/zram.conf" ,(plain-file "zram.conf" "options zram num_devices=3D1"))) (define zram-device-service-type (service-type (name 'zram) (default-value (zram-device-configuration)) (extensions (list (service-extension kernel-module-loader-service-type (const (list "zram"))) (service-extension etc-service-type (const (list %zram-device-config))) (service-extension udev-service-type (compose list zram-device-udev-rule)))) (description "Creates a zram swap device."))) --8<---------------cut here---------------end--------------->8--- =E2=80=A6 which is fine, except that there was already a pre-existing /etc/modprobe.d directory (coming from openSuSE, the distro that was initially installed on this machine), which caused this activation code to break: --8<---------------cut here---------------start------------->8--- ludo@overdrive1 ~$ ls -l /etc/modprobe.d total 36 -rw-r--r-- 1 root root 3221 Nov 6 2016 00-system.conf -rw-r--r-- 1 root root 532 Nov 14 2012 10-unsupported-modules.conf -rw-r--r-- 1 root root 181 May 5 2017 50-alsa.conf -rw-r--r-- 1 root root 5009 Sep 15 2016 50-blacklist.conf -rw-r--r-- 1 root root 128 Oct 12 2017 50-bluetooth.conf -rw-r--r-- 1 root root 33 Oct 20 2016 50-ipw2200.conf -rw-r--r-- 1 root root 34 Oct 20 2016 50-iwl3945.conf -rw-r--r-- 1 root root 47 Nov 22 2011 99-local.conf ludo@overdrive1 ~$ ls -ld /etc/modprobe.d drwxr-xr-x 1 root root 260 Jan 29 2018 /etc/modprobe.d/ --8<---------------cut here---------------end--------------->8--- Once moved out of the way, reconfiguration proceeds just fine and happiness ensues: --8<---------------cut here---------------start------------->8--- ludo@overdrive1 ~$ ls -l /etc/modprobe.d lrwxrwxrwx 1 root root 22 Sep 26 17:19 /etc/modprobe.d -> /etc/static/modpr= obe.d ludo@overdrive1 ~$ ls -l /etc/modprobe.d/ total 4 lrwxrwxrwx 1 root root 53 Jan 1 1970 zram.conf -> /gnu/store/srl5xij6hf4x= 6iksx98grb1spcj3rch1-zram.conf --8<---------------cut here---------------end--------------->8--- Ludo=E2=80=99.