From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id 0NmUIDPlG2L5XgEAgWs5BA (envelope-from ) for ; Sun, 27 Feb 2022 21:55:15 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id MGo5HTPlG2LPwAAAauVa8A (envelope-from ) for ; Sun, 27 Feb 2022 21:55:15 +0100 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 2E6063ECF4 for ; Sun, 27 Feb 2022 21:55:15 +0100 (CET) Received: from localhost ([::1]:53180 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nOQZV-0002St-MB for larch@yhetil.org; Sun, 27 Feb 2022 15:55:13 -0500 Received: from eggs.gnu.org ([209.51.188.92]:34040) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nOQZK-0002Sk-Vi for bug-guix@gnu.org; Sun, 27 Feb 2022 15:55:02 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:37154) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nOQZK-0000NO-Lp for bug-guix@gnu.org; Sun, 27 Feb 2022 15:55:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nOQZK-0007IZ-Fz for bug-guix@gnu.org; Sun, 27 Feb 2022 15:55:02 -0500 X-Loop: help-debbugs@gnu.org Subject: bug#40998: Guix System's initrd doesn't honor rootflags Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Sun, 27 Feb 2022 20:55:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 40998 X-GNU-PR-Package: guix X-GNU-PR-Keywords: patch To: Maxim Cournoyer Received: via spool by 40998-submit@debbugs.gnu.org id=B40998.164599527428013 (code B ref 40998); Sun, 27 Feb 2022 20:55:02 +0000 Received: (at 40998) by debbugs.gnu.org; 27 Feb 2022 20:54:34 +0000 Received: from localhost ([127.0.0.1]:59284 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nOQYs-0007Hl-6k for submit@debbugs.gnu.org; Sun, 27 Feb 2022 15:54:34 -0500 Received: from hera.aquilenet.fr ([185.233.100.1]:55052) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nOQYq-0007HW-Cn for 40998@debbugs.gnu.org; Sun, 27 Feb 2022 15:54:32 -0500 Received: from localhost (localhost [127.0.0.1]) by hera.aquilenet.fr (Postfix) with ESMTP id B19CA399; Sun, 27 Feb 2022 21:54:25 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at aquilenet.fr Received: from hera.aquilenet.fr ([127.0.0.1]) by localhost (hera.aquilenet.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id b0d1yWo710_w; Sun, 27 Feb 2022 21:54:25 +0100 (CET) Received: from ribbon (91-160-117-201.subs.proxad.net [91.160.117.201]) by hera.aquilenet.fr (Postfix) with ESMTPSA id B0FF022F; Sun, 27 Feb 2022 21:54:24 +0100 (CET) From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: <87r1w3kbi0.fsf@hurd.i-did-not-set--mail-host-address--so-tickle-me> <20220219070155.1924-1-maxim.cournoyer@gmail.com> Date: Sun, 27 Feb 2022 21:54:24 +0100 In-Reply-To: <20220219070155.1924-1-maxim.cournoyer@gmail.com> (Maxim Cournoyer's message of "Sat, 19 Feb 2022 02:01:52 -0500") Message-ID: <87lexwuj27.fsf_-_@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spamd-Bar: / X-Rspamd-Server: hera X-Rspamd-Queue-Id: B19CA399 X-Spamd-Result: default: False [-0.10 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; FREEMAIL_ENVRCPT(0.00)[gmail.com]; TO_MATCH_ENVRCPT_ALL(0.00)[]; TAGGED_RCPT(0.00)[]; MIME_GOOD(-0.10)[text/plain]; RCPT_COUNT_TWO(0.00)[2]; FREEMAIL_TO(0.00)[gmail.com]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[]; MID_RHS_MATCH_FROM(0.00)[] 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: , Cc: 40998@debbugs.gnu.org Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: "bug-Guix" X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1645995315; 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; bh=c1tW9H2pE5AZAO7ls6CjlHwev9XiNpK5SxJK4aE5+Rs=; b=UqxTWVNhhLEHvL+UhS/x4osttbEyH7MwV5O7UOUfDasPgTzoZUFJAWkki5DvVR+YlWNLxr gAiJKYK1C5CsX0Bm2A/tnha6yZ5T/Fa4QSLfbXLAvDvqu8aBf5QokP5ueUsxXdMYeXN8IU 5OwX8vJk2RiAh4s0dwlRaGxdwE3S+35+ppUUZmdZGehAeS7VfZPg4Zk17NVhVZ+Iv5cG6Z iICQthADulzuO0jitRYlwXQN2GteOwg3pJsFtbf97CRp2Zi17HHS/j01V3i+zlB97kslgg D6l+iLcBCKqH3I1Z0dXJ325jc2I958YOalqSo5qu38KO9cnfAsmm6sYabeddhQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1645995315; a=rsa-sha256; cv=none; b=CDq9K/p8vn7uyXLBzNeLAglMbuwJcXKV9LLT7/wmgiCWECIEa2CJs72HqA0K7OYW5BC56c fu1hZi8EqepGjeGk1oT25cePcL5Udn3fbXrviMn+GvatVjDUrWoKz7XB33FvDOUfIWe5DR K3KpnfON3PnvyZ0Esd8dJXB34RftWOoC1F2MYlXRFopnaWE9q3t78fqg9AWuuGGgbeoBOJ KIUcK9IVFLhp9tSA5XhE+s0yI4L0h7sLg4xbo3VR/42QYWbMEbB7QnhiS6pryzgIXkiI57 Wo3LGlD3gUTGmeT74oF0uCaCyN06BWfHi5wawQ8V42HnOPyDADtCz06e5LhA3Q== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; 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: -5.10 Authentication-Results: aspmx1.migadu.com; dkim=none; 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: 2E6063ECF4 X-Spam-Score: -5.10 X-Migadu-Scanner: scn0.migadu.com X-TUID: S2fP0wIy61Ru Hi! Maxim Cournoyer skribis: > This version field exposes the (already present) version information of a= boot > parameters file. > > * gnu/system.scm (%boot-parameters-version): New variable. > ()[version]: New field. > (read-boot-parameters): Use it. > (operating-system-boot-parameters-file): Likewise. > * tests/boot-parameters.scm (test-read-boot-parameters): Use > %boot-parameters-version as the default version value in the template. [...] > (define-record-type* > boot-parameters make-boot-parameters boot-parameters? > (label boot-parameters-label) > @@ -322,7 +326,9 @@ (define-record-type* > (kernel boot-parameters-kernel) > (kernel-arguments boot-parameters-kernel-arguments) > (initrd boot-parameters-initrd) > - (multiboot-modules boot-parameters-multiboot-modules)) > + (multiboot-modules boot-parameters-multiboot-modules) > + (version boot-parameters-version ;positive integer > + (default %boot-parameters-version))) [...] > (match (read port) > - (('boot-parameters ('version 0) > + (('boot-parameters ('version (? version? version)) > ('label label) ('root-device root) > ('kernel kernel) > rest ...) > (boot-parameters > + (version version) > (label label) > (root-device (device-sexp->device root)) There=E2=80=99s no need to have a =E2=80=98version=E2=80=99 field in live <= boot-parameters> records: have the =E2=80=98version=E2=80=99 field in the serialized format = (the sexp) and make sure the deserializer correctly converts to the internal representation. Here, I think you can bump the version number in the serialized form, and have =E2=80=98read-boot-parameters=E2=80=99 automatically augment =E2= =80=98kernel-arguments=E2=80=99 when VERSION is 0 with =E2=80=9C--root=3DXYZ=E2=80=9D. (It might be that you can even do that without bumping the version number. Bumping is clearer but the downside is that an older Guix will abort when attempting to read =E2=80=98parameters=E2=80=99. This could hap= pen if you roll back to an earlier generation and try to run =E2=80=98guix system reconfigure=E2=80=99 or similar from there.) Also, you could write the =E2=80=98match=E2=80=99 pattern like this: ('boot-parameters ('version (and version (or 0 1))) ('label label) =E2=80=A6) I hope that makes sense! Ludo=E2=80=99.