From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms1.migadu.com with LMTPS id uNzaA8mpC2bScQAAqHPOHw:P1 (envelope-from ) for ; Tue, 02 Apr 2024 08:46:33 +0200 Received: from aspmx1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id uNzaA8mpC2bScQAAqHPOHw (envelope-from ) for ; Tue, 02 Apr 2024 08:46:33 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20230601 header.b=SYygEJIQ; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); 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-Seal: i=1; s=key1; d=yhetil.org; t=1712040392; a=rsa-sha256; cv=none; b=AlDKMkm5EIUcdR189z/c+thOSplzBY0Bz6KwTaLhUapCFR3qQve2CtFWMxyRpm/ZhsCFO2 EjgHZW8+3Ztn8ecbz0iKPjm/mCioTC+PUVXORhbS4f3s7kT31673UVf/zJfVat/GF9h+SK k9PYDjUp24StY4q+DkFyR+ZP/HK5jYgMtRovWwg/zKCh11jR7ymkgrcHhB62h4GFnVRwet TMyopNSjyaI08338mGBdZvudBsB3oWtE/9WPUQn+rTGWZ2yv1+1DhYEDOMNgR2hFLl7UHR 9Zd7+mmvCZdxazVfWE5U603zPJXOqdWLqsIDIDmyby5W0ns5/NJj4uqM8/bIHg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20230601 header.b=SYygEJIQ; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); 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=1712040392; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: 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=gBE1tZcyZtObJ0wn6c16poZDnkyBIaJwFh66cLiFdmU=; b=HsR12z+CJDdGdF2VHVM4GTFSEXvWHwu6cPW1G1qTQS5A45YAuChjpB7Flqh3Z0YrqUztyS J6+/Yze0LTYbzwNKwDYfFDbw9o/KnCAh7UFwUsqziNRjdpstJe1R9hBfLFUwI/J8SL4APK IY4hFQDBSuSFNc+X/zF4+1/4aviIsNTyHJyYGtWWK+CQHR/UkhD/A4uhbwqrY7JV9CDtNs 9UOpH5/WfvWT17vsFspBSlMkMmAKHqNt7fHafrai3fKUdMLfg41CinunqY3hL2xmBrvJNk /BJIXtuUlw3tughZnW2GjG/2YugiA2GsAjkI5NSyIboe2QZd+UAnerWmR9gQtg== 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 D5C391D43F for ; Tue, 2 Apr 2024 08:46:32 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rrXcm-0004CZ-Mc; Tue, 02 Apr 2024 02:28:00 -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 1rrXck-0004C4-E5 for bug-guix@gnu.org; Tue, 02 Apr 2024 02:27:58 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rrXck-0000Kg-6V for bug-guix@gnu.org; Tue, 02 Apr 2024 02:27:58 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rrXcn-00079Y-OO for bug-guix@gnu.org; Tue, 02 Apr 2024 02:28:01 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#70051: [PATCH] gnu: open-luks-device: Fix unbound variables. References: In-Reply-To: Resent-From: aurtzy Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Tue, 02 Apr 2024 06:28:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 70051 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: 70051@debbugs.gnu.org Cc: aurtzy Received: via spool by 70051-submit@debbugs.gnu.org id=B70051.171203927527483 (code B ref 70051); Tue, 02 Apr 2024 06:28:01 +0000 Received: (at 70051) by debbugs.gnu.org; 2 Apr 2024 06:27:55 +0000 Received: from localhost ([127.0.0.1]:52125 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rrXcg-00079D-DH for submit@debbugs.gnu.org; Tue, 02 Apr 2024 02:27:54 -0400 Received: from mail-qk1-x72e.google.com ([2607:f8b0:4864:20::72e]:61519) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rrXcd-00078N-OH for 70051@debbugs.gnu.org; Tue, 02 Apr 2024 02:27:53 -0400 Received: by mail-qk1-x72e.google.com with SMTP id af79cd13be357-78a60d10eeeso320984785a.2 for <70051@debbugs.gnu.org>; Mon, 01 Apr 2024 23:27:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1712039261; x=1712644061; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=gBE1tZcyZtObJ0wn6c16poZDnkyBIaJwFh66cLiFdmU=; b=SYygEJIQe/IDVccz/5PZgaK4a1Yzo4GC5MOWCmzylkBAO/BAfUFQwOj3Y3bwgKP0Q9 lv5NHGn+VINB10caAv4NqcrSXcZeXNniaFsw6LYrXsVRsAaNpZpYuCxe8y2s6oBmaKby XiGfvD4PwwtJ7ekfc18MY7mhN+kOiT7H9iAuZe8aR23v7LiC2l82LSLD/MHRgfNJsLta BMv5esREeZD9SDwF9HJ7riwQv7NKoq+Z6FFMCideM5oJJy9yWcBKmHDpmgZ+He00jnTL RJDqx+jcRQMN7lZ7kKAFm+NFy0NAuCsplgiqbzF8WvIwU3wnlESe1hgPy+Ycx0JbJacj MY1A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712039261; x=1712644061; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=gBE1tZcyZtObJ0wn6c16poZDnkyBIaJwFh66cLiFdmU=; b=E3Hp1qrgpjsyugCG+0yUmnduDiucuvmBymmYLQA+Lh3BIof1hxqy4dpOj99RlnXOp9 aX23ysChmna8UGP3HX7Xf6Q/SO8BtpWwmgrWsiEVjdpeUeSDi24f6ii2S347bFEafaYS 3xRf0yhCHrQlkkzEpsZLu8JGbvmTtkaLlefSmKRbmtE5p7uC+qtKR7WxB9z5zhjl0ufy ChcU/lwKVh2oc5jNOTZcbZUlMoMwc9RLzXR3FkxhqGyF8poPIOjC8rKMwIm54l1bsRrW 8Kt9uXOPcqFUodH3WANPCfTe+jIe2XIjjYLfZ/9wZEBDAPD41sG649GmaGQDO2mQfrmi SuVA== X-Gm-Message-State: AOJu0YyH8VI7Bioyyp3koqeLfPq2NLkyjY4RNZ/6TRsdsE9/MXdskhN5 i3cg9THz6PMqu8qAw0lb+QczJ2fiA/t6ES0w/N3tlFnPHk6Bp7O/nfitDJUQ X-Google-Smtp-Source: AGHT+IH0rN48WeHlHlJChTNYkLuP6W7+smIGWWgATwfSuT/j8on7LOHVdoxFrY/3GvDIaC45yFqTkQ== X-Received: by 2002:ad4:4b67:0:b0:696:b2bd:759f with SMTP id m7-20020ad44b67000000b00696b2bd759fmr9390635qvx.25.1712039261580; Mon, 01 Apr 2024 23:27:41 -0700 (PDT) Received: from localhost.localdomain (ool-18bb63f6.dyn.optonline.net. [24.187.99.246]) by smtp.gmail.com with ESMTPSA id kl15-20020a056214518f00b00690fd3f6e3esm5138263qvb.104.2024.04.01.23.26.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 01 Apr 2024 23:26:57 -0700 (PDT) From: aurtzy Date: Tue, 2 Apr 2024 02:23:29 -0400 Message-ID: <6b8484d383512fe8f9c2bc65ff495395f6fa0abf.1712036470.git.aurtzy@gmail.com> X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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-Flow: FLOW_IN X-Migadu-Country: US X-Spam-Score: 4.15 X-Migadu-Queue-Id: D5C391D43F X-Migadu-Scanner: mx12.migadu.com X-Migadu-Spam-Score: 4.15 X-TUID: L1KrVvs44jva It seems like `use-modules' never actually worked due to the way it is eval'd by the Shepherd, and was only apparent after a change that prevented other module imports from leaking into the namespace. This is fixed by using direct references instead. * gnu/system/mapped-devices.scm (open-luks-device): Use direct references for variables from other modules. Fixes: https://issues.guix.gnu.org/70051 Change-Id: I993798e161c4b4fca6e8a4f14eea5042b184ebc9 --- Hi! I encountered this issue as well, and think I've figured out what was happening: `use-modules' appears to not work due to the way g-expressions are evaluated by Shepherd, so after services became properly isolated in their own modules, the variable references became no longer available. There's a comment further down in the file that seems to confirm this ("XXX: We're not at the top level here..."). Can anyone confirm this patch works for them too? Cheers, aurtzy gnu/system/mapped-devices.scm | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/gnu/system/mapped-devices.scm b/gnu/system/mapped-devices.scm index c19a818453..e46e2c7954 100644 --- a/gnu/system/mapped-devices.scm +++ b/gnu/system/mapped-devices.scm @@ -201,14 +201,12 @@ (define* (open-luks-device source targets #:key key-file) #~(let ((source #$(if (uuid? source) (uuid-bytevector source) source)) - (keyfile #$key-file)) - ;; XXX: 'use-modules' should be at the top level. - (use-modules (rnrs bytevectors) ;bytevector? - ((gnu build file-systems) - #:select (find-partition-by-luks-uuid - system*/tty)) - ((guix build utils) #:select (mkdir-p))) - + (keyfile #$key-file) + (bytevector? (@ (rnrs bytevectors) bytevector?)) + (find-partition-by-luks-uuid (@ (gnu build file-systems) + find-partition-by-luks-uuid)) + (system*/tty (@ (gnu build file-systems) system*/tty)) + (mkdir-p (@ (guix build utils) mkdir-p))) ;; Create '/run/cryptsetup/' if it does not exist, as device locking ;; is mandatory for LUKS2. (mkdir-p "/run/cryptsetup/") base-commit: 6e2db85ca83528199a46b002d2592bd4bef017c8 -- 2.41.0