From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id OMmUCjHtnV/ITgAA0tVLHw (envelope-from ) for ; Sat, 31 Oct 2020 23:03:13 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id AMVNBjHtnV+HWQAAB5/wlQ (envelope-from ) for ; Sat, 31 Oct 2020 23:03:13 +0000 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 B338B94043A for ; Sat, 31 Oct 2020 23:03:12 +0000 (UTC) Received: from localhost ([::1]:32878 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kYztu-0005s2-7d for larch@yhetil.org; Sat, 31 Oct 2020 19:03:10 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54826) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kYztm-0005rv-Pw for bug-guix@gnu.org; Sat, 31 Oct 2020 19:03:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:51548) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kYztm-0000oz-Gr for bug-guix@gnu.org; Sat, 31 Oct 2020 19:03:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kYztm-0001Fu-CI for bug-guix@gnu.org; Sat, 31 Oct 2020 19:03:02 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#44196: [PATCH 2/3] system: Add store-directory-prefix to boot-parameters. Resent-From: Miguel =?UTF-8?Q?=C3=81ngel?= Arruga Vivas Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Sat, 31 Oct 2020 23:03:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 44196 X-GNU-PR-Package: guix X-GNU-PR-Keywords: patch To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Received: via spool by 44196-submit@debbugs.gnu.org id=B44196.16041853484780 (code B ref 44196); Sat, 31 Oct 2020 23:03:02 +0000 Received: (at 44196) by debbugs.gnu.org; 31 Oct 2020 23:02:28 +0000 Received: from localhost ([127.0.0.1]:34861 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kYztE-0001F2-5j for submit@debbugs.gnu.org; Sat, 31 Oct 2020 19:02:28 -0400 Received: from mail-wm1-f46.google.com ([209.85.128.46]:36310) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kYzt8-0001Eh-NC for 44196@debbugs.gnu.org; Sat, 31 Oct 2020 19:02:26 -0400 Received: by mail-wm1-f46.google.com with SMTP id e2so6047189wme.1 for <44196@debbugs.gnu.org>; Sat, 31 Oct 2020 16:02:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-transfer-encoding; bh=w47FmObHXSs27eFYKuHJxFl67qcqIwZT6iZYVBEOgR4=; b=r8xHFXb1vM5RZmxiKSXbI4y1q5HkAYe72i4WEoBPRw+yLcHeMnpXxFJDYDIS1J1bMA 7E80Qg7PtB+KLKzc/NZDcDuC6uePfiK/qeZhkw6UxKwk3k9cZ8D3J/mO0SoNEticZ6xj lZelbQEljLbmndLNWQOvZn9kK7vMB4jxT4XGVTDADuRIidsEgZObA+v1G6aMo26myWQC RJiuxRsU2Ou/0NG1EArCLEv0Tv0xMwJEUjqTdQ/QWRb/rlGP6Tst6/MbkBYknerAwwXP kt9zEaHyGNtI3pmpvKPDTyWbD9pTLhxFHvJD7DSmbex+hepwP3EATGh5S2Jl6AI/QlDL jLYg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-transfer-encoding; bh=w47FmObHXSs27eFYKuHJxFl67qcqIwZT6iZYVBEOgR4=; b=G54JUwIIs9O/ttT3hlfGpf7gS2lNRIDaZxah2bg6AJegmFLfOAckIOIHKFErEKOtkF 1yrRthQyiNnVyQw31qnk8mMjKqd2Q2fpUyNijShGfZpPExAj4jY4V7OeI5Qhc7edfBwx ZnfDdYp4LWrnbJjuFf4VSYiumx+5Xme6kN4oy3u07XlWs/F/GByD2Y+svd7djTsm38pT WgBLQdocAi70rj0CC49LQ9PX4gTf6mKXhNB7XbIUrAs6umAlkFKGwFzwNWe9J5hZ++m6 G3bNIU/9hLiOy+1eBvM+a4sLGL8pWmRMXL001GMO3YgC5Wdc1VazR9U2y6Xmd8R+lywN VZdg== X-Gm-Message-State: AOAM531b6MHYMXpRIhAW+hN6i6ncWUExxRhuEGq2VlxK/OLn7zkWiXFZ LtXj4WX6sh6+ORePTfwhiN+Bn/sHPBwuyg== X-Google-Smtp-Source: ABdhPJw3bxcvsbqAcRq/nP4uhzS2hJWe4AvgmdpiPFeBgpgK8hVHE581POAB03SVFZUBecc388b5VQ== X-Received: by 2002:a05:600c:2048:: with SMTP id p8mr636956wmg.165.1604185336485; Sat, 31 Oct 2020 16:02:16 -0700 (PDT) Received: from unfall (218.139.134.37.dynamic.jazztel.es. [37.134.139.218]) by smtp.gmail.com with ESMTPSA id c10sm9349792wmb.20.2020.10.31.16.02.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 31 Oct 2020 16:02:15 -0700 (PDT) From: Miguel =?UTF-8?Q?=C3=81ngel?= Arruga Vivas References: <878sbvh5j4.fsf@gmail.com> <87y2jvfqon.fsf@gmail.com> <87blgit6qr.fsf@gnu.org> Date: Sun, 01 Nov 2020 00:02:14 +0100 In-Reply-To: <87blgit6qr.fsf@gnu.org> ("Ludovic =?UTF-8?Q?Court=C3=A8s?="'s message of "Sat, 31 Oct 2020 22:39:40 +0100") Message-ID: <87361u3sp5.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.2 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Spam-Score: -0.8 (/) X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: 44196@debbugs.gnu.org Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: "bug-Guix" X-Scanner: ns3122888.ip-94-23-21.eu Authentication-Results: aspmx1.migadu.com; dkim=fail (headers rsa verify failed) header.d=gmail.com header.s=20161025 header.b=r8xHFXb1; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of bug-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=bug-guix-bounces@gnu.org X-Spam-Score: 0.09 X-TUID: R3zFU1xYdFoS Hi Ludo! First of all, thanks for the review. Ludovic Court=C3=A8s writes: > Could you explain why we need =E2=80=98store-directory-prefix=E2=80=99 in= addition to > =E2=80=98store-mount-point=E2=80=99? At first sight, looking at the fiel= ds in there, > these two can seem to be synonymous. The difference is subtle unless you use btrfs subvolumes... or bind mounts, which currently probably would fail as the check is only performed for btrfs partitions---note to self, think about this and probably prepare a patch. This check was already implemented, but the parameter was only provided to grub-configuration-file during init/reconfigure. Should I add an explanation of/link the bug on the commit message? Or maybe is something like this better? ---- ;; Mount point of the store device (as in /etc/fstab's second field) (store-mount-point boot-parameters-store-mount-point) ;; Actual path of the store inside of the device at boot time. (store-directory-prefix boot-parameters-store-directory-prefix) ---- In any case, if that doesn't clarify enough, it can be better understood with an example: ----- Disk configuration: /dev/xda1: btrfs file system - /rootfs: subvolume mounted on / - /gnufs: subvolume mounted on /gnu. Therefore the serialized boot-parameters should be: (boot-parameters ... (store (device "/dev/xda1") (mount-point "/gnu") (directory-prefix "/gnufs")) ...) ----- This way grub.cfg generation is able to `normalize-file' store paths and transform the user visible file /gnu/store/xxxxx-kernel to the grub visible path /gnufs/store/xxxx-kernel in the final file. This is already provided by the operating-system definition, but the other calls to the boot configuration generator only rely on the information provided by boot-parameters. A simple test case that I haven't implemented yet as a marionette---but I should anyway---only needs this steps: 1. Create initial os with that kind of disk configuration. 2. Boot on it. 3. Create a second generation. 4. Call guix system delete-generations. 5. Reboot---it doesn't as grub.cfg is wrong. 6. Usual tests. Tomorrow I won't be able to do much, but this Monday I could try to implement something like this too if you think it's worth. > Also patch #3 doesn=E2=80=99t depend on it, does it? All the patches are independent, as they fix separate issues, but all are related with bugs detected with my tests with btrfs subvolumes. I should have specified that they were a patch set, even though that one was getting close to become a series... hopefully convergent. :) Thanks again, Miguel