From unknown Thu Jun 12 08:39:03 2025 X-Loop: help-debbugs@gnu.org Subject: bug#35266: system init doesn't work with -e Resent-From: rendaw <7e9wc56emjakcm@s.rendaw.me> Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Sun, 14 Apr 2019 10:03:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 35266 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: 35266@debbugs.gnu.org X-Debbugs-Original-To: submit@debbugs.gnu.org Received: via spool by submit@debbugs.gnu.org id=B.155523613610806 (code B ref -1); Sun, 14 Apr 2019 10:03:01 +0000 Received: (at submit) by debbugs.gnu.org; 14 Apr 2019 10:02:16 +0000 Received: from localhost ([127.0.0.1]:59862 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hFbxn-0002oC-8E for submit@debbugs.gnu.org; Sun, 14 Apr 2019 06:02:15 -0400 Received: from out3-smtp.messagingengine.com ([66.111.4.27]:48417) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <7e9wc56emjakcm@s.rendaw.me>) id 1hFan3-0000xL-5i for submit@debbugs.gnu.org; Sun, 14 Apr 2019 04:47:06 -0400 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id D890F20CF2 for ; Sun, 14 Apr 2019 04:46:59 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute6.internal (MEProxy); Sun, 14 Apr 2019 04:46:59 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rendaw.me; h=to :from:subject:message-id:date:mime-version:content-type :content-transfer-encoding; s=fm3; bh=IZPdGep6FQgQEh7DRQgAgvfpli oCCcpIp/Z03a1NnwQ=; b=fh2+iDMIGS9g7Kh/oWgvM7wpR24vUFO3JbTNio4bHb 7CisK3IRno+p6UZQ5sfDPSCYaM37qY7/h5LhnjmSQXElwyxL+cxPZlS7sJWfjVaE JFrv/5juXTIgoWC3bOP+akjXgY2LopQMxG4+lEPXGDhA8Iw3yVE1u3GsBwilxRIM V7uY+A+l6KBPr7V9q0VpOB0q/6kUGM+j8LFGUJWvcqeVcJmyjtISZb5tHwgHmSUM BqKRIMJbg8R8TkZvvC1/HqNy6wRWygGdHg3lrs0NUpvyJtLv15mrU+NqVL+3R2dd 8q3ORP5VoxZrYIsrNGxh4sc9JQnQ5+YxtPGARsxTlEnQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:message-id:mime-version:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=IZPdGe p6FQgQEh7DRQgAgvfplioCCcpIp/Z03a1NnwQ=; b=fEHH5G3rlzOUeKVF+Wm7cF t9OU7Y2MeRveI0/gWNRmpwhH4c5LTpUM2LS4liV8WqQ9u57+OUavlZu+GtcPtAQw fkvhCtW6Rswr5EK/Kwn9QjTaePeNjxPmXN+ZTqOBaBBaxIZTEB8u/UHzTJ50GxbG blEu2BNyLwZ/jDxgdzu7pJjSQD50scM3DG+TlwqF26ewWdrhQEwnzye0iH4PApw5 p0ivM9eAhqBZO+ZebD3suPrRFRjAdTQSdRLlglGtJVd37XbCHMEKVc+toL7QAUg8 VbAA3eYRHfTKKwbSRsjOgOQFB6Wq22FTyer5tI+XcOW5z0QwG9tRNNd9ZCDjXahA == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduuddrvdejgddtlecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecunecujfgurhepvffhuffkffgfgggtgfesthekredttd efjeenucfhrhhomheprhgvnhgurgifuceojegvleiftgehiegvmhhjrghktghmsehsrdhr vghnuggrfidrmhgvqeenucfkphepuddukedrvdegfedrvdefiedrudeileenucfrrghrrg hmpehmrghilhhfrhhomhepjegvleiftgehiegvmhhjrghktghmsehsrdhrvghnuggrfidr mhgvnecuvehluhhsthgvrhfuihiivgeptd X-ME-Proxy: Received: from [192.168.1.35] (y236169.dynamic.ppp.asahi-net.or.jp [118.243.236.169]) by mail.messagingengine.com (Postfix) with ESMTPA id 05E5D10319 for ; Sun, 14 Apr 2019 04:46:58 -0400 (EDT) From: rendaw <7e9wc56emjakcm@s.rendaw.me> Message-ID: <880d5365-ca15-e70a-97d2-fc20e5a1a713@s.rendaw.me> Date: Sun, 14 Apr 2019 17:46:56 +0900 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.5.3 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit X-Spam-Score: -0.7 (/) X-Mailman-Approved-At: Sun, 14 Apr 2019 06:02:13 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) Package: guix Version: 0.16.0 I discussed this on irc and was recommended to ask about it on the mailing list - I decided to send it to the bug tracker because if it's decided to be a bug there's one less step. Loosely copying irc logs: Hello! I'm getting "wrong number of arguments for action 'init'" when I do "guix system init -e '(my-func arg1 arg2)' /mnt" - is there something obvious I'm doing wrong? I googled around but the only result I found was logs from 2 years ago that are gone now Also, the docs aren't specific in this regard - will the filesystem created by "guix system init" be a bootable system? Like disk-image but on a mounted empty filesystem? The other way I could interpret the docs for that command are that "init" copies all the files required to build the system (source files, guix binaries, etc) into a directory for backup purposes Hi rendaw. why do you pass -e flag to system init? To pass arguments into the build (drive uuids, secrets I don't want to commit to the system config, etc) I suppose I image it's the same reason one would want to pass -e to system disk-image or system-vm or whatever Near the bottom of “guix/scripts/system.scm” it has a “case” form that checks if the action is “init” and then makes sure the argument count is exactly two. It would be pretty easy to fix, but I recommend contacting the mailing list before doing anything, in case there is a good reason for it. rendaw: ‘-e’ contributor didn’t handle init case, intention was ‘(guix-system): Allow commands taking a file as an argument to use an expression instead.’ but there is a check for init that doesn’t allow that currently. rendaw: more at 5a72ddf176d53a7f4df922985d9d7fd4cfa160f5 kmicu: So I guess it sounds unintentional? rendaw: The main issue seems to be that the “process-action” procedure assumes the target to be the second argument. If there were no configuration file, it would have to be the first. I’m not certain, but I bet with a little tweak to “process-action”, you could remove the check and everything would work fine. I suppose none of the other actions have a target parameter rendaw: yep, you are basically the first user using init with -e. Congrats xD :D