From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id mNY/Bn8Df2RmqAAASxT56A (envelope-from ) for ; Tue, 06 Jun 2023 11:59:27 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id oMM7Bn8Df2RNtwAA9RJhRA (envelope-from ) for ; Tue, 06 Jun 2023 11:59:27 +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 EAF2D13D31 for ; Tue, 6 Jun 2023 11:59:26 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q6TSy-00041m-S1; Tue, 06 Jun 2023 05:59:04 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q6TSx-00041E-7A for bug-guix@gnu.org; Tue, 06 Jun 2023 05:59:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1q6TSw-0000HW-VH for bug-guix@gnu.org; Tue, 06 Jun 2023 05:59:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1q6TSw-000805-BO; Tue, 06 Jun 2023 05:59:02 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#63921: Activation snippets in reverse order, prevent boot Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Tue, 06 Jun 2023 09:59:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 63921 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: 63921@debbugs.gnu.org Cc: Brian Cully Received: via spool by 63921-submit@debbugs.gnu.org id=B63921.168604553130719 (code B ref 63921); Tue, 06 Jun 2023 09:59:02 +0000 Received: (at 63921) by debbugs.gnu.org; 6 Jun 2023 09:58:51 +0000 Received: from localhost ([127.0.0.1]:51003 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q6TSl-0007zO-Bk for submit@debbugs.gnu.org; Tue, 06 Jun 2023 05:58:51 -0400 Received: from eggs.gnu.org ([209.51.188.92]:47604) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q6TSj-0007zC-Gz for 63921@debbugs.gnu.org; Tue, 06 Jun 2023 05:58:50 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q6TSd-0000DT-UT; Tue, 06 Jun 2023 05:58:43 -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=cCo6ZRWHNqsGYPEXUWv2h9a5IoB+WldHM0angfzZRfI=; b=iQv8PKAiSYyuTGETf7gE vJfPphXlhfKnbfuYLGYJFxUCOwVQPZQjRMNte9JFBmyObScaCnCo0NuwOQxX/gPOzrNA+r2hw7iPs uCgXtD/KXE6HdPXt1ls3nHOyIAmgZdNlHSTXz7GmfW/8TcujiE1jAqb2vaqlkjOvevIMBnWE4xpcw Vmnyga8VhHFtXRsclX2NEV7D8owUOLbG+wVtIxqGZMYht5xs+Vbwr5JEbMpeTVhLLpHIbzmpF64QU YJH1qLcSl7cU44S894YzC79V1HJBuej4Di40kdNu+1D3K+xXl3F5sGscbhjBzrD/WJjXhhQrEnGbC XWCxvbZs2TCLOA==; Received: from [2001:660:6102:320:e120:2c8f:8909:cdfe] (helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q6TSd-0006u0-HZ; Tue, 06 Jun 2023 05:58:43 -0400 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: <877csh9fb9.fsf@inria.fr> Date: Tue, 06 Jun 2023 11:58:40 +0200 In-Reply-To: <877csh9fb9.fsf@inria.fr> ("Ludovic =?UTF-8?Q?Court=C3=A8s?="'s message of "Tue, 06 Jun 2023 10:15:54 +0200") Message-ID: <87y1kw9ajz.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (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-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN ARC-Seal: i=1; s=key1; d=yhetil.org; t=1686045567; a=rsa-sha256; cv=none; b=I34Ak8r6lQV6Yg2iALkvFqXy7kz0uZv0MPVheAmjwR4BvhT7xPZ/AiDKZebnKSiM4uGJz9 2KakzReQPtkvUbbY86P9v4/zwge9xjXxmdD744f92q8yz2nx0LVag6cNidbTSg+9FwEFue ++QgWsrMMW8uQ/BaqiivYRSoJb3hFO/GoCiLEQ4mKelAie4JcBOS9aTLHaMQJ19RydBwvs lxToW4yzLxNUNns8MWEDt5u/FpqxT4MPJQFAFfJULk7UMtcASQSxuHOKLQCPdexlGy/UH2 NcfCieZKrw7n1L+urDWQGYQlnrwrYUI5KbP+Ce43E5S+0k7NuulJJ5B4gfUEfg== 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=iQv8PKAi; 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" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1686045567; 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=cCo6ZRWHNqsGYPEXUWv2h9a5IoB+WldHM0angfzZRfI=; b=Iuvgim8gq7gv8yZaarXj9YMSxcgk5XseEAQBOn4omCRpjDUkzHVPumXmKp0SrVQA2VPN1W MWGBsazrZc2FKpqwQt5UMyzlLAei2XkgbEjjzvQag/3Rvgs4UvjeklyqbcRL57VHT63RRk 2Ldg4bM7VaxAuzNE1eWj0iuk5lkAyCezc735bLLZH/4H9Exg6nG8cNFw+aBsLZ1qqx5KTk De6pCG8riViIw4dV6nPW2ThUpGrT4RCzbR94f1ppD53LEuZ8zrJYQig9NivfDpunv7ICui crypAe/OIynMqwNsb8bOvroc5SXGcNcFgdZCPg0AxQOtDlK1RbQIf3/y/bR0kQ== Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=iQv8PKAi; 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-Scanner: scn0.migadu.com X-Migadu-Spam-Score: -5.19 X-Spam-Score: -5.19 X-Migadu-Queue-Id: EAF2D13D31 X-TUID: xcMo3Zzs2A7T Ludovic Court=C3=A8s skribis: > Booting a system reconfigured from > eed55a6544d5bda2245ec853e5fa4b28e1865bea fails with shepherd saying: > > error: while opening socket '/var/run/shepherd/socket': Address already= in use > > The root cause appears to be that the =E2=80=98boot=E2=80=99 program has = expressions > reversed: > > $ guix gc --references $(guix gc --derivers $(readlink -f /var/guix/profi= les/system-236-link)) | grep boot > /gnu/store/21ldhyrpji6lkkdxi4lgr5k9l5fr2b7l-boot.drv > $ cat $(guix build /gnu/store/21ldhyrpji6lkkdxi4lgr5k9l5fr2b7l-boot.drv) > (eval-when (expand load eval) (let ((extensions (quote ())) (prepend (lam= bda (items lst) (let loop ((items items) (lst lst)) (if (null? items) lst (= loop (cdr items) (cons (car items) (delete (car items) lst)))))))) (set! %l= oad-path (prepend (cons "/gnu/store/pj751v3199vmv6i6sf0szp185ryzcfdg-module= -import" (map (lambda (extension) (string-append extension "/share/guile/si= te/" (effective-version))) extensions)) %load-path)) (set! %load-compiled-p= ath (prepend (cons "/gnu/store/pql80c2hy38bb60c68sng74s4xa35vwk-module-impo= rt-compiled" (map (lambda (extension) (string-append extension "/lib/guile/= " (effective-version) "/site-ccache")) extensions)) %load-compiled-path))))= (begin (begin (false-if-exception (delete-file "/run/booted-system")) (syml= ink (canonicalize-path "/run/current-system") "/run/booted-system") (let lo= op ((fd 3)) (when (< fd 1024) (false-if-exception (let ((flags (fcntl fd F_= GETFD))) (when (zero? (logand flags FD_CLOEXEC)) (fcntl fd F_SETFD (logior = FD_CLOEXEC flags))))) (loop (+ fd 1)))) (execl "/gnu/store/wj5i6x3xgai7p8wh= wqybxwqdjdbmbzha-shepherd-0.10.99-git/bin/shepherd" "shepherd" "--config" "= /gnu/store/gnjghlc3n5qbala5jfdslgfi0n3vy8v7-shepherd.conf")) (primitive-loa= d "/gnu/store/riabgidmf6fh76klc1yam7k9j1478vvw-activate.scm") (begin (use-m= odules (guix build utils)) (letrec-syntax ((fail-safe (syntax-rules () ((_ = exp rest ...) (begin (catch (quote system-error) (lambda () exp) (const #f)= ) (fail-safe rest ...))) ((_) #t)))) (fail-safe (delete-file "/etc/group.lo= ck") (delete-file "/etc/passwd.lock") (delete-file "/etc/.pwd.lock") (seten= v "GUIX_LOCPATH" "/gnu/store/5fmqijrs5f7vx8mc2q2pmq26yvhb74sm-glibc-utf8-lo= cales-2.35/lib/locale") (setlocale LC_CTYPE "en_US.utf8") (delete-file-recu= rsively "/tmp") (delete-file-recursively "/var/run") (mkdir "/tmp") (chmod = "/tmp" 1023) (mkdir "/var/run") (chmod "/var/run" 493) (delete-file-recursi= vely "/run/udev/watch.old"))))) > > Namely, (execl "=E2=80=A6/bin/shepherd") comes before the cleanup express= ions, > which is why /var/run/shepherd/socket is still around when we boot. Fixed in 181951207339508789b28ba7cb914f983319920f. The regression came from dbbc7e946131ba257728f1d05b96c4339b7ee88b, which led =E2=80=98modify-services=E2=80=99 to change the order of services (some= thing I had completely overlooked while reviewing, apologies!). I ended up rewriting =E2=80=98modify-services=E2=80=99. Good news is we now have test= s for this. Ludo=E2=80=99.