From debbugs-submit-bounces@debbugs.gnu.org Sat Oct 24 13:57:24 2020 Received: (at submit) by debbugs.gnu.org; 24 Oct 2020 17:57:24 +0000 Received: from localhost ([127.0.0.1]:35085 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kWNnA-000630-5n for submit@debbugs.gnu.org; Sat, 24 Oct 2020 13:57:24 -0400 Received: from lists.gnu.org ([209.51.188.17]:36396) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kWNn5-00062m-U8 for submit@debbugs.gnu.org; Sat, 24 Oct 2020 13:57:22 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:41952) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kWNn5-0007Wn-KZ for bug-guix@gnu.org; Sat, 24 Oct 2020 13:57:19 -0400 Received: from mail-wm1-x32a.google.com ([2a00:1450:4864:20::32a]:36615) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kWNn4-0003PT-21 for bug-guix@gnu.org; Sat, 24 Oct 2020 13:57:19 -0400 Received: by mail-wm1-x32a.google.com with SMTP id e2so6381330wme.1 for ; Sat, 24 Oct 2020 10:57:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:user-agent:mime-version; bh=JXL91bsb60qZAkoo25Ttu3PiZq2K7xRdhWIDfbbrj9I=; b=dRgq2MYAMcq+Dyk8Awwpa/IEFDRrcLvkzGbqDdSPt+w+6EO4Khy71EZfcbF2hqQddI Q51GuT0sLe5vH3LBeiz9hYaFcR+gLy1xYIqciLIGdI6w+fmSLEACe1ANAX1Ut4NWQxku Gqwiy0kQmRMjevZB38u6/jd4lwSOL0CIgkHpB6+osOcpTtQtjUsvVM9BVPoWu7XIlfRb 0z2q+9GRlEUbZc7ukIrB++2IJNvouD4gUa3lec5dgmwkdL/eot/SIjgncH3s6U4WAnJS z/pjg65lttJLC221CVJvXqpMuMp52IPO8I0AmqDlERQq4Fjz2Uz/t+96XsNpd/aANjyn g7Mw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:user-agent :mime-version; bh=JXL91bsb60qZAkoo25Ttu3PiZq2K7xRdhWIDfbbrj9I=; b=lY9glBNWCKwyY3i04NMWX9P9vAlWj2rTsTkav+MeceDrJQAl1lE1j3HLs076yf/jYU 6fWwjVzLkufgJpKpjGW9Gwl/+eK5BpNuxwx/zmg7tl/nfnEeAOGTTcPwYGHIdGrmxTNv 2NNraXDZ/hbxteE13dVOuqnhvOQbUQwVhgvfRAhUm9R4513dR+plBekQa/ja46e2vVhT xIlL6FyFp88TvElcpJzTaMB2mJY0QIokIKuAFHvpTawKvo+lrQvRR/edUQQTzDVir6J6 xBhRyUtbULL3I6pcH1jjIVQR5qIXvLMtIynkYjnum17OOFDbA4UpTOUVUkI28JfXhndL KP4w== X-Gm-Message-State: AOAM5337VS3ShcRIgimNT1d4AeSow0uE379eu/zXthBN3U7M0Vliec+4 S9TnEFiCmB5OKf1pCAqGjIFzziSPiN9Ikg== X-Google-Smtp-Source: ABdhPJx7IMxXxqdgBAqPW3QT/2fySUkpcbI5W1cPjPy0UekIuWYNyWdws/RsI7RS9bJV08PFr1GBTw== X-Received: by 2002:a1c:b041:: with SMTP id z62mr8256707wme.183.1603562236347; Sat, 24 Oct 2020 10:57:16 -0700 (PDT) Received: from unfall (218.139.134.37.dynamic.jazztel.es. [37.134.139.218]) by smtp.gmail.com with ESMTPSA id s19sm14464532wmc.0.2020.10.24.10.57.15 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 24 Oct 2020 10:57:15 -0700 (PDT) From: =?utf-8?Q?Miguel_=C3=81ngel_Arruga_Vivas?= To: bug-guix@gnu.org Subject: Problems with /gnu/store in a different btrfs subvolume Date: Sat, 24 Oct 2020 19:56:15 +0200 Message-ID: <878sbvh5j4.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2a00:1450:4864:20::32a; envelope-from=rosen644835@gmail.com; helo=mail-wm1-x32a.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -17 X-Spam_score: -1.8 X-Spam_bar: - X-Spam_report: (-1.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 0.9 (/) X-Debbugs-Envelope-To: submit 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: -2.1 (--) I've been testing the installation and the use case for separate btrfs subvolumes, so I created two different btrfs subvolumes for the root file system (/rootfs) and the store (/storefs), and installed with guix system init and a basic operating-system configuration. The problems detected were: - [ ] Grub localization doesn't properly work as the root file system is not located in the literal route (that I hard-coded based on grub defaults). This was the main test, I still don't have a patch, but I'm thinking that we should generate the locale and provide there the store path. WDYT? - [*] The keymap doesn't work on stage2, as the path contains the wrong prefix for the store file. Fixed with patch 1. - [?] The store-prefix was not being provided in other places than the generation of a new system generation (sic), so "guix system delete-generations" generates grub.cfg with wrong paths. This should be fixed with patch 2, but I'm not sure how to write another test with a marionette: gnu/tests/installer.scm contains most of the code needed, but I'm not sure how to do it. The patches will follow this email. From debbugs-submit-bounces@debbugs.gnu.org Sat Oct 24 14:02:28 2020 Received: (at 44196) by debbugs.gnu.org; 24 Oct 2020 18:02:28 +0000 Received: from localhost ([127.0.0.1]:35090 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kWNs3-0006C7-RU for submit@debbugs.gnu.org; Sat, 24 Oct 2020 14:02:28 -0400 Received: from mail-wm1-f45.google.com ([209.85.128.45]:51266) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kWNs1-0006Bu-Fq for 44196@debbugs.gnu.org; Sat, 24 Oct 2020 14:02:26 -0400 Received: by mail-wm1-f45.google.com with SMTP id v5so5826747wmh.1 for <44196@debbugs.gnu.org>; Sat, 24 Oct 2020 11:02:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:in-reply-to:references:user-agent:date:message-id :mime-version:content-disposition:content-description; bh=LKDYKtt2Ki7ymK2a1Ro+v5DKNbxd4XvK/2VLHXT5DM4=; b=eC1MGI4H3/5PsRZ4o1Ici2lwwF8FljoXtCET9tnPmVE7mIa9vvAQbq+eerZNYrm0tp 2WTrV4Fe0f7/qXpb+Cer9L8i/omRXlhyHCUrb/bIqXLv1BXk9orguOebFotuIlpkD2FA U4k/9jskaoyKAjRnK+9lQH0mGpr2P+1TosQM6mi1iVTg542wXDTqVnMnaRFX7G4heEbX jKXHDDgOILTl4UTvkCmVk16KIUNcp+rOJL24CL0o/jyPyG917wAwshfIsGNG3kB0Zzc8 IdlA84RGUWVyTbeIrVW7pT9wDCKqqacz4bWnqcu/Hlb3LiDPVk6NIFxeqvQwxg+CvXyx eIcA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:in-reply-to:references :user-agent:date:message-id:mime-version:content-disposition :content-description; bh=LKDYKtt2Ki7ymK2a1Ro+v5DKNbxd4XvK/2VLHXT5DM4=; b=efq9LaLQ1mGbzN3uVZsCeFQ9ZHb9l+2kqbo9w7BKg8L5TWsjoAa6+P8gwipRME3MRL awtd+intWI0IYfW9nkC6oRC534jvm2VEoW36LqYeVH0QBKITJ9HoTgsqFfcXs/nSVt04 zyD3QbPAfPITeUAva6FoSgwC1LbshTe2GUYPzwM/Isx8VStXstij3bcB0kQfCxTK0tBm Hc2ktH1QxJ2Su8sPpgupu1O1Vzx2ZGQBCi4uXq6udMtweonmcZWfqkBGuRLJC962rzbI MojNF1+wsLdl34kyC2lT2wweCwNdqIfcCue/Zt7+G5/wjf4ksY2Mio1EYV6wDBQvT46C vbnA== X-Gm-Message-State: AOAM533V6Ogla4P5VfMyh33uEIkgoKt8+R0nUdeyDitvmXZGCK7XOaSd wf1G7hwHLv+DWfTVtwd5vfJHYjq7BRcU7w== X-Google-Smtp-Source: ABdhPJxEuVPuJp+9nqzyDJhrB5aidwITtL7Q4RC46txXvE7T0agU62z7Z4oJq7iQMr3xOkPpJhB2AQ== X-Received: by 2002:a1c:9695:: with SMTP id y143mr7502183wmd.146.1603562539265; Sat, 24 Oct 2020 11:02:19 -0700 (PDT) Received: from unfall (218.139.134.37.dynamic.jazztel.es. [37.134.139.218]) by smtp.gmail.com with ESMTPSA id l6sm12997644wrt.7.2020.10.24.11.02.18 for <44196@debbugs.gnu.org> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 24 Oct 2020 11:02:18 -0700 (PDT) From: =?utf-8?Q?Miguel_=C3=81ngel_Arruga_Vivas?= To: 44196@debbugs.gnu.org Subject: [PATCH 1/3] system: Fix grub keymap with store in btrfs subvolume. In-Reply-To: <878sbvh5j4.fsf@gmail.com> ("Miguel =?utf-8?Q?=C3=81ngel?= Arruga Vivas"'s message of "Sat, 24 Oct 2020 19:56:15 +0200") References: <878sbvh5j4.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) Date: Sat, 24 Oct 2020 20:01:17 +0200 Message-ID: <873623h5aq.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-system-Fix-grub-keymap-with-store-in-btrfs-subvolume.patch Content-Description: 0001-system-fix-grub-keymap.patch X-Spam-Score: 0.2 (/) X-Debbugs-Envelope-To: 44196 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: -0.8 (/) >From b310cb18021e421be3256b85ab3f2d8f61fe0ab8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20=C3=81ngel=20Arruga=20Vivas?= Date: Sat, 24 Oct 2020 17:48:28 +0200 Subject: [PATCH 1/2] system: Fix grub keymap with store in btrfs subvolume. * gnu/bootloader/grub.scm (grub-configuration-file) [keyboard-layout-config]: Use normalize-file. --- gnu/bootloader/grub.scm | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/gnu/bootloader/grub.scm b/gnu/bootloader/grub.scm index 611580a350..f1479024e6 100644 --- a/gnu/bootloader/grub.scm +++ b/gnu/bootloader/grub.scm @@ -421,11 +421,12 @@ set lang=~a~%" locale)))) (bootloader-configuration-bootloader config))) (keymap* (and layout (keyboard-layout-file layout #:grub grub))) + (entry (first all-entries)) + (device (menu-entry-device entry)) + (mount-point (menu-entry-device-mount-point entry)) (keymap (and keymap* - (if store-directory-prefix - #~(string-append #$store-directory-prefix - #$keymap*) - keymap*)))) + (normalize-file keymap* mount-point + store-directory-prefix)))) #~(when #$keymap (format port "\ insmod keylayouts -- 2.28.0 From debbugs-submit-bounces@debbugs.gnu.org Sat Oct 24 14:03:26 2020 Received: (at 44196) by debbugs.gnu.org; 24 Oct 2020 18:03:26 +0000 Received: from localhost ([127.0.0.1]:35094 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kWNt0-0006Ds-5Q for submit@debbugs.gnu.org; Sat, 24 Oct 2020 14:03:26 -0400 Received: from mail-wm1-f46.google.com ([209.85.128.46]:51316) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kWNsy-0006Db-4E for 44196@debbugs.gnu.org; Sat, 24 Oct 2020 14:03:25 -0400 Received: by mail-wm1-f46.google.com with SMTP id v5so5829269wmh.1 for <44196@debbugs.gnu.org>; Sat, 24 Oct 2020 11:03:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:references:date:in-reply-to:message-id:user-agent :mime-version:content-disposition:content-description; bh=vNFSfIxU9CcJnLHascNORhFg76sSyl3atmXDEfM5XG0=; b=GN/PWd82mYaegXXjvcPa3fiWiQ3gYWIsOe/j9lavooY2twRy1vw8diWxsp4RcNKtyZ ujC1RC+ALgcHeKLBLogXcoJLkMqH2nkP1zg3oZLRnlvfGHquezeOEZ7e29ccESpHVii/ UptJ6vTrfGaWhZKy+b9wgWrUV7IQXPp5fDpGdsmkjebPnY8NX4WirbuVwfSO+aUs2W/Q efjlSdzyUdfBkMtuFv6ZPDUeue202Gs08TaxyGN561b+KpPKxXGtRaTNBf23a7upuhHF iA1mY9R9uaN1TOIiu4f8INieIsWA2t1W26V6zh4NQ2hN7EYlPLEXvsVXKh2tsx+Y3X9q IhPg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-disposition :content-description; bh=vNFSfIxU9CcJnLHascNORhFg76sSyl3atmXDEfM5XG0=; b=k+ZVIx0GSFdWpFvjitzY9aoy42/llAVg71ih4nQFbp6aLBofIRRPr1HEp6V1KeqfnK orYPHcov/Nx3GxVX9v6kDhgv+PlDQ/c+m//slFuZPTm1BxihHvONdXV/RCdTt0UrpwWn i1ElFtVDFIp7lCW0t/FFwtzYz21CYnMLLS1z/oUNOipMetTrml/prCDgLolpyp7c3V1R yfyY9VcOYLFWlTx2AffI46a+zPuTe6AvWqPHkHDrGJ/PmWPN9kaXFRrHP9troLb5XWnW AskPwTwQrTUnWFgCHUX5WTwl8AemKLctDgjXKqfYOweRUtdJSGmxBTJlLrQ2eEuKJtXq 0/ug== X-Gm-Message-State: AOAM53121HXCbQaEPvMaLDWiZ01sbJ8CQ8/UtBdnU+RA1R1n9Gwx0Z4+ res5qkkJUZhqB6DkhRdM2J3E3n41BbRv3g== X-Google-Smtp-Source: ABdhPJw2GP/c5d2rwrqtUfKUzquVvm3owdl5/LwH/Gn5U58hem509VeMdTsgpEEghjWPGAmEhF12mg== X-Received: by 2002:a1c:6788:: with SMTP id b130mr8574413wmc.91.1603562598221; Sat, 24 Oct 2020 11:03:18 -0700 (PDT) Received: from unfall (218.139.134.37.dynamic.jazztel.es. [37.134.139.218]) by smtp.gmail.com with ESMTPSA id u15sm12412096wrm.77.2020.10.24.11.03.17 for <44196@debbugs.gnu.org> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 24 Oct 2020 11:03:17 -0700 (PDT) From: =?utf-8?Q?Miguel_=C3=81ngel_Arruga_Vivas?= To: 44196@debbugs.gnu.org Subject: [PATCH 2/3] system: Add store-directory-prefix to boot-parameters. References: <878sbvh5j4.fsf@gmail.com> Date: Sat, 24 Oct 2020 20:02:16 +0200 In-Reply-To: <878sbvh5j4.fsf@gmail.com> ("Miguel =?utf-8?Q?=C3=81ngel?= Arruga Vivas"'s message of "Sat, 24 Oct 2020 19:56:15 +0200") Message-ID: <87y2jvfqon.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/x-patch Content-Disposition: attachment; filename=0002-system-Add-store-directory-prefix-to-boot-parameters.patch Content-Description: 0002-system-add-store-directory-prefix.patch X-Spam-Score: 0.2 (/) X-Debbugs-Envelope-To: 44196 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: -0.8 (/) >From 527a9271122f7b83f31dc0b910c6704af81bde66 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20=C3=81ngel=20Arruga=20Vivas?= Date: Sat, 24 Oct 2020 18:15:53 +0200 Subject: [PATCH 2/2] system: Add store-directory-prefix to boot-parameters. * gnu/machine/ssh.scm (roll-back-managed-host): Use boot-parameters-store-directory-prefix. * gnu/system.scm (define-module): Export boot-parameters-store-directory-prefix. ()[store-directory-prefix]: New field. [boot-parameters-store-directory-prefix]: New accessor. (read-boot-parameters): Read directory-prefix from store field. (operating-system-boot-parameters-file): Add directory-prefix to store field. * guix/scripts/system.scm (reinstall-bootloader): Use boot-parameters-store-directory-prefix. * test/boot-parameters.scm (%default-btrfs-subvolume, %default-store-directory-prefix): New variables. (%grub-boot-parameters): Use %default-store-directory-prefix. (%default-operating-system): Use %default-btrfs-subvolume. (test-boot-parameters): Add directory-prefix. (test optional fields): Add test for directory-prefix. (test os store-directory-prefix): New test. --- gnu/machine/ssh.scm | 3 +++ gnu/system.scm | 19 ++++++++++++++++++- guix/scripts/system.scm | 3 +++ tests/boot-parameters.scm | 23 ++++++++++++++++++++--- 4 files changed, 44 insertions(+), 4 deletions(-) diff --git a/gnu/machine/ssh.scm b/gnu/machine/ssh.scm index 5020bd362f..a3a12fb54b 100644 --- a/gnu/machine/ssh.scm +++ b/gnu/machine/ssh.scm @@ -482,6 +482,8 @@ an environment type of 'managed-host." (list (second boot-parameters)))) (locale -> (boot-parameters-locale (second boot-parameters))) + (store-dir -> (boot-parameters-store-directory-prefix + (second boot-parameters))) (old-entries -> (map boot-parameters->menu-entry (drop boot-parameters 2))) (bootloader -> (operating-system-bootloader @@ -492,6 +494,7 @@ an environment type of 'managed-host." bootloader)) bootloader entries #:locale locale + #:store-directory-prefix store-dir #:old-entries old-entries))) (remote-result (machine-remote-eval machine remote-exp))) (when (eqv? 'error remote-result) diff --git a/gnu/system.scm b/gnu/system.scm index a3122eaa65..30a5c418d0 100644 --- a/gnu/system.scm +++ b/gnu/system.scm @@ -148,6 +148,7 @@ boot-parameters-bootloader-name boot-parameters-bootloader-menu-entries boot-parameters-store-device + boot-parameters-store-directory-prefix boot-parameters-store-mount-point boot-parameters-locale boot-parameters-kernel @@ -299,6 +300,7 @@ directly by the user." boot-parameters-bootloader-menu-entries) (store-device boot-parameters-store-device) (store-mount-point boot-parameters-store-mount-point) + (store-directory-prefix boot-parameters-store-directory-prefix) (locale boot-parameters-locale) (kernel boot-parameters-kernel) (kernel-arguments boot-parameters-kernel-arguments) @@ -394,6 +396,17 @@ file system labels." (_ ;the old format root-device)))) + (store-directory-prefix + (match (assq 'store rest) + (('store . store-data) + (match (assq 'directory-prefix store-data) + (('directory-prefix prefix) prefix) + ;; No directory-prefix found. + (_ #f))) + (_ + ;; No store found, old format. + #f))) + (store-mount-point (match (assq 'store rest) (('store ('device _) ('mount-point mount-point) _ ...) @@ -1294,6 +1307,7 @@ such as '--root' and '--load' to ." (let* ((initrd (and (not (operating-system-hurd os)) (operating-system-initrd-file os))) (store (operating-system-store-file-system os)) + (file-systems (operating-system-file-systems os)) (locale (operating-system-locale os)) (bootloader (bootloader-configuration-bootloader (operating-system-bootloader os))) @@ -1315,6 +1329,7 @@ such as '--root' and '--load' to ." (bootloader-configuration-menu-entries (operating-system-bootloader os))) (locale locale) (store-device (ensure-not-/dev (file-system-device store))) + (store-directory-prefix (btrfs-store-subvolume-file-name file-systems)) (store-mount-point (file-system-mount-point store))))) (define (device->sexp device) @@ -1371,7 +1386,9 @@ being stored into the \"parameters\" file)." (device #$(device->sexp (boot-parameters-store-device params))) (mount-point #$(boot-parameters-store-mount-point - params)))) + params)) + (directory-prefix + #$(boot-parameters-store-directory-prefix params)))) #:set-load-path? #f))) (define-gexp-compiler (operating-system-compiler (os ) diff --git a/guix/scripts/system.scm b/guix/scripts/system.scm index 9ed5c26483..ad998156c2 100644 --- a/guix/scripts/system.scm +++ b/guix/scripts/system.scm @@ -385,6 +385,8 @@ STORE is an open connection to the store." (params (first (profile-boot-parameters %system-profile (list number)))) (locale (boot-parameters-locale params)) + (store-directory-prefix + (boot-parameters-store-directory-prefix params)) (old-generations (delv number (reverse (generation-numbers %system-profile)))) (old-params (profile-boot-parameters @@ -398,6 +400,7 @@ STORE is an open connection to the store." ((bootloader-configuration-file-generator bootloader) bootloader-config entries #:locale locale + #:store-directory-prefix store-directory-prefix #:old-entries old-entries))) (drvs -> (list bootcfg))) (mbegin %store-monad diff --git a/tests/boot-parameters.scm b/tests/boot-parameters.scm index d7e579bc89..a00b227551 100644 --- a/tests/boot-parameters.scm +++ b/tests/boot-parameters.scm @@ -46,6 +46,9 @@ (define %default-initrd (string-append %default-initrd-path "/initrd.cpio.gz")) (define %default-root-device (uuid "abcdef12-3456-7890-abcd-ef1234567890")) (define %default-store-device (uuid "01234567-89ab-cdef-0123-456789abcdef")) +(define %default-btrfs-subvolume "testfs") +(define %default-store-directory-prefix + (string-append "/" %default-btrfs-subvolume)) (define %default-store-mount-point (%store-prefix)) (define %default-multiboot-modules '()) (define %default-locale "es_ES.utf8") @@ -63,6 +66,7 @@ (multiboot-modules %default-multiboot-modules) (locale %default-locale) (store-device %default-store-device) + (store-directory-prefix %default-store-directory-prefix) (store-mount-point %default-store-mount-point))) (define %default-operating-system @@ -81,7 +85,10 @@ (file-system (device %default-store-device) (mount-point %default-store-mount-point) - (type "btrfs")) + (type "btrfs") + (options + (string-append "subvol=" + %default-btrfs-subvolume))) %base-file-systems)))) (define (quote-uuid uuid) @@ -103,6 +110,7 @@ (with-store #t) (store-device (quote-uuid %default-store-device)) + (store-directory-prefix %default-store-directory-prefix) (store-mount-point %default-store-mount-point)) (define (generate-boot-parameters) (define (sexp-or-nothing fmt val) @@ -117,10 +125,12 @@ (sexp-or-nothing " (kernel-arguments ~S)" kernel-arguments) (sexp-or-nothing " (initrd ~S)" initrd) (if with-store - (format #false " (store~a~a)" + (format #false " (store~a~a~a)" (sexp-or-nothing " (device ~S)" store-device) (sexp-or-nothing " (mount-point ~S)" - store-mount-point)) + store-mount-point) + (sexp-or-nothing " (directory-prefix ~S)" + store-directory-prefix)) "") (sexp-or-nothing " (locale ~S)" locale) (sexp-or-nothing " (bootloader-name ~a)" bootloader-name) @@ -149,6 +159,7 @@ (test-read-boot-parameters #:store-device #false) (test-read-boot-parameters #:store-device 'false) (test-read-boot-parameters #:store-mount-point #false) + (test-read-boot-parameters #:store-directory-prefix #false) (test-read-boot-parameters #:multiboot-modules #false) (test-read-boot-parameters #:locale #false) (test-read-boot-parameters #:bootloader-name #false @@ -253,4 +264,10 @@ (operating-system-boot-parameters %default-operating-system %default-root-device))) +(test-equal "from os, store-directory-prefix" + %default-store-directory-prefix + (boot-parameters-store-directory-prefix + (operating-system-boot-parameters %default-operating-system + %default-root-device))) + (test-end "boot-parameters") -- 2.28.0 From debbugs-submit-bounces@debbugs.gnu.org Sat Oct 24 17:14:16 2020 Received: (at 44196) by debbugs.gnu.org; 24 Oct 2020 21:14:16 +0000 Received: from localhost ([127.0.0.1]:35297 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kWQrg-0006n4-El for submit@debbugs.gnu.org; Sat, 24 Oct 2020 17:14:16 -0400 Received: from mail-wm1-f45.google.com ([209.85.128.45]:33459) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kWQrd-0006mr-MS for 44196@debbugs.gnu.org; Sat, 24 Oct 2020 17:14:15 -0400 Received: by mail-wm1-f45.google.com with SMTP id l20so2701913wme.0 for <44196@debbugs.gnu.org>; Sat, 24 Oct 2020 14:14:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:references:date:in-reply-to:message-id:user-agent :mime-version; bh=i2GPx8M8aFWJ3P84g9AhlwgjoEePAjN7Apk3W1qAc5E=; b=CB8iVNkXD41OpFTdajq87B5YZjnkTGiFwAbOAJOTaMqGRcAEbEqjYJ36hIToh7H+mw CknOLGTG0YzrYXMp40P1PdZdK4qH+dCUqf9/qn7LhKFbv1sU90kOETs5Q90f7f//D9n7 ziOKKGbXhHiRvQszNT1KrxmHhN4rG3hCIYme1Cw5TCM2krhOJHM+gBH9L7jJUHPJ4baz u2MjalxdJEajvVzk8QOs5UPRCpQKpsGtvPjSu6wUg7isI9hTmalT0DtW4LCZ50yDyYzN J65AkzOGzV5fgOnGcFQJWriFwUYYdTrSMurCLaX+iCulodL3IMQ1gaSOqcmQWST+kdi9 RGzw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=i2GPx8M8aFWJ3P84g9AhlwgjoEePAjN7Apk3W1qAc5E=; b=OMhF1LB5DH6J9ZWsZwAkcXbJ+s1No3qfA4OfCCP+WLUa2Wt3M0Alh7fRH9skyt/tIv l4F7E9jvPVrMZxsZ2+Nb2DixSojH8Qc9UwV2sZmFiKj6NCcmLiZjahJ99F8sheiUq7yu nvMu6/khyltBJWYnEIw84Y0Rsd9pfZV4EHlbESYPRjgOfgPfgyHGxG1urVKwmYsUJPnh ajd06u0/IWPAOaYfLEXkBm9YXoP2fOZdDqFthEtiPUNAovOL1FAgqahF6bj2H/l9F9zp kqPq7iEbxF+NKM3jD61ZX16AdL785qO7nLTpEEtTGdRxchtbEMhc34xoLqzureWbTThM tSEw== X-Gm-Message-State: AOAM531Hid9H6vfd8GiPrjv3KVolj96wG80J84ccaJH70NNUMpDZSQVE 4Ikxj5KbLBCvfgoTLrMy/5WsRMniYElLjw== X-Google-Smtp-Source: ABdhPJwvY5DzV8SAAOprKEvey17ce9RLUXz7zJ3gFsx4HVFXfOZPvdp7t5bC96iASJ768I6JpruOtg== X-Received: by 2002:a1c:32c6:: with SMTP id y189mr8980161wmy.51.1603574047447; Sat, 24 Oct 2020 14:14:07 -0700 (PDT) Received: from unfall (218.139.134.37.dynamic.jazztel.es. [37.134.139.218]) by smtp.gmail.com with ESMTPSA id t83sm13250182wmt.43.2020.10.24.14.14.06 for <44196@debbugs.gnu.org> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 24 Oct 2020 14:14:06 -0700 (PDT) From: =?utf-8?Q?Miguel_=C3=81ngel_Arruga_Vivas?= To: 44196@debbugs.gnu.org Subject: [PATCH 3/3] gnu: grub: Add output locale References: <878sbvh5j4.fsf@gmail.com> Date: Sat, 24 Oct 2020 23:13:05 +0200 In-Reply-To: <878sbvh5j4.fsf@gmail.com> ("Miguel =?utf-8?Q?=C3=81ngel?= Arruga Vivas"'s message of "Sat, 24 Oct 2020 19:56:15 +0200") Message-ID: <87tuujfhum.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: 0.2 (/) X-Debbugs-Envelope-To: 44196 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: -0.8 (/) --=-=-= Content-Type: text/plain Hi! This solves Grub localization too, even though I'm not very happy with the gexp juggling... Any idea? Happy hacking! Miguel --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0003-gnu-grub-Add-output-locale.patch Content-Description: 0003-gnu-grub-add-locale-output.patch >From 333a12f2eff427986efd0ed660fff7d7bb113839 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20=C3=81ngel=20Arruga=20Vivas?= Date: Sat, 24 Oct 2020 20:36:21 +0200 Subject: [PATCH 3/3] gnu: grub: Add output locale. * gnu/bootloader/grub.scm (define-module): Use (guix packages). (grub-configuration-file)[locale-config]: Use grub:locale output. * gnu/packages/bootloaders.scm (grub)[outputs]: Define output "locale". [arguments]: Populate "locale" output with new phase 'install-locale. --- gnu/bootloader/grub.scm | 34 +++++++++++++++++++++++----------- gnu/packages/bootloaders.scm | 17 ++++++++++++++++- 2 files changed, 39 insertions(+), 12 deletions(-) diff --git a/gnu/bootloader/grub.scm b/gnu/bootloader/grub.scm index f1479024e6..fedb609095 100644 --- a/gnu/bootloader/grub.scm +++ b/gnu/bootloader/grub.scm @@ -25,6 +25,7 @@ (define-module (gnu bootloader grub) #:use-module (guix build union) + #:use-module (guix packages) #:use-module (guix records) #:use-module (guix store) #:use-module (guix utils) @@ -402,18 +403,29 @@ menuentry ~s { #:port #~port))) (define locale-config - #~(let ((locale #$(and locale - (locale-definition-source - (locale-name->definition locale))))) - (when locale - (format port "\ + (let* ((entry (first all-entries)) + (device (menu-entry-device entry)) + (bootloader (bootloader-configuration-bootloader config)) + (grub (bootloader-package bootloader)) + (locale-dir (normalize-file #~(format #f "~a" #$grub:locale) + (menu-entry-device-mount-point entry) + store-directory-prefix))) + #~(let ((locale #$(and locale + (locale-definition-source + (locale-name->definition locale))))) + (when locale + (format port "\ # Localization configuration. -if search --file --set boot_partition /grub/grub.cfg; then - set locale_dir=(${boot_partition})/grub/locale -else - set locale_dir=/boot/grub/locale -fi -set lang=~a~%" locale)))) +~a +set locale_dir=~a +set lang=~a~%" + ;; We search an auto-generated file because the + ;; locale name might not match the .mo file name. + #$(grub-root-search device + #~(string-append #$locale-dir + "/en@quot.mo")) + #$locale-dir + locale))))) (define keyboard-layout-config (let* ((layout (bootloader-configuration-keyboard-layout config)) diff --git a/gnu/packages/bootloaders.scm b/gnu/packages/bootloaders.scm index d1de5cea4e..985b7b89eb 100644 --- a/gnu/packages/bootloaders.scm +++ b/gnu/packages/bootloaders.scm @@ -99,6 +99,7 @@ "grub-verifiers-Blocklist-fallout-cleanup.patch" "grub-cross-system-i686.patch")))) (build-system gnu-build-system) + (outputs '("out" "locale")) (arguments `(#:configure-flags ;; Counterintuitively, this *disables* a spurious Python dependency by @@ -148,7 +149,21 @@ (substitute* "Makefile.in" (("test_unset grub_func_test") "test_unset")) - #t))) + #t)) + (add-after 'install 'install-locale + ;; Install mo files with the expected names at boot-time. + (lambda* (#:key outputs #:allow-other-keys) + (let ((locale-out (assoc-ref outputs "locale"))) + (mkdir-p locale-out) + (for-each (lambda (file) + (let ((mo (string-append + (basename file ".gmo") + ".mo"))) + (copy-file file + (string-append locale-out + "/" mo)))) + (find-files "po" "\\.gmo$")) + #t)))) ;; Disable tests on ARM and AARCH64 platforms. #:tests? ,(not (any (cute string-prefix? <> (or (%current-target-system) (%current-system))) -- 2.28.0 --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Sun Oct 25 06:04:34 2020 Received: (at 44196) by debbugs.gnu.org; 25 Oct 2020 10:04:34 +0000 Received: from localhost ([127.0.0.1]:35779 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kWct8-0000cK-BY for submit@debbugs.gnu.org; Sun, 25 Oct 2020 06:04:34 -0400 Received: from mail-wm1-f43.google.com ([209.85.128.43]:52249) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kWct4-0000c6-Us for 44196@debbugs.gnu.org; Sun, 25 Oct 2020 06:04:34 -0400 Received: by mail-wm1-f43.google.com with SMTP id c194so8370062wme.2 for <44196@debbugs.gnu.org>; Sun, 25 Oct 2020 03:04:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:references:date:in-reply-to:message-id:user-agent :mime-version; bh=Q54umiCpUtiYNK5DKeP5+/9S6UkcKCU0GLuSGkWpfmw=; b=h5HEWqVeZ2g8PX7dFTz0ztco4bfhQult/+QlW1VxksWCzEbyB5OKVUkirRGroRb8Wk J6+ifmIMIat4th2JD+RrMsxmVvlKVEcGd6XGo6uMndhlYZ86wYTWPFZAsOOF96eaPNR+ LrPPMaK78iaeVSTRu6toUnqg/cYAUQTACmRVc3SuMiJ4pkPONYiYx/rwiYfZTOZPJn3V yGGLyURb37XHdEdt8cZYbzokxYLz3ZLw/UfQOptU2/HMJd7omFccmHirBohxe03uN58f GWECcZcpaObN7qOfZWzWCFrrkzzK1e3KOXlmD34PNZVtX0J+OhlfkXXK7jTUQDcOWBIw nAeA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=Q54umiCpUtiYNK5DKeP5+/9S6UkcKCU0GLuSGkWpfmw=; b=Y4jp2zYIEFNRMyZZkwuSJpM/qBLgRZq3a6MXo49++EqU5Pr6XKjAQsKWNpPzHAFzWO jpjD/xWNLK1r5Ew59WZzv362GMaeqNjWrO1CqeT7deusxv6TMbf+HY3YvWaSxChHhb5X sC2/512EfTMV4w5LaqpHGAWE8j42qrL3AMDd/89xIaDklKZFaJoZBZYP4YANI8dtqdiK 5W+qeG+fjHRke+8Xd4uGwe0ncrDgkveJ10h7KTcphwv6RWQE0Yatp5m7I0Q11ge6Lg16 TTILDDKMHgm1+gb+J39mIC0MbJ9uEQ1f/cqrLrZjxStzFb4ef8kDj6yFoiGfjmMq1FMX 43AA== X-Gm-Message-State: AOAM532nehsv9g1HPZ2LhPeG+yNMERCjQD1EZ/uV6r9+Dlt6Wi+CcaL7 cO3uIWScWgxo2wV38EoMx489k/xwadYEYg== X-Google-Smtp-Source: ABdhPJzf7anH6/QKv40bBaZY4Gqm7UAPisY/ppIdQ1/HPQ+ODtH4pLIhoEzfUsRL/4iawrlLEwZDGQ== X-Received: by 2002:a1c:5f46:: with SMTP id t67mr10578888wmb.173.1603620264890; Sun, 25 Oct 2020 03:04:24 -0700 (PDT) Received: from unfall (218.139.134.37.dynamic.jazztel.es. [37.134.139.218]) by smtp.gmail.com with ESMTPSA id z15sm16738402wrq.24.2020.10.25.03.04.23 for <44196@debbugs.gnu.org> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 25 Oct 2020 03:04:24 -0700 (PDT) From: =?utf-8?Q?Miguel_=C3=81ngel_Arruga_Vivas?= To: 44196@debbugs.gnu.org Subject: bug#44196: [PATCH 3/3 v2] gnu: grub: Add locale output. References: <878sbvh5j4.fsf@gmail.com> <87tuujfhum.fsf@gmail.com> Date: Sun, 25 Oct 2020 11:04:22 +0100 In-Reply-To: <87tuujfhum.fsf@gmail.com> ("Miguel =?utf-8?Q?=C3=81ngel?= Arruga Vivas"'s message of "Sat, 24 Oct 2020 23:13:05 +0200") Message-ID: <87imay7hax.fsf_-_@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: 0.2 (/) X-Debbugs-Envelope-To: 44196 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: -0.8 (/) --=-=-= Content-Type: text/plain This v2 doesn't change the other patches, only this one, because it was the one I wasn't happy with. It changes from v1 as the separate output "locale" is not generated, but instead the mo files are placed into share/locale with the expected names. --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0003-gnu-grub-Add-locale-output.patch Content-Description: 0003-gnu-grub-add-locale-output.patch >From c8aff861461b599095d55b9f694e074d433c72bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20=C3=81ngel=20Arruga=20Vivas?= Date: Sat, 24 Oct 2020 20:36:21 +0200 Subject: [PATCH 3/4] gnu: grub: Add locale output. * gnu/bootloader/grub.scm (define-module): Use (guix packages). (grub-configuration-file)[locale-config]: Use locale output from grub. * gnu/packages/bootloaders.scm (grub)[outputs]: Define output "locale". [arguments]: Populate "locale" output with new phase 'install-locale. --- gnu/bootloader/grub.scm | 35 ++++++++++++++++++++++++----------- gnu/packages/bootloaders.scm | 16 +++++++++++++++- 2 files changed, 39 insertions(+), 12 deletions(-) diff --git a/gnu/bootloader/grub.scm b/gnu/bootloader/grub.scm index f1479024e6..7cce9e1da7 100644 --- a/gnu/bootloader/grub.scm +++ b/gnu/bootloader/grub.scm @@ -25,6 +25,7 @@ (define-module (gnu bootloader grub) #:use-module (guix build union) + #:use-module (guix packages) #:use-module (guix records) #:use-module (guix store) #:use-module (guix utils) @@ -402,18 +403,30 @@ menuentry ~s { #:port #~port))) (define locale-config - #~(let ((locale #$(and locale - (locale-definition-source - (locale-name->definition locale))))) - (when locale - (format port "\ + (let* ((entry (first all-entries)) + (device (menu-entry-device entry)) + (bootloader (bootloader-configuration-bootloader config)) + (grub (bootloader-package bootloader)) + (locale-dir (normalize-file (file-append grub "/share/locale") + (menu-entry-device-mount-point entry) + store-directory-prefix))) + #~(let ((locale #$(and locale + (locale-definition-source + (locale-name->definition locale))))) + (when locale + (format port "\ # Localization configuration. -if search --file --set boot_partition /grub/grub.cfg; then - set locale_dir=(${boot_partition})/grub/locale -else - set locale_dir=/boot/grub/locale -fi -set lang=~a~%" locale)))) +~a +set locale_dir=~a +set lang=~a~%" + #$(grub-root-search device + ;; We search an auto-generated file + ;; because the locale name might not + ;; match the .mo file name. + (file-append locale-dir + "/en@quot.mo")) + #$locale-dir + locale))))) (define keyboard-layout-config (let* ((layout (bootloader-configuration-keyboard-layout config)) diff --git a/gnu/packages/bootloaders.scm b/gnu/packages/bootloaders.scm index 7034085d67..8057a6dd8a 100644 --- a/gnu/packages/bootloaders.scm +++ b/gnu/packages/bootloaders.scm @@ -148,7 +148,21 @@ (substitute* "Makefile.in" (("test_unset grub_func_test") "test_unset")) - #t))) + #t)) + (add-after 'install 'install-locale-for-boot + ;; Install mo files with the expected names at boot-time. + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (locale (string-append out "/share/locale"))) + (for-each (lambda (file) + (let ((mo (string-append + (basename file ".gmo") + ".mo"))) + (copy-file file + (string-append locale + "/" mo)))) + (find-files "po" "\\.gmo$")) + #t)))) ;; Disable tests on ARM and AARCH64 platforms. #:tests? ,(not (any (cute string-prefix? <> (or (%current-target-system) (%current-system))) -- 2.28.0 --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Sun Oct 25 06:22:06 2020 Received: (at control) by debbugs.gnu.org; 25 Oct 2020 10:22:06 +0000 Received: from localhost ([127.0.0.1]:35789 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kWdA6-00013H-88 for submit@debbugs.gnu.org; Sun, 25 Oct 2020 06:22:06 -0400 Received: from mail-wr1-f43.google.com ([209.85.221.43]:33617) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kWdA4-00012e-Un for control@debbugs.gnu.org; Sun, 25 Oct 2020 06:22:05 -0400 Received: by mail-wr1-f43.google.com with SMTP id b8so9004822wrn.0 for ; Sun, 25 Oct 2020 03:22:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:message-id:to:from:subject:mime-version :content-transfer-encoding; bh=zb7ZGTNWbartySNPG+d/Ew1VjMA/V+eDrgPz2pVDNr4=; b=AeK915B0e+Na5s7pdhu9ox9uEviSTzA3C+FJZlthWJ9cb/sT0Zu4pEx4ZEpib85+yT Wvdl8CYtQoiC91DqKHToSdJT18PCm4RBiN3r9zOkfyygzFjL7qPDptUZK29i3TmLH6WS 5D4j6gspW9wzZiwcDeoap1I1GixwLdgsU2sF65C8Mi8U2nJpU1Uqt4zXfpcLRp2gD7PP pWwOpQbTvsMlodprpH6+/V1IZsA3koBW1F1onfmKMuFKc/Gg2reufEmTws1dorZ400XX e6oOFqv9v3XrbyV6x9IUb1wAlNIozi0kaY5cA2/581BKCsGjv9ceL3rxW1Vj+XiqR73l GjgQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:message-id:to:from:subject:mime-version :content-transfer-encoding; bh=zb7ZGTNWbartySNPG+d/Ew1VjMA/V+eDrgPz2pVDNr4=; b=fJWWVCq9O1d3mUP0iayWZ9A1XbQCvcBBDaW1bDDW5KopsPZ2kC19EZnwDn04yvrcUU Rpq6Okiq2I9jxeeaxSUKGevgEZ7rJoc6kY9KZTasmc4KzudkWSNCRl9NO44+10Xw/y4L y4XcVgdI0CAp2ER/h5BGG7DjHQRng/7VGT4Opq98EIppL5qhqN7t9sMA7fXoGLrpSNgO fhhM7FoiJ3XDZXpIk1sCFiEN2Yb0ePxxoeDnFUiXh5GiidZjc4sOVO1qKLbVg+tIJGGR e/cVPDX8WT1n7F2NBPq4ppqwreOMn1HFWZwa+WtRuds9YevURPWPMVcDbTrPGZbkOyX/ h3Yw== X-Gm-Message-State: AOAM532F5GsUy0HphcTmSEKBIJaaJQ+9pFWt1VaDBgMOzTazlXBhJR3N G/RZ/XjaiUYtqNAJnDagLP5myAsnt65JzA== X-Google-Smtp-Source: ABdhPJzT0b6lSGXpw+LKfKv0+1I8ysy35ckmG0lNY8fq5AFltO6ymiUhiFnL09GMfaYUQ1tFrIWT3w== X-Received: by 2002:adf:f247:: with SMTP id b7mr12998023wrp.56.1603621318948; Sun, 25 Oct 2020 03:21:58 -0700 (PDT) Received: from unfall (218.139.134.37.dynamic.jazztel.es. [37.134.139.218]) by smtp.gmail.com with ESMTPSA id s2sm17356030wmf.45.2020.10.25.03.21.58 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 25 Oct 2020 03:21:58 -0700 (PDT) Date: Sun, 25 Oct 2020 11:21:57 +0100 Message-Id: <87d0167ghm.fsf@gmail.com> To: control@debbugs.gnu.org From: =?utf-8?Q?Miguel_=C3=81ngel_Arruga_Vivas?= Subject: control message for bug #44196 MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: 0.2 (/) X-Debbugs-Envelope-To: control 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: -0.8 (/) tags 44196 + patch quit From debbugs-submit-bounces@debbugs.gnu.org Mon Oct 26 18:04:29 2020 Received: (at 44196) by debbugs.gnu.org; 26 Oct 2020 22:04:29 +0000 Received: from localhost ([127.0.0.1]:41805 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kXAbN-0007pB-Ds for submit@debbugs.gnu.org; Mon, 26 Oct 2020 18:04:29 -0400 Received: from mail-wr1-f44.google.com ([209.85.221.44]:32844) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kXAbM-0007oz-1Z for 44196@debbugs.gnu.org; Mon, 26 Oct 2020 18:04:28 -0400 Received: by mail-wr1-f44.google.com with SMTP id b8so14682321wrn.0 for <44196@debbugs.gnu.org>; Mon, 26 Oct 2020 15:04:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:references:date:in-reply-to:message-id:user-agent :mime-version; bh=H5zlzydptPj/W11qDA3HUKZGqp6xQpEaW5hEBeKY5DM=; b=N1W8tz3l8WNa2pOMoFO3lfLiRVs+Ey3STWpxuVV+xZEAe1DsftecEOoDqDegHM6p6j KD6YXiN1fm152z46uU2XwrmkME0Uy6o9PgOxX7A3KeGlCT7+cBn5hO0D6VlmqNS/ZP1W b84vUpnsV89+Ej3CwvwV3sy9wokMpuVwwbh1j4onb1OLyEhNncht9ehy24wMIx4YGcfI lasc4YSDvDmReszbMAzmfOtT0YyryXEz/56z0c/8CTSZFuse2pwbUCVEf6jCTg5nfu+p VyxIwTTo7lWJa8WLxpFDuymhX0awxY3zK86oZJE6hOlJc+FmA8xJMI9xxdhMPxjZY96h rUJA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=H5zlzydptPj/W11qDA3HUKZGqp6xQpEaW5hEBeKY5DM=; b=p4TFzCxBHuZ+0VpuRnNe25Cc3/HYyv2Ojf5cioBaR6ENJr0ZOUppRgtViIbw+EyLjp T6SYnV9eC5BRwXtig0jrs8fX50Z4FeZw4EBqyG6WC4Ayc4vp60zukIe+hxjuqnrEIIGT pGiQz922S+IeVRldzdeeVQBoIMY9Vs/M4Cb47suglF6f3NXrMejB2d60/DCHDLjHTInE 5xQLQtDcwhw9P6XzwR3TvUnG7SPhjake15zb8jomKn/C3QA0n9l7PzF6hJm9NUk93mbt bZ2HeZDjBdvXdeRi2CFWClB/2ikWI3lzz1wLMRWThFeLBlLUUdWWHRphEzU6ybbtUrFM 75kQ== X-Gm-Message-State: AOAM533bkjqf1dvvCSPmzQ3pbJiS0XrATbH90TddmkHPefRxDn1xQZRR XC5fl++KwqxnkvKMH0IfXpXAYPz4RShq3Q== X-Google-Smtp-Source: ABdhPJwCi6aUfI+r8tgwbfLkkbFYX7KF6EiE7VXmYZo0Fu5hpmKoI6OlKeUv1XdJruX3q1hvp5pR3w== X-Received: by 2002:a5d:654d:: with SMTP id z13mr20124254wrv.6.1603749861982; Mon, 26 Oct 2020 15:04:21 -0700 (PDT) Received: from unfall (218.139.134.37.dynamic.jazztel.es. [37.134.139.218]) by smtp.gmail.com with ESMTPSA id w1sm24155321wrp.95.2020.10.26.15.04.20 for <44196@debbugs.gnu.org> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Oct 2020 15:04:21 -0700 (PDT) From: =?utf-8?Q?Miguel_=C3=81ngel_Arruga_Vivas?= To: 44196@debbugs.gnu.org Subject: Re: bug#44196: [PATCH 3/3 v3] system: Do not depend on locale folder generated by grub-install. References: <878sbvh5j4.fsf@gmail.com> <87tuujfhum.fsf@gmail.com> <87imay7hax.fsf_-_@gmail.com> Date: Mon, 26 Oct 2020 23:04:20 +0100 In-Reply-To: <87imay7hax.fsf_-_@gmail.com> ("Miguel =?utf-8?Q?=C3=81ngel?= Arruga Vivas"'s message of "Sun, 25 Oct 2020 11:04:22 +0100") Message-ID: <87y2jsod97.fsf_-_@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: 0.2 (/) X-Debbugs-Envelope-To: 44196 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: -0.8 (/) --=-=-= Content-Type: text/plain This version doesn't modify grub package at all, and it only generates the folder when needed, and fixes a bug in Grub 2.04 that I didn't noticed until I started playing with the installer: https://savannah.gnu.org/bugs/?57889 Happy hacking! Miguel --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=v3-0003-system-Do-not-depend-on-locale-folder-generated-b.patch Content-Description: 0003-v3-system-do-not-depend-on-locale-folder.patch >From 770532b931c312edb9f9a075d86dc132b804dc0b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20=C3=81ngel=20Arruga=20Vivas?= Date: Sat, 24 Oct 2020 20:36:21 +0200 Subject: [PATCH v3 3/5] system: Do not depend on locale folder generated by grub-install. * gnu/bootloader/grub.scm (define-module): Use (guix packages). (grub-locale-folder): New computed folder. (grub-configuration-file)[locale-config]: Use grub-locale-folder only when a locale is needed. --- gnu/bootloader/grub.scm | 50 ++++++++++++++++++++++++++++++++--------- 1 file changed, 39 insertions(+), 11 deletions(-) diff --git a/gnu/bootloader/grub.scm b/gnu/bootloader/grub.scm index f1479024e6..b610ecbfe5 100644 --- a/gnu/bootloader/grub.scm +++ b/gnu/bootloader/grub.scm @@ -25,6 +25,7 @@ (define-module (gnu bootloader grub) #:use-module (guix build union) + #:use-module (guix packages) #:use-module (guix records) #:use-module (guix store) #:use-module (guix utils) @@ -142,6 +143,25 @@ file with the resolution provided in CONFIG." (image->png image #:width width #:height height)) (_ #f))))) +(define (grub-locale-folder grub) + "Generate a folder with the locales from GRUB." + (define builder + #~(begin + (use-modules (ice-9 ftw)) + + (define (copy-mo lang-path) + (let ((file (string-append lang-path "/LC_MESSAGES/guix.mo")) + (mo (string-append (basename lang-path) ".mo"))) + (when (file-exists? file) + (copy-file file mo)))) + + (let* ((locale (string-append #$grub "/share/locale")) + (langs (scandir locale))) + (mkdir #$output) + (chdir #$output) + (for-each copy-mo langs)))) + (computed-file "grub-boot-locale" builder)) + (define* (eye-candy config store-device store-mount-point #:key store-directory-prefix port) "Return a gexp that writes to PORT (a port-valued gexp) the 'grub.cfg' part @@ -402,18 +422,26 @@ menuentry ~s { #:port #~port))) (define locale-config - #~(let ((locale #$(and locale - (locale-definition-source - (locale-name->definition locale))))) - (when locale - (format port "\ + (let* ((entry (first all-entries)) + (device (menu-entry-device entry)) + (mount-point (menu-entry-device-mount-point entry)) + (bootloader (bootloader-configuration-bootloader config)) + (grub (bootloader-package bootloader)) + (locale-dir (grub-locale-folder grub))) + + #~(let ((locale #$(and locale + (locale-definition-source + (locale-name->definition locale)))) + (locale-dir #$(and locale (grub-locale-folder grub)))) + (when locale + (format port "\ # Localization configuration. -if search --file --set boot_partition /grub/grub.cfg; then - set locale_dir=(${boot_partition})/grub/locale -else - set locale_dir=/boot/grub/locale -fi -set lang=~a~%" locale)))) +search --file --set ~a +set locale_dir=~a +set lang=~a~%" + (string-append locale-dir "/es@quot.mo") + locale-dir + locale))))) (define keyboard-layout-config (let* ((layout (bootloader-configuration-keyboard-layout config)) -- 2.28.0 --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Mon Oct 26 18:29:40 2020 Received: (at 44196) by debbugs.gnu.org; 26 Oct 2020 22:29:40 +0000 Received: from localhost ([127.0.0.1]:41871 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kXAzj-0008V9-SD for submit@debbugs.gnu.org; Mon, 26 Oct 2020 18:29:40 -0400 Received: from mail-wr1-f47.google.com ([209.85.221.47]:43617) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kXAzh-0008Us-Hs for 44196@debbugs.gnu.org; Mon, 26 Oct 2020 18:29:37 -0400 Received: by mail-wr1-f47.google.com with SMTP id g12so14725663wrp.10 for <44196@debbugs.gnu.org>; Mon, 26 Oct 2020 15:29:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:references:date:in-reply-to:message-id:user-agent :mime-version; bh=WJ1qzwQh4JyoRqNuSsDQxVut5Na13osBqJ2XgzTpWas=; b=efIcgBhJzg+bokG6n2tD7RFd0VzuYsWYvan9qezrPbRIdJ4Dwtzkn1Qfn459mhE/Uz Ep7oU5Iv5Mzt4DpsrEWJehgohdGWgTbNYawaKMv0tPkcaH5z6/u7+ruXydo5ZbJM4hbV tlUyAsE/3wG25LRwoDsAcWdopN08uYw+j+ra9JMCzqu/YSl1y7yS9Vy3fQ5McWCArUIq tA88kcfgOau5DlxmUlz+8XEqlV1nkHAht/aQJ2Nu8o9YMgTiI+Na48BH8ak0BqqZtFG6 G4s6HJXZEbJv4hQaia8T5v8YqnYKLu24r5d3nz2W3WbZAtjRLN7YVAmVkEub95lj/JbZ rm7w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=WJ1qzwQh4JyoRqNuSsDQxVut5Na13osBqJ2XgzTpWas=; b=I/VgnVKgNnrQ/c/2+oq34xYTkjPsv+nE2Wog4k0hAKF+LEJorReKnDJKspjbm/HlV5 rJZ3hwq/58SXPpZEdYX3fJTtWOUh+BeQUPHN6qcAiyWkL129Mojll0suySbS7KycxzaR UjMYNso84H3IlHiqfZa3OAkn7/nDUtkGG7XSF1rJfKSAoa6Qz6DUIKKoHMFiuc2eM/Dg QEo+4LzJCwp30OCDUFb68SvOH00J4JYx9rR8qLdxBvWkWd5QZrj6baGkg+VtHnN01ttJ dCkT1fUfntuEQQs/igxzZWNlcWWdvj2cU/QOYkKEEqteBEzG3lLQzR+mHU2w62uc5S7/ lEqw== X-Gm-Message-State: AOAM533JkFrp8T+cRBv/wUjQ/A3BAj25i0r1w2i236c/TIy1b4+sieFd uLhfpjHtKDAsIyMhyK3gnf9WbVYoOVkADg== X-Google-Smtp-Source: ABdhPJxmD2eTUpv5PPJKEQcC3M552Ftmf5nDM8krScEz8kftGLwG0FKcuTThQKCnBEx3+REe+nTDZw== X-Received: by 2002:a5d:458c:: with SMTP id p12mr19978679wrq.329.1603751371475; Mon, 26 Oct 2020 15:29:31 -0700 (PDT) Received: from unfall (218.139.134.37.dynamic.jazztel.es. [37.134.139.218]) by smtp.gmail.com with ESMTPSA id n9sm26595303wrq.72.2020.10.26.15.29.30 for <44196@debbugs.gnu.org> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Oct 2020 15:29:30 -0700 (PDT) From: =?utf-8?Q?Miguel_=C3=81ngel_Arruga_Vivas?= To: 44196@debbugs.gnu.org Subject: Re: bug#44196: [PATCH 4/3] system: Fix dependency for grub.cfg generation. References: <878sbvh5j4.fsf@gmail.com> Date: Mon, 26 Oct 2020 23:29:29 +0100 In-Reply-To: <878sbvh5j4.fsf@gmail.com> ("Miguel =?utf-8?Q?=C3=81ngel?= Arruga Vivas"'s message of "Sat, 24 Oct 2020 19:56:15 +0200") Message-ID: <87mu08oc3a.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: 0.2 (/) X-Debbugs-Envelope-To: 44196 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: -0.8 (/) --=-=-= Content-Type: text/plain One extra bit :-) * The keymap was depending on the exported package grub, not on the one provided by the bootloader configuration, so e.g. systems that use grub-efi also ended up with grub in their dependency graph. This patch solves that issue. --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=v3-0004-system-Fix-dependency-for-grub.cfg-generation.patch Content-Description: 0004-system-Fix-dependency-for-grub.cfg-generation.patch >From ae2d83f91d522b5b0edfe1abbe88dec0a797235c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20=C3=81ngel=20Arruga=20Vivas?= Date: Sun, 25 Oct 2020 10:13:46 +0100 Subject: [PATCH v3 4/5] system: Fix dependency for grub.cfg generation. * gnu/bootloader/grub.scm (eye-candy)[font-file]: Use the bootloader package provided with the configuration. --- gnu/bootloader/grub.scm | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/gnu/bootloader/grub.scm b/gnu/bootloader/grub.scm index b610ecbfe5..8636e9c690 100644 --- a/gnu/bootloader/grub.scm +++ b/gnu/bootloader/grub.scm @@ -191,9 +191,11 @@ fi~%" (symbol->string (assoc-ref colors 'bg))))) (define font-file - (normalize-file (file-append grub "/share/grub/unicode.pf2") - store-mount-point - store-directory-prefix)) + (let* ((bootloader (bootloader-configuration-bootloader config)) + (grub (bootloader-package bootloader))) + (normalize-file (file-append grub "/share/grub/unicode.pf2") + store-mount-point + store-directory-prefix))) (define image (normalize-file (grub-background-image config) -- 2.28.0 --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Wed Oct 28 17:34:16 2020 Received: (at 44196) by debbugs.gnu.org; 28 Oct 2020 21:34:16 +0000 Received: from localhost ([127.0.0.1]:50942 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kXt5D-0001i3-NA for submit@debbugs.gnu.org; Wed, 28 Oct 2020 17:34:15 -0400 Received: from mail-wr1-f47.google.com ([209.85.221.47]:36302) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kXt5C-0001hq-5z for 44196@debbugs.gnu.org; Wed, 28 Oct 2020 17:34:14 -0400 Received: by mail-wr1-f47.google.com with SMTP id x7so631738wrl.3 for <44196@debbugs.gnu.org>; Wed, 28 Oct 2020 14:34:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:references:date:in-reply-to:message-id:user-agent :mime-version; bh=3YhjsL3wjKMVjmRAT9dEtuxyrH/UPSEUMNTaci/wHOk=; b=cvYvJzHax/cSDNUHpA3VTiwseQpwGaTI8R1frr3V8LLD9FQlVm3+ZTMOhhy7+n+p9c poPRRza0V7YbMRWMia/GqRyuCnNzH7H+UU9GXCaHLx8Uw9yIrZItyC0nIaxxylwCkOgp zK2yswTDtY2c9TDr3MOF5WXOwLmTayWWa6Xq3uzt4qh/cuxamKlIEok8VqtpcXa6QcJa iYDyummts70zrtzDq3C/RNr25zuY8ebY4+7xghoBUPYnl1skFFEUQqPg4Hxx1uxnJxzF tdKMVVAfroyxQ84gmbcLEKn2posa2cVX75YUh8A/zcRICrh4eXL8weDEqGYuf3U7iwKs PROg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=3YhjsL3wjKMVjmRAT9dEtuxyrH/UPSEUMNTaci/wHOk=; b=MwZW8lzf6e1WTA8ub9GUXmHI7QgeX7EZ69aPmU11py3wNzeSd8FjUW0sC8q6x5BhL7 hzsyTIrKs0zBRWKf4kEqYg73wQBE3VPgmXnWjwu0ctWJ0p78FXL9+G1NWzwaGWvyUsjv z6jz+lD+PBHZlUkZHTVSVPvC0tC1gDE32pGuvEbOnGA474FSkcshhBJjzYHHYMI+IupJ Hm1qFx2XmCRcMm134HySlB2dVdO8UF+4XW+TtWw5FBDm4Kwsfp1Og0ao3RwI/nRm2hD3 oLatDYXU/j3m1JUN5UiKNQ8O5tk5/XjP1NIwEMPM14F+vuawe59TTJKX3+M8I9r2Y+qT TXZQ== X-Gm-Message-State: AOAM533+86wd3f/cXoEaundetG+6rFqUXiDtpXK0LeRc6VMfYL/6gWks 7CmUDmckUiUjynf3/D/cD/VvhpDXYiabvQ== X-Google-Smtp-Source: ABdhPJyXfw2FvV59wE+64MPqxU7yHUV2dxpODDRfj0IiwX1pIoWC4Nnlx3irqyJF3IQUWGxLWjBvPg== X-Received: by 2002:adf:edcf:: with SMTP id v15mr1406139wro.291.1603920847951; Wed, 28 Oct 2020 14:34:07 -0700 (PDT) Received: from unfall (218.139.134.37.dynamic.jazztel.es. [37.134.139.218]) by smtp.gmail.com with ESMTPSA id z14sm988378wmc.15.2020.10.28.14.34.06 for <44196@debbugs.gnu.org> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Oct 2020 14:34:06 -0700 (PDT) From: =?utf-8?Q?Miguel_=C3=81ngel_Arruga_Vivas?= To: 44196@debbugs.gnu.org Subject: Re: bug#44196: [PATCH v4 3/4] system: Do not depend on locale folder generated by References: <878sbvh5j4.fsf@gmail.com> <87tuujfhum.fsf@gmail.com> <87imay7hax.fsf_-_@gmail.com> <87y2jsod97.fsf_-_@gmail.com> Date: Wed, 28 Oct 2020 22:34:05 +0100 In-Reply-To: <87y2jsod97.fsf_-_@gmail.com> ("Miguel =?utf-8?Q?=C3=81ngel?= Arruga Vivas"'s message of "Mon, 26 Oct 2020 23:04:20 +0100") Message-ID: <87v9eum3w2.fsf_-_@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: 0.2 (/) X-Debbugs-Envelope-To: 44196 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: -0.8 (/) --=-=-= Content-Type: text/plain Sorry, the last one didn't generate correctly the locale folder for two reasons: wrong name for the .mo name, and incomplete path. --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=v4-0003-system-Do-not-depend-on-locale-folder-generated-b.patch Content-Description: v4-0003-system-do-not-depend-on-locale-folder.patch >From 37ef6594c6db00595b4e3aec6bcaec3eb9b4e1cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20=C3=81ngel=20Arruga=20Vivas?= Date: Sat, 24 Oct 2020 20:36:21 +0200 Subject: [PATCH v4 3/5] system: Do not depend on locale folder generated by grub-install. * gnu/bootloader/grub.scm (define-module): Use (guix packages). (grub-locale-folder): New computed folder. (grub-configuration-file)[locale-config]: Use grub-locale-folder only when a locale is needed. --- gnu/bootloader/grub.scm | 49 ++++++++++++++++++++++++++++++++--------- 1 file changed, 38 insertions(+), 11 deletions(-) diff --git a/gnu/bootloader/grub.scm b/gnu/bootloader/grub.scm index f1479024e6..1fe09d01c1 100644 --- a/gnu/bootloader/grub.scm +++ b/gnu/bootloader/grub.scm @@ -25,6 +25,7 @@ (define-module (gnu bootloader grub) #:use-module (guix build union) + #:use-module (guix packages) #:use-module (guix records) #:use-module (guix store) #:use-module (guix utils) @@ -142,6 +143,24 @@ file with the resolution provided in CONFIG." (image->png image #:width width #:height height)) (_ #f))))) +(define (grub-locale-folder grub) + "Generate a folder with the locales from GRUB." + (define builder + #~(begin + (use-modules (ice-9 ftw)) + (let ((locale (string-append #$grub "/share/locale")) + (out #$output)) + (mkdir out) + (chdir out) + (for-each (lambda (lang) + (let ((file (string-append locale "/" lang + "/LC_MESSAGES/grub.mo")) + (dest (string-append lang ".mo"))) + (when (file-exists? file) + (copy-file file dest)))) + (scandir locale))))) + (computed-file "grub-boot-locale" builder)) + (define* (eye-candy config store-device store-mount-point #:key store-directory-prefix port) "Return a gexp that writes to PORT (a port-valued gexp) the 'grub.cfg' part @@ -402,18 +421,26 @@ menuentry ~s { #:port #~port))) (define locale-config - #~(let ((locale #$(and locale - (locale-definition-source - (locale-name->definition locale))))) - (when locale - (format port "\ + (let* ((entry (first all-entries)) + (device (menu-entry-device entry)) + (mount-point (menu-entry-device-mount-point entry)) + (bootloader (bootloader-configuration-bootloader config)) + (grub (bootloader-package bootloader)) + (locale-dir (grub-locale-folder grub))) + + #~(let ((locale #$(and locale + (locale-definition-source + (locale-name->definition locale)))) + (locale-dir #$(and locale (grub-locale-folder grub)))) + (when locale + (format port "\ # Localization configuration. -if search --file --set boot_partition /grub/grub.cfg; then - set locale_dir=(${boot_partition})/grub/locale -else - set locale_dir=/boot/grub/locale -fi -set lang=~a~%" locale)))) +search --file --set ~a +set locale_dir=~a +set lang=~a~%" + (string-append locale-dir "/es@quot.mo") + locale-dir + locale))))) (define keyboard-layout-config (let* ((layout (bootloader-configuration-keyboard-layout config)) -- 2.28.0 --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Fri Oct 30 14:13:24 2020 Received: (at 44196) by debbugs.gnu.org; 30 Oct 2020 18:13:24 +0000 Received: from localhost ([127.0.0.1]:59642 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kYYtw-0003Hu-IL for submit@debbugs.gnu.org; Fri, 30 Oct 2020 14:13:24 -0400 Received: from mail-wr1-f51.google.com ([209.85.221.51]:35087) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kYYtu-0003HV-Ho for 44196@debbugs.gnu.org; Fri, 30 Oct 2020 14:13:23 -0400 Received: by mail-wr1-f51.google.com with SMTP id n15so7491314wrq.2 for <44196@debbugs.gnu.org>; Fri, 30 Oct 2020 11:13:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:references:date:in-reply-to:message-id:user-agent :mime-version; bh=cU2dBWZWkU+jpa2kMVbbCs/sd0GUwWDAqchql3GCLwU=; b=PtM+0IFzhdCwwXAvZnKCj92rkNovvXtklsibU5M0jDbIyLskXtwHG/UrZReM6QBNiC Gp19MISs/orapaHLfNm+Bi27/zFLBc6eR+dEXXf/3WC0qJbQ8WBNOdRINV+rnYUos5/n 6WWl3vyOm2JOc5AesbHcqfSqbXIEyTtt5D1Q9TshCcUprWsUyjwOWB+88NNZVJDLPZif nxa4fW9j/4p3K2WaquUVHAObFkikda2IWJQeIhi8RprgjkehLJHp5KBFQ0PCrtgH5WVx Ety7wKtfqEyWt5k9QtJQ9lYwkOBIbRlIS8eOM7a8G2tD3JYgnN5jigzs1TLSsXNXdeit 2bNw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=cU2dBWZWkU+jpa2kMVbbCs/sd0GUwWDAqchql3GCLwU=; b=XsE6AdukMHQxJFfZzNi2IlI9kIYk+Qt3NwQ9XXB7ScMFJsSjQVq84JsqftFUPi5BQN IbeJSa86ehSMdBa+z2T0qOoaDbSs0SERcEJzgQeVqk0eminvEH3eM1OqlWH8ZxFTyCzX efOrj5Tp6tWX+3bE6CaF/XWNUK7sHT7Up8knmbYfXSzbxktQ3U1u8BX221oRuXflyL8h jH4iDDgaxeZg8QiCDm12V9U0eq10I1P1rV3fbQvhIWOiesvHwaxt8FoXIS7FkkEwyov7 v2TWW+OmipLWwuuo9wHIz11Gu6ApdGVb9rLtYzBU5hTKopBQbOV5cKJqQctpcIwLBjDA Jgdw== X-Gm-Message-State: AOAM532a/jyUqSELMYM/4WbgUHGdJnmAtxUY1Bq5a4n75MZOrbZ6+gbW MB5WdabtiqW34xWjXxxvGgGkUMFLdjlkTg== X-Google-Smtp-Source: ABdhPJxlgKFffE9YBr070tn7lxpbE7UWJgY9f9lFJA/Iw3Sc4mT87k6m/5Tuwk0Lni91Ydlwpkly8A== X-Received: by 2002:a5d:664b:: with SMTP id f11mr4342618wrw.195.1604081596503; Fri, 30 Oct 2020 11:13:16 -0700 (PDT) Received: from unfall (218.139.134.37.dynamic.jazztel.es. [37.134.139.218]) by smtp.gmail.com with ESMTPSA id w1sm1298282wro.44.2020.10.30.11.13.15 for <44196@debbugs.gnu.org> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 30 Oct 2020 11:13:15 -0700 (PDT) From: =?utf-8?Q?Miguel_=C3=81ngel_Arruga_Vivas?= To: 44196@debbugs.gnu.org Subject: Re: bug#44196: [PATCH v5 3/4] system: Do not depend on locale folder generated by References: <878sbvh5j4.fsf@gmail.com> <87tuujfhum.fsf@gmail.com> <87imay7hax.fsf_-_@gmail.com> <87y2jsod97.fsf_-_@gmail.com> <87v9eum3w2.fsf_-_@gmail.com> Date: Fri, 30 Oct 2020 19:13:14 +0100 In-Reply-To: <87v9eum3w2.fsf_-_@gmail.com> ("Miguel =?utf-8?Q?=C3=81ngel?= Arruga Vivas"'s message of "Wed, 28 Oct 2020 22:34:05 +0100") Message-ID: <87mu0360qt.fsf_-_@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: 0.2 (/) X-Debbugs-Envelope-To: 44196 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: -0.8 (/) --=-=-= Content-Type: text/plain Changes w.r.t. previous version: - Call normalize-file (the parameters were there but I lost the call). - Only call search when there is no image configured. --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-system-Do-not-depend-on-locale-folder-generated-by-g.patch Content-Description: 0003-v5.patch >From 3eb494947ed863e60d3d49d4ac4a982b1f9237e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20=C3=81ngel=20Arruga=20Vivas?= Date: Sat, 24 Oct 2020 20:36:21 +0200 Subject: [PATCH] system: Do not depend on locale folder generated by grub-install. * gnu/bootloader/grub.scm (define-module): Use (guix packages). (grub-locale-folder): New computed folder. (grub-configuration-file)[locale-config]: Use grub-locale-folder only when a locale is needed. --- gnu/bootloader/grub.scm | 56 +++++++++++++++++++++++++++++++++-------- 1 file changed, 45 insertions(+), 11 deletions(-) diff --git a/gnu/bootloader/grub.scm b/gnu/bootloader/grub.scm index 5508319d3b..2604f59117 100644 --- a/gnu/bootloader/grub.scm +++ b/gnu/bootloader/grub.scm @@ -25,6 +25,7 @@ (define-module (gnu bootloader grub) #:use-module (guix build union) + #:use-module (guix packages) #:use-module (guix records) #:use-module (guix store) #:use-module (guix utils) @@ -142,6 +143,24 @@ file with the resolution provided in CONFIG." (image->png image #:width width #:height height)) (_ #f))))) +(define (grub-locale-folder grub) + "Generate a folder with the locales from GRUB." + (define builder + #~(begin + (use-modules (ice-9 ftw)) + (let ((locale (string-append #$grub "/share/locale")) + (out #$output)) + (mkdir out) + (chdir out) + (for-each (lambda (lang) + (let ((file (string-append locale "/" lang + "/LC_MESSAGES/grub.mo")) + (dest (string-append lang ".mo"))) + (when (file-exists? file) + (copy-file file dest)))) + (scandir locale))))) + (computed-file "grub-boot-locale" builder)) + (define* (eye-candy config store-device store-mount-point #:key store-directory-prefix port) "Return a gexp that writes to PORT (a port-valued gexp) the 'grub.cfg' part @@ -404,18 +423,33 @@ menuentry ~s { #:port #~port))) (define locale-config - #~(let ((locale #$(and locale - (locale-definition-source - (locale-name->definition locale))))) - (when locale - (format port "\ + (let* ((entry (first all-entries)) + (device (menu-entry-device entry)) + (mount-point (menu-entry-device-mount-point entry)) + (bootloader (bootloader-configuration-bootloader config)) + (grub (bootloader-package bootloader)) + (locale-dir (normalize-file (grub-locale-folder grub) + mount-point + store-directory-prefix))) + + #~(let ((locale #$(and locale + (locale-definition-source + (locale-name->definition locale)))) + (locale-dir #$(and locale locale-dir))) + (when locale + (format port "\ # Localization configuration. -if search --file --set boot_partition /grub/grub.cfg; then - set locale_dir=(${boot_partition})/grub/locale -else - set locale_dir=/boot/grub/locale -fi -set lang=~a~%" locale)))) +~asearch --file --set ~a/es@quot.mo +set locale_dir=~a +set lang=~a~%" + ;; Skip the search if there is an image, because it is + ;; loaded before this fragment, to avoid the extra search. + #$(if (grub-theme-image (bootloader-theme config)) + "# " + "") + locale-dir + locale-dir + locale))))) (define keyboard-layout-config (let* ((layout (bootloader-configuration-keyboard-layout config)) -- 2.28.0 --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Fri Oct 30 15:35:35 2020 Received: (at 44196) by debbugs.gnu.org; 30 Oct 2020 19:35:35 +0000 Received: from localhost ([127.0.0.1]:59810 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kYaBT-0005SD-AX for submit@debbugs.gnu.org; Fri, 30 Oct 2020 15:35:35 -0400 Received: from dd26836.kasserver.com ([85.13.145.193]:34404) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kYaBR-0005S4-0u for 44196@debbugs.gnu.org; Fri, 30 Oct 2020 15:35:33 -0400 Received: from localhost (80-110-126-103.cgn.dynamic.surfer.at [80.110.126.103]) by dd26836.kasserver.com (Postfix) with ESMTPSA id 441B133607A5; Fri, 30 Oct 2020 20:35:31 +0100 (CET) Date: Fri, 30 Oct 2020 20:35:27 +0100 From: Danny Milosavljevic To: Miguel =?ISO-8859-1?Q?=C1ngel?= Arruga Vivas Subject: Re: bug#44196: [PATCH 4/3] system: Fix dependency for grub.cfg generation. Message-ID: <20201030203527.682b4bf5@scratchpost.org> In-Reply-To: <87mu08oc3a.fsf@gmail.com> References: <878sbvh5j4.fsf@gmail.com> <87mu08oc3a.fsf@gmail.com> X-Mailer: Claws Mail 3.17.7 (GTK+ 2.24.32; x86_64-unknown-linux-gnu) MIME-Version: 1.0 Content-Type: multipart/signed; boundary="Sig_/0OaLH4nOwCPQdOw3hU/R2Xu"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 44196 Cc: 44196@debbugs.gnu.org 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 (-) --Sig_/0OaLH4nOwCPQdOw3hU/R2Xu Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable This patch LGTM! --Sig_/0OaLH4nOwCPQdOw3hU/R2Xu Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iQEzBAEBCgAdFiEEds7GsXJ0tGXALbPZ5xo1VCwwuqUFAl+cav8ACgkQ5xo1VCww uqWchQf+PE+l4wMAPT/iKsDzKH5tRsnfUrztZmJnAmleODdoqs1lXfFs0pzEiCVa Gemoj/h+xru7MJrCSX/o90z2A567gBan4xQcYYDMkCKEzclTJL3lYFAbpSgcyDtT 0LAPbV7LklxcwHAU+RQcG5FEdo7RPz7GCBp1fH2Bc0YWj+rHziJ/Ih4zsQWaXoAf g2EY0H2LjLPFFIc1KliGIjDheRy21vpSuzYF28e1+0e909eugFlZYlwbbxLBdpDN w0CFva0xV469y3bAe8EDoJ97DtJ00KUi0ihDmheBfbd9K3Y5LnQgXfpw4UPmEW3t m+/qVy8xTSgaeheqw0y5/laVC7xUPg== =bb2J -----END PGP SIGNATURE----- --Sig_/0OaLH4nOwCPQdOw3hU/R2Xu-- From debbugs-submit-bounces@debbugs.gnu.org Fri Oct 30 15:36:41 2020 Received: (at 44196) by debbugs.gnu.org; 30 Oct 2020 19:36:42 +0000 Received: from localhost ([127.0.0.1]:59814 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kYaCX-0005UI-Mq for submit@debbugs.gnu.org; Fri, 30 Oct 2020 15:36:41 -0400 Received: from dd26836.kasserver.com ([85.13.145.193]:34506) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kYaCW-0005UA-DZ for 44196@debbugs.gnu.org; Fri, 30 Oct 2020 15:36:41 -0400 Received: from localhost (80-110-126-103.cgn.dynamic.surfer.at [80.110.126.103]) by dd26836.kasserver.com (Postfix) with ESMTPSA id 96DFB33607A5; Fri, 30 Oct 2020 20:36:39 +0100 (CET) Date: Fri, 30 Oct 2020 20:36:38 +0100 From: Danny Milosavljevic To: Miguel =?ISO-8859-1?Q?=C1ngel?= Arruga Vivas Subject: Re: bug#44196: [PATCH 1/3] system: Fix grub keymap with store in btrfs subvolume. Message-ID: <20201030203638.67badd33@scratchpost.org> In-Reply-To: <873623h5aq.fsf@gmail.com> References: <878sbvh5j4.fsf@gmail.com> <873623h5aq.fsf@gmail.com> X-Mailer: Claws Mail 3.17.7 (GTK+ 2.24.32; x86_64-unknown-linux-gnu) MIME-Version: 1.0 Content-Type: multipart/signed; boundary="Sig_/vMAydYVLB5bnzuEvivLl45j"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 44196 Cc: 44196@debbugs.gnu.org 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 (-) --Sig_/vMAydYVLB5bnzuEvivLl45j Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Is it possible for there to be no entries in all-entries at all? If not, LGTM! --Sig_/vMAydYVLB5bnzuEvivLl45j Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iQEzBAEBCgAdFiEEds7GsXJ0tGXALbPZ5xo1VCwwuqUFAl+ca0YACgkQ5xo1VCww uqUIkgf8CFmidnvSTzafjtMhxneXFVo6mzl0TviBX0lFK3IEUnhHFX/5p940Emwy 6Z5787H46jGJ8YpqKI0MV/0XF4VQO43xlwb6B2ZG25v0htttvm+Z4IJgYi0dnyA+ n4MDpni/ekzmguqr/3L3rA94oL6tmXBY8YxWeb7WpnksA2mfM0AHJpF/HTXYMi6Y dO5q5cS4CjCb0i2fSni/rRWeWF43GYbEm3bFPujFg1wuQrzLcBpkj1std08VhzC6 l+ycvQMg4//6ekC51u7vmFCg6KT0rJCuVQ6PoG4fR6ZBHwvYPnfYnKhAYUnGtGO/ BnYZF3KRkVHyadsh74ctn4OCir138w== =vZ/Y -----END PGP SIGNATURE----- --Sig_/vMAydYVLB5bnzuEvivLl45j-- From debbugs-submit-bounces@debbugs.gnu.org Fri Oct 30 17:38:34 2020 Received: (at 44196) by debbugs.gnu.org; 30 Oct 2020 21:38:34 +0000 Received: from localhost ([127.0.0.1]:60022 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kYc6U-0002J4-H9 for submit@debbugs.gnu.org; Fri, 30 Oct 2020 17:38:34 -0400 Received: from mail-wr1-f48.google.com ([209.85.221.48]:36476) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kYc6R-0002Iq-ND for 44196@debbugs.gnu.org; Fri, 30 Oct 2020 17:38:32 -0400 Received: by mail-wr1-f48.google.com with SMTP id x7so7967113wrl.3 for <44196@debbugs.gnu.org>; Fri, 30 Oct 2020 14:38:31 -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; bh=b1AoHq9dxpkIAd9hoEPvXe+BPCdvpiqRsgnr4IgDyzw=; b=hNxtlpiovfhdioGj6eyA3qlGxZjMdkK515w9Wo4cf+72diOrypnj4sqPBohM8XtGBd +0U5Yl2DRp3WTKR6OeRA+XiZbPzysD10z8zhWtDZPokkAh7G08ePxCpC77T8ABqkGhQz reKaXqgLftQrXgTlsz+toSo9Yr6HgZDm3BW0Vhd/4nydJ6BKJPEN2sYwKUHrQSotA2uy MRRmns6wA3abNUAFsFML9ETFpa1Y7ZHYG3InfnmqZ5mjRuAL03sfTpREHTj+RfoF93Fm RgKPR93CfUfjoKrUE78ZJgWYiFfIvB/RFTASvgjCGccLcuGeutih0K7A4AgBYgnRkUBu GAOQ== 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; bh=b1AoHq9dxpkIAd9hoEPvXe+BPCdvpiqRsgnr4IgDyzw=; b=oShIWJ460UYd7MTaGFZi6B2toBSGfALCjgwZkQcJVry49d1vCXDrFxoGbbQtH7X35y Vg9Di+3xgk4biF0JQM+Y5N2x7UXwa6CAPzWVZ0oXPlbiAcH4JelxSeB0TiCp3YSFFu9r Mjuql22wW+ofpTD0ebF/S44WD2J9uXmyBSYStMCXMDrwuTfhw1Cm6ygVqOp+aIjf3CYy t9saSbYK4R1j/pNgs4IwDm2qr+SnUPnQ1tfwpRK6sl55w08dDWU2UdZ0e1j39k8xTuou a2DRkiLksFsGYd3mP76Ibwypvycdui6p6UFKB6K+P+NDC9t4IQ/Xz2pDPk2sJifK/ode qdPg== X-Gm-Message-State: AOAM532iVqQGOh0I0R1YBAFj6wNyQr72JePFPZ77KgwsQ8/BkLKtwfyZ f9ZEiVZymIRnK3CH4Oj3m0Bih6FSfLjDPw== X-Google-Smtp-Source: ABdhPJz8xu4ny7jS89QZeGdw2wikoho2pFgdaZ9gvc+YKy372cDTRUy7tioVObf998pfrS/6Yk71xg== X-Received: by 2002:a5d:61c9:: with SMTP id q9mr5687392wrv.395.1604093905517; Fri, 30 Oct 2020 14:38:25 -0700 (PDT) Received: from unfall (218.139.134.37.dynamic.jazztel.es. [37.134.139.218]) by smtp.gmail.com with ESMTPSA id e7sm12160768wrm.6.2020.10.30.14.38.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 30 Oct 2020 14:38:24 -0700 (PDT) From: =?utf-8?Q?Miguel_=C3=81ngel_Arruga_Vivas?= To: Danny Milosavljevic Subject: Re: bug#44196: [PATCH 4/3] system: Fix dependency for grub.cfg generation. References: <878sbvh5j4.fsf@gmail.com> <87mu08oc3a.fsf@gmail.com> <20201030203527.682b4bf5@scratchpost.org> Date: Fri, 30 Oct 2020 22:38:18 +0100 In-Reply-To: <20201030203527.682b4bf5@scratchpost.org> (Danny Milosavljevic's message of "Fri, 30 Oct 2020 20:35:27 +0100") Message-ID: <87ft5v5r91.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-Spam-Score: 0.2 (/) X-Debbugs-Envelope-To: 44196 Cc: 44196@debbugs.gnu.org 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: -0.8 (/) --=-=-= Content-Type: text/plain Danny Milosavljevic writes: > This patch LGTM! Thanks for your review, pushed as 222a630e9e. Happy hacking! Miguel --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGzBAEBCgAdFiEEiIeExBRZrMuD5+hMY0xuiXn6vsIFAl+ch8oACgkQY0xuiXn6 vsJ4ZAv/aP0Qib0qkRb9eMcUVsIQf6RLVZKGwxcUEPDMaK9EfCnNJg5JdYWrkVnp ds3jVifdDDhL9FMAYb52TnaJpaF7xpGjRJ70h6w0nLDiMY+3F54WCoiFonubLNWo qOpEFDh1GA2Ph8xZ9oW29d1amANXKFebd/CatXa3U9yxGQ5BjfYS3/SsCgl2L9Cl lRu0W1SKXV35t1hVl3mF3c2Dkm15UemoMM3deHVDUZUg90bIL1HXZva7I3aufONz EAzmpEqeCmy3w5Ob/AzdTXd59QvHkYipbsp61TBh6CvCaLsBMNURwIrMvJ5ndk1P 5Ncqw0+ztUZ8I2xoA85xCFttJkST9KwT38VLRtDVl49KvVX1PqlsL1wbM8amXiDm gChQ3mdw4z9GnN5l9esEAucjCwTgcAmvhoFvm97kjmoDjUEDG2WCkqVqfNlEJlOT Cuy9sxeWuKbDxVcTik6ZE/I0Xhc6u5+XcBBw4YsASE8kWCa/PNq+UgpnZ3/Iy385 Y9ZrZhpE =YNYK -----END PGP SIGNATURE----- --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Fri Oct 30 17:38:49 2020 Received: (at 44196) by debbugs.gnu.org; 30 Oct 2020 21:38:49 +0000 Received: from localhost ([127.0.0.1]:60025 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kYc6i-0002Jb-O4 for submit@debbugs.gnu.org; Fri, 30 Oct 2020 17:38:48 -0400 Received: from mail-wm1-f46.google.com ([209.85.128.46]:33022) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kYc6h-0002JJ-LX for 44196@debbugs.gnu.org; Fri, 30 Oct 2020 17:38:48 -0400 Received: by mail-wm1-f46.google.com with SMTP id k125so3396505wmf.0 for <44196@debbugs.gnu.org>; Fri, 30 Oct 2020 14:38:47 -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; bh=gKt3iYud921q8EWgUImQVbGE2DUOp4yIfKg9WkZU80I=; b=PzgEowQ3SGWlBV+cpSx950f5pRYKHBfGd5pHrEoQwT9bZJaDDwOZEDhffhTkN+zPZv lm0hKA53/Zabl2y/pkF6dfF+bVZE7knIhNleuulqB0bDjs6nSs5t/Z2xWDd3XAe/32Rw wdpk70j4lRDicImFGmO1+GV3HM1wXWk0swXedbZieNngOIR9S+BXJ487yOTGKLq5EnFc jlvIoJaO30gXbzn81Itfr9w8l196vNtT3HYeFE4WJSlwo/PpbIefa6+UyzIRYupD+/S4 dnvOjUYLDPEIC+PEYOJVBreUy9RTRvAtBaPJWGTfNUY8Nk+qzYWOtvllIFyODXe64rIA WnCg== 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; bh=gKt3iYud921q8EWgUImQVbGE2DUOp4yIfKg9WkZU80I=; b=sDHFBVfrY3C1/VLj3sjl5DUgGaGxZZOHSP1LtqwFj8FgNueepkIlNRgMKRyva+/3SD WRzGlxv8+UhRyiV4kGTkCvdcNOOTr+lT82kPQA6DpyOoUKGBTyzrDYrms5EB30LtU5Bx 8ifwY9Y1eqhQrf5MX46itF++YY1Slv6z49WH+W09MmiWFJ1VFbK3dIXPcSK7OWggFMs1 W10d9/Mq2Y0hxhbc9IijQJ+kblq9FZUu5p77AzZhY0bj97lvrHllLv4gmA7hwZZsvjBg dN+IpUiR0tfqiSsusgd9A/w2lho6Hg5ZF4yXP/4x0mw30ZIirCZxC6r2MfVZ/Mv3BaE5 9cPw== X-Gm-Message-State: AOAM5300JelA8TpGWTp6EfWc0bq/wzf0BPfKl4EvvEE7XPMVUSp0C7QY OnG4cDsoT9SxozD2CEHNPenOf+N0WUmNpg== X-Google-Smtp-Source: ABdhPJw+DXV0zNmyCveokL2H7PAWlkgoNMPgbl9b77m2hjwaB4p22e0wEz4N0tDUbku9Pl+IYV0AUg== X-Received: by 2002:a1c:2ece:: with SMTP id u197mr5004826wmu.58.1604093921545; Fri, 30 Oct 2020 14:38:41 -0700 (PDT) Received: from unfall (218.139.134.37.dynamic.jazztel.es. [37.134.139.218]) by smtp.gmail.com with ESMTPSA id t4sm6116495wmb.20.2020.10.30.14.38.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 30 Oct 2020 14:38:40 -0700 (PDT) From: =?utf-8?Q?Miguel_=C3=81ngel_Arruga_Vivas?= To: Danny Milosavljevic Subject: Re: bug#44196: [PATCH 1/3] system: Fix grub keymap with store in btrfs subvolume. References: <878sbvh5j4.fsf@gmail.com> <873623h5aq.fsf@gmail.com> <20201030203638.67badd33@scratchpost.org> Date: Fri, 30 Oct 2020 22:38:39 +0100 In-Reply-To: <20201030203638.67badd33@scratchpost.org> (Danny Milosavljevic's message of "Fri, 30 Oct 2020 20:36:38 +0100") Message-ID: <87eelf5r8g.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-Spam-Score: 0.2 (/) X-Debbugs-Envelope-To: 44196 Cc: 44196@debbugs.gnu.org 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: -0.8 (/) --=-=-= Content-Type: text/plain Hi Danny, Thank you a lot for taking a look into this. :-) Danny Milosavljevic writes: > Is it possible for there to be no entries in all-entries at all? This is the idiom used in the rest of the file, and that would be a bug in the calling code. The entries are the operating system generations + the entries configured through the bootloader-configuration, and that would lead to a grub.cfg without any system to boot. > If not, LGTM! Pushed as c69a1c27ee. Happy hacking! Miguel --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGzBAEBCgAdFiEEiIeExBRZrMuD5+hMY0xuiXn6vsIFAl+ch98ACgkQY0xuiXn6 vsIBDgv/SqloPbXJ1sKi7MeEohEoNZ5m3DLFQOaNjC4tbVGiX5X5nRRcfwv+ue0/ 0JgJKnMeZcdW3O+mTIKfuEOtkkcf1CJRZT18FpJHWUkfBdvNP2JFJrijMY6PuB/o jOUJcTmUYZOpIVCe6OsbFLMwy4en4jO1L8N7j5ElQMQk51vtaSEiPIlpS8SzpcDA 1ZmF4a2m9HRWFFMYBLcUwYElE59n3WyjOICVivyzlRPQtWNXFEsKR+8YLL+UrWcm NUld4nl58zvki/GHIEHXiuX9TVzBQVT6rNxtXzP6tFiF3/sWi+eBxBDYvX+BZh2j DalYjNGKxe2hUe5dz9HhHJH978Bu36DruGTP5Xpo2SLj9HBSnjysK9KtTtO4GZXN dEUg82AxQ0w5YVAeuhDxhNJEXG3/Ss4+VAHr7Uf0q8GXzC3USqzpvDZcrmJufDv9 BgCrzGD0c2eqXvR5C5imMSdkBhwA+JjaFlJg2vwEZOwz2tC2fi0GdQyvNugGoYy4 KBAbmEKW =Q21z -----END PGP SIGNATURE----- --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Fri Oct 30 17:45:40 2020 Received: (at 44196) by debbugs.gnu.org; 30 Oct 2020 21:45:40 +0000 Received: from localhost ([127.0.0.1]:60034 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kYcDL-0002Ui-U0 for submit@debbugs.gnu.org; Fri, 30 Oct 2020 17:45:40 -0400 Received: from mail-wm1-f42.google.com ([209.85.128.42]:52433) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kYcDJ-0002UT-32 for 44196@debbugs.gnu.org; Fri, 30 Oct 2020 17:45:38 -0400 Received: by mail-wm1-f42.google.com with SMTP id c18so4121869wme.2 for <44196@debbugs.gnu.org>; Fri, 30 Oct 2020 14:45:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:references:date:in-reply-to:message-id:user-agent :mime-version; bh=rHqcLq5m4/yKf1xEhLIyI4YSTCx6nPLM5ZUBk8Lr854=; b=gWGmB1GZ8/xRKXU7VYDrV7krYr/YrhDQsge/6vSbrTFUipFn9UbGOqiU9r/GwxFAp4 E6kNw4NoXrlM/9T8iE5j+vcM8uKe4MftfpsxVZ0jQVa/lnytYQIIwKdsKpeBqs3oEBhr pKJ+v/mLk79+Z9xFB203WNU5cFb6AmRzqR38EKGWwP6Dpp0SiBcjuo1Gr4jTilG8Q/+o mdyA72Srr5YDcg3wk5JYl2nHEV5h0mxBDOCsYUPERnTRy1AZVaO5V+fjd9QQ78bEJYDD 9LL4tpIrdgLlW3zjLEW0v5q4+gvIKBaMfu2iMD+mSyykzscMC2SvErQcb4rMlaqrXZ2C xM8w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=rHqcLq5m4/yKf1xEhLIyI4YSTCx6nPLM5ZUBk8Lr854=; b=TLIKL0zMaM1+Wa14GT95SWYQTADCUpqR/l2a/NV2tJNqzxALTDjWZeVVYj4RPGUZF3 /PNy3vnu++ncSYqS1A1+VNOFuSF5kyGzlXiLHdAzrw0/bmjzSQ7OGpTU/9ctcizJZxAg DrDdgyEunbBJBcWq3uuceVbbIgL/zWuD4raUEnouQdXIK9L8HRSMe7lpKcuke7dyEJGB K4Z51I22tSDXfUUdNHYwc05hpqIgJlojGhEe3BvuVjw/B/B7q7Z+ib4tSHJyc2NT9mgy c54fC6aGIC2cX7UxQybbm7UlXZfR2sRJ1HaNrEBqN2HaJkLIEfvlXZ/EW+n9cWWC00+p ADrw== X-Gm-Message-State: AOAM530xrUb1AqdeAq+shl7jRR9CmissEI1fxY/X3sawZfOvsnVUICz1 N0b7/Cp/b+MbunTmP1OpeCYaUeQK1belWw== X-Google-Smtp-Source: ABdhPJyAVaBxOJC6gfRtA/Ez/i081LgL3CyNd+6UgoBlDlWaWMzpua/oQJDYZSEKSiwzbNuzLukUDA== X-Received: by 2002:a1c:1946:: with SMTP id 67mr4865073wmz.15.1604094330972; Fri, 30 Oct 2020 14:45:30 -0700 (PDT) Received: from unfall (218.139.134.37.dynamic.jazztel.es. [37.134.139.218]) by smtp.gmail.com with ESMTPSA id i14sm5920469wml.24.2020.10.30.14.45.29 for <44196@debbugs.gnu.org> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 30 Oct 2020 14:45:29 -0700 (PDT) From: =?utf-8?Q?Miguel_=C3=81ngel_Arruga_Vivas?= To: 44196@debbugs.gnu.org Subject: Re: bug#44196: [PATCH v6 3/4] system: Do not depend on locale folder generated by References: <878sbvh5j4.fsf@gmail.com> <87tuujfhum.fsf@gmail.com> <87imay7hax.fsf_-_@gmail.com> <87y2jsod97.fsf_-_@gmail.com> <87v9eum3w2.fsf_-_@gmail.com> <87mu0360qt.fsf_-_@gmail.com> Date: Fri, 30 Oct 2020 22:45:29 +0100 In-Reply-To: <87mu0360qt.fsf_-_@gmail.com> ("Miguel =?utf-8?Q?=C3=81ngel?= Arruga Vivas"'s message of "Fri, 30 Oct 2020 19:13:14 +0100") Message-ID: <87a6w35qx2.fsf_-_@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: 0.2 (/) X-Debbugs-Envelope-To: 44196 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: -0.8 (/) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable I hope this is the last one, at least for bug fixes. This version uses the right name for the autogenerated file en@quot.mo when no image is provided. Miguel =C3=81ngel Arruga Vivas writes: > Changes w.r.t. previous version: > - Call normalize-file (the parameters were there but I lost the call). > - Only call search when there is no image configured. --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-system-Do-not-depend-on-locale-folder-generated-by-g.patch Content-Description: v6-grub-locale.patch >From 5886bdf74bda59649b3d17b691132d9d030e0fb4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20=C3=81ngel=20Arruga=20Vivas?= Date: Sat, 24 Oct 2020 20:36:21 +0200 Subject: [PATCH] system: Do not depend on locale folder generated by grub-install. * gnu/bootloader/grub.scm (define-module): Use (guix packages). (grub-locale-folder): New computed folder. (grub-configuration-file)[locale-config]: Use grub-locale-folder only when a locale is needed. --- gnu/bootloader/grub.scm | 56 +++++++++++++++++++++++++++++++++-------- 1 file changed, 45 insertions(+), 11 deletions(-) diff --git a/gnu/bootloader/grub.scm b/gnu/bootloader/grub.scm index 5508319d3b..faf319b747 100644 --- a/gnu/bootloader/grub.scm +++ b/gnu/bootloader/grub.scm @@ -25,6 +25,7 @@ (define-module (gnu bootloader grub) #:use-module (guix build union) + #:use-module (guix packages) #:use-module (guix records) #:use-module (guix store) #:use-module (guix utils) @@ -142,6 +143,24 @@ file with the resolution provided in CONFIG." (image->png image #:width width #:height height)) (_ #f))))) +(define (grub-locale-folder grub) + "Generate a folder with the locales from GRUB." + (define builder + #~(begin + (use-modules (ice-9 ftw)) + (let ((locale (string-append #$grub "/share/locale")) + (out #$output)) + (mkdir out) + (chdir out) + (for-each (lambda (lang) + (let ((file (string-append locale "/" lang + "/LC_MESSAGES/grub.mo")) + (dest (string-append lang ".mo"))) + (when (file-exists? file) + (copy-file file dest)))) + (scandir locale))))) + (computed-file "grub-boot-locale" builder)) + (define* (eye-candy config store-device store-mount-point #:key store-directory-prefix port) "Return a gexp that writes to PORT (a port-valued gexp) the 'grub.cfg' part @@ -404,18 +423,33 @@ menuentry ~s { #:port #~port))) (define locale-config - #~(let ((locale #$(and locale - (locale-definition-source - (locale-name->definition locale))))) - (when locale - (format port "\ + (let* ((entry (first all-entries)) + (device (menu-entry-device entry)) + (mount-point (menu-entry-device-mount-point entry)) + (bootloader (bootloader-configuration-bootloader config)) + (grub (bootloader-package bootloader)) + (locale-dir (normalize-file (grub-locale-folder grub) + mount-point + store-directory-prefix))) + + #~(let ((locale #$(and locale + (locale-definition-source + (locale-name->definition locale)))) + (locale-dir #$(and locale locale-dir))) + (when locale + (format port "\ # Localization configuration. -if search --file --set boot_partition /grub/grub.cfg; then - set locale_dir=(${boot_partition})/grub/locale -else - set locale_dir=/boot/grub/locale -fi -set lang=~a~%" locale)))) +~asearch --file --set ~a/en@quot.mo +set locale_dir=~a +set lang=~a~%" + ;; Skip the search if there is an image, because it is + ;; loaded before this fragment, to avoid the extra search. + #$(if (grub-theme-image (bootloader-theme config)) + "# " + "") + locale-dir + locale-dir + locale))))) (define keyboard-layout-config (let* ((layout (bootloader-configuration-keyboard-layout config)) -- 2.28.0 --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Sat Oct 31 17:39:50 2020 Received: (at 44196) by debbugs.gnu.org; 31 Oct 2020 21:39:50 +0000 Received: from localhost ([127.0.0.1]:34704 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kYybG-0005LO-HO for submit@debbugs.gnu.org; Sat, 31 Oct 2020 17:39:50 -0400 Received: from eggs.gnu.org ([209.51.188.92]:39776) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kYybE-0005LC-De for 44196@debbugs.gnu.org; Sat, 31 Oct 2020 17:39:49 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:43933) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kYyb9-0007pP-24; Sat, 31 Oct 2020 17:39:43 -0400 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=46208 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1kYyb8-0006z7-1Y; Sat, 31 Oct 2020 17:39:42 -0400 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Miguel =?utf-8?Q?=C3=81ngel?= Arruga Vivas Subject: Re: bug#44196: [PATCH 2/3] system: Add store-directory-prefix to boot-parameters. References: <878sbvh5j4.fsf@gmail.com> <87y2jvfqon.fsf@gmail.com> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 10 Brumaire an 229 de la =?utf-8?Q?R=C3=A9volution?= X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Sat, 31 Oct 2020 22:39:40 +0100 In-Reply-To: <87y2jvfqon.fsf@gmail.com> ("Miguel =?utf-8?Q?=C3=81ngel?= Arruga Vivas"'s message of "Sat, 24 Oct 2020 20:02:16 +0200") Message-ID: <87blgit6qr.fsf@gnu.org> 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: -2.3 (--) X-Debbugs-Envelope-To: 44196 Cc: 44196@debbugs.gnu.org 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: -3.3 (---) Hi! Miguel =C3=81ngel Arruga Vivas skribis: > From 527a9271122f7b83f31dc0b910c6704af81bde66 Mon Sep 17 00:00:00 2001 > From: =3D?UTF-8?q?Miguel=3D20=3DC3=3D81ngel=3D20Arruga=3D20Vivas?=3D > > Date: Sat, 24 Oct 2020 18:15:53 +0200 > Subject: [PATCH 2/2] system: Add store-directory-prefix to boot-parameter= s. > > * gnu/machine/ssh.scm (roll-back-managed-host): Use > boot-parameters-store-directory-prefix. > * gnu/system.scm (define-module): Export > boot-parameters-store-directory-prefix. > ()[store-directory-prefix]: New field. > [boot-parameters-store-directory-prefix]: New accessor. > (read-boot-parameters): Read directory-prefix from store field. > (operating-system-boot-parameters-file): Add directory-prefix to > store field. > * guix/scripts/system.scm (reinstall-bootloader): Use > boot-parameters-store-directory-prefix. > * test/boot-parameters.scm (%default-btrfs-subvolume, > %default-store-directory-prefix): New variables. > (%grub-boot-parameters): Use %default-store-directory-prefix. > (%default-operating-system): Use %default-btrfs-subvolume. > (test-boot-parameters): Add directory-prefix. > (test optional fields): Add test for directory-prefix. > (test os store-directory-prefix): New test. [...] > +++ b/gnu/system.scm > @@ -148,6 +148,7 @@ > boot-parameters-bootloader-name > boot-parameters-bootloader-menu-entries > boot-parameters-store-device > + boot-parameters-store-directory-prefix > boot-parameters-store-mount-point > boot-parameters-locale > boot-parameters-kernel > @@ -299,6 +300,7 @@ directly by the user." > boot-parameters-bootloader-menu-entries) > (store-device boot-parameters-store-device) > (store-mount-point boot-parameters-store-mount-point) > + (store-directory-prefix boot-parameters-store-directory-prefix) Could you explain why we need =E2=80=98store-directory-prefix=E2=80=99 in a= ddition to =E2=80=98store-mount-point=E2=80=99? At first sight, looking at the fields= in there, these two can seem to be synonymous. Also patch #3 doesn=E2=80=99t depend on it, does it? Thanks, Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Sat Oct 31 17:45:05 2020 Received: (at 44196) by debbugs.gnu.org; 31 Oct 2020 21:45:05 +0000 Received: from localhost ([127.0.0.1]:34744 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kYygK-0005Va-Qd for submit@debbugs.gnu.org; Sat, 31 Oct 2020 17:45:05 -0400 Received: from eggs.gnu.org ([209.51.188.92]:41496) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kYygJ-0005Ul-6A for 44196@debbugs.gnu.org; Sat, 31 Oct 2020 17:45:03 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:44034) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kYygD-0000J4-S3; Sat, 31 Oct 2020 17:44:57 -0400 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=46210 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1kYygA-0007aT-Jf; Sat, 31 Oct 2020 17:44:57 -0400 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Miguel =?utf-8?Q?=C3=81ngel?= Arruga Vivas Subject: Re: bug#44196: [PATCH v6 3/4] system: Do not depend on locale folder generated by References: <878sbvh5j4.fsf@gmail.com> <87tuujfhum.fsf@gmail.com> <87imay7hax.fsf_-_@gmail.com> <87y2jsod97.fsf_-_@gmail.com> <87v9eum3w2.fsf_-_@gmail.com> <87mu0360qt.fsf_-_@gmail.com> <87a6w35qx2.fsf_-_@gmail.com> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 10 Brumaire an 229 de la =?utf-8?Q?R=C3=A9volution?= X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Sat, 31 Oct 2020 22:44:53 +0100 In-Reply-To: <87a6w35qx2.fsf_-_@gmail.com> ("Miguel =?utf-8?Q?=C3=81ngel?= Arruga Vivas"'s message of "Fri, 30 Oct 2020 22:45:29 +0100") Message-ID: <875z6qt6i2.fsf@gnu.org> 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: -2.3 (--) X-Debbugs-Envelope-To: 44196 Cc: 44196@debbugs.gnu.org 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: -3.3 (---) =C2=A1Hola! Miguel =C3=81ngel Arruga Vivas skribis: > From 5886bdf74bda59649b3d17b691132d9d030e0fb4 Mon Sep 17 00:00:00 2001 > From: =3D?UTF-8?q?Miguel=3D20=3DC3=3D81ngel=3D20Arruga=3D20Vivas?=3D > > Date: Sat, 24 Oct 2020 20:36:21 +0200 > Subject: [PATCH] system: Do not depend on locale folder generated by > grub-install. > > * gnu/bootloader/grub.scm (define-module): Use (guix packages). > (grub-locale-folder): New computed folder. > (grub-configuration-file)[locale-config]: Use grub-locale-folder only whe= n a > locale is needed. [...] > +(define (grub-locale-folder grub) > + "Generate a folder with the locales from GRUB." s/folder/directory/ :-) > + (define builder > + #~(begin > + (use-modules (ice-9 ftw)) > + (let ((locale (string-append #$grub "/share/locale")) > + (out #$output)) > + (mkdir out) > + (chdir out) > + (for-each (lambda (lang) > + (let ((file (string-append locale "/" lang > + "/LC_MESSAGES/grub.mo")) > + (dest (string-append lang ".mo"))) > + (when (file-exists? file) > + (copy-file file dest)))) > + (scandir locale))))) > + (computed-file "grub-boot-locale" builder)) Maybe just =E2=80=9Cgrub-locales=E2=80=9D? > + (let* ((entry (first all-entries)) > + (device (menu-entry-device entry)) > + (mount-point (menu-entry-device-mount-point entry)) > + (bootloader (bootloader-configuration-bootloader config)) > + (grub (bootloader-package bootloader)) > + (locale-dir (normalize-file (grub-locale-folder grub) > + mount-point > + store-directory-prefix))) Nitpick: maybe s/locale-dir/locales/ > + #~(let ((locale #$(and locale > + (locale-definition-source > + (locale-name->definition locale)))) > + (locale-dir #$(and locale locale-dir))) > + (when locale > + (format port "\ > # Localization configuration. > -if search --file --set boot_partition /grub/grub.cfg; then > - set locale_dir=3D(${boot_partition})/grub/locale > -else > - set locale_dir=3D/boot/grub/locale > -fi > -set lang=3D~a~%" locale)))) > +~asearch --file --set ~a/en@quot.mo > +set locale_dir=3D~a > +set lang=3D~a~%" Otherwise LGTM, thanks! Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Sat Oct 31 19:02:28 2020 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: =?utf-8?Q?Miguel_=C3=81ngel_Arruga_Vivas?= To: Ludovic =?utf-8?Q?Court=C3=A8s?= Subject: Re: bug#44196: [PATCH 2/3] system: Add store-directory-prefix to boot-parameters. 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=22'?= =?utf-8?Q?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-Debbugs-Envelope-To: 44196 Cc: 44196@debbugs.gnu.org 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: -0.8 (/) 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 From debbugs-submit-bounces@debbugs.gnu.org Sat Oct 31 20:01:39 2020 Received: (at 44196) by debbugs.gnu.org; 1 Nov 2020 00:01:39 +0000 Received: from localhost ([127.0.0.1]:34915 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kZ0oU-0004qX-Tq for submit@debbugs.gnu.org; Sat, 31 Oct 2020 20:01:39 -0400 Received: from mail-wr1-f51.google.com ([209.85.221.51]:38873) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kZ0oQ-0004qD-Er for 44196@debbugs.gnu.org; Sat, 31 Oct 2020 20:01:36 -0400 Received: by mail-wr1-f51.google.com with SMTP id n18so10414426wrs.5 for <44196@debbugs.gnu.org>; Sat, 31 Oct 2020 17:01:34 -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=HdEN/GS+mMyzY3qGbeBfHG9IcIazmEyHpdwQUyZmHZI=; b=TXYItQoN++beOMP4fKwrzXVKoJRYxzQPlpSESJq5lEDQwko2pM1ljznwqBItRsZ19e xOTMHWlN3pUj26qx0swXHdsoanCAxq3VIu5uPcUqCd1j53j9mhSuS4351m0BwXPAw2x7 C19kpDLw9Vguo4rLVxmvINaxunoVhoAcQz0kEqRoW5q4ktDn0iw2mszsVIK5xnkjKqlO AissGKyRDEnZ8YgGka/ZhSNEWRtrOBbXqgvTTvCF8T84LEZHeP2TQRlcDofLZz0BO2Cs UZM6tK1PusU1EfPJv4WefR0PAJwayK0U5ffZamO3upr8mijoO2NdqsWwp4QY4JLEN72g 81ew== 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=HdEN/GS+mMyzY3qGbeBfHG9IcIazmEyHpdwQUyZmHZI=; b=hzNlvXqrOQO8iq57NZx0aj9YZmzA35PlnGHI4HoNz9yxVQ0PzMEo60+EzAIAArYCgz PR3jui4C2obj/6EGnA8xPxqbHAfCaOQzRpthrrYZOVonFfxTPOZ9WpHcStd815orzcuG hahyY7md0JBs4OxGFgQVCIBN3pKreasbX66WiNQ501EYi+xonM7OeH/0XcJCe31cGIap LUyJMkxl7ealomSG7szmy+SU4PimKL+9zHPQaOd0v12HLqFuoSSU3pKVfxRXO9yMB+yH ZaGhbfynz8ymHp2ESfpVlZLmFeWUyMX8Gk7OwbsWt23XhySjhVoT9OTlyiRG4Zs4g6nT meEg== X-Gm-Message-State: AOAM531m/Fu7JVlbuJKV7U/tlVFYqle+vH8D6hcpwkiNxsRMtxuIYYlf BprEzCyY1LtcsrM63yiU3xNBXC8gjAri9w== X-Google-Smtp-Source: ABdhPJyeh2oMC2ddw2a24zVUDpDuNbV4I2yMXUPLkDg5rLr/KO5tHxEDyHPmbKUByp9fTrJ5LcDL6A== X-Received: by 2002:adf:9502:: with SMTP id 2mr9725613wrs.5.1604188888128; Sat, 31 Oct 2020 17:01:28 -0700 (PDT) Received: from unfall (218.139.134.37.dynamic.jazztel.es. [37.134.139.218]) by smtp.gmail.com with ESMTPSA id h8sm14149490wro.14.2020.10.31.17.01.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 31 Oct 2020 17:01:26 -0700 (PDT) From: =?utf-8?Q?Miguel_=C3=81ngel_Arruga_Vivas?= To: Ludovic =?utf-8?Q?Court=C3=A8s?= Subject: Re: bug#44196: [PATCH 2/3] system: Add store-directory-prefix to boot-parameters. References: <878sbvh5j4.fsf@gmail.com> <87y2jvfqon.fsf@gmail.com> <87blgit6qr.fsf@gnu.org> <87361u3sp5.fsf@gmail.com> Date: Sun, 01 Nov 2020 01:01:25 +0100 In-Reply-To: <87361u3sp5.fsf@gmail.com> ("Miguel =?utf-8?Q?=C3=81ngel?= Arruga Vivas"'s message of "Sun, 01 Nov 2020 00:02:14 +0100") Message-ID: <87y2jm2be2.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-Debbugs-Envelope-To: 44196 Cc: 44196@debbugs.gnu.org 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: -0.8 (/) Writing the last email I though about adding this: ---------------------------------------------------------------------------= --- ;; OS's root file system, so it might be a device path like "/dev/sda3". + ;; The 'store-directory-prefix' field contains #f or the actual path of + ;; the store inside the 'store-device' as seen by GRUB, e.g. it would + ;; contain "/storefs" if the store is located in that subvolume of a btr= fs + ;; partition. (root-device boot-parameters-root-device) (bootloader-name boot-parameters-bootloader-name) (bootloader-menu-entries ;list of boot-parameters-bootloader-menu-entries) (store-device boot-parameters-store-device) (store-mount-point boot-parameters-store-mount-point) + (store-directory-prefix boot-parameters-store-directory-prefix) ---------------------------------------------------------------------------= --- WDYT? Happy hacking! Miguel Miguel =C3=81ngel Arruga Vivas writes: > 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 i= n addition to >> =E2=80=98store-mount-point=E2=80=99? At first sight, looking at the fie= lds 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 From debbugs-submit-bounces@debbugs.gnu.org Sat Oct 31 20:36:48 2020 Received: (at 44196) by debbugs.gnu.org; 1 Nov 2020 00:36:48 +0000 Received: from localhost ([127.0.0.1]:34966 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kZ1MW-0005ke-4i for submit@debbugs.gnu.org; Sat, 31 Oct 2020 20:36:48 -0400 Received: from mail-wr1-f45.google.com ([209.85.221.45]:36120) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kZ1MU-0005kQ-7g for 44196@debbugs.gnu.org; Sat, 31 Oct 2020 20:36:47 -0400 Received: by mail-wr1-f45.google.com with SMTP id x7so10461472wrl.3 for <44196@debbugs.gnu.org>; Sat, 31 Oct 2020 17:36:46 -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=NXxWmgX2tWGajwnVBFEW/8PXzE0BbfHPtmUw28R7QZo=; b=avtI0TJMSdQhCC9AcvPhjnHQ0KVafJsIwb65e51mhZKR3Gs3aHT7+Y5xdfOTv/ik/b qVpuQGVqWhTJFcW5LN+hj562QfdLphdsuVzLiJ594V3rOvoiJb+98bq8iLqHpfsVlwLc R9EVXJO2+ry1fULy4iw5NEYg9EWfw2//QimojcCz0+fa7IeUI2qvXKrNbPB50k8tSHoM Gl6w3G2wUvf3bfKIN+0oqSp4g9Zpu8AkbivsCXUQw8UxCunViwzdjHYbctW3sM5IMdI9 g7eVuqG50Wo45ldDzdVjq6P56oeqF+/cNEDjzgohpH94+H61iuMbHTQte6FvcBH62y7P mj0Q== 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=NXxWmgX2tWGajwnVBFEW/8PXzE0BbfHPtmUw28R7QZo=; b=TwIW6mQW8dP1r9XBi36ifnqetP6AoiDDOu9DeffBlBIGN54nZCaHQj6z8kNP5/iqI0 dDsYlHbtUBaTPNRRTVqDfiDi3PrDrkwy2wuf3QG8afLFrDHUTk0PfuCeXXJ5AmXWmnTR j6h7UvG9Ipn73eSwTEW+C0/Q7DeympS2FLq4lAoh0HKyqvQk9ErhkSY2aUWpfLhvZ6ui Sy8pF6ysvgoQ5rlumIVo75xePbQ5SJxGgaUoxUgLgG4IJExpGGwRxVdhMkZ8bg7S4etg DhJ1bAS3SFAndde4T54DbTVrxgffyAHcsxMWBSd1tqqAKkhLhq6IiYCVtnyp8I9WLE34 TPIQ== X-Gm-Message-State: AOAM530pgBZ6J+seXHCd7Y/hPDbTIouAUCrjgu6V+goox6G2Nw4YxvUM QE6lv519Y4Wb79s521415Yp98M4QOPHURA== X-Google-Smtp-Source: ABdhPJzKhEPp2TCHIY08onU4ChNeMivEOCujqBAchKYUSsWMgoTXkt7/0xUE6gM0py+b2PxUikhi6A== X-Received: by 2002:adf:e490:: with SMTP id i16mr12471545wrm.178.1604190999970; Sat, 31 Oct 2020 17:36:39 -0700 (PDT) Received: from unfall (218.139.134.37.dynamic.jazztel.es. [37.134.139.218]) by smtp.gmail.com with ESMTPSA id b7sm15561535wrp.16.2020.10.31.17.36.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 31 Oct 2020 17:36:39 -0700 (PDT) From: =?utf-8?Q?Miguel_=C3=81ngel_Arruga_Vivas?= To: Ludovic =?utf-8?Q?Court=C3=A8s?= Subject: Re: bug#44196: [PATCH v6 3/4] system: Do not depend on locale folder generated by References: <878sbvh5j4.fsf@gmail.com> <87tuujfhum.fsf@gmail.com> <87imay7hax.fsf_-_@gmail.com> <87y2jsod97.fsf_-_@gmail.com> <87v9eum3w2.fsf_-_@gmail.com> <87mu0360qt.fsf_-_@gmail.com> <87a6w35qx2.fsf_-_@gmail.com> <875z6qt6i2.fsf@gnu.org> Date: Sun, 01 Nov 2020 01:36:38 +0100 In-Reply-To: <875z6qt6i2.fsf@gnu.org> ("Ludovic =?utf-8?Q?Court=C3=A8s=22'?= =?utf-8?Q?s?= message of "Sat, 31 Oct 2020 22:44:53 +0100") Message-ID: <87tuu93obt.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-Debbugs-Envelope-To: 44196 Cc: 44196@debbugs.gnu.org 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: -0.8 (/) =C2=A1Hola, Ludo! Thanks for your comments. Reviewing them I found some more issues that I address inline: Ludovic Court=C3=A8s writes: > Miguel =C3=81ngel Arruga Vivas skribis: > >> From 5886bdf74bda59649b3d17b691132d9d030e0fb4 Mon Sep 17 00:00:00 2001 >> From: =3D?UTF-8?q?Miguel=3D20=3DC3=3D81ngel=3D20Arruga=3D20Vivas?=3D >> >> Date: Sat, 24 Oct 2020 20:36:21 +0200 >> Subject: [PATCH] system: Do not depend on locale folder generated by >> grub-install. I've changed the title to "system: Generate grub locale directory for grub.cfg.", which is positive, shorter and more descriptive. I have to work on my communicative skills a lot... >> >> * gnu/bootloader/grub.scm (define-module): Use (guix packages). This was a leftover from the modification of Grub itself instead of using computed-file and not needed anymore, removed. >> (grub-locale-folder): New computed folder. >> (grub-configuration-file)[locale-config]: Use grub-locale-folder only wh= en a >> locale is needed. Changed with the new names and added an explanation about the search. > > [...] > >> +(define (grub-locale-folder grub) >> + "Generate a folder with the locales from GRUB." > > s/folder/directory/ :-) Applied, both in the function name and the documentation string. >> + (define builder >> + #~(begin >> + (use-modules (ice-9 ftw)) >> + (let ((locale (string-append #$grub "/share/locale")) >> + (out #$output)) >> + (mkdir out) >> + (chdir out) >> + (for-each (lambda (lang) >> + (let ((file (string-append locale "/" lang >> + "/LC_MESSAGES/grub.mo"= )) >> + (dest (string-append lang ".mo"))) >> + (when (file-exists? file) >> + (copy-file file dest)))) >> + (scandir locale))))) >> + (computed-file "grub-boot-locale" builder)) > > Maybe just =E2=80=9Cgrub-locales=E2=80=9D? This name sounds right, applied too. :-) >> + (let* ((entry (first all-entries)) >> + (device (menu-entry-device entry)) >> + (mount-point (menu-entry-device-mount-point entry)) >> + (bootloader (bootloader-configuration-bootloader config)) >> + (grub (bootloader-package bootloader)) >> + (locale-dir (normalize-file (grub-locale-folder grub) >> + mount-point >> + store-directory-prefix))) > > Nitpick: maybe s/locale-dir/locales/ Applied too, but I moved this call from the let* to ... >> + #~(let ((locale #$(and locale >> + (locale-definition-source >> + (locale-name->definition locale)))) >> + (locale-dir #$(and locale locale-dir))) ... here, to avoid the generation when there is no locale, which shouldn't be a common use case, but it shouldn't depend on the generation of that directory because it won't be used. >> + (when locale >> + (format port "\ >> # Localization configuration. >> -if search --file --set boot_partition /grub/grub.cfg; then >> - set locale_dir=3D(${boot_partition})/grub/locale >> -else >> - set locale_dir=3D/boot/grub/locale >> -fi >> -set lang=3D~a~%" locale)))) >> +~asearch --file --set ~a/en@quot.mo >> +set locale_dir=3D~a >> +set lang=3D~a~%" > > Otherwise LGTM, thanks! Thank you again for the review. Pushed as f445bc65764ffad2ae9f3b382ddb8feb4eeea2fb with these fixes, after running again make check and a subset of make check-system. Happy hacking! Miguel From debbugs-submit-bounces@debbugs.gnu.org Sat Oct 31 21:44:22 2020 Received: (at 44196-done) by debbugs.gnu.org; 1 Nov 2020 01:44:22 +0000 Received: from localhost ([127.0.0.1]:34991 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kZ2Pu-0007Pk-CG for submit@debbugs.gnu.org; Sat, 31 Oct 2020 21:44:22 -0400 Received: from mail-wm1-f45.google.com ([209.85.128.45]:36166) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kZ2Ps-0007PW-LG for 44196-done@debbugs.gnu.org; Sat, 31 Oct 2020 21:44:21 -0400 Received: by mail-wm1-f45.google.com with SMTP id e2so6189199wme.1 for <44196-done@debbugs.gnu.org>; Sat, 31 Oct 2020 18:44:20 -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; bh=MxFirRUL91LQg1qMoTx9/60YNa0dq4dg5vJeDVWfJiA=; b=nioj5Z0HtzBnT6G/B2nLKQr7FFrllk6YTWR479Ubh0ctAznhgJo5kUXoiiMK5cJgum OOCl32CDEB9/IM4DDTZYo6J2OFuE9kye5QbcLCKzICPWqG1aOc9y0rkVtcJLK9P8uGGh 3tdJJkQxn7uXKMymh7PLUO/89OrOSye3sezMpNORJi/Ym/POee5j2x2pvo993KYEEBFD H6FKK3u0v4SXIeyvncTV1XwJuc3u7Hz3v4qqVIaOC8EOfT+70WRAhHJKvJiVjqkYO/nk iBFVk2nGtn5sLyiMHyETTi/IMF6wFsRp9dz8+cUzTIkWRwqRfLxIElv3fyl9+szhefol JyPQ== 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; bh=MxFirRUL91LQg1qMoTx9/60YNa0dq4dg5vJeDVWfJiA=; b=mRIjidKwoL4QsP6vSoqw7OFW6HPLSjeGlUm3qMDr6Zl7ASLF/9fPaqL7BEXCahPBe0 f1s6Mz+YfjeY0lgIgr341Yfqpu7TQTsFpMoI1iTJHB0QVAjUwssANv+MwITgL17NEcb7 SMoj1KOli0ReTS6Q9wUsXGCGmGDf+eWNpcq0hpYlkwkGoE7f8sHS+47RwJiO6QxszYBc wg2+5fzdUnaTEVLz1r+w6mdZhHFsnC+aq3+P1fjnBEmNTd9sKCDArvmmQ8Uyd4p/7bAv MKdty6cY+sMTAmHpO7KDp/E/xKmNKbnBlspE5tKTk3O9mRD9ZqdgCxRiEMS1DEqMp6mO XJHA== X-Gm-Message-State: AOAM530rhEByVRxkfkKe/NgdXz9OEsOJmOoNpiHtnnyB9GiFRHtplHS+ 1NX86IIkf1hPrMExWh7VTBGfU81Ks4Or4g== X-Google-Smtp-Source: ABdhPJzh8Bl5UMoYHTRV1gjLR7bFveLf7MsZK3+EB9lNicN79QrqYDRxxRTFlm/lYO9ux8Nzu2ZJVQ== X-Received: by 2002:a1c:b783:: with SMTP id h125mr10076528wmf.108.1604195054589; Sat, 31 Oct 2020 18:44:14 -0700 (PDT) Received: from unfall (218.139.134.37.dynamic.jazztel.es. [37.134.139.218]) by smtp.gmail.com with ESMTPSA id v9sm3092443wrp.11.2020.10.31.18.44.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 31 Oct 2020 18:44:13 -0700 (PDT) From: =?utf-8?Q?Miguel_=C3=81ngel_Arruga_Vivas?= To: Ludovic =?utf-8?Q?Court=C3=A8s?= Subject: Re: bug#44196: [PATCH 2/3] system: Add store-directory-prefix to boot-parameters. References: <878sbvh5j4.fsf@gmail.com> <87y2jvfqon.fsf@gmail.com> <87blgit6qr.fsf@gnu.org> <87361u3sp5.fsf@gmail.com> <87y2jm2be2.fsf@gmail.com> Date: Sun, 01 Nov 2020 02:44:12 +0100 In-Reply-To: <87y2jm2be2.fsf@gmail.com> ("Miguel =?utf-8?Q?=C3=81ngel?= Arruga Vivas"'s message of "Sun, 01 Nov 2020 01:01:25 +0100") Message-ID: <87imap3l77.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.2 (/) X-Debbugs-Envelope-To: 44196-done Cc: 44196-done@debbugs.gnu.org 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: -0.8 (/) I've pushed this last patch as 582cf9257cd1f9c969fbba5eb1c336ac8b975cde with the following additions: - A pointer to this issue in the commit message. - A description of store-directory-prefix on the commit message. - A better version (I hope) of the comment inside . Thank you very much! Miguel From debbugs-submit-bounces@debbugs.gnu.org Mon Nov 02 11:06:54 2020 Received: (at 44196) by debbugs.gnu.org; 2 Nov 2020 16:06:54 +0000 Received: from localhost ([127.0.0.1]:42302 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kZcMA-0008GG-Df for submit@debbugs.gnu.org; Mon, 02 Nov 2020 11:06:54 -0500 Received: from eggs.gnu.org ([209.51.188.92]:37108) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kZcM9-0008G4-0V for 44196@debbugs.gnu.org; Mon, 02 Nov 2020 11:06:53 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]:49097) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kZcM3-0005mp-R9; Mon, 02 Nov 2020 11:06:47 -0500 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=52164 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1kZcM3-0000S4-EO; Mon, 02 Nov 2020 11:06:47 -0500 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Miguel =?utf-8?Q?=C3=81ngel?= Arruga Vivas Subject: Re: bug#44196: [PATCH 2/3] system: Add store-directory-prefix to boot-parameters. References: <878sbvh5j4.fsf@gmail.com> <87y2jvfqon.fsf@gmail.com> <87blgit6qr.fsf@gnu.org> <87361u3sp5.fsf@gmail.com> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 12 Brumaire an 229 de la =?utf-8?Q?R=C3=A9volution?= X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Mon, 02 Nov 2020 17:06:45 +0100 In-Reply-To: <87361u3sp5.fsf@gmail.com> ("Miguel =?utf-8?Q?=C3=81ngel?= Arruga Vivas"'s message of "Sun, 01 Nov 2020 00:02:14 +0100") Message-ID: <87y2jjivze.fsf@gnu.org> 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: -2.3 (--) X-Debbugs-Envelope-To: 44196 Cc: 44196@debbugs.gnu.org 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: -3.3 (---) Hi! Miguel =C3=81ngel Arruga Vivas skribis: > Ludovic Court=C3=A8s writes: >> Could you explain why we need =E2=80=98store-directory-prefix=E2=80=99 i= n addition to >> =E2=80=98store-mount-point=E2=80=99? At first sight, looking at the fie= lds 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")) > ...) > ----- (Btrfs no0b here.) Does that mean that /gnu is like a bind-mount of /gnufs in this case? Anyway, I think I got it now, but I feel I=E2=80=99ll have to search again = for this example next time I stumble upon it. ;-) > Writing the last email I though about adding this: > -------------------------------------------------------------------------= ----- > ;; OS's root file system, so it might be a device path like "/dev/sda3= ". > + ;; The 'store-directory-prefix' field contains #f or the actual path of > + ;; the store inside the 'store-device' as seen by GRUB, e.g. it would > + ;; contain "/storefs" if the store is located in that subvolume of a b= trfs > + ;; partition. > (root-device boot-parameters-root-device) > (bootloader-name boot-parameters-bootloader-name) > (bootloader-menu-entries ;list of > boot-parameters-bootloader-menu-entries) > (store-device boot-parameters-store-device) > (store-mount-point boot-parameters-store-mount-point) > + (store-directory-prefix boot-parameters-store-directory-prefix) > -------------------------------------------------------------------------= ----- s/path/file name/, but otherwise LGTM. Thanks for working on these changes! Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Mon Nov 02 13:52:28 2020 Received: (at 44196) by debbugs.gnu.org; 2 Nov 2020 18:52:28 +0000 Received: from localhost ([127.0.0.1]:42604 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kZewO-00046W-5y for submit@debbugs.gnu.org; Mon, 02 Nov 2020 13:52:28 -0500 Received: from mail-wr1-f47.google.com ([209.85.221.47]:45630) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kZewM-00046F-Sl for 44196@debbugs.gnu.org; Mon, 02 Nov 2020 13:52:27 -0500 Received: by mail-wr1-f47.google.com with SMTP id a9so15803883wrg.12 for <44196@debbugs.gnu.org>; Mon, 02 Nov 2020 10:52:26 -0800 (PST) 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=sT390ThC7GN7qWM4JsY7jv1WQczZnRxCOI8hsCc9J3E=; b=m9xtoWkMwTCGgO4w45KJo4NpFqW/3YS0wUrBs3ekIUVuUlhJl1HlSJ+kx7RE1E35B6 qwCV5Si+L3qON+Y9bgR/vOzRkvF0+Y3d5hxJiOeHwZmWJZbKkQQbcN+bxKypWuHikDz9 hYU81Gao/pZTn4GQRSxW1g2NDR0lECl8NSCh7KPSFOAqpztP24FIIRVsWrPsDmKwAe7i SV8ALrhQ+nB6C/6t5AYGk2/cP17ddu2Oe6RvxgrZeUpaaKGPqp+YcXgTlBCCBtPa4Lfh AE5ggdokIMWlGoV3oZEgc+63i1eeNZpxk9Q5XpGFUdxW2UxLb5YC6iN2MCfcMHfJYk6X b65g== 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=sT390ThC7GN7qWM4JsY7jv1WQczZnRxCOI8hsCc9J3E=; b=VgsyxzVRnVo3iuds/cxn+HZbAv69PDN1ugPKlL0tjG3WiTczZNJ7Vy5Ca1ffZGfP1a Wkt6EwxhpKDJU+feKRuUhtc7SQ2nNkCu2J59u0lnU9PecHKNnmU0WfstOwEvqS2ngplL y/F/4uUMcJ0FzUkMRDJaMhMLNB10vtBXTC3JVYSa+Mwa9lxpgpNCYp8XOcCbzEfuPigq CYGGX1tKPgxPkTY5mvDjF4+ho3ywfrWzx/MJMdBvXVXtUXuo2mLDAvnj2oYffMO9pb3F oS40n94EISMbYRbbCqI+WsaR0lS71AnDpIu2SMj8kg9idJ2l1fgjYjmAqAoQwlcUOF4I 70PA== X-Gm-Message-State: AOAM532Tu6+3f5fRo3yDF6oqN5ggSzgIfPSPM+Dk/+yuWWiSLLnyEbPk 0U9jFVeKYNKlso110ZzF2HxGA7zwh+HRkYxo X-Google-Smtp-Source: ABdhPJxy6H/PLQWwOl/jT98FhGUXl/s/CeWNz1blh4v+VVZbubEdETYgl/xaTfDG628x10OPWfij9Q== X-Received: by 2002:a05:6000:1188:: with SMTP id g8mr21139155wrx.422.1604343140510; Mon, 02 Nov 2020 10:52:20 -0800 (PST) Received: from unfall (218.139.134.37.dynamic.jazztel.es. [37.134.139.218]) by smtp.gmail.com with ESMTPSA id t6sm19435088wrp.68.2020.11.02.10.52.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 02 Nov 2020 10:52:19 -0800 (PST) From: =?utf-8?Q?Miguel_=C3=81ngel_Arruga_Vivas?= To: Ludovic =?utf-8?Q?Court=C3=A8s?= Subject: Re: bug#44196: [PATCH 2/3] system: Add store-directory-prefix to boot-parameters. References: <878sbvh5j4.fsf@gmail.com> <87y2jvfqon.fsf@gmail.com> <87blgit6qr.fsf@gnu.org> <87361u3sp5.fsf@gmail.com> <87y2jjivze.fsf@gnu.org> Date: Mon, 02 Nov 2020 19:52:18 +0100 In-Reply-To: <87y2jjivze.fsf@gnu.org> ("Ludovic =?utf-8?Q?Court=C3=A8s=22'?= =?utf-8?Q?s?= message of "Mon, 02 Nov 2020 17:06:45 +0100") Message-ID: <87y2jj1ti5.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-Debbugs-Envelope-To: 44196 Cc: 44196@debbugs.gnu.org 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: -0.8 (/) Hello, Ludovic Court=C3=A8s writes: > (Btrfs no0b here.) Does that mean that /gnu is like a bind-mount of > /gnufs in this case? Yes, it's exactly like that for the end user, but that use case isn't implemented yet---it should be useful too for the Hurd and translators---so I have it under my radar. > Anyway, I think I got it now, but I feel I=E2=80=99ll have to search agai= n for > this example next time I stumble upon it. ;-) I also linked this report on the commit message, as it's a non-trivial use case and everybody could need as much info as possible if an error hits---fingers crossed. >> Writing the last email I though about adding this: >> ------------------------------------------------------------------------= ------ >> ;; OS's root file system, so it might be a device path like "/dev/sda= 3". >> + ;; The 'store-directory-prefix' field contains #f or the actual path = of >> + ;; the store inside the 'store-device' as seen by GRUB, e.g. it would >> + ;; contain "/storefs" if the store is located in that subvolume of a = btrfs >> + ;; partition. >> (root-device boot-parameters-root-device) >> (bootloader-name boot-parameters-bootloader-name) >> (bootloader-menu-entries ;list of >> boot-parameters-bootloader-menu-entries) >> (store-device boot-parameters-store-device) >> (store-mount-point boot-parameters-store-mount-point) >> + (store-directory-prefix boot-parameters-store-directory-prefix) >> ------------------------------------------------------------------------= ------ > > s/path/file name/, but otherwise LGTM. I've pushed this change as 2df44e934c9ba14a89d9245d1a4f7cf18e8cfdaa with changes on the rest of the comment as well, as the wording was the same, as I agree that path should refer to a route (where there could be several concrete locations/file names in unix dialect), and file name should be the correct term. > Thanks for working on these changes! Thanks to you for the review, for me this is useful in my daily life (as now I can manage btrfs better too, hehe) and much fun! :-) Happy hacking! Miguel From debbugs-submit-bounces@debbugs.gnu.org Tue Nov 03 04:26:55 2020 Received: (at 44196) by debbugs.gnu.org; 3 Nov 2020 09:26:55 +0000 Received: from localhost ([127.0.0.1]:43420 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kZsad-0008U3-7N for submit@debbugs.gnu.org; Tue, 03 Nov 2020 04:26:55 -0500 Received: from eggs.gnu.org ([209.51.188.92]:33526) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kZsab-0008Tq-Hy for 44196@debbugs.gnu.org; Tue, 03 Nov 2020 04:26:53 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]:40361) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kZsaW-0004yF-56; Tue, 03 Nov 2020 04:26:48 -0500 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=57986 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1kZsaV-0003Bd-7z; Tue, 03 Nov 2020 04:26:47 -0500 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Miguel =?utf-8?Q?=C3=81ngel?= Arruga Vivas Subject: Re: bug#44196: [PATCH 2/3] system: Add store-directory-prefix to boot-parameters. References: <878sbvh5j4.fsf@gmail.com> <87y2jvfqon.fsf@gmail.com> <87blgit6qr.fsf@gnu.org> <87361u3sp5.fsf@gmail.com> <87y2jjivze.fsf@gnu.org> <87y2jj1ti5.fsf@gmail.com> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 13 Brumaire an 229 de la =?utf-8?Q?R=C3=A9volution?= X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Tue, 03 Nov 2020 10:26:46 +0100 In-Reply-To: <87y2jj1ti5.fsf@gmail.com> ("Miguel =?utf-8?Q?=C3=81ngel?= Arruga Vivas"'s message of "Mon, 02 Nov 2020 19:52:18 +0100") Message-ID: <874km6hju1.fsf@gnu.org> 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: -2.3 (--) X-Debbugs-Envelope-To: 44196 Cc: 44196@debbugs.gnu.org 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: -3.3 (---) Hi, Miguel =C3=81ngel Arruga Vivas skribis: > I've pushed this change as 2df44e934c9ba14a89d9245d1a4f7cf18e8cfdaa with > changes on the rest of the comment as well, as the wording was the same, > as I agree that path should refer to a route (where there could be > several concrete locations/file names in unix dialect), and file name > should be the correct term. Thanks! Regarding =E2=80=9Cfile name=E2=80=9D, it=E2=80=99s terminology th= at=E2=80=99s part of the GNU Coding Standards and I think it=E2=80=99s nice to be consistent throughout = the project. Ludo=E2=80=99. From unknown Sun Aug 17 10:16:56 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Tue, 01 Dec 2020 12:24:12 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator