From unknown Fri Jun 20 07:19:54 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#26339 <26339@debbugs.gnu.org> To: bug#26339 <26339@debbugs.gnu.org> Subject: Status: [PATCH 00/18] wip: Support non grub bootloaders. Reply-To: bug#26339 <26339@debbugs.gnu.org> Date: Fri, 20 Jun 2025 14:19:54 +0000 retitle 26339 [PATCH 00/18] wip: Support non grub bootloaders. reassign 26339 guix-patches submitter 26339 Mathieu Othacehe severity 26339 important tag 26339 patch thanks From debbugs-submit-bounces@debbugs.gnu.org Sun Apr 02 09:50:22 2017 Received: (at submit) by debbugs.gnu.org; 2 Apr 2017 13:50:22 +0000 Received: from localhost ([127.0.0.1]:56507 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cuftd-0000Rq-Uz for submit@debbugs.gnu.org; Sun, 02 Apr 2017 09:50:22 -0400 Received: from eggs.gnu.org ([208.118.235.92]:52596) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cuftY-0000Ra-Pu for submit@debbugs.gnu.org; Sun, 02 Apr 2017 09:50:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cuftS-0005mw-Sq for submit@debbugs.gnu.org; Sun, 02 Apr 2017 09:50:11 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM, T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:39161) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cuftS-0005mr-PW for submit@debbugs.gnu.org; Sun, 02 Apr 2017 09:50:10 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43567) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cuftR-0002CX-Jy for guix-patches@gnu.org; Sun, 02 Apr 2017 09:50:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cuftN-0005ho-Kx for guix-patches@gnu.org; Sun, 02 Apr 2017 09:50:09 -0400 Received: from mail-wr0-x229.google.com ([2a00:1450:400c:c0c::229]:33654) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cuftN-0005hf-Dk for guix-patches@gnu.org; Sun, 02 Apr 2017 09:50:05 -0400 Received: by mail-wr0-x229.google.com with SMTP id w43so135076293wrb.0 for ; Sun, 02 Apr 2017 06:50:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=nYK3Td97prdO4e8FVAGEWqlDsGEcF8iaS17acm5ZGrs=; b=i0cwpyHgiOr+YN157zvhjhERVhhKKfhhvH6ZPuuOfFtuKwqBGOkw1KW6kGGLgQpAxc GpYMPDojAjf6rT7Rt8Lg2Rin9sqjAzT/dlI+DBgrz+opYv8gP0VjJfquVHinjgEr/k0g NCDCE4AZS6EZOPDlMeFG9eaBdfB/cjYvm8fT29y6n86CSa3DQhFxArzd3Kxlq5xcWEKS yM4ONgNzicJgr6dLna7uYtGADpJfufDqF+g8A9skvm1dgC04zEn6rd8qW49VVE1JVyAi P8ohvh9qDm9n6evBNouOPSP32rRepcDK9sBIZiVDDFGLMThbytYRalZKUxdqab6fwUAH HyqA== 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:date:message-id; bh=nYK3Td97prdO4e8FVAGEWqlDsGEcF8iaS17acm5ZGrs=; b=cr2S53bgiXZdJRhFv4Mj42gBJ6wX0kBjzINEpdzYSz+bk3TRDKd2Y1c/uh7kKSmjlV nf7mLjh7kRj+NsZ9fRA40Lr4g1xz6bYwdTyyLsQYfh+PvYKg+IXyOA0vzkg9fFYYsPUD n+cLUIx6FpvNhtYlFyOkgwdA9kPme11Xf/z3kBlTEbpSSG3muffkLcTQzB+pT5ANxeA4 DlRZn6wd5A/KeOqZZ4cfMwXjENayeQWUd4MMdNaNkYyBO6XfmtAJECRmnFSuQtTEukWJ vgSMtQweRT+oO649bVajpsZTE9dT9rDPjlNGQsAHMNkzr+B7coT+AzrSKWhQNeIVSu58 NEHA== X-Gm-Message-State: AFeK/H2indIzLj3V8uew1iY1yG0lGp2B8eP/0+L44mbQKExCkLj+Cxu1Nau1NnRWvjKvXA== X-Received: by 10.223.134.152 with SMTP id 24mr1344473wrx.30.1491141002733; Sun, 02 Apr 2017 06:50:02 -0700 (PDT) Received: from cervin.8.8.8.8 (85-169-37-239.rev.numericable.fr. [85.169.37.239]) by smtp.gmail.com with ESMTPSA id t21sm10384686wmd.19.2017.04.02.06.50.01 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 02 Apr 2017 06:50:01 -0700 (PDT) From: Mathieu Othacehe To: guix-patches@gnu.org Subject: [PATCH 00/18] wip: Support non grub bootloaders. Date: Sun, 2 Apr 2017 15:49:16 +0200 Message-Id: <20170402134916.2871-1-m.othacehe@gmail.com> X-Mailer: git-send-email 2.12.2 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.0 (----) X-Debbugs-Envelope-To: submit Cc: Mathieu Othacehe 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: -4.0 (----) Hi, Here's a first draft of my work on bootloaders. Basically, I rebased David patches and started to work on top of it. I adapted system commands "init", "reconfigure" and "switch-generation" to the new bootloader API. All of this is functional with my basic configuration. Don't hesitate to test this out and comment ! I still have to update documentation. I also left untested UEFI related stuff. Thanks, Mathieu David Craven (4): system: Pass to grub. system: Add extlinux support. scripts: system: Rename --no-grub option to --no-bootloader. bootloader: Add install procedures and use them. Mathieu Othacehe (14): system: Rename operating-system-grub.cfg to operating-system-bootcfg. vm: Reword grub.cfg to boot.cfg system: Add bootloader type. bootloader: Stop using grub module. scripts: system: Move save-load-path-excursion and save-environment-excursion macros to the top. system: Rename kernel->grub-label to kernel->boot-label. bootloader: Add device and type to bootloader-configuration record. system: Rename grub-device to fs->boot-device. scripts: system: Remove unused variables. scripts: system: Rename grub? and install-grub? to bootloader? and install-bootloader?. scripts: system: Adapt "reconfigure" to new bootloader API. scripts: system: Adapt "init" to new bootloader API. scripts: system: Adapt "switch-generation" to new bootloader API. scripts: system: Display bootloader device and type in "list-generations". gnu.scm | 3 +- gnu/build/install.scm | 36 ++--- gnu/build/vm.scm | 22 +-- gnu/local.mk | 1 + gnu/system.scm | 72 +++++++--- gnu/system/bootloader.scm | 253 +++++++++++++++++++++++++++++++++ gnu/system/grub.scm | 41 ++++-- gnu/system/vm.scm | 52 ++++--- gnu/tests.scm | 3 +- gnu/tests/nfs.scm | 3 +- gnu/tests/web.scm | 2 +- guix/scripts/system.scm | 353 ++++++++++++++++++++++++++-------------------- tests/guix-system.sh | 2 - tests/system.scm | 2 - 14 files changed, 592 insertions(+), 253 deletions(-) create mode 100644 gnu/system/bootloader.scm -- 2.12.2 From debbugs-submit-bounces@debbugs.gnu.org Sun Apr 02 09:53:02 2017 Received: (at 26339) by debbugs.gnu.org; 2 Apr 2017 13:53:02 +0000 Received: from localhost ([127.0.0.1]:56513 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cufwE-0000WC-Eb for submit@debbugs.gnu.org; Sun, 02 Apr 2017 09:53:02 -0400 Received: from mail-wr0-f193.google.com ([209.85.128.193]:34289) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cufwB-0000Va-Gv for 26339@debbugs.gnu.org; Sun, 02 Apr 2017 09:53:00 -0400 Received: by mail-wr0-f193.google.com with SMTP id w43so26771092wrb.1 for <26339@debbugs.gnu.org>; Sun, 02 Apr 2017 06:52:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=HsQ7OL7C99hkqt4z6ry2jEmg/9FdvbxmK0r7QYy0OEo=; b=MaWLyNUoXZ96SHp4+PRgR3Uu+/YzMB+gBwfQIKXwn9sgcSqu6B4obDLa5FIyVbPr25 fxIl//Cj/yTlZsOBN0fGR+PHHuoRzcAqkR8CXnGaXxGZ4LJ/mmPD0qlj0/eCHjusTRNw Y6ZEFgZB3mXD9krqwOOZ1RqbjyyIJs23VZDM+ABW9fynacJADrK7kewYNeQ8jMxzt8V0 X8NYos6c/NzVyooQlgz/tUPQfwlRZncChqyMj8yrMHpctcZZebbxWpLPMDysbf4H+UAn p9THYjTkm/ihJyJITQKPtN02qI/SWvjm7dFUF2xRG7LvLqzTad6462sKHhDbabnj8Cok JJSA== 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:date:message-id; bh=HsQ7OL7C99hkqt4z6ry2jEmg/9FdvbxmK0r7QYy0OEo=; b=Zi1TuNz3s/1TQFKWl3wepZAXTFaf0ZZRlDcZWGEeoY71se+1tpx195ugzqi44nwLIK CCNpwYmcGLXcUYpZvUsi9rM6S5bKWqjvj+Mnz+Am9WEv4aPOfUpHSgR1eqVPEDgbqY9U 5B/pv6Fn/II4FWA+xi2320GGYNJPP+6l8y6rZemghmvVlsTOuCL/asQG0MrEQeFbUGB7 S7w5KwLL1ySpv0MwOGbyyEjzl45/s8GYSiOOak91Lu+3TL2SeHq/jguRWAtANVAXeccT pZZ7F3aJtefiWnxP05/84LYAACWoT2Nqg+uWFLV8mFVGf0aHYbuxmxirg5heJInZH3JM 8KzA== X-Gm-Message-State: AFeK/H2HehtANgblEDJPn71rINejWP95nU96VKf68XEpCMqvLKBabmP1 2VZKfc+QmDr9TqY0 X-Received: by 10.28.74.147 with SMTP id n19mr1652774wmi.86.1491141173560; Sun, 02 Apr 2017 06:52:53 -0700 (PDT) Received: from cervin.8.8.8.8 (85-169-37-239.rev.numericable.fr. [85.169.37.239]) by smtp.gmail.com with ESMTPSA id q4sm10337047wme.17.2017.04.02.06.52.52 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 02 Apr 2017 06:52:52 -0700 (PDT) From: Mathieu Othacehe To: 26339@debbugs.gnu.org Subject: [PATCH 01/18] system: Pass to grub. Date: Sun, 2 Apr 2017 15:52:25 +0200 Message-Id: <20170402135242.2958-1-m.othacehe@gmail.com> X-Mailer: git-send-email 2.12.2 X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 26339 Cc: David Craven 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.3 (--) From: David Craven * gnu/system.scm (operating-system-grub.cfg): Pass . * gnu/system/grub.scm (boot-parameters->menu-entry): New variable. (grub-configuration-file): Use boot-parameters->menu-entry. --- gnu/system.scm | 12 +++++++----- gnu/system/grub.scm | 19 +++++++++++++++---- 2 files changed, 22 insertions(+), 9 deletions(-) diff --git a/gnu/system.scm b/gnu/system.scm index 0f52351cf..d528c4a6a 100644 --- a/gnu/system.scm +++ b/gnu/system.scm @@ -99,6 +99,7 @@ system-linux-image-file-name + boot-parameters boot-parameters? boot-parameters-label @@ -741,16 +742,17 @@ listed in OS. The C library expects to find it under (root-device -> (if (eq? 'uuid (file-system-title root-fs)) (uuid->string (file-system-device root-fs)) (file-system-device root-fs))) - (entries -> (list (menu-entry + (entries -> (list (boot-parameters (label label) + (root-device root-device) ;; The device where the kernel and initrd live. - (device (grub-device store-fs)) - (device-mount-point + (store-device (grub-device store-fs)) + (store-mount-point (file-system-mount-point store-fs)) - (linux kernel) - (linux-arguments + (kernel kernel) + (kernel-arguments (cons* (string-append "--root=" root-device) #~(string-append "--system=" #$system) #~(string-append "--load=" #$system diff --git a/gnu/system/grub.scm b/gnu/system/grub.scm index 4f9bde6a6..f2838d633 100644 --- a/gnu/system/grub.scm +++ b/gnu/system/grub.scm @@ -26,6 +26,7 @@ #:use-module (guix gexp) #:use-module (guix download) #:use-module (gnu artwork) + #:use-module (gnu system) #:use-module (gnu system file-systems) #:autoload (gnu packages bootloaders) (grub) #:autoload (gnu packages compression) (gzip) @@ -266,6 +267,15 @@ code." (#f #~(format #f "search --file --set ~a" #$file))))) +(define (boot-parameters->menu-entry conf) + (menu-entry + (label (boot-parameters-label conf)) + (device (boot-parameters-store-device conf)) + (device-mount-point (boot-parameters-store-mount-point conf)) + (linux (boot-parameters-kernel conf)) + (linux-arguments (boot-parameters-kernel-arguments conf)) + (initrd (boot-parameters-initrd conf)))) + (define* (grub-configuration-file config entries #:key (system (%current-system)) @@ -275,7 +285,8 @@ code." object. OLD-ENTRIES is taken to be a list of menu entries corresponding to old generations of the system." (define all-entries - (append entries (grub-configuration-menu-entries config))) + (append (map boot-parameters->menu-entry entries) + (grub-configuration-menu-entries config))) (define entry->gexp (match-lambda @@ -298,9 +309,9 @@ corresponding to old generations of the system." #$initrd))))) (mlet %store-monad ((sugar (eye-candy config - (menu-entry-device (first entries)) + (menu-entry-device (first all-entries)) (menu-entry-device-mount-point - (first entries)) + (first all-entries)) #:system system #:port #~port))) (define builder @@ -321,7 +332,7 @@ set timeout=~a~%" #$@(if (pair? old-entries) #~((format port " submenu \"GNU system, old configurations...\" {~%") - #$@(map entry->gexp old-entries) + #$@(map entry->gexp (map boot-parameters->menu-entry old-entries)) (format port "}~%")) #~())))) -- 2.12.2 From debbugs-submit-bounces@debbugs.gnu.org Sun Apr 02 09:53:04 2017 Received: (at 26339) by debbugs.gnu.org; 2 Apr 2017 13:53:05 +0000 Received: from localhost ([127.0.0.1]:56517 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cufwG-0000WS-Ny for submit@debbugs.gnu.org; Sun, 02 Apr 2017 09:53:04 -0400 Received: from mail-wr0-f196.google.com ([209.85.128.196]:35005) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cufwE-0000Vf-Pe for 26339@debbugs.gnu.org; Sun, 02 Apr 2017 09:53:03 -0400 Received: by mail-wr0-f196.google.com with SMTP id p52so26845373wrc.2 for <26339@debbugs.gnu.org>; Sun, 02 Apr 2017 06:53:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=QlzyizfYMEGWEo4nrlA5P9WYyjABFM7/grEZy4LNqRc=; b=L6outZAaOgTscoNW6g4s5Fhdwr1kJ468i5+FEmKrouHHEKnoL2p8c1Zck3pD6RHaND Or+JwZOQkAAlSso2oKFVaf21ZjoC9RKJ0m0lz1erEXDUPonBtcIs4wUKfE2yJN0mF0bI rmDAunDbTq5A2nHYdhJ+k2VNqkLxInm2j9Tfjeg/Q0Mo+C+EQul+M6nlmoBsVY9WTUl5 18B6bj6Ix3P1chQjvpxYVW8qIxzQDa8v98AIw6HMNip69XglJh+IkcBrNiXYb/sVz6bN ZJRnSYDT71W36qZZaGjJeCLnPr4LTiPlz+Grrk9GAu5kX4sjP2zr73OXNBMl8WhUyVdw KYzw== 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:date:message-id:in-reply-to :references; bh=QlzyizfYMEGWEo4nrlA5P9WYyjABFM7/grEZy4LNqRc=; b=Cj2HAnsjF89H6WiGOgsftqYX69VfBo2yncHPBSiARuUH6nkuJZbWsud5YCpVnkYNqz SREK5QgSbtMj7UnKVDxSv89KrFQws6TuXIXLh++6QY/4mPSxN7iGppa+kAfPjz4MrhXV w7Hta3I7PxustLqiKZbZ1djGO9BKI9FgZZZ5lCZhS62vpnZ2seVxe+yXhe+edOb7eff8 FZFEBRSWGm67xNAP3Z15R7VJ8hFkiQrNwQxYP41k41TA+0q8p9fHoh8k7wi33g1bUBvw BqbJ0KS2BKYyrNZtidghfBKE5zsFBtL+4axXdyUrOBhit6233Z762p0SHjV66XEaMqeX HbdQ== X-Gm-Message-State: AFeK/H0NDIJozvEuaAzEQONBGBTOaUac4VrM/iRXN7HJTuYTNAjEWq5TN7ZJx2jE+Rt2ZA== X-Received: by 10.223.153.108 with SMTP id x99mr10929230wrb.55.1491141177048; Sun, 02 Apr 2017 06:52:57 -0700 (PDT) Received: from cervin.8.8.8.8 (85-169-37-239.rev.numericable.fr. [85.169.37.239]) by smtp.gmail.com with ESMTPSA id q4sm10337047wme.17.2017.04.02.06.52.56 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 02 Apr 2017 06:52:56 -0700 (PDT) From: Mathieu Othacehe To: 26339@debbugs.gnu.org Subject: [PATCH 03/18] scripts: system: Rename --no-grub option to --no-bootloader. Date: Sun, 2 Apr 2017 15:52:27 +0200 Message-Id: <20170402135242.2958-3-m.othacehe@gmail.com> X-Mailer: git-send-email 2.12.2 In-Reply-To: <20170402135242.2958-1-m.othacehe@gmail.com> References: <20170402135242.2958-1-m.othacehe@gmail.com> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 26339 Cc: David Craven 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.3 (--) From: David Craven * guix/scripts/system.scm (%options, show-help): Adjust accordingly. --- guix/scripts/system.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/guix/scripts/system.scm b/guix/scripts/system.scm index fb32d08a5..04274919e 100644 --- a/guix/scripts/system.scm +++ b/guix/scripts/system.scm @@ -733,7 +733,7 @@ Some ACTIONS support additional ARGS.\n")) (display (_ " --image-size=SIZE for 'vm-image', produce an image of SIZE")) (display (_ " - --no-grub for 'init', do not install GRUB")) + --no-bootloader for 'init', do not install a bootloader")) (display (_ " --share=SPEC for 'vm', share host file system according to SPEC")) (display (_ " @@ -768,7 +768,7 @@ Some ACTIONS support additional ARGS.\n")) (lambda (opt name arg result) (alist-cons 'image-size (size->number arg) result))) - (option '("no-grub") #f #f + (option '("no-bootloader") #f #f (lambda (opt name arg result) (alist-cons 'install-grub? #f result))) (option '("full-boot") #f #f -- 2.12.2 From debbugs-submit-bounces@debbugs.gnu.org Sun Apr 02 09:53:06 2017 Received: (at 26339) by debbugs.gnu.org; 2 Apr 2017 13:53:06 +0000 Received: from localhost ([127.0.0.1]:56520 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cufwH-0000Wr-Vg for submit@debbugs.gnu.org; Sun, 02 Apr 2017 09:53:06 -0400 Received: from mail-wr0-f195.google.com ([209.85.128.195]:34321) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cufwG-0000Vh-0N for 26339@debbugs.gnu.org; Sun, 02 Apr 2017 09:53:04 -0400 Received: by mail-wr0-f195.google.com with SMTP id w43so26771366wrb.1 for <26339@debbugs.gnu.org>; Sun, 02 Apr 2017 06:53:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=/DaG0XIABjCK9Yy43X643V6TvgDSkKvOeg7T0Y60MwM=; b=mJKkkW5ZAhuTPmddgCJ1EaVpZOwydqk2uweFArtvyNUCqcjwHFV092ncZSI9Nr6CdX aDFbQNcdzQP1WE5UGk1naRMftLornquD9iGGdy1GeHp0PW0GfY2RTzXel6JhnyKMTjUm XY5EUIdmt9l+JtC5NqPSUcBcDtf+RZ7/X+N9A1MVsJCu7K0KlxpNtvOYNcSlAzkP9+7Q e80WGPB9B/GKks42bFqXyRUuonGavxtHJgXS8JO6eY+txJxCYOKPqBw+rk9sP69QlIIf 6SQvYt76Q/GmRQgg62WM10vnbefpUPu+5zB3F4FOnqbrFNx+VmZoCswcjjkq7ctij6Ur Pfxg== 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:date:message-id:in-reply-to :references; bh=/DaG0XIABjCK9Yy43X643V6TvgDSkKvOeg7T0Y60MwM=; b=bcEsD9ugrtspWNh87T8pG7omEPleLAPkjOvPuh5NA4kEdqD5WWsBVTdqowAjRobj6m 7d5OE26syvCS2Z+OpfTyspUYcBpPsl9tX/R9cKmvbopdvhuouPoAKHmzKEJJf5fybeVI 3B0tLHl34BUFMjT4fXVcXf3NQ7lfMqfydX2d2VyFinIFI5CO9nifEFKdgslq7j3wUfQc OAcczK19J07sKALEWH3ewJ2HxvdRE8WZOTFjnePlld1yr//iO1xXHwIxW9iz6LU5rTCc s9MQkob9F4AuZsizjlc0/wV2TEEjR0FqjJWcX4mGNy7Y9RdTHo98jr81iMQ3MHfNqXFK EqKg== X-Gm-Message-State: AFeK/H2SBFMQZu+xKfKCpzk/7O9BKzK8bLy6VGGM5NtIw4VvlNpll/csUe9pQX8hEV/n0A== X-Received: by 10.223.154.183 with SMTP id a52mr11092322wrc.5.1491141178149; Sun, 02 Apr 2017 06:52:58 -0700 (PDT) Received: from cervin.8.8.8.8 (85-169-37-239.rev.numericable.fr. [85.169.37.239]) by smtp.gmail.com with ESMTPSA id q4sm10337047wme.17.2017.04.02.06.52.57 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 02 Apr 2017 06:52:57 -0700 (PDT) From: Mathieu Othacehe To: 26339@debbugs.gnu.org Subject: [PATCH 04/18] bootloader: Add install procedures and use them. Date: Sun, 2 Apr 2017 15:52:28 +0200 Message-Id: <20170402135242.2958-4-m.othacehe@gmail.com> X-Mailer: git-send-email 2.12.2 In-Reply-To: <20170402135242.2958-1-m.othacehe@gmail.com> References: <20170402135242.2958-1-m.othacehe@gmail.com> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 26339 Cc: David Craven 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.3 (--) From: David Craven * gnu/system/bootloader.scm (dd, install-grub, install-syslinux): New procedures. * gnu/build/install.scm (install-boot-config): New procedure. (install-grub): Move to (gnu system bootloader). * gnu/build/vm.scm (register-bootcfg-root): Rename register-grub.cfg-root and adjust accordingly. (initialize-hard-disk): Takes a bootloader, bootcfg, bootcfg-location and install-bootloader procedure. Adjust accordingly. * gnu/system/vm.scm (qemu-image): Adjust to initialize-hard-disk. (system-disk-image, system-qemu-image, system-qemu-image/shared-store): Adjust to qemu-image. --- gnu/build/install.scm | 36 ++++++++-------------------------- gnu/build/vm.scm | 17 ++++++++++------ gnu/system/bootloader.scm | 49 ++++++++++++++++++++++++++++++++++++++++++++++- gnu/system/vm.scm | 37 +++++++++++++++++++++++------------ 4 files changed, 92 insertions(+), 47 deletions(-) diff --git a/gnu/build/install.scm b/gnu/build/install.scm index 5cb6055a0..9e30c0d23 100644 --- a/gnu/build/install.scm +++ b/gnu/build/install.scm @@ -22,8 +22,7 @@ #:use-module (guix build store-copy) #:use-module (srfi srfi-26) #:use-module (ice-9 match) - #:export (install-grub - install-grub-config + #:export (install-boot-config evaluate-populate-directive populate-root-file-system reset-timestamps @@ -39,36 +38,17 @@ ;;; ;;; Code: -(define (install-grub grub.cfg device mount-point) - "Install GRUB with GRUB.CFG on DEVICE, which is assumed to be mounted on -MOUNT-POINT. - -Note that the caller must make sure that GRUB.CFG is registered as a GC root -so that the fonts, background images, etc. referred to by GRUB.CFG are not -GC'd." - (install-grub-config grub.cfg mount-point) - - ;; Tell 'grub-install' that there might be a LUKS-encrypted /boot or root - ;; partition. - (setenv "GRUB_ENABLE_CRYPTODISK" "y") - - (unless (zero? (system* "grub-install" "--no-floppy" - "--boot-directory" - (string-append mount-point "/boot") - device)) - (error "failed to install GRUB"))) - -(define (install-grub-config grub.cfg mount-point) - "Atomically copy GRUB.CFG into boot/grub/grub.cfg on the MOUNT-POINT. Note -that the caller must make sure that GRUB.CFG is registered as a GC root so -that the fonts, background images, etc. referred to by GRUB.CFG are not GC'd." - (let* ((target (string-append mount-point "/boot/grub/grub.cfg")) +(define (install-boot-config bootcfg bootcfg-location mount-point) + "Atomically copy BOOTCFG into BOOTCFG-LOCATION on the MOUNT-POINT. Note +that the caller must make sure that BOOTCFG is registered as a GC root so +that the fonts, background images, etc. referred to by BOOTCFG are not GC'd." + (let* ((target (string-append mount-point bootcfg-location)) (pivot (string-append target ".new"))) (mkdir-p (dirname target)) - ;; Copy GRUB.CFG instead of just symlinking it, because symlinks won't + ;; Copy BOOTCFG instead of just symlinking it, because symlinks won't ;; work when /boot is on a separate partition. Do that atomically. - (copy-file grub.cfg pivot) + (copy-file bootcfg pivot) (rename-file pivot target))) (define (evaluate-populate-directive directive target) diff --git a/gnu/build/vm.scm b/gnu/build/vm.scm index 60ee18ebe..c536f4f44 100644 --- a/gnu/build/vm.scm +++ b/gnu/build/vm.scm @@ -283,15 +283,18 @@ SYSTEM-DIRECTORY is the name of the directory of the 'system' derivation." (unless register-closures? (reset-timestamps target)))) -(define (register-grub.cfg-root target grub.cfg) +(define (register-bootcfg-root target bootcfg) "On file system TARGET, register GRUB.CFG as a GC root." (let ((directory (string-append target "/var/guix/gcroots"))) (mkdir-p directory) - (symlink grub.cfg (string-append directory "/grub.cfg")))) + (symlink bootcfg (string-append directory "/bootcfg")))) (define* (initialize-hard-disk device #:key - grub.cfg + bootloader + bootcfg + bootcfg-location + install-bootloader (partitions '())) "Initialize DEVICE as a disk containing all the objects listed in PARTITIONS, and using GRUB.CFG as its bootloader configuration file. @@ -309,10 +312,12 @@ passing it a directory name where it is mounted." (display "mounting root partition...\n") (mkdir-p target) (mount (partition-device root) target (partition-file-system root)) - (install-grub grub.cfg device target) + (install-boot-config bootcfg bootcfg-location target) + (when install-bootloader + (install-bootloader bootloader device target)) - ;; Register GRUB.CFG as a GC root. - (register-grub.cfg-root target grub.cfg) + ;; Register BOOTCFG as a GC root. + (register-bootcfg-root target bootcfg) (umount target))) diff --git a/gnu/system/bootloader.scm b/gnu/system/bootloader.scm index 6da19f6d3..ea570ee00 100644 --- a/gnu/system/bootloader.scm +++ b/gnu/system/bootloader.scm @@ -38,7 +38,11 @@ extlinux-configuration grub-configuration grub-efi-configuration - syslinux-configuration)) + syslinux-configuration + + dd + install-grub + install-syslinux)) ;;; Commentary: ;;; @@ -155,4 +159,47 @@ TIMEOUT ~a~%" (bootloader (@ (gnu packages bootloaders) syslinux)) (install-procedure install-syslinux))) + + +;;; +;;; Bootloader install procedures. +;;; + +(define dd + #~(lambda (bs count if of) + (zero? (system* "dd" + (string-append "bs=" (number->string bs)) + (string-append "count=" (number->string count)) + (string-append "if=" if) + (string-append "of=" of))))) + +(define install-grub + #~(lambda (bootloader device mount-point) + ;; Install GRUB on DEVICE which is mounted at MOUNT-POINT. + (let ((grub (string-append bootloader "/sbin/grub-install")) + (install-dir (string-append mount-point "/boot"))) + ;; Tell 'grub-install' that there might be a LUKS-encrypted /boot or + ;; root partition. + (setenv "GRUB_ENABLE_CRYPTODISK" "y") + + (unless (zero? (system* grub "--no-floppy" + "--boot-directory" install-dir + device)) + (error "failed to install GRUB"))))) + +(define install-syslinux + #~(lambda (bootloader device mount-point) + (let ((extlinux (string-append bootloader "/sbin/extlinux")) + (install-dir (string-append mount-point "/boot/extlinux")) + (syslinux-dir (string-append bootloader "/share/syslinux"))) + (mkdir-p install-dir) + (for-each (lambda (file) + (copy-file file + (string-append install-dir "/" (basename file)))) + (find-files syslinux-dir "\\.c32$")) + + (unless (and (zero? (system* extlinux "--install" install-dir)) + (#$dd 440 1 (string-append syslinux-dir "/mbr.bin") device)) + (error "failed to install SYSLINUX"))))) + ;;; bootloader.scm ends here diff --git a/gnu/system/vm.scm b/gnu/system/vm.scm index 5c6e7f684..6f852d7ea 100644 --- a/gnu/system/vm.scm +++ b/gnu/system/vm.scm @@ -45,10 +45,10 @@ #:select (%guile-static-stripped)) #:use-module (gnu packages admin) + #:use-module (gnu system bootloader) #:use-module (gnu system shadow) #:use-module (gnu system pam) #:use-module (gnu system linux-initrd) - #:use-module (gnu system grub) #:use-module (gnu system file-systems) #:use-module (gnu system) #:use-module (gnu services) @@ -175,8 +175,9 @@ made available under the /xchg CIFS share." (disk-image-format "qcow2") (file-system-type "ext4") file-system-label - os-derivation - grub-configuration + os.drv + bootcfg.drv + bootloader-configuration (register-closures? #t) (inputs '()) copy-inputs?) @@ -200,7 +201,7 @@ the image." (guix build utils)) (let ((inputs - '#$(append (list qemu parted grub e2fsprogs) + '#$(append (list qemu parted e2fsprogs) (map canonical-package (list sed grep coreutils findutils gawk)) (if register-closures? (list guix) '()))) @@ -222,7 +223,7 @@ the image." #:closures graphs #:copy-closures? #$copy-inputs? #:register-closures? #$register-closures? - #:system-directory #$os-derivation)) + #:system-directory #$os.drv)) (partitions (list (partition (size #$(- disk-image-size (* 10 (expt 2 20)))) @@ -232,7 +233,16 @@ the image." (initializer initialize))))) (initialize-hard-disk "/dev/vda" #:partitions partitions - #:grub.cfg #$grub-configuration) + #:bootloader + #$(bootloader-configuration-bootloader + bootloader-configuration) + #:bootcfg #$bootcfg.drv + #:bootcfg-location + #$(bootloader-configuration-file-location + bootloader-configuration) + #:install-bootloader + #$(bootloader-configuration-install-procedure + bootloader-configuration)) (reboot))))) #:system system #:make-disk-image? #t @@ -286,8 +296,9 @@ to USB sticks meant to be read-only." (mlet* %store-monad ((os-drv (operating-system-derivation os)) (grub.cfg (operating-system-grub.cfg os))) (qemu-image #:name name - #:os-derivation os-drv - #:grub-configuration grub.cfg + #:os.drv os-drv + #:bootcfg.drv grub.cfg + #:bootloader-configuration (operating-system-bootloader os) #:disk-image-size disk-image-size #:disk-image-format "raw" #:file-system-type file-system-type @@ -329,8 +340,9 @@ of the GNU system as described by OS." (mlet* %store-monad ((os-drv (operating-system-derivation os)) (grub.cfg (operating-system-grub.cfg os))) - (qemu-image #:os-derivation os-drv - #:grub-configuration grub.cfg + (qemu-image #:os.drv os-drv + #:bootcfg.drv grub.cfg + #:bootloader-configuration (operating-system-bootloader os) #:disk-image-size disk-image-size #:file-system-type file-system-type #:inputs `(("system" ,os-drv) @@ -428,8 +440,9 @@ bootloader refers to: OS kernel, initrd, bootloader data, etc." ;; GRUB.CFG and all its dependencies, including the output of OS-DRV. ;; This is more than needed (we only need the kernel, initrd, GRUB for its ;; font, and the background image), but it's hard to filter that. - (qemu-image #:os-derivation os-drv - #:grub-configuration grub.cfg + (qemu-image #:os.drv os-drv + #:bootcfg.drv grub.cfg + #:bootloader-configuration (operating-system-bootloader os) #:disk-image-size disk-image-size #:inputs (if full-boot? `(("grub.cfg" ,grub.cfg)) -- 2.12.2 From debbugs-submit-bounces@debbugs.gnu.org Sun Apr 02 09:53:07 2017 Received: (at 26339) by debbugs.gnu.org; 2 Apr 2017 13:53:07 +0000 Received: from localhost ([127.0.0.1]:56523 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cufwI-0000Wu-Fw for submit@debbugs.gnu.org; Sun, 02 Apr 2017 09:53:07 -0400 Received: from mail-wr0-f172.google.com ([209.85.128.172]:34192) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cufwE-0000Ve-6P for 26339@debbugs.gnu.org; Sun, 02 Apr 2017 09:53:04 -0400 Received: by mail-wr0-f172.google.com with SMTP id l43so137114197wre.1 for <26339@debbugs.gnu.org>; Sun, 02 Apr 2017 06:53:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=UJ5J9AxK1DmeTjqBP/BaDRDaen5+GCkDczAR7wTG9GE=; b=n3M1N8qTif4qMeFPucg9hZ0Gj8MX5zqdGK2ErbVUmbC7NxtfO3WT+JUkRgZIB6JBap nFKB1j6NYiFyuElTCgdaoEe2KN8utjRAkBPux2+CgzXIsbxGsMHz8CF2GI8f1jN9kh7w f0Gmz8D6WoAkwxzR0kK25zi5eVY8WtLH48cnxsMdhE8QMbajkOmgd4xgkjy6zvOK98pg BNQyLysRgq9wUkyx0af9+GPwxplhBsc9dAkGuQ+NFHVmdhkl/2iuEfYQXWx6rNo8w3BE LsoF0xPOm20ZcBj5HsRJ91lwug9BOjlMtIcvFV/5M3sFNXX7UWPhCDDqXTwP8tEM43ZZ 9O2Q== 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:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=UJ5J9AxK1DmeTjqBP/BaDRDaen5+GCkDczAR7wTG9GE=; b=HU6GRurjiub9Uwlya/q3+7CeGypbTcxeONQXatv0wickHrMn8hFOchY8cgIdB4H6rc esi9SwT7CQvmNHvlyVLh89zlc+PUSB5rpvtWYjleMNpJIJoTigHjokmLznL+ucY7RMPA tC8iKyAAZwbnu4EQy6psFcLGDhHSL/Uv9SiM9Y8140NM6e14m6ivtP6yG8yYgLMlgpUR m7dPOEsLoCU4imXFkBIy0q6xOroqNzfPF6DnVO0lAiT0rTLyEtLd/GzMhjGwL4bdLPH0 pgKZbnZuJXYoKl89v1kNEQtWQUEeFAjr9V2LHR3n1p6oH+TpW9ZneSrb9A6N87eCqH3o 7VWA== X-Gm-Message-State: AFeK/H0D0j+Cy46Y8KRvOTqfedzjqPdFiQpniTp/JmECeHa7DArgdaFS pQsnsSucsBElgw== X-Received: by 10.28.148.143 with SMTP id w137mr5648180wmd.72.1491141176188; Sun, 02 Apr 2017 06:52:56 -0700 (PDT) Received: from cervin.8.8.8.8 (85-169-37-239.rev.numericable.fr. [85.169.37.239]) by smtp.gmail.com with ESMTPSA id q4sm10337047wme.17.2017.04.02.06.52.55 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 02 Apr 2017 06:52:55 -0700 (PDT) From: Mathieu Othacehe To: 26339@debbugs.gnu.org Subject: [PATCH 02/18] system: Add extlinux support. Date: Sun, 2 Apr 2017 15:52:26 +0200 Message-Id: <20170402135242.2958-2-m.othacehe@gmail.com> X-Mailer: git-send-email 2.12.2 In-Reply-To: <20170402135242.2958-1-m.othacehe@gmail.com> References: <20170402135242.2958-1-m.othacehe@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.8 (--) X-Debbugs-Envelope-To: 26339 Cc: David Craven 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.8 (--) From: David Craven * gnu/system.scm (operating-system): Add default bootloader. (operating-system-grub.cfg): Use bootloader-configuration-file-procedure. * gnu/system/grub.scm (bootloader-configuration->grub-configuration): New variable. (grub-configuration-file): Use bootloader-configuration->grub-configuration. * guix/scripts/system.scm (profile-grub-entries): Rename system->grub-entry to system->boot-parameters and adjust accordingly. (perform-action): Make bootloader optional. Use bootloader-configuration-device. * gnu/system/bootloader.scm: New file. * gnu/local.mk (GNU_SYSTEM_MODULES): Add it. * tests/system.scm: Adjust operating-system to new API. * tests/guix-system.sh: Adjust operating-system to new API. --- gnu/local.mk | 1 + gnu/system.scm | 10 +-- gnu/system/bootloader.scm | 158 ++++++++++++++++++++++++++++++++++++++++++++++ gnu/system/grub.scm | 22 ++++--- guix/scripts/system.scm | 44 ++++++------- tests/guix-system.sh | 2 - tests/system.scm | 2 - 7 files changed, 197 insertions(+), 42 deletions(-) create mode 100644 gnu/system/bootloader.scm diff --git a/gnu/local.mk b/gnu/local.mk index 68f561e95..d3033f54f 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -437,6 +437,7 @@ GNU_SYSTEM_MODULES = \ \ %D%/system.scm \ %D%/system/file-systems.scm \ + %D%/system/bootloader.scm \ %D%/system/grub.scm \ %D%/system/install.scm \ %D%/system/linux-container.scm \ diff --git a/gnu/system.scm b/gnu/system.scm index d528c4a6a..e0257bd4a 100644 --- a/gnu/system.scm +++ b/gnu/system.scm @@ -47,7 +47,7 @@ #:use-module (gnu services) #:use-module (gnu services shepherd) #:use-module (gnu services base) - #:use-module (gnu system grub) + #:use-module (gnu system bootloader) #:use-module (gnu system shadow) #:use-module (gnu system nss) #:use-module (gnu system locale) @@ -131,8 +131,8 @@ (default linux-libre)) (kernel-arguments operating-system-kernel-arguments (default '())) ; list of gexps/strings - (bootloader operating-system-bootloader) ; - + (bootloader operating-system-bootloader ; + (default (extlinux-configuration))) (initrd operating-system-initrd ; (list fs) -> M derivation (default base-initrd)) (firmware operating-system-firmware ; list of packages @@ -759,8 +759,8 @@ listed in OS. The C library expects to find it under "/boot") (operating-system-kernel-arguments os))) (initrd initrd))))) - (grub-configuration-file (operating-system-bootloader os) entries - #:old-entries old-entries))) + ((bootloader-configuration-file-procedure (operating-system-bootloader os)) + (operating-system-bootloader os) entries #:old-entries old-entries))) (define (grub-device fs) "Given FS, a object, return a value suitable for use as the diff --git a/gnu/system/bootloader.scm b/gnu/system/bootloader.scm new file mode 100644 index 000000000..6da19f6d3 --- /dev/null +++ b/gnu/system/bootloader.scm @@ -0,0 +1,158 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2017 David Craven +;;; +;;; This file is part of GNU Guix. +;;; +;;; GNU Guix is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or (at +;;; your option) any later version. +;;; +;;; GNU Guix is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with GNU Guix. If not, see . + +(define-module (gnu system bootloader) + #:use-module (gnu system) + #:use-module (gnu system grub) + #:use-module (guix gexp) + #:use-module (guix packages) + #:use-module (guix records) + #:use-module (ice-9 match) + #:export (bootloader-configuration + bootloader-configuration? + bootloader-configuration-bootloader + bootloader-configuration-device + bootloader-configuration-menu-entries + bootloader-configuration-default-entry + bootloader-configuration-timeout + bootloader-configuration-file-location + bootloader-configuration-file-procedure + bootloader-configuration-install-procedure + bootloader-configuration-additional-configuration + + extlinux-configuration + grub-configuration + grub-efi-configuration + syslinux-configuration)) + +;;; Commentary: +;;; +;;; Generic configuration for bootloaders. +;;; +;;; Code: + +(define-record-type* + bootloader-configuration make-bootloader-configuration + bootloader-configuration? + (bootloader bootloader-configuration-bootloader ; package + (default #f)) + (device bootloader-configuration-device ; string + (default #f)) + (menu-entries bootloader-configuration-menu-entries ; list of + (default '())) + (default-entry bootloader-configuration-default-entry ; integer + (default 0)) + (timeout bootloader-configuration-timeout ; integer + (default 5)) + (configuration-file-location bootloader-configuration-file-location + (default #f)) + (configuration-file-procedure bootloader-configuration-file-procedure ; procedure + (default #f)) + (install-procedure bootloader-configuration-install-procedure ; procedure + (default #f)) + (additional-configuration bootloader-configuration-additional-configuration ; record + (default #f))) + + + +;;; +;;; Extlinux configuration file. +;;; + +(define* (extlinux-configuration-file config entries + #:key + (system (%current-system)) + (old-entries '())) + "Return the U-Boot configuration file corresponding to CONFIG, a + object, and where the store is available at STORE-FS, a + object. OLD-ENTRIES is taken to be a list of menu entries +corresponding to old generations of the system." + + (define all-entries + (append entries (bootloader-configuration-menu-entries config))) + + (define boot-parameters->gexp + (match-lambda + (($ label _ _ _ kernel kernel-arguments initrd) + #~(format port "LABEL ~a + MENU LABEL ~a + KERNEL ~a + FDTDIR ~a/lib/dtbs + INITRD ~a + APPEND ~a +~%" + #$label #$label + #$kernel #$kernel #$initrd + (string-join (list #$@kernel-arguments)))))) + + (define builder + #~(call-with-output-file #$output + (lambda (port) + (let ((timeout #$(bootloader-configuration-timeout config))) + (format port " +UI menu.c32 +PROMPT ~a +TIMEOUT ~a~%" + (if (> timeout 0) 1 0) + (* 10 timeout)) + #$@(map boot-parameters->gexp all-entries) + + #$@(if (pair? old-entries) + #~((format port "~%") + #$@(map boot-parameters->gexp old-entries) + (format port "~%")) + #~()))))) + + (gexp->derivation "extlinux.conf" builder)) + + + + +;;; +;;; Bootloader configurations. +;;; + +(define* (extlinux-configuration #:optional (config (bootloader-configuration))) + (bootloader-configuration + (inherit config) + (configuration-file-location "/boot/extlinux/extlinux.conf") + (configuration-file-procedure extlinux-configuration-file))) + +(define* (grub-configuration #:optional (config (bootloader-configuration))) + (bootloader-configuration + (inherit config) + (bootloader (@ (gnu packages bootloaders) grub)) + (configuration-file-location "/boot/grub/grub.cfg") + (configuration-file-procedure grub-configuration-file) + (install-procedure install-grub) + (additional-configuration + (let ((additional-config (bootloader-configuration-additional-configuration config))) + (if additional-config additional-config %default-theme))))) + +(define* (grub-efi-configuration #:optional (config (bootloader-configuration))) + (bootloader-configuration + (inherit (grub-configuration config)) + (bootloader (@ (gnu packages bootloaders) grub-efi)))) + +(define* (syslinux-configuration #:optional (config (bootloader-configuration))) + (bootloader-configuration + (inherit (extlinux-configuration config)) + (bootloader (@ (gnu packages bootloaders) syslinux)) + (install-procedure install-syslinux))) + +;;; bootloader.scm ends here diff --git a/gnu/system/grub.scm b/gnu/system/grub.scm index f2838d633..0b52e3e7e 100644 --- a/gnu/system/grub.scm +++ b/gnu/system/grub.scm @@ -27,6 +27,7 @@ #:use-module (guix download) #:use-module (gnu artwork) #:use-module (gnu system) + #:use-module (gnu system bootloader) #:use-module (gnu system file-systems) #:autoload (gnu packages bootloaders) (grub) #:autoload (gnu packages compression) (gzip) @@ -49,14 +50,6 @@ %background-image %default-theme - grub-configuration - grub-configuration? - grub-configuration-device - grub-configuration-grub - - menu-entry - menu-entry? - grub-configuration-file)) ;;; Commentary: @@ -276,7 +269,16 @@ code." (linux-arguments (boot-parameters-kernel-arguments conf)) (initrd (boot-parameters-initrd conf)))) -(define* (grub-configuration-file config entries +(define (bootloader-configuration->grub-configuration config) + (grub-configuration + (grub (bootloader-configuration-bootloader config)) + (device (bootloader-configuration-device config)) + (menu-entries (bootloader-configuration-menu-entries config)) + (default-entry (bootloader-configuration-default-entry config)) + (timeout (bootloader-configuration-timeout config)) + (theme (bootloader-configuration-additional-configuration config)))) + +(define* (grub-configuration-file bootloader-config entries #:key (system (%current-system)) (old-entries '())) @@ -284,6 +286,8 @@ code." object, and where the store is available at STORE-FS, a object. OLD-ENTRIES is taken to be a list of menu entries corresponding to old generations of the system." + (define config (bootloader-configuration->grub-configuration bootloader-config)) + (define all-entries (append (map boot-parameters->menu-entry entries) (grub-configuration-menu-entries config))) diff --git a/guix/scripts/system.scm b/guix/scripts/system.scm index 144a7fd37..fb32d08a5 100644 --- a/guix/scripts/system.scm +++ b/guix/scripts/system.scm @@ -37,10 +37,10 @@ #:use-module (guix build utils) #:use-module (gnu build install) #:use-module (gnu system) + #:use-module (gnu system bootloader) #:use-module (gnu system file-systems) #:use-module (gnu system linux-container) #:use-module (gnu system vm) - #:use-module (gnu system grub) #:use-module (gnu services) #:use-module (gnu services shepherd) #:use-module (gnu services herd) @@ -366,32 +366,25 @@ it atomically, and then run OS's activation script." (numbers (generation-numbers profile))) "Return a list of 'menu-entry' for the generations of PROFILE specified by NUMBERS, which is a list of generation numbers." - (define (system->grub-entry system number time) + (define (system->boot-parameters system number time) (unless-file-not-found (let* ((file (string-append system "/parameters")) (params (call-with-input-file file read-boot-parameters)) - (label (boot-parameters-label params)) (root (boot-parameters-root-device params)) (root-device (if (bytevector? root) (uuid->string root) - root)) - (kernel (boot-parameters-kernel params)) - (kernel-arguments (boot-parameters-kernel-arguments params)) - (initrd (boot-parameters-initrd params))) - (menu-entry - (label (string-append label " (#" + root))) + (boot-parameters + (inherit params) + (label (string-append (boot-parameters-label params) " (#" (number->string number) ", " (seconds->string time) ")")) - (device (boot-parameters-store-device params)) - (device-mount-point (boot-parameters-store-mount-point params)) - (linux kernel) - (linux-arguments - (cons* (string-append "--root=" root-device) + (kernel-arguments + (cons* (string-append "--root=" (boot-parameters-root-device params)) (string-append "--system=" system) (string-append "--load=" system "/boot") - kernel-arguments)) - (initrd initrd))))) + (boot-parameters-kernel-arguments params))))))) (let* ((systems (map (cut generation-file-name profile <>) numbers)) @@ -399,7 +392,7 @@ NUMBERS, which is a list of generation numbers." (unless-file-not-found (stat:mtime (lstat system)))) systems))) - (filter-map system->grub-entry systems numbers times))) + (filter-map system->boot-parameters systems numbers times))) ;;; @@ -613,8 +606,11 @@ building anything." #:image-size image-size #:full-boot? full-boot? #:mappings mappings)) - (grub (package->derivation (grub-configuration-grub - (operating-system-bootloader os)))) + (bootloader (let ((bootloader (bootloader-configuration-bootloader + (operating-system-bootloader os)))) + (if bootloader + (package->derivation bootloader) + (return #f)))) (grub.cfg (if (eq? 'container action) (return #f) (operating-system-grub.cfg os @@ -626,8 +622,8 @@ building anything." ;; --no-grub is passed, because GRUB.CFG because we then use it as a GC ;; root. See . (drvs -> (if (memq action '(init reconfigure)) - (if grub? - (list sys grub.cfg grub) + (if (and grub? bootloader) + (list sys grub.cfg bootloader) (list sys grub.cfg)) (list sys))) (% (if derivations-only? @@ -643,8 +639,8 @@ building anything." drvs) ;; Make sure GRUB is accessible. - (when grub? - (let ((prefix (derivation->output-path grub))) + (when (and grub? bootloader) + (let ((prefix (derivation->output-path bootloader))) (setenv "PATH" (string-append prefix "/bin:" prefix "/sbin:" (getenv "PATH"))))) @@ -835,7 +831,7 @@ resulting from command-line parsing." ((first second) second) (_ #f))) (device (and grub? - (grub-configuration-device + (bootloader-configuration-device (operating-system-bootloader os))))) (with-store store diff --git a/tests/guix-system.sh b/tests/guix-system.sh index de6db0928..525480a11 100644 --- a/tests/guix-system.sh +++ b/tests/guix-system.sh @@ -91,7 +91,6 @@ OS_BASE=' (timezone "Europe/Paris") (locale "en_US.UTF-8") - (bootloader (grub-configuration (device "/dev/sdX"))) (file-systems (cons (file-system (device "root") (title (string->symbol "label")) @@ -162,7 +161,6 @@ make_user_config () (timezone "Europe/Paris") (locale "en_US.UTF-8") - (bootloader (grub-configuration (device "/dev/sdX"))) (file-systems (cons (file-system (device "root") (title 'label) diff --git a/tests/system.scm b/tests/system.scm index ca34409be..bdda08e18 100644 --- a/tests/system.scm +++ b/tests/system.scm @@ -36,7 +36,6 @@ (host-name "komputilo") (timezone "Europe/Berlin") (locale "en_US.utf8") - (bootloader (grub-configuration (device "/dev/sdX"))) (file-systems (cons %root-fs %base-file-systems)) (users %base-user-accounts))) @@ -51,7 +50,6 @@ (host-name "komputilo") (timezone "Europe/Berlin") (locale "en_US.utf8") - (bootloader (grub-configuration (device "/dev/sdX"))) (mapped-devices (list %luks-device)) (file-systems (cons (file-system (inherit %root-fs) -- 2.12.2 From debbugs-submit-bounces@debbugs.gnu.org Sun Apr 02 09:53:07 2017 Received: (at 26339) by debbugs.gnu.org; 2 Apr 2017 13:53:07 +0000 Received: from localhost ([127.0.0.1]:56525 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cufwJ-0000XC-7h for submit@debbugs.gnu.org; Sun, 02 Apr 2017 09:53:07 -0400 Received: from mail-wr0-f169.google.com ([209.85.128.169]:33752) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cufwG-0000Vj-W1 for 26339@debbugs.gnu.org; Sun, 02 Apr 2017 09:53:05 -0400 Received: by mail-wr0-f169.google.com with SMTP id w43so135132473wrb.0 for <26339@debbugs.gnu.org>; Sun, 02 Apr 2017 06:53:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Q95VRCR2KwBqWLhUrw19ISoJnJGSHhGkxdNdRiCw5Oc=; b=IgoPKR15usf/nKoNPKvg9E6RrcAAdBjUIi4JWM+Y1uz1IWbUkt0QEN7s6oSIVaNVlF p0VyW1E4DTz85hig7KRPUmHl+DdWFcYDUkdJxqrQ5Nox3IXxds5nQbYbommnOyVgNeE/ RcRcj97mg5PzA0VC3MwiMRTrkMs+qw/ZM/fa1mFMgAyOGVMrokakjJymORG2BclqBF8K 3uu8+un5c3UWpp/4zDT3x2QkW8RfxJiauRiz03H4rgoVs1T4WmjquXpSZxlV9oTXhblK C+xdF7MdGgCY7OH3kLEDEExEByptruyWVUBOsqYhg85yCYzMKiZrxgU48PCygnUSk0wh 0Law== 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:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Q95VRCR2KwBqWLhUrw19ISoJnJGSHhGkxdNdRiCw5Oc=; b=H/W2cTTxb3ggsiz108Kc6arzWObx64cxFtSILFcdspJUmIBmuelayhl8MY6htamHOS NHUpRrDuM+zZ6Zkqu6J6j7oywZOaujqR1eR00Ve5/91gNZRI77FS/iqcCFFN9CffMuF0 K7fhPayfpHg6GgnpjsetKJmYOInBAdLrwxjgyseWFH6IU3wNtmRz8I30ONQJM0piwIkd I1YsWVXlBVO7aH27ZdOvfq92+JceJsDKY8rrXhWbvS4+cfBoQl46sDY9UYK+oLgnsUT4 Xv8suBiBHGzw+KnXIwZOniG0wRxopFRCwovJBb3Zp0s8XSkA/5GLEFXln9Fsnv8oGmxv jHiA== X-Gm-Message-State: AFeK/H1o09Iqoj40eE9TNekDDqIR9NbTCXhTUcQ17idNn5NfwexoQkkQ2MgymqtedvkJZg== X-Received: by 10.223.163.206 with SMTP id m14mr1493782wrb.27.1491141179218; Sun, 02 Apr 2017 06:52:59 -0700 (PDT) Received: from cervin.8.8.8.8 (85-169-37-239.rev.numericable.fr. [85.169.37.239]) by smtp.gmail.com with ESMTPSA id q4sm10337047wme.17.2017.04.02.06.52.58 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 02 Apr 2017 06:52:58 -0700 (PDT) From: Mathieu Othacehe To: 26339@debbugs.gnu.org Subject: [PATCH 05/18] system: Rename operating-system-grub.cfg to operating-system-bootcfg. Date: Sun, 2 Apr 2017 15:52:29 +0200 Message-Id: <20170402135242.2958-5-m.othacehe@gmail.com> X-Mailer: git-send-email 2.12.2 In-Reply-To: <20170402135242.2958-1-m.othacehe@gmail.com> References: <20170402135242.2958-1-m.othacehe@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.8 (--) X-Debbugs-Envelope-To: 26339 Cc: Mathieu Othacehe 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.8 (--) * gnu/system.scm (operating-system-grub.cfg): Rename to operating-system-bootcfg. --- gnu/system.scm | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/gnu/system.scm b/gnu/system.scm index e0257bd4a..a9b05806a 100644 --- a/gnu/system.scm +++ b/gnu/system.scm @@ -3,6 +3,7 @@ ;;; Copyright © 2015 Mark H Weaver ;;; Copyright © 2015, 2016 Alex Kost ;;; Copyright © 2016 Chris Marusich +;;; Copyright © 2017 Mathieu Othacehe ;;; ;;; This file is part of GNU Guix. ;;; @@ -92,7 +93,7 @@ operating-system-derivation operating-system-profile - operating-system-grub.cfg + operating-system-bootcfg operating-system-etc-directory operating-system-locale-directory operating-system-boot-script @@ -729,9 +730,9 @@ listed in OS. The C library expects to find it under "Return the file system that contains the store of OS." (store-file-system (operating-system-file-systems os))) -(define* (operating-system-grub.cfg os #:optional (old-entries '())) - "Return the GRUB configuration file for OS. Use OLD-ENTRIES to populate the -\"old entries\" menu." +(define* (operating-system-bootcfg os #:optional (old-entries '())) + "Return the bootloader configuration file for OS. Use OLD-ENTRIES to +populate the \"old entries\" menu." (mlet* %store-monad ((system (operating-system-derivation os)) (root-fs -> (operating-system-root-file-system os)) -- 2.12.2 From debbugs-submit-bounces@debbugs.gnu.org Sun Apr 02 09:53:08 2017 Received: (at 26339) by debbugs.gnu.org; 2 Apr 2017 13:53:08 +0000 Received: from localhost ([127.0.0.1]:56528 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cufwK-0000XR-FV for submit@debbugs.gnu.org; Sun, 02 Apr 2017 09:53:08 -0400 Received: from mail-wr0-f193.google.com ([209.85.128.193]:32891) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cufwI-0000Vq-4W for 26339@debbugs.gnu.org; Sun, 02 Apr 2017 09:53:06 -0400 Received: by mail-wr0-f193.google.com with SMTP id u18so26785331wrc.0 for <26339@debbugs.gnu.org>; Sun, 02 Apr 2017 06:53:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=HW6tu25hYJMxe2AWM1G4uquGLlLUJagnbrDha9T1cRQ=; b=a0VsNOUp9M/eQKg6DKGUqLOaTsS+kIbYtfoXWZT1wXqY6kBJgUbGghv93yTogZAHcp kszvrBfrWXk0UUIFqnylQzYGsOEFvkb2F9L+CrZH5cddW+jn8fmCAsPON9l/S1rB22Dr hHk3fQ2oBe9HE6jKE+AoammboHcEu6ZwORSqIHnQNnjIXrDJvfVJ2XpzkEfs09pLTmLe W0O1PTG3/ZqyZQmWaUzgvPP3B5ELU6dzEdGe7ot5oq4sPz0qlP3A3jkQzEno+w5VrpS+ w0mqAKbsTIiBprQLgIYruTObaeHUlHQQR4pqmFd9dQqHaPsWCnwQNcWaZ6KaUxJMU47c LVTA== 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:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=HW6tu25hYJMxe2AWM1G4uquGLlLUJagnbrDha9T1cRQ=; b=bRWKgoqBVjHPqJnqf2AqTnGjBLvbjaG6pBi6Da0BYpRCzOqdxwV7p0rBZmu8jD79Bw byIqqG+aoZQhPakLQGFm7Lws2uRxQDB6QHAPIJJMCHf+KmCENJKNai6arQL29mop0VDf T8MuJVRyCsfFhdHKSdVHWujFzi52W02XqXIXqvTo8282qPUOTO7LB/cikdfSVbqWcRAq 5VzUVtLtNf1HGRGTeV+J1I91/M36GaNd+Rv0BKAfbGo33Utr9p5FxVsq0xRSX/lEiHpn 1Eklq2BCdRwtJ07FOnLQcS/DbCdMef/yI2/sOM9dSmn0BGNanG13JUfoPQRzqCGk/oYE i03Q== X-Gm-Message-State: AFeK/H2KBWWaSvxNfsP8oqyL5Ojc2tCTYl8zzLlZVOxZo63wYSfAKUAniXNGAYme6h+vAA== X-Received: by 10.223.150.81 with SMTP id c17mr11131363wra.85.1491141180383; Sun, 02 Apr 2017 06:53:00 -0700 (PDT) Received: from cervin.8.8.8.8 (85-169-37-239.rev.numericable.fr. [85.169.37.239]) by smtp.gmail.com with ESMTPSA id q4sm10337047wme.17.2017.04.02.06.52.59 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 02 Apr 2017 06:52:59 -0700 (PDT) From: Mathieu Othacehe To: 26339@debbugs.gnu.org Subject: [PATCH 06/18] vm: Reword grub.cfg to boot.cfg Date: Sun, 2 Apr 2017 15:52:30 +0200 Message-Id: <20170402135242.2958-6-m.othacehe@gmail.com> X-Mailer: git-send-email 2.12.2 In-Reply-To: <20170402135242.2958-1-m.othacehe@gmail.com> References: <20170402135242.2958-1-m.othacehe@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 26339 Cc: Mathieu Othacehe 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.3 (--) * gnu/build/vm.scm (register-bootcfg-root): Reword grub.cfg to boot.cfg, (initialize-hard-disk): ditto, * gnu/system/vm.scm (system-disk-image): ditto, (system-qemu-image): ditto, (system-qemu-image/shared-store): ditto. --- gnu/build/vm.scm | 5 +++-- gnu/system/vm.scm | 21 +++++++++++---------- 2 files changed, 14 insertions(+), 12 deletions(-) diff --git a/gnu/build/vm.scm b/gnu/build/vm.scm index c536f4f44..766163e1d 100644 --- a/gnu/build/vm.scm +++ b/gnu/build/vm.scm @@ -2,6 +2,7 @@ ;;; Copyright © 2013, 2014, 2015, 2016 Ludovic Courtès ;;; Copyright © 2016 Christopher Allan Webber ;;; Copyright © 2016 Leo Famulari +;;; Copyright © 2017 Mathieu Othacehe ;;; ;;; This file is part of GNU Guix. ;;; @@ -284,7 +285,7 @@ SYSTEM-DIRECTORY is the name of the directory of the 'system' derivation." (reset-timestamps target)))) (define (register-bootcfg-root target bootcfg) - "On file system TARGET, register GRUB.CFG as a GC root." + "On file system TARGET, register BOOTCFG as a GC root." (let ((directory (string-append target "/var/guix/gcroots"))) (mkdir-p directory) (symlink bootcfg (string-append directory "/bootcfg")))) @@ -297,7 +298,7 @@ SYSTEM-DIRECTORY is the name of the directory of the 'system' derivation." install-bootloader (partitions '())) "Initialize DEVICE as a disk containing all the objects listed -in PARTITIONS, and using GRUB.CFG as its bootloader configuration file. +in PARTITIONS, and using BOOTCFG as its bootloader configuration file. Each partition is initialized by calling its 'initializer' procedure, passing it a directory name where it is mounted." diff --git a/gnu/system/vm.scm b/gnu/system/vm.scm index 6f852d7ea..7efbc872c 100644 --- a/gnu/system/vm.scm +++ b/gnu/system/vm.scm @@ -2,6 +2,7 @@ ;;; Copyright © 2013, 2014, 2015, 2016 Ludovic Courtès ;;; Copyright © 2016 Christopher Allan Webber ;;; Copyright © 2016 Leo Famulari +;;; Copyright © 2017 Mathieu Othacehe ;;; ;;; This file is part of GNU Guix. ;;; @@ -294,10 +295,10 @@ to USB sticks meant to be read-only." file-systems-to-keep))))) (mlet* %store-monad ((os-drv (operating-system-derivation os)) - (grub.cfg (operating-system-grub.cfg os))) + (bootcfg (operating-system-bootcfg os))) (qemu-image #:name name #:os.drv os-drv - #:bootcfg.drv grub.cfg + #:bootcfg.drv bootcfg #:bootloader-configuration (operating-system-bootloader os) #:disk-image-size disk-image-size #:disk-image-format "raw" @@ -306,7 +307,7 @@ to USB sticks meant to be read-only." #:copy-inputs? #t #:register-closures? #t #:inputs `(("system" ,os-drv) - ("grub.cfg" ,grub.cfg)))))) + ("bootcfg" ,bootcfg)))))) (define* (system-qemu-image os #:key @@ -339,14 +340,14 @@ of the GNU system as described by OS." file-systems-to-keep))))) (mlet* %store-monad ((os-drv (operating-system-derivation os)) - (grub.cfg (operating-system-grub.cfg os))) + (bootcfg (operating-system-bootcfg os))) (qemu-image #:os.drv os-drv - #:bootcfg.drv grub.cfg + #:bootcfg.drv bootcfg #:bootloader-configuration (operating-system-bootloader os) #:disk-image-size disk-image-size #:file-system-type file-system-type #:inputs `(("system" ,os-drv) - ("grub.cfg" ,grub.cfg)) + ("bootcfg" ,bootcfg)) #:copy-inputs? #t)))) @@ -435,17 +436,17 @@ When FULL-BOOT? is true, return an image that does a complete boot sequence, bootloaded included; thus, make a disk image that contains everything the bootloader refers to: OS kernel, initrd, bootloader data, etc." (mlet* %store-monad ((os-drv (operating-system-derivation os)) - (grub.cfg (operating-system-grub.cfg os))) + (bootcfg (operating-system-bootcfg os))) ;; XXX: When FULL-BOOT? is true, we end up creating an image that contains - ;; GRUB.CFG and all its dependencies, including the output of OS-DRV. + ;; BOOTCFG and all its dependencies, including the output of OS-DRV. ;; This is more than needed (we only need the kernel, initrd, GRUB for its ;; font, and the background image), but it's hard to filter that. (qemu-image #:os.drv os-drv - #:bootcfg.drv grub.cfg + #:bootcfg.drv bootcfg #:bootloader-configuration (operating-system-bootloader os) #:disk-image-size disk-image-size #:inputs (if full-boot? - `(("grub.cfg" ,grub.cfg)) + `(("bootcfg" ,bootcfg)) '()) ;; XXX: Passing #t here is too slow, so let it off by default. -- 2.12.2 From debbugs-submit-bounces@debbugs.gnu.org Sun Apr 02 09:53:09 2017 Received: (at 26339) by debbugs.gnu.org; 2 Apr 2017 13:53:09 +0000 Received: from localhost ([127.0.0.1]:56531 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cufwK-0000XT-R9 for submit@debbugs.gnu.org; Sun, 02 Apr 2017 09:53:09 -0400 Received: from mail-wr0-f175.google.com ([209.85.128.175]:34225) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cufwJ-0000W9-GJ for 26339@debbugs.gnu.org; Sun, 02 Apr 2017 09:53:07 -0400 Received: by mail-wr0-f175.google.com with SMTP id l43so137115853wre.1 for <26339@debbugs.gnu.org>; Sun, 02 Apr 2017 06:53:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=wICE6kn/6Fum0jBCoXTDJAfk2Le26OuU28dpXPDdOGg=; b=vgCuRbzh8/6vwJz5BYMEY0Eth0BwdsVYN0HWepR21Awgijfo8T7FbtEVI+aVDrNsP5 eiXn7NWqp+GvQLS0npF04B/bXDAOJv8XRCh7JowBOcxH93qEOw/SAPKwMOesKHIXf5l6 UaaBE0UgNI/4vJh/n7Odt7MqTsz+LtTEySIXiCoaL9ZL+mvwLZpcLGIJ4EBawGu6QXDO 2ev+CGODRm523DmZZOSKGjoqqn/KBg3FpNekqbGRQtTkdhFfqT76Aef74DWWgxCLRVuF hWWLGpfxT2ySYoPBw7WcLWcw7CGNWiohMYD/tMZ2weCleMmdGlvpNL96Y2/zesSkA4CV 5v6w== 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:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=wICE6kn/6Fum0jBCoXTDJAfk2Le26OuU28dpXPDdOGg=; b=WcsklTtvkX9NR0rBLb1eiuUsCeYZ8S7m2217MRpjabftHBMCxA0uBdF9/RmC6PJlmW G0QFI21m+PHhWshtOcPEkKZnNwTlNOnkywyoPOld1XWtljQKu3/nIX3I+VbGEjwKSYZK uHtO+BR3YZzTqT3QL/LZoryRXk7gsWafNel1qkVrzIIHLZRbKOfctVqG6VdiUrdOVHru 6Y9DTYjAcDiyXaG6ksXjYT3k17eX85z9D5+IqYIxWBj8SvuARAK6oWmq9o1qv7x3MD9k sEvGbgIxdeAEVtibHB+rgUpEwCK6UOjsgcP5MS3E+e5VqbeJ7VxYynSWOdMXswfQBCIA WI6A== X-Gm-Message-State: AFeK/H0Hdv23ANv4JwfgIQMyfKrFbI1zWVXcbuXu/7DDjZec11clxE4mS+WhpT6Fls3aiA== X-Received: by 10.223.171.131 with SMTP id s3mr11909879wrc.102.1491141181696; Sun, 02 Apr 2017 06:53:01 -0700 (PDT) Received: from cervin.8.8.8.8 (85-169-37-239.rev.numericable.fr. [85.169.37.239]) by smtp.gmail.com with ESMTPSA id q4sm10337047wme.17.2017.04.02.06.53.00 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 02 Apr 2017 06:53:00 -0700 (PDT) From: Mathieu Othacehe To: 26339@debbugs.gnu.org Subject: [PATCH 07/18] system: Add bootloader type. Date: Sun, 2 Apr 2017 15:52:31 +0200 Message-Id: <20170402135242.2958-7-m.othacehe@gmail.com> X-Mailer: git-send-email 2.12.2 In-Reply-To: <20170402135242.2958-1-m.othacehe@gmail.com> References: <20170402135242.2958-1-m.othacehe@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 26339 Cc: Mathieu Othacehe 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.3 (--) * gnu/system/bootloader.scm ()[type]: New field. (%extlinux-configuration, %grub-configuration, %grub-efi-configuration, %syslinux-configuration): New exported variables. (extlinux-configuration, grub-configuration, grub-efi-configuration, syslinux-configuration): New exported compatibility macros. --- gnu/system/bootloader.scm | 116 ++++++++++++++++++++++++++++++++-------------- 1 file changed, 82 insertions(+), 34 deletions(-) diff --git a/gnu/system/bootloader.scm b/gnu/system/bootloader.scm index ea570ee00..c2b23c380 100644 --- a/gnu/system/bootloader.scm +++ b/gnu/system/bootloader.scm @@ -1,5 +1,6 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2017 David Craven +;;; Copyright © 2017 Mathieu Othacehe ;;; ;;; This file is part of GNU Guix. ;;; @@ -22,10 +23,12 @@ #:use-module (guix gexp) #:use-module (guix packages) #:use-module (guix records) + #:use-module (srfi srfi-1) #:use-module (ice-9 match) #:export (bootloader-configuration bootloader-configuration? bootloader-configuration-bootloader + bootloader-configuration-type bootloader-configuration-device bootloader-configuration-menu-entries bootloader-configuration-default-entry @@ -35,6 +38,13 @@ bootloader-configuration-install-procedure bootloader-configuration-additional-configuration + %extlinux-configuration + %grub-configuration + %grub-efi-configuration + %syslinux-configuration + + lookup-bootloader-configuration + extlinux-configuration grub-configuration grub-efi-configuration @@ -55,6 +65,8 @@ bootloader-configuration? (bootloader bootloader-configuration-bootloader ; package (default #f)) + (type bootloader-configuration-type + (default #f)) ; symbol (device bootloader-configuration-device ; string (default #f)) (menu-entries bootloader-configuration-menu-entries ; list of @@ -128,40 +140,6 @@ TIMEOUT ~a~%" ;;; -;;; Bootloader configurations. -;;; - -(define* (extlinux-configuration #:optional (config (bootloader-configuration))) - (bootloader-configuration - (inherit config) - (configuration-file-location "/boot/extlinux/extlinux.conf") - (configuration-file-procedure extlinux-configuration-file))) - -(define* (grub-configuration #:optional (config (bootloader-configuration))) - (bootloader-configuration - (inherit config) - (bootloader (@ (gnu packages bootloaders) grub)) - (configuration-file-location "/boot/grub/grub.cfg") - (configuration-file-procedure grub-configuration-file) - (install-procedure install-grub) - (additional-configuration - (let ((additional-config (bootloader-configuration-additional-configuration config))) - (if additional-config additional-config %default-theme))))) - -(define* (grub-efi-configuration #:optional (config (bootloader-configuration))) - (bootloader-configuration - (inherit (grub-configuration config)) - (bootloader (@ (gnu packages bootloaders) grub-efi)))) - -(define* (syslinux-configuration #:optional (config (bootloader-configuration))) - (bootloader-configuration - (inherit (extlinux-configuration config)) - (bootloader (@ (gnu packages bootloaders) syslinux)) - (install-procedure install-syslinux))) - - - -;;; ;;; Bootloader install procedures. ;;; @@ -202,4 +180,74 @@ TIMEOUT ~a~%" (#$dd 440 1 (string-append syslinux-dir "/mbr.bin") device)) (error "failed to install SYSLINUX"))))) + +;;; +;;; Bootloader configurations. +;;; + +(define* %extlinux-configuration + (bootloader-configuration + (type 'extlinux) + (configuration-file-location "/boot/extlinux/extlinux.conf") + (configuration-file-procedure extlinux-configuration-file))) + +(define* %grub-configuration + (bootloader-configuration + (type 'grub) + (bootloader (@ (gnu packages bootloaders) grub)) + (configuration-file-location "/boot/grub/grub.cfg") + (configuration-file-procedure grub-configuration-file) + (install-procedure install-grub) + (additional-configuration %default-theme))) + +(define* %grub-efi-configuration + (bootloader-configuration + (inherit %grub-configuration) + (type 'grub-efi) + (bootloader (@ (gnu packages bootloaders) grub-efi)))) + +(define* %syslinux-configuration + (bootloader-configuration + (inherit %extlinux-configuration) + (type 'syslinux) + (bootloader (@ (gnu packages bootloaders) syslinux)) + (install-procedure install-syslinux))) + +(define %bootloader-configurations + (list %extlinux-configuration + %grub-configuration + %grub-efi-configuration + %syslinux-configuration)) + +(define (lookup-bootloader-configuration type) + (or (find (lambda (conf) + (eq? (bootloader-configuration-type conf) + type)) + %bootloader-configurations) + (error "~a: unknown bootloader type" type))) + +;;; +;;; Compatibility macros. +;;; + +(define-syntax-rule (extlinux-configuration fields ...) + (bootloader-configuration + (inherit %extlinux-configuration) + fields ...)) + +(define-syntax-rule (grub-configuration fields ...) + (bootloader-configuration + (inherit %grub-configuration) + fields ...)) + +(define-syntax-rule (grub-efi-configuration fields ...) + (bootloader-configuration + (inherit %grub-efi-configuration) + fields ...)) + +(define-syntax-rule (syslinux-configuration fields ...) + (bootloader-configuration + (inherit %syslinux-configuration) + fields ...)) + ;;; bootloader.scm ends here -- 2.12.2 From debbugs-submit-bounces@debbugs.gnu.org Sun Apr 02 09:53:10 2017 Received: (at 26339) by debbugs.gnu.org; 2 Apr 2017 13:53:10 +0000 Received: from localhost ([127.0.0.1]:56534 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cufwM-0000Xs-73 for submit@debbugs.gnu.org; Sun, 02 Apr 2017 09:53:10 -0400 Received: from mail-wr0-f179.google.com ([209.85.128.179]:36182) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cufwK-0000WO-GD for 26339@debbugs.gnu.org; Sun, 02 Apr 2017 09:53:08 -0400 Received: by mail-wr0-f179.google.com with SMTP id w11so134381738wrc.3 for <26339@debbugs.gnu.org>; Sun, 02 Apr 2017 06:53:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=cM5dY3YUx7XVYMO0BFxgo/dWj9xk8Qf+sv81CQ8q+2M=; b=U27i3WYXfGBI1Hv2DfxlCck29V37s48V9b57jEQ0Xdss2tqt56iI6PtxdG/2kp+qkV ylvNJI+uFF4m59YIBGHhURq11PsVvok13RyD2QBH3xTqFQfFKsWS54TmBAKVwrQwF4Oa x/zOELCefgqp7r2KwQ98iJa5gaBT0udBFloDoV7xcSUPep+O7Wx379fgyKKcGTfWLoYT P2QuSQFlpU6LZgS3Q+bQ/YavzNbvaOD8SHL8abOwGnzrU6jURf6uPv/fx0eAmppbb1Jl NlWPn2tMtNtl7SQvccAA/PCkbrChqqEO21Dbkt3gsZQ6W5OtYfCFnXaK9fliWqGp8FKN M6uQ== 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:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=cM5dY3YUx7XVYMO0BFxgo/dWj9xk8Qf+sv81CQ8q+2M=; b=gwa8ecVXuXbcBsRj66/lZ5jB+3CRZzpADcQXVUd9xUdP0olyqZdqIn1kmHC2Y6dYur +vCFPu924Q0mCHF5jXxV2tldyWwahfKsCFmxXb3vJrszLOaye6soZASZn0MPOb6c5dKG gwn99qMXVcMPRuAW4QHxnzh4UsO1DKuxvagM4uSA5QzfPgW0FVtQEG27fEURjBhBngZI qw3cZ6S879GdC5bz1UyZWeycxpbmwSv8umXLnlNGIyWD7L51ezicCQBgqnKeqCI8Hkaj VDiVKjHxjK5lG/cbnp6Ea/kkBCeZSAZyiU2vxsZq32C3NVJJ3XmrgJhmWSndIRmscrE6 pSxg== X-Gm-Message-State: AFeK/H0mpSzdLrKQh7GOJ9UA/5siweLyvTPjFRN0q+hcqXBgXUQZpz4y 40gg3ZfU/X17nA== X-Received: by 10.28.31.139 with SMTP id f133mr5724001wmf.25.1491141182780; Sun, 02 Apr 2017 06:53:02 -0700 (PDT) Received: from cervin.8.8.8.8 (85-169-37-239.rev.numericable.fr. [85.169.37.239]) by smtp.gmail.com with ESMTPSA id q4sm10337047wme.17.2017.04.02.06.53.01 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 02 Apr 2017 06:53:01 -0700 (PDT) From: Mathieu Othacehe To: 26339@debbugs.gnu.org Subject: [PATCH 08/18] bootloader: Stop using grub module. Date: Sun, 2 Apr 2017 15:52:32 +0200 Message-Id: <20170402135242.2958-8-m.othacehe@gmail.com> X-Mailer: git-send-email 2.12.2 In-Reply-To: <20170402135242.2958-1-m.othacehe@gmail.com> References: <20170402135242.2958-1-m.othacehe@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 26339 Cc: Mathieu Othacehe 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.3 (--) * gnu.scm (%public-modules): Replace grub by bootloader. * gnu/tests.scm (define-module): Ditto. * gnu/tests/nfs.scm (define-module): Ditto. * gnu/tests/web.scm (define-module): Ditto. --- gnu.scm | 3 ++- gnu/tests.scm | 3 ++- gnu/tests/nfs.scm | 3 ++- gnu/tests/web.scm | 2 +- 4 files changed, 7 insertions(+), 4 deletions(-) diff --git a/gnu.scm b/gnu.scm index 932e4cdd5..56b84b74d 100644 --- a/gnu.scm +++ b/gnu.scm @@ -1,6 +1,7 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2014, 2015, 2016 Ludovic Courtès ;;; Copyright © 2015 Joshua S. Grant +;;; Copyright © 2017 Mathieu Othacehe ;;; ;;; This file is part of GNU Guix. ;;; @@ -34,7 +35,7 @@ '((gnu system) (gnu system mapped-devices) (gnu system file-systems) - (gnu system grub) ; 'grub-configuration' + (gnu system bootloader) (gnu system pam) (gnu system shadow) ; 'user-account' (gnu system linux-initrd) diff --git a/gnu/tests.scm b/gnu/tests.scm index e84d1ebb2..25c7c3fd3 100644 --- a/gnu/tests.scm +++ b/gnu/tests.scm @@ -1,5 +1,6 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2016, 2017 Ludovic Courtès +;;; Copyright © 2017 Mathieu Othacehe ;;; ;;; This file is part of GNU Guix. ;;; @@ -21,7 +22,7 @@ #:use-module (guix utils) #:use-module (guix records) #:use-module (gnu system) - #:use-module (gnu system grub) + #:use-module (gnu system bootloader) #:use-module (gnu system file-systems) #:use-module (gnu system shadow) #:use-module (gnu services) diff --git a/gnu/tests/nfs.scm b/gnu/tests/nfs.scm index 1f28f5a5b..432fc83a1 100644 --- a/gnu/tests/nfs.scm +++ b/gnu/tests/nfs.scm @@ -1,6 +1,7 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2016 Ludovic Courtès ;;; Copyright © 2016 John Darrington +;;; Copyright © 2017 Mathieu Othacehe ;;; ;;; This file is part of GNU Guix. ;;; @@ -20,7 +21,7 @@ (define-module (gnu tests nfs) #:use-module (gnu tests) #:use-module (gnu system) - #:use-module (gnu system grub) + #:use-module (gnu system bootloader) #:use-module (gnu system file-systems) #:use-module (gnu system shadow) #:use-module (gnu system vm) diff --git a/gnu/tests/web.scm b/gnu/tests/web.scm index cdc579123..0e98a128c 100644 --- a/gnu/tests/web.scm +++ b/gnu/tests/web.scm @@ -1,5 +1,6 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2017 Ludovic Courtès +;;; Copyright © 2017 Mathieu Othacehe ;;; ;;; This file is part of GNU Guix. ;;; @@ -19,7 +20,6 @@ (define-module (gnu tests web) #:use-module (gnu tests) #:use-module (gnu system) - #:use-module (gnu system grub) #:use-module (gnu system file-systems) #:use-module (gnu system shadow) #:use-module (gnu system vm) -- 2.12.2 From debbugs-submit-bounces@debbugs.gnu.org Sun Apr 02 09:53:13 2017 Received: (at 26339) by debbugs.gnu.org; 2 Apr 2017 13:53:13 +0000 Received: from localhost ([127.0.0.1]:56538 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cufwN-0000Y6-Fw for submit@debbugs.gnu.org; Sun, 02 Apr 2017 09:53:11 -0400 Received: from mail-wr0-f171.google.com ([209.85.128.171]:36188) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cufwL-0000WQ-Fn for 26339@debbugs.gnu.org; Sun, 02 Apr 2017 09:53:09 -0400 Received: by mail-wr0-f171.google.com with SMTP id w11so134382062wrc.3 for <26339@debbugs.gnu.org>; Sun, 02 Apr 2017 06:53:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Ztx/U9+GfNGB14Gb2UfX3oOPuOoU3FlymdDuvEJfcfw=; b=CUMM0HjnDz2W9wWTA+AHEShQ9I0oMB5jbUqZ+t9Z1wc/XsvgB9TKkUx/Gll4Im1HOV ivfHtaFwmkpie3DhMqH2du/4cfT1JnDKwG7VwT5pObbonZCr/8EJB66M8yweWKX1v0kr pjwAYPrAMLqAmwP/Hudr+ptrQhksLYFXfKjRO/MTha3liGrsFwO8pacd1W9RBjrKt39E 84ATgtcIWAPCOEaCIueGDpN+DUer0u3T8Mb1OJPD40dRoU1THM1txneRHV+S8YbWftwI seelkHKJFzl+7hV8byN6XSvk5jXl5hqiO43m1TTFX4qIjpzlk3YaHJW3mblJzh+84nyJ Mx3g== 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:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Ztx/U9+GfNGB14Gb2UfX3oOPuOoU3FlymdDuvEJfcfw=; b=lCY+jN+WLEhjmxwsmGpPMN+PlQWF4QQJHAjJ/xI4QfwBJ8htQTMjvbc3epN2QxcVsi +NFNgOSLvEs73sFW6U3vUhcvftVe6Y1eW6i+lWe5iFx00ttHBjxHfbtVElIfaYwP4F7P CUXzGivbGmhWSSfQ1uterPx0d+INGHgguYPVzek0FkHQynX3XsQpS6NxxAh6AMrzjccm B5bFKWoMUGOufwjfSkhpkl58d6sWrVOXRLE0LkYICx6PR+04hhJFMZalPNliP2BWbZyG Lt5blywrjgIkFofQeIRZCY4VhyD1Y75X5MO2zMC6F7koj/lcapYiPs0FPzN8/K6GahU3 KRMA== X-Gm-Message-State: AFeK/H25X65FmV6bETi9hwBDwT1fIaHS2rIrn11uXmUmb4qpojpEo/Q7 A4q2M+SGjBy/mA== X-Received: by 10.28.48.16 with SMTP id w16mr5392213wmw.10.1491141183770; Sun, 02 Apr 2017 06:53:03 -0700 (PDT) Received: from cervin.8.8.8.8 (85-169-37-239.rev.numericable.fr. [85.169.37.239]) by smtp.gmail.com with ESMTPSA id q4sm10337047wme.17.2017.04.02.06.53.02 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 02 Apr 2017 06:53:03 -0700 (PDT) From: Mathieu Othacehe To: 26339@debbugs.gnu.org Subject: [PATCH 09/18] scripts: system: Move save-load-path-excursion and save-environment-excursion macros to the top. Date: Sun, 2 Apr 2017 15:52:33 +0200 Message-Id: <20170402135242.2958-9-m.othacehe@gmail.com> X-Mailer: git-send-email 2.12.2 In-Reply-To: <20170402135242.2958-1-m.othacehe@gmail.com> References: <20170402135242.2958-1-m.othacehe@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.8 (--) X-Debbugs-Envelope-To: 26339 Cc: Mathieu Othacehe 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.8 (--) * guix/scripts/system.scm (save-load-path-excursion, save-environment-excursion): Move definitions to the top of the file. It allows to use them in the whole file. --- guix/scripts/system.scm | 47 ++++++++++++++++++++++++----------------------- 1 file changed, 24 insertions(+), 23 deletions(-) diff --git a/guix/scripts/system.scm b/guix/scripts/system.scm index 04274919e..2ad210207 100644 --- a/guix/scripts/system.scm +++ b/guix/scripts/system.scm @@ -2,6 +2,7 @@ ;;; Copyright © 2014, 2015, 2016 Ludovic Courtès ;;; Copyright © 2016 Alex Kost ;;; Copyright © 2016 Chris Marusich +;;; Copyright © 2017 Mathieu Othacehe ;;; ;;; This file is part of GNU Guix. ;;; @@ -77,6 +78,29 @@ ;;; Installation. ;;; +(define-syntax-rule (save-load-path-excursion body ...) + "Save the current values of '%load-path' and '%load-compiled-path', run +BODY..., and restore them." + (let ((path %load-path) + (cpath %load-compiled-path)) + (dynamic-wind + (const #t) + (lambda () + body ...) + (lambda () + (set! %load-path path) + (set! %load-compiled-path cpath))))) + +(define-syntax-rule (save-environment-excursion body ...) + "Save the current environment variables, run BODY..., and restore them." + (let ((env (environ))) + (dynamic-wind + (const #t) + (lambda () + body ...) + (lambda () + (environ env))))) + (define topologically-sorted* (store-lift topologically-sorted)) @@ -201,29 +225,6 @@ the ownership of '~a' may be incorrect!~%") ;; The system profile. (string-append %state-directory "/profiles/system")) -(define-syntax-rule (save-environment-excursion body ...) - "Save the current environment variables, run BODY..., and restore them." - (let ((env (environ))) - (dynamic-wind - (const #t) - (lambda () - body ...) - (lambda () - (environ env))))) - -(define-syntax-rule (save-load-path-excursion body ...) - "Save the current values of '%load-path' and '%load-compiled-path', run -BODY..., and restore them." - (let ((path %load-path) - (cpath %load-compiled-path)) - (dynamic-wind - (const #t) - (lambda () - body ...) - (lambda () - (set! %load-path path) - (set! %load-compiled-path cpath))))) - (define-syntax-rule (with-shepherd-error-handling mbody ...) "Catch and report Shepherd errors that arise when binding MBODY, a monadic expression in %STORE-MONAD." -- 2.12.2 From debbugs-submit-bounces@debbugs.gnu.org Sun Apr 02 09:53:14 2017 Received: (at 26339) by debbugs.gnu.org; 2 Apr 2017 13:53:14 +0000 Received: from localhost ([127.0.0.1]:56542 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cufwQ-0000YZ-AE for submit@debbugs.gnu.org; Sun, 02 Apr 2017 09:53:14 -0400 Received: from mail-wr0-f193.google.com ([209.85.128.193]:34382) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cufwM-0000Wk-Ab for 26339@debbugs.gnu.org; Sun, 02 Apr 2017 09:53:10 -0400 Received: by mail-wr0-f193.google.com with SMTP id w43so26771765wrb.1 for <26339@debbugs.gnu.org>; Sun, 02 Apr 2017 06:53:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=QLqRtBE1YuuNkEBy0FeZxziNbuhoNZBKA9ShGy8/9GQ=; b=GovmZrH6jNqWl+WuPQK/4jiwWYh/fqiNGdVrODPRHBbHJv4AV12f94OeDwkfB4iuPv IGFzMxV557Hzlld6++xoPjCoUiC5O5Ey6+0XuTLTDcyaYNPXJ40BWuk8mv4QZrz79I/L alLpnaPVkKgVeoYzKKv5HZpLhiNj8YalRbUVeNgSm1ineVljmwCd/xKscvGKCMx3kqtE vhxVWybiogFO8rSzJUm+WJF+CK2BblARhNgiL9xOk5ZpiuYGckNapAeP5eidyl1xPFyH 3gUKgPyk4DJqfkSL6syz1u2zdpnKDZM+kk4jAspd5O2n8E2dVHBxMp8TYgEwuIScgK+9 3pwg== 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:date:message-id:in-reply-to :references; bh=QLqRtBE1YuuNkEBy0FeZxziNbuhoNZBKA9ShGy8/9GQ=; b=MgAUMdlmXzqfw+EtDkwXmI45lKHh/8dadCJ6yVpek2YUCww5TzHMys5E/3N3Gwh8fz MB2yUd0/dMDshNvGuc+yBgKElcX/5Q7zmkqhAg8IWbbQfVbXMhjJxcLQzxeZOFpiAhlI lzawpu8LMnpMKB8zra0qUM+/ch4vnYIsVDZafNOBJ/ry/Ucccqcd2us/ImaIMQpmf8uk /ahObaU2qqTCw0GbVjr8SPYw2RsMj8/trw1e7Zu1VAk6Gtzodi8X9pP6bxQRblHDPukj dssapKvrmHoQNKLiFYqNRoVQMpXmabs55JIBjcLGan6YpYvEkr7IZL+/jLbxG9g6qY/f fFVA== X-Gm-Message-State: AFeK/H1UHTuV7HgxB+PqHclEHVE82dPrPkAhyGOEFwu7sXUtREPfSNL4YcxDeXAFnRNuhg== X-Received: by 10.28.139.195 with SMTP id n186mr6125006wmd.139.1491141184608; Sun, 02 Apr 2017 06:53:04 -0700 (PDT) Received: from cervin.8.8.8.8 (85-169-37-239.rev.numericable.fr. [85.169.37.239]) by smtp.gmail.com with ESMTPSA id q4sm10337047wme.17.2017.04.02.06.53.03 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 02 Apr 2017 06:53:03 -0700 (PDT) From: Mathieu Othacehe To: 26339@debbugs.gnu.org Subject: [PATCH 10/18] system: Rename kernel->grub-label to kernel->boot-label. Date: Sun, 2 Apr 2017 15:52:34 +0200 Message-Id: <20170402135242.2958-10-m.othacehe@gmail.com> X-Mailer: git-send-email 2.12.2 In-Reply-To: <20170402135242.2958-1-m.othacehe@gmail.com> References: <20170402135242.2958-1-m.othacehe@gmail.com> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 26339 Cc: Mathieu Othacehe 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.3 (--) * gnu/system.scm (kernel->grub-label): Rename to kernel->boot-label. (operating-system-grub.cfg): Adapt. (operating-system-parameters-file): Ditto. --- gnu/system.scm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/gnu/system.scm b/gnu/system.scm index a9b05806a..6c41fe814 100644 --- a/gnu/system.scm +++ b/gnu/system.scm @@ -702,8 +702,8 @@ listed in OS. The C library expects to find it under (locale-directory definitions #:libcs (operating-system-locale-libcs os))) -(define (kernel->grub-label kernel) - "Return a label for the GRUB menu entry that boots KERNEL." +(define (kernel->boot-label kernel) + "Return a label for the bootloader menu entry that boots KERNEL." (string-append "GNU with " (string-titlecase (package-name kernel)) " " (package-version kernel) @@ -737,7 +737,7 @@ populate the \"old entries\" menu." ((system (operating-system-derivation os)) (root-fs -> (operating-system-root-file-system os)) (store-fs -> (operating-system-store-file-system os)) - (label -> (kernel->grub-label (operating-system-kernel os))) + (label -> (kernel->boot-label (operating-system-kernel os))) (kernel -> (operating-system-kernel-file os)) (initrd (operating-system-initrd-file os)) (root-device -> (if (eq? 'uuid (file-system-title root-fs)) @@ -777,7 +777,7 @@ this file is the reconstruction of GRUB menu entries for old configurations." (mlet %store-monad ((initrd (operating-system-initrd-file os)) (root -> (operating-system-root-file-system os)) (store -> (operating-system-store-file-system os)) - (label -> (kernel->grub-label + (label -> (kernel->boot-label (operating-system-kernel os)))) (gexp->file "parameters" #~(boot-parameters -- 2.12.2 From debbugs-submit-bounces@debbugs.gnu.org Sun Apr 02 09:53:14 2017 Received: (at 26339) by debbugs.gnu.org; 2 Apr 2017 13:53:15 +0000 Received: from localhost ([127.0.0.1]:56544 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cufwQ-0000Yf-IY for submit@debbugs.gnu.org; Sun, 02 Apr 2017 09:53:14 -0400 Received: from mail-wr0-f195.google.com ([209.85.128.195]:35936) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cufwN-0000Ws-Bk for 26339@debbugs.gnu.org; Sun, 02 Apr 2017 09:53:11 -0400 Received: by mail-wr0-f195.google.com with SMTP id k6so25493623wre.3 for <26339@debbugs.gnu.org>; Sun, 02 Apr 2017 06:53:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=0RRDeUWmYloZAmml+mByHuP9lsB4YMW9EqJrey6x9fg=; b=iG4i3184jQBNml0V+aZ2FVrzf2RMYPWVsvs8jJbi8AyaLeYIwVZXgTA5b5XDOVOm1o /w0eVZBosRVKNZ5ESFQVWBrU+LLkFY514RaG/Jw8TVqKvd877g9MiYANgE48LzchOwtV g+4dpjUp3rmPd+JY4UFsBvxqNtmOH+2kNdC979Np3kM91i67qXr9wvMcT0KwMB0d4Cqv 9iP1ldfnNKsuECJC3Y3Gof3c4DW3B74XuUXEhY24gj3GxU4maZXOZFXo6m/CyzaY+hTp IFuoCVSQvEBay8ldN+PCFZS5UYAY0EBwDwP4z6LQ6wgz7TVWbQe2nfqFMFcPLouIzTn3 e8AA== 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:date:message-id:in-reply-to :references; bh=0RRDeUWmYloZAmml+mByHuP9lsB4YMW9EqJrey6x9fg=; b=eP7z/3aVfxWGOrFuU/eNwflkKTW1fS9OzyHfMRfms5oSgQaNIHMayu67hOL1fkaUtE yHyH+RfHwFPZgs3WLYYDKE7qM+ymGIEHjIKEqX2YXwrPNfEQfmWgJksn8H3vajzZ2W+7 0moL1aFB02RJtCG6tOs5rFodL2AXX5+ORShS4K7AR+upewj8/4WnhDAVO9gboxss0l06 93afqaO15uBMuGGBSkRRJAm74vJac04dgjQJxKGtC3nO10pco0MabHdLqJYspemPn9aA UgZZ2keHjdEiYCfBLMblIgEYGleGVjPwvEvFxkMTjqdolusDVlztwP5AAQJVEwxVnWV6 kRyA== X-Gm-Message-State: AFeK/H0+hW3QlXpjuljufiVVyzg+fzL8vf+JrLpBc78lwXhyYDb7fakuVy4cNV8NJOUU8g== X-Received: by 10.28.86.68 with SMTP id k65mr5920235wmb.112.1491141185675; Sun, 02 Apr 2017 06:53:05 -0700 (PDT) Received: from cervin.8.8.8.8 (85-169-37-239.rev.numericable.fr. [85.169.37.239]) by smtp.gmail.com with ESMTPSA id q4sm10337047wme.17.2017.04.02.06.53.04 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 02 Apr 2017 06:53:04 -0700 (PDT) From: Mathieu Othacehe To: 26339@debbugs.gnu.org Subject: [PATCH 11/18] bootloader: Add device and type to bootloader-configuration record. Date: Sun, 2 Apr 2017 15:52:35 +0200 Message-Id: <20170402135242.2958-11-m.othacehe@gmail.com> X-Mailer: git-send-email 2.12.2 In-Reply-To: <20170402135242.2958-1-m.othacehe@gmail.com> References: <20170402135242.2958-1-m.othacehe@gmail.com> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 26339 Cc: Mathieu Othacehe 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.3 (--) * gnu/system.scm ()[device, type]: New fields. (boot-parameters-boot-device): New exported procedure. (boot-parameters-boot-type): Ditto. (operating-system-grub.cfg): Add new fields. (operating-system-parameters-file): Add new fields and replace GRUB by bootloader in doctype. (read-boot-parameters): Ditto. * gnu/system/bootloader.scm (extlinux-configuration-file): Adapt matching to new fields. --- gnu/system.scm | 29 ++++++++++++++++++++++++++++- gnu/system/bootloader.scm | 2 +- 2 files changed, 29 insertions(+), 2 deletions(-) diff --git a/gnu/system.scm b/gnu/system.scm index 6c41fe814..9775e5be8 100644 --- a/gnu/system.scm +++ b/gnu/system.scm @@ -105,6 +105,8 @@ boot-parameters? boot-parameters-label boot-parameters-root-device + boot-parameters-boot-device + boot-parameters-boot-type boot-parameters-store-device boot-parameters-store-mount-point boot-parameters-kernel @@ -736,8 +738,12 @@ populate the \"old entries\" menu." (mlet* %store-monad ((system (operating-system-derivation os)) (root-fs -> (operating-system-root-file-system os)) + (boot-device -> (bootloader-configuration-device + (operating-system-bootloader os))) (store-fs -> (operating-system-store-file-system os)) (label -> (kernel->boot-label (operating-system-kernel os))) + (boot-type -> (bootloader-configuration-type + (operating-system-bootloader os))) (kernel -> (operating-system-kernel-file os)) (initrd (operating-system-initrd-file os)) (root-device -> (if (eq? 'uuid (file-system-title root-fs)) @@ -746,12 +752,14 @@ populate the \"old entries\" menu." (entries -> (list (boot-parameters (label label) (root-device root-device) + (boot-device boot-device) ;; The device where the kernel and initrd live. (store-device (grub-device store-fs)) (store-mount-point (file-system-mount-point store-fs)) + (boot-type boot-type) (kernel kernel) (kernel-arguments (cons* (string-append "--root=" root-device) @@ -773,10 +781,15 @@ device in a ." (define (operating-system-parameters-file os) "Return a file that describes the boot parameters of OS. The primary use of -this file is the reconstruction of GRUB menu entries for old configurations." +this file is the reconstruction of bootloader menu entries for old +configurations." (mlet %store-monad ((initrd (operating-system-initrd-file os)) (root -> (operating-system-root-file-system os)) + (boot-device -> (bootloader-configuration-device + (operating-system-bootloader os))) (store -> (operating-system-store-file-system os)) + (boot-type -> (bootloader-configuration-type + (operating-system-bootloader os))) (label -> (kernel->boot-label (operating-system-kernel os)))) (gexp->file "parameters" @@ -788,6 +801,8 @@ this file is the reconstruction of GRUB menu entries for old configurations." (kernel-arguments #$(operating-system-kernel-arguments os)) (initrd #$initrd) + (boot-device #$boot-device) + (boot-type #$boot-type) (store (device #$(grub-device store)) (mount-point #$(file-system-mount-point store)))) @@ -809,6 +824,8 @@ this file is the reconstruction of GRUB menu entries for old configurations." ;; exactly to the device field of the object representing the ;; OS's root file system, so it might be a device path like "/dev/sda3". (root-device boot-parameters-root-device) + (boot-device boot-parameters-boot-device) + (boot-type boot-parameters-boot-type) (store-device boot-parameters-store-device) (store-mount-point boot-parameters-store-mount-point) (kernel boot-parameters-kernel) @@ -827,6 +844,16 @@ this file is the reconstruction of GRUB menu entries for old configurations." (label label) (root-device root) + (boot-device + (match (assq 'boot-device rest) + ((_ args) args) + (#f #f))) ; for compatibility reasons. + + (boot-type + (match (assq 'boot-type rest) + ((_ args) args) + (#f 'grub))) ; for compatibility reasons. + ;; In the past, we would store the directory name of the kernel instead ;; of the absolute file name of its image. Detect that and correct it. (kernel (if (string=? linux (direct-store-path linux)) diff --git a/gnu/system/bootloader.scm b/gnu/system/bootloader.scm index c2b23c380..b4774792e 100644 --- a/gnu/system/bootloader.scm +++ b/gnu/system/bootloader.scm @@ -104,7 +104,7 @@ corresponding to old generations of the system." (define boot-parameters->gexp (match-lambda - (($ label _ _ _ kernel kernel-arguments initrd) + (($ label _ _ _ _ _ kernel kernel-arguments initrd) #~(format port "LABEL ~a MENU LABEL ~a KERNEL ~a -- 2.12.2 From debbugs-submit-bounces@debbugs.gnu.org Sun Apr 02 09:53:15 2017 Received: (at 26339) by debbugs.gnu.org; 2 Apr 2017 13:53:15 +0000 Received: from localhost ([127.0.0.1]:56547 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cufwQ-0000Yk-Si for submit@debbugs.gnu.org; Sun, 02 Apr 2017 09:53:15 -0400 Received: from mail-wr0-f195.google.com ([209.85.128.195]:32948) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cufwO-0000X6-A2 for 26339@debbugs.gnu.org; Sun, 02 Apr 2017 09:53:13 -0400 Received: by mail-wr0-f195.google.com with SMTP id u18so26785658wrc.0 for <26339@debbugs.gnu.org>; Sun, 02 Apr 2017 06:53:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=XYSKWqinI9CzBIgHdKeSeLpFFPaKuRBphyBdiARACq0=; b=TNylWZCKwUqtrHRGif8VGMCuDSn8Xjn+QF61mUJDTHqEZTsxV6pDvQDneNt2FQeT+w sSyCCt/Vz0SN8sB/U/k94MaT4I52hkOV9kEU3U4eArEXmkTskgiZ0j8/fNSR4G3nF2wt JuAzyZWnGaoYRbS86WhluvVOpSaBOflYMtRqWaPT6nZzN6gOCXxa0sR6Je/SaUJ5TiT8 JLZitenEKQRUqXyMSynD6zT1n5kw7q3uAgq1UHhvzwTBuH9xdeIhB9Ir4voXMSwzAaq9 Gll3vrO6RKhSonZ60KrJiGznQV1s8c29krvgqm+/6iNsvz+7qEEX77ra9LHY9WAh3pvZ 2/rA== 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:date:message-id:in-reply-to :references; bh=XYSKWqinI9CzBIgHdKeSeLpFFPaKuRBphyBdiARACq0=; b=AE3z9RkvUeRJUfXX36ku2mQXtnhUOu+h9cG0VtKmpoBW+pqqvh2cjPCIrEhmpJiRNy JYEK1Vt7iuDa48f7c/cZ3fUiHlSfOQW1Q9vhcMOadxmv2uiHXfHwHBVioprgCWKEyhxX jy4m49qtTpbKAZ251kyZ4r/rOv0p/1DXQr1jMW52iMR0CokOS+rZTlptYu34iDaI26gM h0aPthcJhHbFgNc6MVmS7sCqXUz8yKOtvh/TjR5adVPouiB9toZoPundsDhFMtohcA69 iXbCLXOIY5Kx6oCv9KeMzxaiiKzrk/hm0EBtNfE3qWvh3PyW7rBlG0RPT16iyjqjZzv+ 9fJQ== X-Gm-Message-State: AFeK/H01NJxP3GM9kHkoXXv5WhcNq0NOeH7t0thJ4EbtNqXgOOYhtiq6 3ClkjL9I14wSIsV6 X-Received: by 10.28.26.69 with SMTP id a66mr5366579wma.88.1491141186640; Sun, 02 Apr 2017 06:53:06 -0700 (PDT) Received: from cervin.8.8.8.8 (85-169-37-239.rev.numericable.fr. [85.169.37.239]) by smtp.gmail.com with ESMTPSA id q4sm10337047wme.17.2017.04.02.06.53.05 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 02 Apr 2017 06:53:05 -0700 (PDT) From: Mathieu Othacehe To: 26339@debbugs.gnu.org Subject: [PATCH 12/18] system: Rename grub-device to fs->boot-device. Date: Sun, 2 Apr 2017 15:52:36 +0200 Message-Id: <20170402135242.2958-12-m.othacehe@gmail.com> X-Mailer: git-send-email 2.12.2 In-Reply-To: <20170402135242.2958-1-m.othacehe@gmail.com> References: <20170402135242.2958-1-m.othacehe@gmail.com> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 26339 Cc: Mathieu Othacehe 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.3 (--) * gnu/system.scm (grub-device): Rename to fs->boot-device, (operating-system-grub.cfg): adapt, (operating-system-parameters-file): ditto. --- gnu/system.scm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gnu/system.scm b/gnu/system.scm index 9775e5be8..118816255 100644 --- a/gnu/system.scm +++ b/gnu/system.scm @@ -755,7 +755,7 @@ populate the \"old entries\" menu." (boot-device boot-device) ;; The device where the kernel and initrd live. - (store-device (grub-device store-fs)) + (store-device (fs->boot-device store-fs)) (store-mount-point (file-system-mount-point store-fs)) @@ -771,7 +771,7 @@ populate the \"old entries\" menu." ((bootloader-configuration-file-procedure (operating-system-bootloader os)) (operating-system-bootloader os) entries #:old-entries old-entries))) -(define (grub-device fs) +(define (fs->boot-device fs) "Given FS, a object, return a value suitable for use as the device in a ." (case (file-system-title fs) @@ -804,7 +804,7 @@ configurations." (boot-device #$boot-device) (boot-type #$boot-type) (store - (device #$(grub-device store)) + (device #$(fs->boot-device store)) (mount-point #$(file-system-mount-point store)))) #:set-load-path? #f))) -- 2.12.2 From debbugs-submit-bounces@debbugs.gnu.org Sun Apr 02 09:53:15 2017 Received: (at 26339) by debbugs.gnu.org; 2 Apr 2017 13:53:15 +0000 Received: from localhost ([127.0.0.1]:56549 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cufwR-0000Ys-3r for submit@debbugs.gnu.org; Sun, 02 Apr 2017 09:53:15 -0400 Received: from mail-wr0-f193.google.com ([209.85.128.193]:35108) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cufwP-0000XQ-DL for 26339@debbugs.gnu.org; Sun, 02 Apr 2017 09:53:13 -0400 Received: by mail-wr0-f193.google.com with SMTP id p52so26846049wrc.2 for <26339@debbugs.gnu.org>; Sun, 02 Apr 2017 06:53:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=JUM7QzqymxrM7RxDUUm2dNtjxcO+AfAX/QaT3oYFg4c=; b=EqsjMDER3d8Fq8sVw0NCQzhA82VCwVIGlozGcsaqH16R+//eFsS0L8+vS2cRJ0FmKT iBmZX5D/RwSQWk4E6TZH9VG7KCjV9io2jDkaj9W15whDfdQ/IO4TAVnrBEYWP/nOoJ18 Lk+gYMct7+zxMi8Ki5ULqFn9E5DB73hSR9QZQfyvrFiBxBibVjpCKisxi15MJ5kZG0UE 5cs6aZlLDQfU8yM6Srt5R9MK1737LTyaZQ1vYs4ne5nB/8q+JLLvpx7UYZcQS58Ni9dK TMa5ZsZBgtdXgPSfgF/pU4bC3NN/kmk3wrcZKHwbxQr4PfPgJqImCsAEW6DN88WCsGa9 bWFQ== 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:date:message-id:in-reply-to :references; bh=JUM7QzqymxrM7RxDUUm2dNtjxcO+AfAX/QaT3oYFg4c=; b=KsCWchzUTFJeAHTawYzu7qRzb0hrcFlgXtrf2w8JS3j1dZWw4dIEANeEZepSRxS7/d u+QWMwez5Lc/NcOFr5Cx4iqG5D20V889SfCGFiy/BD0ctlrfjoK7q38uee4m050SdHe3 DIP1g/RTskaNNtj0PsOPjYwP1y329fgA04B53SOu8tQIjw4q63b4JuoUARFBdnoeWJ1e 58PX6HjxxwcRizWTRlVDVcZAybHw2+iq3i/3mgnJFM38DrXn0HbXB+AoC+iDEPygPDpL PNjWPfW49T+UpFkRnAx/ZrGTWfAZgZiYtWa1AidvaNUCv1iu/jl3h2Q9gulisWEzdxSP 7SiQ== X-Gm-Message-State: AFeK/H1dJqjoGdszlrnNfkZZy8QbSdII2bZywzC7hRHxLQHaXbYxAe4c 2I8C4JJvTlrDDQ== X-Received: by 10.28.105.8 with SMTP id e8mr5747117wmc.122.1491141187840; Sun, 02 Apr 2017 06:53:07 -0700 (PDT) Received: from cervin.8.8.8.8 (85-169-37-239.rev.numericable.fr. [85.169.37.239]) by smtp.gmail.com with ESMTPSA id q4sm10337047wme.17.2017.04.02.06.53.06 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 02 Apr 2017 06:53:07 -0700 (PDT) From: Mathieu Othacehe To: 26339@debbugs.gnu.org Subject: [PATCH 13/18] scripts: system: Remove unused variables. Date: Sun, 2 Apr 2017 15:52:37 +0200 Message-Id: <20170402135242.2958-13-m.othacehe@gmail.com> X-Mailer: git-send-email 2.12.2 In-Reply-To: <20170402135242.2958-1-m.othacehe@gmail.com> References: <20170402135242.2958-1-m.othacehe@gmail.com> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 26339 Cc: Mathieu Othacehe 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.3 (--) * guix/scripts/system.scm (profile-bootloader-entries): Remove root and root-device unused variables. --- guix/scripts/system.scm | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/guix/scripts/system.scm b/guix/scripts/system.scm index 2ad210207..d3118266e 100644 --- a/guix/scripts/system.scm +++ b/guix/scripts/system.scm @@ -371,11 +371,7 @@ NUMBERS, which is a list of generation numbers." (unless-file-not-found (let* ((file (string-append system "/parameters")) (params (call-with-input-file file - read-boot-parameters)) - (root (boot-parameters-root-device params)) - (root-device (if (bytevector? root) - (uuid->string root) - root))) + read-boot-parameters))) (boot-parameters (inherit params) (label (string-append (boot-parameters-label params) " (#" -- 2.12.2 From debbugs-submit-bounces@debbugs.gnu.org Sun Apr 02 09:53:18 2017 Received: (at 26339) by debbugs.gnu.org; 2 Apr 2017 13:53:18 +0000 Received: from localhost ([127.0.0.1]:56554 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cufwU-0000ZQ-DF for submit@debbugs.gnu.org; Sun, 02 Apr 2017 09:53:18 -0400 Received: from mail-wr0-f193.google.com ([209.85.128.193]:35971) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cufwQ-0000Xl-Mu for 26339@debbugs.gnu.org; Sun, 02 Apr 2017 09:53:15 -0400 Received: by mail-wr0-f193.google.com with SMTP id k6so25493887wre.3 for <26339@debbugs.gnu.org>; Sun, 02 Apr 2017 06:53:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=nwkK7N9cMKKLm6i1gpRpg1woGWasnUaN372dla7nWhY=; b=RVxzrRxZ11/sHM8G+FOIp+4K7UB7wHCJiHUuHtzJjPeFb0CgaI4Hb8wPgTHaPiOyVc TuAOfphKQ/1fnvoctGctRNxaB1mYqpO2B0D16r7mLo5RCgEsNIpAiK7mCh0QIvF2EtPp YwaWUnCICA2zVp/X+EsqD/I3h+KDhP0IWJt//c9evkIjz79Isy1RYJ2k+ElNMTAKGE5E DBzIExTdsqAB97AvzizmQsBEasUbj30H2NiHGwwy9gUCU223cAdDJxskW/R7VI3RAVjL w5vtyS5mvg4r+sZlK9SOgA/ku2uKTVREcFImixAdQCy7zIh5qkw3K8rRRtAvmi5o84N8 8CJw== 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:date:message-id:in-reply-to :references; bh=nwkK7N9cMKKLm6i1gpRpg1woGWasnUaN372dla7nWhY=; b=HlwzGTXPdBByF2uBCxBEWsXk/hynNNdY9TkNe23V/dcKpx7f7BppjLWpOsW1U/XRyy pNu0ODSbOiKYUbcO0ENT+M0Ns3PTI+XDWqtMP10URZZDYrJX9jKEwfme71FMdtNlOpvY dMZExe6SdjGkX+QTfjNfpdnJF82qWT021Hb/Wsp5/qN+AtaMSbr8XPMn7y8SfmYgImPs FYPT5/S0i91a9NIle0+ae2U5R7/EiFOWLiVExkcEiAWvUnLTZ/1mPtgXPynfDkE89y4e QeNlO361eafKs5vprRMt1lAplL9NdHrbGU8fFePZEga8Il7UDX5OW7JnveUW5PCJ/eup v6IQ== X-Gm-Message-State: AFeK/H0kGLXIZep6xBXZ1+sGA/TnXWIZ3LOcSlGz8TPLE4+QoXqNd/RAsiIAC/byKwSuCw== X-Received: by 10.28.193.193 with SMTP id r184mr5652856wmf.80.1491141189071; Sun, 02 Apr 2017 06:53:09 -0700 (PDT) Received: from cervin.8.8.8.8 (85-169-37-239.rev.numericable.fr. [85.169.37.239]) by smtp.gmail.com with ESMTPSA id q4sm10337047wme.17.2017.04.02.06.53.07 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 02 Apr 2017 06:53:08 -0700 (PDT) From: Mathieu Othacehe To: 26339@debbugs.gnu.org Subject: [PATCH 14/18] scripts: system: Rename grub? and install-grub? to bootloader? and install-bootloader?. Date: Sun, 2 Apr 2017 15:52:38 +0200 Message-Id: <20170402135242.2958-14-m.othacehe@gmail.com> X-Mailer: git-send-email 2.12.2 In-Reply-To: <20170402135242.2958-1-m.othacehe@gmail.com> References: <20170402135242.2958-1-m.othacehe@gmail.com> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 26339 Cc: Mathieu Othacehe 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.3 (--) * guix/scripts/system.scm (perform-action): Rename grub? to bootloader, (%options): rename install-grub? to install-bootloader?, (%default-options): ditto, (process-action): reindent and rename grub? to bootloader?. --- guix/scripts/system.scm | 42 +++++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/guix/scripts/system.scm b/guix/scripts/system.scm index d3118266e..791cf1166 100644 --- a/guix/scripts/system.scm +++ b/guix/scripts/system.scm @@ -580,7 +580,7 @@ PATTERN, a string. When PATTERN is #f, display all the system generations." (warning (_ "Failing to do that may downgrade your system!~%")))) (define* (perform-action action os - #:key grub? dry-run? derivations-only? + #:key bootloader? dry-run? derivations-only? use-substitutes? device target image-size full-boot? (mappings '())) @@ -767,7 +767,7 @@ Some ACTIONS support additional ARGS.\n")) result))) (option '("no-bootloader") #f #f (lambda (opt name arg result) - (alist-cons 'install-grub? #f result))) + (alist-cons 'install-bootloader? #f result))) (option '("full-boot") #f #f (lambda (opt name arg result) (alist-cons 'full-boot? #t result))) @@ -801,7 +801,7 @@ Some ACTIONS support additional ARGS.\n")) (max-silent-time . 3600) (verbosity . 0) (image-size . ,(* 900 (expt 2 20))) - (install-grub? . #t))) + (install-bootloader? . #t))) ;;; @@ -813,23 +813,23 @@ Some ACTIONS support additional ARGS.\n")) ACTION must be one of the sub-commands that takes an operating system declaration as an argument (a file name.) OPTS is the raw alist of options resulting from command-line parsing." - (let* ((file (match args - (() #f) - ((x . _) x))) - (system (assoc-ref opts 'system)) - (os (if file - (load* file %user-module - #:on-error (assoc-ref opts 'on-error)) - (leave (_ "no configuration file specified~%")))) - - (dry? (assoc-ref opts 'dry-run?)) - (grub? (assoc-ref opts 'install-grub?)) - (target (match args - ((first second) second) - (_ #f))) - (device (and grub? - (bootloader-configuration-device - (operating-system-bootloader os))))) + (let* ((file (match args + (() #f) + ((x . _) x))) + (system (assoc-ref opts 'system)) + (os (if file + (load* file %user-module + #:on-error (assoc-ref opts 'on-error)) + (leave (_ "no configuration file specified~%")))) + + (dry? (assoc-ref opts 'dry-run?)) + (bootloader? (assoc-ref opts 'install-bootloader?)) + (target (match args + ((first second) second) + (_ #f))) + (device (and bootloader? + (bootloader-configuration-device + (operating-system-bootloader os))))) (with-store store (set-build-options-from-command-line store opts) @@ -855,7 +855,7 @@ resulting from command-line parsing." m) (_ #f)) opts) - #:grub? grub? + #:bootloader? bootloader? #:target target #:device device)))) #:system system)))) -- 2.12.2 From debbugs-submit-bounces@debbugs.gnu.org Sun Apr 02 09:53:19 2017 Received: (at 26339) by debbugs.gnu.org; 2 Apr 2017 13:53:19 +0000 Received: from localhost ([127.0.0.1]:56556 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cufwU-0000ZS-Mg for submit@debbugs.gnu.org; Sun, 02 Apr 2017 09:53:19 -0400 Received: from mail-wr0-f193.google.com ([209.85.128.193]:35988) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cufwS-0000Y4-2S for 26339@debbugs.gnu.org; Sun, 02 Apr 2017 09:53:16 -0400 Received: by mail-wr0-f193.google.com with SMTP id k6so25494064wre.3 for <26339@debbugs.gnu.org>; Sun, 02 Apr 2017 06:53:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=WTJF+941JFUd6/hxQOAo8uLO2gjIC3VETdMUkMpg1wc=; b=dMtF2EIWyQzMXMMviO3nztG3uAH1z2gFtVAes9LUdHYZKdjqYENzs+tZPtEoeeKQVl M3c7EQtnQjKBOUkKxCnNThdiJ1Q9Apm4PJvxVU5FIBaJbAuGILcma5/cxZ/undYL4fU1 3BSaZPHALSJfYniS/wlamCbYXu0KBbhEeOi+YzmA/ZTVWhO51SDPTVUTJHoeR4rop0Qm 9HCFtR1VXLfsj6lKRnQMed43sU+TlcuTnFt0zzxZF8c8RQyB3E0IkzRXs24i9u91d6Xl cUerSvP5PicoigTpGWYjjnNf0yVoB8BCgyoa1n9PaVgrs02tlvvKZw0dfbnOqBaoWYy3 d4yQ== 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:date:message-id:in-reply-to :references; bh=WTJF+941JFUd6/hxQOAo8uLO2gjIC3VETdMUkMpg1wc=; b=LTdAPF/qhIsq8Ry2N4OHsjpJwa5c1aaL2A/vXpabihIdAJ4G1rM/XPew2dQqbo/9s4 art5ppZmzTyDw1QcpRjGzmRT/7jjbsMIJ/57ye1vtMTCGeCdLNRgb6zdRQSvJFKlqWjj 1Y/KuCajALYqYmh8Wrn5ZaEl7lhU5s2H9KOkAY9n8PWtYwcg80CTaEsFzd4QVL4JOREK i3Ii4RN6ZJH6EM3BabtQ4UDPGhxLecQvQ4sw8DYXuD01XD8uoJR69/2M6ENENntf+20N s+YoDQerG2qCWwijnfnyEJMQsNAKmPpJo4EvCvlmTjugpvEOtuQoQWe7+FWPBi8Sewjd 9W9w== X-Gm-Message-State: AFeK/H194+cKUxesagIJ3LxKfH1J81z5Ll3saV9uN54NAZyUrOyv8eOh HxCd3BS3eUgJLw== X-Received: by 10.28.183.4 with SMTP id h4mr6049137wmf.140.1491141190333; Sun, 02 Apr 2017 06:53:10 -0700 (PDT) Received: from cervin.8.8.8.8 (85-169-37-239.rev.numericable.fr. [85.169.37.239]) by smtp.gmail.com with ESMTPSA id q4sm10337047wme.17.2017.04.02.06.53.09 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 02 Apr 2017 06:53:09 -0700 (PDT) From: Mathieu Othacehe To: 26339@debbugs.gnu.org Subject: [PATCH 15/18] scripts: system: Adapt "reconfigure" to new bootloader API. Date: Sun, 2 Apr 2017 15:52:39 +0200 Message-Id: <20170402135242.2958-15-m.othacehe@gmail.com> X-Mailer: git-send-email 2.12.2 In-Reply-To: <20170402135242.2958-1-m.othacehe@gmail.com> References: <20170402135242.2958-1-m.othacehe@gmail.com> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 26339 Cc: Mathieu Othacehe 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.3 (--) * guix/scripts/system.scm (install-grub*): Rename to install-bootloader. Use keys to pass arguments. Pass a new argument, "install-procedure" which is a script in store dealing with bootloader-specific install actions. Also call "install-boot-config" to install the bootloader config file. (install-bootloader-derivation): New procedure. It returns a derivation that builds a file containing "install-procedure" gexp. (perform-action): Build install-proc derivation and call install-bootloader with the resulting file. Stop adding GRUB to PATH as bootloaders are called in install-proc with direct store paths. --- guix/scripts/system.scm | 116 ++++++++++++++++++++++++++++-------------------- 1 file changed, 69 insertions(+), 47 deletions(-) diff --git a/guix/scripts/system.scm b/guix/scripts/system.scm index 791cf1166..9f1d4f95c 100644 --- a/guix/scripts/system.scm +++ b/guix/scripts/system.scm @@ -147,27 +147,34 @@ TARGET, and register them." (map (cut copy-item <> target #:log-port log-port) to-copy)))) -(define (install-grub* grub.cfg device target) - "This is a variant of 'install-grub' with error handling, lifted in -%STORE-MONAD" - (let* ((gc-root (string-append target %gc-roots-directory - "/grub.cfg")) - (temp-gc-root (string-append gc-root ".new")) - (delete-file (lift1 delete-file %store-monad)) - (make-symlink (lift2 switch-symlinks %store-monad)) - (rename (lift2 rename-file %store-monad))) - (mbegin %store-monad - ;; Prepare the symlink to GRUB.CFG to make sure that it's a GC root when - ;; 'install-grub' completes (being a bit paranoid.) - (make-symlink temp-gc-root grub.cfg) - - (munless (false-if-exception (install-grub grub.cfg device target)) +(define* (install-bootloader install-procedure + #:key + bootcfg bootcfg-location + device target) + "Call INSTALL-PROCEDURE with error handling, in %STORE-MONAD." + (with-monad %store-monad + (let* ((gc-root (string-append target %gc-roots-directory + "/bootcfg")) + (temp-gc-root (string-append gc-root ".new")) + (install (and install-procedure + (derivation->output-path install-procedure))) + (bootcfg (derivation->output-path bootcfg))) + ;; Prepare the symlink to bootloader config file to make sure that it's + ;; a GC root when 'install-procedure' completes (being a bit paranoid.) + (switch-symlinks temp-gc-root bootcfg) + + (unless (false-if-exception + (begin + (install-boot-config bootcfg bootcfg-location target) + (when install + (save-load-path-excursion (primitive-load install))))) (delete-file temp-gc-root) - (leave (_ "failed to install GRUB on device '~a'~%") device)) + (leave (_ "failed to install bootloader on device ~a '~a'~%") install device)) - ;; Register GRUB.CFG as a GC root so that its dependencies (background - ;; image, font, etc.) are not reclaimed. - (rename temp-gc-root gc-root)))) + ;; Register bootloader config file as a GC root so that its dependencies + ;; (background image, font, etc.) are not reclaimed. + (rename-file temp-gc-root gc-root) + (return #t)))) (define* (install os-drv target #:key (log-port (current-output-port)) @@ -579,16 +586,27 @@ PATTERN, a string. When PATTERN is #f, display all the system generations." (warning (_ "Consider running 'guix pull' before 'reconfigure'.~%")) (warning (_ "Failing to do that may downgrade your system!~%")))) +(define (install-bootloader-derivation install-procedure + bootloader device target) + (with-monad %store-monad + (gexp->file "install-bootloader" + (with-imported-modules '((guix build utils)) + #~(begin + (use-modules (guix build utils)) + (#$install-procedure #$bootloader + #$device + #$target)))))) + (define* (perform-action action os #:key bootloader? dry-run? derivations-only? use-substitutes? device target image-size full-boot? (mappings '())) - "Perform ACTION for OS. GRUB? specifies whether to install GRUB; DEVICE is -the target devices for GRUB; TARGET is the target root directory; IMAGE-SIZE -is the size of the image to be built, for the 'vm-image' and 'disk-image' -actions. FULL-BOOT? is used for the 'vm' action; it determines whether to -boot directly to the kernel or to the bootloader. + "Perform ACTION for OS. BOOTLOADER? specifies whether to install +bootloader; DEVICE is the target devices for bootloader; TARGET is the target +root directory; IMAGE-SIZE is the size of the image to be built, for the +'vm-image' and 'disk-image' actions. FULL-BOOT? is used for the 'vm' action; +it determines whether to boot directly to the kernel or to the bootloader. When DERIVATIONS-ONLY? is true, print the derivation file name(s) without building anything." @@ -608,20 +626,28 @@ building anything." (if bootloader (package->derivation bootloader) (return #f)))) - (grub.cfg (if (eq? 'container action) - (return #f) - (operating-system-grub.cfg os - (if (eq? 'init action) - '() - (profile-grub-entries))))) - - ;; For 'init' and 'reconfigure', always build GRUB.CFG, even if - ;; --no-grub is passed, because GRUB.CFG because we then use it as a GC - ;; root. See . + (bootcfg (if (eq? 'container action) + (return #f) + (operating-system-bootcfg + os + (if (eq? 'init action) + '() + (profile-bootloader-entries))))) + (bootcfg-location -> (bootloader-configuration-file-location + (operating-system-bootloader os))) + (install-proc + (let ((procedure (bootloader-configuration-install-procedure + (operating-system-bootloader os))) + (target (or target "/"))) + (install-bootloader-derivation procedure bootloader device target))) + + ;; For 'init' and 'reconfigure', always build BOOTCFG, even if + ;; --no-bootloader is passed, because we then use it as a GC root. + ;; See . (drvs -> (if (memq action '(init reconfigure)) - (if (and grub? bootloader) - (list sys grub.cfg bootloader) - (list sys grub.cfg)) + (if (and bootloader? bootloader) + (list sys bootcfg bootloader install-proc) + (list sys bootcfg)) (list sys))) (% (if derivations-only? (return (for-each (compose println derivation-file-name) @@ -635,20 +661,16 @@ building anything." (for-each (compose println derivation->output-path) drvs) - ;; Make sure GRUB is accessible. - (when (and grub? bootloader) - (let ((prefix (derivation->output-path bootloader))) - (setenv "PATH" - (string-append prefix "/bin:" prefix "/sbin:" - (getenv "PATH"))))) - (case action ((reconfigure) (mbegin %store-monad (switch-to-system os) - (mwhen grub? - (install-grub* (derivation->output-path grub.cfg) - device "/")))) + (mwhen bootloader? + (install-bootloader install-proc + #:bootcfg bootcfg + #:bootcfg-location bootcfg-location + #:device device + #:target "/")))) ((init) (newline) (format #t (_ "initializing operating system under '~a'...~%") -- 2.12.2 From debbugs-submit-bounces@debbugs.gnu.org Sun Apr 02 09:53:19 2017 Received: (at 26339) by debbugs.gnu.org; 2 Apr 2017 13:53:19 +0000 Received: from localhost ([127.0.0.1]:56559 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cufwV-0000ZZ-2l for submit@debbugs.gnu.org; Sun, 02 Apr 2017 09:53:19 -0400 Received: from mail-wr0-f194.google.com ([209.85.128.194]:34449) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cufwS-0000Y7-UF for 26339@debbugs.gnu.org; Sun, 02 Apr 2017 09:53:17 -0400 Received: by mail-wr0-f194.google.com with SMTP id w43so26772336wrb.1 for <26339@debbugs.gnu.org>; Sun, 02 Apr 2017 06:53:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=jY+2mT1VyudtiUlNhxDwzU4gDn+f4+d/oxDVGC3FM7o=; b=D190pbBrqklBDJM1Kc//HM32dndU4fAvEYmj9KGnSVIxH7cadvCEqihBr5HNH3F1I6 Xo43GDKbpaMKTSXrAo/5fCfvvruNOzmKsg2aiG5a+vCKssc7GpsysHohtf8KqYqHSHnJ AqI+dq0RibauetBftZmzSnpVl3XDBK1L5G8yMr9u8kfezbCgB5ogqNFbCpuObbVsvU6Y k7IcRLUNlLZu2aOHj9+XWHWeznPb711xSUUZQk3q9VpqiN5GXfwxOiHJzdhXSm2xcoEY b+ZIf+bpGJbfuB221ejEgF/gAIIU5wQMx4dYSFG8HejVU/0AHGM2l+ztSOAZDxTY+MWg sTTA== 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:date:message-id:in-reply-to :references; bh=jY+2mT1VyudtiUlNhxDwzU4gDn+f4+d/oxDVGC3FM7o=; b=pPrKCy7zEw/JZj0HlT+G0rfG+UKd6oPRjVjwR/lysJofjkecGPz7c7GqnSNi0Pq1qZ Cecxgxdnmn/KxVZyNSFAsDfIm7zkh7eApDUTqXmWm6hYWulPkLiSfzOpCKl9SCK54BbU 6aSB6VFvC5Mf6cj4L3nTtw3Mjbfi6CPxcOmiAjs+FguugFnfKFTJhcID9WuEyZHNecH5 WcE5tnCYwK3n+vD0ItdRPqubSAvQYL8TecQxh6RajDrpRmeHaaLHRkx0/Kl7BfmMSBpj LNvzWV5za7jCySsBvUpcxV/EEfKGY/Fc6f/wX78vO2gpEky+MMwH5cuTCkMobgJgsmSl e3og== X-Gm-Message-State: AFeK/H2VHp/wrwjxN9oXzTjd77RPEDAt5SxQ1Y/ALoo3RblK8i7qG/cYzeF/qhQBkuXPAA== X-Received: by 10.28.130.198 with SMTP id e189mr5753346wmd.96.1491141191225; Sun, 02 Apr 2017 06:53:11 -0700 (PDT) Received: from cervin.8.8.8.8 (85-169-37-239.rev.numericable.fr. [85.169.37.239]) by smtp.gmail.com with ESMTPSA id q4sm10337047wme.17.2017.04.02.06.53.10 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 02 Apr 2017 06:53:10 -0700 (PDT) From: Mathieu Othacehe To: 26339@debbugs.gnu.org Subject: [PATCH 16/18] scripts: system: Adapt "init" to new bootloader API. Date: Sun, 2 Apr 2017 15:52:40 +0200 Message-Id: <20170402135242.2958-16-m.othacehe@gmail.com> X-Mailer: git-send-email 2.12.2 In-Reply-To: <20170402135242.2958-1-m.othacehe@gmail.com> References: <20170402135242.2958-1-m.othacehe@gmail.com> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 26339 Cc: Mathieu Othacehe 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.3 (--) * guix/scripts/system.scm (install): Pass install-proc as a new argument. Rename other arguments. Call install-bootloader instead of install-grub*. (perform-action): Adapt. --- guix/scripts/system.scm | 29 +++++++++++++++++++---------- 1 file changed, 19 insertions(+), 10 deletions(-) diff --git a/guix/scripts/system.scm b/guix/scripts/system.scm index 9f1d4f95c..560115ec3 100644 --- a/guix/scripts/system.scm +++ b/guix/scripts/system.scm @@ -178,12 +178,14 @@ TARGET, and register them." (define* (install os-drv target #:key (log-port (current-output-port)) - grub? grub.cfg device) - "Copy the closure of GRUB.CFG, which includes the output of OS-DRV, to + install-proc bootloader? + bootcfg bootcfg-location + device) + "Copy the closure of BOOTCFG, which includes the output of OS-DRV, to directory TARGET. TARGET must be an absolute directory name since that's what 'guix-register' expects. -When GRUB? is true, install GRUB on DEVICE, using GRUB.CFG." +When BOOTLOADER? is true, install bootloader on DEVICE, using BOOTCFG." (define (maybe-copy to-copy) (with-monad %store-monad (if (string=? target "/") @@ -212,16 +214,21 @@ the ownership of '~a' may be incorrect!~%") (populate (lift2 populate-root-file-system %store-monad))) (mbegin %store-monad - ;; Copy the closure of GRUB.CFG, which includes OS-DIR, GRUB's - ;; background image and so on. - (maybe-copy grub.cfg) + ;; Copy the closure of BOOTCFG, which includes OS-DIR, + ;; eventual background image and so on. + (maybe-copy + (derivation->output-path bootcfg)) ;; Create a bunch of additional files. (format log-port "populating '~a'...~%" target) (populate os-dir target) - (mwhen grub? - (install-grub* grub.cfg device target))))) + (mwhen bootloader? + (install-bootloader install-proc + #:bootcfg bootcfg + #:bootcfg-location bootcfg-location + #:device device + #:target target))))) ;;; @@ -676,8 +683,10 @@ building anything." (format #t (_ "initializing operating system under '~a'...~%") target) (install sys (canonicalize-path target) - #:grub? grub? - #:grub.cfg (derivation->output-path grub.cfg) + #:bootloader? bootloader? + #:bootcfg bootcfg + #:bootcfg-location bootcfg-location + #:install-proc install-proc #:device device)) (else ;; All we had to do was to build SYS. -- 2.12.2 From debbugs-submit-bounces@debbugs.gnu.org Sun Apr 02 09:53:19 2017 Received: (at 26339) by debbugs.gnu.org; 2 Apr 2017 13:53:19 +0000 Received: from localhost ([127.0.0.1]:56561 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cufwV-0000Zq-ES for submit@debbugs.gnu.org; Sun, 02 Apr 2017 09:53:19 -0400 Received: from mail-wr0-f196.google.com ([209.85.128.196]:35156) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cufwT-0000YB-TD for 26339@debbugs.gnu.org; Sun, 02 Apr 2017 09:53:18 -0400 Received: by mail-wr0-f196.google.com with SMTP id p52so26846602wrc.2 for <26339@debbugs.gnu.org>; Sun, 02 Apr 2017 06:53:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=4gWu2d01VQ28tLQWgnZnhg1susxJKXbmqJynDAlj0Z0=; b=BXxe/PAHOCPlY/npYRJ3BPmp35j/oB8dAnFOyC625Hil/juL7cU09qjqIO0ZsNGUlB wc7YD3EoxNLQBIJhY9pquppXfBKhFOMheMHwvHsCb5JXuiwQ8Kb6IEzRH31iOFr8LmWv OIrPCMVnaB7gXn6yzRtopZulOaNtndvSLpRZY6oJ0cJczeHH+TF/3TaK2Me2aWiyC2lw +3ovOlj6Nq34l13TCKS5DnyGjb3OaecFUrXiFkhtIhMe6T7/W2x8B7mPU/wBeiMjULdw wsCi3TOtkY1XNBiyMNZuHjZNcIqSfhKeMj8d78odV7IhJlcc/7cSJSSOLSKjLTIirr6u 6Eaw== 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:date:message-id:in-reply-to :references; bh=4gWu2d01VQ28tLQWgnZnhg1susxJKXbmqJynDAlj0Z0=; b=SR3vV52nlQKpLxDoxWSVJmfJ7XJg+1dO6NNxSbDFlbOyE0baYOC0Jut9u5H6wbYa/q G5iJEM7Pf5p9GBlfLmHm66eoMjYo7HjGZCiKF2k2hWMBL5tZFOHg3+MQKUE5yZj6drir bJHSNBOfdA+3bXGiT7RH9wiXCFRv+9dnMYfzgqNhsKJZdPF96LJOn68SHxf2Conk8Xaq ChqMfqNuWL/eMQAHwmbD/AwM1O1drwVW6m6G5QyrhI7oFI80bSCsd4CoEZCCttACD6cb 7NR+io/A2cdk0Fz/ReD2sVvYYECbDjI2Xi+WFfuc6FHesLsYID5eh45LqoBe3SMOO+s8 yphA== X-Gm-Message-State: AFeK/H2kGHCXgV6Q2xMTxVvPRDfmvgq1Ycl3WWc45qFNQEAr5AJO2Sgr gIMWh5qr6RjmTg== X-Received: by 10.28.153.20 with SMTP id b20mr5888355wme.76.1491141192233; Sun, 02 Apr 2017 06:53:12 -0700 (PDT) Received: from cervin.8.8.8.8 (85-169-37-239.rev.numericable.fr. [85.169.37.239]) by smtp.gmail.com with ESMTPSA id q4sm10337047wme.17.2017.04.02.06.53.11 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 02 Apr 2017 06:53:11 -0700 (PDT) From: Mathieu Othacehe To: 26339@debbugs.gnu.org Subject: [PATCH 17/18] scripts: system: Adapt "switch-generation" to new bootloader API. Date: Sun, 2 Apr 2017 15:52:41 +0200 Message-Id: <20170402135242.2958-17-m.othacehe@gmail.com> X-Mailer: git-send-email 2.12.2 In-Reply-To: <20170402135242.2958-1-m.othacehe@gmail.com> References: <20170402135242.2958-1-m.othacehe@gmail.com> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 26339 Cc: Mathieu Othacehe 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.3 (--) * guix/scripts/system.scm (profile-grub-entries): Rename to profile-bootloader-entries. (reinstall-grub): Rename to reinstall-bootloader. Read boot-device and boot-type from parameters file to be able to restore the correct bootloader on specified device. Factorize bootloader installation code by calling install-bootloader. (switch-to-system-generation): Adapt. --- guix/scripts/system.scm | 73 +++++++++++++++++++++++++++++-------------------- 1 file changed, 43 insertions(+), 30 deletions(-) diff --git a/guix/scripts/system.scm b/guix/scripts/system.scm index 560115ec3..400152d6d 100644 --- a/guix/scripts/system.scm +++ b/guix/scripts/system.scm @@ -377,8 +377,8 @@ it atomically, and then run OS's activation script." (date->string (time-utc->date time) "~Y-~m-~d ~H:~M"))) -(define* (profile-grub-entries #:optional (profile %system-profile) - (numbers (generation-numbers profile))) +(define* (profile-bootloader-entries #:optional (profile %system-profile) + (numbers (generation-numbers profile))) "Return a list of 'menu-entry' for the generations of PROFILE specified by NUMBERS, which is a list of generation numbers." (define (system->boot-parameters system number time) @@ -419,50 +419,63 @@ connection to the store." ;;; (define (switch-to-system-generation store spec) "Switch the system profile to the generation specified by SPEC, and -re-install grub with a grub configuration file that uses the specified system +re-install bootloader with a configuration file that uses the specified system generation as its default entry. STORE is an open connection to the store." (let ((number (relative-generation-spec->number %system-profile spec))) (if number (begin - (reinstall-grub store number) + (reinstall-bootloader store number) (switch-to-generation* %system-profile number)) (leave (_ "cannot switch to system generation '~a'~%") spec)))) -(define (reinstall-grub store number) - "Re-install grub for existing system profile generation NUMBER. STORE is an -open connection to the store." +(define (reinstall-bootloader store number) + "Re-install bootloader for existing system profile generation NUMBER. +STORE is an open connection to the store." (let* ((generation (generation-file-name %system-profile number)) (file (string-append generation "/parameters")) (params (unless-file-not-found (call-with-input-file file read-boot-parameters))) - (root-device (boot-parameters-root-device params)) + (boot-device (boot-parameters-boot-device params)) ;; We don't currently keep track of past menu entries' details. The ;; default values will allow the system to boot, even if they differ ;; from the actual past values for this generation's entry. - (grub-config (grub-configuration (device root-device))) + (boot-config (bootloader-configuration + (inherit (lookup-bootloader-configuration + (boot-parameters-boot-type params))) + (device boot-device))) ;; Make the specified system generation the default entry. - (entries (profile-grub-entries %system-profile (list number))) + (entries (profile-bootloader-entries %system-profile (list number))) (old-generations (delv number (generation-numbers %system-profile))) - (old-entries (profile-grub-entries %system-profile old-generations)) - (grub.cfg (run-with-store store - (grub-configuration-file grub-config - entries - #:old-entries old-entries)))) - (show-what-to-build store (list grub.cfg)) - (build-derivations store (list grub.cfg)) - ;; This is basically the same as install-grub*, but for now we avoid - ;; re-installing the GRUB boot loader itself onto a device, mainly because - ;; we don't in general have access to the same version of the GRUB package - ;; which was used when installing this other system generation. - (let* ((grub.cfg-path (derivation->output-path grub.cfg)) - (gc-root (string-append %gc-roots-directory "/grub.cfg")) - (temp-gc-root (string-append gc-root ".new"))) - (switch-symlinks temp-gc-root grub.cfg-path) - (unless (false-if-exception (install-grub-config grub.cfg-path "/")) - (delete-file temp-gc-root) - (leave (_ "failed to re-install GRUB configuration file: '~a'~%") - grub.cfg-path)) - (rename-file temp-gc-root gc-root)))) + (old-entries (profile-bootloader-entries + %system-profile old-generations))) + (run-with-store store + (mlet* %store-monad + ((bootcfg ((bootloader-configuration-file-procedure boot-config) + boot-config entries + #:old-entries old-entries)) + (bootcfg-location -> (bootloader-configuration-file-location + boot-config)) + (bootloader (package->derivation + (bootloader-configuration-bootloader boot-config))) + (target -> "/") + (install-proc + (let ((procedure (bootloader-configuration-install-procedure + boot-config))) + (install-bootloader-derivation + procedure bootloader boot-device target))) + (drvs -> (list bootcfg bootloader install-proc))) + (mbegin %store-monad + (show-what-to-build* drvs) + (built-derivations drvs) + ;; PARAMS file may not contain a suitable BOOT-DEVICE. If BOOT-DEVICE + ;; is #f do not run INSTALL-PROC during bootloader installation. + (install-bootloader (if boot-device + install-proc + #f) + #:bootcfg bootcfg + #:bootcfg-location bootcfg-location + #:device boot-device + #:target target)))))) ;;; -- 2.12.2 From debbugs-submit-bounces@debbugs.gnu.org Sun Apr 02 09:53:21 2017 Received: (at 26339) by debbugs.gnu.org; 2 Apr 2017 13:53:21 +0000 Received: from localhost ([127.0.0.1]:56563 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cufwW-0000Zz-Og for submit@debbugs.gnu.org; Sun, 02 Apr 2017 09:53:20 -0400 Received: from mail-wr0-f196.google.com ([209.85.128.196]:35165) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cufwU-0000YT-Rx for 26339@debbugs.gnu.org; Sun, 02 Apr 2017 09:53:19 -0400 Received: by mail-wr0-f196.google.com with SMTP id p52so26846649wrc.2 for <26339@debbugs.gnu.org>; Sun, 02 Apr 2017 06:53:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=eUeIPa6pAYgOXmECkAWYzMBmOQEOy5y0kSV4QuXSWTA=; b=FqqrmOc8Vz1bmM8Uw51ZnV5vfLKb0nA0+VMZGQwJ7DGBFghvWghzPk04dEqajgBv/c suBu7bxNB5lv1eo9foKVGx+fpyo3ObYqa2daKUNHFYd86r6Sl1J7LA9dTY17kV8jwzhM VkuGiCduoG6MPFW8JHQB2F4qEz0yHSgauJPJIc0n9L0dsnOQV5vnKTqESlKTwt16IdzK QDPQvAylvFNcF40i2fr4AiHDfmbj8aS5PjBCVg05ubxHNjhthGIl5AAec+nNh0tgcdbg ICpbpi5z6PF1jJMXpuJG5i1v34u6fqI7Imxacy3+1dyicOnY5QGlgoI7hKDw2yjbmJTD cZLw== 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:date:message-id:in-reply-to :references; bh=eUeIPa6pAYgOXmECkAWYzMBmOQEOy5y0kSV4QuXSWTA=; b=GXzoUfb3oXa2TvBAQ/5Rf+daI5B310J/kVIWmHrEVPzuIZ+Ce+Z25qAFfhjTWGMofU j5SeLLK9S+LcnfCNjA2cW06h1pR28zkqhhIgNnWuh1PxUArBb76eXl8yIu0nzB+amSiw +EWKB8HFJO/QmvGGh7iXDNB9G5CWwie91QUtxBRw52q2sjUBKBsEme8dU9WkXqlbIlUF QGwBEF1QYzhDaJIwfVAZWSCIvONNl4Fbv66+Qm7pP+9fc3R9PVcUjk6KSn9N9wCHQh20 QdlT2HF5lknA6GjSLLrklr864xWt2znauMEIlLARiZoYU9qGdgQJvgGbpGejjohJ+vzF 6mqw== X-Gm-Message-State: AFeK/H3QwKDFnfvC29qN35DdJGDDU3kGlbxqsxKfX0jqP1iIIQG8Z3wE zt75E37AUHQIQQ== X-Received: by 10.28.139.134 with SMTP id n128mr5443959wmd.132.1491141193282; Sun, 02 Apr 2017 06:53:13 -0700 (PDT) Received: from cervin.8.8.8.8 (85-169-37-239.rev.numericable.fr. [85.169.37.239]) by smtp.gmail.com with ESMTPSA id q4sm10337047wme.17.2017.04.02.06.53.12 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 02 Apr 2017 06:53:12 -0700 (PDT) From: Mathieu Othacehe To: 26339@debbugs.gnu.org Subject: [PATCH 18/18] scripts: system: Display bootloader device and type in "list-generations". Date: Sun, 2 Apr 2017 15:52:42 +0200 Message-Id: <20170402135242.2958-18-m.othacehe@gmail.com> X-Mailer: git-send-email 2.12.2 In-Reply-To: <20170402135242.2958-1-m.othacehe@gmail.com> References: <20170402135242.2958-1-m.othacehe@gmail.com> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 26339 Cc: Mathieu Othacehe 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.3 (--) * guix/scripts/system.scm (display-system-generation): Display bootloader device and bootloader type. --- guix/scripts/system.scm | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/guix/scripts/system.scm b/guix/scripts/system.scm index 400152d6d..df45e491c 100644 --- a/guix/scripts/system.scm +++ b/guix/scripts/system.scm @@ -534,17 +534,21 @@ list of services." (param-file (string-append generation "/parameters")) (params (call-with-input-file param-file read-boot-parameters)) (label (boot-parameters-label params)) + (boot-type (boot-parameters-boot-type params)) (root (boot-parameters-root-device params)) (root-device (if (bytevector? root) (uuid->string root) root)) + (boot-device (boot-parameters-boot-device params)) (kernel (boot-parameters-kernel params))) (display-generation profile number) (format #t (_ " file name: ~a~%") generation) (format #t (_ " canonical file name: ~a~%") (readlink* generation)) ;; TRANSLATORS: Please preserve the two-space indentation. (format #t (_ " label: ~a~%") label) + (format #t (_ " bootloader type: ~a~%") boot-type) (format #t (_ " root device: ~a~%") root-device) + (format #t (_ " boot device: ~a~%") boot-device) (format #t (_ " kernel: ~a~%") kernel)))) (define* (list-generations pattern #:optional (profile %system-profile)) -- 2.12.2 From debbugs-submit-bounces@debbugs.gnu.org Sun Apr 02 14:24:39 2017 Received: (at 26339) by debbugs.gnu.org; 2 Apr 2017 18:24:39 +0000 Received: from localhost ([127.0.0.1]:57731 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cukB5-0002YI-As for submit@debbugs.gnu.org; Sun, 02 Apr 2017 14:24:39 -0400 Received: from mail-qk0-f182.google.com ([209.85.220.182]:36845) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cukB3-0002Xy-Qg for 26339@debbugs.gnu.org; Sun, 02 Apr 2017 14:24:38 -0400 Received: by mail-qk0-f182.google.com with SMTP id p22so99341242qka.3 for <26339@debbugs.gnu.org>; Sun, 02 Apr 2017 11:24:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=craven.ch; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=fjD0n0qTFffYZMxe7OXhhQ1f36mYXa/2YEIvZEMh0g0=; b=DQQ4UWkA7H7Q9uXkoIJYm+C7/oJLj/YV0HmjURz8iqyR0idnnLITBIn1a4myIVPF3j 04EOjRIwa8Hz9eBHyPBQRLrVHZ6/LIZqit3eJEb3QV/ClYn32HlXhgvfoQV+eNVVKO2z qnJl8TdIbFDHOAug05a7lr3EnyHISJz5J/rTI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=fjD0n0qTFffYZMxe7OXhhQ1f36mYXa/2YEIvZEMh0g0=; b=YjVRXHbeCehHcswHwcaFCeMxkxDcVugDZGSwocp8xCYaeH+dvjgJWufj65UGKp4Q+N 2kgXmXmOHlj2xvBRpWin4E+XyJmDfLkZy8Zn2fMD0umAbxDwpLNT6d4pvsbDOrhiT2sm f8UAisj9OIhcAuEt/sn3fAE8GSdDbpd11SscWSf/oWj/tn4M/Ye8Eq4lmiPT7e6aymmo lIvNEp0BMzdKlaUagEAwcGIwNyE73ufVrZBF8ssErpyK2w7ahIdOJNXtIeio+2XPFaCu g+uquC5yrD8vyY3+X9FCGy5c+MN9wGPJDCKD5L7L7zCzSeAvKiCb+KYxSG99Fh1IwAtr l8Qg== X-Gm-Message-State: AFeK/H2qFVt15RzAq0FYng2y6349iVcitl4gvCkO1zuWKaBt0Wd7ffBicK6s0hk1SyIjud6smvpYiyg4zyNY1w== X-Received: by 10.55.105.129 with SMTP id e123mr11598789qkc.184.1491157472324; Sun, 02 Apr 2017 11:24:32 -0700 (PDT) MIME-Version: 1.0 Received: by 10.12.180.141 with HTTP; Sun, 2 Apr 2017 11:24:31 -0700 (PDT) X-Originating-IP: [151.248.146.13] In-Reply-To: <20170402135242.2958-1-m.othacehe@gmail.com> References: <20170402135242.2958-1-m.othacehe@gmail.com> From: David Craven Date: Sun, 2 Apr 2017 20:24:31 +0200 Message-ID: Subject: Re: [PATCH 01/18] system: Pass to grub. To: Mathieu Othacehe Content-Type: text/plain; charset=UTF-8 X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 26339 Cc: 26339@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.5 (/) Nice... From debbugs-submit-bounces@debbugs.gnu.org Sat Apr 15 06:10:07 2017 Received: (at 26339) by debbugs.gnu.org; 15 Apr 2017 10:10:07 +0000 Received: from localhost ([127.0.0.1]:47870 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1czKed-0000Fc-Lk for submit@debbugs.gnu.org; Sat, 15 Apr 2017 06:10:07 -0400 Received: from dd1012.kasserver.com ([85.13.128.8]:59154) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1czKeb-0000FR-65 for 26339@debbugs.gnu.org; Sat, 15 Apr 2017 06:10:06 -0400 Received: from localhost (178.113.180.42.wireless.dyn.drei.com [178.113.180.42]) by dd1012.kasserver.com (Postfix) with ESMTPSA id 192391CA1990; Sat, 15 Apr 2017 12:10:02 +0200 (CEST) Date: Sat, 15 Apr 2017 12:10:00 +0200 From: Danny Milosavljevic To: Mathieu Othacehe Subject: Re: bug#26339: [PATCH 03/18] scripts: system: Rename --no-grub option to --no-bootloader. Message-ID: <20170415121000.16922af8@scratchpost.org> In-Reply-To: <20170402135242.2958-3-m.othacehe@gmail.com> References: <20170402135242.2958-1-m.othacehe@gmail.com> <20170402135242.2958-3-m.othacehe@gmail.com> X-Mailer: Claws Mail 3.14.1 (GTK+ 2.24.31; x86_64-unknown-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 26339 Cc: 26339@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.7 (/) Hi, > - (option '("no-grub") #f #f > + (option '("no-bootloader") #f #f I'd prefer if it accepted both options - for backward compatibility. We don't know what scripts people use on top of guix - and it's likely that many user scripts already pass "--no-grub", especially since the less-dangerous choice is to pass it (as opposed to not pass it). There is no harm in supporting both options. From debbugs-submit-bounces@debbugs.gnu.org Sat Apr 15 06:35:22 2017 Received: (at 26339) by debbugs.gnu.org; 15 Apr 2017 10:35:22 +0000 Received: from localhost ([127.0.0.1]:47899 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1czL34-0000uM-8K for submit@debbugs.gnu.org; Sat, 15 Apr 2017 06:35:22 -0400 Received: from dd1012.kasserver.com ([85.13.128.8]:35052) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1czL32-0000uE-F4 for 26339@debbugs.gnu.org; Sat, 15 Apr 2017 06:35:20 -0400 Received: from localhost (178.113.180.42.wireless.dyn.drei.com [178.113.180.42]) by dd1012.kasserver.com (Postfix) with ESMTPSA id 1D4621CA02EC; Sat, 15 Apr 2017 12:35:19 +0200 (CEST) Date: Sat, 15 Apr 2017 12:35:17 +0200 From: Danny Milosavljevic To: Mathieu Othacehe Subject: Re: bug#26339: [PATCH 09/18] scripts: system: Move save-load-path-excursion and save-environment-excursion macros to the top. Message-ID: <20170415123517.581a088d@scratchpost.org> In-Reply-To: <20170402135242.2958-9-m.othacehe@gmail.com> References: <20170402135242.2958-1-m.othacehe@gmail.com> <20170402135242.2958-9-m.othacehe@gmail.com> X-Mailer: Claws Mail 3.14.1 (GTK+ 2.24.31; x86_64-unknown-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 26339 Cc: 26339@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.7 (/) I applied this one patch to master as a41134b44219a0aadbad4445586c571b0fbffbbd. From debbugs-submit-bounces@debbugs.gnu.org Sat Apr 15 06:40:47 2017 Received: (at 26339) by debbugs.gnu.org; 15 Apr 2017 10:40:47 +0000 Received: from localhost ([127.0.0.1]:47903 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1czL8I-00011l-TK for submit@debbugs.gnu.org; Sat, 15 Apr 2017 06:40:47 -0400 Received: from dd1012.kasserver.com ([85.13.128.8]:35720) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1czL8H-00011d-SU for 26339@debbugs.gnu.org; Sat, 15 Apr 2017 06:40:46 -0400 Received: from localhost (178.113.180.42.wireless.dyn.drei.com [178.113.180.42]) by dd1012.kasserver.com (Postfix) with ESMTPSA id E33871CA02EC; Sat, 15 Apr 2017 12:40:43 +0200 (CEST) Date: Sat, 15 Apr 2017 12:40:38 +0200 From: Danny Milosavljevic To: Mathieu Othacehe Subject: Re: bug#26339: [PATCH 10/18] system: Rename kernel->grub-label to kernel->boot-label. Message-ID: <20170415124038.0aff4678@scratchpost.org> In-Reply-To: <20170402135242.2958-10-m.othacehe@gmail.com> References: <20170402135242.2958-1-m.othacehe@gmail.com> <20170402135242.2958-10-m.othacehe@gmail.com> X-Mailer: Claws Mail 3.14.1 (GTK+ 2.24.31; x86_64-unknown-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 26339 Cc: 26339@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.7 (/) Pushed this patch to master as c2e9942b8fc8918c3e1d9612f99bea06be9ff81d. From debbugs-submit-bounces@debbugs.gnu.org Sat Apr 15 06:46:26 2017 Received: (at 26339) by debbugs.gnu.org; 15 Apr 2017 10:46:26 +0000 Received: from localhost ([127.0.0.1]:47907 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1czLDm-0001AH-J7 for submit@debbugs.gnu.org; Sat, 15 Apr 2017 06:46:26 -0400 Received: from mail-wr0-f194.google.com ([209.85.128.194]:34738) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1czLDj-0001A2-PY for 26339@debbugs.gnu.org; Sat, 15 Apr 2017 06:46:24 -0400 Received: by mail-wr0-f194.google.com with SMTP id u18so14995431wrc.1 for <26339@debbugs.gnu.org>; Sat, 15 Apr 2017 03:46:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=references:user-agent:from:to:cc:subject:in-reply-to:date :message-id:mime-version; bh=4x4um4GbKFc5beI5XaucVp2QH85WtEi/hXnMiypLtYk=; b=R+d7xSLqvPGpI3rCyyb/21AtWg7g8j/fw1wYE005Bhhbyv4cuX1f6CEc4DAlK8RnV9 wHtgtqOCT3h+mOmIh4extEYarV+/zgpNk/tyMZnymEEPHU4HZ9SAzSvVueGcvrKSO6o0 rZXjcd/iojBPZ4wSGwIURYY7zNCX6VTF9fHayjoz7UjGifapSZJLjPWrTYTJ0Ox8OFO3 u0TlKecvV18PcaP/Yy5lejU/NDEC5dW5arIFHGLK2fkV8+ZqINpTrRJP1BK1BZrWUUvZ Lkq5i6vhvRnjk3TA71GQiTvR6SJ62DMSLB333Z8RuWYV9zuE7QCrT3FLqOU61eUrh5iQ sSjA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:references:user-agent:from:to:cc:subject :in-reply-to:date:message-id:mime-version; bh=4x4um4GbKFc5beI5XaucVp2QH85WtEi/hXnMiypLtYk=; b=c60MHVVh/9NNknOKzEV1uHxX7S/f8JNxrJWjJiSZkTTvwLohlsBjnOKzFRDv8VhKm4 qzbYrxwOSf1/QclAh73dsZHM8GOxbFxIfypNOgpcq+vUqULePZw0wzB95yFqip2rZkcZ 8PFI9fdzFUexHiq8BTyjM3y/ikDaRDwaKir0dGAiAW1CRplB5sUEg6r0iAvACTm5kjn7 YLihU6DE7DWF1LaeinRvW1U4nyXwfKBhQXjx2lx+cBME1cV7qOMZMJFnrycUovIdGZVT QB57+0YPkVS/Q+D0n5rA0WYfRxmbPT4MbnsLz1vE4orf36YUseWK0UotdOK/WUUvxMko F6NQ== X-Gm-Message-State: AN3rC/5fhDZJlXI7xEhJ2ihGL1rmCzFOtHf66MApQ0waDaBNwCrUg3Nf 7FWB0SiIH8D/bUPS X-Received: by 10.223.157.37 with SMTP id k37mr11391695wre.156.1492253177864; Sat, 15 Apr 2017 03:46:17 -0700 (PDT) Received: from cervin (85-169-37-239.rev.numericable.fr. [85.169.37.239]) by smtp.gmail.com with ESMTPSA id b31sm5984632wrb.7.2017.04.15.03.46.16 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 15 Apr 2017 03:46:16 -0700 (PDT) References: <20170402135242.2958-1-m.othacehe@gmail.com> <20170402135242.2958-9-m.othacehe@gmail.com> <20170415123517.581a088d@scratchpost.org> User-agent: mu4e 0.9.18; emacs 25.2.1 From: Mathieu Othacehe To: Danny Milosavljevic Subject: Re: bug#26339: [PATCH 09/18] scripts: system: Move save-load-path-excursion and save-environment-excursion macros to the top. In-reply-to: <20170415123517.581a088d@scratchpost.org> Date: Sat, 15 Apr 2017 12:46:16 +0200 Message-ID: <8760i6ne2v.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 26339 Cc: 26339@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: -2.3 (--) > I applied this one patch to master as a41134b44219a0aadbad4445586c571b0fbffbbd. Thank you, but there might have been a problem somewhere, the commit a41134b44219a0aadbad4445586c571b0fbffbbd only contains one copyright line. Mathieu From debbugs-submit-bounces@debbugs.gnu.org Sat Apr 15 07:30:12 2017 Received: (at 26339) by debbugs.gnu.org; 15 Apr 2017 11:30:12 +0000 Received: from localhost ([127.0.0.1]:47920 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1czLu8-0002Ke-DC for submit@debbugs.gnu.org; Sat, 15 Apr 2017 07:30:12 -0400 Received: from dd1012.kasserver.com ([85.13.128.8]:43846) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1czLu6-0002IV-LL for 26339@debbugs.gnu.org; Sat, 15 Apr 2017 07:30:10 -0400 Received: from localhost (178.113.180.42.wireless.dyn.drei.com [178.113.180.42]) by dd1012.kasserver.com (Postfix) with ESMTPSA id 4BB141CA02EC; Sat, 15 Apr 2017 13:30:09 +0200 (CEST) Date: Sat, 15 Apr 2017 13:30:07 +0200 From: Danny Milosavljevic To: Mathieu Othacehe Subject: Re: bug#26339: [PATCH 09/18] scripts: system: Move save-load-path-excursion and save-environment-excursion macros to the top. Message-ID: <20170415133007.7a68bc31@scratchpost.org> In-Reply-To: <8760i6ne2v.fsf@gmail.com> References: <20170402135242.2958-1-m.othacehe@gmail.com> <20170402135242.2958-9-m.othacehe@gmail.com> <20170415123517.581a088d@scratchpost.org> <8760i6ne2v.fsf@gmail.com> X-Mailer: Claws Mail 3.14.1 (GTK+ 2.24.31; x86_64-unknown-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 26339 Cc: 26339@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.7 (/) On Sat, 15 Apr 2017 12:46:16 +0200 Mathieu Othacehe wrote: > > I applied this one patch to master as a41134b44219a0aadbad4445586c571b0fbffbbd. > > Thank you, but there might have been a problem somewhere, the commit > a41134b44219a0aadbad4445586c571b0fbffbbd only contains one copyright > line. Yes, sorry. Added follow-up commit 475e2ce211ac05a814c1f1bc2b9648baa17ad369. From debbugs-submit-bounces@debbugs.gnu.org Sat Apr 15 07:41:49 2017 Received: (at 26339) by debbugs.gnu.org; 15 Apr 2017 11:41:50 +0000 Received: from localhost ([127.0.0.1]:47936 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1czM5N-0004CM-M7 for submit@debbugs.gnu.org; Sat, 15 Apr 2017 07:41:49 -0400 Received: from mail-wr0-f193.google.com ([209.85.128.193]:36706) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1czM5L-0004C7-HZ for 26339@debbugs.gnu.org; Sat, 15 Apr 2017 07:41:47 -0400 Received: by mail-wr0-f193.google.com with SMTP id o21so15081758wrb.3 for <26339@debbugs.gnu.org>; Sat, 15 Apr 2017 04:41:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=references:user-agent:from:to:cc:subject:in-reply-to:date :message-id:mime-version; bh=wSrmT8F73uKQmbIXUtM2TbEIlXhdNHH6mht2wb3HhUY=; b=SGbRiYQELVrUoFnwAMloE+5XNuNPhKy+mHXLNlIqll4K2iQxW0O5fzXytROoh4DAhZ 1y9q/Iazlty3E6VZBKmGkJhi/Vv4W24Vz34x5R6IvWOiG0oegsu0YEAvJCnYb9/GOc+t cs3YoM4Kv7XniU+owuk9nK5tY1QB8L8F/OI9pOuBSVaAw7fDcZiCC735IIyZ84RC0thS Hpjov+sNB35BvxINjnSgSfgc9CYhZmTFERXjIRDCI4Z73I1tJHQhZjixURAWhNEHVjh3 OPW/mBiq6SOqLTufONl+u4zcZq6/5OD/hcw8e2njSsvGvjRilK5nn43OZwoSG/JTMlPC 3apg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:references:user-agent:from:to:cc:subject :in-reply-to:date:message-id:mime-version; bh=wSrmT8F73uKQmbIXUtM2TbEIlXhdNHH6mht2wb3HhUY=; b=iM8mNcVcfXO9/4ffcJElMrm6fBHN9gdQL51Xw5VycnwQ4JVvXym7wADlgzTdeKRYWS 4AIh/WNJafLkgqYn/ICJ+OU4XnPOgqfRnNJHIni1QYCXZOhDQ7sXBMnGfUA0Al94hNOa yujNPDUyfJdCKJgV6k3lXiTly9ShUZw4kzfjZnzUHK0MKGQcUxx2X8TEaHczraZFGzLe v5z48GfzEEPm1tpz9kdnBZr/LPX7NMmIymeK7k138bhkcOki66T+xQ3HIbje+uyGDTN4 Ks/4h2HEdZCPiwFVLOdkM+VCX2OAGSMrecJIBSXDfaiy3M1VTr5bjJ14FaF9B8NAZLIp wGoQ== X-Gm-Message-State: AN3rC/4mrsFUebzyDsuq1g6QEE534kiMDk7fYArZm7JvxvDKH2xhOJJA D2tSbyTIqUHySg== X-Received: by 10.223.134.203 with SMTP id 11mr12055404wry.149.1492256501939; Sat, 15 Apr 2017 04:41:41 -0700 (PDT) Received: from cervin (85-169-37-239.rev.numericable.fr. [85.169.37.239]) by smtp.gmail.com with ESMTPSA id u145sm2296156wmu.1.2017.04.15.04.41.40 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 15 Apr 2017 04:41:40 -0700 (PDT) References: <20170402135242.2958-1-m.othacehe@gmail.com> <20170402135242.2958-9-m.othacehe@gmail.com> <20170415123517.581a088d@scratchpost.org> <8760i6ne2v.fsf@gmail.com> <20170415133007.7a68bc31@scratchpost.org> User-agent: mu4e 0.9.18; emacs 25.2.1 From: Mathieu Othacehe To: Danny Milosavljevic Subject: Re: bug#26339: [PATCH 09/18] scripts: system: Move save-load-path-excursion and save-environment-excursion macros to the top. In-reply-to: <20170415133007.7a68bc31@scratchpost.org> Date: Sat, 15 Apr 2017 13:41:40 +0200 Message-ID: <874lxpoq2z.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 26339 Cc: 26339@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: -2.3 (--) > Yes, sorry. Added follow-up commit 475e2ce211ac05a814c1f1bc2b9648baa17ad369. Thanks, there's still a small problem, The renaming operating-system-grub.cfg -> operating-system-bootcfg was introduced by mistake in commit 475e2ce. Mathieu From debbugs-submit-bounces@debbugs.gnu.org Sat Apr 15 07:52:11 2017 Received: (at 26339) by debbugs.gnu.org; 15 Apr 2017 11:52:12 +0000 Received: from localhost ([127.0.0.1]:47946 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1czMFP-0004RA-Ne for submit@debbugs.gnu.org; Sat, 15 Apr 2017 07:52:11 -0400 Received: from dd1012.kasserver.com ([85.13.128.8]:47636) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1czMFO-0004R3-OR for 26339@debbugs.gnu.org; Sat, 15 Apr 2017 07:52:11 -0400 Received: from localhost (178.113.180.42.wireless.dyn.drei.com [178.113.180.42]) by dd1012.kasserver.com (Postfix) with ESMTPSA id AD27B1CA02EC; Sat, 15 Apr 2017 13:52:08 +0200 (CEST) Date: Sat, 15 Apr 2017 13:52:05 +0200 From: Danny Milosavljevic To: Mathieu Othacehe Subject: Re: bug#26339: [PATCH 09/18] scripts: system: Move save-load-path-excursion and save-environment-excursion macros to the top. Message-ID: <20170415135205.38feaf7d@scratchpost.org> In-Reply-To: <874lxpoq2z.fsf@gmail.com> References: <20170402135242.2958-1-m.othacehe@gmail.com> <20170402135242.2958-9-m.othacehe@gmail.com> <20170415123517.581a088d@scratchpost.org> <8760i6ne2v.fsf@gmail.com> <20170415133007.7a68bc31@scratchpost.org> <874lxpoq2z.fsf@gmail.com> X-Mailer: Claws Mail 3.14.1 (GTK+ 2.24.31; x86_64-unknown-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 26339 Cc: 26339@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.7 (/) Hi, On Sat, 15 Apr 2017 13:41:40 +0200 Mathieu Othacehe wrote: > The renaming operating-system-grub.cfg -> operating-system-bootcfg was > introduced by mistake in commit 475e2ce. Yeah, follow-up commit fe05cadf2d45e757f517ea94e68dfa4ede47a347 fixes it. Thanks! From debbugs-submit-bounces@debbugs.gnu.org Sat Apr 15 08:43:48 2017 Received: (at 26339) by debbugs.gnu.org; 15 Apr 2017 12:43:48 +0000 Received: from localhost ([127.0.0.1]:47992 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1czN3M-0005fO-Nd for submit@debbugs.gnu.org; Sat, 15 Apr 2017 08:43:48 -0400 Received: from dd1012.kasserver.com ([85.13.128.8]:57934) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1czN3L-0005fF-PW for 26339@debbugs.gnu.org; Sat, 15 Apr 2017 08:43:48 -0400 Received: from localhost (178.113.180.42.wireless.dyn.drei.com [178.113.180.42]) by dd1012.kasserver.com (Postfix) with ESMTPSA id 637321CA02EC; Sat, 15 Apr 2017 14:43:45 +0200 (CEST) Date: Sat, 15 Apr 2017 14:43:41 +0200 From: Danny Milosavljevic To: Mathieu Othacehe Subject: Re: bug#26339: [PATCH 06/18] vm: Reword grub.cfg to boot.cfg Message-ID: <20170415144341.021f493c@scratchpost.org> In-Reply-To: <20170402135242.2958-6-m.othacehe@gmail.com> References: <20170402135242.2958-1-m.othacehe@gmail.com> <20170402135242.2958-6-m.othacehe@gmail.com> X-Mailer: Claws Mail 3.14.1 (GTK+ 2.24.31; x86_64-unknown-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 26339 Cc: 26339@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.7 (/) Applied a variant of this patch as 07f812c404cd05dcac0d2801ad476f6e367ca6d4. Changes are: - Changed context to make it apply without #:bootcfg.drv . From debbugs-submit-bounces@debbugs.gnu.org Sat Apr 15 08:45:02 2017 Received: (at 26339) by debbugs.gnu.org; 15 Apr 2017 12:45:02 +0000 Received: from localhost ([127.0.0.1]:47996 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1czN4Y-0005hY-02 for submit@debbugs.gnu.org; Sat, 15 Apr 2017 08:45:02 -0400 Received: from dd1012.kasserver.com ([85.13.128.8]:58124) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1czN4W-0005h9-56 for 26339@debbugs.gnu.org; Sat, 15 Apr 2017 08:45:00 -0400 Received: from localhost (178.113.180.42.wireless.dyn.drei.com [178.113.180.42]) by dd1012.kasserver.com (Postfix) with ESMTPSA id 2E6981CA02EC; Sat, 15 Apr 2017 14:44:59 +0200 (CEST) Date: Sat, 15 Apr 2017 14:44:57 +0200 From: Danny Milosavljevic To: Mathieu Othacehe Subject: Re: bug#26339: [PATCH 05/18] system: Rename operating-system-grub.cfg to operating-system-bootcfg. Message-ID: <20170415144457.7958a098@scratchpost.org> In-Reply-To: <20170402135242.2958-5-m.othacehe@gmail.com> References: <20170402135242.2958-1-m.othacehe@gmail.com> <20170402135242.2958-5-m.othacehe@gmail.com> X-Mailer: Claws Mail 3.14.1 (GTK+ 2.24.31; x86_64-unknown-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 26339 Cc: 26339@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.7 (/) Commited a variant of this patch as c76b3046f651e8f46db1a093fdfc78cdc0bc3a13. Changes are: - Also adapt gnu/system/vm.scm and guix/scripts/system.scm to use operating-system-bootcfg (in order to make this patch apply independently). From debbugs-submit-bounces@debbugs.gnu.org Sat Apr 15 08:45:42 2017 Received: (at 26339) by debbugs.gnu.org; 15 Apr 2017 12:45:42 +0000 Received: from localhost ([127.0.0.1]:47999 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1czN5C-0005im-Au for submit@debbugs.gnu.org; Sat, 15 Apr 2017 08:45:42 -0400 Received: from dd1012.kasserver.com ([85.13.128.8]:58232) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1czN5B-0005ie-3p for 26339@debbugs.gnu.org; Sat, 15 Apr 2017 08:45:41 -0400 Received: from localhost (178.113.180.42.wireless.dyn.drei.com [178.113.180.42]) by dd1012.kasserver.com (Postfix) with ESMTPSA id 31A2B1CA02EC; Sat, 15 Apr 2017 14:45:40 +0200 (CEST) Date: Sat, 15 Apr 2017 14:45:38 +0200 From: Danny Milosavljevic To: Mathieu Othacehe Subject: Re: bug#26339: [PATCH 12/18] system: Rename grub-device to fs->boot-device. Message-ID: <20170415144538.367a6426@scratchpost.org> In-Reply-To: <20170402135242.2958-12-m.othacehe@gmail.com> References: <20170402135242.2958-1-m.othacehe@gmail.com> <20170402135242.2958-12-m.othacehe@gmail.com> X-Mailer: Claws Mail 3.14.1 (GTK+ 2.24.31; x86_64-unknown-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 26339 Cc: 26339@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.7 (/) Pushed a variant of this patch as 7085ca9690f6b3838ae3dc0f832c30e41681e835. Changes are: - Minimal changes to make it apply independently. From debbugs-submit-bounces@debbugs.gnu.org Sat Apr 15 09:04:43 2017 Received: (at 26339) by debbugs.gnu.org; 15 Apr 2017 13:04:43 +0000 Received: from localhost ([127.0.0.1]:48004 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1czNNa-00069V-Uf for submit@debbugs.gnu.org; Sat, 15 Apr 2017 09:04:43 -0400 Received: from dd1012.kasserver.com ([85.13.128.8]:60938) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1czNNY-00069N-R0 for 26339@debbugs.gnu.org; Sat, 15 Apr 2017 09:04:41 -0400 Received: from localhost (178.113.180.42.wireless.dyn.drei.com [178.113.180.42]) by dd1012.kasserver.com (Postfix) with ESMTPSA id 8DEC21CA02EC; Sat, 15 Apr 2017 15:04:37 +0200 (CEST) Date: Sat, 15 Apr 2017 15:04:36 +0200 From: Danny Milosavljevic To: Mathieu Othacehe Subject: Re: bug#26339: [PATCH 01/18] system: Pass to grub. Message-ID: <20170415150436.46fe66b5@scratchpost.org> In-Reply-To: <20170402135242.2958-1-m.othacehe@gmail.com> References: <20170402134916.2871-1-m.othacehe@gmail.com> <20170402135242.2958-1-m.othacehe@gmail.com> X-Mailer: Claws Mail 3.14.1 (GTK+ 2.24.31; x86_64-unknown-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 26339 Cc: 26339@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.7 (/) Hi, > + I think it's disadvantageous to export the entire structure. It makes the memory layout public and also makes us unable to replace it by a shim easily later - if we ever want to. > +(define (boot-parameters->menu-entry conf) > + (menu-entry > + (label (boot-parameters-label conf)) > + (device (boot-parameters-store-device conf)) > + (device-mount-point (boot-parameters-store-mount-point conf)) > + (linux (boot-parameters-kernel conf)) > + (linux-arguments (boot-parameters-kernel-arguments conf)) > + (initrd (boot-parameters-initrd conf)))) I think this way of using boot-parameters is good and also doesn't need the export above. From debbugs-submit-bounces@debbugs.gnu.org Sat Apr 15 09:25:21 2017 Received: (at 26339) by debbugs.gnu.org; 15 Apr 2017 13:25:21 +0000 Received: from localhost ([127.0.0.1]:48009 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1czNhZ-0006cN-Mb for submit@debbugs.gnu.org; Sat, 15 Apr 2017 09:25:21 -0400 Received: from dd1012.kasserver.com ([85.13.128.8]:37690) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1czNhX-0006cF-PG for 26339@debbugs.gnu.org; Sat, 15 Apr 2017 09:25:20 -0400 Received: from localhost (178.113.180.42.wireless.dyn.drei.com [178.113.180.42]) by dd1012.kasserver.com (Postfix) with ESMTPSA id 186A51CA02EC; Sat, 15 Apr 2017 15:25:17 +0200 (CEST) Date: Sat, 15 Apr 2017 15:25:15 +0200 From: Danny Milosavljevic To: Mathieu Othacehe Subject: Re: bug#26339: [PATCH 14/18] scripts: system: Rename grub? and install-grub? to bootloader? and install-bootloader?. Message-ID: <20170415152515.6b53adf2@scratchpost.org> In-Reply-To: <20170402135242.2958-14-m.othacehe@gmail.com> References: <20170402135242.2958-1-m.othacehe@gmail.com> <20170402135242.2958-14-m.othacehe@gmail.com> X-Mailer: Claws Mail 3.14.1 (GTK+ 2.24.31; x86_64-unknown-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 26339 Cc: 26339@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.7 (/) Pushed a variant of this as e61519ab9c26b2309c84b65456c4ee5cd4d2c163 to master. Changes are: - Still use grub-configuration-device instead of bootloader-configuration-device (in order to make it apply independently). - Still use "--no-grub" command line option. From debbugs-submit-bounces@debbugs.gnu.org Sat Apr 15 09:34:02 2017 Received: (at 26339) by debbugs.gnu.org; 15 Apr 2017 13:34:02 +0000 Received: from localhost ([127.0.0.1]:48015 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1czNpy-0006qA-Go for submit@debbugs.gnu.org; Sat, 15 Apr 2017 09:34:02 -0400 Received: from dd1012.kasserver.com ([85.13.128.8]:39018) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1czNpx-0006pl-7o for 26339@debbugs.gnu.org; Sat, 15 Apr 2017 09:34:01 -0400 Received: from localhost (178.113.180.42.wireless.dyn.drei.com [178.113.180.42]) by dd1012.kasserver.com (Postfix) with ESMTPSA id 0694D1CA02EC; Sat, 15 Apr 2017 15:33:59 +0200 (CEST) Date: Sat, 15 Apr 2017 15:33:58 +0200 From: Danny Milosavljevic To: Mathieu Othacehe Subject: Re: bug#26339: [PATCH 08/18] bootloader: Stop using grub module. Message-ID: <20170415153358.3bb2d178@scratchpost.org> In-Reply-To: <20170402135242.2958-8-m.othacehe@gmail.com> References: <20170402135242.2958-1-m.othacehe@gmail.com> <20170402135242.2958-8-m.othacehe@gmail.com> X-Mailer: Claws Mail 3.14.1 (GTK+ 2.24.31; x86_64-unknown-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 26339 Cc: 26339@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.7 (/) > diff --git a/gnu/tests/web.scm b/gnu/tests/web.scm > index cdc579123..0e98a128c 100644 > --- a/gnu/tests/web.scm > +++ b/gnu/tests/web.scm > @@ -1,5 +1,6 @@ > ;;; GNU Guix --- Functional package management for GNU > ;;; Copyright =C2=A9 2017 Ludovic Court=C3=A8s > +;;; Copyright =C2=A9 2017 Mathieu Othacehe > ;;; > ;;; This file is part of GNU Guix. > ;;; > @@ -19,7 +20,6 @@ > (define-module (gnu tests web) > #:use-module (gnu tests) > #:use-module (gnu system) > - #:use-module (gnu system grub) > #:use-module (gnu system file-systems) > #:use-module (gnu system shadow) > #:use-module (gnu system vm) Applied only this chunk as 99828febe05663c5d93dc52594eab28c6a1fe3d8 to mast= er. From debbugs-submit-bounces@debbugs.gnu.org Sat Apr 15 09:59:06 2017 Received: (at 26339) by debbugs.gnu.org; 15 Apr 2017 13:59:06 +0000 Received: from localhost ([127.0.0.1]:49027 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1czOED-0007gF-Tn for submit@debbugs.gnu.org; Sat, 15 Apr 2017 09:59:06 -0400 Received: from dd1012.kasserver.com ([85.13.128.8]:42798) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1czOEC-0007g7-Ml for 26339@debbugs.gnu.org; Sat, 15 Apr 2017 09:59:05 -0400 Received: from localhost (178.113.180.42.wireless.dyn.drei.com [178.113.180.42]) by dd1012.kasserver.com (Postfix) with ESMTPSA id F0FF31CA02EC; Sat, 15 Apr 2017 15:59:02 +0200 (CEST) Date: Sat, 15 Apr 2017 15:58:55 +0200 From: Danny Milosavljevic To: Mathieu Othacehe Subject: Re: bug#26339: [PATCH 01/18] system: Pass to grub. Message-ID: <20170415155855.1b09406f@scratchpost.org> In-Reply-To: <20170402135242.2958-1-m.othacehe@gmail.com> References: <20170402134916.2871-1-m.othacehe@gmail.com> <20170402135242.2958-1-m.othacehe@gmail.com> X-Mailer: Claws Mail 3.14.1 (GTK+ 2.24.31; x86_64-unknown-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 26339 Cc: 26339@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.7 (/) > diff --git a/gnu/system/grub.scm b/gnu/system/grub.scm > index 4f9bde6a6..f2838d633 100644 > --- a/gnu/system/grub.scm > +++ b/gnu/system/grub.scm > @@ -298,9 +309,9 @@ corresponding to old generations of the system." > #$initrd))))) > > (mlet %store-monad ((sugar (eye-candy config > - (menu-entry-device (first entries)) > + (menu-entry-device (first all-entries)) > (menu-entry-device-mount-point > - (first entries)) > + (first all-entries)) > #:system system > #:port #~port))) > (define builder ... oops. (first entries) could indeed fail if the list of profile generations is empty. That shouldn't happen but anyway, the new way is safer. Applied only this chunk to master as 0ab1e8ae8892c92fd7a1fd07430ba6f2b710668d. From debbugs-submit-bounces@debbugs.gnu.org Sat Apr 15 11:39:46 2017 Received: (at 26339) by debbugs.gnu.org; 15 Apr 2017 15:39:46 +0000 Received: from localhost ([127.0.0.1]:49118 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1czPne-0003Rl-IN for submit@debbugs.gnu.org; Sat, 15 Apr 2017 11:39:46 -0400 Received: from dd1012.kasserver.com ([85.13.128.8]:59078) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1czPnc-0003Rd-Tk for 26339@debbugs.gnu.org; Sat, 15 Apr 2017 11:39:45 -0400 Received: from localhost (178.113.180.42.wireless.dyn.drei.com [178.113.180.42]) by dd1012.kasserver.com (Postfix) with ESMTPSA id D378A1CA02EC; Sat, 15 Apr 2017 17:39:35 +0200 (CEST) Date: Sat, 15 Apr 2017 17:39:18 +0200 From: Danny Milosavljevic To: Mathieu Othacehe Subject: Re: bug#26339: [PATCH 01/18] system: Pass to grub. Message-ID: <20170415173918.2eae7660@scratchpost.org> In-Reply-To: <20170415155855.1b09406f@scratchpost.org> References: <20170402134916.2871-1-m.othacehe@gmail.com> <20170402135242.2958-1-m.othacehe@gmail.com> <20170415155855.1b09406f@scratchpost.org> X-Mailer: Claws Mail 3.14.1 (GTK+ 2.24.31; x86_64-unknown-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 26339 Cc: 26339@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.7 (/) I've also applied the remainder of that patch in commit 2e58e05bb68d4b747882cfa2b460b132d456f54a to master now. This introduces a structure that can be used to specify boot parameters in a grub-independent way. (gnu system grub) will then load the data from that into its own structure . From debbugs-submit-bounces@debbugs.gnu.org Sat Apr 15 12:03:21 2017 Received: (at 26339) by debbugs.gnu.org; 15 Apr 2017 16:03:21 +0000 Received: from localhost ([127.0.0.1]:49141 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1czQAS-00040o-73 for submit@debbugs.gnu.org; Sat, 15 Apr 2017 12:03:21 -0400 Received: from dd1012.kasserver.com ([85.13.128.8]:34668) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1czQAP-00040f-SG for 26339@debbugs.gnu.org; Sat, 15 Apr 2017 12:03:18 -0400 Received: from localhost (178.113.180.42.wireless.dyn.drei.com [178.113.180.42]) by dd1012.kasserver.com (Postfix) with ESMTPSA id 18B741CA02EC; Sat, 15 Apr 2017 18:03:16 +0200 (CEST) Date: Sat, 15 Apr 2017 18:03:12 +0200 From: Danny Milosavljevic To: Mathieu Othacehe Subject: Re: bug#26339: [PATCH 02/18] system: Add extlinux support. Message-ID: <20170415180312.19632ddf@scratchpost.org> In-Reply-To: <20170402135242.2958-2-m.othacehe@gmail.com> References: <20170402135242.2958-1-m.othacehe@gmail.com> <20170402135242.2958-2-m.othacehe@gmail.com> X-Mailer: Claws Mail 3.14.1 (GTK+ 2.24.31; x86_64-unknown-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 26339 Cc: 26339@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.7 (/) > + bootloader-configuration-file-location In my opinion in UNIX such a thing is called a "file name", so how about bootloader-configururation-file-name ? > + bootloader-configuration-file-procedure How about bootloader-configuration-file-generator Or bootloader-configuration-file-generation-procedure ? > + bootloader-configuration-install-procedure How about bootloader-configuration-installer or bootloader-configuration-installation-procedure ? > + (match-lambda > + (($ label _ _ _ kernel kernel-arguments initrd) > + #~(format port "LABEL ~a > + MENU LABEL ~a > + KERNEL ~a > + FDTDIR ~a/lib/dtbs > + INITRD ~a > + APPEND ~a > +~%" > + #$label #$label > + #$kernel #$kernel #$initrd > + (string-join (list #$@kernel-arguments)))))) I think it would be better to use the field accessor procedures. > + (* 10 timeout)) Magical conversion? Could use a comment... Remainder of the patch LGTM. From debbugs-submit-bounces@debbugs.gnu.org Sat Apr 15 12:22:27 2017 Received: (at 26339) by debbugs.gnu.org; 15 Apr 2017 16:22:27 +0000 Received: from localhost ([127.0.0.1]:49148 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1czQSw-0004R9-U3 for submit@debbugs.gnu.org; Sat, 15 Apr 2017 12:22:27 -0400 Received: from dd1012.kasserver.com ([85.13.128.8]:37934) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1czQSv-0004R1-E2 for 26339@debbugs.gnu.org; Sat, 15 Apr 2017 12:22:25 -0400 Received: from localhost (178.113.180.42.wireless.dyn.drei.com [178.113.180.42]) by dd1012.kasserver.com (Postfix) with ESMTPSA id 220BE1CA02EC; Sat, 15 Apr 2017 18:22:24 +0200 (CEST) Date: Sat, 15 Apr 2017 18:22:22 +0200 From: Danny Milosavljevic To: Mathieu Othacehe Subject: Re: bug#26339: [PATCH 04/18] bootloader: Add install procedures and use them. Message-ID: <20170415182222.3e1cef0e@scratchpost.org> In-Reply-To: <20170402135242.2958-4-m.othacehe@gmail.com> References: <20170402135242.2958-1-m.othacehe@gmail.com> <20170402135242.2958-4-m.othacehe@gmail.com> X-Mailer: Claws Mail 3.14.1 (GTK+ 2.24.31; x86_64-unknown-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 26339 Cc: 26339@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.7 (/) > + (symlink bootcfg (string-append directory "/bootcfg")))) ^^^^^^^ Is that safe? Will there only be one bootloader configuration at all times? What if the user uses multiple "guix system"s on the same machine? > + (install-boot-config bootcfg bootcfg-location target) > + (when install-bootloader > + (install-bootloader bootloader device target)) I think it's very good to finally seperate installation of the bootloader configuration and installation of the bootloader. On some architectures (for example ARM) it's very uncommon to replace the bootloader - and if you do it too often it would wear out the flash storage prematurely. >[exports] > + dd Errrr... was that exported on purpose? Sounds very implementation-detaily to me. > + #:install-bootloader Rather #:bootloader-installer or #:bootloader-installation ? Or leave it as is, doesn't matter much, I guess. I think a non-substantive for this is strange. > + #$(bootloader-configuration-install-procedure If it's not installing a procedure it should be bootloader-configuration-installation-procedure or bootloader-configuration-installer, I think. Otherwise LGTM! From debbugs-submit-bounces@debbugs.gnu.org Sat Apr 15 12:26:38 2017 Received: (at 26339) by debbugs.gnu.org; 15 Apr 2017 16:26:38 +0000 Received: from localhost ([127.0.0.1]:49164 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1czQX0-0004Yq-C6 for submit@debbugs.gnu.org; Sat, 15 Apr 2017 12:26:38 -0400 Received: from dd1012.kasserver.com ([85.13.128.8]:38730) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1czQWy-0004Yh-5w for 26339@debbugs.gnu.org; Sat, 15 Apr 2017 12:26:36 -0400 Received: from localhost (178.113.180.42.wireless.dyn.drei.com [178.113.180.42]) by dd1012.kasserver.com (Postfix) with ESMTPSA id 5CAA61CA02EC; Sat, 15 Apr 2017 18:26:35 +0200 (CEST) Date: Sat, 15 Apr 2017 18:26:34 +0200 From: Danny Milosavljevic To: Mathieu Othacehe Subject: Re: bug#26339: [PATCH 07/18] system: Add bootloader type. Message-ID: <20170415182634.4e2f9c68@scratchpost.org> In-Reply-To: <20170402135242.2958-7-m.othacehe@gmail.com> References: <20170402135242.2958-1-m.othacehe@gmail.com> <20170402135242.2958-7-m.othacehe@gmail.com> X-Mailer: Claws Mail 3.14.1 (GTK+ 2.24.31; x86_64-unknown-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 26339 Cc: 26339@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.7 (/) LGTM mostly. > -(define* (grub-configuration #:optional (config (bootloader-configuration))) > - (bootloader-configuration > - (inherit config) > - (bootloader (@ (gnu packages bootloaders) grub)) Hmm. Does that mean the user can't replace the bootloader package in the configuration? > -(define* (grub-efi-configuration #:optional (config (bootloader-configuration))) > - (bootloader-configuration > - (inherit (grub-configuration config)) > - (bootloader (@ (gnu packages bootloaders) grub-efi)))) Oh, so that's how. I think it would be nice-to-have if the user could also override the bootloader package used. > - (install-procedure install-syslinux))) Wait, so install-syslinux wouldn't need to be exported from this module at all, right? Still nice that the user can use it - though is it worth exposing the installers? Otherwise LGTM! From debbugs-submit-bounces@debbugs.gnu.org Sat Apr 15 12:44:22 2017 Received: (at 26339) by debbugs.gnu.org; 15 Apr 2017 16:44:22 +0000 Received: from localhost ([127.0.0.1]:49184 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1czQoA-0004zj-My for submit@debbugs.gnu.org; Sat, 15 Apr 2017 12:44:22 -0400 Received: from dd1012.kasserver.com ([85.13.128.8]:41436) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1czQo9-0004zb-79 for 26339@debbugs.gnu.org; Sat, 15 Apr 2017 12:44:21 -0400 Received: from localhost (178.113.180.42.wireless.dyn.drei.com [178.113.180.42]) by dd1012.kasserver.com (Postfix) with ESMTPSA id 047351CA02EC; Sat, 15 Apr 2017 18:44:16 +0200 (CEST) Date: Sat, 15 Apr 2017 18:44:15 +0200 From: Danny Milosavljevic To: Mathieu Othacehe Subject: Re: bug#26339: [PATCH 08/18] bootloader: Stop using grub module. Message-ID: <20170415184415.35222701@scratchpost.org> In-Reply-To: <20170402135242.2958-8-m.othacehe@gmail.com> References: <20170402135242.2958-1-m.othacehe@gmail.com> <20170402135242.2958-8-m.othacehe@gmail.com> X-Mailer: Claws Mail 3.14.1 (GTK+ 2.24.31; x86_64-unknown-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 26339 Cc: 26339@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.7 (/) LGTM. Holding off merging that patch until some other patches that patch needs in the series were merged. From debbugs-submit-bounces@debbugs.gnu.org Sat Apr 15 12:48:00 2017 Received: (at 26339) by debbugs.gnu.org; 15 Apr 2017 16:48:00 +0000 Received: from localhost ([127.0.0.1]:49188 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1czQrg-000557-3l for submit@debbugs.gnu.org; Sat, 15 Apr 2017 12:48:00 -0400 Received: from dd1012.kasserver.com ([85.13.128.8]:42092) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1czQre-00054z-Ee for 26339@debbugs.gnu.org; Sat, 15 Apr 2017 12:47:58 -0400 Received: from localhost (178.113.180.42.wireless.dyn.drei.com [178.113.180.42]) by dd1012.kasserver.com (Postfix) with ESMTPSA id 7A2B81CA02EC; Sat, 15 Apr 2017 18:47:57 +0200 (CEST) Date: Sat, 15 Apr 2017 18:47:56 +0200 From: Danny Milosavljevic To: Mathieu Othacehe Subject: Re: bug#26339: [PATCH 17/18] scripts: system: Adapt "switch-generation" to new bootloader API. Message-ID: <20170415184756.10b178be@scratchpost.org> In-Reply-To: <20170402135242.2958-17-m.othacehe@gmail.com> References: <20170402135242.2958-1-m.othacehe@gmail.com> <20170402135242.2958-17-m.othacehe@gmail.com> X-Mailer: Claws Mail 3.14.1 (GTK+ 2.24.31; x86_64-unknown-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 26339 Cc: 26339@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.7 (/) On Sun, 2 Apr 2017 15:52:41 +0200 Mathieu Othacehe wrote: > * guix/scripts/system.scm (profile-grub-entries): [...] > (reinstall-grub): Rename to reinstall-bootloader. Read boot-device and > boot-type from parameters file to be able to restore the correct bootloader > on specified device. Wait. So that's the only reason for boot-type ? I guess it works like that too, but couldn't we check the operating-system bootloader-configuration directly ? Or is it for something completely different ? From debbugs-submit-bounces@debbugs.gnu.org Sat Apr 15 13:15:55 2017 Received: (at 26339) by debbugs.gnu.org; 15 Apr 2017 17:15:55 +0000 Received: from localhost ([127.0.0.1]:49247 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1czRIh-0007Wv-6f for submit@debbugs.gnu.org; Sat, 15 Apr 2017 13:15:55 -0400 Received: from mail-wr0-f194.google.com ([209.85.128.194]:34411) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1czRIf-0007Wj-Kk for 26339@debbugs.gnu.org; Sat, 15 Apr 2017 13:15:53 -0400 Received: by mail-wr0-f194.google.com with SMTP id u18so15809690wrc.1 for <26339@debbugs.gnu.org>; Sat, 15 Apr 2017 10:15:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=references:user-agent:from:to:cc:subject:in-reply-to:date :message-id:mime-version; bh=Cnb9GnV7vO0wul6wc6I9HVEefIEE+rUEBCiwZ1MwyD0=; b=JyIZDcvO8fOiV3zqMlBb9eUE9L7tPy/5NIUZMiqi2Ke4Dgoeya293E7jPM1Hs3z/3i kCuNOD1sSHM9voGscCNjktGgJBkx/E/8murFlFEML7+xELaZEZGCnqyqWHD8indpN+5/ 4nKrbXvkqhF7FP8qa5/WuYkfAjmzQXP2XRTZ6U+MhbASGF/wa1e9SNhnmerNK1HHQoAY OKqDDLU8vZJ1IVaIwBrEOGBQ56Y3Ke638+NzvcIh83d7DPxkMAmQ/HZgrDsMnRZwZ5uD eGqqh9sbXPeARRoHqkgQJPBwpeGggLWXiJ+epFU0UjuPZ5qwh6zd2uq3VbNKO5ylZu15 jQ7Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:references:user-agent:from:to:cc:subject :in-reply-to:date:message-id:mime-version; bh=Cnb9GnV7vO0wul6wc6I9HVEefIEE+rUEBCiwZ1MwyD0=; b=WlPxeXNwEDrxbGO7hrOVfR8CRQ6AursnNpg9rCylD2Ey8imhb/sXyUtTX7EG2mCbwd ox+461vlVrxCgyVsT23GLMAe4fv7QOMDA2JGA5o0EXvsua+1Ei0kAqjyqcc2STWCjMRN FpHwP23poyG3hBlrML8RNpW2gEv1/IdzksYnv32/jFuJ9+S/63Wcl5N6ATXZ7BFR/Ii2 v+U9TG724MAkhZr0vB0hZAaMBDhUnFhR9vd1KMsW3OdS7/OPQ7f0Qqxji8E/YFXGU8zX lbd9UG6I9VA0BsC+JvwVw6WPOwzzkwiH1uzUA59+xhT6o/KLLONsEEzaMoqN++BIyidM YIUg== X-Gm-Message-State: AN3rC/6Ozg17E8+o+hz+sA3JuynWS1RFRLgHDQCuiEy6vASygu0ZN0h1 ZsUdORTQHrf5Pr3b X-Received: by 10.223.145.106 with SMTP id j97mr11047261wrj.129.1492276547844; Sat, 15 Apr 2017 10:15:47 -0700 (PDT) Received: from cervin (85-169-37-239.rev.numericable.fr. [85.169.37.239]) by smtp.gmail.com with ESMTPSA id z38sm7115721wrc.36.2017.04.15.10.15.46 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 15 Apr 2017 10:15:46 -0700 (PDT) References: <20170402135242.2958-1-m.othacehe@gmail.com> <20170402135242.2958-4-m.othacehe@gmail.com> <20170415182222.3e1cef0e@scratchpost.org> User-agent: mu4e 0.9.18; emacs 25.2.1 From: Mathieu Othacehe To: Danny Milosavljevic Subject: Re: bug#26339: [PATCH 04/18] bootloader: Add install procedures and use them. In-reply-to: <20170415182222.3e1cef0e@scratchpost.org> Date: Sat, 15 Apr 2017 19:15:46 +0200 Message-ID: <8760i5iocd.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 26339 Cc: 26339@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: -2.3 (--) > Is that safe? Will there only be one bootloader configuration at all times? What if the user uses multiple "guix system"s on the same machine? Well you can have only one bootloader in MBR at a time, so even if you have multiple system generations with various bootloaders, only one is installed. But I might be wrong here ... >> + dd > > Errrr... was that exported on purpose? Sounds very implementation-detaily to me. Yes you're right, no need to export dd. > Rather #:bootloader-installer or #:bootloader-installation ? Or leave it as is, doesn't matter much, I guess. I think a non-substantive for this is strange. #:bootloader-installer seems fine, I'll update. > >> + #$(bootloader-configuration-install-procedure > > If it's not installing a procedure it should be bootloader-configuration-installation-procedure or bootloader-configuration-installer, I think. Ok for bootloader-configuration-installer then. > > Otherwise LGTM! Thanks, Mathieu From debbugs-submit-bounces@debbugs.gnu.org Sat Apr 15 13:23:22 2017 Received: (at 26339) by debbugs.gnu.org; 15 Apr 2017 17:23:22 +0000 Received: from localhost ([127.0.0.1]:49252 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1czRPt-0007i8-Ve for submit@debbugs.gnu.org; Sat, 15 Apr 2017 13:23:22 -0400 Received: from mail-wr0-f195.google.com ([209.85.128.195]:35031) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1czRPs-0007hv-JN for 26339@debbugs.gnu.org; Sat, 15 Apr 2017 13:23:20 -0400 Received: by mail-wr0-f195.google.com with SMTP id l44so15758544wrc.2 for <26339@debbugs.gnu.org>; Sat, 15 Apr 2017 10:23:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=references:user-agent:from:to:cc:subject:in-reply-to:date :message-id:mime-version; bh=BKqtLDacqbuc6Hk7ZweVAFT7pDfFI0EvXbs68L2bxtQ=; b=CSgSDTl0MbG4ubUVmVyNMkIEOzEF3OHZqm6vC6gvsDgIJAtv2dzaN7+aC10lca7GZi ZiSJP3HpviHF31JYgH6UOyxTcUhwnGvljjyjq4Gt9KEHx99ksqrWZQWHgItk6CYdL0B2 8oFBh2CFcDg6Js3V+VK3/KVMnJRTBrjlpKDcC/4GrKlNGoC+/+i/bwN+IToa6vk05Mx6 MpzyIbn0Z1TrUGsJ+n+jAxsb3FqLzcPNs2oQsbQGhK0ySADj13l49cb/I4lkEWEzyawO 7hgdvhu+UhzE/QRgdrGakI8HUFH0mrRU1gbCbyUtknkEaNXldgc4I5U3+qJK6SVWWKc7 TIKQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:references:user-agent:from:to:cc:subject :in-reply-to:date:message-id:mime-version; bh=BKqtLDacqbuc6Hk7ZweVAFT7pDfFI0EvXbs68L2bxtQ=; b=eeRJMAhS94JmFk+AXxHqyuIcJQsdEzb8SlhPH+7cqoeZDtgdYAwRTGj/cK+yxZgiAW 8oSyFT94W6FN3Vv1Qduc//nrgGl5C5vusqdLbdX9pCOXN3lX+SrSP1lW1Fu74aBaWTlu SvELiIHZts9JqDO/6ifNbO5Arb1Ves2OWC8jtuCirYhFKSyTyegsE76uw9f563HXTPBn Q8xigeLX/5nOKXA3dZutDIJjXh4NMmV9ZhHEL5EHHds+RJIPVXaBS5k5J1h/2DPKM0se lVM+TrW0AzOOYBfsFkw3bd1Ub9khHg8pFzUGNvv2R/IG01Gc6yFcru0hP5BINmzjnRLo 14VQ== X-Gm-Message-State: AN3rC/7Ete9A6AklTvpQFaGJO5fSlH/eYRzDOf8YLAV8U24TtF+WZZ2j RwZUkkDD+sFxUQ== X-Received: by 10.223.164.6 with SMTP id d6mr11024734wra.144.1492276994938; Sat, 15 Apr 2017 10:23:14 -0700 (PDT) Received: from cervin (85-169-37-239.rev.numericable.fr. [85.169.37.239]) by smtp.gmail.com with ESMTPSA id j138sm3332592wmg.10.2017.04.15.10.23.13 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 15 Apr 2017 10:23:14 -0700 (PDT) References: <20170402135242.2958-1-m.othacehe@gmail.com> <20170402135242.2958-7-m.othacehe@gmail.com> <20170415182634.4e2f9c68@scratchpost.org> User-agent: mu4e 0.9.18; emacs 25.2.1 From: Mathieu Othacehe To: Danny Milosavljevic Subject: Re: bug#26339: [PATCH 07/18] system: Add bootloader type. In-reply-to: <20170415182634.4e2f9c68@scratchpost.org> Date: Sat, 15 Apr 2017 19:23:13 +0200 Message-ID: <874lxpinzy.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 26339 Cc: 26339@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: -2.3 (--) > Oh, so that's how. I think it would be nice-to-have if the user could also override the bootloader package used. The user could already write : --8<---------------cut here---------------start------------->8--- (bootloader-configuration (inherit %grub-configuration) (bootloader my-grub)) --8<---------------cut here---------------end--------------->8--- Or am I wrong here ? > >> - (install-procedure install-syslinux))) > > Wait, so install-syslinux wouldn't need to be exported from this module at all, right? > > Still nice that the user can use it - though is it worth exposing the installers? I'm not sure here, maybe not exposing installers would be better here. > > Otherwise LGTM! Thanks, Mathieu From debbugs-submit-bounces@debbugs.gnu.org Sat Apr 15 13:27:17 2017 Received: (at 26339) by debbugs.gnu.org; 15 Apr 2017 17:27:17 +0000 Received: from localhost ([127.0.0.1]:49256 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1czRTh-0007oW-GD for submit@debbugs.gnu.org; Sat, 15 Apr 2017 13:27:17 -0400 Received: from mail-wr0-f193.google.com ([209.85.128.193]:33368) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1czRTg-0007oE-0H for 26339@debbugs.gnu.org; Sat, 15 Apr 2017 13:27:16 -0400 Received: by mail-wr0-f193.google.com with SMTP id l28so15790560wre.0 for <26339@debbugs.gnu.org>; Sat, 15 Apr 2017 10:27:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=references:user-agent:from:to:cc:subject:in-reply-to:date :message-id:mime-version; bh=UhM7hklOZM7bZ56EOHn0JQ9uy7Ju8fwecMczLZqo2Us=; b=pQtUFEHgMhKQcWn1mxCd6YftBpVbtSWq90wUyUGchtMftHOR1FpXXuzmXF/3AHb4Mr 3MyCiN39PNBZUX7hf17Q1q9EQg0f35E6r5kdDt4cJzIUqAEgQbv8/0RXM/jiBLiJVbw/ bKBVQ+J+yXPvITHON4N1O6ucDmbcgzZslmTtHwmI9UKBJ2rfBpagzY5fP98CJl/NRJE+ Vby6FKWLDyqsiIv+rmvy8E/J28KVhjC6lpbCrfJgP2qeYga+l8yiLHnA1qEYwYOb9jXd kb8WaUiSQbWVCKDm+s9irk8PVblPunCaEkR8u+4JCELyv2x+2n7gUFfbLQD49vf+/DYj gaDA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:references:user-agent:from:to:cc:subject :in-reply-to:date:message-id:mime-version; bh=UhM7hklOZM7bZ56EOHn0JQ9uy7Ju8fwecMczLZqo2Us=; b=Bs2Ne4NSLfc55+BiE1ejePSGeErMbF48R/jV24E56vBeS4waxXp+K2tjPGYKu+U6TC A/fzjnXq8G3BGeM6LTUeAdlGu+1O1ctZxbyGJ3CSIdwgS76LdIXLk5P7NOoLvlWuoGs3 SEbIaJlyC5BhoGb41vUGipy+lLA9N2ejE61T9ahRDaqKOCRAVUFJZRGvFAn8e5Lo3GzI YrWYsI//UUfS77fMO7MEj5y7za5T7/A7ZoEDLJwIJDJIVSgJSyQUDJx7n5DWBAcdGHSa SXISK4eUc9VO5pwBgCDFsgTt1Bldl7RB5Sjfh1fNkO/KSZsub2UynCaKZIaMD8JDMBSd qhBQ== X-Gm-Message-State: AN3rC/7N912UEGBZqFdy0ccs8DM5C8R0KpBYJDzChfXO/U/87ZwChG15 9+vnzuSnFxQ/2g== X-Received: by 10.223.136.125 with SMTP id e58mr11341310wre.73.1492277230416; Sat, 15 Apr 2017 10:27:10 -0700 (PDT) Received: from cervin (85-169-37-239.rev.numericable.fr. [85.169.37.239]) by smtp.gmail.com with ESMTPSA id v126sm3324280wmd.11.2017.04.15.10.27.09 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 15 Apr 2017 10:27:09 -0700 (PDT) References: <20170402135242.2958-1-m.othacehe@gmail.com> <20170402135242.2958-17-m.othacehe@gmail.com> <20170415184756.10b178be@scratchpost.org> User-agent: mu4e 0.9.18; emacs 25.2.1 From: Mathieu Othacehe To: Danny Milosavljevic Subject: Re: bug#26339: [PATCH 17/18] scripts: system: Adapt "switch-generation" to new bootloader API. In-reply-to: <20170415184756.10b178be@scratchpost.org> Date: Sat, 15 Apr 2017 19:27:09 +0200 Message-ID: <8737d9inte.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 26339 Cc: 26339@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: -2.3 (--) Thanks again for your patience Danny ! > Wait. So that's the only reason for boot-type ? I guess it works like that too, but couldn't we check the operating-system bootloader-configuration directly ? Or is it for something completely different ? Yes my idea was to use the boot-type to keep track of the installed bootloader, for each system generation (and to restore it if needed). I tried to find a better idea but I didn't. I'm not sure what you mean by checking "bootloader-configuration" ? Mathieu From debbugs-submit-bounces@debbugs.gnu.org Sat Apr 15 14:18:08 2017 Received: (at 26339) by debbugs.gnu.org; 15 Apr 2017 18:18:08 +0000 Received: from localhost ([127.0.0.1]:49335 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1czSGu-00049l-3A for submit@debbugs.gnu.org; Sat, 15 Apr 2017 14:18:08 -0400 Received: from mail-wm0-f67.google.com ([74.125.82.67]:36788) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1czSGs-000498-Ru for 26339@debbugs.gnu.org; Sat, 15 Apr 2017 14:18:07 -0400 Received: by mail-wm0-f67.google.com with SMTP id q125so3203932wmd.3 for <26339@debbugs.gnu.org>; Sat, 15 Apr 2017 11:18:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=references:user-agent:from:to:cc:subject:in-reply-to:date :message-id:mime-version; bh=ifgWI23Xwzkw3SjBZCfv4tHHaHCXS8d9DAjd8AKCv0U=; b=ceYMCMtM2cucwLkmJNEDaedNIXtZEF8NlDEYNCeLf062XXHRI4fornGIonTfvwDuez uTZrOjJuSRa8UvRj0YCjU7XDHcUagVn8rinbNZBkFr1KbLjT5kRItpxpwuTRx2jySQHj 5dHEOk40UVYi7EU5QHnv2QlNb4g7D8M0+B7XNlEQOIIKSgHFgAMcNdrdfy/4S+F5A4Vo 8ptYZA53XUa9HWpZuyI5Km7tKSmAHkasQHyapayLgrPIYwqjMF9rHmGuIzxp0nw1iZw2 sAVViQXR6Y3l6QWKqIt+U0EEeV8MWxquB5J2sjmmQ71jNKBty0HjTu124fYDgYBurSwg nHbg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:references:user-agent:from:to:cc:subject :in-reply-to:date:message-id:mime-version; bh=ifgWI23Xwzkw3SjBZCfv4tHHaHCXS8d9DAjd8AKCv0U=; b=BX9dTnwolsgJ7xnaBHnbwa38NAv+F+pnP/lHdLXt1c4+sfHFRnbivyNBc9tkwSPZPH B/AhIBI+v+u72vulp7hon9X1a+9ot/iQD/waVOa77w3wSlF4xPlGh47gOwDK5lCQArIE BIIiJDn8tJCjZVaZc0ise6Ev7Sc5wb9ufDnPrqwwbg/F4yiu+Pz/kkYqfxUmPtAouU7b yYaQ9QFjbhAWHoNhu1QZBfqbXPoWhXA1HcDcZyjKoPw+ZtnvDkMRB5vf6HHrKbCjFwdg Gfj+PvWoSDFT7zWriWTPTGRaP20lhdTpY6Y9ZFHORORuavQuKZ1u0C9ersIY12qr0+6z 2ECA== X-Gm-Message-State: AN3rC/7qau4Fsut+1ZmtQYiuYvVzNG4eCKu2JuvaqYRFqBWlXOj9bkv/ 8fDW6w+2jweIJudK X-Received: by 10.28.86.68 with SMTP id k65mr3247426wmb.112.1492280280956; Sat, 15 Apr 2017 11:18:00 -0700 (PDT) Received: from cervin (85-169-37-239.rev.numericable.fr. [85.169.37.239]) by smtp.gmail.com with ESMTPSA id x70sm529964wmf.1.2017.04.15.11.17.59 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 15 Apr 2017 11:17:59 -0700 (PDT) References: <20170402135242.2958-1-m.othacehe@gmail.com> <20170402135242.2958-17-m.othacehe@gmail.com> <20170415184756.10b178be@scratchpost.org> User-agent: mu4e 0.9.18; emacs 25.2.1 From: Mathieu Othacehe To: Danny Milosavljevic Subject: problem with commit abae042 In-reply-to: <20170415184756.10b178be@scratchpost.org> Date: Sat, 15 Apr 2017 20:17:59 +0200 Message-ID: <871sstilgo.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 26339 Cc: 26339@debbugs.gnu.org, guix-devel 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.5 (/) I think there's a problem with commit abae042 : * profile-grub-entries become unused and is still present. * When using switch-generation, operating-system-bootcfg is not * called. So, the kernel arguments are not correctly set (--root, * --system and --load), and the resulting entries in grub.cfg are broken. Mathieu From debbugs-submit-bounces@debbugs.gnu.org Sat Apr 15 14:56:40 2017 Received: (at 26339) by debbugs.gnu.org; 15 Apr 2017 18:56:40 +0000 Received: from localhost ([127.0.0.1]:49349 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1czSsC-0005Gz-J1 for submit@debbugs.gnu.org; Sat, 15 Apr 2017 14:56:40 -0400 Received: from dd1012.kasserver.com ([85.13.128.8]:34820) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1czSsA-0005Gn-ES for 26339@debbugs.gnu.org; Sat, 15 Apr 2017 14:56:38 -0400 Received: from localhost (178.113.180.42.wireless.dyn.drei.com [178.113.180.42]) by dd1012.kasserver.com (Postfix) with ESMTPSA id DB3AF1CA02F5; Sat, 15 Apr 2017 20:56:35 +0200 (CEST) Date: Sat, 15 Apr 2017 20:56:31 +0200 From: Danny Milosavljevic To: Mathieu Othacehe Subject: Re: problem with commit abae042 Message-ID: <20170415205631.46af6c48@scratchpost.org> In-Reply-To: <871sstilgo.fsf@gmail.com> References: <20170402135242.2958-1-m.othacehe@gmail.com> <20170402135242.2958-17-m.othacehe@gmail.com> <20170415184756.10b178be@scratchpost.org> <871sstilgo.fsf@gmail.com> X-Mailer: Claws Mail 3.14.1 (GTK+ 2.24.31; x86_64-unknown-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 26339 Cc: 26339@debbugs.gnu.org, guix-devel 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.7 (/) Hi, On Sat, 15 Apr 2017 20:17:59 +0200 Mathieu Othacehe wrote: > I think there's a problem with commit abae042 : > > * profile-grub-entries become unused and is still present. I know, I can't remove it without review, far too dangerous. > * When using switch-generation, operating-system-bootcfg is not > * called. So, the kernel arguments are not correctly set (--root, > * --system and --load), and the resulting entries in grub.cfg are broken. Yes, indeed. I'm working on it. If I can't get it to work today I'll back it out again. Too bad this is such a huge changeset - it's quite difficult to find a safe path. Do you have an idea how to fix it? Would it be good to press forward with the other patches or should I back it out? From debbugs-submit-bounces@debbugs.gnu.org Sat Apr 15 15:14:04 2017 Received: (at 26339) by debbugs.gnu.org; 15 Apr 2017 19:14:04 +0000 Received: from localhost ([127.0.0.1]:49368 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1czT92-0005gT-Jo for submit@debbugs.gnu.org; Sat, 15 Apr 2017 15:14:04 -0400 Received: from mail-wm0-f67.google.com ([74.125.82.67]:36678) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1czT90-0005fs-Lx for 26339@debbugs.gnu.org; Sat, 15 Apr 2017 15:14:03 -0400 Received: by mail-wm0-f67.google.com with SMTP id q125so3347292wmd.3 for <26339@debbugs.gnu.org>; Sat, 15 Apr 2017 12:14:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=references:user-agent:from:to:cc:subject:in-reply-to:date :message-id:mime-version; bh=VqczkzDKnNE4CjyC5qL6AduBg7Qt0ozDCT1lozZAFpY=; b=XoYCxMS965Lfrg1GjlGNGSWPQeMgs3Re+cY34RepisVtmzM2v7Yu7W7R+5/0q4alVt FjIH/eorqaRjtTu56N9EKxiPAlTd0kQNDVq+rAhKaeVtcTbV2kf+EVTsuJVtDFm2oFwz YTZJSgT1MOM0PtoSDSVW2+UPm14Ry/5tWNROrk2NwPqeKAF5PYblNl/nx3tAa5Ibo+sY j9aIP5Rh3/U9uquVHJTx3LOeWHihjJ9e3sNps/V4z9pSPeIUbC8OjexGBY9dnBouhBqs CTO6F/R5Vku6UuGqOCi7PZqsh82pIoEFlckymaZ3sL8yVTQ2YrMOsT+qFoFaqttkHlpJ ue1g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:references:user-agent:from:to:cc:subject :in-reply-to:date:message-id:mime-version; bh=VqczkzDKnNE4CjyC5qL6AduBg7Qt0ozDCT1lozZAFpY=; b=Zsfv2NQdLXLFkfwuthOmCuVeLkx4GDRQPdR3kBECfT0Cr6u+EX8pmSsg/UFJWxCgXD Rvnos5YbiuG4iG25HWIKH3sCvVDkKSepnpLA0Bkm37VGaxjNq8DXnBAJmdX5AcOTInKr 4MDWT4sdKNIga4xX3116ziDM1V8PxvGbqqRypp11XBXow9PA5FavvWI+0iStm91hU5jI RTxWM/PUjef0ClW1ZAkIOINE1T8vtyK8Zf5ML39iS+/zWEfXOzfi7yIiFKvsJ+pOr8R7 BMz1EobWR37ZdLpmqr4gQZBLyqdX+FeV+BQirKX2fHobzzZDQBd9GbbnG7EEBvNOITcJ jB2g== X-Gm-Message-State: AN3rC/5Luewar0nubl3gl0Ivq9BId2iXpq/79BPPFTRc8J2s4tyBG+1h lgbArNgPz6Z1Jw== X-Received: by 10.28.54.151 with SMTP id y23mr3480061wmh.90.1492283636910; Sat, 15 Apr 2017 12:13:56 -0700 (PDT) Received: from cervin (85-169-37-239.rev.numericable.fr. [85.169.37.239]) by smtp.gmail.com with ESMTPSA id y63sm3607101wme.31.2017.04.15.12.13.55 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 15 Apr 2017 12:13:55 -0700 (PDT) References: <20170402135242.2958-1-m.othacehe@gmail.com> <20170402135242.2958-17-m.othacehe@gmail.com> <20170415184756.10b178be@scratchpost.org> <871sstilgo.fsf@gmail.com> <20170415205631.46af6c48@scratchpost.org> User-agent: mu4e 0.9.18; emacs 25.2.1 From: Mathieu Othacehe To: Danny Milosavljevic Subject: Re: problem with commit abae042 In-reply-to: <20170415205631.46af6c48@scratchpost.org> Date: Sat, 15 Apr 2017 21:13:55 +0200 Message-ID: <87y3v1h4b0.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 26339 Cc: 26339@debbugs.gnu.org, guix-devel 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.5 (/) > Too bad this is such a huge changeset - it's quite difficult to find a safe path. Yes, and my split between commit isn't great, sorry about that. > Do you have an idea how to fix it? Nothing trivial. Plus I didn't notice before that profile-bootloader-entries and operating-system-bootcfg had parts that could have been factorized. > > Would it be good to press forward with the other patches or should I back it out? Maybe the safer approch would be to revert this commit. I'll publish new patches and try to find a better approach for profile-bootloader-entries, if you're ok ? Thank you, Mathieu From debbugs-submit-bounces@debbugs.gnu.org Sat Apr 15 15:50:50 2017 Received: (at 26339) by debbugs.gnu.org; 15 Apr 2017 19:50:50 +0000 Received: from localhost ([127.0.0.1]:49397 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1czTib-0006YL-Vf for submit@debbugs.gnu.org; Sat, 15 Apr 2017 15:50:50 -0400 Received: from dd1012.kasserver.com ([85.13.128.8]:44586) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1czTia-0006YD-Lm for 26339@debbugs.gnu.org; Sat, 15 Apr 2017 15:50:49 -0400 Received: from localhost (178.113.180.42.wireless.dyn.drei.com [178.113.180.42]) by dd1012.kasserver.com (Postfix) with ESMTPSA id BA88C1CA02F5; Sat, 15 Apr 2017 21:50:46 +0200 (CEST) Date: Sat, 15 Apr 2017 21:50:38 +0200 From: Danny Milosavljevic To: Mathieu Othacehe Subject: bootloader and kernel arguments "--root", "--system", "--load" Message-ID: <20170415215038.3b38aca1@scratchpost.org> In-Reply-To: <871sstilgo.fsf@gmail.com> References: <20170402135242.2958-1-m.othacehe@gmail.com> <20170402135242.2958-17-m.othacehe@gmail.com> <20170415184756.10b178be@scratchpost.org> <871sstilgo.fsf@gmail.com> X-Mailer: Claws Mail 3.14.1 (GTK+ 2.24.31; x86_64-unknown-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 26339 Cc: 26339@debbugs.gnu.org, guix-devel 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.7 (/) Ok, I'm in the process of reverting the patches to grub. ------ Problem analysis: - (profile-boot-parameters ...) doesn't pick up the correct kernel-arguments. It's reading them from a parameters file for the system generation back then, for example from /gnu/store/x8ymiksnhfyvjdi8ms38ysc4yr92lyk9-system/parameters, which contains: (boot-parameters (version 0) (label "GNU with Linux-Libre 4.5.1 (beta)") (root-device "/dev/sda1") (kernel "/gnu/store/h977riqrp7c3w2v0mcpp48ldcapy09gx-linux-libre-4.5.1") (kernel-arguments ("crashkernel=256M" "modprobe.blacklist=pcspkr,snd_pcsp" "quiet" "acpi_osi=Linux" "clocksource=acpi_pm")) (initrd (string-append "/gnu/store/8w1abpwlhnilibiamcp6j01rhjh9k5ix-base-initrd" "/initrd"))) , which indeed doesn't contain the correct kernel arguments for it to boot. Why not? Shouldn't we just store the correct arguments in there eventually? Those kernel arguments should include (in the front): linux-arguments let root = (boot-parameters-root-device params) or #f let root-device = (if (bytevector? root) (uuid->string root) root) let system = "/gnu/store/x8ymiksnhfyvjdi8ms38ysc4yr92lyk9-system" in "--root=" "--system=" "--load=/boot" . Or is it something grub-specific? Or is it because we don't know system's own hash value in order to be able to write it there? Would it be good to (later) replace the kernel-arguments accessor by a procedure that also takes system and root and prepends them on-the-fly? i.e. (define (boot-parameters-all-kernel-arguments params system root) (cons (string-append "--root=" root) (cons (string-append "--system=" system) ... load etc (boot-parameters-kernel-arguments params)))) ... and only use this one, never boot-parameters-kernel-arguments anywhere else? From debbugs-submit-bounces@debbugs.gnu.org Sat Apr 15 16:16:32 2017 Received: (at 26339) by debbugs.gnu.org; 15 Apr 2017 20:16:33 +0000 Received: from localhost ([127.0.0.1]:49409 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1czU7U-00079C-Hc for submit@debbugs.gnu.org; Sat, 15 Apr 2017 16:16:32 -0400 Received: from dd1012.kasserver.com ([85.13.128.8]:48636) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1czU7T-000794-5Z for 26339@debbugs.gnu.org; Sat, 15 Apr 2017 16:16:31 -0400 Received: from localhost (178.113.180.42.wireless.dyn.drei.com [178.113.180.42]) by dd1012.kasserver.com (Postfix) with ESMTPSA id EDA1D1CA02F5; Sat, 15 Apr 2017 22:16:29 +0200 (CEST) Date: Sat, 15 Apr 2017 22:16:25 +0200 From: Danny Milosavljevic To: Mathieu Othacehe Subject: Re: bug#26339: [PATCH 07/18] system: Add bootloader type. Message-ID: <20170415221625.188fc9e0@scratchpost.org> In-Reply-To: <874lxpinzy.fsf@gmail.com> References: <20170402135242.2958-1-m.othacehe@gmail.com> <20170402135242.2958-7-m.othacehe@gmail.com> <20170415182634.4e2f9c68@scratchpost.org> <874lxpinzy.fsf@gmail.com> X-Mailer: Claws Mail 3.14.1 (GTK+ 2.24.31; x86_64-unknown-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 26339 Cc: 26339@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.7 (/) > > Oh, so that's how. I think it would be nice-to-have if the user could also override the bootloader package used. > > The user could already write : > > --8<---------------cut here---------------start------------->8--- > (bootloader-configuration > (inherit %grub-configuration) > (bootloader my-grub)) > --8<---------------cut here---------------end--------------->8--- Yes, indeed. Okay. From debbugs-submit-bounces@debbugs.gnu.org Sat Apr 15 16:17:12 2017 Received: (at 26339) by debbugs.gnu.org; 15 Apr 2017 20:17:12 +0000 Received: from localhost ([127.0.0.1]:49413 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1czU88-0007AU-1N for submit@debbugs.gnu.org; Sat, 15 Apr 2017 16:17:12 -0400 Received: from dd1012.kasserver.com ([85.13.128.8]:48760) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1czU86-0007AM-Cg for 26339@debbugs.gnu.org; Sat, 15 Apr 2017 16:17:10 -0400 Received: from localhost (178.113.180.42.wireless.dyn.drei.com [178.113.180.42]) by dd1012.kasserver.com (Postfix) with ESMTPSA id 561D51CA02F5; Sat, 15 Apr 2017 22:17:09 +0200 (CEST) Date: Sat, 15 Apr 2017 22:17:05 +0200 From: Danny Milosavljevic To: Mathieu Othacehe Subject: Re: bug#26339: [PATCH 01/18] system: Pass to grub. Message-ID: <20170415221705.58e948aa@scratchpost.org> In-Reply-To: <20170402135242.2958-1-m.othacehe@gmail.com> References: <20170402134916.2871-1-m.othacehe@gmail.com> <20170402135242.2958-1-m.othacehe@gmail.com> X-Mailer: Claws Mail 3.14.1 (GTK+ 2.24.31; x86_64-unknown-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 26339 Cc: 26339@debbugs.gnu.org, David Craven 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.7 (/) I've reverted most of this patch in commit 958a1fda9e0ad41468cbdb88766e7c854dd32df4 to master. Sorry for the churn. Still in is: (first all-entries) instead of (first entries) which is a legitimate bugfix. From debbugs-submit-bounces@debbugs.gnu.org Sat Apr 15 19:18:22 2017 Received: (at 26339) by debbugs.gnu.org; 15 Apr 2017 23:18:22 +0000 Received: from localhost ([127.0.0.1]:49498 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1czWxR-00031u-W2 for submit@debbugs.gnu.org; Sat, 15 Apr 2017 19:18:22 -0400 Received: from out1-smtp.messagingengine.com ([66.111.4.25]:45107) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1czWxR-00031n-7X for 26339@debbugs.gnu.org; Sat, 15 Apr 2017 19:18:21 -0400 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id 2623420899; Sat, 15 Apr 2017 19:18:21 -0400 (EDT) Received: from frontend1 ([10.202.2.160]) by compute4.internal (MEProxy); Sat, 15 Apr 2017 19:18:21 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=famulari.name; h=cc:content-type:date:from:in-reply-to:message-id:mime-version :references:subject:to:x-me-sender:x-me-sender:x-sasl-enc :x-sasl-enc; s=mesmtp; bh=JUXCDfr4n72Lv0eXakqbqd045iC3vJ8xTIuTqN oNlrI=; b=FgQCuiYZjgwAajW+Jnl2rBkrNBf7kj8ZeGLjBmsQi9VABxvcOJh0B3 YzpbbLEU40HaCd0KlCTdaFk3/nLSVabtWEGJ8cmByYARj5fALLthMRGqzXMUv6R1 GsuqUvT8HpbDRTsr56G9yt9uPSXQ2emKSfo3KIr1+5QvuEWqOA0JA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc:x-sasl-enc; s=fm1; bh=JUXCDfr4n72Lv0eXak qbqd045iC3vJ8xTIuTqNoNlrI=; b=NJMdjSqwsU5sbQl0ZquluwuJQIiaXeO6oc 9yeI7oFva3kQ1LXczzutfRB2Uu4l6SwE83+4Z90qVL8yn7oopez04Bt69jeItg59 qnXYvY+yz1jd7417prhZvtt6x1R9gnVFhHvgiJnfcr7DFEaA+EYwFc5mqCE/Qm03 csW/nKabk4fRW+A5D67PIXhvKWPaGoVHnVUTifnTRoQ3BL9sUK2CH3jFhzTOFpQy 1Pquc9Y6x9NHs1alDeQtSOpjk4L/h8pbaXL3ck0xHQTkWG3FjGePN6UxSngcTsDD h9MuUtX+lnvmJhvNqTP+1wq/q9R8qiwjqU4vKOZjdWny0P0qsimg== X-ME-Sender: X-Sasl-enc: QslCWyBuneG7qEu00Hy448dMURRhD1Y26LXDzAonJ8jv 1492298300 Received: from localhost (unknown [172.58.224.157]) by mail.messagingengine.com (Postfix) with ESMTPA id E53647E6A3; Sat, 15 Apr 2017 19:18:20 -0400 (EDT) Date: Sat, 15 Apr 2017 19:18:19 -0400 From: Leo Famulari To: Mathieu Othacehe Subject: Re: bug#26339: problem with commit abae042 Message-ID: <20170415231819.GA23955@jasmine> References: <20170402135242.2958-1-m.othacehe@gmail.com> <20170402135242.2958-17-m.othacehe@gmail.com> <20170415184756.10b178be@scratchpost.org> <871sstilgo.fsf@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="EeQfGwPcQSOJBaQU" Content-Disposition: inline In-Reply-To: <871sstilgo.fsf@gmail.com> User-Agent: Mutt/1.8.1 (2017-04-11) X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 26339 Cc: 26339@debbugs.gnu.org, Danny Milosavljevic , guix-devel 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.7 (/) --EeQfGwPcQSOJBaQU Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Apr 15, 2017 at 08:17:59PM +0200, Mathieu Othacehe wrote: >=20 > I think there's a problem with commit abae042 : >=20 > * profile-grub-entries become unused and is still present. > * When using switch-generation, operating-system-bootcfg is not > * called. So, the kernel arguments are not correctly set (--root, > * --system and --load), and the resulting entries in grub.cfg are broken. This should be reverted immediately, since the master branch is what users get from `guix pull`, so we really must not break it. --EeQfGwPcQSOJBaQU Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEsFFZSPHn08G5gDigJkb6MLrKfwgFAljyqjUACgkQJkb6MLrK fwgbuxAA1Q5ZkWSbHSGFIYyHWUTEiYFuOsKUAnkWU2eG43mezfI+l49P08S9RfKk 6Amv1bzjXfLlPKsJN66OJK84VMPGaXuvq9ABOqre7wgVaGJeasIx/DULGQi3Gf+N 0cO3b1pVXCoNqOKPI8VKjTGLaesu1Ri3fXamDHmbAO0ptmR7TsO8FtegPvcOVd9I yUUl96nedOLeDErSL+AMAaESSHyYWwqvsivosVEDEf6ywqck3/McS1O1J3D2qviM OJahbBuJQwqayzzHmHuDeWGxE1UOIXj3MJG6wsG7ec+D65/5GQxEoct7hY+CQKu3 Ki7q8N9I3319vTYhH3blzMTXLo6/guUkMYsGnGkjJQYjmd+BzmxVcPITbiKQWq47 HfCs/q7Tj8QPk+r4kCIlTJbB6/1mPXzjCSV+BGCXWejKHTi7wsn1CcLXdyNKSS0s GgWD26O5Gf0SEBI84GtOVZGXacudAsr+k3AAzt2r38rGOt5uHNWzn3hLMzh6gPVv 7mcdFtMOv/EYsEzUhr6ZpM2NjGTTLHt5eBpprnQqsf/MTy22Rfgh+qIhPJGhrksp AaNAGLSe+O4QQ9WgO3si90OmB+2hyhJwAaXksQyACVH8U7/duon+txVEzzXMLZp2 H/dHhH6GIZ78Xz/nili50ujpcchQxEz+H9bwAJedlTC5TN5zhT0= =4qeR -----END PGP SIGNATURE----- --EeQfGwPcQSOJBaQU-- From debbugs-submit-bounces@debbugs.gnu.org Sat Apr 15 19:22:32 2017 Received: (at 26339) by debbugs.gnu.org; 15 Apr 2017 23:22:32 +0000 Received: from localhost ([127.0.0.1]:49502 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1czX1U-00037m-FB for submit@debbugs.gnu.org; Sat, 15 Apr 2017 19:22:32 -0400 Received: from dd1012.kasserver.com ([85.13.128.8]:49644) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1czX1T-00037e-6s for 26339@debbugs.gnu.org; Sat, 15 Apr 2017 19:22:31 -0400 Received: from localhost (178.113.180.42.wireless.dyn.drei.com [178.113.180.42]) by dd1012.kasserver.com (Postfix) with ESMTPSA id 1C9581CA023D; Sun, 16 Apr 2017 01:22:28 +0200 (CEST) Date: Sun, 16 Apr 2017 01:22:25 +0200 From: Danny Milosavljevic To: Leo Famulari Subject: Re: bug#26339: problem with commit abae042 Message-ID: <20170416012225.6d00e7c9@scratchpost.org> In-Reply-To: <20170415231819.GA23955@jasmine> References: <20170402135242.2958-1-m.othacehe@gmail.com> <20170402135242.2958-17-m.othacehe@gmail.com> <20170415184756.10b178be@scratchpost.org> <871sstilgo.fsf@gmail.com> <20170415231819.GA23955@jasmine> X-Mailer: Claws Mail 3.14.1 (GTK+ 2.24.31; x86_64-unknown-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 26339 Cc: 26339@debbugs.gnu.org, guix-devel , Mathieu Othacehe 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.7 (/) It has been reverted. From debbugs-submit-bounces@debbugs.gnu.org Sat Apr 15 19:56:16 2017 Received: (at 26339) by debbugs.gnu.org; 15 Apr 2017 23:56:16 +0000 Received: from localhost ([127.0.0.1]:49522 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1czXY8-0003t8-IX for submit@debbugs.gnu.org; Sat, 15 Apr 2017 19:56:16 -0400 Received: from out1-smtp.messagingengine.com ([66.111.4.25]:47241) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1czXY6-0003sz-SQ for 26339@debbugs.gnu.org; Sat, 15 Apr 2017 19:56:15 -0400 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id 9F83F20A5D; Sat, 15 Apr 2017 19:56:14 -0400 (EDT) Received: from frontend1 ([10.202.2.160]) by compute4.internal (MEProxy); Sat, 15 Apr 2017 19:56:14 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=famulari.name; h=cc:content-type:date:from:in-reply-to:message-id:mime-version :references:subject:to:x-me-sender:x-me-sender:x-sasl-enc :x-sasl-enc; s=mesmtp; bh=DSpxIz9G06U2GyRu0BctUxC7uvmCfQWRWKTKK3 XfZ6I=; b=L5ouQlksPHD0TP5t2qvcSDeSjNLxoy6H+0YNTAt037sBSIaV7+C7ym Qh3nWgBXbOMJqqZTtg6LUhfZMDHBQBVykJZsch8mr3xifj1FxfC5CKcoFAIf1GOy l+IEXMrQyJfKoo4KvVBy2oW0r1rd7Q3jFrngaqr/HvbWiZFDQv9aE= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc:x-sasl-enc; s=fm1; bh=DSpxIz9G06U2GyRu0B ctUxC7uvmCfQWRWKTKK3XfZ6I=; b=i4fKpjlx241rINtPuPW32JLZpRH+S0lka7 4m5qQe7KOlkqySjDU80610Uz1Iuz6hltbv02PPFia52EiJHSyfjBw7FX2Ao66hCX RpMX4fP+MILZrxSCkd0mAfd2BT6UYZEmSYItWIMWVIF6hx8Y6euxJhJe6OvGu6Bk X04TSRelsAcd/NvrNsERDe7i81kiiz20hO3La7rd7DcW3013DEqDhJPkkvBtu0Da +zCrv/Oy6iXItvGtohmT92Zqk3Qav+iJ9qQ0X4ce84beod/usz32U3lPsSo0NFaZ ZKslQfpNf7xw6fmCLweXABOakF/Ubxh8VCfXXkil023TAqEHqtNQ== X-ME-Sender: X-Sasl-enc: pE31M2mvM0wdJbXagRHqiVQzkLBj8m80pp1+8gx88e1I 1492300574 Received: from localhost (unknown [172.58.224.157]) by mail.messagingengine.com (Postfix) with ESMTPA id 571487E6F6; Sat, 15 Apr 2017 19:56:14 -0400 (EDT) Date: Sat, 15 Apr 2017 19:56:11 -0400 From: Leo Famulari To: Danny Milosavljevic Subject: Re: bug#26339: problem with commit abae042 Message-ID: <20170415235611.GA24862@jasmine> References: <20170402135242.2958-1-m.othacehe@gmail.com> <20170402135242.2958-17-m.othacehe@gmail.com> <20170415184756.10b178be@scratchpost.org> <871sstilgo.fsf@gmail.com> <20170415231819.GA23955@jasmine> <20170416012225.6d00e7c9@scratchpost.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="zYM0uCDKw75PZbzx" Content-Disposition: inline In-Reply-To: <20170416012225.6d00e7c9@scratchpost.org> User-Agent: Mutt/1.8.1 (2017-04-11) X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 26339 Cc: 26339@debbugs.gnu.org, Mathieu Othacehe 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.7 (/) --zYM0uCDKw75PZbzx Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Sun, Apr 16, 2017 at 01:22:25AM +0200, Danny Milosavljevic wrote: > It has been reverted. Thanks! Let's get these valuable changes merged after a little more testing :) --zYM0uCDKw75PZbzx Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEsFFZSPHn08G5gDigJkb6MLrKfwgFAljysxYACgkQJkb6MLrK fwhtfRAAtTXYGsKSzzQbyNzBSZtL/+SAU5WaORN8qNyHGKWnpFGYCsB+oARsLGR+ /TC1HMTPLi5lOXvFzAF8tzklypxTeDC8TtQqaP5EJSvDL57FELt6HUNKquFtFkD1 Wv/6h/OX61WY/Iyc7EFw5fDHo/Bwhe0HWUYMVs7n3MjbDJMzvWVjrIVshyixgrB4 ondxs82CAr1U9DzFoaHJ5HWYssPEQezRpv+3CH7UeD5zwEZep8rUPxImTbl5TRYR dJ8yNFbAkhfvYx7qghqyVcl6d90teweyf4Y5KrAMKSOatWbKYFqOHYJoBgKN23gU 42mvGYCRerf+W6F96Te5EmgJWFxJ8mo5AgMCPfcDpkUHIotPEcDRxINotJjz90i/ 0FS94dWWJAceivm+lpdZdFKtSSivcy8nJfYTKskJOK4aFtv9e4T/zJoG1vlLMW5J TBGdF+mnANhISb2GOnof4NNVIsprAILOkhpxgGiI1DbrP9WCcPa0eGdZsipG6Od1 k6sd8+tswuttcWSasgRUnE81GM9PXA9aIGIrZZh1fG1G100PdDT4POPcKGNEbZIQ marg+wNrG1k2nZ0/veoYV5bv6K7Qfl0eLD6UjlmZslyhhGNVCt8awwadFCWRB23s cddFjLPgUt9KNxLzXPGL4K7Woa4oEHXYJmkVkbGnZvlWt3Xhm84= =srPL -----END PGP SIGNATURE----- --zYM0uCDKw75PZbzx-- From debbugs-submit-bounces@debbugs.gnu.org Sun Apr 16 05:58:43 2017 Received: (at 26339) by debbugs.gnu.org; 16 Apr 2017 09:58:43 +0000 Received: from localhost ([127.0.0.1]:49761 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1czgx9-0002nQ-9g for submit@debbugs.gnu.org; Sun, 16 Apr 2017 05:58:43 -0400 Received: from eggs.gnu.org ([208.118.235.92]:36302) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1czgx7-0002nD-98 for 26339@debbugs.gnu.org; Sun, 16 Apr 2017 05:58:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1czgwx-0006ka-9K for 26339@debbugs.gnu.org; Sun, 16 Apr 2017 05:58:36 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:56229) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1czgwx-0006kS-5k; Sun, 16 Apr 2017 05:58:31 -0400 Received: from reverse-83.fdn.fr ([80.67.176.83]:60278 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1czgww-0004ac-Dp; Sun, 16 Apr 2017 05:58:30 -0400 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) To: Danny Milosavljevic Subject: Re: bug#26339: [PATCH 03/18] scripts: system: Rename --no-grub option to --no-bootloader. References: <20170402135242.2958-1-m.othacehe@gmail.com> <20170402135242.2958-3-m.othacehe@gmail.com> <20170415121000.16922af8@scratchpost.org> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 27 Germinal an 225 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-unknown-linux-gnu Date: Sun, 16 Apr 2017 11:58:27 +0200 In-Reply-To: <20170415121000.16922af8@scratchpost.org> (Danny Milosavljevic's message of "Sat, 15 Apr 2017 12:10:00 +0200") Message-ID: <87r30sptbw.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 26339 Cc: 26339@debbugs.gnu.org, Mathieu Othacehe 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: -5.0 (-----) Danny Milosavljevic skribis: > Hi, > >> - (option '("no-grub") #f #f >> + (option '("no-bootloader") #f #f > > I'd prefer if it accepted both options - for backward compatibility. We = don't know what scripts people use on top of guix - and it's likely that ma= ny user scripts already pass "--no-grub", especially since the less-dangero= us choice is to pass it (as opposed to not pass it). There is no harm in s= upporting both options. Agreed. So: (option '("no-bootloader" "no-grub") =E2=80=A6) Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Sun Apr 16 17:38:07 2017 Received: (at 26339) by debbugs.gnu.org; 16 Apr 2017 21:38:08 +0000 Received: from localhost ([127.0.0.1]:51027 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1czrrz-00011G-L3 for submit@debbugs.gnu.org; Sun, 16 Apr 2017 17:38:07 -0400 Received: from dd1012.kasserver.com ([85.13.128.8]:42274) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1czrrx-000118-R0 for 26339@debbugs.gnu.org; Sun, 16 Apr 2017 17:38:06 -0400 Received: from localhost (178.113.199.173.wireless.dyn.drei.com [178.113.199.173]) by dd1012.kasserver.com (Postfix) with ESMTPSA id C9FCF1CA006C; Sun, 16 Apr 2017 23:38:02 +0200 (CEST) Date: Sun, 16 Apr 2017 23:37:58 +0200 From: Danny Milosavljevic To: Mathieu Othacehe Subject: Re: bug#26339: [PATCH 04/18] bootloader: Add install procedures and use them. Message-ID: <20170416233758.6194c357@scratchpost.org> In-Reply-To: <8760i5iocd.fsf@gmail.com> References: <20170402135242.2958-1-m.othacehe@gmail.com> <20170402135242.2958-4-m.othacehe@gmail.com> <20170415182222.3e1cef0e@scratchpost.org> <8760i5iocd.fsf@gmail.com> X-Mailer: Claws Mail 3.14.1 (GTK+ 2.24.31; x86_64-unknown-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 26339 Cc: 26339@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.7 (/) Hi Mathieu, On Sat, 15 Apr 2017 19:15:46 +0200 Mathieu Othacehe wrote: > Well you can have only one bootloader in MBR at a time, so even if you > have multiple system generations with various bootloaders, only one is > installed. But I might be wrong here ... It's possible to install Grub to a partition. So there could be one bootloader in the MBR and another bootloader chainloaded in the partition. Also for multiple partitions. If we decide that this use case isn't supported, that's fine. Many other distros make the assumption that there's only one bootloader - which is sometimes good because you can have another bootloader the distribution doesn't know about (in addition to the one the distribution does know about) that supervises all the others. Not sure how Grub finds its config file in the first place. Does Grub itself support that scenario? At least in my Libreboot BIOS I can chainload Grub from Grub - although I think the primary Grub is just picking up the secondary's config file and reloading or something. From debbugs-submit-bounces@debbugs.gnu.org Mon Apr 17 04:49:37 2017 Received: (at 26339) by debbugs.gnu.org; 17 Apr 2017 08:49:37 +0000 Received: from localhost ([127.0.0.1]:51456 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d02Lp-00054E-AS for submit@debbugs.gnu.org; Mon, 17 Apr 2017 04:49:37 -0400 Received: from mail-wr0-f196.google.com ([209.85.128.196]:33164) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d02Ln-000542-MD for 26339@debbugs.gnu.org; Mon, 17 Apr 2017 04:49:35 -0400 Received: by mail-wr0-f196.google.com with SMTP id l28so19481362wre.0 for <26339@debbugs.gnu.org>; Mon, 17 Apr 2017 01:49:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=references:user-agent:from:to:cc:subject:in-reply-to:date :message-id:mime-version; bh=ZFGaM00tyIyJwLOLGVU5a9g81tEf2ktsERsniOdkFlE=; b=O6db6qXFVqDdHAveLXqGTrALk7ycNdzNSvEHYP2s+j6LXCzWm3vjCNm0Hgf04wEcji WbCMcDuKYBIDrnq7tnUqiJabZ2fOkh1jWVUTiTB56nX/LtuWdZxqfwkMYD6XWaUUfUER WDNGBSaeAuRBf1zf1mUfGiae3FnrpWnaBX9SVoMznCsqMieuMP6yyJMiWwPObz6CSBSk b4BjwBWbrolYjg7vZz5OEO2yTpy2lQB7AzxpBWXGZtE/hr9ToL4lsbBuHu/LhsBI6aae wY9pLD0u7uFYImbRAcl1wPbpKoprE19VcoqaX2uAutjih1o32Di65ApD+jcGHzDGLLx3 D7kg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:references:user-agent:from:to:cc:subject :in-reply-to:date:message-id:mime-version; bh=ZFGaM00tyIyJwLOLGVU5a9g81tEf2ktsERsniOdkFlE=; b=psnDwtrQ9q8HNAK8yPIB7IyGIXaUKPvTzueKuJ/yfSLZSOXVkfRZyu5QWW1i2SCifJ 11J1ZCmNwJIrAXVCGsdUXKy500gKnnKbz0BxpR2r8pqSMQWdyk5qEuml2vJfvz8RB0sr b3mdCutElfmLxos55sminst5ass9J0O7uAxmqw5kP19vkeVXruJiXAFOj2/HfBf2Dc2D PNxbS/Qwm4wTvMU1lRRMl8UzRyGcpJnvsaE8IOPmNzE6wFQJtT7KNBqdT5ftYXDLHngp toXtSZR8ZZ1Kfdv51oI6zQGcKsNuaVaY3mdXVIJYH/vzE6sEf8Fbr50uectyinu/DDLA /RLQ== X-Gm-Message-State: AN3rC/6+NEsE1UN4w5NPK6OkvvXtYRD+mFbir67op7M6P2Ol8dy/5bNN zAS6zsUOM5uMhZN8 X-Received: by 10.223.178.18 with SMTP id u18mr16995082wra.179.1492418969648; Mon, 17 Apr 2017 01:49:29 -0700 (PDT) Received: from cervin (85-169-37-239.rev.numericable.fr. [85.169.37.239]) by smtp.gmail.com with ESMTPSA id e21sm9641823wma.5.2017.04.17.01.49.28 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 17 Apr 2017 01:49:28 -0700 (PDT) References: <20170402135242.2958-1-m.othacehe@gmail.com> <20170402135242.2958-4-m.othacehe@gmail.com> <20170415182222.3e1cef0e@scratchpost.org> <8760i5iocd.fsf@gmail.com> <20170416233758.6194c357@scratchpost.org> User-agent: mu4e 0.9.18; emacs 25.2.1 From: Mathieu Othacehe To: Danny Milosavljevic Subject: Re: bug#26339: [PATCH 04/18] bootloader: Add install procedures and use them. In-reply-to: <20170416233758.6194c357@scratchpost.org> Date: Mon, 17 Apr 2017 10:49:28 +0200 Message-ID: <87efwr5sh3.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 26339 Cc: 26339@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: -2.3 (--) Hi Danny, > If we decide that this use case isn't supported, that's fine. Many other distros make the assumption that there's only one bootloader - which is sometimes good because you can have another bootloader the distribution doesn't know about (in addition to the one the distribution does know about) that supervises all the others. Well you're right multiple bootloader may co-exist on multiple partitions. However I'm not sure how guix would manage more than one bootloader at a time ? Ludo, Leo, any thoughts ? Mathieu From debbugs-submit-bounces@debbugs.gnu.org Mon Apr 17 05:02:06 2017 Received: (at 26339) by debbugs.gnu.org; 17 Apr 2017 09:02:06 +0000 Received: from localhost ([127.0.0.1]:51463 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d02Xu-0005Mq-GG for submit@debbugs.gnu.org; Mon, 17 Apr 2017 05:02:06 -0400 Received: from mail-wm0-f67.google.com ([74.125.82.67]:32907) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d02Xt-0005MI-OS for 26339@debbugs.gnu.org; Mon, 17 Apr 2017 05:02:06 -0400 Received: by mail-wm0-f67.google.com with SMTP id o81so7814849wmb.0 for <26339@debbugs.gnu.org>; Mon, 17 Apr 2017 02:02:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=pNKcpK5fwhWBFEr2RYP0IYMzDmkyFwFRIRj5PnUBtOM=; b=JnSWhByr7FWad8dcy4M0YgdJt2UKBB7YKhAfcWspKZAeTE/lwDPFZwAEQ4pcHMdcy8 r1Hg31kOWFMut7EfmYCbVptU4Fi1aJMcgaidbqVD0HuokbFTv8KCItXaoMna7MRzO3ih avi5H3DTa2AjfzwUX1IHPyLjhNAd/olNQv5Ddc+cOEzWcAmhCltNAmQvdXYdwy3a7xpK FY0bKpgEMhq8hse4DFmFKbXl/zorqYyObaSHsxIo6rqQsHTrjtHD47Vi0oUE2VyBJXtk 814TIJfSqo27b6Lyw91GpYFIZud9vpMR3yY0DaLDMuaKycP7B9i2kbgGA1OJDqZO+TzV cWng== 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:date:message-id:in-reply-to :references; bh=pNKcpK5fwhWBFEr2RYP0IYMzDmkyFwFRIRj5PnUBtOM=; b=rqS5X5uQhAmwUWMBq4RHtctcFZs0K3B2X8Hxy+yoCJ0mmaKWDYXAEz1hx0Hur1UcUN BwRgGZN4HYBVqlq5eASAy/vVXvMeaks/rPXYZfjDWVIm+LMA2Tbfl9IbAQZJDdi/x59q sBok58DtnS0+ALzMi6r3R0VtKhok2pvpsITjzMN+mKQzng13TIH67f/6RYyBbASk+A1H giq3707y2nzvojxm2pwVgUKHDHjIYofzcSyaPzHrfVZtx20AhBhxAaYLJFReNMkBJ8gK 9NSQLjMiYZc/uIrj4u4akusxU42cX9RlNiqL7j2IjTBSBfRwNbs0RXzfEfYhi4dA43j4 Qiow== X-Gm-Message-State: AN3rC/41nacPpuCpTeQ0USAcMwYr7poI8wkdd2Q6A7mRqDX0E2Vb1VW2 JCnBout0Q6yYXQ== X-Received: by 10.28.211.210 with SMTP id k201mr7861679wmg.129.1492419720104; Mon, 17 Apr 2017 02:02:00 -0700 (PDT) Received: from cervin.8.8.8.8 (85-169-37-239.rev.numericable.fr. [85.169.37.239]) by smtp.gmail.com with ESMTPSA id m4sm13484276wrm.4.2017.04.17.02.01.59 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 17 Apr 2017 02:01:59 -0700 (PDT) From: Mathieu Othacehe To: 26339@debbugs.gnu.org Subject: [PATCH v2 01/12] system: Pass to grub. Date: Mon, 17 Apr 2017 11:01:37 +0200 Message-Id: <20170417090148.13791-2-m.othacehe@gmail.com> X-Mailer: git-send-email 2.12.2 In-Reply-To: <20170417090148.13791-1-m.othacehe@gmail.com> References: <20170417090148.13791-1-m.othacehe@gmail.com> X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 26339 Cc: Mathieu Othacehe 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.5 (/) * gnu/system.scm (operating-system-grub.cfg): Pass . * gnu/system/grub.scm (boot-parameters->menu-entry): New variable. (grub-configuration-file): Use boot-parameters->menu-entry. --- gnu/system.scm | 11 ++++++----- gnu/system/grub.scm | 13 +++++++++++-- 2 files changed, 17 insertions(+), 7 deletions(-) diff --git a/gnu/system.scm b/gnu/system.scm index 89c4150f9..7c66f6088 100644 --- a/gnu/system.scm +++ b/gnu/system.scm @@ -742,16 +742,17 @@ populate the \"old entries\" menu." (root-device -> (if (eq? 'uuid (file-system-title root-fs)) (uuid->string (file-system-device root-fs)) (file-system-device root-fs))) - (entries -> (list (menu-entry + (entries -> (list (boot-parameters (label label) + (root-device root-device) ;; The device where the kernel and initrd live. - (device (fs->boot-device store-fs)) - (device-mount-point + (store-device (fs->boot-device store-fs)) + (store-mount-point (file-system-mount-point store-fs)) - (linux kernel) - (linux-arguments + (kernel kernel) + (kernel-arguments (cons* (string-append "--root=" root-device) #~(string-append "--system=" #$system) #~(string-append "--load=" #$system diff --git a/gnu/system/grub.scm b/gnu/system/grub.scm index cde4b9e23..f2838d633 100644 --- a/gnu/system/grub.scm +++ b/gnu/system/grub.scm @@ -267,6 +267,15 @@ code." (#f #~(format #f "search --file --set ~a" #$file))))) +(define (boot-parameters->menu-entry conf) + (menu-entry + (label (boot-parameters-label conf)) + (device (boot-parameters-store-device conf)) + (device-mount-point (boot-parameters-store-mount-point conf)) + (linux (boot-parameters-kernel conf)) + (linux-arguments (boot-parameters-kernel-arguments conf)) + (initrd (boot-parameters-initrd conf)))) + (define* (grub-configuration-file config entries #:key (system (%current-system)) @@ -276,7 +285,7 @@ code." object. OLD-ENTRIES is taken to be a list of menu entries corresponding to old generations of the system." (define all-entries - (append entries + (append (map boot-parameters->menu-entry entries) (grub-configuration-menu-entries config))) (define entry->gexp @@ -323,7 +332,7 @@ set timeout=~a~%" #$@(if (pair? old-entries) #~((format port " submenu \"GNU system, old configurations...\" {~%") - #$@(map entry->gexp old-entries) + #$@(map entry->gexp (map boot-parameters->menu-entry old-entries)) (format port "}~%")) #~())))) -- 2.12.2 From debbugs-submit-bounces@debbugs.gnu.org Mon Apr 17 05:02:09 2017 Received: (at 26339) by debbugs.gnu.org; 17 Apr 2017 09:02:09 +0000 Received: from localhost ([127.0.0.1]:51467 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d02Xw-0005NC-NC for submit@debbugs.gnu.org; Mon, 17 Apr 2017 05:02:08 -0400 Received: from mail-wm0-f68.google.com ([74.125.82.68]:34516) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d02Xt-0005MG-4G for 26339@debbugs.gnu.org; Mon, 17 Apr 2017 05:02:07 -0400 Received: by mail-wm0-f68.google.com with SMTP id z129so5194476wmb.1 for <26339@debbugs.gnu.org>; Mon, 17 Apr 2017 02:02:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=TF6HQWmTQKOY9N2lnc2hGDquio/PoRffrI11bhJMULg=; b=tXjcZmzgQ2zw6qWjkeeqO9YbPbDW9NspOo3AZUqCVNmLrLlsDT7GMJNO4h+Qfbf5nV xC8C3cSIOG5RAc6e4XXGnvMouDIoJOHALA4S5zfuZIDM2alfcMqOahsb+mVLBygOygVu XSde+xL6VQLMd74VBLUn391M7snxoiiW84eDC0Qi1OVn/sRew3j0Dr1rLojd1Aws9wh6 rBUrdn3gNsfHoSJ2y8o6EpxeFR7KEPPZk5giQ4z0tOIoDK0WieD79BWz7spZQ2Mnq0L7 FByS8FVRzDKJ8Jj3CGxiwmVqR0Hdqr7pg985NIxu8+qAIfMlfrnrTRg7d1Ojw1bKzcZT pM5A== 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:date:message-id; bh=TF6HQWmTQKOY9N2lnc2hGDquio/PoRffrI11bhJMULg=; b=nGuohqzlTWwCmfeGKkvqksO9UUA4jnhYJffyZgvR4CEdC1XtaKgUE6lXViksrBgBK2 78bdehVzuZs22Ib329N2my0MoBWpIvzwauQJLKUPvTh/2oTGBakOgnen4B730/KG5uzU opcmhyqdAjuFQSrJv8yNws/Y/OR7j63klAX6rspBtl0nbeZIkO4cXWkdF4/ofDWTjl0m F20WB7M+lAtdowSqud/JVUOBLr8kaiXp7DYNXStFIZhaqLzINIk94bY9CEyXhpURITDk pee9LQrJwTUTwXHQ7qe0iOVoFjqGT+uw5qE7Pz77YeYWHeXZHDOb/AFVyhrL5TFcUVYv Ousw== X-Gm-Message-State: AN3rC/4ooOfnRgZFLXcctG0jtaDyEpGb5+0PfP3cLkicjfAs/bm02539 P71y0LcltoSc3A== X-Received: by 10.28.65.65 with SMTP id o62mr7546975wma.14.1492419719185; Mon, 17 Apr 2017 02:01:59 -0700 (PDT) Received: from cervin.8.8.8.8 (85-169-37-239.rev.numericable.fr. [85.169.37.239]) by smtp.gmail.com with ESMTPSA id m4sm13484276wrm.4.2017.04.17.02.01.57 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 17 Apr 2017 02:01:58 -0700 (PDT) From: Mathieu Othacehe To: 26339@debbugs.gnu.org Subject: [PATCH v2 00/12] Support for non grub bootloaders. Date: Mon, 17 Apr 2017 11:01:36 +0200 Message-Id: <20170417090148.13791-1-m.othacehe@gmail.com> X-Mailer: git-send-email 2.12.2 X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 26339 Cc: Mathieu Othacehe 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.5 (/) Hi, Here's a v2 of the serie to address problems pointed out by Danny. Thanks, Mathieu David Craven (1): bootloader: Add install procedures and use them. Mathieu Othacehe (11): system: Pass to grub. system: Add extlinux support. scripts: system: Rename --no-grub option to --no-bootloader. system: Add bootloader type. bootloader: Stop using grub module. bootloader: Add device and type to bootloader-configuration record. scripts: system: Remove unused variables. scripts: system: Adapt "reconfigure" to new bootloader API. scripts: system: Adapt "init" to new bootloader API. scripts: system: Adapt "switch-generation" to new bootloader API. scripts: system: Display bootloader device and type in "list-generations". gnu.scm | 3 +- gnu/build/install.scm | 36 ++---- gnu/build/vm.scm | 17 ++- gnu/local.mk | 1 + gnu/system.scm | 50 +++++++-- gnu/system/bootloader.scm | 254 ++++++++++++++++++++++++++++++++++++++++++ gnu/system/grub.scm | 35 ++++-- gnu/system/vm.scm | 37 ++++-- gnu/tests.scm | 3 +- gnu/tests/nfs.scm | 3 +- gnu/tests/web.scm | 1 + guix/scripts/system.scm | 278 +++++++++++++++++++++++++--------------------- tests/guix-system.sh | 2 - tests/system.scm | 2 - 14 files changed, 519 insertions(+), 203 deletions(-) create mode 100644 gnu/system/bootloader.scm -- 2.12.2 From debbugs-submit-bounces@debbugs.gnu.org Mon Apr 17 05:02:10 2017 Received: (at 26339) by debbugs.gnu.org; 17 Apr 2017 09:02:10 +0000 Received: from localhost ([127.0.0.1]:51469 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d02Xx-0005NE-11 for submit@debbugs.gnu.org; Mon, 17 Apr 2017 05:02:10 -0400 Received: from mail-wm0-f51.google.com ([74.125.82.51]:37086) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d02Xu-0005MK-UR for 26339@debbugs.gnu.org; Mon, 17 Apr 2017 05:02:08 -0400 Received: by mail-wm0-f51.google.com with SMTP id u2so28717844wmu.0 for <26339@debbugs.gnu.org>; Mon, 17 Apr 2017 02:02:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=OYnAwyyrMFNu2Zt9JD/nK4ibsTer6LFeTx3cbZOaJAE=; b=I82sVjnG0fxd+GP0EVWuVQznTEHdXo/wEJ8wqO9WePXEt8+C8Q9tfvtNNMQaCJRlwt edClIqAUI7gQRRzFLoA/ot60tOe9iwL4Fvk++oBZzMqYVqd46zxu6i3NTQkOIYi3d+9E VV3ladmlMmnR4BdRR+ZL/IscGALqmDBi4k/51KLVvQPKRr9XnCuIv1t+gS+NVSX4HNws BqIkIvdQ59Fm2wV4FBkZaTfwkKcOBq2P4MG9DlxQeJyFFz7qDDqFhOqyrlW2iwBqs5ju Yp3qScRzi55AORipFDQAcZ95Y3vQe1/laK23f10993AikvO9hd230cpMEXmOU4ZwpPU6 TIyg== 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:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=OYnAwyyrMFNu2Zt9JD/nK4ibsTer6LFeTx3cbZOaJAE=; b=MAwT56RKXeriOEKkJzkmrmSEYvNnRi3M4Mh0FCaCMsoYVl3rH8AQjv3b2Qm627YMN3 BZJ5ei3GIX/kPJYsFBghV1banuUJ52kgfOTL4USA8Wt3qLOPAeWcVDT3OAFqNkS6o21N QOMqLHbSrmyLfg+rjN3ujVqIoAhT8sLzI3SsbvdCBfbYhudRnZ31FfW7nxWZnvDyaoQ5 RWRlTiw7okavQvVlCQ0utEJCer40FubhEOVv7SKpqJK00xk+HfAySavf2HXs4+pTGj9R W0uRyr85bBvhSaZ/oSIMctCH7muxeGtmagY1FHsrlqe+s+0N/D+ppNYtCstHXrL5X9J7 y37g== X-Gm-Message-State: AN3rC/5YTwA1yOTzSCTry9hxYGD8rA0arfQJyk9HOdywJsxhKnW4krFs NMns2i5Xr80yaQ== X-Received: by 10.28.127.139 with SMTP id a133mr8572876wmd.84.1492419721059; Mon, 17 Apr 2017 02:02:01 -0700 (PDT) Received: from cervin.8.8.8.8 (85-169-37-239.rev.numericable.fr. [85.169.37.239]) by smtp.gmail.com with ESMTPSA id m4sm13484276wrm.4.2017.04.17.02.02.00 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 17 Apr 2017 02:02:00 -0700 (PDT) From: Mathieu Othacehe To: 26339@debbugs.gnu.org Subject: [PATCH v2 02/12] system: Add extlinux support. Date: Mon, 17 Apr 2017 11:01:38 +0200 Message-Id: <20170417090148.13791-3-m.othacehe@gmail.com> X-Mailer: git-send-email 2.12.2 In-Reply-To: <20170417090148.13791-1-m.othacehe@gmail.com> References: <20170417090148.13791-1-m.othacehe@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 26339 Cc: Mathieu Othacehe 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.5 (/) * gnu/system.scm (operating-system): Add default bootloader. (operating-system-grub.cfg): Use bootloader-configuration-file-generator. * gnu/system/grub.scm (bootloader-configuration->grub-configuration): New variable. (grub-configuration-file): Use bootloader-configuration->grub-configuration. * guix/scripts/system.scm (profile-grub-entries): Rename system->grub-entry to system->boot-parameters and adjust accordingly. (perform-action): Make bootloader optional. Use bootloader-configuration-device. * gnu/system/bootloader.scm: New file. * gnu/local.mk (GNU_SYSTEM_MODULES): Add it. * tests/system.scm: Adjust operating-system to new API. * tests/guix-system.sh: Adjust operating-system to new API. --- gnu/local.mk | 1 + gnu/system.scm | 10 +-- gnu/system/bootloader.scm | 161 ++++++++++++++++++++++++++++++++++++++++++++++ gnu/system/grub.scm | 22 ++++--- guix/scripts/system.scm | 44 ++++++------- tests/guix-system.sh | 2 - tests/system.scm | 2 - 7 files changed, 200 insertions(+), 42 deletions(-) create mode 100644 gnu/system/bootloader.scm diff --git a/gnu/local.mk b/gnu/local.mk index cf9f5c719..8ba2e4721 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -439,6 +439,7 @@ GNU_SYSTEM_MODULES = \ \ %D%/system.scm \ %D%/system/file-systems.scm \ + %D%/system/bootloader.scm \ %D%/system/grub.scm \ %D%/system/install.scm \ %D%/system/linux-container.scm \ diff --git a/gnu/system.scm b/gnu/system.scm index 7c66f6088..ce0a4a00e 100644 --- a/gnu/system.scm +++ b/gnu/system.scm @@ -48,7 +48,7 @@ #:use-module (gnu services) #:use-module (gnu services shepherd) #:use-module (gnu services base) - #:use-module (gnu system grub) + #:use-module (gnu system bootloader) #:use-module (gnu system shadow) #:use-module (gnu system nss) #:use-module (gnu system locale) @@ -131,8 +131,8 @@ (default linux-libre)) (kernel-arguments operating-system-kernel-arguments (default '())) ; list of gexps/strings - (bootloader operating-system-bootloader) ; - + (bootloader operating-system-bootloader ; + (default (extlinux-configuration))) (initrd operating-system-initrd ; (list fs) -> M derivation (default base-initrd)) (firmware operating-system-firmware ; list of packages @@ -759,8 +759,8 @@ populate the \"old entries\" menu." "/boot") (operating-system-kernel-arguments os))) (initrd initrd))))) - (grub-configuration-file (operating-system-bootloader os) entries - #:old-entries old-entries))) + ((bootloader-configuration-file-generator (operating-system-bootloader os)) + (operating-system-bootloader os) entries #:old-entries old-entries))) (define (fs->boot-device fs) "Given FS, a object, return a value suitable for use as the diff --git a/gnu/system/bootloader.scm b/gnu/system/bootloader.scm new file mode 100644 index 000000000..ea067bf73 --- /dev/null +++ b/gnu/system/bootloader.scm @@ -0,0 +1,161 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2017 David Craven +;;; +;;; This file is part of GNU Guix. +;;; +;;; GNU Guix is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or (at +;;; your option) any later version. +;;; +;;; GNU Guix is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with GNU Guix. If not, see . + +(define-module (gnu system bootloader) + #:use-module (gnu system) + #:use-module (gnu system grub) + #:use-module (guix gexp) + #:use-module (guix packages) + #:use-module (guix records) + #:use-module (ice-9 match) + #:export (bootloader-configuration + bootloader-configuration? + bootloader-configuration-bootloader + bootloader-configuration-device + bootloader-configuration-menu-entries + bootloader-configuration-default-entry + bootloader-configuration-timeout + bootloader-configuration-file-generator + bootloader-configuration-file-name + bootloader-configuration-installer + bootloader-configuration-additional-configuration + + extlinux-configuration + grub-configuration + grub-efi-configuration + syslinux-configuration)) + +;;; Commentary: +;;; +;;; Generic configuration for bootloaders. +;;; +;;; Code: + +(define-record-type* + bootloader-configuration make-bootloader-configuration + bootloader-configuration? + (bootloader bootloader-configuration-bootloader ; package + (default #f)) + (device bootloader-configuration-device ; string + (default #f)) + (menu-entries bootloader-configuration-menu-entries ; list of + (default '())) + (default-entry bootloader-configuration-default-entry ; integer + (default 0)) + (timeout bootloader-configuration-timeout ; integer + (default 5)) + (configuration-file-name bootloader-configuration-file-name + (default #f)) + (configuration-file-generator bootloader-configuration-file-generator ; procedure + (default #f)) + (installer bootloader-configuration-installer ; procedure + (default #f)) + (additional-configuration bootloader-configuration-additional-configuration ; record + (default #f))) + + + +;;; +;;; Extlinux configuration file. +;;; + +(define* (extlinux-configuration-file config entries + #:key + (system (%current-system)) + (old-entries '())) + "Return the U-Boot configuration file corresponding to CONFIG, a + object, and where the store is available at STORE-FS, a + object. OLD-ENTRIES is taken to be a list of menu entries +corresponding to old generations of the system." + + (define all-entries + (append entries (bootloader-configuration-menu-entries config))) + + (define (boot-parameters->gexp params) + (let ((label (boot-parameters-label params)) + (kernel (boot-parameters-kernel params)) + (kernel-arguments (boot-parameters-kernel-arguments params)) + (initrd (boot-parameters-initrd params))) + #~(format port "LABEL ~a + MENU LABEL ~a + KERNEL ~a + FDTDIR ~a/lib/dtbs + INITRD ~a + APPEND ~a +~%" + #$label #$label + #$kernel #$kernel #$initrd + (string-join (list #$@kernel-arguments))))) + + (define builder + #~(call-with-output-file #$output + (lambda (port) + (let ((timeout #$(bootloader-configuration-timeout config))) + (format port " +UI menu.c32 +PROMPT ~a +TIMEOUT ~a~%" + (if (> timeout 0) 1 0) + ;; timeout is expressed in 1/10s of seconds. + (* 10 timeout)) + #$@(map boot-parameters->gexp all-entries) + + #$@(if (pair? old-entries) + #~((format port "~%") + #$@(map boot-parameters->gexp old-entries) + (format port "~%")) + #~()))))) + + (gexp->derivation "extlinux.conf" builder)) + + + + +;;; +;;; Bootloader configurations. +;;; + +(define* (extlinux-configuration #:optional (config (bootloader-configuration))) + (bootloader-configuration + (inherit config) + (configuration-file-name "/boot/extlinux/extlinux.conf") + (configuration-file-generator extlinux-configuration-file))) + +(define* (grub-configuration #:optional (config (bootloader-configuration))) + (bootloader-configuration + (inherit config) + (bootloader (@ (gnu packages bootloaders) grub)) + (configuration-file-name "/boot/grub/grub.cfg") + (configuration-file-generator grub-configuration-file) + (installer install-grub) + (additional-configuration + (let ((additional-config (bootloader-configuration-additional-configuration config))) + (if additional-config additional-config %default-theme))))) + +(define* (grub-efi-configuration #:optional (config (bootloader-configuration))) + (bootloader-configuration + (inherit (grub-configuration config)) + (bootloader (@ (gnu packages bootloaders) grub-efi)))) + +(define* (syslinux-configuration #:optional (config (bootloader-configuration))) + (bootloader-configuration + (inherit (extlinux-configuration config)) + (bootloader (@ (gnu packages bootloaders) syslinux)) + (installer install-syslinux))) + +;;; bootloader.scm ends here diff --git a/gnu/system/grub.scm b/gnu/system/grub.scm index f2838d633..0b52e3e7e 100644 --- a/gnu/system/grub.scm +++ b/gnu/system/grub.scm @@ -27,6 +27,7 @@ #:use-module (guix download) #:use-module (gnu artwork) #:use-module (gnu system) + #:use-module (gnu system bootloader) #:use-module (gnu system file-systems) #:autoload (gnu packages bootloaders) (grub) #:autoload (gnu packages compression) (gzip) @@ -49,14 +50,6 @@ %background-image %default-theme - grub-configuration - grub-configuration? - grub-configuration-device - grub-configuration-grub - - menu-entry - menu-entry? - grub-configuration-file)) ;;; Commentary: @@ -276,7 +269,16 @@ code." (linux-arguments (boot-parameters-kernel-arguments conf)) (initrd (boot-parameters-initrd conf)))) -(define* (grub-configuration-file config entries +(define (bootloader-configuration->grub-configuration config) + (grub-configuration + (grub (bootloader-configuration-bootloader config)) + (device (bootloader-configuration-device config)) + (menu-entries (bootloader-configuration-menu-entries config)) + (default-entry (bootloader-configuration-default-entry config)) + (timeout (bootloader-configuration-timeout config)) + (theme (bootloader-configuration-additional-configuration config)))) + +(define* (grub-configuration-file bootloader-config entries #:key (system (%current-system)) (old-entries '())) @@ -284,6 +286,8 @@ code." object, and where the store is available at STORE-FS, a object. OLD-ENTRIES is taken to be a list of menu entries corresponding to old generations of the system." + (define config (bootloader-configuration->grub-configuration bootloader-config)) + (define all-entries (append (map boot-parameters->menu-entry entries) (grub-configuration-menu-entries config))) diff --git a/guix/scripts/system.scm b/guix/scripts/system.scm index 9ffdc15ab..3ec100032 100644 --- a/guix/scripts/system.scm +++ b/guix/scripts/system.scm @@ -38,10 +38,10 @@ #:use-module (guix build utils) #:use-module (gnu build install) #:use-module (gnu system) + #:use-module (gnu system bootloader) #:use-module (gnu system file-systems) #:use-module (gnu system linux-container) #:use-module (gnu system vm) - #:use-module (gnu system grub) #:use-module (gnu services) #:use-module (gnu services shepherd) #:use-module (gnu services herd) @@ -385,32 +385,25 @@ NUMBERS, which is a list of generation numbers." (numbers (generation-numbers profile))) "Return a list of 'menu-entry' for the generations of PROFILE specified by NUMBERS, which is a list of generation numbers." - (define (system->grub-entry system number time) + (define (system->boot-parameters system number time) (unless-file-not-found (let* ((file (string-append system "/parameters")) (params (call-with-input-file file read-boot-parameters)) - (label (boot-parameters-label params)) (root (boot-parameters-root-device params)) (root-device (if (bytevector? root) (uuid->string root) - root)) - (kernel (boot-parameters-kernel params)) - (kernel-arguments (boot-parameters-kernel-arguments params)) - (initrd (boot-parameters-initrd params))) - (menu-entry - (label (string-append label " (#" + root))) + (boot-parameters + (inherit params) + (label (string-append (boot-parameters-label params) " (#" (number->string number) ", " (seconds->string time) ")")) - (device (boot-parameters-store-device params)) - (device-mount-point (boot-parameters-store-mount-point params)) - (linux kernel) - (linux-arguments - (cons* (string-append "--root=" root-device) + (kernel-arguments + (cons* (string-append "--root=" (boot-parameters-root-device params)) (string-append "--system=" system) (string-append "--load=" system "/boot") - kernel-arguments)) - (initrd initrd))))) + (boot-parameters-kernel-arguments params))))))) (let* ((systems (map (cut generation-file-name profile <>) numbers)) @@ -418,7 +411,7 @@ NUMBERS, which is a list of generation numbers." (unless-file-not-found (stat:mtime (lstat system)))) systems))) - (filter-map system->grub-entry systems numbers times))) + (filter-map system->boot-parameters systems numbers times))) ;;; @@ -636,8 +629,11 @@ output when building a system derivation, such as a disk image." #:image-size image-size #:full-boot? full-boot? #:mappings mappings)) - (grub (package->derivation (grub-configuration-grub - (operating-system-bootloader os)))) + (bootloader (let ((bootloader (bootloader-configuration-bootloader + (operating-system-bootloader os)))) + (if bootloader + (package->derivation bootloader) + (return #f)))) (grub.cfg (if (eq? 'container action) (return #f) (operating-system-bootcfg os @@ -649,8 +645,8 @@ output when building a system derivation, such as a disk image." ;; --no-grub is passed, because GRUB.CFG because we then use it as a GC ;; root. See . (drvs -> (if (memq action '(init reconfigure)) - (if bootloader? - (list sys grub.cfg grub) + (if (and bootloader? bootloader) + (list sys grub.cfg bootloader) (list sys grub.cfg)) (list sys))) (% (if derivations-only? @@ -666,8 +662,8 @@ output when building a system derivation, such as a disk image." drvs) ;; Make sure GRUB is accessible. - (when bootloader? - (let ((prefix (derivation->output-path grub))) + (when (and bootloader? bootloader) + (let ((prefix (derivation->output-path bootloader))) (setenv "PATH" (string-append prefix "/bin:" prefix "/sbin:" (getenv "PATH"))))) @@ -870,7 +866,7 @@ resulting from command-line parsing." ((first second) second) (_ #f))) (device (and bootloader? - (grub-configuration-device + (bootloader-configuration-device (operating-system-bootloader os))))) (with-store store diff --git a/tests/guix-system.sh b/tests/guix-system.sh index de6db0928..525480a11 100644 --- a/tests/guix-system.sh +++ b/tests/guix-system.sh @@ -91,7 +91,6 @@ OS_BASE=' (timezone "Europe/Paris") (locale "en_US.UTF-8") - (bootloader (grub-configuration (device "/dev/sdX"))) (file-systems (cons (file-system (device "root") (title (string->symbol "label")) @@ -162,7 +161,6 @@ make_user_config () (timezone "Europe/Paris") (locale "en_US.UTF-8") - (bootloader (grub-configuration (device "/dev/sdX"))) (file-systems (cons (file-system (device "root") (title 'label) diff --git a/tests/system.scm b/tests/system.scm index ca34409be..bdda08e18 100644 --- a/tests/system.scm +++ b/tests/system.scm @@ -36,7 +36,6 @@ (host-name "komputilo") (timezone "Europe/Berlin") (locale "en_US.utf8") - (bootloader (grub-configuration (device "/dev/sdX"))) (file-systems (cons %root-fs %base-file-systems)) (users %base-user-accounts))) @@ -51,7 +50,6 @@ (host-name "komputilo") (timezone "Europe/Berlin") (locale "en_US.utf8") - (bootloader (grub-configuration (device "/dev/sdX"))) (mapped-devices (list %luks-device)) (file-systems (cons (file-system (inherit %root-fs) -- 2.12.2 From debbugs-submit-bounces@debbugs.gnu.org Mon Apr 17 05:02:13 2017 Received: (at 26339) by debbugs.gnu.org; 17 Apr 2017 09:02:13 +0000 Received: from localhost ([127.0.0.1]:51475 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d02Y1-0005Nz-65 for submit@debbugs.gnu.org; Mon, 17 Apr 2017 05:02:13 -0400 Received: from mail-wm0-f65.google.com ([74.125.82.65]:35875) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d02Xv-0005Md-OK for 26339@debbugs.gnu.org; Mon, 17 Apr 2017 05:02:09 -0400 Received: by mail-wm0-f65.google.com with SMTP id q125so7799403wmd.3 for <26339@debbugs.gnu.org>; Mon, 17 Apr 2017 02:02:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=FS0eSJUbSkCC0TMLQF+8MPieU5NvWWnEWj9FwH6kUOM=; b=VpgqIs+EmZT8xEkfXAzqvWXuSZJuRgSmIt7p+mcnNo+s8qoRs6kJqAGrsDH3ojip2Q L0RwcHWHHQa5V3DryZkXXzdJQHCVlMS+eUwkdsNXIMi4X+celtvY0eZrQhzcKouGFTWd F5Gpf3khONxg305ePr3+KCKddfE4iqpZ18Cgn/j49RMDsGc0CJ1jWIcUsxaaXr9DUOYm 1SznO2H7DUpN8a/qC4ZNrfJT85fCuFWzb+QdhW4rziY7bMXMbXhYxfJfQ4GdfH0x1BGd aPFPRV3evtuZdaLM0+4qGIvDPyTj2PlCfGG/2JTMeSyfhWxDNADqZ/z/OVEFhFViYLhN 78nA== 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:date:message-id:in-reply-to :references; bh=FS0eSJUbSkCC0TMLQF+8MPieU5NvWWnEWj9FwH6kUOM=; b=nQKnwgqhspAol80hblqIWDixjonDcDfcZSVmfsL4bw+2UFQsxowareOg5Q5D/cS1Oy q6aXm0AzMSwusMSGsfocqw8uJv4k7IrGP4xBzR/454rAmyd+gDCriWXL+mo3oIjn/S9o dma7TsBA8gpX5mfYN5Ick3yGmTb4iqjTd9FkfZfwIB/Ch2l52jv+xAAkTbfK8aenSd/d uk6laHyRmcGW3rbD8WfwW/lulAAoWlqMrFn9kXBTa+levh1jAQaFHpJQtQOeYBjsyorm sBDnA0d9c+NPiBaTscI9M2ft9WERhihOhZ6PPDjvZ9BPItCIvcG3PDMc+pWSNa/b3C4n B8Gg== X-Gm-Message-State: AN3rC/6qZBEo09ULDHW6b1ey7aB7/z6u99UwQvZe/tsQDKTm69v13xfz YZQhttBttw0uYA== X-Received: by 10.28.4.69 with SMTP id 66mr7612799wme.65.1492419722109; Mon, 17 Apr 2017 02:02:02 -0700 (PDT) Received: from cervin.8.8.8.8 (85-169-37-239.rev.numericable.fr. [85.169.37.239]) by smtp.gmail.com with ESMTPSA id m4sm13484276wrm.4.2017.04.17.02.02.01 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 17 Apr 2017 02:02:01 -0700 (PDT) From: Mathieu Othacehe To: 26339@debbugs.gnu.org Subject: [PATCH v2 03/12] scripts: system: Rename --no-grub option to --no-bootloader. Date: Mon, 17 Apr 2017 11:01:39 +0200 Message-Id: <20170417090148.13791-4-m.othacehe@gmail.com> X-Mailer: git-send-email 2.12.2 In-Reply-To: <20170417090148.13791-1-m.othacehe@gmail.com> References: <20170417090148.13791-1-m.othacehe@gmail.com> X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 26339 Cc: Mathieu Othacehe 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.5 (/) * guix/scripts/system.scm (%options, show-help): Adjust accordingly. Keep "--no-grub" for compatibility reasons, but do not mention it in the help. --- guix/scripts/system.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/guix/scripts/system.scm b/guix/scripts/system.scm index 3ec100032..c2212ed14 100644 --- a/guix/scripts/system.scm +++ b/guix/scripts/system.scm @@ -761,7 +761,7 @@ Some ACTIONS support additional ARGS.\n")) (display (_ " --image-size=SIZE for 'vm-image', produce an image of SIZE")) (display (_ " - --no-grub for 'init', do not install GRUB")) + --no-bootloader for 'init', do not install a bootloader")) (display (_ " --share=SPEC for 'vm', share host file system according to SPEC")) (display (_ " @@ -800,7 +800,7 @@ Some ACTIONS support additional ARGS.\n")) (lambda (opt name arg result) (alist-cons 'image-size (size->number arg) result))) - (option '("no-grub") #f #f + (option '("no-bootloader" "no-grub") #f #f (lambda (opt name arg result) (alist-cons 'install-bootloader? #f result))) (option '("full-boot") #f #f -- 2.12.2 From debbugs-submit-bounces@debbugs.gnu.org Mon Apr 17 05:02:14 2017 Received: (at 26339) by debbugs.gnu.org; 17 Apr 2017 09:02:14 +0000 Received: from localhost ([127.0.0.1]:51478 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d02Y1-0005O1-Df for submit@debbugs.gnu.org; Mon, 17 Apr 2017 05:02:13 -0400 Received: from mail-wm0-f43.google.com ([74.125.82.43]:33157) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d02Xx-0005Mh-NA for 26339@debbugs.gnu.org; Mon, 17 Apr 2017 05:02:10 -0400 Received: by mail-wm0-f43.google.com with SMTP id y18so7412139wmh.0 for <26339@debbugs.gnu.org>; Mon, 17 Apr 2017 02:02:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=j63hZO0AMPtGh+6hHl/nZwauB7pbotF2+jCHzNpcD1M=; b=caFaqmTWdyUd/LfnTmc1HyO888J63HgGGm+PJQ+oIq77TL+MDWxynzMQCezfIQmbKR smmPq+diRhMycUPaxACtzU+1KEqH6eR22TfXI+2VIXC/Cn//Tt5O/i6fVUFiOKOoJEX6 sM45GTiordheTZk7b24gn9bBbq+5JbuD1BQPRX4pAE2bNSn2z8XiEVt/ao/ZVABjz9dn b5lomczd2lMUa+zqXN/O454bPSFY60CZTfQ02NH9ShWzt5osYfKIRHeryVb99oOwqG6t 4dVQqirVtpwkqCkQz34yHtf8KIWKHpCFOyo1cI+cLKXCmyOnc21oTvmW8oz3dvO9g5zJ ODJw== 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:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=j63hZO0AMPtGh+6hHl/nZwauB7pbotF2+jCHzNpcD1M=; b=RtJvYxOqhLQbf3AHPO5VBzVPWPCbmvStHmCDkqZ57tjBNGXj4sK/8/r/Ohm9uQOSOO arydkOF3n/Ty2SAmvke/jg9KUYX/x/FzBwIvdkvqWJjI6Fvav4hU9QLTVNcFj4vVVi4C aVma0XxCbcMgzGbl4QJIrhD1pTcHNhgoktmfcPHIXgpD09nD2yO9wSYo9DZUdhRd1Als MKAt3gzCDrRItfjttjjYwO+UOEpwyX9kZJF2ehUn5aHjTXWwiTpwuXTDjbJfmUaHJuio U2rknQLTuCjTrQoZmFqQvTSDhkCqmD/OATr4oJtkMOMpho9R07kzn1gi8GOp/XDcuWCV Ipmw== X-Gm-Message-State: AN3rC/7BpyISmtqJ5D1N7hqJ9kX9cF4TT/vqHvrck7yXLQWOES9kYOSm xthVLkA08t3uPA== X-Received: by 10.28.169.15 with SMTP id s15mr7855032wme.2.1492419724068; Mon, 17 Apr 2017 02:02:04 -0700 (PDT) Received: from cervin.8.8.8.8 (85-169-37-239.rev.numericable.fr. [85.169.37.239]) by smtp.gmail.com with ESMTPSA id m4sm13484276wrm.4.2017.04.17.02.02.03 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 17 Apr 2017 02:02:03 -0700 (PDT) From: Mathieu Othacehe To: 26339@debbugs.gnu.org Subject: [PATCH v2 05/12] system: Add bootloader type. Date: Mon, 17 Apr 2017 11:01:41 +0200 Message-Id: <20170417090148.13791-6-m.othacehe@gmail.com> X-Mailer: git-send-email 2.12.2 In-Reply-To: <20170417090148.13791-1-m.othacehe@gmail.com> References: <20170417090148.13791-1-m.othacehe@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 26339 Cc: Mathieu Othacehe 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.0 (/) * gnu/system/bootloader.scm ()[type]: New field. (%extlinux-configuration, %grub-configuration, %grub-efi-configuration, %syslinux-configuration): New exported variables. (extlinux-configuration, grub-configuration, grub-efi-configuration, syslinux-configuration): New exported compatibility macros. --- gnu/system/bootloader.scm | 119 ++++++++++++++++++++++++++++++++-------------- 1 file changed, 83 insertions(+), 36 deletions(-) diff --git a/gnu/system/bootloader.scm b/gnu/system/bootloader.scm index fddf038b8..bab6cfab3 100644 --- a/gnu/system/bootloader.scm +++ b/gnu/system/bootloader.scm @@ -1,5 +1,6 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2017 David Craven +;;; Copyright © 2017 Mathieu Othacehe ;;; ;;; This file is part of GNU Guix. ;;; @@ -22,10 +23,12 @@ #:use-module (guix gexp) #:use-module (guix packages) #:use-module (guix records) + #:use-module (srfi srfi-1) #:use-module (ice-9 match) #:export (bootloader-configuration bootloader-configuration? bootloader-configuration-bootloader + bootloader-configuration-type bootloader-configuration-device bootloader-configuration-menu-entries bootloader-configuration-default-entry @@ -35,6 +38,13 @@ bootloader-configuration-installer bootloader-configuration-additional-configuration + %extlinux-configuration + %grub-configuration + %grub-efi-configuration + %syslinux-configuration + + lookup-bootloader-configuration + extlinux-configuration grub-configuration grub-efi-configuration @@ -54,6 +64,8 @@ bootloader-configuration? (bootloader bootloader-configuration-bootloader ; package (default #f)) + (type bootloader-configuration-type + (default #f)) ; symbol (device bootloader-configuration-device ; string (default #f)) (menu-entries bootloader-configuration-menu-entries ; list of @@ -126,43 +138,7 @@ TIMEOUT ~a~%" (gexp->derivation "extlinux.conf" builder)) - - - -;;; -;;; Bootloader configurations. -;;; - -(define* (extlinux-configuration #:optional (config (bootloader-configuration))) - (bootloader-configuration - (inherit config) - (configuration-file-name "/boot/extlinux/extlinux.conf") - (configuration-file-generator extlinux-configuration-file))) - -(define* (grub-configuration #:optional (config (bootloader-configuration))) - (bootloader-configuration - (inherit config) - (bootloader (@ (gnu packages bootloaders) grub)) - (configuration-file-name "/boot/grub/grub.cfg") - (configuration-file-generator grub-configuration-file) - (installer install-grub) - (additional-configuration - (let ((additional-config (bootloader-configuration-additional-configuration config))) - (if additional-config additional-config %default-theme))))) - -(define* (grub-efi-configuration #:optional (config (bootloader-configuration))) - (bootloader-configuration - (inherit (grub-configuration config)) - (bootloader (@ (gnu packages bootloaders) grub-efi)))) - -(define* (syslinux-configuration #:optional (config (bootloader-configuration))) - (bootloader-configuration - (inherit (extlinux-configuration config)) - (bootloader (@ (gnu packages bootloaders) syslinux)) - (installer install-syslinux))) - - ;;; ;;; Bootloader install procedures. ;;; @@ -204,4 +180,75 @@ TIMEOUT ~a~%" (#$dd 440 1 (string-append syslinux-dir "/mbr.bin") device)) (error "failed to install SYSLINUX"))))) + +;;; +;;; Bootloader configurations. +;;; + +(define* %extlinux-configuration + (bootloader-configuration + (type 'extlinux) + (configuration-file-name "/boot/extlinux/extlinux.conf") + (configuration-file-generator extlinux-configuration-file))) + +(define* %grub-configuration + (bootloader-configuration + (type 'grub) + (bootloader (@ (gnu packages bootloaders) grub)) + (configuration-file-name "/boot/grub/grub.cfg") + (configuration-file-generator grub-configuration-file) + (installer install-grub) + (additional-configuration %default-theme))) + +(define* %grub-efi-configuration + (bootloader-configuration + (inherit %grub-configuration) + (type 'grub-efi) + (bootloader (@ (gnu packages bootloaders) grub-efi)))) + +(define* %syslinux-configuration + (bootloader-configuration + (inherit %extlinux-configuration) + (type 'syslinux) + (bootloader (@ (gnu packages bootloaders) syslinux)) + (installer install-syslinux))) + +(define %bootloader-configurations + (list %extlinux-configuration + %grub-configuration + %grub-efi-configuration + %syslinux-configuration)) + +(define (lookup-bootloader-configuration type) + (or (find (lambda (conf) + (eq? (bootloader-configuration-type conf) + type)) + %bootloader-configurations) + (error "~a: unknown bootloader type" type))) + + +;;; +;;; Compatibility macros. +;;; + +(define-syntax-rule (extlinux-configuration fields ...) + (bootloader-configuration + (inherit %extlinux-configuration) + fields ...)) + +(define-syntax-rule (grub-configuration fields ...) + (bootloader-configuration + (inherit %grub-configuration) + fields ...)) + +(define-syntax-rule (grub-efi-configuration fields ...) + (bootloader-configuration + (inherit %grub-efi-configuration) + fields ...)) + +(define-syntax-rule (syslinux-configuration fields ...) + (bootloader-configuration + (inherit %syslinux-configuration) + fields ...)) + ;;; bootloader.scm ends here -- 2.12.2 From debbugs-submit-bounces@debbugs.gnu.org Mon Apr 17 05:02:14 2017 Received: (at 26339) by debbugs.gnu.org; 17 Apr 2017 09:02:14 +0000 Received: from localhost ([127.0.0.1]:51480 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d02Y1-0005OF-WB for submit@debbugs.gnu.org; Mon, 17 Apr 2017 05:02:14 -0400 Received: from mail-wm0-f67.google.com ([74.125.82.67]:35893) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d02Xx-0005Mg-8C for 26339@debbugs.gnu.org; Mon, 17 Apr 2017 05:02:10 -0400 Received: by mail-wm0-f67.google.com with SMTP id q125so7799557wmd.3 for <26339@debbugs.gnu.org>; Mon, 17 Apr 2017 02:02:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=OtbLTheOjfim2GxVaM1JodEemWDBqbHSm/JUXmQaKP0=; b=oRI+dcPhPx83IWDsT0UZNKEG0CN2796F5ma5dYax4Ad2usM1Ib5Tir3TQKZVT3Oa1o E6ltr09KTfoktJXuVSoWQz9ltaQar2ljTYw97oV+zwNGqAVEBFyZi/6x4zU6h5uOP8eF 7+maSymDypZgfb33b8LnN1m7kWu2IFX/evWFGzVlt/sEGzvcvPBYmtO/1K1QhPuNUm+4 MukXnW11ZbJctcjOLyqBgtnkjCayD0oALRbWH9l+ifwtMDjJQsPCA4Hh9gZnp1xNcmo4 VfDeBE03hWOgORyHk1Pl1K7LxUKjXynhrcbnAoVGi9LOunBTXwjANI8Ze5uy3391WdlC S3uQ== 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:date:message-id:in-reply-to :references; bh=OtbLTheOjfim2GxVaM1JodEemWDBqbHSm/JUXmQaKP0=; b=OgDNxRAaq0IImkh2ZjGAZ3ux5KmJDua5T3ConOUCiy78GUcc4tDLNAEZzlI9UsWA2x 9R5jWwX9yUrN1HDwvFisfTuItQfcOro9Qii9CBae+kaxF5ny3WngwxKzztrnVgI+c/TP woWk+R4UQDTjszeTlsD0AYpo/A76K7SB0xxbu9Zz7LjDIwGAKd+/9Cwcnxp7Mz1WKYM+ Nt4kx4ilrJCAadq2HbTS5GQs8PPsTpRl3QUg1QJqvTwCGUrm1d9ocVL6a6sBnL2mFows 9LM8ATDFloB1ucFZdWE+QRfuhySWDtzwquKINxi9DsD/UCqpKYvI4bzjekgjdJrQsq32 /ibw== X-Gm-Message-State: AN3rC/69YiBg3tS0R+cvCfv2Nf8WD5aqjU/3kBFYvbDFiuHOalIDYrYH gAtnzFWsWk3eDp4I X-Received: by 10.28.198.10 with SMTP id w10mr7698100wmf.1.1492419723128; Mon, 17 Apr 2017 02:02:03 -0700 (PDT) Received: from cervin.8.8.8.8 (85-169-37-239.rev.numericable.fr. [85.169.37.239]) by smtp.gmail.com with ESMTPSA id m4sm13484276wrm.4.2017.04.17.02.02.02 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 17 Apr 2017 02:02:02 -0700 (PDT) From: Mathieu Othacehe To: 26339@debbugs.gnu.org Subject: [PATCH v2 04/12] bootloader: Add install procedures and use them. Date: Mon, 17 Apr 2017 11:01:40 +0200 Message-Id: <20170417090148.13791-5-m.othacehe@gmail.com> X-Mailer: git-send-email 2.12.2 In-Reply-To: <20170417090148.13791-1-m.othacehe@gmail.com> References: <20170417090148.13791-1-m.othacehe@gmail.com> X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 26339 Cc: David Craven 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.5 (/) From: David Craven * gnu/system/bootloader.scm (dd, install-grub, install-syslinux): New procedures. * gnu/build/install.scm (install-boot-config): New procedure. (install-grub): Move to (gnu system bootloader). * gnu/build/vm.scm (register-bootcfg-root): Rename register-grub.cfg-root and adjust accordingly. (initialize-hard-disk): Takes a bootloader, bootcfg, bootcfg-location and bootloader-installer procedure. Adjust accordingly. * gnu/system/vm.scm (qemu-image): Adjust to initialize-hard-disk. (system-disk-image, system-qemu-image, system-qemu-image/shared-store): Adjust to qemu-image. --- gnu/build/install.scm | 36 ++++++++--------------------------- gnu/build/vm.scm | 17 +++++++++++------ gnu/system/bootloader.scm | 48 ++++++++++++++++++++++++++++++++++++++++++++++- gnu/system/vm.scm | 37 ++++++++++++++++++++++++------------ 4 files changed, 91 insertions(+), 47 deletions(-) diff --git a/gnu/build/install.scm b/gnu/build/install.scm index 5cb6055a0..9e30c0d23 100644 --- a/gnu/build/install.scm +++ b/gnu/build/install.scm @@ -22,8 +22,7 @@ #:use-module (guix build store-copy) #:use-module (srfi srfi-26) #:use-module (ice-9 match) - #:export (install-grub - install-grub-config + #:export (install-boot-config evaluate-populate-directive populate-root-file-system reset-timestamps @@ -39,36 +38,17 @@ ;;; ;;; Code: -(define (install-grub grub.cfg device mount-point) - "Install GRUB with GRUB.CFG on DEVICE, which is assumed to be mounted on -MOUNT-POINT. - -Note that the caller must make sure that GRUB.CFG is registered as a GC root -so that the fonts, background images, etc. referred to by GRUB.CFG are not -GC'd." - (install-grub-config grub.cfg mount-point) - - ;; Tell 'grub-install' that there might be a LUKS-encrypted /boot or root - ;; partition. - (setenv "GRUB_ENABLE_CRYPTODISK" "y") - - (unless (zero? (system* "grub-install" "--no-floppy" - "--boot-directory" - (string-append mount-point "/boot") - device)) - (error "failed to install GRUB"))) - -(define (install-grub-config grub.cfg mount-point) - "Atomically copy GRUB.CFG into boot/grub/grub.cfg on the MOUNT-POINT. Note -that the caller must make sure that GRUB.CFG is registered as a GC root so -that the fonts, background images, etc. referred to by GRUB.CFG are not GC'd." - (let* ((target (string-append mount-point "/boot/grub/grub.cfg")) +(define (install-boot-config bootcfg bootcfg-location mount-point) + "Atomically copy BOOTCFG into BOOTCFG-LOCATION on the MOUNT-POINT. Note +that the caller must make sure that BOOTCFG is registered as a GC root so +that the fonts, background images, etc. referred to by BOOTCFG are not GC'd." + (let* ((target (string-append mount-point bootcfg-location)) (pivot (string-append target ".new"))) (mkdir-p (dirname target)) - ;; Copy GRUB.CFG instead of just symlinking it, because symlinks won't + ;; Copy BOOTCFG instead of just symlinking it, because symlinks won't ;; work when /boot is on a separate partition. Do that atomically. - (copy-file grub.cfg pivot) + (copy-file bootcfg pivot) (rename-file pivot target))) (define (evaluate-populate-directive directive target) diff --git a/gnu/build/vm.scm b/gnu/build/vm.scm index 1eb9a4c45..440596a40 100644 --- a/gnu/build/vm.scm +++ b/gnu/build/vm.scm @@ -285,15 +285,18 @@ SYSTEM-DIRECTORY is the name of the directory of the 'system' derivation." (unless register-closures? (reset-timestamps target)))) -(define (register-grub.cfg-root target bootcfg) +(define (register-bootcfg-root target bootcfg) "On file system TARGET, register BOOTCFG as a GC root." (let ((directory (string-append target "/var/guix/gcroots"))) (mkdir-p directory) - (symlink bootcfg (string-append directory "/grub.cfg")))) + (symlink bootcfg (string-append directory "/bootcfg")))) (define* (initialize-hard-disk device #:key - grub.cfg + bootloader + bootcfg + bootcfg-location + bootloader-installer (partitions '())) "Initialize DEVICE as a disk containing all the objects listed in PARTITIONS, and using BOOTCFG as its bootloader configuration file. @@ -311,10 +314,12 @@ passing it a directory name where it is mounted." (display "mounting root partition...\n") (mkdir-p target) (mount (partition-device root) target (partition-file-system root)) - (install-grub grub.cfg device target) + (install-boot-config bootcfg bootcfg-location target) + (when bootloader-installer + (bootloader-installer bootloader device target)) - ;; Register GRUB.CFG as a GC root. - (register-grub.cfg-root target grub.cfg) + ;; Register BOOTCFG as a GC root. + (register-bootcfg-root target bootcfg) (umount target))) diff --git a/gnu/system/bootloader.scm b/gnu/system/bootloader.scm index ea067bf73..fddf038b8 100644 --- a/gnu/system/bootloader.scm +++ b/gnu/system/bootloader.scm @@ -38,7 +38,10 @@ extlinux-configuration grub-configuration grub-efi-configuration - syslinux-configuration)) + syslinux-configuration + + install-grub + install-syslinux)) ;;; Commentary: ;;; @@ -158,4 +161,47 @@ TIMEOUT ~a~%" (bootloader (@ (gnu packages bootloaders) syslinux)) (installer install-syslinux))) + + +;;; +;;; Bootloader install procedures. +;;; + +(define dd + #~(lambda (bs count if of) + (zero? (system* "dd" + (string-append "bs=" (number->string bs)) + (string-append "count=" (number->string count)) + (string-append "if=" if) + (string-append "of=" of))))) + +(define install-grub + #~(lambda (bootloader device mount-point) + ;; Install GRUB on DEVICE which is mounted at MOUNT-POINT. + (let ((grub (string-append bootloader "/sbin/grub-install")) + (install-dir (string-append mount-point "/boot"))) + ;; Tell 'grub-install' that there might be a LUKS-encrypted /boot or + ;; root partition. + (setenv "GRUB_ENABLE_CRYPTODISK" "y") + + (unless (zero? (system* grub "--no-floppy" + "--boot-directory" install-dir + device)) + (error "failed to install GRUB"))))) + +(define install-syslinux + #~(lambda (bootloader device mount-point) + (let ((extlinux (string-append bootloader "/sbin/extlinux")) + (install-dir (string-append mount-point "/boot/extlinux")) + (syslinux-dir (string-append bootloader "/share/syslinux"))) + (mkdir-p install-dir) + (for-each (lambda (file) + (copy-file file + (string-append install-dir "/" (basename file)))) + (find-files syslinux-dir "\\.c32$")) + + (unless (and (zero? (system* extlinux "--install" install-dir)) + (#$dd 440 1 (string-append syslinux-dir "/mbr.bin") device)) + (error "failed to install SYSLINUX"))))) + ;;; bootloader.scm ends here diff --git a/gnu/system/vm.scm b/gnu/system/vm.scm index 374d8b663..65955b010 100644 --- a/gnu/system/vm.scm +++ b/gnu/system/vm.scm @@ -46,10 +46,10 @@ #:select (%guile-static-stripped)) #:use-module (gnu packages admin) + #:use-module (gnu system bootloader) #:use-module (gnu system shadow) #:use-module (gnu system pam) #:use-module (gnu system linux-initrd) - #:use-module (gnu system grub) #:use-module (gnu system file-systems) #:use-module (gnu system) #:use-module (gnu services) @@ -176,8 +176,9 @@ made available under the /xchg CIFS share." (disk-image-format "qcow2") (file-system-type "ext4") file-system-label - os-derivation - grub-configuration + os.drv + bootcfg.drv + bootloader-configuration (register-closures? #t) (inputs '()) copy-inputs?) @@ -201,7 +202,7 @@ the image." (guix build utils)) (let ((inputs - '#$(append (list qemu parted grub e2fsprogs) + '#$(append (list qemu parted e2fsprogs) (map canonical-package (list sed grep coreutils findutils gawk)) (if register-closures? (list guix) '()))) @@ -223,7 +224,7 @@ the image." #:closures graphs #:copy-closures? #$copy-inputs? #:register-closures? #$register-closures? - #:system-directory #$os-derivation)) + #:system-directory #$os.drv)) (partitions (list (partition (size #$(- disk-image-size (* 10 (expt 2 20)))) @@ -233,7 +234,16 @@ the image." (initializer initialize))))) (initialize-hard-disk "/dev/vda" #:partitions partitions - #:grub.cfg #$grub-configuration) + #:bootloader + #$(bootloader-configuration-bootloader + bootloader-configuration) + #:bootcfg #$bootcfg.drv + #:bootcfg-location + #$(bootloader-configuration-file-name + bootloader-configuration) + #:bootloader-installer + #$(bootloader-configuration-installer + bootloader-configuration)) (reboot))))) #:system system #:make-disk-image? #t @@ -287,8 +297,9 @@ to USB sticks meant to be read-only." (mlet* %store-monad ((os-drv (operating-system-derivation os)) (bootcfg (operating-system-bootcfg os))) (qemu-image #:name name - #:os-derivation os-drv - #:grub-configuration bootcfg + #:os.drv os-drv + #:bootcfg.drv bootcfg + #:bootloader-configuration (operating-system-bootloader os) #:disk-image-size disk-image-size #:disk-image-format "raw" #:file-system-type file-system-type @@ -330,8 +341,9 @@ of the GNU system as described by OS." (mlet* %store-monad ((os-drv (operating-system-derivation os)) (bootcfg (operating-system-bootcfg os))) - (qemu-image #:os-derivation os-drv - #:grub-configuration bootcfg + (qemu-image #:os.drv os-drv + #:bootcfg.drv bootcfg + #:bootloader-configuration (operating-system-bootloader os) #:disk-image-size disk-image-size #:file-system-type file-system-type #:inputs `(("system" ,os-drv) @@ -429,8 +441,9 @@ bootloader refers to: OS kernel, initrd, bootloader data, etc." ;; BOOTCFG and all its dependencies, including the output of OS-DRV. ;; This is more than needed (we only need the kernel, initrd, GRUB for its ;; font, and the background image), but it's hard to filter that. - (qemu-image #:os-derivation os-drv - #:grub-configuration bootcfg + (qemu-image #:os.drv os-drv + #:bootcfg.drv bootcfg + #:bootloader-configuration (operating-system-bootloader os) #:disk-image-size disk-image-size #:inputs (if full-boot? `(("bootcfg" ,bootcfg)) -- 2.12.2 From debbugs-submit-bounces@debbugs.gnu.org Mon Apr 17 05:02:14 2017 Received: (at 26339) by debbugs.gnu.org; 17 Apr 2017 09:02:15 +0000 Received: from localhost ([127.0.0.1]:51482 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d02Y2-0005OM-GP for submit@debbugs.gnu.org; Mon, 17 Apr 2017 05:02:14 -0400 Received: from mail-wr0-f173.google.com ([209.85.128.173]:33920) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d02Xy-0005Mj-LV for 26339@debbugs.gnu.org; Mon, 17 Apr 2017 05:02:11 -0400 Received: by mail-wr0-f173.google.com with SMTP id z109so80124398wrb.1 for <26339@debbugs.gnu.org>; Mon, 17 Apr 2017 02:02:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=YEK4f/ZJ14yMQ4Fq0YnL33L9Eol/Dhe2Qc17vPctlOg=; b=ZAJv/CUXxW3wnouF8LgRLU20gZGh8vLm/75cTep6cY9ra3WIxOb3CUNxls/OWjuJNS FEDEzQhnzMlV/dluUBDTPKiLfE25ReOeW3q6rAPRWxKBuey/n/HMF/11G+h3ymkYOgcK MbGdnC//NTyJyyitlz87UkZKLNLV+qJYgRgUHD3Q7o2V1pQkK4+YNEfrljoQfejs/cnq Mw4u4YSZ602EUfs28Ir70Zd3efsIPEe6cjxCYCqXeV+ddJvqDN7x33VTILnBti+FeE3o fc5oipxCq1MbaMfMPLMIRia3NObGiafpKFaC1px1+6QZYXvRl5iW+9FAyTz8YDV+x9q8 UjsQ== 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:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=YEK4f/ZJ14yMQ4Fq0YnL33L9Eol/Dhe2Qc17vPctlOg=; b=adAgBftV5b67suejp1Blp79GKgZSf9ZJ6h3EH/YL5m42/mOKYAHKHc3kP0EqLoeQDe QHtCiz8XWAqJwe+hm7BA5KL1W0RCGqiCUgvrVHIPqKyPQ8uxS9kMnBvXNm0PXn0AFHKS tpSoarPz2LUHMNVQiVYaIjnJgNpBgHoiiCEo46GDDBUb9XRpeyUgw0R71/eEU3hkJcEk PBCEUbVhDUuWGUoITnOer9nUL3zC3taSnxT+IrGzMLFAgRsTIMcEhLcTwDSu0CoBgxST MpwxxyuRtp9M8pPUa+pfBz5U/U4HTgv81j0ZcW4rebSk8s+UrZ7c91GQb2sTLy8o1lTT o5Vw== X-Gm-Message-State: AN3rC/4c8gR3PMt7Tsz6vOXyASZ1EnL0KIdHV2gK+z0khCwRgTmnpTAv N5Td8iat71lAzA== X-Received: by 10.223.182.174 with SMTP id j46mr16244219wre.143.1492419725020; Mon, 17 Apr 2017 02:02:05 -0700 (PDT) Received: from cervin.8.8.8.8 (85-169-37-239.rev.numericable.fr. [85.169.37.239]) by smtp.gmail.com with ESMTPSA id m4sm13484276wrm.4.2017.04.17.02.02.04 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 17 Apr 2017 02:02:04 -0700 (PDT) From: Mathieu Othacehe To: 26339@debbugs.gnu.org Subject: [PATCH v2 06/12] bootloader: Stop using grub module. Date: Mon, 17 Apr 2017 11:01:42 +0200 Message-Id: <20170417090148.13791-7-m.othacehe@gmail.com> X-Mailer: git-send-email 2.12.2 In-Reply-To: <20170417090148.13791-1-m.othacehe@gmail.com> References: <20170417090148.13791-1-m.othacehe@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.8 (--) X-Debbugs-Envelope-To: 26339 Cc: Mathieu Othacehe 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.8 (--) * gnu.scm (%public-modules): Replace grub by bootloader. * gnu/tests.scm (define-module): Ditto. * gnu/tests/nfs.scm (define-module): Ditto. * gnu/tests/web.scm (define-module): Ditto. --- gnu.scm | 3 ++- gnu/tests.scm | 3 ++- gnu/tests/nfs.scm | 3 ++- gnu/tests/web.scm | 1 + 4 files changed, 7 insertions(+), 3 deletions(-) diff --git a/gnu.scm b/gnu.scm index 932e4cdd5..56b84b74d 100644 --- a/gnu.scm +++ b/gnu.scm @@ -1,6 +1,7 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2014, 2015, 2016 Ludovic Courtès ;;; Copyright © 2015 Joshua S. Grant +;;; Copyright © 2017 Mathieu Othacehe ;;; ;;; This file is part of GNU Guix. ;;; @@ -34,7 +35,7 @@ '((gnu system) (gnu system mapped-devices) (gnu system file-systems) - (gnu system grub) ; 'grub-configuration' + (gnu system bootloader) (gnu system pam) (gnu system shadow) ; 'user-account' (gnu system linux-initrd) diff --git a/gnu/tests.scm b/gnu/tests.scm index e84d1ebb2..25c7c3fd3 100644 --- a/gnu/tests.scm +++ b/gnu/tests.scm @@ -1,5 +1,6 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2016, 2017 Ludovic Courtès +;;; Copyright © 2017 Mathieu Othacehe ;;; ;;; This file is part of GNU Guix. ;;; @@ -21,7 +22,7 @@ #:use-module (guix utils) #:use-module (guix records) #:use-module (gnu system) - #:use-module (gnu system grub) + #:use-module (gnu system bootloader) #:use-module (gnu system file-systems) #:use-module (gnu system shadow) #:use-module (gnu services) diff --git a/gnu/tests/nfs.scm b/gnu/tests/nfs.scm index 1f28f5a5b..432fc83a1 100644 --- a/gnu/tests/nfs.scm +++ b/gnu/tests/nfs.scm @@ -1,6 +1,7 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2016 Ludovic Courtès ;;; Copyright © 2016 John Darrington +;;; Copyright © 2017 Mathieu Othacehe ;;; ;;; This file is part of GNU Guix. ;;; @@ -20,7 +21,7 @@ (define-module (gnu tests nfs) #:use-module (gnu tests) #:use-module (gnu system) - #:use-module (gnu system grub) + #:use-module (gnu system bootloader) #:use-module (gnu system file-systems) #:use-module (gnu system shadow) #:use-module (gnu system vm) diff --git a/gnu/tests/web.scm b/gnu/tests/web.scm index bc7e3b89a..0e98a128c 100644 --- a/gnu/tests/web.scm +++ b/gnu/tests/web.scm @@ -1,5 +1,6 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2017 Ludovic Courtès +;;; Copyright © 2017 Mathieu Othacehe ;;; ;;; This file is part of GNU Guix. ;;; -- 2.12.2 From debbugs-submit-bounces@debbugs.gnu.org Mon Apr 17 05:02:15 2017 Received: (at 26339) by debbugs.gnu.org; 17 Apr 2017 09:02:15 +0000 Received: from localhost ([127.0.0.1]:51484 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d02Y2-0005OU-Pn for submit@debbugs.gnu.org; Mon, 17 Apr 2017 05:02:15 -0400 Received: from mail-wr0-f195.google.com ([209.85.128.195]:34053) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d02Y0-0005Mx-3J for 26339@debbugs.gnu.org; Mon, 17 Apr 2017 05:02:12 -0400 Received: by mail-wr0-f195.google.com with SMTP id u18so19565127wrc.1 for <26339@debbugs.gnu.org>; Mon, 17 Apr 2017 02:02:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=mRRo5YJsZelKBUcMXGdGctzGFvEKhVR/X3wxQ44cUJA=; b=bfMqyTNqnpY/Mx5kYXkcyu7rRUdEI6iOklClctLsJqfZYLYowuapuiH8tE0me8O+2A yMWAoqW+nBcNa0yHQMz0obNH7oejIi5sk5rVlwyipU5qU29RTedsOiE+nTGdE8tcvIER 2XAOh6k696mwlWY0Y1rs+EZRTYgek0Tw+a0vE+9BRIvDwiZrgYfsn0gsH0c3d3gErDgo WzAHuIpgnpARajnrnVknX9EmjnHj57c17UQgOuHmjj7w4IEhS5O+qXgXs8U7PaM+XEUY rI06tAQNbGW2AmQcuzRZnyLjzctZnbeQuJbFuiLI3Aj0AGxDcYyXEgijzNf3QpPemWo3 hoaQ== 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:date:message-id:in-reply-to :references; bh=mRRo5YJsZelKBUcMXGdGctzGFvEKhVR/X3wxQ44cUJA=; b=oZ/YQoAJLZbLm35vvgfYxFeWCDZH7UPYjp0h8T+beSWQEJhz32T5sAthP4wJu/X+c/ tgmXZZZtlzczwX/sGS7YPxade+uBG3NeMYZMu2PmDkJk1nAXOOrIi4Q2sznkzA/GZqUz I8N37AOvX6cZhXOpL0LB4F56EGzioU+PLsVJR47+qH/O73qni8ZifsG3G2XSpdRekFJD wBZArgxmRn9ZTNV15HTWAArvhAbfZoqjKbxc0zeKz8WEt3t26eblSEx9SlpWW1nfVKcv 2PFXYv9U+ITVjNivi2THkLFx25ItsP9MrhQEnQc6Z6K62B3/SGn8P7Fr4crskUnYW5Md 0V9Q== X-Gm-Message-State: AN3rC/40taaP5BgeiFo220AwgS3aT51mu60ro1q7d6sKxenYHH0EuGlB /DS0Ewk9B6+01A== X-Received: by 10.223.135.153 with SMTP id b25mr10073300wrb.170.1492419726421; Mon, 17 Apr 2017 02:02:06 -0700 (PDT) Received: from cervin.8.8.8.8 (85-169-37-239.rev.numericable.fr. [85.169.37.239]) by smtp.gmail.com with ESMTPSA id m4sm13484276wrm.4.2017.04.17.02.02.05 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 17 Apr 2017 02:02:05 -0700 (PDT) From: Mathieu Othacehe To: 26339@debbugs.gnu.org Subject: [PATCH v2 07/12] bootloader: Add device and type to bootloader-configuration record. Date: Mon, 17 Apr 2017 11:01:43 +0200 Message-Id: <20170417090148.13791-8-m.othacehe@gmail.com> X-Mailer: git-send-email 2.12.2 In-Reply-To: <20170417090148.13791-1-m.othacehe@gmail.com> References: <20170417090148.13791-1-m.othacehe@gmail.com> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 26339 Cc: Mathieu Othacehe 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.3 (--) * gnu/system.scm ()[device, type]: New fields. (boot-parameters-boot-device): New exported procedure. (boot-parameters-boot-type): Ditto. (operating-system-grub.cfg): Add new fields. (operating-system-parameters-file): Add new fields and replace GRUB by bootloader in doctype. (read-boot-parameters): Ditto. --- gnu/system.scm | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/gnu/system.scm b/gnu/system.scm index ce0a4a00e..8c5721491 100644 --- a/gnu/system.scm +++ b/gnu/system.scm @@ -104,6 +104,8 @@ boot-parameters? boot-parameters-label boot-parameters-root-device + boot-parameters-boot-device + boot-parameters-boot-type boot-parameters-store-device boot-parameters-store-mount-point boot-parameters-kernel @@ -735,8 +737,12 @@ populate the \"old entries\" menu." (mlet* %store-monad ((system (operating-system-derivation os)) (root-fs -> (operating-system-root-file-system os)) + (boot-device -> (bootloader-configuration-device + (operating-system-bootloader os))) (store-fs -> (operating-system-store-file-system os)) (label -> (kernel->boot-label (operating-system-kernel os))) + (boot-type -> (bootloader-configuration-type + (operating-system-bootloader os))) (kernel -> (operating-system-kernel-file os)) (initrd (operating-system-initrd-file os)) (root-device -> (if (eq? 'uuid (file-system-title root-fs)) @@ -745,12 +751,14 @@ populate the \"old entries\" menu." (entries -> (list (boot-parameters (label label) (root-device root-device) + (boot-device boot-device) ;; The device where the kernel and initrd live. (store-device (fs->boot-device store-fs)) (store-mount-point (file-system-mount-point store-fs)) + (boot-type boot-type) (kernel kernel) (kernel-arguments (cons* (string-append "--root=" root-device) @@ -772,10 +780,15 @@ device in a ." (define (operating-system-parameters-file os) "Return a file that describes the boot parameters of OS. The primary use of -this file is the reconstruction of GRUB menu entries for old configurations." +this file is the reconstruction of bootloader menu entries for old +configurations." (mlet %store-monad ((initrd (operating-system-initrd-file os)) (root -> (operating-system-root-file-system os)) + (boot-device -> (bootloader-configuration-device + (operating-system-bootloader os))) (store -> (operating-system-store-file-system os)) + (boot-type -> (bootloader-configuration-type + (operating-system-bootloader os))) (label -> (kernel->boot-label (operating-system-kernel os)))) (gexp->file "parameters" @@ -787,6 +800,8 @@ this file is the reconstruction of GRUB menu entries for old configurations." (kernel-arguments #$(operating-system-kernel-arguments os)) (initrd #$initrd) + (boot-device #$boot-device) + (boot-type #$boot-type) (store (device #$(fs->boot-device store)) (mount-point #$(file-system-mount-point store)))) @@ -808,6 +823,8 @@ this file is the reconstruction of GRUB menu entries for old configurations." ;; exactly to the device field of the object representing the ;; OS's root file system, so it might be a device path like "/dev/sda3". (root-device boot-parameters-root-device) + (boot-device boot-parameters-boot-device) + (boot-type boot-parameters-boot-type) (store-device boot-parameters-store-device) (store-mount-point boot-parameters-store-mount-point) (kernel boot-parameters-kernel) @@ -826,6 +843,16 @@ this file is the reconstruction of GRUB menu entries for old configurations." (label label) (root-device root) + (boot-device + (match (assq 'boot-device rest) + ((_ args) args) + (#f #f))) ; for compatibility reasons. + + (boot-type + (match (assq 'boot-type rest) + ((_ args) args) + (#f 'grub))) ; for compatibility reasons. + ;; In the past, we would store the directory name of the kernel instead ;; of the absolute file name of its image. Detect that and correct it. (kernel (if (string=? linux (direct-store-path linux)) -- 2.12.2 From debbugs-submit-bounces@debbugs.gnu.org Mon Apr 17 05:02:20 2017 Received: (at 26339) by debbugs.gnu.org; 17 Apr 2017 09:02:20 +0000 Received: from localhost ([127.0.0.1]:51490 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d02Y8-0005P7-7Z for submit@debbugs.gnu.org; Mon, 17 Apr 2017 05:02:20 -0400 Received: from mail-wr0-f196.google.com ([209.85.128.196]:35321) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d02Y1-0005N0-80 for 26339@debbugs.gnu.org; Mon, 17 Apr 2017 05:02:13 -0400 Received: by mail-wr0-f196.google.com with SMTP id l44so19499400wrc.2 for <26339@debbugs.gnu.org>; Mon, 17 Apr 2017 02:02:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=oZt/YA2s495bkWAaDLIAo4d8Hf6mbxrRPkJI4mYO6BQ=; b=sVswMh4q/QwiSOW5IDR6lsnQ2ouIw5/7Wkq9K6l5CEhihUxg/idcvLuf4bmAz90K21 12HaiSxHu8ycPTYzQu8Lp9845QXWavuiGr1VKmFIuoBakSdK2csLb4FqHq6jg6dyFJtI WShihakIocXSVJDFysvaxCx7aSuDiM5V46pghD+5bnA1I5CRk4uYorDqrRe3ZtzdOdMk YImY8Ua59C+t2ciswnJT1QiVU7ro2gwqhzN8nwdwwSqVePhNhEbJQNk1CXONpkHsFYUP NguV8fbpLMnRPZJ4TB9Vu3arAY69/vTpxOmM46HI80QT3nTl0LiFyYMiPT1RfjdtouRq zVaQ== 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:date:message-id:in-reply-to :references; bh=oZt/YA2s495bkWAaDLIAo4d8Hf6mbxrRPkJI4mYO6BQ=; b=ZEyMBIY9bowYs6Xtg8c+/DxQgHlmOh+0mGydYjVrWdQ7jTPb4xwtNdaBxDVETHy6BQ RPvh9bbf++FWUhBkjJ1j0H5aWff53SpW0vGAIQyN1Y6f3uKiuamEm030Tn7CqptQQEAJ hlBA0zWoZBHwmqFK2oqSZqqSCKrWgudT/CKvDKCgSxXPQRhyo0lRecIw70JQAPSXd7dz xUNcjZIzSmUDQQqXIjsQpiZsIc7dADl24viTpj8vuwdlZlkcy+zypAHsIEBtiB0oDJsg TqmYfkzpoGT7ng421+NrzjpFH5bqtRhjhC3v7OZQ0eXYJXS/T94jxzgV37mZSaORvIM9 aVBA== X-Gm-Message-State: AN3rC/7VRMFbiBfVQXWNe5HjUN9hvmOXzgIAEjJwEwjXZD9NQLqwuJ3P L2Yc2dtCclGNlnIz X-Received: by 10.223.146.98 with SMTP id 89mr16712255wrj.71.1492419727425; Mon, 17 Apr 2017 02:02:07 -0700 (PDT) Received: from cervin.8.8.8.8 (85-169-37-239.rev.numericable.fr. [85.169.37.239]) by smtp.gmail.com with ESMTPSA id m4sm13484276wrm.4.2017.04.17.02.02.06 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 17 Apr 2017 02:02:06 -0700 (PDT) From: Mathieu Othacehe To: 26339@debbugs.gnu.org Subject: [PATCH v2 08/12] scripts: system: Remove unused variables. Date: Mon, 17 Apr 2017 11:01:44 +0200 Message-Id: <20170417090148.13791-9-m.othacehe@gmail.com> X-Mailer: git-send-email 2.12.2 In-Reply-To: <20170417090148.13791-1-m.othacehe@gmail.com> References: <20170417090148.13791-1-m.othacehe@gmail.com> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 26339 Cc: Mathieu Othacehe 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.3 (--) * guix/scripts/system.scm (profile-bootloader-entries): Remove root and root-device unused variables. --- guix/scripts/system.scm | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/guix/scripts/system.scm b/guix/scripts/system.scm index c2212ed14..b1104eb9b 100644 --- a/guix/scripts/system.scm +++ b/guix/scripts/system.scm @@ -389,11 +389,7 @@ NUMBERS, which is a list of generation numbers." (unless-file-not-found (let* ((file (string-append system "/parameters")) (params (call-with-input-file file - read-boot-parameters)) - (root (boot-parameters-root-device params)) - (root-device (if (bytevector? root) - (uuid->string root) - root))) + read-boot-parameters))) (boot-parameters (inherit params) (label (string-append (boot-parameters-label params) " (#" -- 2.12.2 From debbugs-submit-bounces@debbugs.gnu.org Mon Apr 17 05:02:22 2017 Received: (at 26339) by debbugs.gnu.org; 17 Apr 2017 09:02:22 +0000 Received: from localhost ([127.0.0.1]:51492 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d02Y8-0005PA-Gf for submit@debbugs.gnu.org; Mon, 17 Apr 2017 05:02:20 -0400 Received: from mail-wr0-f196.google.com ([209.85.128.196]:34073) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d02Y2-0005NL-QG for 26339@debbugs.gnu.org; Mon, 17 Apr 2017 05:02:15 -0400 Received: by mail-wr0-f196.google.com with SMTP id u18so19565259wrc.1 for <26339@debbugs.gnu.org>; Mon, 17 Apr 2017 02:02:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=ftUy6E8kljMsHjUJaJRAnAcGzLPmwImRoVFVdGu+YJ4=; b=X2GFzZ4KcuZJN0WPxcUcFDhZxsuKMQcckNR3KD1O7uum2qEqLwcAB4vpvbceccyLeP /z6FPUWd8rdU1u8oR0YgusC0R0kz0v773tJLbnSnLfKEXQgykDOUlNfRSZwKmBBQKm1a 4ORRUQWyjbKrNHatw6B+rZaZsdVyaDnFRhnApWg4cIQb/VxsZpmzWKW92l4/noZpCQCB 6R4t6Jp8eDIyiux/c1R1gne44ceKC2tnx7fFKsO5TWVOrkQUB69XsmSgiU+NSQX+tvhN wM5gQ3qStJSz+GhDec3fcTf4oUtyznqfYYgih8496wjn3zafGcHYLuuxlCdD/PxxgaEV 8XjA== 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:date:message-id:in-reply-to :references; bh=ftUy6E8kljMsHjUJaJRAnAcGzLPmwImRoVFVdGu+YJ4=; b=pdUGxcP/ufOczQ0xVmf341k9zf7Oh3FX85POMJ235akU36SQ0iJ01YIfAHN+yXlgTf dWfj4p0CE/Sbc1NAaxt6rbLAyCnffrifsFtihzv0550OE0RRIWaKqttEtVGAOpSCojxP mjoKR8n1TroAVkxmVsugrIzUaZnqNeV7X9hwYnmJUedZECVD3fih6VKwdTZfIQy0Z1Fb FtlLdwuqFRbjIgi04tLYvpIzEDNakyaJwlpKj/+wvUED0akIizSIirgCu05QVrnhHdWG IpdtcarffIJzhfnzishrnrpuEc3dhPuTnzVhzjIjdiVeljjaNx3mEQs9Py9s8wW+T8pT ei6Q== X-Gm-Message-State: AN3rC/6yzS/95Am8QxF3KQoascOrupYbCiATVBHNBHJAIUn5HF4IP+vM wrPIgCx5xnZWYkTe X-Received: by 10.223.175.218 with SMTP id y26mr16592583wrd.63.1492419728606; Mon, 17 Apr 2017 02:02:08 -0700 (PDT) Received: from cervin.8.8.8.8 (85-169-37-239.rev.numericable.fr. [85.169.37.239]) by smtp.gmail.com with ESMTPSA id m4sm13484276wrm.4.2017.04.17.02.02.07 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 17 Apr 2017 02:02:07 -0700 (PDT) From: Mathieu Othacehe To: 26339@debbugs.gnu.org Subject: [PATCH v2 09/12] scripts: system: Adapt "reconfigure" to new bootloader API. Date: Mon, 17 Apr 2017 11:01:45 +0200 Message-Id: <20170417090148.13791-10-m.othacehe@gmail.com> X-Mailer: git-send-email 2.12.2 In-Reply-To: <20170417090148.13791-1-m.othacehe@gmail.com> References: <20170417090148.13791-1-m.othacehe@gmail.com> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 26339 Cc: Mathieu Othacehe 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.3 (--) * guix/scripts/system.scm (install-grub*): Rename to install-bootloader. Use keys to pass arguments. Pass a new argument, "install-procedure" which is a script in store dealing with bootloader-specific install actions. Also call "install-boot-config" to install the bootloader config file. (install-bootloader-derivation): New procedure. It returns a derivation that builds a file containing "install-procedure" gexp. (perform-action): Build install-proc derivation and call install-bootloader with the resulting file. Stop adding GRUB to PATH as bootloaders are called in install-proc with direct store paths. --- guix/scripts/system.scm | 112 +++++++++++++++++++++++++++++------------------- 1 file changed, 67 insertions(+), 45 deletions(-) diff --git a/guix/scripts/system.scm b/guix/scripts/system.scm index b1104eb9b..1776dc00f 100644 --- a/guix/scripts/system.scm +++ b/guix/scripts/system.scm @@ -147,27 +147,34 @@ TARGET, and register them." (map (cut copy-item <> target #:log-port log-port) to-copy)))) -(define (install-grub* grub.cfg device target) - "This is a variant of 'install-grub' with error handling, lifted in -%STORE-MONAD" - (let* ((gc-root (string-append target %gc-roots-directory - "/grub.cfg")) - (temp-gc-root (string-append gc-root ".new")) - (delete-file (lift1 delete-file %store-monad)) - (make-symlink (lift2 switch-symlinks %store-monad)) - (rename (lift2 rename-file %store-monad))) - (mbegin %store-monad - ;; Prepare the symlink to GRUB.CFG to make sure that it's a GC root when - ;; 'install-grub' completes (being a bit paranoid.) - (make-symlink temp-gc-root grub.cfg) - - (munless (false-if-exception (install-grub grub.cfg device target)) +(define* (install-bootloader install-procedure + #:key + bootcfg bootcfg-location + device target) + "Call INSTALL-PROCEDURE with error handling, in %STORE-MONAD." + (with-monad %store-monad + (let* ((gc-root (string-append target %gc-roots-directory + "/bootcfg")) + (temp-gc-root (string-append gc-root ".new")) + (install (and install-procedure + (derivation->output-path install-procedure))) + (bootcfg (derivation->output-path bootcfg))) + ;; Prepare the symlink to bootloader config file to make sure that it's + ;; a GC root when 'install-procedure' completes (being a bit paranoid.) + (switch-symlinks temp-gc-root bootcfg) + + (unless (false-if-exception + (begin + (install-boot-config bootcfg bootcfg-location target) + (when install + (save-load-path-excursion (primitive-load install))))) (delete-file temp-gc-root) - (leave (_ "failed to install GRUB on device '~a'~%") device)) + (leave (_ "failed to install bootloader on device ~a '~a'~%") install device)) - ;; Register GRUB.CFG as a GC root so that its dependencies (background - ;; image, font, etc.) are not reclaimed. - (rename temp-gc-root gc-root)))) + ;; Register bootloader config file as a GC root so that its dependencies + ;; (background image, font, etc.) are not reclaimed. + (rename-file temp-gc-root gc-root) + (return #t)))) (define* (install os-drv target #:key (log-port (current-output-port)) @@ -597,17 +604,28 @@ PATTERN, a string. When PATTERN is #f, display all the system generations." (warning (_ "Consider running 'guix pull' before 'reconfigure'.~%")) (warning (_ "Failing to do that may downgrade your system!~%")))) +(define (install-bootloader-derivation install-procedure + bootloader device target) + (with-monad %store-monad + (gexp->file "install-bootloader" + (with-imported-modules '((guix build utils)) + #~(begin + (use-modules (guix build utils)) + (#$install-procedure #$bootloader + #$device + #$target)))))) + (define* (perform-action action os #:key bootloader? dry-run? derivations-only? use-substitutes? device target image-size full-boot? (mappings '()) (gc-root #f)) - "Perform ACTION for OS. GRUB? specifies whether to install GRUB; DEVICE is -the target devices for GRUB; TARGET is the target root directory; IMAGE-SIZE -is the size of the image to be built, for the 'vm-image' and 'disk-image' -actions. FULL-BOOT? is used for the 'vm' action; it determines whether to -boot directly to the kernel or to the bootloader. + "Perform ACTION for OS. BOOTLOADER? specifies whether to install +bootloader; DEVICE is the target devices for bootloader; TARGET is the target +root directory; IMAGE-SIZE is the size of the image to be built, for the +'vm-image' and 'disk-image' actions. FULL-BOOT? is used for the 'vm' action; +it determines whether to boot directly to the kernel or to the bootloader. When DERIVATIONS-ONLY? is true, print the derivation file name(s) without building anything. @@ -630,20 +648,28 @@ output when building a system derivation, such as a disk image." (if bootloader (package->derivation bootloader) (return #f)))) - (grub.cfg (if (eq? 'container action) - (return #f) - (operating-system-bootcfg os - (if (eq? 'init action) - '() - (profile-grub-entries))))) - - ;; For 'init' and 'reconfigure', always build GRUB.CFG, even if - ;; --no-grub is passed, because GRUB.CFG because we then use it as a GC - ;; root. See . + (bootcfg (if (eq? 'container action) + (return #f) + (operating-system-bootcfg + os + (if (eq? 'init action) + '() + (profile-bootloader-entries))))) + (bootcfg-location -> (bootloader-configuration-file-name + (operating-system-bootloader os))) + (install-proc + (let ((procedure (bootloader-configuration-installer + (operating-system-bootloader os))) + (target (or target "/"))) + (install-bootloader-derivation procedure bootloader device target))) + + ;; For 'init' and 'reconfigure', always build BOOTCFG, even if + ;; --no-bootloader is passed, because we then use it as a GC root. + ;; See . (drvs -> (if (memq action '(init reconfigure)) (if (and bootloader? bootloader) - (list sys grub.cfg bootloader) - (list sys grub.cfg)) + (list sys bootcfg bootloader install-proc) + (list sys bootcfg)) (list sys))) (% (if derivations-only? (return (for-each (compose println derivation-file-name) @@ -657,20 +683,16 @@ output when building a system derivation, such as a disk image." (for-each (compose println derivation->output-path) drvs) - ;; Make sure GRUB is accessible. - (when (and bootloader? bootloader) - (let ((prefix (derivation->output-path bootloader))) - (setenv "PATH" - (string-append prefix "/bin:" prefix "/sbin:" - (getenv "PATH"))))) - (case action ((reconfigure) (mbegin %store-monad (switch-to-system os) (mwhen bootloader? - (install-grub* (derivation->output-path grub.cfg) - device "/")))) + (install-bootloader install-proc + #:bootcfg bootcfg + #:bootcfg-location bootcfg-location + #:device device + #:target "/")))) ((init) (newline) (format #t (_ "initializing operating system under '~a'...~%") -- 2.12.2 From debbugs-submit-bounces@debbugs.gnu.org Mon Apr 17 05:02:22 2017 Received: (at 26339) by debbugs.gnu.org; 17 Apr 2017 09:02:22 +0000 Received: from localhost ([127.0.0.1]:51494 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d02YA-0005PI-Ec for submit@debbugs.gnu.org; Mon, 17 Apr 2017 05:02:22 -0400 Received: from mail-wr0-f193.google.com ([209.85.128.193]:35334) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d02Y3-0005NT-Cs for 26339@debbugs.gnu.org; Mon, 17 Apr 2017 05:02:15 -0400 Received: by mail-wr0-f193.google.com with SMTP id l44so19499474wrc.2 for <26339@debbugs.gnu.org>; Mon, 17 Apr 2017 02:02:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=H1FCOqd8yks7yZXROmqr036vHgb9zC1KCc9O44nFsZ4=; b=UHebQRHi/bhkkjaiKumVeteR+VXfS8++lY4hTFsS6HLwptPahmqhY8HzOlAZWlQKPa ayV9SlXfkSKz9SGxNoJyWB5pY1e34Ee0dgcpQ9+Q93EHx0w7xpSX0vawaZeiM+K+kp5Q NwhUyWSjwQv1PMAaURAsy/i5jv6rJVgPnBi9JUVROvpiW5+EYujzzzByJzMGsXfMF2F6 C/gGudnb+kf++oQe+RQ3wZG2TIQbDs57+hK5GfipFxw7P3ynohXWzbmqxajF9iZhw0Ls gY8kx2nMPatYIGnnhJuP+7DysKM8KbBaFpON2osQbjlQW/CPzc7Li1pkbYxjBRf7WvmZ haoQ== 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:date:message-id:in-reply-to :references; bh=H1FCOqd8yks7yZXROmqr036vHgb9zC1KCc9O44nFsZ4=; b=pKlr5LFrtjr1DEUTBV/pTmUkI9PtS1OxTOZbRb+Kkq/zLlt2dZrq+wCUxPx3s8F6ne k8X181QE5x1Ik2Zq5QjOal4KgTF32zmH2KBaytUaRNQP9o5glMzrKaLxsoZm69TOb4mE ZlPuq5OwkJWOQPRehk9/WiULhzxq0A6ZLErKyzu544jsZi8aimSpDfy5RtQCjgyetw5P qt1HiI6gA5CveS8J6298cV9pMcJJJzWldMreH0qWkrhC9sM1RgVcLiFU/TL0L5FtvMNk DVCi1m6e2cPaaT2Klcky3QzIVGOBK+SdS6RlEZnjnimndW2wQ8Fzd/rWb94aXqwdHc+T aUkw== X-Gm-Message-State: AN3rC/4KoE1Npvt9Umun2boF+OqGktDvsYp4GA1+mV3+VlFcZf7nlPyS RAPHhn6GWiEpnVkW X-Received: by 10.223.165.14 with SMTP id i14mr17269029wrb.7.1492419729547; Mon, 17 Apr 2017 02:02:09 -0700 (PDT) Received: from cervin.8.8.8.8 (85-169-37-239.rev.numericable.fr. [85.169.37.239]) by smtp.gmail.com with ESMTPSA id m4sm13484276wrm.4.2017.04.17.02.02.08 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 17 Apr 2017 02:02:08 -0700 (PDT) From: Mathieu Othacehe To: 26339@debbugs.gnu.org Subject: [PATCH v2 10/12] scripts: system: Adapt "init" to new bootloader API. Date: Mon, 17 Apr 2017 11:01:46 +0200 Message-Id: <20170417090148.13791-11-m.othacehe@gmail.com> X-Mailer: git-send-email 2.12.2 In-Reply-To: <20170417090148.13791-1-m.othacehe@gmail.com> References: <20170417090148.13791-1-m.othacehe@gmail.com> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 26339 Cc: Mathieu Othacehe 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.3 (--) * guix/scripts/system.scm (install): Pass install-proc as a new argument. Rename other arguments. Call install-bootloader instead of install-grub*. (perform-action): Adapt. --- guix/scripts/system.scm | 29 +++++++++++++++++++---------- 1 file changed, 19 insertions(+), 10 deletions(-) diff --git a/guix/scripts/system.scm b/guix/scripts/system.scm index 1776dc00f..880bd8b56 100644 --- a/guix/scripts/system.scm +++ b/guix/scripts/system.scm @@ -178,12 +178,14 @@ TARGET, and register them." (define* (install os-drv target #:key (log-port (current-output-port)) - grub? grub.cfg device) - "Copy the closure of GRUB.CFG, which includes the output of OS-DRV, to + install-proc bootloader? + bootcfg bootcfg-location + device) + "Copy the closure of BOOTCFG, which includes the output of OS-DRV, to directory TARGET. TARGET must be an absolute directory name since that's what 'guix-register' expects. -When GRUB? is true, install GRUB on DEVICE, using GRUB.CFG." +When BOOTLOADER? is true, install bootloader on DEVICE, using BOOTCFG." (define (maybe-copy to-copy) (with-monad %store-monad (if (string=? target "/") @@ -212,16 +214,21 @@ the ownership of '~a' may be incorrect!~%") (populate (lift2 populate-root-file-system %store-monad))) (mbegin %store-monad - ;; Copy the closure of GRUB.CFG, which includes OS-DIR, GRUB's - ;; background image and so on. - (maybe-copy grub.cfg) + ;; Copy the closure of BOOTCFG, which includes OS-DIR, + ;; eventual background image and so on. + (maybe-copy + (derivation->output-path bootcfg)) ;; Create a bunch of additional files. (format log-port "populating '~a'...~%" target) (populate os-dir target) - (mwhen grub? - (install-grub* grub.cfg device target))))) + (mwhen bootloader? + (install-bootloader install-proc + #:bootcfg bootcfg + #:bootcfg-location bootcfg-location + #:device device + #:target target))))) ;;; @@ -698,8 +705,10 @@ output when building a system derivation, such as a disk image." (format #t (_ "initializing operating system under '~a'...~%") target) (install sys (canonicalize-path target) - #:grub? bootloader? - #:grub.cfg (derivation->output-path grub.cfg) + #:bootloader? bootloader? + #:bootcfg bootcfg + #:bootcfg-location bootcfg-location + #:install-proc install-proc #:device device)) (else ;; All we had to do was to build SYS and maybe register an -- 2.12.2 From debbugs-submit-bounces@debbugs.gnu.org Mon Apr 17 05:02:23 2017 Received: (at 26339) by debbugs.gnu.org; 17 Apr 2017 09:02:23 +0000 Received: from localhost ([127.0.0.1]:51496 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d02YA-0005PQ-Mo for submit@debbugs.gnu.org; Mon, 17 Apr 2017 05:02:23 -0400 Received: from mail-wr0-f193.google.com ([209.85.128.193]:35341) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d02Y4-0005Nr-Jo for 26339@debbugs.gnu.org; Mon, 17 Apr 2017 05:02:16 -0400 Received: by mail-wr0-f193.google.com with SMTP id l44so19499528wrc.2 for <26339@debbugs.gnu.org>; Mon, 17 Apr 2017 02:02:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=ulHZ1qcgJe2LaPcuEpKggWK8NJvgP7sDaC97ty++bFY=; b=tvY+K+IOEphOOd55N8WM2brTN0DYggOn1//G40OjSaVdIo/lQ3gfB41eE77bGEGFUz Akub0fnqr/TEiC/JKrKCL/5e0yIuSf+cp1MSMgdCrpqciWTcTeeR9qUenc8eocgX2efE qCxFtVd39uzX6WvgXfkYKEeejpD40IcUO7wB16wxJEBbdDUSFe+Jk4/1iH3RzY5u2g4L EJ+V8Q1jycqhQKhlMIjHn5yZyoQTVoVYut3O1bnfyvTKAX92v1+38eE2nTw2z0Rvs5vb DBMMHoznYCIJRtA/sEdgds7viepjXWBkRGRtuMQtNrTVPmONW3b+W3BJqrEet3RiJ7BT zEvQ== 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:date:message-id:in-reply-to :references; bh=ulHZ1qcgJe2LaPcuEpKggWK8NJvgP7sDaC97ty++bFY=; b=dHUWGOeWYTXsAgKebIs9RcZsQhpFHVBc1QfAKj/RHZFFsCKsrcz9mdhm2r6KxtL27O q0neismFtETCBnLLK9tBdmsdd2AFx/OSMvmsgyBH9JFhDtiypnzgedy7NPEkmX8XPbru n71sChD2egIaemnpjsJdTO65Ys/LWbSt6vT84A/Ip1fuQMDVv7q5a/R6t2HEucCsbXSe fSPKjPtMhvcXj+sRQVWnt1urhuYvuCK6wSKDhcC8MR1v2tZkuSzC1GGF/9OLLYEPs5zy zNBn9LxSivu0zxHshZvrfo9ckASSWssa1a+7Fl53opkniHPNfoiqj+TXbt4LzK9GgT8X eMNg== X-Gm-Message-State: AN3rC/4116o/bdz73V3MN/AKIJd6M70eVDhQdjt7zn2w3j9mOwDc5k71 PMqLokKnMrl9I4yK X-Received: by 10.223.150.121 with SMTP id c54mr16749261wra.202.1492419730747; Mon, 17 Apr 2017 02:02:10 -0700 (PDT) Received: from cervin.8.8.8.8 (85-169-37-239.rev.numericable.fr. [85.169.37.239]) by smtp.gmail.com with ESMTPSA id m4sm13484276wrm.4.2017.04.17.02.02.09 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 17 Apr 2017 02:02:09 -0700 (PDT) From: Mathieu Othacehe To: 26339@debbugs.gnu.org Subject: [PATCH v2 11/12] scripts: system: Adapt "switch-generation" to new bootloader API. Date: Mon, 17 Apr 2017 11:01:47 +0200 Message-Id: <20170417090148.13791-12-m.othacehe@gmail.com> X-Mailer: git-send-email 2.12.2 In-Reply-To: <20170417090148.13791-1-m.othacehe@gmail.com> References: <20170417090148.13791-1-m.othacehe@gmail.com> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 26339 Cc: Mathieu Othacehe 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.3 (--) * guix/scripts/system.scm (profile-grub-entries): Rename to profile-bootloader-entries. (reinstall-grub): Rename to reinstall-bootloader. Read boot-device and boot-type from parameters file to be able to restore the correct bootloader on specified device. Factorize bootloader installation code by calling install-bootloader. (switch-to-system-generation): Adapt. --- guix/scripts/system.scm | 91 +++++++++++++++++++++++-------------------------- 1 file changed, 43 insertions(+), 48 deletions(-) diff --git a/guix/scripts/system.scm b/guix/scripts/system.scm index 880bd8b56..a637f91aa 100644 --- a/guix/scripts/system.scm +++ b/guix/scripts/system.scm @@ -377,26 +377,8 @@ it atomically, and then run OS's activation script." (date->string (time-utc->date time) "~Y-~m-~d ~H:~M"))) -(define* (profile-boot-parameters #:optional (profile %system-profile) - (numbers (generation-numbers profile))) - "Return a list of 'menu-entry' for the generations of PROFILE specified by -NUMBERS, which is a list of generation numbers." - (define (system->boot-parameters system number time) - (unless-file-not-found - (let* ((file (string-append system "/parameters")) - (params (call-with-input-file file - read-boot-parameters))) - params))) - (let* ((systems (map (cut generation-file-name profile <>) - numbers)) - (times (map (lambda (system) - (unless-file-not-found - (stat:mtime (lstat system)))) - systems))) - (filter-map system->boot-parameters systems numbers times))) - -(define* (profile-grub-entries #:optional (profile %system-profile) - (numbers (generation-numbers profile))) +(define* (profile-bootloader-entries #:optional (profile %system-profile) + (numbers (generation-numbers profile))) "Return a list of 'menu-entry' for the generations of PROFILE specified by NUMBERS, which is a list of generation numbers." (define (system->boot-parameters system number time) @@ -437,50 +419,63 @@ connection to the store." ;;; (define (switch-to-system-generation store spec) "Switch the system profile to the generation specified by SPEC, and -re-install grub with a grub configuration file that uses the specified system +re-install bootloader with a configuration file that uses the specified system generation as its default entry. STORE is an open connection to the store." (let ((number (relative-generation-spec->number %system-profile spec))) (if number (begin - (reinstall-grub store number) + (reinstall-bootloader store number) (switch-to-generation* %system-profile number)) (leave (_ "cannot switch to system generation '~a'~%") spec)))) -(define (reinstall-grub store number) - "Re-install grub for existing system profile generation NUMBER. STORE is an -open connection to the store." +(define (reinstall-bootloader store number) + "Re-install bootloader for existing system profile generation NUMBER. +STORE is an open connection to the store." (let* ((generation (generation-file-name %system-profile number)) (file (string-append generation "/parameters")) (params (unless-file-not-found (call-with-input-file file read-boot-parameters))) - (root-device (boot-parameters-root-device params)) + (boot-device (boot-parameters-boot-device params)) ;; We don't currently keep track of past menu entries' details. The ;; default values will allow the system to boot, even if they differ ;; from the actual past values for this generation's entry. - (grub-config (grub-configuration (device root-device))) + (boot-config (bootloader-configuration + (inherit (lookup-bootloader-configuration + (boot-parameters-boot-type params))) + (device boot-device))) ;; Make the specified system generation the default entry. - (entries (profile-grub-entries %system-profile (list number))) + (entries (profile-bootloader-entries %system-profile (list number))) (old-generations (delv number (generation-numbers %system-profile))) - (old-entries (profile-grub-entries %system-profile old-generations)) - (grub.cfg (run-with-store store - (grub-configuration-file grub-config - entries - #:old-entries old-entries)))) - (show-what-to-build store (list grub.cfg)) - (build-derivations store (list grub.cfg)) - ;; This is basically the same as install-grub*, but for now we avoid - ;; re-installing the GRUB boot loader itself onto a device, mainly because - ;; we don't in general have access to the same version of the GRUB package - ;; which was used when installing this other system generation. - (let* ((grub.cfg-path (derivation->output-path grub.cfg)) - (gc-root (string-append %gc-roots-directory "/grub.cfg")) - (temp-gc-root (string-append gc-root ".new"))) - (switch-symlinks temp-gc-root grub.cfg-path) - (unless (false-if-exception (install-grub-config grub.cfg-path "/")) - (delete-file temp-gc-root) - (leave (_ "failed to re-install GRUB configuration file: '~a'~%") - grub.cfg-path)) - (rename-file temp-gc-root gc-root)))) + (old-entries (profile-bootloader-entries + %system-profile old-generations))) + (run-with-store store + (mlet* %store-monad + ((bootcfg ((bootloader-configuration-file-generator boot-config) + boot-config entries + #:old-entries old-entries)) + (bootcfg-location -> (bootloader-configuration-file-name + boot-config)) + (bootloader (package->derivation + (bootloader-configuration-bootloader boot-config))) + (target -> "/") + (install-proc + (let ((procedure (bootloader-configuration-installer + boot-config))) + (install-bootloader-derivation + procedure bootloader boot-device target))) + (drvs -> (list bootcfg bootloader install-proc))) + (mbegin %store-monad + (show-what-to-build* drvs) + (built-derivations drvs) + ;; PARAMS file may not contain a suitable BOOT-DEVICE. If BOOT-DEVICE + ;; is #f do not run INSTALL-PROC during bootloader installation. + (install-bootloader (if boot-device + install-proc + #f) + #:bootcfg bootcfg + #:bootcfg-location bootcfg-location + #:device boot-device + #:target target)))))) ;;; -- 2.12.2 From debbugs-submit-bounces@debbugs.gnu.org Mon Apr 17 05:02:23 2017 Received: (at 26339) by debbugs.gnu.org; 17 Apr 2017 09:02:23 +0000 Received: from localhost ([127.0.0.1]:51498 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d02YB-0005PX-2U for submit@debbugs.gnu.org; Mon, 17 Apr 2017 05:02:23 -0400 Received: from mail-wr0-f193.google.com ([209.85.128.193]:33310) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d02Y5-0005Ny-QR for 26339@debbugs.gnu.org; Mon, 17 Apr 2017 05:02:18 -0400 Received: by mail-wr0-f193.google.com with SMTP id l28so19520555wre.0 for <26339@debbugs.gnu.org>; Mon, 17 Apr 2017 02:02:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=P/LJSUGs7Ur5w7y1EZ/Vc3Fqg3P6/8P4c85N8vI1Kj8=; b=R0GkcI8+sPNcxnaGNtVC9iMEAyEfmq948cnOq0UUufUiKt0wfA+gpuAMDDL0AozTU4 nHc/RYINb615c7G7KGOlRqRlEwwDH8cRxbdcoKMS+R7r2UvaBtYRGBq4I6vrq7DKkvCb l2a1mbf023210FXtBLM/P+2mV8/+xfDrrYHysPu2gyDxFkGw5VwbJ5xO/WISk+fF2bIi 2EukAIanqi4Yb3W4GVVzONqV/3wSeXgModqHkruazV61CBfQ+8pVTypHykmFGjl2G2Qq A+2PZkbHLV3qfgQStUB2q0R+OlUsND8kkOvaVynyMODGRkzsruY0i47wBk1um8q270lp 1O1g== 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:date:message-id:in-reply-to :references; bh=P/LJSUGs7Ur5w7y1EZ/Vc3Fqg3P6/8P4c85N8vI1Kj8=; b=i1+n3KxusYJnQYFFzGq6SxB+0dHciP1sRqIQD6/kiYQd9IjtyU73CRLwgb4sFCGh7P haFbms9pEVEH2ABATSms01Bn/S78bVAD0OR5kyHMS7zsgGU84LyhkMlsT14zUCT/Djgk hDmhzBK2WAhLH/nYsxIVckRSSNxoDKWRv4XQjzjcPILPQym0s/zZoneM06/PxacXNW0M to5IkZGT8pLN1ZKZ86WXqWxkeVUC7di/hiTUjbkjkelBYp9cdeytCYGMxVOk1uupsUdm WbFfvhT2ZctO6lqY2frU9JXPKvBmWyICqOZfbGGwOnk8J5mYyrW2RKShUGeUjbbUo9Vt 9cvQ== X-Gm-Message-State: AN3rC/4jM6qW6qwPQWJ5hiBWr285yUfsb8Jf2lLEC9K3ebYP+dkXkon0 x7Zxg9k6Szq28w== X-Received: by 10.223.155.210 with SMTP id e18mr16527122wrc.165.1492419732314; Mon, 17 Apr 2017 02:02:12 -0700 (PDT) Received: from cervin.8.8.8.8 (85-169-37-239.rev.numericable.fr. [85.169.37.239]) by smtp.gmail.com with ESMTPSA id m4sm13484276wrm.4.2017.04.17.02.02.10 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 17 Apr 2017 02:02:11 -0700 (PDT) From: Mathieu Othacehe To: 26339@debbugs.gnu.org Subject: [PATCH v2 12/12] scripts: system: Display bootloader device and type in "list-generations". Date: Mon, 17 Apr 2017 11:01:48 +0200 Message-Id: <20170417090148.13791-13-m.othacehe@gmail.com> X-Mailer: git-send-email 2.12.2 In-Reply-To: <20170417090148.13791-1-m.othacehe@gmail.com> References: <20170417090148.13791-1-m.othacehe@gmail.com> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 26339 Cc: Mathieu Othacehe 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.3 (--) * guix/scripts/system.scm (display-system-generation): Display bootloader device and bootloader type. --- guix/scripts/system.scm | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/guix/scripts/system.scm b/guix/scripts/system.scm index a637f91aa..2ccfbb445 100644 --- a/guix/scripts/system.scm +++ b/guix/scripts/system.scm @@ -534,17 +534,21 @@ list of services." (param-file (string-append generation "/parameters")) (params (call-with-input-file param-file read-boot-parameters)) (label (boot-parameters-label params)) + (boot-type (boot-parameters-boot-type params)) (root (boot-parameters-root-device params)) (root-device (if (bytevector? root) (uuid->string root) root)) + (boot-device (boot-parameters-boot-device params)) (kernel (boot-parameters-kernel params))) (display-generation profile number) (format #t (_ " file name: ~a~%") generation) (format #t (_ " canonical file name: ~a~%") (readlink* generation)) ;; TRANSLATORS: Please preserve the two-space indentation. (format #t (_ " label: ~a~%") label) + (format #t (_ " bootloader type: ~a~%") boot-type) (format #t (_ " root device: ~a~%") root-device) + (format #t (_ " boot device: ~a~%") boot-device) (format #t (_ " kernel: ~a~%") kernel)))) (define* (list-generations pattern #:optional (profile %system-profile)) -- 2.12.2 From debbugs-submit-bounces@debbugs.gnu.org Mon Apr 17 11:54:24 2017 Received: (at 26339) by debbugs.gnu.org; 17 Apr 2017 15:54:24 +0000 Received: from localhost ([127.0.0.1]:52682 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d08yu-0000AE-C6 for submit@debbugs.gnu.org; Mon, 17 Apr 2017 11:54:24 -0400 Received: from dd1012.kasserver.com ([85.13.128.8]:44560) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d08yt-0000A7-G6 for 26339@debbugs.gnu.org; Mon, 17 Apr 2017 11:54:23 -0400 Received: from localhost (178.113.199.173.wireless.dyn.drei.com [178.113.199.173]) by dd1012.kasserver.com (Postfix) with ESMTPSA id B9E491CA023D; Mon, 17 Apr 2017 17:54:20 +0200 (CEST) Date: Mon, 17 Apr 2017 17:54:15 +0200 From: Danny Milosavljevic To: Mathieu Othacehe Subject: Re: bug#26339: [PATCH v2 03/12] scripts: system: Rename --no-grub option to --no-bootloader. Message-ID: <20170417175415.4a7db610@scratchpost.org> In-Reply-To: <20170417090148.13791-4-m.othacehe@gmail.com> References: <20170417090148.13791-1-m.othacehe@gmail.com> <20170417090148.13791-4-m.othacehe@gmail.com> X-Mailer: Claws Mail 3.14.1 (GTK+ 2.24.31; x86_64-unknown-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 26339 Cc: 26339@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.7 (/) Pushed this patch to master as a9eadc06ac57846aaa8fdeb550b32e44f59c9437 (since it's trivial). From debbugs-submit-bounces@debbugs.gnu.org Mon Apr 17 13:08:22 2017 Received: (at 26339) by debbugs.gnu.org; 17 Apr 2017 17:08:22 +0000 Received: from localhost ([127.0.0.1]:52762 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d0A8U-0001up-3z for submit@debbugs.gnu.org; Mon, 17 Apr 2017 13:08:22 -0400 Received: from dd1012.kasserver.com ([85.13.128.8]:55296) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d0A8S-0001ue-7C for 26339@debbugs.gnu.org; Mon, 17 Apr 2017 13:08:20 -0400 Received: from localhost (178.113.199.173.wireless.dyn.drei.com [178.113.199.173]) by dd1012.kasserver.com (Postfix) with ESMTPSA id C73481CA023D; Mon, 17 Apr 2017 19:08:18 +0200 (CEST) Date: Mon, 17 Apr 2017 19:08:14 +0200 From: Danny Milosavljevic To: Mathieu Othacehe Subject: Re: bug#26339: [PATCH v2 01/12] system: Pass to grub. Message-ID: <20170417190814.74a7cb2d@scratchpost.org> In-Reply-To: <20170417090148.13791-2-m.othacehe@gmail.com> References: <20170417090148.13791-1-m.othacehe@gmail.com> <20170417090148.13791-2-m.othacehe@gmail.com> X-Mailer: Claws Mail 3.14.1 (GTK+ 2.24.31; x86_64-unknown-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 26339 Cc: 26339@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.7 (/) LGTM! Note to self: Ascertain that guix adds "--load" entries to put into grub.cfg after that patch is eventually applied. From debbugs-submit-bounces@debbugs.gnu.org Tue Apr 18 04:23:20 2017 Received: (at 26339) by debbugs.gnu.org; 18 Apr 2017 08:23:20 +0000 Received: from localhost ([127.0.0.1]:53403 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d0OPw-0002X6-J8 for submit@debbugs.gnu.org; Tue, 18 Apr 2017 04:23:20 -0400 Received: from eggs.gnu.org ([208.118.235.92]:34383) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d0OPv-0002Wr-41 for 26339@debbugs.gnu.org; Tue, 18 Apr 2017 04:23:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d0OPm-00074J-V5 for 26339@debbugs.gnu.org; Tue, 18 Apr 2017 04:23:14 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=BAYES_20,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:57303) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d0OPm-00074F-RP; Tue, 18 Apr 2017 04:23:10 -0400 Received: from [193.50.110.90] (port=46264 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1d0OPm-00007C-7K; Tue, 18 Apr 2017 04:23:10 -0400 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) To: Mathieu Othacehe Subject: Re: bug#26339: [PATCH 04/18] bootloader: Add install procedures and use them. References: <20170402135242.2958-1-m.othacehe@gmail.com> <20170402135242.2958-4-m.othacehe@gmail.com> <20170415182222.3e1cef0e@scratchpost.org> <8760i5iocd.fsf@gmail.com> <20170416233758.6194c357@scratchpost.org> <87efwr5sh3.fsf@gmail.com> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 29 Germinal an 225 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-unknown-linux-gnu Date: Tue, 18 Apr 2017 10:23:08 +0200 In-Reply-To: <87efwr5sh3.fsf@gmail.com> (Mathieu Othacehe's message of "Mon, 17 Apr 2017 10:49:28 +0200") Message-ID: <878tmyt98z.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 26339 Cc: 26339@debbugs.gnu.org, Danny Milosavljevic 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: -5.0 (-----) Hello, Mathieu Othacehe skribis: >> If we decide that this use case isn't supported, that's fine. Many othe= r distros make the assumption that there's only one bootloader - which is s= ometimes good because you can have another bootloader the distribution does= n't know about (in addition to the one the distribution does know about) th= at supervises all the others. > > Well you're right multiple bootloader may co-exist on multiple > partitions. However I'm not sure how guix would manage more than one > bootloader at a time ? I=E2=80=99d be in favor of sticking with the only-one-bootloader assumption. Maybe we can revisit that later if there=E2=80=99s a need, but for now it s= eems much safer to just stick to that (and not block this patch set.) Thoughts? Thanks, Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Sun Apr 23 04:39:36 2017 Received: (at 26339) by debbugs.gnu.org; 23 Apr 2017 08:39:36 +0000 Received: from localhost ([127.0.0.1]:35100 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d2D3Q-0007aN-2H for submit@debbugs.gnu.org; Sun, 23 Apr 2017 04:39:36 -0400 Received: from dd1012.kasserver.com ([85.13.128.8]:39076) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d2D3O-0007aF-Di for 26339@debbugs.gnu.org; Sun, 23 Apr 2017 04:39:34 -0400 Received: from localhost (77.118.129.111.wireless.dyn.drei.com [77.118.129.111]) by dd1012.kasserver.com (Postfix) with ESMTPSA id EC7E71CA1FE9; Sun, 23 Apr 2017 10:39:31 +0200 (CEST) Date: Sun, 23 Apr 2017 10:39:29 +0200 From: Danny Milosavljevic To: Mathieu Othacehe Subject: Re: bug#26339: [PATCH v2 10/12] scripts: system: Adapt "init" to new bootloader API. Message-ID: <20170423103929.79d0595c@scratchpost.org> In-Reply-To: <20170417090148.13791-11-m.othacehe@gmail.com> References: <20170417090148.13791-1-m.othacehe@gmail.com> <20170417090148.13791-11-m.othacehe@gmail.com> X-Mailer: Claws Mail 3.14.1 (GTK+ 2.24.31; x86_64-unknown-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 26339 Cc: 26339@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.7 (/) > + install-proc bootloader? "installer" instead of "install-proc" ? > + bootcfg bootcfg-location bootloader-configuration ? bootloader-configuration-file-name ? Or is that too verbose ? Hmm... > (mbegin %store-monad > - ;; Copy the closure of GRUB.CFG, which includes OS-DIR, GRUB's > - ;; background image and so on. > - (maybe-copy grub.cfg) > + ;; Copy the closure of BOOTCFG, which includes OS-DIR, > + ;; eventual background image and so on. > + (maybe-copy > + (derivation->output-path bootcfg)) Does derivation->output-path change anything? >+ #:bootloader? bootloader? What about the bootloader? :) "install-bootloader?" ? >+ #:install-proc #:bootloader-installer ? Otherwise LGTM! From debbugs-submit-bounces@debbugs.gnu.org Sun Apr 23 04:54:03 2017 Received: (at 26339) by debbugs.gnu.org; 23 Apr 2017 08:54:03 +0000 Received: from localhost ([127.0.0.1]:35108 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d2DHP-0007uW-JL for submit@debbugs.gnu.org; Sun, 23 Apr 2017 04:54:03 -0400 Received: from dd1012.kasserver.com ([85.13.128.8]:40844) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d2DHN-0007uB-LX for 26339@debbugs.gnu.org; Sun, 23 Apr 2017 04:54:02 -0400 Received: from localhost (77.118.129.111.wireless.dyn.drei.com [77.118.129.111]) by dd1012.kasserver.com (Postfix) with ESMTPSA id 4A6941CA280E; Sun, 23 Apr 2017 10:54:00 +0200 (CEST) Date: Sun, 23 Apr 2017 10:53:58 +0200 From: Danny Milosavljevic To: Mathieu Othacehe Subject: Re: bug#26339: [PATCH v2 10/12] scripts: system: Adapt "init" to new bootloader API. Message-ID: <20170423105358.79b78536@scratchpost.org> In-Reply-To: <20170423103929.79d0595c@scratchpost.org> References: <20170417090148.13791-1-m.othacehe@gmail.com> <20170417090148.13791-11-m.othacehe@gmail.com> <20170423103929.79d0595c@scratchpost.org> X-Mailer: Claws Mail 3.14.1 (GTK+ 2.24.31; x86_64-unknown-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 26339 Cc: 26339@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.7 (/) > bootloader-configuration ? > bootloader-configuration-file-name ? Probably bad idea. bootloader-configuration here is something else, right? Maybe bootloader-configuration-file.drv and bootloader-configuration-file-name ? From debbugs-submit-bounces@debbugs.gnu.org Sun Apr 23 12:34:36 2017 Received: (at 26339) by debbugs.gnu.org; 23 Apr 2017 16:34:36 +0000 Received: from localhost ([127.0.0.1]:36636 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d2KT6-0005nT-CM for submit@debbugs.gnu.org; Sun, 23 Apr 2017 12:34:36 -0400 Received: from mail-wm0-f68.google.com ([74.125.82.68]:36198) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d2KT4-0005nE-6W for 26339@debbugs.gnu.org; Sun, 23 Apr 2017 12:34:34 -0400 Received: by mail-wm0-f68.google.com with SMTP id u65so13053045wmu.3 for <26339@debbugs.gnu.org>; Sun, 23 Apr 2017 09:34:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=references:user-agent:from:to:cc:subject:in-reply-to:date :message-id:mime-version; bh=K+s4Pt1l5UdSonvBqdbUd1dl0AEQswaod2MNO7Rl+wA=; b=NsNLYRFLiMZ8POMf777VkuwY7AIpqVHVn3bV194bVPRxrCYyq6JF3M3k16QE0an8JK RacWQtnuAmLZ4oxeUa5eHCxhZH6d93ufyF7SE3208QBODqIMwKH0nJ0jH2gqYNo56eH1 NZvB6bdyX+lIea4tkNzY+1hs+EoX+G8u4V6eBpjaIgCzmSjk10BWrNeRvDu4Hpno8F01 CX4aaOX7G5meibGqWwEG/ZZSUBXdPy+Qi1aqivz8DrtSlM5KDaFgV5kC6jkJFqCSddrZ SIS6alSU6/kPtDw2/zIdbievU8f9X8NCiI0ZYWAKvnAk9yK65HcLxWuGL0OEvCsv4c17 O6Wg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:references:user-agent:from:to:cc:subject :in-reply-to:date:message-id:mime-version; bh=K+s4Pt1l5UdSonvBqdbUd1dl0AEQswaod2MNO7Rl+wA=; b=T+aA5lLo1tKLe/hAVOa3Bs6tPb4EYKyXLP99TIjWPfAhilctATMwqrsLzv9YeBJn6O ZWVYg/L/t91j+G17pbebjRVWYoK/W0/cF1XZQ8pSyiUlIRRUL9nPd8XhwMug/boal+Pb kcWAHZo8NrflHRld7XczUvk/HaXoqZpqTL/2xTkRYTe2R09TvyMBGkf5km/0fzFztUWu GxZZuJ67MhMRhOmExWdlhJ8C+nQx6mLYaB4pvJ/zomiMw2wIqHCnOqBk28xqk3rEXlkx ySqGCPHM9+E/gtg4m7Lq8c2hoOFwjmLrHbog+7wmGIaR08yXid64h+cYDQouJ+c81vcZ TwTg== X-Gm-Message-State: AN3rC/6/fFRwzCzvxLBajaJVgI82sFRHGZ9SdUjmlVzUoVPznRxR4u2h bxCFHCjG4LYrdmS9 X-Received: by 10.28.166.143 with SMTP id p137mr6734001wme.113.1492965268178; Sun, 23 Apr 2017 09:34:28 -0700 (PDT) Received: from cervin (85-169-37-239.rev.numericable.fr. [85.169.37.239]) by smtp.gmail.com with ESMTPSA id i21sm19197734wrc.50.2017.04.23.09.34.26 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 23 Apr 2017 09:34:26 -0700 (PDT) References: <20170417090148.13791-1-m.othacehe@gmail.com> <20170417090148.13791-11-m.othacehe@gmail.com> <20170423103929.79d0595c@scratchpost.org> User-agent: mu4e 0.9.18; emacs 25.2.1 From: Mathieu Othacehe To: Danny Milosavljevic Subject: Re: bug#26339: [PATCH v2 10/12] scripts: system: Adapt "init" to new bootloader API. In-reply-to: <20170423103929.79d0595c@scratchpost.org> Date: Sun, 23 Apr 2017 18:34:25 +0200 Message-ID: <87h91fdqwe.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 26339 Cc: 26339@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.5 (/) > "installer" instead of "install-proc" ? Ok for "installer". >> + (maybe-copy >> + (derivation->output-path bootcfg)) > > Does derivation->output-path change anything? Well I guess yes, because maybe-copy is expecting a path and not a derivation. > >>+ #:bootloader? bootloader? > > What about the bootloader? :) > > "install-bootloader?" ? Ok for install-bootloader? :) > >>+ #:install-proc > > #:bootloader-installer ? Seems ok to me. > > Otherwise LGTM! Thanks, I'll publish a rebased version, maybe when your own bootloader serie will be pushed ! Mathieu From debbugs-submit-bounces@debbugs.gnu.org Sun Apr 23 12:38:16 2017 Received: (at 26339) by debbugs.gnu.org; 23 Apr 2017 16:38:16 +0000 Received: from localhost ([127.0.0.1]:36647 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d2KWe-0005uV-5K for submit@debbugs.gnu.org; Sun, 23 Apr 2017 12:38:16 -0400 Received: from mail-wm0-f65.google.com ([74.125.82.65]:36257) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d2KWc-0005uC-MP for 26339@debbugs.gnu.org; Sun, 23 Apr 2017 12:38:14 -0400 Received: by mail-wm0-f65.google.com with SMTP id u65so13062495wmu.3 for <26339@debbugs.gnu.org>; Sun, 23 Apr 2017 09:38:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=references:user-agent:from:to:cc:subject:in-reply-to:date :message-id:mime-version; bh=i4OODB2VqxnTe94ypU5eeUOkaQaT+ysdNLhYWUDHESo=; b=VDMdEP/knN8KXgfZRQdg+eh3rWSsrQYLHdSHflFRk+nmeUGheIxp5l5cb1l1n7IPhi wLD2kWBmwx/3zm/9EI0k1AGUSbKgqvIvQ4DSaahHhp3lXQsLJkCEfjyuvd4SFwhTRCQ1 7F9AA5cu5W5Y7JlHksEqj9HOA9746Q3S+F5JLgCPgmaLi/ZrGZFo8shErB/sL1G1nggS 1JtLBa44Td856T29cRszQl8DlaJWgxXT2KBHewz05E3ml7UAWM3ujYLFVhe0nQ98NNe5 JwZWqz20xieOzAuN0aBbFLM1kjUceJdDmNeQXmCHXRv0zyY9zpCP8/ZYK7ovtCEuTp8h gGLg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:references:user-agent:from:to:cc:subject :in-reply-to:date:message-id:mime-version; bh=i4OODB2VqxnTe94ypU5eeUOkaQaT+ysdNLhYWUDHESo=; b=Aot1/o17EhFitJ+mvWXk/n3z+NK2z/pEqy/EAU7Lv+8WTqdoEOtbvsVx6feUu0ZFdI ORuSAkixm8hkgUoK7Bl5NvIbQ28E0+4z0eFlG94Gia527ls459tsY0czi6MU8mPpNTeB pcaxkmn+sL2lnrWo6S922Tf366Ws7xc9xDR5IrYWkkrpjJxuGAJRtEosO9hUsJO9s1as q1YoFRE9jzYNGb9Hs9DabDgeLn1UeEXSQfINBqsTWNBoODZCp6uw0glQ03F8mKXOhqF8 LdwCNK6ZNFtUr4xivdZNGGUEmGL0EuJmCxX2sj2arJLh3gza0I2XTYJY85GEHCIME7Js HakA== X-Gm-Message-State: AN3rC/4WfTQ2ibhy+uyWy35VZOWwE9vuEohGefyKacS9iugLGspdce7A nDUtAZ2rHACWZA== X-Received: by 10.28.45.213 with SMTP id t204mr6399135wmt.35.1492965489124; Sun, 23 Apr 2017 09:38:09 -0700 (PDT) Received: from cervin (85-169-37-239.rev.numericable.fr. [85.169.37.239]) by smtp.gmail.com with ESMTPSA id m83sm9905460wmc.7.2017.04.23.09.38.08 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 23 Apr 2017 09:38:08 -0700 (PDT) References: <20170417090148.13791-1-m.othacehe@gmail.com> <20170417090148.13791-11-m.othacehe@gmail.com> <20170423103929.79d0595c@scratchpost.org> <20170423105358.79b78536@scratchpost.org> User-agent: mu4e 0.9.18; emacs 25.2.1 From: Mathieu Othacehe To: Danny Milosavljevic Subject: Re: bug#26339: [PATCH v2 10/12] scripts: system: Adapt "init" to new bootloader API. In-reply-to: <20170423105358.79b78536@scratchpost.org> Date: Sun, 23 Apr 2017 18:38:07 +0200 Message-ID: <87fugzdqq8.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 26339 Cc: 26339@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.5 (/) > Probably bad idea. bootloader-configuration here is something else, right? Yes it's the record name so it might be confusing :). > > Maybe bootloader-configuration-file.drv and bootloader-configuration-file-name ? Ok I'll rename them. Thanks, Mathieu From debbugs-submit-bounces@debbugs.gnu.org Fri May 05 03:13:13 2017 Received: (at 26339) by debbugs.gnu.org; 5 May 2017 07:13:13 +0000 Received: from localhost ([127.0.0.1]:55289 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d6XQP-0005AS-9Y for submit@debbugs.gnu.org; Fri, 05 May 2017 03:13:13 -0400 Received: from dd1012.kasserver.com ([85.13.128.8]:33314) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d6XQO-0005AL-KL for 26339@debbugs.gnu.org; Fri, 05 May 2017 03:13:12 -0400 Received: from localhost (77.118.251.68.wireless.dyn.drei.com [77.118.251.68]) by dd1012.kasserver.com (Postfix) with ESMTPSA id CBFE51CA0710; Fri, 5 May 2017 09:13:10 +0200 (CEST) Date: Fri, 5 May 2017 09:13:06 +0200 From: Danny Milosavljevic To: Mathieu Othacehe Subject: Re: bug#26339: [PATCH 17/18] scripts: system: Adapt "switch-generation" to new bootloader API. Message-ID: <20170505091306.17e5bdd9@scratchpost.org> In-Reply-To: <8737d9inte.fsf@gmail.com> References: <20170402135242.2958-1-m.othacehe@gmail.com> <20170402135242.2958-17-m.othacehe@gmail.com> <20170415184756.10b178be@scratchpost.org> <8737d9inte.fsf@gmail.com> X-Mailer: Claws Mail 3.14.1 (GTK+ 2.24.31; x86_64-unknown-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 26339 Cc: 26339@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.7 (/) Hi Mathieu, On Sat, 15 Apr 2017 19:27:09 +0200 Mathieu Othacehe wrote: > Yes my idea was to use the boot-type to keep track of the installed > bootloader, for each system generation (and to restore it if needed). Ah, so this is trying to restore the correct bootloader to the correct device, should the user have switched bootloader of the guix system and then switched back. OK! What happens if the user switches to an old generation which doesn't have this new-style parameters file? From debbugs-submit-bounces@debbugs.gnu.org Fri May 05 03:20:39 2017 Received: (at 26339) by debbugs.gnu.org; 5 May 2017 07:20:39 +0000 Received: from localhost ([127.0.0.1]:55311 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d6XXa-0005Mm-R2 for submit@debbugs.gnu.org; Fri, 05 May 2017 03:20:38 -0400 Received: from mail-wm0-f42.google.com ([74.125.82.42]:34420) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d6XXZ-0005MY-4k for 26339@debbugs.gnu.org; Fri, 05 May 2017 03:20:37 -0400 Received: by mail-wm0-f42.google.com with SMTP id u65so987350wmu.1 for <26339@debbugs.gnu.org>; Fri, 05 May 2017 00:20:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=references:user-agent:from:to:cc:subject:in-reply-to:date :message-id:mime-version; bh=fW7OTi1O7yKSd6XH+SlwnPSQpvYFqY/YhetDSnPnQkg=; b=aQJiJW+K7SpihSE9uTgqjPaLE+Z6idviefEdbVLxAPh5ukXMYFxy5CzEOxIq4MbgLm 4Obzvg/XrqOK3tJfqU4CsdgDclgPWlHCzGZz4w2RTXwirfSrWQJRGFMNaULhvrpX3Jti pEV96yk/vx1n6rp1MdjCvCe5QkpTvD2axsvZ8HfPd+pBu+dgmn2/MdNusjiKW5ccPamr dFilTkoOpaPZNEZpXGQ9gsMkz7ckvNarDWi1q/32bhbB/1UFrIWTcQ6JLQpmroyDgiP8 P9WWKigzr5wJFy4NOZRebw0VcZqlJ6XdP3naB97zbLXiDs3YVQtOcSJtW9OaeNI9QlvY Jeww== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:references:user-agent:from:to:cc:subject :in-reply-to:date:message-id:mime-version; bh=fW7OTi1O7yKSd6XH+SlwnPSQpvYFqY/YhetDSnPnQkg=; b=bJTDId69Sgoy8/d867YquFB3MOLJxnbGTAsRaGLQ3MBjSw21vKle28KwVIlnZGn1AM yerWpY9Jnu2HV1UKCO7Uz5e3PwGeE6HcgxdfJWsjStFfzWgsCFOWXSe9xU250viqG8ix 4dlDNVgSHC5zJVYRRXSIiwZuB/CSZaske0+Wjs4mk/mHu0qwGWhn0gjZwY8mmOtWHNoF 07891SmKIv+JrE+1b27Xw6kZtUdXBNBaVp3zMh3RR2cRPol9hIbvSiXvfIUp5xOZVdx3 /e5FR2VzOj1OSaP38gqFwrNikvav2XOrQ5G1BzNP+B4AfrlIbr/SuGhgo+f8fX7VExDz vi3g== X-Gm-Message-State: AN3rC/7lYn5C8G/HEN/C0vl7wWbTaS5oZJhd21HLF1X00VMsU6FuJVag BuejmeggA3FiPQ== X-Received: by 10.28.91.77 with SMTP id p74mr4144420wmb.54.1493968831272; Fri, 05 May 2017 00:20:31 -0700 (PDT) Received: from zbook ([46.218.109.88]) by smtp.gmail.com with ESMTPSA id 8sm4112664wrb.55.2017.05.05.00.20.30 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 05 May 2017 00:20:30 -0700 (PDT) References: <20170402135242.2958-1-m.othacehe@gmail.com> <20170402135242.2958-17-m.othacehe@gmail.com> <20170415184756.10b178be@scratchpost.org> <8737d9inte.fsf@gmail.com> <20170505091306.17e5bdd9@scratchpost.org> User-agent: mu4e 0.9.18; emacs 25.2.1 From: Mathieu Othacehe To: Danny Milosavljevic Subject: Re: bug#26339: [PATCH 17/18] scripts: system: Adapt "switch-generation" to new bootloader API. In-reply-to: <20170505091306.17e5bdd9@scratchpost.org> Date: Fri, 05 May 2017 09:21:04 +0200 Message-ID: <86k25v4vmn.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 26339 Cc: 26339@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.5 (/) Hey Danny ! > Ah, so this is trying to restore the correct bootloader to the correct device, should the user have switched bootloader of the guix system and then switched back. That's it. > What happens if the user switches to an old generation which doesn't have this new-style parameters file? Well, by default the bootloader is assumed to be grub (because grub is the only supported bootloader in pre-rework guix). For the boot-device, it is set to #f if not read in parameter file. During a switch-genereation if boot-device is #f, the configuration is updated, but the bootloader is not reinstalled. It was already what happended before my rework. The bootloader was not reinstalled because we cannot be certain to reinstall the same grub version as the one installed. Mathieu From debbugs-submit-bounces@debbugs.gnu.org Sat May 06 11:42:10 2017 Received: (at 26339) by debbugs.gnu.org; 6 May 2017 15:42:11 +0000 Received: from localhost ([127.0.0.1]:58380 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d71qU-0002Zt-OX for submit@debbugs.gnu.org; Sat, 06 May 2017 11:42:10 -0400 Received: from mail-wm0-f68.google.com ([74.125.82.68]:33656) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d71qP-0002Yr-Ie for 26339@debbugs.gnu.org; Sat, 06 May 2017 11:42:09 -0400 Received: by mail-wm0-f68.google.com with SMTP id y10so6717444wmh.0 for <26339@debbugs.gnu.org>; Sat, 06 May 2017 08:42:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=c1TwyZ040daIqTIsQzTCpBnIgLbmRW8MeVyuLOLyaDk=; b=GuZYN/TLmFwFn+Dq1/apWtu3szW//elbLu3C5XMdQXkuKy/WHX0DGBfjcIXUShy5IW c3/yBPqITCbR4WR7Z5PhUgSDRhrBLzRmg+cJHVCC6cClTjl8VbR5e1vagVQA9Rh9fJjM 14ksA7Wjz1uDepugHm6mOUlygB20woJ1J+DSemGleCvDUfXcMWx/kwb52qU3EH7FIB2s y5ePZdVjX3Mvh6JQvKEG/OrQeVe++n8byBztcly2uG0TX0t2wmtsObgniQcCfcg2BtjG Agc+53LyyylPICmwhHgEpNTzTaL6rCHIuChL7Fo1kbHbo5ueJwhZzBcfsgeHQo+lvz6m VHrw== 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:date:message-id; bh=c1TwyZ040daIqTIsQzTCpBnIgLbmRW8MeVyuLOLyaDk=; b=Ods7J3F6YZnTAwjkfZ4Gn1BrKHs89wpdNtvDpWIqjJvKLU9aL8HG5U4oT45A4vhynn nRtVuJXk7NQpU4qWSvQIo5/sY8NXZPi+Mo4HnzA2VhPP1avOYz92Ud6MALhm0+8qtNoW I8Rtzp51h410aT8chuBwGp5IoYqe2ZDvSyTRQ08X0WcjjTRRai4tKC48YdHNnS/+S6sk Fg17pFLpUBvJyp6lgKRlFwAIl3MATFaGubPsATJAX037cGWOCTwfqVDCc1yKORFSSulG t+PpmYcESC03PaWcTi8cnwXCfqttDONBDO4A7oW/3ltHgp/OVygvKTpX6HP/BhFOnPec 2SSg== X-Gm-Message-State: AN3rC/7vFr0ZWeEGwuk4A7vDx/XDFFFOYEethowLypuRdA1GpfAtmWg2 G17FerK9bkExDw== X-Received: by 10.28.211.9 with SMTP id k9mr7985859wmg.51.1494085319748; Sat, 06 May 2017 08:41:59 -0700 (PDT) Received: from localhost.localdomain (ABayonne-551-1-55-150.w90-11.abo.wanadoo.fr. [90.11.74.150]) by smtp.gmail.com with ESMTPSA id y6sm10484191wrc.51.2017.05.06.08.41.58 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 06 May 2017 08:41:59 -0700 (PDT) From: Mathieu Othacehe To: 26339@debbugs.gnu.org Subject: [PATCH v3 0/9] Support non-grub bootloaders. Date: Sat, 6 May 2017 17:41:45 +0200 Message-Id: <20170506154154.17836-1-m.othacehe@gmail.com> X-Mailer: git-send-email 2.12.2 X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 26339 Cc: Mathieu Othacehe 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.5 (/) Hi, Here is the third version of the serie. Is is rebased on top of Danny recent work on bootloaders. It also take last Danny review into account. Everything seems to play nice and I can change easily between syslinux and grub (s/grub-configuration/syslinux-configuration/ in config.scm). Please note that the documentation still has to be written. Thanks, Mathieu David Craven (1): bootloader: Add install procedures and use them. Mathieu Othacehe (8): system: Add extlinux support. system: Add bootloader type. bootloader: Stop using grub module. bootloader: Add device and type to bootloader-configuration record. scripts: system: Adapt "reconfigure" to new bootloader API. scripts: system: Adapt "init" to new bootloader API. scripts: system: Adapt "switch-generation" to new bootloader API. scripts: system: Display bootloader device and type in "list-generations". gnu.scm | 3 +- gnu/build/install.scm | 36 ++----- gnu/build/vm.scm | 17 ++-- gnu/local.mk | 1 + gnu/system.scm | 33 ++++-- gnu/system/bootloader.scm | 254 ++++++++++++++++++++++++++++++++++++++++++++++ gnu/system/grub.scm | 22 ++-- gnu/system/vm.scm | 37 ++++--- gnu/tests.scm | 3 +- gnu/tests/nfs.scm | 3 +- guix/scripts/system.scm | 232 ++++++++++++++++++++++++++---------------- 11 files changed, 487 insertions(+), 154 deletions(-) create mode 100644 gnu/system/bootloader.scm -- 2.12.2 From debbugs-submit-bounces@debbugs.gnu.org Sat May 06 11:42:11 2017 Received: (at 26339) by debbugs.gnu.org; 6 May 2017 15:42:11 +0000 Received: from localhost ([127.0.0.1]:58382 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d71qU-0002Zv-VQ for submit@debbugs.gnu.org; Sat, 06 May 2017 11:42:11 -0400 Received: from mail-wr0-f172.google.com ([209.85.128.172]:33026) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d71qQ-0002Z1-WE for 26339@debbugs.gnu.org; Sat, 06 May 2017 11:42:09 -0400 Received: by mail-wr0-f172.google.com with SMTP id w50so17471283wrc.0 for <26339@debbugs.gnu.org>; Sat, 06 May 2017 08:42:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=PDGofF7p7v322pq6JdWCqoEbLtNg1/TGpmirluzGiEU=; b=kUPmu/5NHIlxckuqKsIM79t7IYbOppVyBWW7+8S0I61GDmgR+jOZarRwrEOQMN4+/3 IVSeeP0kU10dhTgM50pjRIVm7K46m21gvlGiUz2jvvLZs+GKdTbTTXAlynBl7nPZ4/L0 mrw44agDEkYJ+IMXl+hKjwXkKKxSwLqU/2ShAAPCk0xVh6zTLKqA9sdo83SvEJ8slqC0 gQOmzSeqXlXFKnkMbNtPGgRZdHGNikfCDxWZhbZJNhwxdviobYr0Du2QzF+gWoFuU948 a/+cOLbsd1pP0Ovg5NKCChFqiM3ZJPFySg/MqaVQle0dVDuPXuCh5P5uBJPTBWKRyGTf OGBg== 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:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=PDGofF7p7v322pq6JdWCqoEbLtNg1/TGpmirluzGiEU=; b=hWYhVMtALFW4wRqO3OO5a+sn8RTFMmPG8mCRuOzv56PSuDVyR5RSr3QsnQX2BIIPCs wKfuHjXh7yXxg9ghgL4Ves0H3YTLjfNWGYSp/KGo2DhIvJuYmVxoFGsPNgxD2q8TIiPe tYLUHWrrUPXPH9OWv2ZxXMZolsxHtCSHkz/GFeUkdAmeP5VKev7a+1E/IpuBX591nvwb xpIoM+LpR9er3/m5NHkmhxtmx+vwv+/Ozk7DzKRaKhElZy9yu2bArAjr3l/10tbDJbk5 Y90EtESB+nUsSc22ub9eAGirZRtoh67div8LKboF6bBi7jvm/JkdXL1vWNOwwSlnlhs4 pl1w== X-Gm-Message-State: AN3rC/4vYIZ/gSbniRnrMR1fSx1XuRe5HnTAXZ+rVFQsRQFlaxCUznNO 1ztE5XlojcZ3jQ== X-Received: by 10.223.176.163 with SMTP id i32mr39923430wra.32.1494085321015; Sat, 06 May 2017 08:42:01 -0700 (PDT) Received: from localhost.localdomain (ABayonne-551-1-55-150.w90-11.abo.wanadoo.fr. [90.11.74.150]) by smtp.gmail.com with ESMTPSA id y6sm10484191wrc.51.2017.05.06.08.41.59 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 06 May 2017 08:42:00 -0700 (PDT) From: Mathieu Othacehe To: 26339@debbugs.gnu.org Subject: [PATCH v3 1/9] system: Add extlinux support. Date: Sat, 6 May 2017 17:41:46 +0200 Message-Id: <20170506154154.17836-2-m.othacehe@gmail.com> X-Mailer: git-send-email 2.12.2 In-Reply-To: <20170506154154.17836-1-m.othacehe@gmail.com> References: <20170506154154.17836-1-m.othacehe@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.8 (--) X-Debbugs-Envelope-To: 26339 Cc: Mathieu Othacehe 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.8 (--) * gnu/system.scm (operating-system): Add default bootloader. (operating-system-grub.cfg): Use bootloader-configuration-file-generator. * gnu/system/grub.scm (bootloader-configuration->grub-configuration): New variable. (grub-configuration-file): Use bootloader-configuration->grub-configuration. * guix/scripts/system.scm (profile-grub-entries): Rename system->grub-entry to system->boot-parameters and adjust accordingly. (perform-action): Make bootloader optional. Use bootloader-configuration-device. * gnu/system/bootloader.scm: New file. * gnu/local.mk (GNU_SYSTEM_MODULES): Add it. --- gnu/local.mk | 1 + gnu/system.scm | 11 ++-- gnu/system/bootloader.scm | 161 ++++++++++++++++++++++++++++++++++++++++++++++ gnu/system/grub.scm | 22 ++++--- guix/scripts/system.scm | 19 +++--- 5 files changed, 191 insertions(+), 23 deletions(-) create mode 100644 gnu/system/bootloader.scm diff --git a/gnu/local.mk b/gnu/local.mk index c93dca64c..e2730a466 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -443,6 +443,7 @@ GNU_SYSTEM_MODULES = \ \ %D%/system.scm \ %D%/system/file-systems.scm \ + %D%/system/bootloader.scm \ %D%/system/grub.scm \ %D%/system/install.scm \ %D%/system/linux-container.scm \ diff --git a/gnu/system.scm b/gnu/system.scm index 189a13262..b947d982d 100644 --- a/gnu/system.scm +++ b/gnu/system.scm @@ -48,7 +48,7 @@ #:use-module (gnu services) #:use-module (gnu services shepherd) #:use-module (gnu services base) - #:use-module (gnu system grub) + #:use-module (gnu system bootloader) #:use-module (gnu system shadow) #:use-module (gnu system nss) #:use-module (gnu system locale) @@ -139,8 +139,8 @@ booted from ROOT-DEVICE" (default linux-libre)) (kernel-arguments operating-system-user-kernel-arguments (default '())) ; list of gexps/strings - (bootloader operating-system-bootloader) ; - + (bootloader operating-system-bootloader ; + (default (extlinux-configuration))) (initrd operating-system-initrd ; (list fs) -> M derivation (default base-initrd)) (firmware operating-system-firmware ; list of packages @@ -754,9 +754,8 @@ populate the \"old entries\" menu." (uuid->string (file-system-device root-fs)) (file-system-device root-fs))) (entry (operating-system-boot-parameters os system root-device))) - (grub-configuration-file (operating-system-bootloader os) - (list entry) - #:old-entries old-entries))) + ((bootloader-configuration-file-generator (operating-system-bootloader os)) + (operating-system-bootloader os) (list entry) #:old-entries old-entries))) (define (fs->boot-device fs) "Given FS, a object, return a value suitable for use as the diff --git a/gnu/system/bootloader.scm b/gnu/system/bootloader.scm new file mode 100644 index 000000000..ea067bf73 --- /dev/null +++ b/gnu/system/bootloader.scm @@ -0,0 +1,161 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2017 David Craven +;;; +;;; This file is part of GNU Guix. +;;; +;;; GNU Guix is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or (at +;;; your option) any later version. +;;; +;;; GNU Guix is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with GNU Guix. If not, see . + +(define-module (gnu system bootloader) + #:use-module (gnu system) + #:use-module (gnu system grub) + #:use-module (guix gexp) + #:use-module (guix packages) + #:use-module (guix records) + #:use-module (ice-9 match) + #:export (bootloader-configuration + bootloader-configuration? + bootloader-configuration-bootloader + bootloader-configuration-device + bootloader-configuration-menu-entries + bootloader-configuration-default-entry + bootloader-configuration-timeout + bootloader-configuration-file-generator + bootloader-configuration-file-name + bootloader-configuration-installer + bootloader-configuration-additional-configuration + + extlinux-configuration + grub-configuration + grub-efi-configuration + syslinux-configuration)) + +;;; Commentary: +;;; +;;; Generic configuration for bootloaders. +;;; +;;; Code: + +(define-record-type* + bootloader-configuration make-bootloader-configuration + bootloader-configuration? + (bootloader bootloader-configuration-bootloader ; package + (default #f)) + (device bootloader-configuration-device ; string + (default #f)) + (menu-entries bootloader-configuration-menu-entries ; list of + (default '())) + (default-entry bootloader-configuration-default-entry ; integer + (default 0)) + (timeout bootloader-configuration-timeout ; integer + (default 5)) + (configuration-file-name bootloader-configuration-file-name + (default #f)) + (configuration-file-generator bootloader-configuration-file-generator ; procedure + (default #f)) + (installer bootloader-configuration-installer ; procedure + (default #f)) + (additional-configuration bootloader-configuration-additional-configuration ; record + (default #f))) + + + +;;; +;;; Extlinux configuration file. +;;; + +(define* (extlinux-configuration-file config entries + #:key + (system (%current-system)) + (old-entries '())) + "Return the U-Boot configuration file corresponding to CONFIG, a + object, and where the store is available at STORE-FS, a + object. OLD-ENTRIES is taken to be a list of menu entries +corresponding to old generations of the system." + + (define all-entries + (append entries (bootloader-configuration-menu-entries config))) + + (define (boot-parameters->gexp params) + (let ((label (boot-parameters-label params)) + (kernel (boot-parameters-kernel params)) + (kernel-arguments (boot-parameters-kernel-arguments params)) + (initrd (boot-parameters-initrd params))) + #~(format port "LABEL ~a + MENU LABEL ~a + KERNEL ~a + FDTDIR ~a/lib/dtbs + INITRD ~a + APPEND ~a +~%" + #$label #$label + #$kernel #$kernel #$initrd + (string-join (list #$@kernel-arguments))))) + + (define builder + #~(call-with-output-file #$output + (lambda (port) + (let ((timeout #$(bootloader-configuration-timeout config))) + (format port " +UI menu.c32 +PROMPT ~a +TIMEOUT ~a~%" + (if (> timeout 0) 1 0) + ;; timeout is expressed in 1/10s of seconds. + (* 10 timeout)) + #$@(map boot-parameters->gexp all-entries) + + #$@(if (pair? old-entries) + #~((format port "~%") + #$@(map boot-parameters->gexp old-entries) + (format port "~%")) + #~()))))) + + (gexp->derivation "extlinux.conf" builder)) + + + + +;;; +;;; Bootloader configurations. +;;; + +(define* (extlinux-configuration #:optional (config (bootloader-configuration))) + (bootloader-configuration + (inherit config) + (configuration-file-name "/boot/extlinux/extlinux.conf") + (configuration-file-generator extlinux-configuration-file))) + +(define* (grub-configuration #:optional (config (bootloader-configuration))) + (bootloader-configuration + (inherit config) + (bootloader (@ (gnu packages bootloaders) grub)) + (configuration-file-name "/boot/grub/grub.cfg") + (configuration-file-generator grub-configuration-file) + (installer install-grub) + (additional-configuration + (let ((additional-config (bootloader-configuration-additional-configuration config))) + (if additional-config additional-config %default-theme))))) + +(define* (grub-efi-configuration #:optional (config (bootloader-configuration))) + (bootloader-configuration + (inherit (grub-configuration config)) + (bootloader (@ (gnu packages bootloaders) grub-efi)))) + +(define* (syslinux-configuration #:optional (config (bootloader-configuration))) + (bootloader-configuration + (inherit (extlinux-configuration config)) + (bootloader (@ (gnu packages bootloaders) syslinux)) + (installer install-syslinux))) + +;;; bootloader.scm ends here diff --git a/gnu/system/grub.scm b/gnu/system/grub.scm index d2fa984ec..b06336cec 100644 --- a/gnu/system/grub.scm +++ b/gnu/system/grub.scm @@ -27,6 +27,7 @@ #:use-module (guix download) #:use-module (gnu artwork) #:use-module (gnu system) + #:use-module (gnu system bootloader) #:use-module (gnu system file-systems) #:autoload (gnu packages bootloaders) (grub) #:autoload (gnu packages compression) (gzip) @@ -49,14 +50,6 @@ %background-image %default-theme - grub-configuration - grub-configuration? - grub-configuration-device - grub-configuration-grub - - menu-entry - menu-entry? - grub-configuration-file)) ;;; Commentary: @@ -277,7 +270,16 @@ code." (linux-arguments (boot-parameters-kernel-arguments conf)) (initrd (boot-parameters-initrd conf)))) -(define* (grub-configuration-file config entries +(define (bootloader-configuration->grub-configuration config) + (grub-configuration + (grub (bootloader-configuration-bootloader config)) + (device (bootloader-configuration-device config)) + (menu-entries (bootloader-configuration-menu-entries config)) + (default-entry (bootloader-configuration-default-entry config)) + (timeout (bootloader-configuration-timeout config)) + (theme (bootloader-configuration-additional-configuration config)))) + +(define* (grub-configuration-file bootloader-config entries #:key (system (%current-system)) (old-entries '())) @@ -285,6 +287,8 @@ code." object, and where the store is available at STORE-FS, a object. OLD-ENTRIES is taken to be a list of menu entries corresponding to old generations of the system." + (define config (bootloader-configuration->grub-configuration bootloader-config)) + (define all-entries (append (map boot-parameters->menu-entry entries) (grub-configuration-menu-entries config))) diff --git a/guix/scripts/system.scm b/guix/scripts/system.scm index 2872bcae6..b96836576 100644 --- a/guix/scripts/system.scm +++ b/guix/scripts/system.scm @@ -38,10 +38,10 @@ #:use-module (guix build utils) #:use-module (gnu build install) #:use-module (gnu system) + #:use-module (gnu system bootloader) #:use-module (gnu system file-systems) #:use-module (gnu system linux-container) #:use-module (gnu system vm) - #:use-module (gnu system grub) #:use-module (gnu services) #:use-module (gnu services shepherd) #:use-module (gnu services herd) @@ -598,8 +598,11 @@ output when building a system derivation, such as a disk image." #:image-size image-size #:full-boot? full-boot? #:mappings mappings)) - (grub (package->derivation (grub-configuration-grub - (operating-system-bootloader os)))) + (bootloader (let ((bootloader (bootloader-configuration-bootloader + (operating-system-bootloader os)))) + (if bootloader + (package->derivation bootloader) + (return #f)))) (grub.cfg (if (eq? 'container action) (return #f) (operating-system-bootcfg os @@ -611,8 +614,8 @@ output when building a system derivation, such as a disk image." ;; --no-grub is passed, because GRUB.CFG because we then use it as a GC ;; root. See . (drvs -> (if (memq action '(init reconfigure)) - (if bootloader? - (list sys grub.cfg grub) + (if (and bootloader? bootloader) + (list sys grub.cfg bootloader) (list sys grub.cfg)) (list sys))) (% (if derivations-only? @@ -628,8 +631,8 @@ output when building a system derivation, such as a disk image." drvs) ;; Make sure GRUB is accessible. - (when bootloader? - (let ((prefix (derivation->output-path grub))) + (when (and bootloader? bootloader) + (let ((prefix (derivation->output-path bootloader))) (setenv "PATH" (string-append prefix "/bin:" prefix "/sbin:" (getenv "PATH"))))) @@ -832,7 +835,7 @@ resulting from command-line parsing." ((first second) second) (_ #f))) (device (and bootloader? - (grub-configuration-device + (bootloader-configuration-device (operating-system-bootloader os))))) (with-store store -- 2.12.2 From debbugs-submit-bounces@debbugs.gnu.org Sat May 06 11:42:11 2017 Received: (at 26339) by debbugs.gnu.org; 6 May 2017 15:42:11 +0000 Received: from localhost ([127.0.0.1]:58385 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d71qV-0002a3-IB for submit@debbugs.gnu.org; Sat, 06 May 2017 11:42:11 -0400 Received: from mail-wr0-f180.google.com ([209.85.128.180]:35739) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d71qT-0002ZF-7e for 26339@debbugs.gnu.org; Sat, 06 May 2017 11:42:09 -0400 Received: by mail-wr0-f180.google.com with SMTP id z52so17426705wrc.2 for <26339@debbugs.gnu.org>; Sat, 06 May 2017 08:42:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=j63hZO0AMPtGh+6hHl/nZwauB7pbotF2+jCHzNpcD1M=; b=dPQSaH3MYTgIGN4JX0A62KvJveS6ZHATlXU1XQ96aysKfJzrSbZ3MqH6d398apb1xp Hr21RCnuJFH2QvtGVaUyJxMHGCl3hgiFvmw/AADZ7uiBkSXbnsnF5Mqy1LA4WDHc1Eb7 Pd9N/HfCNYDYkbOTfPTPvKOtHZjSmamx5BGTQpbAu6MqkwoWtdGuUOcthMWXvi56llKv LHdaQBbcPSQHRzcb6iITIe0pvLDplqPF0gGfg+hQfYJP69HXHjmNKjGtCktyQJSsmGax lU0azePZcGMe5jA3PX8dIJF2XCo/6yPoeqHXKU3tJFTj/GpD4kLCtwvLVeWcmPkkelpY l9KQ== 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:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=j63hZO0AMPtGh+6hHl/nZwauB7pbotF2+jCHzNpcD1M=; b=MfgoPzKByRKuRMIzNb+ATfjQhX/EeWjwm/OsMqelex5TbKOGB7N/Lq3r19RXC8dCNk e03kZMs7w0ZVAzNkClE2gL2QWGXDWbD+Mc6tNrKVu/exzJyWDYnu20DaRCXaKlzX5JRm WkSOttO4+OQnYZYBfCaaQZsSuXyNy0qb8u+eWg/6dyg94sh17jZqJWsM188+VQPrvSxQ 1FjcBg3ETIiOsw30e3eUVcS9mlGmSBmUtAfF/UWgTfGhtDChauBAVgLIEWNqxtxSHMJ/ 1x1AA01UjiIjPIM7ZviaTQTb7WMwam5bGZnFwQsVN+/X+H9vuJZ23sLNlLy5/uJOCQ5z McKg== X-Gm-Message-State: AN3rC/7oRd2YbBWMLrLsGVhh3opJ2Dzp5gnMXPrqj1gQFqv62KlvOFgx cxcXFPhlCQXPD3G3 X-Received: by 10.223.154.226 with SMTP id a89mr36065199wrc.192.1494085323311; Sat, 06 May 2017 08:42:03 -0700 (PDT) Received: from localhost.localdomain (ABayonne-551-1-55-150.w90-11.abo.wanadoo.fr. [90.11.74.150]) by smtp.gmail.com with ESMTPSA id y6sm10484191wrc.51.2017.05.06.08.42.02 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 06 May 2017 08:42:02 -0700 (PDT) From: Mathieu Othacehe To: 26339@debbugs.gnu.org Subject: [PATCH v3 3/9] system: Add bootloader type. Date: Sat, 6 May 2017 17:41:48 +0200 Message-Id: <20170506154154.17836-4-m.othacehe@gmail.com> X-Mailer: git-send-email 2.12.2 In-Reply-To: <20170506154154.17836-1-m.othacehe@gmail.com> References: <20170506154154.17836-1-m.othacehe@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.8 (--) X-Debbugs-Envelope-To: 26339 Cc: Mathieu Othacehe 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.8 (--) * gnu/system/bootloader.scm ()[type]: New field. (%extlinux-configuration, %grub-configuration, %grub-efi-configuration, %syslinux-configuration): New exported variables. (extlinux-configuration, grub-configuration, grub-efi-configuration, syslinux-configuration): New exported compatibility macros. --- gnu/system/bootloader.scm | 119 ++++++++++++++++++++++++++++++++-------------- 1 file changed, 83 insertions(+), 36 deletions(-) diff --git a/gnu/system/bootloader.scm b/gnu/system/bootloader.scm index fddf038b8..bab6cfab3 100644 --- a/gnu/system/bootloader.scm +++ b/gnu/system/bootloader.scm @@ -1,5 +1,6 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2017 David Craven +;;; Copyright © 2017 Mathieu Othacehe ;;; ;;; This file is part of GNU Guix. ;;; @@ -22,10 +23,12 @@ #:use-module (guix gexp) #:use-module (guix packages) #:use-module (guix records) + #:use-module (srfi srfi-1) #:use-module (ice-9 match) #:export (bootloader-configuration bootloader-configuration? bootloader-configuration-bootloader + bootloader-configuration-type bootloader-configuration-device bootloader-configuration-menu-entries bootloader-configuration-default-entry @@ -35,6 +38,13 @@ bootloader-configuration-installer bootloader-configuration-additional-configuration + %extlinux-configuration + %grub-configuration + %grub-efi-configuration + %syslinux-configuration + + lookup-bootloader-configuration + extlinux-configuration grub-configuration grub-efi-configuration @@ -54,6 +64,8 @@ bootloader-configuration? (bootloader bootloader-configuration-bootloader ; package (default #f)) + (type bootloader-configuration-type + (default #f)) ; symbol (device bootloader-configuration-device ; string (default #f)) (menu-entries bootloader-configuration-menu-entries ; list of @@ -126,43 +138,7 @@ TIMEOUT ~a~%" (gexp->derivation "extlinux.conf" builder)) - - - -;;; -;;; Bootloader configurations. -;;; - -(define* (extlinux-configuration #:optional (config (bootloader-configuration))) - (bootloader-configuration - (inherit config) - (configuration-file-name "/boot/extlinux/extlinux.conf") - (configuration-file-generator extlinux-configuration-file))) - -(define* (grub-configuration #:optional (config (bootloader-configuration))) - (bootloader-configuration - (inherit config) - (bootloader (@ (gnu packages bootloaders) grub)) - (configuration-file-name "/boot/grub/grub.cfg") - (configuration-file-generator grub-configuration-file) - (installer install-grub) - (additional-configuration - (let ((additional-config (bootloader-configuration-additional-configuration config))) - (if additional-config additional-config %default-theme))))) - -(define* (grub-efi-configuration #:optional (config (bootloader-configuration))) - (bootloader-configuration - (inherit (grub-configuration config)) - (bootloader (@ (gnu packages bootloaders) grub-efi)))) - -(define* (syslinux-configuration #:optional (config (bootloader-configuration))) - (bootloader-configuration - (inherit (extlinux-configuration config)) - (bootloader (@ (gnu packages bootloaders) syslinux)) - (installer install-syslinux))) - - ;;; ;;; Bootloader install procedures. ;;; @@ -204,4 +180,75 @@ TIMEOUT ~a~%" (#$dd 440 1 (string-append syslinux-dir "/mbr.bin") device)) (error "failed to install SYSLINUX"))))) + +;;; +;;; Bootloader configurations. +;;; + +(define* %extlinux-configuration + (bootloader-configuration + (type 'extlinux) + (configuration-file-name "/boot/extlinux/extlinux.conf") + (configuration-file-generator extlinux-configuration-file))) + +(define* %grub-configuration + (bootloader-configuration + (type 'grub) + (bootloader (@ (gnu packages bootloaders) grub)) + (configuration-file-name "/boot/grub/grub.cfg") + (configuration-file-generator grub-configuration-file) + (installer install-grub) + (additional-configuration %default-theme))) + +(define* %grub-efi-configuration + (bootloader-configuration + (inherit %grub-configuration) + (type 'grub-efi) + (bootloader (@ (gnu packages bootloaders) grub-efi)))) + +(define* %syslinux-configuration + (bootloader-configuration + (inherit %extlinux-configuration) + (type 'syslinux) + (bootloader (@ (gnu packages bootloaders) syslinux)) + (installer install-syslinux))) + +(define %bootloader-configurations + (list %extlinux-configuration + %grub-configuration + %grub-efi-configuration + %syslinux-configuration)) + +(define (lookup-bootloader-configuration type) + (or (find (lambda (conf) + (eq? (bootloader-configuration-type conf) + type)) + %bootloader-configurations) + (error "~a: unknown bootloader type" type))) + + +;;; +;;; Compatibility macros. +;;; + +(define-syntax-rule (extlinux-configuration fields ...) + (bootloader-configuration + (inherit %extlinux-configuration) + fields ...)) + +(define-syntax-rule (grub-configuration fields ...) + (bootloader-configuration + (inherit %grub-configuration) + fields ...)) + +(define-syntax-rule (grub-efi-configuration fields ...) + (bootloader-configuration + (inherit %grub-efi-configuration) + fields ...)) + +(define-syntax-rule (syslinux-configuration fields ...) + (bootloader-configuration + (inherit %syslinux-configuration) + fields ...)) + ;;; bootloader.scm ends here -- 2.12.2 From debbugs-submit-bounces@debbugs.gnu.org Sat May 06 11:42:14 2017 Received: (at 26339) by debbugs.gnu.org; 6 May 2017 15:42:14 +0000 Received: from localhost ([127.0.0.1]:58387 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d71qW-0002aL-VB for submit@debbugs.gnu.org; Sat, 06 May 2017 11:42:14 -0400 Received: from mail-wr0-f195.google.com ([209.85.128.195]:36661) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d71qS-0002ZD-3o for 26339@debbugs.gnu.org; Sat, 06 May 2017 11:42:09 -0400 Received: by mail-wr0-f195.google.com with SMTP id v42so3303949wrc.3 for <26339@debbugs.gnu.org>; Sat, 06 May 2017 08:42:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=EkD7AsYzR9RcrM7rDu/7kZwaLyBGRPdbLHOOSE7aN/g=; b=KxwtDzsULVSp6s7dUo29kIJ3avdN+obBRYqzbPLfaL5yPpDro69Y4nvI6NxIWGMeQt SGR4+ZD2af9DJMyYlx4Cg0LQkzhkMR9BbcNkNrUTJj8OalKJMo1UCe9QlZ/ouOg0vnOZ qa3kmoXFGmzJSMVeUoZpm7pw1VDiDjbXlosrNg39YhJjyIiv8qEbfNr1ehrmD2U8xCiw oYSombrnPEbIwMDXFPQNS6Do6ordEN2io1W6EiRv3Z+RDaNKqocIJpv+GFfkwWmkajQR /522uIzsFdcus36X4Puq1cYF08ztJNQBErQbU4byyCY8hehjXH6uSypSlitQQYvcT2LY vaMA== 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:date:message-id:in-reply-to :references; bh=EkD7AsYzR9RcrM7rDu/7kZwaLyBGRPdbLHOOSE7aN/g=; b=jrpjaBdGfnSUDsiTAJzTDr6rPaUvOBa1/9A3gW/KA45C5EMkeoIdffWYETcdyEvXGq Q1ax8QDDvXTWmEp/fFcSijIGsexd2jPPPySO+AIPzUt9okaPAEiWtbbXp8f1fIuaZsmu zMoH9cXoZGVUlR7hSE0pQ9cE0f2uBW0VxB7E3iJPmuP6gMSVOCJuWo4wLmTQ+fPcFET9 1Ra9J8g4ZYSrsTpM8LL1tQO2+PdVY530363Mm7R3R8R7HYU6isbdG/zpcBbOOjZxJVNj TMR0SSs9aBlQiyUuADaCgrxzTguEXGw5GINzhqSCgO0UjjoNSJQHA9pSOG5ST4NSopqJ vMng== X-Gm-Message-State: AN3rC/4xwX2UVFB6njBxkwaOLOWiRmY0BxS0Adet+s5GkKAW0yqO1l+J syxTwOn3EhK83CB1 X-Received: by 10.223.130.15 with SMTP id 15mr39195559wrb.59.1494085322162; Sat, 06 May 2017 08:42:02 -0700 (PDT) Received: from localhost.localdomain (ABayonne-551-1-55-150.w90-11.abo.wanadoo.fr. [90.11.74.150]) by smtp.gmail.com with ESMTPSA id y6sm10484191wrc.51.2017.05.06.08.42.01 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 06 May 2017 08:42:01 -0700 (PDT) From: Mathieu Othacehe To: 26339@debbugs.gnu.org Subject: [PATCH v3 2/9] bootloader: Add install procedures and use them. Date: Sat, 6 May 2017 17:41:47 +0200 Message-Id: <20170506154154.17836-3-m.othacehe@gmail.com> X-Mailer: git-send-email 2.12.2 In-Reply-To: <20170506154154.17836-1-m.othacehe@gmail.com> References: <20170506154154.17836-1-m.othacehe@gmail.com> X-Spam-Score: -2.8 (--) X-Debbugs-Envelope-To: 26339 Cc: David Craven 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.8 (--) From: David Craven * gnu/system/bootloader.scm (dd, install-grub, install-syslinux): New procedures. * gnu/build/install.scm (install-boot-config): New procedure. (install-grub): Move to (gnu system bootloader). * gnu/build/vm.scm (register-bootcfg-root): Rename register-grub.cfg-root and adjust accordingly. (initialize-hard-disk): Takes a bootloader, bootcfg, bootcfg-location and bootloader-installer procedure. Adjust accordingly. * gnu/system/vm.scm (qemu-image): Adjust to initialize-hard-disk. (system-disk-image, system-qemu-image, system-qemu-image/shared-store): Adjust to qemu-image. --- gnu/build/install.scm | 36 ++++++++--------------------------- gnu/build/vm.scm | 17 +++++++++++------ gnu/system/bootloader.scm | 48 ++++++++++++++++++++++++++++++++++++++++++++++- gnu/system/vm.scm | 37 ++++++++++++++++++++++++------------ 4 files changed, 91 insertions(+), 47 deletions(-) diff --git a/gnu/build/install.scm b/gnu/build/install.scm index 5cb6055a0..9e30c0d23 100644 --- a/gnu/build/install.scm +++ b/gnu/build/install.scm @@ -22,8 +22,7 @@ #:use-module (guix build store-copy) #:use-module (srfi srfi-26) #:use-module (ice-9 match) - #:export (install-grub - install-grub-config + #:export (install-boot-config evaluate-populate-directive populate-root-file-system reset-timestamps @@ -39,36 +38,17 @@ ;;; ;;; Code: -(define (install-grub grub.cfg device mount-point) - "Install GRUB with GRUB.CFG on DEVICE, which is assumed to be mounted on -MOUNT-POINT. - -Note that the caller must make sure that GRUB.CFG is registered as a GC root -so that the fonts, background images, etc. referred to by GRUB.CFG are not -GC'd." - (install-grub-config grub.cfg mount-point) - - ;; Tell 'grub-install' that there might be a LUKS-encrypted /boot or root - ;; partition. - (setenv "GRUB_ENABLE_CRYPTODISK" "y") - - (unless (zero? (system* "grub-install" "--no-floppy" - "--boot-directory" - (string-append mount-point "/boot") - device)) - (error "failed to install GRUB"))) - -(define (install-grub-config grub.cfg mount-point) - "Atomically copy GRUB.CFG into boot/grub/grub.cfg on the MOUNT-POINT. Note -that the caller must make sure that GRUB.CFG is registered as a GC root so -that the fonts, background images, etc. referred to by GRUB.CFG are not GC'd." - (let* ((target (string-append mount-point "/boot/grub/grub.cfg")) +(define (install-boot-config bootcfg bootcfg-location mount-point) + "Atomically copy BOOTCFG into BOOTCFG-LOCATION on the MOUNT-POINT. Note +that the caller must make sure that BOOTCFG is registered as a GC root so +that the fonts, background images, etc. referred to by BOOTCFG are not GC'd." + (let* ((target (string-append mount-point bootcfg-location)) (pivot (string-append target ".new"))) (mkdir-p (dirname target)) - ;; Copy GRUB.CFG instead of just symlinking it, because symlinks won't + ;; Copy BOOTCFG instead of just symlinking it, because symlinks won't ;; work when /boot is on a separate partition. Do that atomically. - (copy-file grub.cfg pivot) + (copy-file bootcfg pivot) (rename-file pivot target))) (define (evaluate-populate-directive directive target) diff --git a/gnu/build/vm.scm b/gnu/build/vm.scm index 1eb9a4c45..440596a40 100644 --- a/gnu/build/vm.scm +++ b/gnu/build/vm.scm @@ -285,15 +285,18 @@ SYSTEM-DIRECTORY is the name of the directory of the 'system' derivation." (unless register-closures? (reset-timestamps target)))) -(define (register-grub.cfg-root target bootcfg) +(define (register-bootcfg-root target bootcfg) "On file system TARGET, register BOOTCFG as a GC root." (let ((directory (string-append target "/var/guix/gcroots"))) (mkdir-p directory) - (symlink bootcfg (string-append directory "/grub.cfg")))) + (symlink bootcfg (string-append directory "/bootcfg")))) (define* (initialize-hard-disk device #:key - grub.cfg + bootloader + bootcfg + bootcfg-location + bootloader-installer (partitions '())) "Initialize DEVICE as a disk containing all the objects listed in PARTITIONS, and using BOOTCFG as its bootloader configuration file. @@ -311,10 +314,12 @@ passing it a directory name where it is mounted." (display "mounting root partition...\n") (mkdir-p target) (mount (partition-device root) target (partition-file-system root)) - (install-grub grub.cfg device target) + (install-boot-config bootcfg bootcfg-location target) + (when bootloader-installer + (bootloader-installer bootloader device target)) - ;; Register GRUB.CFG as a GC root. - (register-grub.cfg-root target grub.cfg) + ;; Register BOOTCFG as a GC root. + (register-bootcfg-root target bootcfg) (umount target))) diff --git a/gnu/system/bootloader.scm b/gnu/system/bootloader.scm index ea067bf73..fddf038b8 100644 --- a/gnu/system/bootloader.scm +++ b/gnu/system/bootloader.scm @@ -38,7 +38,10 @@ extlinux-configuration grub-configuration grub-efi-configuration - syslinux-configuration)) + syslinux-configuration + + install-grub + install-syslinux)) ;;; Commentary: ;;; @@ -158,4 +161,47 @@ TIMEOUT ~a~%" (bootloader (@ (gnu packages bootloaders) syslinux)) (installer install-syslinux))) + + +;;; +;;; Bootloader install procedures. +;;; + +(define dd + #~(lambda (bs count if of) + (zero? (system* "dd" + (string-append "bs=" (number->string bs)) + (string-append "count=" (number->string count)) + (string-append "if=" if) + (string-append "of=" of))))) + +(define install-grub + #~(lambda (bootloader device mount-point) + ;; Install GRUB on DEVICE which is mounted at MOUNT-POINT. + (let ((grub (string-append bootloader "/sbin/grub-install")) + (install-dir (string-append mount-point "/boot"))) + ;; Tell 'grub-install' that there might be a LUKS-encrypted /boot or + ;; root partition. + (setenv "GRUB_ENABLE_CRYPTODISK" "y") + + (unless (zero? (system* grub "--no-floppy" + "--boot-directory" install-dir + device)) + (error "failed to install GRUB"))))) + +(define install-syslinux + #~(lambda (bootloader device mount-point) + (let ((extlinux (string-append bootloader "/sbin/extlinux")) + (install-dir (string-append mount-point "/boot/extlinux")) + (syslinux-dir (string-append bootloader "/share/syslinux"))) + (mkdir-p install-dir) + (for-each (lambda (file) + (copy-file file + (string-append install-dir "/" (basename file)))) + (find-files syslinux-dir "\\.c32$")) + + (unless (and (zero? (system* extlinux "--install" install-dir)) + (#$dd 440 1 (string-append syslinux-dir "/mbr.bin") device)) + (error "failed to install SYSLINUX"))))) + ;;; bootloader.scm ends here diff --git a/gnu/system/vm.scm b/gnu/system/vm.scm index 2c8b954c8..cc13abe2a 100644 --- a/gnu/system/vm.scm +++ b/gnu/system/vm.scm @@ -46,10 +46,10 @@ #:select (%guile-static-stripped)) #:use-module (gnu packages admin) + #:use-module (gnu system bootloader) #:use-module (gnu system shadow) #:use-module (gnu system pam) #:use-module (gnu system linux-initrd) - #:use-module (gnu system grub) #:use-module (gnu system file-systems) #:use-module (gnu system) #:use-module (gnu services) @@ -176,8 +176,9 @@ made available under the /xchg CIFS share." (disk-image-format "qcow2") (file-system-type "ext4") file-system-label - os-derivation - grub-configuration + os.drv + bootcfg.drv + bootloader-configuration (register-closures? #t) (inputs '()) copy-inputs?) @@ -201,7 +202,7 @@ the image." (guix build utils)) (let ((inputs - '#$(append (list qemu parted grub e2fsprogs) + '#$(append (list qemu parted e2fsprogs) (map canonical-package (list sed grep coreutils findutils gawk)) (if register-closures? (list guix) '()))) @@ -223,7 +224,7 @@ the image." #:closures graphs #:copy-closures? #$copy-inputs? #:register-closures? #$register-closures? - #:system-directory #$os-derivation)) + #:system-directory #$os.drv)) (partitions (list (partition (size #$(- disk-image-size (* 10 (expt 2 20)))) @@ -233,7 +234,16 @@ the image." (initializer initialize))))) (initialize-hard-disk "/dev/vda" #:partitions partitions - #:grub.cfg #$grub-configuration) + #:bootloader + #$(bootloader-configuration-bootloader + bootloader-configuration) + #:bootcfg #$bootcfg.drv + #:bootcfg-location + #$(bootloader-configuration-file-name + bootloader-configuration) + #:bootloader-installer + #$(bootloader-configuration-installer + bootloader-configuration)) (reboot))))) #:system system #:make-disk-image? #t @@ -287,8 +297,9 @@ to USB sticks meant to be read-only." (mlet* %store-monad ((os-drv (operating-system-derivation os)) (bootcfg (operating-system-bootcfg os))) (qemu-image #:name name - #:os-derivation os-drv - #:grub-configuration bootcfg + #:os.drv os-drv + #:bootcfg.drv bootcfg + #:bootloader-configuration (operating-system-bootloader os) #:disk-image-size disk-image-size #:disk-image-format "raw" #:file-system-type file-system-type @@ -330,8 +341,9 @@ of the GNU system as described by OS." (mlet* %store-monad ((os-drv (operating-system-derivation os)) (bootcfg (operating-system-bootcfg os))) - (qemu-image #:os-derivation os-drv - #:grub-configuration bootcfg + (qemu-image #:os.drv os-drv + #:bootcfg.drv bootcfg + #:bootloader-configuration (operating-system-bootloader os) #:disk-image-size disk-image-size #:file-system-type file-system-type #:inputs `(("system" ,os-drv) @@ -429,8 +441,9 @@ bootloader refers to: OS kernel, initrd, bootloader data, etc." ;; BOOTCFG and all its dependencies, including the output of OS-DRV. ;; This is more than needed (we only need the kernel, initrd, GRUB for its ;; font, and the background image), but it's hard to filter that. - (qemu-image #:os-derivation os-drv - #:grub-configuration bootcfg + (qemu-image #:os.drv os-drv + #:bootcfg.drv bootcfg + #:bootloader-configuration (operating-system-bootloader os) #:disk-image-size disk-image-size #:inputs (if full-boot? `(("bootcfg" ,bootcfg)) -- 2.12.2 From debbugs-submit-bounces@debbugs.gnu.org Sat May 06 11:42:14 2017 Received: (at 26339) by debbugs.gnu.org; 6 May 2017 15:42:14 +0000 Received: from localhost ([127.0.0.1]:58391 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d71qY-0002aU-4e for submit@debbugs.gnu.org; Sat, 06 May 2017 11:42:14 -0400 Received: from mail-wr0-f172.google.com ([209.85.128.172]:34074) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d71qU-0002ZH-7a for 26339@debbugs.gnu.org; Sat, 06 May 2017 11:42:10 -0400 Received: by mail-wr0-f172.google.com with SMTP id l9so17421205wre.1 for <26339@debbugs.gnu.org>; Sat, 06 May 2017 08:42:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=22AOBo5gTk2xHVdZsrTCTK+8bT2FUmFrAg7HIYOPzN8=; b=SRComP2+ZdT3qFaDxftnkz2dOndufSlnaKKG3yrNW2TBQhrBlYhCMey2sWoon8+LYi QUX/5mf5KBxXHkFUVOPJ0KwBCA41nkqWjG4JwhuxUx6V2uLmwWVci5dtdwucuD5rop8D wveTWz0TaUlWyZmNVcJdwTGQJdB39veUTDWIGgzgMigFCr0ZZm7S8Z2Gp6CggP1tUpnu YRSH/+UwgydxrFCxtyzBOnFAtCwig2JpLY6BEHJJC2cusij1kSvcnUk9KaukX1NLnIGh hypgQ7yq1w1vmw0V72PLwtbsUSQQaBo8zHwoLE2njBVOX7ZSCxbKAt4ZNK0jXVSSN3vI qecg== 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:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=22AOBo5gTk2xHVdZsrTCTK+8bT2FUmFrAg7HIYOPzN8=; b=roWCTtTxPCNzZ3bJaQBhaXMt9z/H4SFQsKD5xnmA6rbgkXZGxJPGSb0dOvGLlUV3Xn BA90fR15DL+8AGLro5KZbJdD9KqUyn5uMyM7gpoaELwREvPaB1venlWyqfs/6IPooCvj PHVcDtjiy1XWqEAG1tC9ehlMjOw9pDUatVhChrrpVeVkIm+SCIBeZcEffNnieTlJTHr3 z+Kd+9XehvNdx71dBarj1EgyRQcPehgwPJ5bHxpIdQt8r60b/BoyuizXCH5wNIYSzX9G A+mWl2g2MR0TQeArPkDMA3e9vRlshi9qn9twnIVl6SUNZ/3kLYgNywWQxiVSrFlWiF0Y MnuA== X-Gm-Message-State: AN3rC/6t1O6uvTdxsVXd/hH0+q5T0O3Tn5+Aq07vQujpV0cI1f6SWW/k kLCM5Xi3sXASQwPn X-Received: by 10.223.155.134 with SMTP id d6mr38331465wrc.157.1494085324578; Sat, 06 May 2017 08:42:04 -0700 (PDT) Received: from localhost.localdomain (ABayonne-551-1-55-150.w90-11.abo.wanadoo.fr. [90.11.74.150]) by smtp.gmail.com with ESMTPSA id y6sm10484191wrc.51.2017.05.06.08.42.03 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 06 May 2017 08:42:03 -0700 (PDT) From: Mathieu Othacehe To: 26339@debbugs.gnu.org Subject: [PATCH v3 4/9] bootloader: Stop using grub module. Date: Sat, 6 May 2017 17:41:49 +0200 Message-Id: <20170506154154.17836-5-m.othacehe@gmail.com> X-Mailer: git-send-email 2.12.2 In-Reply-To: <20170506154154.17836-1-m.othacehe@gmail.com> References: <20170506154154.17836-1-m.othacehe@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.8 (--) X-Debbugs-Envelope-To: 26339 Cc: Mathieu Othacehe 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.8 (--) * gnu.scm (%public-modules): Replace grub by bootloader. * gnu/tests.scm (define-module): Ditto. * gnu/tests/nfs.scm (define-module): Ditto. --- gnu.scm | 3 ++- gnu/tests.scm | 3 ++- gnu/tests/nfs.scm | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/gnu.scm b/gnu.scm index 932e4cdd5..56b84b74d 100644 --- a/gnu.scm +++ b/gnu.scm @@ -1,6 +1,7 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2014, 2015, 2016 Ludovic Courtès ;;; Copyright © 2015 Joshua S. Grant +;;; Copyright © 2017 Mathieu Othacehe ;;; ;;; This file is part of GNU Guix. ;;; @@ -34,7 +35,7 @@ '((gnu system) (gnu system mapped-devices) (gnu system file-systems) - (gnu system grub) ; 'grub-configuration' + (gnu system bootloader) (gnu system pam) (gnu system shadow) ; 'user-account' (gnu system linux-initrd) diff --git a/gnu/tests.scm b/gnu/tests.scm index 810711ab9..d162f441f 100644 --- a/gnu/tests.scm +++ b/gnu/tests.scm @@ -1,5 +1,6 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2016, 2017 Ludovic Courtès +;;; Copyright © 2017 Mathieu Othacehe ;;; ;;; This file is part of GNU Guix. ;;; @@ -21,7 +22,7 @@ #:use-module (guix utils) #:use-module (guix records) #:use-module (gnu system) - #:use-module (gnu system grub) + #:use-module (gnu system bootloader) #:use-module (gnu system file-systems) #:use-module (gnu system shadow) #:use-module (gnu services) diff --git a/gnu/tests/nfs.scm b/gnu/tests/nfs.scm index 1f28f5a5b..432fc83a1 100644 --- a/gnu/tests/nfs.scm +++ b/gnu/tests/nfs.scm @@ -1,6 +1,7 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2016 Ludovic Courtès ;;; Copyright © 2016 John Darrington +;;; Copyright © 2017 Mathieu Othacehe ;;; ;;; This file is part of GNU Guix. ;;; @@ -20,7 +21,7 @@ (define-module (gnu tests nfs) #:use-module (gnu tests) #:use-module (gnu system) - #:use-module (gnu system grub) + #:use-module (gnu system bootloader) #:use-module (gnu system file-systems) #:use-module (gnu system shadow) #:use-module (gnu system vm) -- 2.12.2 From debbugs-submit-bounces@debbugs.gnu.org Sat May 06 11:42:14 2017 Received: (at 26339) by debbugs.gnu.org; 6 May 2017 15:42:14 +0000 Received: from localhost ([127.0.0.1]:58393 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d71qY-0002ab-E0 for submit@debbugs.gnu.org; Sat, 06 May 2017 11:42:14 -0400 Received: from mail-wr0-f193.google.com ([209.85.128.193]:34293) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d71qV-0002ZJ-88 for 26339@debbugs.gnu.org; Sat, 06 May 2017 11:42:11 -0400 Received: by mail-wr0-f193.google.com with SMTP id 6so3311981wrb.1 for <26339@debbugs.gnu.org>; Sat, 06 May 2017 08:42:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=1kehBCXXq6Xz/kb8puRNs6wSbXuDtoWJ1EvQFXsNA/c=; b=sMzXogkyelcw4MErwgHrRCU/pA/AJkEMq1UBPGZn6O//QwMeZ04ZZ3ZFo6GvvE1MoV Rj4vB8Arean8UdY8nSLJ66dlOrqTiN8EYduPIKz6dITopGc5yd3oKyd2yGoI0ptb/Cqp d72KKQOvpOPEUK1MCkQt8Ik/MUieesPGRFg5uqNpQtjY/adCnK/pgO+ZRLVaW4uAMJRd JekLGSQ1nOroU4iSMeiPjhgOJY7F+zCGds+07fTnrhSvDBMcAMNOnZI9W3xerzK6C/iG w7B5VJxNIqcnIyL2teLAJjSZ9iSSxfVrCTPmm2alT0l+9OLhuR6tXqCumLrlyEPI9WkP 3wtw== 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:date:message-id:in-reply-to :references; bh=1kehBCXXq6Xz/kb8puRNs6wSbXuDtoWJ1EvQFXsNA/c=; b=noMEOQ0vIWnzDyMOp521uHX9wOP7fXgOC40hNYiHwiH/nyLnqsAE48jDRkkypg4ZC0 CA5AdagljC+BfgKAluzM821uR2ANHPNhHGqyuEWD8n8Q9Dby4b+Po9+9VkOs78eHRICt aS+HWcCU5XiakSz/tNvrr2Y6NDfN0xMd3632jToThSBOBVgfFLJY3+XB4l96ULOztyhA Fqh/iNGznhYs5i8/qz3UNQzaoM9QhJ0bfUBZQaYQXaA+5XUz+FuraWyXB9VDFJqkoFn7 wzZA+KKPnY6gid11VtraBjPDTC62qk/Lj6E3MUKx2KD/5j8cU1sPW3qmDpL6qf2Tgnd9 iHOQ== X-Gm-Message-State: AN3rC/6m14g8A1D8ojwYAi4xBwt8psp3/WAsi/UwBP2NltVLmMJv8mJR nYQdVvo+2qB8fQ== X-Received: by 10.223.139.72 with SMTP id v8mr26799522wra.13.1494085325614; Sat, 06 May 2017 08:42:05 -0700 (PDT) Received: from localhost.localdomain (ABayonne-551-1-55-150.w90-11.abo.wanadoo.fr. [90.11.74.150]) by smtp.gmail.com with ESMTPSA id y6sm10484191wrc.51.2017.05.06.08.42.04 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 06 May 2017 08:42:04 -0700 (PDT) From: Mathieu Othacehe To: 26339@debbugs.gnu.org Subject: [PATCH v3 5/9] bootloader: Add device and type to bootloader-configuration record. Date: Sat, 6 May 2017 17:41:50 +0200 Message-Id: <20170506154154.17836-6-m.othacehe@gmail.com> X-Mailer: git-send-email 2.12.2 In-Reply-To: <20170506154154.17836-1-m.othacehe@gmail.com> References: <20170506154154.17836-1-m.othacehe@gmail.com> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 26339 Cc: Mathieu Othacehe 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.3 (--) * gnu/system.scm ()[device, type]: New fields. (boot-parameters-boot-device): New exported procedure. (boot-parameters-boot-type): Ditto. (operating-system-grub.cfg): Add new fields. (operating-system-parameters-file): Add new fields and replace GRUB by bootloader in doctype. (read-boot-parameters): Ditto. --- gnu/system.scm | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/gnu/system.scm b/gnu/system.scm index b947d982d..6d4cbf737 100644 --- a/gnu/system.scm +++ b/gnu/system.scm @@ -104,6 +104,8 @@ boot-parameters? boot-parameters-label boot-parameters-root-device + boot-parameters-boot-device + boot-parameters-boot-type boot-parameters-store-device boot-parameters-store-mount-point boot-parameters-kernel @@ -772,6 +774,10 @@ kernel arguments for that derivation to ." (mlet* %store-monad ((initrd (operating-system-initrd-file os)) (store -> (operating-system-store-file-system os)) + (boot-device -> (bootloader-configuration-device + (operating-system-bootloader os))) + (boot-type -> (bootloader-configuration-type + (operating-system-bootloader os))) (label -> (kernel->boot-label (operating-system-kernel os)))) (return (boot-parameters (label label) @@ -782,6 +788,8 @@ kernel arguments for that derivation to ." (operating-system-kernel-arguments os system.drv root-device) (operating-system-user-kernel-arguments os))) (initrd initrd) + (boot-device boot-device) + (boot-type boot-type) (store-device (fs->boot-device store)) (store-mount-point (file-system-mount-point store)))))) @@ -807,6 +815,8 @@ being stored into the \"parameters\" file)." (kernel-arguments #$(boot-parameters-kernel-arguments params)) (initrd #$(boot-parameters-initrd params)) + (boot-device #$(boot-parameters-boot-device params)) + (boot-type #$(boot-parameters-boot-type params)) (store (device #$(boot-parameters-store-device params)) (mount-point #$(boot-parameters-store-mount-point params)))) @@ -828,6 +838,8 @@ being stored into the \"parameters\" file)." ;; exactly to the device field of the object representing the ;; OS's root file system, so it might be a device path like "/dev/sda3". (root-device boot-parameters-root-device) + (boot-device boot-parameters-boot-device) + (boot-type boot-parameters-boot-type) (store-device boot-parameters-store-device) (store-mount-point boot-parameters-store-mount-point) (kernel boot-parameters-kernel) @@ -846,6 +858,16 @@ being stored into the \"parameters\" file)." (label label) (root-device root) + (boot-device + (match (assq 'boot-device rest) + ((_ args) args) + (#f #f))) ; for compatibility reasons. + + (boot-type + (match (assq 'boot-type rest) + ((_ args) args) + (#f 'grub))) ; for compatibility reasons. + ;; In the past, we would store the directory name of the kernel instead ;; of the absolute file name of its image. Detect that and correct it. (kernel (if (string=? linux (direct-store-path linux)) -- 2.12.2 From debbugs-submit-bounces@debbugs.gnu.org Sat May 06 11:42:17 2017 Received: (at 26339) by debbugs.gnu.org; 6 May 2017 15:42:17 +0000 Received: from localhost ([127.0.0.1]:58401 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d71qb-0002bE-Gg for submit@debbugs.gnu.org; Sat, 06 May 2017 11:42:17 -0400 Received: from mail-wm0-f65.google.com ([74.125.82.65]:34643) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d71qY-0002Zb-T3 for 26339@debbugs.gnu.org; Sat, 06 May 2017 11:42:15 -0400 Received: by mail-wm0-f65.google.com with SMTP id z129so6718091wmb.1 for <26339@debbugs.gnu.org>; Sat, 06 May 2017 08:42:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=HjHP4SXYJSSuDQyv0ea6umvyBoudhwbaqnGL0sZ/Hm0=; b=dF8SMgENcOBZywlE3pkuBPNWqCqM7fAdiu3zW7WqSk275HjTtrELnkRRGfw7C4cvcJ Eb+ge5H+HeunFGJTtfjI5j8m8///lLl0/NnbZZ+hUoOa4GPlf6AQbVmHd5gP/igQLCz7 0Wgg8F7rO6EwgFUdsvrgmyJ60s6o3Onw5HiTdFlF4Z0MeNEFjSICr6pbkGqEr6aG2UU4 UFb60twp19PoQr29lJcZl9jimS5vaZb4apLaZWdbMSBRzcUDN8F2OrO+rL4jRainp0ba 8A4Cqdyec3H5gPjG1rZsU87Km18aSI9JfJWyfGHDjkHbZCZ9l8/cW682AMlrg2ku26/b gFcw== 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:date:message-id:in-reply-to :references; bh=HjHP4SXYJSSuDQyv0ea6umvyBoudhwbaqnGL0sZ/Hm0=; b=Y7aGFT3WtKrnM9QZNhpJ4w/tQJdx/nWen7FfvtmYCLBUJrChBcFdET5JGGlAIQiINP fnScrlYBUsb0H9zrqs22xhfHtw7Eng0eCjZJQ02b6eL3PGpGAD8Arr9xzTAtNyEg0Thr D4qF0ZcW6ieAB08vcoiqfP8jtHDdInY7/on6dPFFCz52WlDzCo08qNGHng8kVOEM2k+t YQXEt/NUL/7ZxTjCDgD39ikXsIy7MEc02hJRLKlprc8r481Ya5ng63wLXMwSZrcLQPGa 9GkE8QGgFvq73Kx9g3oN3dgpTCqtpNGcUy7MMlRq4YmLuV9UoFvHHQ8glIDJiIINfsk/ sFBw== X-Gm-Message-State: AODbwcDA54NGTOkidRtaZ1pFdoLr+RgaR5oOC9y3BJnzpDKg55XXVSk4 y7OAKxJiUX3Vr1+f X-Received: by 10.28.72.68 with SMTP id v65mr5635139wma.41.1494085328994; Sat, 06 May 2017 08:42:08 -0700 (PDT) Received: from localhost.localdomain (ABayonne-551-1-55-150.w90-11.abo.wanadoo.fr. [90.11.74.150]) by smtp.gmail.com with ESMTPSA id y6sm10484191wrc.51.2017.05.06.08.42.08 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 06 May 2017 08:42:08 -0700 (PDT) From: Mathieu Othacehe To: 26339@debbugs.gnu.org Subject: [PATCH v3 8/9] scripts: system: Adapt "switch-generation" to new bootloader API. Date: Sat, 6 May 2017 17:41:53 +0200 Message-Id: <20170506154154.17836-9-m.othacehe@gmail.com> X-Mailer: git-send-email 2.12.2 In-Reply-To: <20170506154154.17836-1-m.othacehe@gmail.com> References: <20170506154154.17836-1-m.othacehe@gmail.com> X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 26339 Cc: Mathieu Othacehe 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.5 (/) * guix/scripts/system.scm (reinstall-grub): Rename to reinstall-bootloader. Read boot-device and boot-type from parameters file to be able to restore the correct bootloader on specified device. Factorize bootloader installation code by calling install-bootloader. (switch-to-system-generation): Adapt. --- guix/scripts/system.scm | 67 +++++++++++++++++++++++++++++-------------------- 1 file changed, 40 insertions(+), 27 deletions(-) diff --git a/guix/scripts/system.scm b/guix/scripts/system.scm index b3e2d7b72..adab1cedb 100644 --- a/guix/scripts/system.scm +++ b/guix/scripts/system.scm @@ -412,49 +412,62 @@ connection to the store." ;;; (define (switch-to-system-generation store spec) "Switch the system profile to the generation specified by SPEC, and -re-install grub with a grub configuration file that uses the specified system +re-install bootloader with a configuration file that uses the specified system generation as its default entry. STORE is an open connection to the store." (let ((number (relative-generation-spec->number %system-profile spec))) (if number (begin - (reinstall-grub store number) + (reinstall-bootloader store number) (switch-to-generation* %system-profile number)) (leave (G_ "cannot switch to system generation '~a'~%") spec)))) -(define (reinstall-grub store number) - "Re-install grub for existing system profile generation NUMBER. STORE is an -open connection to the store." +(define (reinstall-bootloader store number) + "Re-install bootloader for existing system profile generation NUMBER. +STORE is an open connection to the store." (let* ((generation (generation-file-name %system-profile number)) (params (unless-file-not-found (read-boot-parameters-file generation))) - (root-device (boot-parameters-root-device params)) + (boot-device (boot-parameters-boot-device params)) ;; We don't currently keep track of past menu entries' details. The ;; default values will allow the system to boot, even if they differ ;; from the actual past values for this generation's entry. - (grub-config (grub-configuration (device root-device))) + (boot-config (bootloader-configuration + (inherit (lookup-bootloader-configuration + (boot-parameters-boot-type params))) + (device boot-device))) ;; Make the specified system generation the default entry. (entries (profile-boot-parameters %system-profile (list number))) (old-generations (delv number (generation-numbers %system-profile))) - (old-entries (profile-boot-parameters %system-profile old-generations)) - (grub.cfg (run-with-store store - (grub-configuration-file grub-config - entries - #:old-entries old-entries)))) - (show-what-to-build store (list grub.cfg)) - (build-derivations store (list grub.cfg)) - ;; This is basically the same as install-grub*, but for now we avoid - ;; re-installing the GRUB boot loader itself onto a device, mainly because - ;; we don't in general have access to the same version of the GRUB package - ;; which was used when installing this other system generation. - (let* ((grub.cfg-path (derivation->output-path grub.cfg)) - (gc-root (string-append %gc-roots-directory "/grub.cfg")) - (temp-gc-root (string-append gc-root ".new"))) - (switch-symlinks temp-gc-root grub.cfg-path) - (unless (false-if-exception (install-grub-config grub.cfg-path "/")) - (delete-file temp-gc-root) - (leave (G_ "failed to re-install GRUB configuration file: '~a'~%") - grub.cfg-path)) - (rename-file temp-gc-root gc-root)))) + (old-entries (profile-boot-parameters + %system-profile old-generations))) + (run-with-store store + (mlet* %store-monad + ((bootcfg ((bootloader-configuration-file-generator boot-config) + boot-config entries + #:old-entries old-entries)) + (bootcfg-location -> (bootloader-configuration-file-name + boot-config)) + (bootloader (package->derivation + (bootloader-configuration-bootloader boot-config))) + (target -> "/") + (install-proc + (let ((procedure (bootloader-configuration-installer + boot-config))) + (install-bootloader-derivation + procedure bootloader boot-device target))) + (drvs -> (list bootcfg bootloader install-proc))) + (mbegin %store-monad + (show-what-to-build* drvs) + (built-derivations drvs) + ;; PARAMS file may not contain a suitable BOOT-DEVICE. If BOOT-DEVICE + ;; is #f do not run INSTALL-PROC during bootloader installation. + (install-bootloader (if boot-device + install-proc + #f) + #:bootcfg bootcfg + #:bootcfg-location bootcfg-location + #:device boot-device + #:target target)))))) ;;; -- 2.12.2 From debbugs-submit-bounces@debbugs.gnu.org Sat May 06 11:42:17 2017 Received: (at 26339) by debbugs.gnu.org; 6 May 2017 15:42:17 +0000 Received: from localhost ([127.0.0.1]:58397 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d71qa-0002b4-PO for submit@debbugs.gnu.org; Sat, 06 May 2017 11:42:17 -0400 Received: from mail-wm0-f68.google.com ([74.125.82.68]:34601) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d71qW-0002ZL-JV for 26339@debbugs.gnu.org; Sat, 06 May 2017 11:42:13 -0400 Received: by mail-wm0-f68.google.com with SMTP id z129so6717920wmb.1 for <26339@debbugs.gnu.org>; Sat, 06 May 2017 08:42:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=kA9SPWjNYyxM3xOU1SU5sdsDpB9+XaVNOAAulhqpSFs=; b=fxUpDyhuLDJjIr2FTo3xqvJ+KlIOdvmiRkJWGYQKPgxhcvrIEcl76eexFI3vec2mAl AZ1/RGimhn0yywfpZYU4Pm7kcYSQy2YRwlDlZ81EdkxeSMjs5AW6tAgvglvZTpagovnP djgg0DSQ9YvsLjQSxdPXHQumFIeat+19dL7VD8+iLKtdxSqzEy7GNKymFDpQRGwbbxgM JbgBN7ixwKTRQ1kJnOM7hFsOifQ5DpYqBp+4Fgk5OFJHt+9FEvPdw0WTQjnmpe5qWNeq 5UR1peNsupjjrdfgyO87VOQJ1vNvI3UnPnVHR4Fo23CzRfD2mpEdPvfx0caUV1OBRZm3 dWQw== 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:date:message-id:in-reply-to :references; bh=kA9SPWjNYyxM3xOU1SU5sdsDpB9+XaVNOAAulhqpSFs=; b=dwokrVt9wovcb4BuImEZTKs6aFgJf81R+Pb10CoEP/wUGIFBFrC2tnpDqGGiCnEkg7 vgORM7qelO4rm0r0Z453VrKKyD4wvC97LMd57mF71eAPHgrnZeal3TlTSZEr2zry5YQO ULfDkx5ML35y9kUlAXm70R3kwIW+IeOG6FEtWCB7BPQciATyRkSv2NBXQFByywjNddwP OWvD0iavHIxaA9s2PD2Y/X5p1j/k9nsbKBU7rJDDffU05+NDs9rp+Fvhb3eLMea3YQVS PHX1vKn1ka1/zFZ3LCiQCv1WBNFy5taFSGRHsCMsbWxaTg0fYO4Bdsh3QsACg32HjqNp ZSxw== X-Gm-Message-State: AN3rC/6uwzIBpHIzvYYf313WbjWjnyJTb6Vq2eNQMC7RjUfG8pgw58Mx R8prZtoY/YGDPA== X-Received: by 10.28.24.8 with SMTP id 8mr7902047wmy.23.1494085326862; Sat, 06 May 2017 08:42:06 -0700 (PDT) Received: from localhost.localdomain (ABayonne-551-1-55-150.w90-11.abo.wanadoo.fr. [90.11.74.150]) by smtp.gmail.com with ESMTPSA id y6sm10484191wrc.51.2017.05.06.08.42.05 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 06 May 2017 08:42:06 -0700 (PDT) From: Mathieu Othacehe To: 26339@debbugs.gnu.org Subject: [PATCH v3 6/9] scripts: system: Adapt "reconfigure" to new bootloader API. Date: Sat, 6 May 2017 17:41:51 +0200 Message-Id: <20170506154154.17836-7-m.othacehe@gmail.com> X-Mailer: git-send-email 2.12.2 In-Reply-To: <20170506154154.17836-1-m.othacehe@gmail.com> References: <20170506154154.17836-1-m.othacehe@gmail.com> X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 26339 Cc: Mathieu Othacehe 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.5 (/) * guix/scripts/system.scm (install-grub*): Rename to install-bootloader. Use keys to pass arguments. Pass a new argument, "install-procedure" which is a script in store dealing with bootloader-specific install actions. Also call "install-boot-config" to install the bootloader config file. (install-bootloader-derivation): New procedure. It returns a derivation that builds a file containing "install-procedure" gexp. (perform-action): Build install-proc derivation and call install-bootloader with the resulting file. Stop adding GRUB to PATH as bootloaders are called in install-proc with direct store paths. --- guix/scripts/system.scm | 112 +++++++++++++++++++++++++++++------------------- 1 file changed, 67 insertions(+), 45 deletions(-) diff --git a/guix/scripts/system.scm b/guix/scripts/system.scm index b96836576..0a066853a 100644 --- a/guix/scripts/system.scm +++ b/guix/scripts/system.scm @@ -147,27 +147,34 @@ TARGET, and register them." (map (cut copy-item <> target #:log-port log-port) to-copy)))) -(define (install-grub* grub.cfg device target) - "This is a variant of 'install-grub' with error handling, lifted in -%STORE-MONAD" - (let* ((gc-root (string-append target %gc-roots-directory - "/grub.cfg")) - (temp-gc-root (string-append gc-root ".new")) - (delete-file (lift1 delete-file %store-monad)) - (make-symlink (lift2 switch-symlinks %store-monad)) - (rename (lift2 rename-file %store-monad))) - (mbegin %store-monad - ;; Prepare the symlink to GRUB.CFG to make sure that it's a GC root when - ;; 'install-grub' completes (being a bit paranoid.) - (make-symlink temp-gc-root grub.cfg) - - (munless (false-if-exception (install-grub grub.cfg device target)) +(define* (install-bootloader install-procedure + #:key + bootcfg bootcfg-location + device target) + "Call INSTALL-PROCEDURE with error handling, in %STORE-MONAD." + (with-monad %store-monad + (let* ((gc-root (string-append target %gc-roots-directory + "/bootcfg")) + (temp-gc-root (string-append gc-root ".new")) + (install (and install-procedure + (derivation->output-path install-procedure))) + (bootcfg (derivation->output-path bootcfg))) + ;; Prepare the symlink to bootloader config file to make sure that it's + ;; a GC root when 'install-procedure' completes (being a bit paranoid.) + (switch-symlinks temp-gc-root bootcfg) + + (unless (false-if-exception + (begin + (install-boot-config bootcfg bootcfg-location target) + (when install + (save-load-path-excursion (primitive-load install))))) (delete-file temp-gc-root) - (leave (G_ "failed to install GRUB on device '~a'~%") device)) + (leave (G_ "failed to install bootloader on device ~a '~a'~%") install device)) - ;; Register GRUB.CFG as a GC root so that its dependencies (background - ;; image, font, etc.) are not reclaimed. - (rename temp-gc-root gc-root)))) + ;; Register bootloader config file as a GC root so that its dependencies + ;; (background image, font, etc.) are not reclaimed. + (rename-file temp-gc-root gc-root) + (return #t)))) (define* (install os-drv target #:key (log-port (current-output-port)) @@ -570,17 +577,28 @@ PATTERN, a string. When PATTERN is #f, display all the system generations." (warning (G_ "Consider running 'guix pull' before 'reconfigure'.~%")) (warning (G_ "Failing to do that may downgrade your system!~%")))) +(define (install-bootloader-derivation install-procedure + bootloader device target) + (with-monad %store-monad + (gexp->file "install-bootloader" + (with-imported-modules '((guix build utils)) + #~(begin + (use-modules (guix build utils)) + (#$install-procedure #$bootloader + #$device + #$target)))))) + (define* (perform-action action os #:key bootloader? dry-run? derivations-only? use-substitutes? device target image-size full-boot? (mappings '()) (gc-root #f)) - "Perform ACTION for OS. GRUB? specifies whether to install GRUB; DEVICE is -the target devices for GRUB; TARGET is the target root directory; IMAGE-SIZE -is the size of the image to be built, for the 'vm-image' and 'disk-image' -actions. FULL-BOOT? is used for the 'vm' action; it determines whether to -boot directly to the kernel or to the bootloader. + "Perform ACTION for OS. BOOTLOADER? specifies whether to install +bootloader; DEVICE is the target devices for bootloader; TARGET is the target +root directory; IMAGE-SIZE is the size of the image to be built, for the +'vm-image' and 'disk-image' actions. FULL-BOOT? is used for the 'vm' action; +it determines whether to boot directly to the kernel or to the bootloader. When DERIVATIONS-ONLY? is true, print the derivation file name(s) without building anything. @@ -603,20 +621,28 @@ output when building a system derivation, such as a disk image." (if bootloader (package->derivation bootloader) (return #f)))) - (grub.cfg (if (eq? 'container action) - (return #f) - (operating-system-bootcfg os - (if (eq? 'init action) - '() - (profile-boot-parameters))))) - - ;; For 'init' and 'reconfigure', always build GRUB.CFG, even if - ;; --no-grub is passed, because GRUB.CFG because we then use it as a GC - ;; root. See . + (bootcfg (if (eq? 'container action) + (return #f) + (operating-system-bootcfg + os + (if (eq? 'init action) + '() + (profile-boot-parameters))))) + (bootcfg-location -> (bootloader-configuration-file-name + (operating-system-bootloader os))) + (install-proc + (let ((procedure (bootloader-configuration-installer + (operating-system-bootloader os))) + (target (or target "/"))) + (install-bootloader-derivation procedure bootloader device target))) + + ;; For 'init' and 'reconfigure', always build BOOTCFG, even if + ;; --no-bootloader is passed, because we then use it as a GC root. + ;; See . (drvs -> (if (memq action '(init reconfigure)) (if (and bootloader? bootloader) - (list sys grub.cfg bootloader) - (list sys grub.cfg)) + (list sys bootcfg bootloader install-proc) + (list sys bootcfg)) (list sys))) (% (if derivations-only? (return (for-each (compose println derivation-file-name) @@ -630,20 +656,16 @@ output when building a system derivation, such as a disk image." (for-each (compose println derivation->output-path) drvs) - ;; Make sure GRUB is accessible. - (when (and bootloader? bootloader) - (let ((prefix (derivation->output-path bootloader))) - (setenv "PATH" - (string-append prefix "/bin:" prefix "/sbin:" - (getenv "PATH"))))) - (case action ((reconfigure) (mbegin %store-monad (switch-to-system os) (mwhen bootloader? - (install-grub* (derivation->output-path grub.cfg) - device "/")))) + (install-bootloader install-proc + #:bootcfg bootcfg + #:bootcfg-location bootcfg-location + #:device device + #:target "/")))) ((init) (newline) (format #t (G_ "initializing operating system under '~a'...~%") -- 2.12.2 From debbugs-submit-bounces@debbugs.gnu.org Sat May 06 11:42:17 2017 Received: (at 26339) by debbugs.gnu.org; 6 May 2017 15:42:17 +0000 Received: from localhost ([127.0.0.1]:58399 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d71qb-0002b7-5p for submit@debbugs.gnu.org; Sat, 06 May 2017 11:42:17 -0400 Received: from mail-wm0-f66.google.com ([74.125.82.66]:34622) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d71qX-0002ZO-ST for 26339@debbugs.gnu.org; Sat, 06 May 2017 11:42:14 -0400 Received: by mail-wm0-f66.google.com with SMTP id z129so6718036wmb.1 for <26339@debbugs.gnu.org>; Sat, 06 May 2017 08:42:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=VWo83W3tREOYI2USmwAvceyX4DsXydyIltzdee6YgiA=; b=P8Jr5uVtLKusJZ3gnKm4e2faOsOysATi7GO+hc9+ds+x0fwAP2G5GFh+kh7DYvFbR7 WO+SpTfBZRsdt4BXYoSRyKS+wMdJoGCQdlAuKszhCUhb3KBecBrK1hBoAr8s6jIkCKb3 9Trvng3Q26PZpK7chMosai+EkC4LzUbCoLwwTdP2uvftdRs8TroF1bq+X/LYa4K4n3f9 PdoHZShmHg1cP8TNqb3MGzoXh0O/wVi/Sp8JDSqsMZBHo4p2/N4MINOn2FsiczCuTxzS af2woPhKWuP1Yqnzc/8Q7ZCvPa7eubxW62DOnGBPP1mVaxDgXARdQsLUUg+7QHO0iY2V ZMlw== 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:date:message-id:in-reply-to :references; bh=VWo83W3tREOYI2USmwAvceyX4DsXydyIltzdee6YgiA=; b=YyfY6XExqZKRPgsJr6okhboCDRY4SGLhwnHJTOzZwz45+n2+X+9p7NqxFVekLVq2c5 3qPf9pM2HRUeA03+6NA1wKW7RTaZXYDfPK+lTURohmb/jtVWJnQvCGZrJ44Psm1hHRuH JVx7/PsCKR4hHoBNRlfzC7jVY8mw4BE9zENybBAWLc/kh11GIjQo5oAXARZvvhG7Y5bG gF+6KAQdsCED2RfFRk9JbNfftJoSJdIiBskzIqgE4SE+et1w6mA55llcqcl0zGKV65qZ Llss4JA2Wc7Xe1mTKoMGHNw70/DEdCTR0ICql5DJ7zWGMPJvQ4fxbhcaqm5crPLP7WyG s11g== X-Gm-Message-State: AN3rC/5PTDuW5JVdKFsd87ml4fiMLaf/ZsGEbsQB6AyALvWt65Jahgwl a93rOJilmc/JWDqn X-Received: by 10.28.26.82 with SMTP id a79mr8646653wma.119.1494085327952; Sat, 06 May 2017 08:42:07 -0700 (PDT) Received: from localhost.localdomain (ABayonne-551-1-55-150.w90-11.abo.wanadoo.fr. [90.11.74.150]) by smtp.gmail.com with ESMTPSA id y6sm10484191wrc.51.2017.05.06.08.42.06 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 06 May 2017 08:42:07 -0700 (PDT) From: Mathieu Othacehe To: 26339@debbugs.gnu.org Subject: [PATCH v3 7/9] scripts: system: Adapt "init" to new bootloader API. Date: Sat, 6 May 2017 17:41:52 +0200 Message-Id: <20170506154154.17836-8-m.othacehe@gmail.com> X-Mailer: git-send-email 2.12.2 In-Reply-To: <20170506154154.17836-1-m.othacehe@gmail.com> References: <20170506154154.17836-1-m.othacehe@gmail.com> X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 26339 Cc: Mathieu Othacehe 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.5 (/) * guix/scripts/system.scm (install): Pass installer a new argument. Rename other arguments. Call install-bootloader instead of install-grub*. (perform-action): Adapt. --- guix/scripts/system.scm | 46 ++++++++++++++++++++++++++++------------------ 1 file changed, 28 insertions(+), 18 deletions(-) diff --git a/guix/scripts/system.scm b/guix/scripts/system.scm index 0a066853a..b3e2d7b72 100644 --- a/guix/scripts/system.scm +++ b/guix/scripts/system.scm @@ -178,12 +178,14 @@ TARGET, and register them." (define* (install os-drv target #:key (log-port (current-output-port)) - grub? grub.cfg device) - "Copy the closure of GRUB.CFG, which includes the output of OS-DRV, to + installer install-bootloader? + bootcfg bootcfg-location + device) + "Copy the closure of BOOTCFG, which includes the output of OS-DRV, to directory TARGET. TARGET must be an absolute directory name since that's what 'guix-register' expects. -When GRUB? is true, install GRUB on DEVICE, using GRUB.CFG." +When INSTALL-BOOTLOADER? is true, install bootloader on DEVICE, using BOOTCFG." (define (maybe-copy to-copy) (with-monad %store-monad (if (string=? target "/") @@ -212,16 +214,21 @@ the ownership of '~a' may be incorrect!~%") (populate (lift2 populate-root-file-system %store-monad))) (mbegin %store-monad - ;; Copy the closure of GRUB.CFG, which includes OS-DIR, GRUB's - ;; background image and so on. - (maybe-copy grub.cfg) + ;; Copy the closure of BOOTCFG, which includes OS-DIR, + ;; eventual background image and so on. + (maybe-copy + (derivation->output-path bootcfg)) ;; Create a bunch of additional files. (format log-port "populating '~a'...~%" target) (populate os-dir target) - (mwhen grub? - (install-grub* grub.cfg device target))))) + (mwhen install-bootloader? + (install-bootloader installer + #:bootcfg bootcfg + #:bootcfg-location bootcfg-location + #:device device + #:target target))))) ;;; @@ -589,12 +596,13 @@ PATTERN, a string. When PATTERN is #f, display all the system generations." #$target)))))) (define* (perform-action action os - #:key bootloader? dry-run? derivations-only? + #:key install-bootloader? + dry-run? derivations-only? use-substitutes? device target image-size full-boot? (mappings '()) (gc-root #f)) - "Perform ACTION for OS. BOOTLOADER? specifies whether to install + "Perform ACTION for OS. INSTALL-BOOTLOADER? specifies whether to install bootloader; DEVICE is the target devices for bootloader; TARGET is the target root directory; IMAGE-SIZE is the size of the image to be built, for the 'vm-image' and 'disk-image' actions. FULL-BOOT? is used for the 'vm' action; @@ -630,7 +638,7 @@ output when building a system derivation, such as a disk image." (profile-boot-parameters))))) (bootcfg-location -> (bootloader-configuration-file-name (operating-system-bootloader os))) - (install-proc + (installer (let ((procedure (bootloader-configuration-installer (operating-system-bootloader os))) (target (or target "/"))) @@ -640,8 +648,8 @@ output when building a system derivation, such as a disk image." ;; --no-bootloader is passed, because we then use it as a GC root. ;; See . (drvs -> (if (memq action '(init reconfigure)) - (if (and bootloader? bootloader) - (list sys bootcfg bootloader install-proc) + (if (and install-bootloader? bootloader) + (list sys bootcfg bootloader installer) (list sys bootcfg)) (list sys))) (% (if derivations-only? @@ -660,8 +668,8 @@ output when building a system derivation, such as a disk image." ((reconfigure) (mbegin %store-monad (switch-to-system os) - (mwhen bootloader? - (install-bootloader install-proc + (mwhen install-bootloader? + (install-bootloader installer #:bootcfg bootcfg #:bootcfg-location bootcfg-location #:device device @@ -671,8 +679,10 @@ output when building a system derivation, such as a disk image." (format #t (G_ "initializing operating system under '~a'...~%") target) (install sys (canonicalize-path target) - #:grub? bootloader? - #:grub.cfg (derivation->output-path grub.cfg) + #:install-bootloader? install-bootloader? + #:bootcfg bootcfg + #:bootcfg-location bootcfg-location + #:installer installer #:device device)) (else ;; All we had to do was to build SYS and maybe register an @@ -884,7 +894,7 @@ resulting from command-line parsing." m) (_ #f)) opts) - #:bootloader? bootloader? + #:install-bootloader? bootloader? #:target target #:device device #:gc-root (assoc-ref opts 'gc-root))))) #:system system)))) -- 2.12.2 From debbugs-submit-bounces@debbugs.gnu.org Sat May 06 11:42:18 2017 Received: (at 26339) by debbugs.gnu.org; 6 May 2017 15:42:18 +0000 Received: from localhost ([127.0.0.1]:58403 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d71qb-0002bL-RT for submit@debbugs.gnu.org; Sat, 06 May 2017 11:42:18 -0400 Received: from mail-wr0-f193.google.com ([209.85.128.193]:35765) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d71qZ-0002Zn-Mv for 26339@debbugs.gnu.org; Sat, 06 May 2017 11:42:15 -0400 Received: by mail-wr0-f193.google.com with SMTP id g12so3309668wrg.2 for <26339@debbugs.gnu.org>; Sat, 06 May 2017 08:42:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=jUxD9vcC5AJgUtDgzwbksiNDxlJXlYpP1Y+EjQHRxH0=; b=mN5Ukj8rT+9DiS48WKiCOWOE9270YtJDejXA6zhE53bHNUFN+KfIOOwuwCgVKwV9bH lzcEcFfB+/Fu8o0mGYo/aueM0TnQq1tKWS/qM/o5nEYjH5u2kahgVowyOPc67AuNFi4U H5UvST744Ps+cVjoplTyq74yBcLfTX6409/d15vV1QZ6tZPJxG/uWf8xJ4sC4olVXaag 8jaEoSaU6qb8xX6QI7CMrCz243yt2E57Orr7qNdQhOYlrX5hoApi1IK+y8g4D2Qmk+N9 LxRDIoM7a+gWyKpCz0AOZ9n00qMWoJVMMSCkXJ14Dxw2zmnpOrm/IOGr5CyxnA6NOzpS JOOQ== 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:date:message-id:in-reply-to :references; bh=jUxD9vcC5AJgUtDgzwbksiNDxlJXlYpP1Y+EjQHRxH0=; b=Gk2Y6S1hoA0JG4XzLeRPdb+fT9QAijRUvww3l48AUQapSRuC1hEON66L8WfGJVXjQI aPYFCmAGfPBgZ9zlFE/UZw0U354TMsHijEG9fhkVnbACOOImAjsG7iFYs6u8cDp9woS4 buZAYC4f6zVr/XVPMiNuPA64gduT4QoDyWvK0nmt2k7BXJ5CLoBW17mundw2zmEv2oAt rRieRPLopd0K/k9nJLu74NlgZV5ugAmsiCiytNqZQWl0+Q9rQ43DYZPYU9/JoGGZVqS6 /D1HpLfDnpz1Di5iNVYB9VBCKrzSHkI46Pk+a9ry9P7DVBCAugcW4oFR52zR1RMfLCTI h9SA== X-Gm-Message-State: AN3rC/5sY8XQ3AVhyCl5fmYOCC1bAqVvdhEftBW3U+wMIBc85A0BX4Mj BJw7nZGbr6d8DQ== X-Received: by 10.223.169.34 with SMTP id u31mr41126639wrc.46.1494085330143; Sat, 06 May 2017 08:42:10 -0700 (PDT) Received: from localhost.localdomain (ABayonne-551-1-55-150.w90-11.abo.wanadoo.fr. [90.11.74.150]) by smtp.gmail.com with ESMTPSA id y6sm10484191wrc.51.2017.05.06.08.42.09 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 06 May 2017 08:42:09 -0700 (PDT) From: Mathieu Othacehe To: 26339@debbugs.gnu.org Subject: [PATCH v3 9/9] scripts: system: Display bootloader device and type in "list-generations". Date: Sat, 6 May 2017 17:41:54 +0200 Message-Id: <20170506154154.17836-10-m.othacehe@gmail.com> X-Mailer: git-send-email 2.12.2 In-Reply-To: <20170506154154.17836-1-m.othacehe@gmail.com> References: <20170506154154.17836-1-m.othacehe@gmail.com> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 26339 Cc: Mathieu Othacehe 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.3 (--) * guix/scripts/system.scm (display-system-generation): Display bootloader device and bootloader type. --- guix/scripts/system.scm | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/guix/scripts/system.scm b/guix/scripts/system.scm index adab1cedb..63993a885 100644 --- a/guix/scripts/system.scm +++ b/guix/scripts/system.scm @@ -525,17 +525,21 @@ list of services." (let* ((generation (generation-file-name profile number)) (params (read-boot-parameters-file generation)) (label (boot-parameters-label params)) + (boot-type (boot-parameters-boot-type params)) (root (boot-parameters-root-device params)) (root-device (if (bytevector? root) (uuid->string root) root)) + (boot-device (boot-parameters-boot-device params)) (kernel (boot-parameters-kernel params))) (display-generation profile number) (format #t (G_ " file name: ~a~%") generation) (format #t (G_ " canonical file name: ~a~%") (readlink* generation)) ;; TRANSLATORS: Please preserve the two-space indentation. (format #t (G_ " label: ~a~%") label) + (format #t (G_ " bootloader type: ~a~%") boot-type) (format #t (G_ " root device: ~a~%") root-device) + (format #t (G_ " boot device: ~a~%") boot-device) (format #t (G_ " kernel: ~a~%") kernel)))) (define* (list-generations pattern #:optional (profile %system-profile)) -- 2.12.2 From debbugs-submit-bounces@debbugs.gnu.org Sun May 07 11:03:45 2017 Received: (at control) by debbugs.gnu.org; 7 May 2017 15:03:45 +0000 Received: from localhost ([127.0.0.1]:60458 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d7Nir-00066J-FW for submit@debbugs.gnu.org; Sun, 07 May 2017 11:03:45 -0400 Received: from out4-smtp.messagingengine.com ([66.111.4.28]:45479) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d7Nip-00066B-Lo for control@debbugs.gnu.org; Sun, 07 May 2017 11:03:43 -0400 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id 8EF1A2098C for ; Sun, 7 May 2017 11:03:43 -0400 (EDT) Received: from frontend2 ([10.202.2.161]) by compute5.internal (MEProxy); Sun, 07 May 2017 11:03:43 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fastmail.com; h= content-type:date:from:message-id:mime-version:subject:to :x-me-sender:x-me-sender:x-sasl-enc:x-sasl-enc; s=fm1; bh=g5oAyj A8TSxmiaXC3RcUJdQhRS/YPL5p4Vjxv/0lqHw=; b=ceeHv+JDbdnm0lrpt9p5xK gxyd2im1PRp/1/l3jO22/mV9U/hYKGmO8MgRyHTkMzoKWBq0q9tlLtLzNslCWG90 TgJ6pwr317JkE2pz9U//11+gE4Q7/JrotpBNYeF5zoGG6dd55tO0IfrnskANgd1+ jXbF2RvTpKEJvrWseJAFZECgeDxymb1MJRa+itIOK/wFSN3Msl4I3I7Lgi3Y6B38 /DILUj4B78v9INAFH45MfTy4ZlqKY9j12+VEEjFe8QMkDYd9aCXqO+UZk6lHJbVy YwSfi1BwU0FbcbnJE1bb5eyifN3pJoMbPZk7dhODZP14qG6D+9XoP6c25jg3d15g == DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-type:date:from:message-id :mime-version:subject:to:x-me-sender:x-me-sender:x-sasl-enc :x-sasl-enc; s=fm1; bh=g5oAyjA8TSxmiaXC3RcUJdQhRS/YPL5p4Vjxv/0lq Hw=; b=O5iCvyyT+TXwXv/faSVJcZzbsiMknJpmq0RuugyEyT1oH/qvqRCXT4mT0 JzkLakxEzHbDNSPIGpZ5XOgkk7oAeaDKGc8zKYr7x5K9swoRhf/086V6BGTlDB2Z 9tSIFLsmF5hla+dSFoXCd4XtXENuPcktD0MMpu2X3ja4mop64KEga1ZY21XUBAsU GNjms7EQyd2ktcz/cCnkkbhHfqR60Fgpivfv71y6CE/StVhQRES4Ev2QKGZEdnuA IwXWz5bTMxELGDb1P22DJcWtFxPhwRCVTyjloTldMEMvtmLLGQWJ8kPNeZxSozBD wA9zTL1ouGnNMmzr3RTJb+TPD9Bnw== X-ME-Sender: X-Sasl-enc: sdGbyEY00Yd7ApX8U/tcSoUYbdIiBv15W5D2wCahOOdn 1494169423 Received: from localhost (unknown [188.113.81.93]) by mail.messagingengine.com (Postfix) with ESMTPA id 2AA602418B for ; Sun, 7 May 2017 11:03:43 -0400 (EDT) From: Marius Bakke To: control@debbugs.gnu.org Subject: blox User-Agent: Notmuch/0.24.1 (https://notmuchmail.org) Emacs/25.2.1 (x86_64-unknown-linux-gnu) Date: Sun, 07 May 2017 17:03:24 +0200 Message-ID: <878tm8zp37.fsf@fastmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-Spam-Score: -0.7 (/) 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.7 (/) --=-=-= Content-Type: text/plain block 26815 by 26339 --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCgAdFiEEu7At3yzq9qgNHeZDoqBt8qM6VPoFAlkPN00ACgkQoqBt8qM6 VPpoCAf+OdELW1mCN8Kn0MaVySr6ipo3lFFuCZSVh7RqF7qXKyItrqXTzcgCUy5z 1NM6HuqQXEUqkgWU7rIF20xWiPLSrZSazknBuai6rl0HEEEw7Q+FaUX6ePw2XETg OxflqMPuhBVa1Ib1LmvJpS7DP3Zln8tpaAlthhuKVF6pBu0BdkICyG3UU3Tnisuv Q5ssKvWenaYQI2BQW9PiQu1ERfhhBtXICW2falTb72YtT28iIAaVE4wg3YAn+3vg oSY3veYILjVVXW21sEsgIivgb0OfJux7kitXxKoqvUBlrFYAKyHyY3G9qWu/fzy7 5nAONz9iEIcmbLd/JvpEKWz68iP3WA== =ui4c -----END PGP SIGNATURE----- --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Sun May 07 12:41:12 2017 Received: (at 26339) by debbugs.gnu.org; 7 May 2017 16:41:12 +0000 Received: from localhost ([127.0.0.1]:60540 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d7PFA-0001nt-Bv for submit@debbugs.gnu.org; Sun, 07 May 2017 12:41:12 -0400 Received: from dd1012.kasserver.com ([85.13.128.8]:58090) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d7PF9-0001nk-2X for 26339@debbugs.gnu.org; Sun, 07 May 2017 12:41:11 -0400 Received: from localhost (77.118.221.44.wireless.dyn.drei.com [77.118.221.44]) by dd1012.kasserver.com (Postfix) with ESMTPSA id B26791CA02CA; Sun, 7 May 2017 18:41:09 +0200 (CEST) Date: Sun, 7 May 2017 18:41:05 +0200 From: Danny Milosavljevic To: Mathieu Othacehe Subject: Re: bug#26339: [PATCH v3 1/9] system: Add extlinux support. Message-ID: <20170507184105.5897a5c8@scratchpost.org> In-Reply-To: <20170506154154.17836-2-m.othacehe@gmail.com> References: <20170506154154.17836-1-m.othacehe@gmail.com> <20170506154154.17836-2-m.othacehe@gmail.com> X-Mailer: Claws Mail 3.14.1 (GTK+ 2.24.31; x86_64-unknown-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 26339 Cc: 26339@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.7 (/) Hi Mathieu, >guix/scripts/system.scm (profile-grub-entries): >Rename system->grub-entry to system->boot-parameters and adjust accordingly. Not really - because I did this part already :) That part of the commit message is outdated. > + (bootloader (let ((bootloader (bootloader-configuration-bootloader > + (operating-system-bootloader os)))) > + (if bootloader > + (package->derivation bootloader) > + (return #f)))) [...] > + (if (and bootloader? bootloader) Hmm, is it possible to (usefully) check monadic values that way? > + (when (and bootloader? bootloader) Likewise. Otherwise LGTM! From debbugs-submit-bounces@debbugs.gnu.org Sun May 07 12:52:17 2017 Received: (at 26339) by debbugs.gnu.org; 7 May 2017 16:52:17 +0000 Received: from localhost ([127.0.0.1]:60552 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d7PPs-00023z-Qr for submit@debbugs.gnu.org; Sun, 07 May 2017 12:52:16 -0400 Received: from dd1012.kasserver.com ([85.13.128.8]:59250) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d7PPr-00023s-Bs for 26339@debbugs.gnu.org; Sun, 07 May 2017 12:52:15 -0400 Received: from localhost (77.118.221.44.wireless.dyn.drei.com [77.118.221.44]) by dd1012.kasserver.com (Postfix) with ESMTPSA id 0C95F1CA02CA; Sun, 7 May 2017 18:52:13 +0200 (CEST) Date: Sun, 7 May 2017 18:52:12 +0200 From: Danny Milosavljevic To: Mathieu Othacehe Subject: Re: bug#26339: [PATCH v3 2/9] bootloader: Add install procedures and use them. Message-ID: <20170507185212.086b5cff@scratchpost.org> In-Reply-To: <20170506154154.17836-3-m.othacehe@gmail.com> References: <20170506154154.17836-1-m.othacehe@gmail.com> <20170506154154.17836-3-m.othacehe@gmail.com> X-Mailer: Claws Mail 3.14.1 (GTK+ 2.24.31; x86_64-unknown-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 26339 Cc: 26339@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.7 (/) LGTM! From debbugs-submit-bounces@debbugs.gnu.org Sun May 07 12:53:27 2017 Received: (at 26339) by debbugs.gnu.org; 7 May 2017 16:53:27 +0000 Received: from localhost ([127.0.0.1]:60556 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d7PR1-00025p-3W for submit@debbugs.gnu.org; Sun, 07 May 2017 12:53:27 -0400 Received: from dd1012.kasserver.com ([85.13.128.8]:59406) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d7PQz-00025h-7V for 26339@debbugs.gnu.org; Sun, 07 May 2017 12:53:25 -0400 Received: from localhost (77.118.221.44.wireless.dyn.drei.com [77.118.221.44]) by dd1012.kasserver.com (Postfix) with ESMTPSA id 22AD71CA02CA; Sun, 7 May 2017 18:53:24 +0200 (CEST) Date: Sun, 7 May 2017 18:53:22 +0200 From: Danny Milosavljevic To: Mathieu Othacehe Subject: Re: bug#26339: [PATCH v3 4/9] bootloader: Stop using grub module. Message-ID: <20170507185322.1c053625@scratchpost.org> In-Reply-To: <20170506154154.17836-5-m.othacehe@gmail.com> References: <20170506154154.17836-1-m.othacehe@gmail.com> <20170506154154.17836-5-m.othacehe@gmail.com> X-Mailer: Claws Mail 3.14.1 (GTK+ 2.24.31; x86_64-unknown-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 26339 Cc: 26339@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.7 (/) LGTM! From debbugs-submit-bounces@debbugs.gnu.org Sun May 07 12:55:39 2017 Received: (at 26339) by debbugs.gnu.org; 7 May 2017 16:55:39 +0000 Received: from localhost ([127.0.0.1]:60560 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d7PT9-000296-Eo for submit@debbugs.gnu.org; Sun, 07 May 2017 12:55:39 -0400 Received: from dd1012.kasserver.com ([85.13.128.8]:59720) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d7PT8-00028z-07 for 26339@debbugs.gnu.org; Sun, 07 May 2017 12:55:38 -0400 Received: from localhost (77.118.221.44.wireless.dyn.drei.com [77.118.221.44]) by dd1012.kasserver.com (Postfix) with ESMTPSA id 07F131CA02CA; Sun, 7 May 2017 18:55:36 +0200 (CEST) Date: Sun, 7 May 2017 18:55:32 +0200 From: Danny Milosavljevic To: Mathieu Othacehe Subject: Re: bug#26339: [PATCH v3 3/9] system: Add bootloader type. Message-ID: <20170507185532.2afba886@scratchpost.org> In-Reply-To: <20170506154154.17836-4-m.othacehe@gmail.com> References: <20170506154154.17836-1-m.othacehe@gmail.com> <20170506154154.17836-4-m.othacehe@gmail.com> X-Mailer: Claws Mail 3.14.1 (GTK+ 2.24.31; x86_64-unknown-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 26339 Cc: 26339@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.7 (/) LGTM! From debbugs-submit-bounces@debbugs.gnu.org Sun May 07 12:57:08 2017 Received: (at 26339) by debbugs.gnu.org; 7 May 2017 16:57:08 +0000 Received: from localhost ([127.0.0.1]:60564 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d7PUZ-0002BX-Q4 for submit@debbugs.gnu.org; Sun, 07 May 2017 12:57:08 -0400 Received: from dd1012.kasserver.com ([85.13.128.8]:59910) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d7PUX-0002BO-O2 for 26339@debbugs.gnu.org; Sun, 07 May 2017 12:57:05 -0400 Received: from localhost (77.118.221.44.wireless.dyn.drei.com [77.118.221.44]) by dd1012.kasserver.com (Postfix) with ESMTPSA id BCCF11CA02CA; Sun, 7 May 2017 18:57:04 +0200 (CEST) Date: Sun, 7 May 2017 18:57:01 +0200 From: Danny Milosavljevic To: Mathieu Othacehe Subject: Re: bug#26339: [PATCH v3 9/9] scripts: system: Display bootloader device and type in "list-generations". Message-ID: <20170507185701.16bebf0f@scratchpost.org> In-Reply-To: <20170506154154.17836-10-m.othacehe@gmail.com> References: <20170506154154.17836-1-m.othacehe@gmail.com> <20170506154154.17836-10-m.othacehe@gmail.com> X-Mailer: Claws Mail 3.14.1 (GTK+ 2.24.31; x86_64-unknown-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 26339 Cc: 26339@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.7 (/) LGTM! From debbugs-submit-bounces@debbugs.gnu.org Sun May 07 16:01:36 2017 Received: (at 26339) by debbugs.gnu.org; 7 May 2017 20:01:36 +0000 Received: from localhost ([127.0.0.1]:60787 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d7SN6-0003g1-Hs for submit@debbugs.gnu.org; Sun, 07 May 2017 16:01:36 -0400 Received: from mail-wm0-f43.google.com ([74.125.82.43]:37691) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d7SN5-0003fm-0B for 26339@debbugs.gnu.org; Sun, 07 May 2017 16:01:35 -0400 Received: by mail-wm0-f43.google.com with SMTP id m123so44936212wma.0 for <26339@debbugs.gnu.org>; Sun, 07 May 2017 13:01:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=references:user-agent:from:to:cc:subject:in-reply-to:date :message-id:mime-version; bh=iyB7qJSEqaFX32XWhEToo/Ayb5Nd0faKi2T8w9rVHd0=; b=fAuW1hZzTI+MWB/EKQRi8ziIEE6WVvKwG+VRNgE898tbcioKMmf8qZ04k12gddbA5c 2sfNA4Z0NDBapFuJ9Cctygxiv5euYcijq6yH6yyhmqNfGv9GrzamJHJBCxGQ0R7ZJOCz EIm5zy4TqZyO1DALKBvScc2EuueiNiwlVcD2pglzjysdkn0A8pkJ41pVx/S2TFl113Do bJbWFmdPHWUPgUe87j3MvQ/3LI9xTp7f+EkSryLVgo5bT3n1RzM5gjtFBPz7JcUTgtkH uFhSAiwnTM3w7Q7/V2VaUW+Itafg+3AfP8EkA5DDg+/s2JyT7zXpoO35SgeP8FIinBRh t4hg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:references:user-agent:from:to:cc:subject :in-reply-to:date:message-id:mime-version; bh=iyB7qJSEqaFX32XWhEToo/Ayb5Nd0faKi2T8w9rVHd0=; b=S1gSnK2pQYd1Dm2bYr76XT434uyKdEQEewIsqzP2iy1qq9TKTbctMpOEHhXm5+ufgG rraCLcUuoCugQtDegYYRlJEehgcmEOza20pyLHUEjJ364taPEP65Oq+D2FsDRtT5v9xg whFc171jpmVLf2lD05JPcZdMmSB6WEdSAmHz3FMM6CrVU2cUcrLiwRWRTEAcrEwfC2wH Z4sjzmnvfP32xhOYHQx3BgywlzSEaZREtatRii9v3nnjZGe1iMKWQEtlWOurwsBvCWbY mTItUGoggnGdSNjh0DYnTEzzfxGWd0ILVAGgCaSvuIuXIhGJjri4QBR/md8/fRF0j1Rj B3gw== X-Gm-Message-State: AN3rC/7zX/KoGL1fv7ElNPJjGRymm6B3e6yYPi2uImINkSC4JlcRzuY5 JEH9LBOEWAeR/wQh X-Received: by 10.28.147.198 with SMTP id v189mr10343655wmd.52.1494187289059; Sun, 07 May 2017 13:01:29 -0700 (PDT) Received: from cervin (ABayonne-551-1-52-214.w90-11.abo.wanadoo.fr. [90.11.67.214]) by smtp.gmail.com with ESMTPSA id z14sm7607625wmz.2.2017.05.07.13.01.28 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 07 May 2017 13:01:28 -0700 (PDT) References: <20170506154154.17836-1-m.othacehe@gmail.com> <20170506154154.17836-2-m.othacehe@gmail.com> <20170507184105.5897a5c8@scratchpost.org> User-agent: mu4e 0.9.18; emacs 25.2.1 From: Mathieu Othacehe To: Danny Milosavljevic Subject: Re: bug#26339: [PATCH v3 1/9] system: Add extlinux support. In-reply-to: <20170507184105.5897a5c8@scratchpost.org> Date: Sun, 07 May 2017 22:01:27 +0200 Message-ID: <87bmr477xk.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 26339 Cc: 26339@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.5 (/) Hi Danny, > Not really - because I did this part already :) I'll remove it ;) >> + (if (and bootloader? bootloader) > > Hmm, is it possible to (usefully) check monadic values that way? Monads are still misterious for me, so I could be completely wrong here but I think that bootloader may be #f so it makes sense to check it here and in the following lines. > >> + (when (and bootloader? bootloader) > > Likewise. I wrote the few lines bellow to better understand what's going on : --8<---------------cut here---------------start------------->8--- (run-with-store (open-connection) (mlet* %store-monad ((test (return #f)) (disp -> (if test "true" "false"))) (return (display disp)))) --8<---------------cut here---------------end--------------->8--- You can ,expand it and make test return #t instead. Thanks, Mathieu From debbugs-submit-bounces@debbugs.gnu.org Sun May 07 16:33:40 2017 Received: (at 26339) by debbugs.gnu.org; 7 May 2017 20:33:40 +0000 Received: from localhost ([127.0.0.1]:60814 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d7Ss8-0004QL-6l for submit@debbugs.gnu.org; Sun, 07 May 2017 16:33:40 -0400 Received: from dd1012.kasserver.com ([85.13.128.8]:60440) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d7Ss6-0004QD-US for 26339@debbugs.gnu.org; Sun, 07 May 2017 16:33:39 -0400 Received: from localhost (77.118.221.44.wireless.dyn.drei.com [77.118.221.44]) by dd1012.kasserver.com (Postfix) with ESMTPSA id 407761CA0438; Sun, 7 May 2017 22:33:37 +0200 (CEST) Date: Sun, 7 May 2017 22:33:32 +0200 From: Danny Milosavljevic To: Mathieu Othacehe Subject: Re: bug#26339: [PATCH v3 6/9] scripts: system: Adapt "reconfigure" to new bootloader API. Message-ID: <20170507223332.612b3785@scratchpost.org> In-Reply-To: <20170506154154.17836-7-m.othacehe@gmail.com> References: <20170506154154.17836-1-m.othacehe@gmail.com> <20170506154154.17836-7-m.othacehe@gmail.com> X-Mailer: Claws Mail 3.14.1 (GTK+ 2.24.31; x86_64-unknown-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 26339 Cc: 26339@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.7 (/) Hi Mathieu, > +(define* (install-bootloader install-procedure > + #:key > + bootcfg bootcfg-location > + device target) Maybe "installer" instead of "install-procedure"? It's not that important but it reads better I think... >+(define (install-bootloader-derivation install-procedure >+ bootloader device target) >+ (with-monad %store-monad >+ (gexp->file "install-bootloader" >+ (with-imported-modules '((guix build utils)) >+ #~(begin >+ (use-modules (guix build utils)) >+ (#$install-procedure #$bootloader >+ #$device >+ #$target)))))) Hmm, importing (guix build utils) twice (on different sides, I guess)? Could use a comment... > + (install-proc > + (let ((procedure (bootloader-configuration-installer > + (operating-system-bootloader os))) > + (target (or target "/"))) > + (install-bootloader-derivation procedure bootloader device target))) Here, I'd use "bootloader-installer" instead of "install-proc" - because this specific procedure could install lots of things - it's the main entry point in a sense. Otherwise LGTM! I also think the general approach is good. From debbugs-submit-bounces@debbugs.gnu.org Sun May 07 16:54:55 2017 Received: (at 26339) by debbugs.gnu.org; 7 May 2017 20:54:56 +0000 Received: from localhost ([127.0.0.1]:60829 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d7TCh-0004uT-Ny for submit@debbugs.gnu.org; Sun, 07 May 2017 16:54:55 -0400 Received: from dd1012.kasserver.com ([85.13.128.8]:35254) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d7TCg-0004uL-PM for 26339@debbugs.gnu.org; Sun, 07 May 2017 16:54:55 -0400 Received: from localhost (77.118.221.44.wireless.dyn.drei.com [77.118.221.44]) by dd1012.kasserver.com (Postfix) with ESMTPSA id A19901CA5491; Sun, 7 May 2017 22:54:53 +0200 (CEST) Date: Sun, 7 May 2017 22:54:49 +0200 From: Danny Milosavljevic To: Mathieu Othacehe Subject: Re: bug#26339: [PATCH v3 8/9] scripts: system: Adapt "switch-generation" to new bootloader API. Message-ID: <20170507225449.4794cf21@scratchpost.org> In-Reply-To: <20170506154154.17836-9-m.othacehe@gmail.com> References: <20170506154154.17836-1-m.othacehe@gmail.com> <20170506154154.17836-9-m.othacehe@gmail.com> X-Mailer: Claws Mail 3.14.1 (GTK+ 2.24.31; x86_64-unknown-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 26339 Cc: 26339@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.7 (/) > + (install-proc "installer.drv" instead of "install-proc"? > + (let ((procedure (bootloader-configuration-installer > + boot-config))) "installer" instead of "procedure"? From debbugs-submit-bounces@debbugs.gnu.org Sun May 07 16:56:07 2017 Received: (at 26339) by debbugs.gnu.org; 7 May 2017 20:56:07 +0000 Received: from localhost ([127.0.0.1]:60834 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d7TDr-0004wa-10 for submit@debbugs.gnu.org; Sun, 07 May 2017 16:56:07 -0400 Received: from dd1012.kasserver.com ([85.13.128.8]:35408) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d7TDq-0004wT-5R for 26339@debbugs.gnu.org; Sun, 07 May 2017 16:56:06 -0400 Received: from localhost (77.118.221.44.wireless.dyn.drei.com [77.118.221.44]) by dd1012.kasserver.com (Postfix) with ESMTPSA id 316E61CA5491; Sun, 7 May 2017 22:56:05 +0200 (CEST) Date: Sun, 7 May 2017 22:56:00 +0200 From: Danny Milosavljevic To: Mathieu Othacehe Subject: Re: bug#26339: [PATCH v3 6/9] scripts: system: Adapt "reconfigure" to new bootloader API. Message-ID: <20170507225600.68cadfae@scratchpost.org> In-Reply-To: <20170507223332.612b3785@scratchpost.org> References: <20170506154154.17836-1-m.othacehe@gmail.com> <20170506154154.17836-7-m.othacehe@gmail.com> <20170507223332.612b3785@scratchpost.org> X-Mailer: Claws Mail 3.14.1 (GTK+ 2.24.31; x86_64-unknown-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 26339 Cc: 26339@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.7 (/) > > +(define* (install-bootloader install-procedure > > + #:key > > + bootcfg bootcfg-location > > + device target) > > Maybe "installer" instead of "install-procedure"? It's not that important but it reads better I think... This is actually a derivation, right? So "installer.drv" ... From debbugs-submit-bounces@debbugs.gnu.org Sun May 07 16:59:15 2017 Received: (at 26339) by debbugs.gnu.org; 7 May 2017 20:59:15 +0000 Received: from localhost ([127.0.0.1]:60838 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d7TGt-00050t-Df for submit@debbugs.gnu.org; Sun, 07 May 2017 16:59:15 -0400 Received: from dd1012.kasserver.com ([85.13.128.8]:35866) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d7TGr-00050l-Hy for 26339@debbugs.gnu.org; Sun, 07 May 2017 16:59:13 -0400 Received: from localhost (77.118.221.44.wireless.dyn.drei.com [77.118.221.44]) by dd1012.kasserver.com (Postfix) with ESMTPSA id 69B871CA5491; Sun, 7 May 2017 22:59:12 +0200 (CEST) Date: Sun, 7 May 2017 22:59:10 +0200 From: Danny Milosavljevic To: Mathieu Othacehe Subject: Re: bug#26339: [PATCH v3 5/9] bootloader: Add device and type to bootloader-configuration record. Message-ID: <20170507225910.3eff1d92@scratchpost.org> In-Reply-To: <20170506154154.17836-6-m.othacehe@gmail.com> References: <20170506154154.17836-1-m.othacehe@gmail.com> <20170506154154.17836-6-m.othacehe@gmail.com> X-Mailer: Claws Mail 3.14.1 (GTK+ 2.24.31; x86_64-unknown-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 26339 Cc: 26339@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.7 (/) LGTM! From debbugs-submit-bounces@debbugs.gnu.org Sun May 07 17:08:33 2017 Received: (at 26339) by debbugs.gnu.org; 7 May 2017 21:08:33 +0000 Received: from localhost ([127.0.0.1]:60842 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d7TPt-0005Eq-86 for submit@debbugs.gnu.org; Sun, 07 May 2017 17:08:33 -0400 Received: from dd1012.kasserver.com ([85.13.128.8]:37094) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d7TPs-0005Ej-6X for 26339@debbugs.gnu.org; Sun, 07 May 2017 17:08:32 -0400 Received: from localhost (77.118.221.44.wireless.dyn.drei.com [77.118.221.44]) by dd1012.kasserver.com (Postfix) with ESMTPSA id E5C431CA5491; Sun, 7 May 2017 23:08:30 +0200 (CEST) Date: Sun, 7 May 2017 23:08:29 +0200 From: Danny Milosavljevic To: Mathieu Othacehe Subject: Re: bug#26339: [PATCH v3 7/9] scripts: system: Adapt "init" to new bootloader API. Message-ID: <20170507230829.22f0ce70@scratchpost.org> In-Reply-To: <20170506154154.17836-8-m.othacehe@gmail.com> References: <20170506154154.17836-1-m.othacehe@gmail.com> <20170506154154.17836-8-m.othacehe@gmail.com> X-Mailer: Claws Mail 3.14.1 (GTK+ 2.24.31; x86_64-unknown-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 26339 Cc: 26339@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.7 (/) On Sat, 6 May 2017 17:41:52 +0200 Mathieu Othacehe wrote: > --- a/guix/scripts/system.scm > +++ b/guix/scripts/system.scm > @@ -178,12 +178,14 @@ TARGET, and register them." > > (define* (install os-drv target > #:key (log-port (current-output-port)) > - grub? grub.cfg device) > - "Copy the closure of GRUB.CFG, which includes the output of OS-DRV, to > + installer install-bootloader? "bootloader-installer.drv" instead of "installer"? >[reinstall-bootloader] > - (install-proc > + (installer > (let ((procedure (bootloader-configuration-installer > (operating-system-bootloader os))) > (target (or target "/"))) "installer.drv" instead of "installer", and "installer" instead of "procedure". Also, deja vu. Patch 6/9 also includes something of this part. Otherwise LGTM! From debbugs-submit-bounces@debbugs.gnu.org Sun May 07 17:14:21 2017 Received: (at 26339) by debbugs.gnu.org; 7 May 2017 21:14:21 +0000 Received: from localhost ([127.0.0.1]:60853 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d7TVV-0005NW-6V for submit@debbugs.gnu.org; Sun, 07 May 2017 17:14:21 -0400 Received: from dd1012.kasserver.com ([85.13.128.8]:37940) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d7TVT-0005NN-Ki for 26339@debbugs.gnu.org; Sun, 07 May 2017 17:14:19 -0400 Received: from localhost (77.118.221.44.wireless.dyn.drei.com [77.118.221.44]) by dd1012.kasserver.com (Postfix) with ESMTPSA id 3880E1CA5491; Sun, 7 May 2017 23:14:18 +0200 (CEST) Date: Sun, 7 May 2017 23:14:14 +0200 From: Danny Milosavljevic To: Mathieu Othacehe Subject: Re: bug#26339: [PATCH v3 6/9] scripts: system: Adapt "reconfigure" to new bootloader API. Message-ID: <20170507231414.120ef6f4@scratchpost.org> In-Reply-To: <20170506154154.17836-7-m.othacehe@gmail.com> References: <20170506154154.17836-1-m.othacehe@gmail.com> <20170506154154.17836-7-m.othacehe@gmail.com> X-Mailer: Claws Mail 3.14.1 (GTK+ 2.24.31; x86_64-unknown-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 26339 Cc: 26339@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.7 (/) > +(define (install-bootloader-derivation install-procedure > + bootloader device target) That doesn't actually install a bootloader derivation, right? Maybe call it "bootloader-installer-derivation" instead? I hesitate to use ".drv" because it isn't a derivation yet - it just returns one. Also, can you add a docstring? From debbugs-submit-bounces@debbugs.gnu.org Mon May 08 05:37:59 2017 Received: (at 26339) by debbugs.gnu.org; 8 May 2017 09:37:59 +0000 Received: from localhost ([127.0.0.1]:32947 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d7f79-0005e0-9l for submit@debbugs.gnu.org; Mon, 08 May 2017 05:37:59 -0400 Received: from eggs.gnu.org ([208.118.235.92]:36815) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d7f78-0005dp-97 for 26339@debbugs.gnu.org; Mon, 08 May 2017 05:37:58 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d7f71-00033x-Vv for 26339@debbugs.gnu.org; Mon, 08 May 2017 05:37:52 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:49021) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d7f6u-000322-Jj; Mon, 08 May 2017 05:37:44 -0400 Received: from reverse-83.fdn.fr ([80.67.176.83]:54700 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1d7f6t-0001pb-Rc; Mon, 08 May 2017 05:37:44 -0400 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) To: Mathieu Othacehe Subject: Re: bug#26339: [PATCH v2 01/12] system: Pass to grub. References: <20170417090148.13791-1-m.othacehe@gmail.com> <20170417090148.13791-2-m.othacehe@gmail.com> Date: Mon, 08 May 2017 11:37:41 +0200 In-Reply-To: <20170417090148.13791-2-m.othacehe@gmail.com> (Mathieu Othacehe's message of "Mon, 17 Apr 2017 11:01:37 +0200") Message-ID: <87zienofiy.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 26339 Cc: 26339@debbugs.gnu.org, Danny Milosavljevic 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: -5.0 (-----) Hi, Mathieu Othacehe skribis: > * gnu/system.scm (operating-system-grub.cfg): Pass . > * gnu/system/grub.scm (boot-parameters->menu-entry): New variable. > (grub-configuration-file): Use boot-parameters->menu-entry. This patch as applied in 2e58e05bb6 causes a circular dependency between (gnu system) and (gnu system grub), which is not OK given that they rely on macros (actually record accessors) coming from each others. This causes evaluation to fail (see ): --8<---------------cut here---------------start------------->8--- In gnu/system/grub.scm: 272: 1 [boot-parameters->menu-entry #] In unknown file: ?: 0 [# #] ERROR: In procedure #: ERROR: Wrong type to apply: # --8<---------------cut here---------------end--------------->8--- Since the goal of this patch set was to support multiple bootloaders, the right fix would be for (gnu system) to not use (gnu system grub). Instead there should probably be a (gnu system bootloaders) module providing a bootloader abstraction. However, I=E2=80=99m not sure about the details of all this. If we cannot = fix it today, we=E2=80=99ll have to revert this change, though I=E2=80=99m unsu= re exactly how many commits depend on it. Thoughts? Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Mon May 08 09:51:16 2017 Received: (at 26339) by debbugs.gnu.org; 8 May 2017 13:51:16 +0000 Received: from localhost ([127.0.0.1]:33090 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d7j4G-0004yb-LT for submit@debbugs.gnu.org; Mon, 08 May 2017 09:51:16 -0400 Received: from dd1012.kasserver.com ([85.13.128.8]:40570) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d7j4F-0004yT-2t for 26339@debbugs.gnu.org; Mon, 08 May 2017 09:51:15 -0400 Received: from localhost (213162068091.public.t-mobile.at [213.162.68.91]) by dd1012.kasserver.com (Postfix) with ESMTPSA id 7F90E1CA3393; Mon, 8 May 2017 15:51:12 +0200 (CEST) Date: Mon, 8 May 2017 15:51:09 +0200 From: Danny Milosavljevic To: ludo@gnu.org (Ludovic =?ISO-8859-1?Q?Court=E8s?=) Subject: Re: bug#26339: [PATCH v2 01/12] system: Pass to grub. Message-ID: <20170508155109.19fa060d@scratchpost.org> In-Reply-To: <87zienofiy.fsf@gnu.org> References: <20170417090148.13791-1-m.othacehe@gmail.com> <20170417090148.13791-2-m.othacehe@gmail.com> <87zienofiy.fsf@gnu.org> X-Mailer: Claws Mail 3.14.1 (GTK+ 2.24.31; x86_64-unknown-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Score: 0.8 (/) X-Debbugs-Envelope-To: 26339 Cc: 26339@debbugs.gnu.org, Mathieu Othacehe 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, I've pushed 087efec496b91e3763be2e11e208d4a8f4ef3d43 to master which is a two-line change removing this circular dependency. Can you please start another evaluation on Hydra? Also, you are right, this will eventually support other bootloaders - but right now the remainder is in review. The parts that are pushed already just make boot-parameters not weird. From debbugs-submit-bounces@debbugs.gnu.org Mon May 08 10:53:43 2017 Received: (at 26339) by debbugs.gnu.org; 8 May 2017 14:53:43 +0000 Received: from localhost ([127.0.0.1]:34522 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d7k2h-0000BF-Bc for submit@debbugs.gnu.org; Mon, 08 May 2017 10:53:43 -0400 Received: from mail-wm0-f68.google.com ([74.125.82.68]:36077) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d7k2f-0000B1-7z for 26339@debbugs.gnu.org; Mon, 08 May 2017 10:53:42 -0400 Received: by mail-wm0-f68.google.com with SMTP id u65so15979118wmu.3 for <26339@debbugs.gnu.org>; Mon, 08 May 2017 07:53:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=references:user-agent:from:to:cc:subject:in-reply-to:date :message-id:mime-version; bh=ktAIs8KuRh/AwgLjjQdn6JrYSGL2kZBDqj72W/uNCSc=; b=T361nTyIs9wIlc5dXJgxxnDe6PfatIdoR57TgBGd0Hh4Xzgx26i3+PEQv6KzgAcwic 0DdrLN0/UG7xVifyrOTdKOEj6D1jah2O+mkxVX8Q5g6Yuy0T5gs1yl2CXSTOh4bF7MiZ 3BFlSegA7Yb/+cke8VGlBdGtKSOZWQ5UUx6stDbWMnsvvFabzCwZgwpG4M+vdD6V/ZVM 2GZywoWwdrxbCOJuhiz/WYehvTeV+JVrZvuJ0mrX87gIAsylkpeS0TBLAgtYe337YFl9 nKlhk8FBFMLiPfPAmeA8K4qIzg2N7+wkc8EGU4wMyKbkdtk1CCb10lURbn6O9XiTVjZI QXtQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:references:user-agent:from:to:cc:subject :in-reply-to:date:message-id:mime-version; bh=ktAIs8KuRh/AwgLjjQdn6JrYSGL2kZBDqj72W/uNCSc=; b=Qjiq5kWWnj9l9IR1Fr0DIKMLinw7PfCNnVRDyk+V4gv2sU1uQ8/UPsEUMe2DAbKFLy JSNKb0U0O4Z2Wpf15hH0q3hdmukGdrry9637rHn1K9UU2qcgpwNarZUlkpu5MEJqe2F6 qwalT2xSWEGXr6OGQc/+DWGeYBMiEmZtPCzlUhRiWKmEasyUjjzXNI4ERNMWo/vXgGDQ CIIC44wAfgRj3DbKLN59AW05HeCUqw5r6Ie7r56ZNYHKVtOoBzwV1iUriLVWADFbwMXD Gp79Mor59rKQ6ECdaH4gMzqwPyIHL13jHzxe0rdgsZI24x4+hQkSFCIow3erbeWEm7pd g97Q== X-Gm-Message-State: AN3rC/4nQmZgCfl0nXY3jV3nUosA+gjbIGnQQ5EWV9PDYw3SVmuvFmYq EHq7nd8yBpkmAw== X-Received: by 10.28.45.141 with SMTP id t135mr12461737wmt.6.1494255215463; Mon, 08 May 2017 07:53:35 -0700 (PDT) Received: from cervin (ABayonne-551-1-52-214.w90-11.abo.wanadoo.fr. [90.11.67.214]) by smtp.gmail.com with ESMTPSA id p17sm13550942wmd.11.2017.05.08.07.53.34 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 08 May 2017 07:53:34 -0700 (PDT) References: <20170417090148.13791-1-m.othacehe@gmail.com> <20170417090148.13791-2-m.othacehe@gmail.com> <87zienofiy.fsf@gnu.org> User-agent: mu4e 0.9.18; emacs 25.2.1 From: Mathieu Othacehe To: Ludovic =?utf-8?Q?Court=C3=A8s?= Subject: Re: bug#26339: [PATCH v2 01/12] system: Pass to grub. In-reply-to: <87zienofiy.fsf@gnu.org> Date: Mon, 08 May 2017 16:53:33 +0200 Message-ID: <87vapbs8lu.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 26339 Cc: 26339@debbugs.gnu.org, Danny Milosavljevic 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.5 (/) Hi Ludo, > Since the goal of this patch set was to support multiple bootloaders, > the right fix would be for (gnu system) to not use (gnu system grub). > Instead there should probably be a (gnu system bootloaders) module > providing a bootloader abstraction. The still in review serie adds a (gnu system bootloader) module offering the abstraction you're talking about. The file is added in "[PATCH v3 1/9] system: Add extlinux support"[1] and modified by following patches. Thanks, Mathieu [1] : https://debbugs.gnu.org/cgi/bugreport.cgi?bug=26339#268 From debbugs-submit-bounces@debbugs.gnu.org Mon May 08 11:00:59 2017 Received: (at 26339) by debbugs.gnu.org; 8 May 2017 15:00:59 +0000 Received: from localhost ([127.0.0.1]:34526 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d7k9j-0000M3-5T for submit@debbugs.gnu.org; Mon, 08 May 2017 11:00:59 -0400 Received: from mail-wm0-f67.google.com ([74.125.82.67]:34556) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d7k9h-0000Lq-Uy for 26339@debbugs.gnu.org; Mon, 08 May 2017 11:00:58 -0400 Received: by mail-wm0-f67.google.com with SMTP id d127so7685899wmf.1 for <26339@debbugs.gnu.org>; Mon, 08 May 2017 08:00:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=references:user-agent:from:to:cc:subject:in-reply-to:date :message-id:mime-version; bh=/HYZO0ovl+1L6n4yBW0NUhuJDAodM3qw4eK0gHp1yjs=; b=W2V5bh+WlXj3hu3T7wLAPaEJa4h2qc5+Gmk8Xk4OXPXqpReDFl9wVMEyiDupg1o494 PaMcvIesJi99KNAiy5KZtc7DHGduNRcZXzikxUi8gfp1GbwBRD/PelQXu+aGPUsvSqSf 3vjAkbGA9fF7H6pFzSj47u4fa6XOqUpdGPWdsm5SE09uodaWBoVjcBw6bPXu6VpJg33q c+zdu7OpoFsCHKPjYtDrRgl5jOGKMtNl2Y9rj7USZsMZ7Ng+n9OrxPbtWvf0ws6mDNGE T86zKRmDpsgPEJpPFXI/0oSVNsldJf3EmSb6ySTcOtER6MzGwfOs/5BCAmjUVCKKA2DO S7wQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:references:user-agent:from:to:cc:subject :in-reply-to:date:message-id:mime-version; bh=/HYZO0ovl+1L6n4yBW0NUhuJDAodM3qw4eK0gHp1yjs=; b=fiEQ6uMuREY0bDzHpXs4eUkzQeLuTm2C6rN4f3ewH3EMbbBWrBR0A47Kow7OIK2QlS TMWfY+04yLPXY4E6tJwKHn6l5N/A4XsaX/LaKOy7d8KaiJnfwSakslStjkLV6Ir/Sk1y 4jGpatpD2hTUcVy4wAgdw/czUu6CbQTwGub3U3Q3BEHcNTdIPz1SAKttEjEKAjv6HnWh 1cL84qQ+eZQeP9zO+o4hASDqfnak9QmZKCV5QvyUAk7/9xY7LrJxvVsoOWdOZLq1o1bN 8hYtIiKE41EULqSE0VL1b5+zjrDJTS6ev6zDLcXJK018vqbDQcWPBN4bzqe72YtAzCV1 VyAg== X-Gm-Message-State: AN3rC/4kn/LAkC+4sKpXe84DMPlSayCqltTvo6t6SOq6WDveekH2E8gk OcoIjFqEeJOvMw== X-Received: by 10.28.37.71 with SMTP id l68mr14001742wml.108.1494255651425; Mon, 08 May 2017 08:00:51 -0700 (PDT) Received: from cervin (ABayonne-551-1-52-214.w90-11.abo.wanadoo.fr. [90.11.67.214]) by smtp.gmail.com with ESMTPSA id i24sm9300923wrc.40.2017.05.08.08.00.50 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 08 May 2017 08:00:50 -0700 (PDT) References: <20170417090148.13791-1-m.othacehe@gmail.com> <20170417090148.13791-2-m.othacehe@gmail.com> <87zienofiy.fsf@gnu.org> <20170508155109.19fa060d@scratchpost.org> User-agent: mu4e 0.9.18; emacs 25.2.1 From: Mathieu Othacehe To: Danny Milosavljevic Subject: Re: bug#26339: [PATCH v2 01/12] system: Pass to grub. In-reply-to: <20170508155109.19fa060d@scratchpost.org> Date: Mon, 08 May 2017 17:00:49 +0200 Message-ID: <87tw4vs89q.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 26339 Cc: 26339@debbugs.gnu.org, Ludovic =?utf-8?Q?Court=C3=A8s?= 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.5 (/) Hi Danny, > Also, you are right, this will eventually support other bootloaders - but right now the remainder is in review. The parts that are pushed already just make boot-parameters not weird. Thanks for the patch. I should be able to remove those lines in the v4 of my bootloader serie if everything is going ok. I'll submit it tomorrow with the other renamings you suggested in v3. Mathieu From debbugs-submit-bounces@debbugs.gnu.org Mon May 08 12:21:38 2017 Received: (at 26339) by debbugs.gnu.org; 8 May 2017 16:21:38 +0000 Received: from localhost ([127.0.0.1]:34605 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d7lPm-00042o-JT for submit@debbugs.gnu.org; Mon, 08 May 2017 12:21:38 -0400 Received: from mail-wm0-f52.google.com ([74.125.82.52]:35721) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d7lPl-00042b-53 for 26339@debbugs.gnu.org; Mon, 08 May 2017 12:21:37 -0400 Received: by mail-wm0-f52.google.com with SMTP id b84so60650136wmh.0 for <26339@debbugs.gnu.org>; Mon, 08 May 2017 09:21:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=references:user-agent:from:to:cc:subject:in-reply-to:date :message-id:mime-version; bh=CvFqnHLc8whHL1gfFU/TVoNH9CfNarGQdjuQIQZDBW4=; b=gKhIXft8pQi0vD0IFTD9u9roSdSbW6PG0YAWZHZafbs4/HiSJ4zhQid+4+36UDLznf cnHAMzGEYkprqWmDCNidZJbwbiJxsk8BzIrlCiFKJ77ZkH5xDcGck7jK3KKSMttLkZ/Y ovociqGSt3WKlFhMMCG4VG5js5NGaSvRUVf4phg6EJ3GGvj1VA6UgiREHIW8xj4aaypc aVscQUSVqSJ2hKCiFgQpDdeDCxk5eCKuYkBy3W3X71E2RQ0xLZqrEE8PaBj1MCprjpHp dsoWL9LSpxdVkRWePsMTPhJ9ZIO3fWcmBavnWR7FsqREj0O8oQZO2zFWAOdSQri5p0Yy OpXw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:references:user-agent:from:to:cc:subject :in-reply-to:date:message-id:mime-version; bh=CvFqnHLc8whHL1gfFU/TVoNH9CfNarGQdjuQIQZDBW4=; b=R0k+kGJlHrmbSAaowXhpDk04Nb+R8RdkIghWtZ349aIJWRrOdE5dh54DthYqHr7aHN fzYvVyHiDRJy7sG5/C0TF4qkwv8IfhgMIABSo0P1xc22A2avdB3BvmwSrJpdIfbBUEGW 8Vt/bpzQoAq4EXkhuHepGEokMgJI2h3KNjxhF1z83gvxUd4LC+ZEpPX3BL9igp0ClQ0R /3/5Z+E3Lnti/LO2WnENNQlURVXDdG6FayoMtYHE3uOhk7g/S380M+EkafEFGMiGgme6 kwYBUJ6hcNPrXyKyI9+sljZQNTSp0hpXTih1fCFn50WPGiAZseyOpF2E0W8ZBYV8TPwx QGSQ== X-Gm-Message-State: AODbwcDg2Y6LptM4Evzjw9/L01Qq0+I8K8eUSAkdaLoOKAiWmKSMd9f/ uMMEWhyFoS7BkA== X-Received: by 10.28.153.11 with SMTP id b11mr13666406wme.141.1494260491414; Mon, 08 May 2017 09:21:31 -0700 (PDT) Received: from cervin (ABayonne-551-1-52-214.w90-11.abo.wanadoo.fr. [90.11.67.214]) by smtp.gmail.com with ESMTPSA id s72sm19018325wmb.18.2017.05.08.09.21.30 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 08 May 2017 09:21:30 -0700 (PDT) References: <20170506154154.17836-1-m.othacehe@gmail.com> <20170506154154.17836-7-m.othacehe@gmail.com> <20170507223332.612b3785@scratchpost.org> User-agent: mu4e 0.9.18; emacs 25.2.1 From: Mathieu Othacehe To: Danny Milosavljevic Subject: Re: bug#26339: [PATCH v3 6/9] scripts: system: Adapt "reconfigure" to new bootloader API. In-reply-to: <20170507223332.612b3785@scratchpost.org> Date: Mon, 08 May 2017 18:21:28 +0200 Message-ID: <87r2zzs4jb.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 26339 Cc: 26339@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.5 (/) Hi, > Hi Mathieu, > >> +(define* (install-bootloader install-procedure >> + #:key >> + bootcfg bootcfg-location >> + device target) > > Maybe "installer" instead of "install-procedure"? It's not that important but it reads better I think... > Ok for installer. > Hmm, importing (guix build utils) twice (on different sides, I guess)? Could use a comment... Actually it's something pretty common, grep "guix build utils" in gnu/services for example. > >> + (install-proc >> + (let ((procedure (bootloader-configuration-installer >> + (operating-system-bootloader os))) >> + (target (or target "/"))) >> + (install-bootloader-derivation procedure bootloader device target))) > > Here, I'd use "bootloader-installer" instead of "install-proc" - because this specific procedure could install lots of things - it's the main entry point in a sense. Ok for install-proc -> bootloader-installer. > > Otherwise LGTM! I also think the general approach is good. Nice ! Thanks, Mathieu From debbugs-submit-bounces@debbugs.gnu.org Mon May 08 12:22:42 2017 Received: (at 26339) by debbugs.gnu.org; 8 May 2017 16:22:42 +0000 Received: from localhost ([127.0.0.1]:34609 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d7lQn-00044U-SH for submit@debbugs.gnu.org; Mon, 08 May 2017 12:22:41 -0400 Received: from mail-wr0-f173.google.com ([209.85.128.173]:34752) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d7lQm-00044I-Cw for 26339@debbugs.gnu.org; Mon, 08 May 2017 12:22:40 -0400 Received: by mail-wr0-f173.google.com with SMTP id l9so48842071wre.1 for <26339@debbugs.gnu.org>; Mon, 08 May 2017 09:22:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=references:user-agent:from:to:cc:subject:in-reply-to:date :message-id:mime-version; bh=06Wd6An9OLHTquW2RxFzJ07eBj9VAjCfMMcB0BpphlI=; b=JN58zrAMeqeX6d/RXy+k9HdR+elzyh2myjvP0BCNIQG+nGNOlH8Q9AjBnXgt6PR9Va 5Sm2/5Nv2FYFdKjeWm8qwtGkhk29sZ+shoBpkQ1oP8bjkRAWCrwOJDgtqCUoqlJWK76M qciBek/c0SbCLxiVtGPBE0s29ZaC2eeV7o9ShIszbgZayS0sZTZPK1gqw9smvOInsKsg 3a5FI43ILnOq1A8l6UeHdRQpg7lCnSYLim+oFXUPbbuRfYxeHLfRajPNM646brdMKLuF x6JRDkceVdmNrymWTlODjlOGlEfSGvAS3kQFDLTQ41kBWpSEcA2I3ZMY5AEOgVibQ2eo K9Fw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:references:user-agent:from:to:cc:subject :in-reply-to:date:message-id:mime-version; bh=06Wd6An9OLHTquW2RxFzJ07eBj9VAjCfMMcB0BpphlI=; b=p9fKeDCmZv3Xsbip5ldmrCj5BuagfCGKwoE8D2KqHOtbgXBQPs3Kd7YJPIQUNC+168 xAXBKRcaP68ghfG4uwg5mMqup9JsAmvm+/34pVz5UhsQZA3o0YM8HF8GW4vr/AFI4tsL q9RFiLNDvfXuMOZ9P7jXpNJRikc7UShzg4bVigP8rOcd7q+LBogr+TTb7Jvhhk3ZEabf 7nL/LTPeLx9/0AoavUJKAnF+hLjpGAOo5uoIwnie/ZZ4Iqi2JOZQ7rIPBLi6dG+ljqoq i3wuJVH3Eb/rrEjRZ0CXWZZUk8tHF+gA2vgL8zhtrhx6NC3yhYE9JD/QrK1iSXNUySk8 3TYQ== X-Gm-Message-State: AN3rC/4z/jvxBJWxL3iiqB5ddD3me9WaSPovMK3R4T8/U8vsoU4DK9ce Q4yYGYgrmEKrckGI X-Received: by 10.223.177.215 with SMTP id r23mr46369976wra.97.1494260554346; Mon, 08 May 2017 09:22:34 -0700 (PDT) Received: from cervin (ABayonne-551-1-52-214.w90-11.abo.wanadoo.fr. [90.11.67.214]) by smtp.gmail.com with ESMTPSA id f63sm11566507wmh.8.2017.05.08.09.22.33 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 08 May 2017 09:22:33 -0700 (PDT) References: <20170506154154.17836-1-m.othacehe@gmail.com> <20170506154154.17836-9-m.othacehe@gmail.com> <20170507225449.4794cf21@scratchpost.org> User-agent: mu4e 0.9.18; emacs 25.2.1 From: Mathieu Othacehe To: Danny Milosavljevic Subject: Re: bug#26339: [PATCH v3 8/9] scripts: system: Adapt "switch-generation" to new bootloader API. In-reply-to: <20170507225449.4794cf21@scratchpost.org> Date: Mon, 08 May 2017 18:22:32 +0200 Message-ID: <87pofjs4hj.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 26339 Cc: 26339@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: -2.3 (--) Danny Milosavljevic writes: >> + (install-proc > > "installer.drv" instead of "install-proc"? Maybe install-proc -> bootloader-installer to be coherent with previous reconfigure. > >> + (let ((procedure (bootloader-configuration-installer >> + boot-config))) > > "installer" instead of "procedure"? Ok for installer. From debbugs-submit-bounces@debbugs.gnu.org Mon May 08 12:24:33 2017 Received: (at 26339) by debbugs.gnu.org; 8 May 2017 16:24:33 +0000 Received: from localhost ([127.0.0.1]:34613 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d7lSb-00047P-61 for submit@debbugs.gnu.org; Mon, 08 May 2017 12:24:33 -0400 Received: from mail-wm0-f49.google.com ([74.125.82.49]:35763) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d7lSY-00047D-T2 for 26339@debbugs.gnu.org; Mon, 08 May 2017 12:24:31 -0400 Received: by mail-wm0-f49.google.com with SMTP id b84so60746421wmh.0 for <26339@debbugs.gnu.org>; Mon, 08 May 2017 09:24:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=references:user-agent:from:to:cc:subject:in-reply-to:date :message-id:mime-version; bh=gNo6PDW4+8LpAnrLBYBbSUktJXqsLJcvnds/4oi/EHc=; b=C/9tvH69v+aqdxdu2spJTaA3SxQ4g2b39bWo6ObjTkMonuIWeikjSIYOc0uLbUM1oZ fmkTbSDpwCWNV8CWEidECUL6sdqxHi/trmOuNpLHf40YqBElCf/rQHFQeY0d0ZLIUAUl NeFWG9ITuSdaZhQz321bzHiZuR7aEYI1MPbL5F3/tnlXmFFmyX4hjZyIE2zolVhRazaj v6eYfDIm5a55FJx+dplkgnyTOTxNBd0ITB+hY/lBTf9RNxqYVAIqs7HLlLR0dtsBUxMa 6PAcKWK8Z5i9Z1AoFGth8cYP4ezsE87LfxRw7n+QsCP5UfjHwkD4lKg0Fw31MVJxbEG4 ptIw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:references:user-agent:from:to:cc:subject :in-reply-to:date:message-id:mime-version; bh=gNo6PDW4+8LpAnrLBYBbSUktJXqsLJcvnds/4oi/EHc=; b=LVrAxM2omPx8D82K+CTu5U/2NNpbuyclj/uHjyo0CzmD9+Q8OfKf2+II9z/4UcbS+8 +kzGl/7KpVrH2ej22U959pcyWAgvZhxovZUnkbC1AHkpB46r88heWZkb/s/WFDFUgwy3 2GUHZBaE7fOJ+2kCjSNamCj+cLQ8c835F7MMNJMzngFuYoMVCF5sGE3/qTD3xmhv+Lb+ NgpCB8+ujhKMrnCZkBTsOB+8wHLhZB4tRLCQdZCg3K6bp/8DHokTsfKjyHliB4f3iPWU 5h/asAnRWg2S4COt47ZY0n0yLMKhulajRi6vwOGy/9DVuenuXDRfZQR9ihGnxf9VGWqt 667w== X-Gm-Message-State: AN3rC/7XnOAzGmvbVDg2aMCnMtr2xdPndGEZRh5m7o5sbl6Rl4qlAP7W cr5BpWvWV0+T+Q== X-Received: by 10.28.230.200 with SMTP id e69mr12148592wmi.70.1494260665312; Mon, 08 May 2017 09:24:25 -0700 (PDT) Received: from cervin (ABayonne-551-1-52-214.w90-11.abo.wanadoo.fr. [90.11.67.214]) by smtp.gmail.com with ESMTPSA id 133sm13473813wms.22.2017.05.08.09.24.24 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 08 May 2017 09:24:24 -0700 (PDT) References: <20170506154154.17836-1-m.othacehe@gmail.com> <20170506154154.17836-7-m.othacehe@gmail.com> <20170507223332.612b3785@scratchpost.org> <20170507225600.68cadfae@scratchpost.org> User-agent: mu4e 0.9.18; emacs 25.2.1 From: Mathieu Othacehe To: Danny Milosavljevic Subject: Re: bug#26339: [PATCH v3 6/9] scripts: system: Adapt "reconfigure" to new bootloader API. In-reply-to: <20170507225600.68cadfae@scratchpost.org> Date: Mon, 08 May 2017 18:24:23 +0200 Message-ID: <87o9v3s4eg.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 26339 Cc: 26339@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.5 (/) > This is actually a derivation, right? So "installer.drv" ... Ok for installer.drv. From debbugs-submit-bounces@debbugs.gnu.org Mon May 08 12:26:25 2017 Received: (at 26339) by debbugs.gnu.org; 8 May 2017 16:26:25 +0000 Received: from localhost ([127.0.0.1]:34620 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d7lUP-0004AM-9W for submit@debbugs.gnu.org; Mon, 08 May 2017 12:26:25 -0400 Received: from mail-wm0-f52.google.com ([74.125.82.52]:38283) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d7lUO-0004A4-63 for 26339@debbugs.gnu.org; Mon, 08 May 2017 12:26:24 -0400 Received: by mail-wm0-f52.google.com with SMTP id 142so71008767wma.1 for <26339@debbugs.gnu.org>; Mon, 08 May 2017 09:26:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=references:user-agent:from:to:cc:subject:in-reply-to:date :message-id:mime-version; bh=/5Azi5Hzcz6IpaGKpXyoNAUV/0hMAHBFaDYzo3yrsZM=; b=IwBXMBaPBnWSCzU1R9J0A4yZifWmgCdKGTL+BEj31IW1p0I3U47YrU7oaOsiI0fhkR o8BCushXP/XEUeYg6NZiWxhZdmgSPR6eXlXoF2QWuERYg8FGnBGqWXwqXUcBChLk7X5R epTZ46lFMSd0JG/Rbcgzt8h+M8ZAZTCTVD7U89WGMQObVJRvR8h8+QfZpGl/RlYUoFca PnkIbfft1k0+Ye6Es3Fd0iKt46z4HOWNh5VpZ1Tzby5RvsbBAuYNR5Z2Ko/lxFpwFHag vuNAVdl6f0WaDS3o5knkeiQQzTvmEOG5iNWp/vc0L9wQNvKqxdIT0pCGIqyWkxblauM/ LBUA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:references:user-agent:from:to:cc:subject :in-reply-to:date:message-id:mime-version; bh=/5Azi5Hzcz6IpaGKpXyoNAUV/0hMAHBFaDYzo3yrsZM=; b=nWCz57QeHW5Be2vvx8jmpySIzfJ3n5DNT63ikiQhMlUN/EbWYYFTJD2i0P1ER3kovi prcKsWUswmm1lbXZ4JInJF+bfHBJ5Y0xGBSHCgbHNHhH4kpPaM2Noad2Ex/Cc2fLDgiq cwnniOIDQel2GMgOQPOomfM23a02+Qv0IJsYw22IG1CXTWaQ2XXuWE31w9ACIUniZy1h nWEdbSKoySF1wOVyk7xifgVfBbS7DvOA2q0c6nQgaipbRUwrERA70i9TxLhauv1Y4eNI lGoUEnjaLp9VBZPZOHYwJBt/CJPrXRFKtkkDjdjojHInMtUWqHBW73GdEoHgXtRpx2Ig k10A== X-Gm-Message-State: AN3rC/4MmEDer/StL2lOdIG3j6PVWjoVRaXYHYPk4CloXwBZbWR2gXGd LyrdKleg3GolmhzZ X-Received: by 10.28.28.206 with SMTP id c197mr13997928wmc.59.1494260778521; Mon, 08 May 2017 09:26:18 -0700 (PDT) Received: from cervin (ABayonne-551-1-52-214.w90-11.abo.wanadoo.fr. [90.11.67.214]) by smtp.gmail.com with ESMTPSA id t85sm14035530wmt.23.2017.05.08.09.26.17 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 08 May 2017 09:26:17 -0700 (PDT) References: <20170506154154.17836-1-m.othacehe@gmail.com> <20170506154154.17836-8-m.othacehe@gmail.com> <20170507230829.22f0ce70@scratchpost.org> User-agent: mu4e 0.9.18; emacs 25.2.1 From: Mathieu Othacehe To: Danny Milosavljevic Subject: Re: bug#26339: [PATCH v3 7/9] scripts: system: Adapt "init" to new bootloader API. In-reply-to: <20170507230829.22f0ce70@scratchpost.org> Date: Mon, 08 May 2017 18:26:17 +0200 Message-ID: <87mvans4ba.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 26339 Cc: 26339@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.5 (/) > "bootloader-installer.drv" instead of "installer"? I think that bootloader-installer is fine as per reconfigure. > >>[reinstall-bootloader] >> - (install-proc >> + (installer >> (let ((procedure (bootloader-configuration-installer >> (operating-system-bootloader os))) >> (target (or target "/"))) > > "installer.drv" instead of "installer", and "installer" instead of "procedure". Also, deja vu. Patch 6/9 also includes something of this part. Ok for install-proc -> bootloader-install and procedure -> installer as per reconfigure. > > Otherwise LGTM! From debbugs-submit-bounces@debbugs.gnu.org Mon May 08 12:27:19 2017 Received: (at 26339) by debbugs.gnu.org; 8 May 2017 16:27:19 +0000 Received: from localhost ([127.0.0.1]:34626 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d7lVH-0004CF-J7 for submit@debbugs.gnu.org; Mon, 08 May 2017 12:27:19 -0400 Received: from mail-wm0-f48.google.com ([74.125.82.48]:33031) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d7lVF-0004C2-V7 for 26339@debbugs.gnu.org; Mon, 08 May 2017 12:27:18 -0400 Received: by mail-wm0-f48.google.com with SMTP id n198so18390571wmg.0 for <26339@debbugs.gnu.org>; Mon, 08 May 2017 09:27:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=references:user-agent:from:to:cc:subject:in-reply-to:date :message-id:mime-version; bh=b9GtbkzbdvSOpsquN2vBBZ0tzKb4Ho6qIT5Mwvlvna8=; b=oOSKeT1VEsnlqv76DVhzOlvtRK+K+zfrFrfCsUEaiZpE+4843UlapCAoCSCjeQBRBp RCBHb6vy5tkgGBWA5ilJJHsDMresopbbfqHgjpRXUkHR2DmlzZkxF+5VgeeNPZnxWZB4 0HrIxC0h8v2TsRezL/GIKjHYINz5LZHptaJcQb0JHqNdLZ89p7Gy3+uzpurK9aTKfEhS E3BMu0zB8ysNb05zLh/JNDMdt1Q0LLR4SONnipKrhQcaQhLjLkUgQdxalG5wKOlO1gvG nlRGLMWnFR6WAIZ1gpbPpRBz6LCdYU3AtNlmpBqyZw66XcqcHPQAQVfQYgJW9du28ws0 ZfYg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:references:user-agent:from:to:cc:subject :in-reply-to:date:message-id:mime-version; bh=b9GtbkzbdvSOpsquN2vBBZ0tzKb4Ho6qIT5Mwvlvna8=; b=Z4TxYU2Cqo7KwD+UMp7m5DGE54hZd56/Ib1pjC0/Z3bBU7OJzmcmIFmfBOSPLdJ2RX cgRA6ha4mop+RCy6C5MIAWqnsedT1ngIgt9rGhxOANspki6Oz5PlVO5GmDlvdre5Oatv sRNAi5Gx8fjNye0/vCqT2ojE81V8YRU8ys6EtYX8Wu63eRYvrI0Cwn0wZrV1Z6nqFER8 dpw+eUaHSWGizvgURXBSC4lgkjst/QzG0BlaGXGWBBm3lKKQ6lIAwP/tJhLt9e3LfV5b FQHzt65W2ZqTpOPbeJ7+DgHvqfuiMjW41r8P0PD+w1u6bQUf5bJktjFyLvgvCQeDsZ1T 4pmg== X-Gm-Message-State: AN3rC/6+miBsYMjm4L3WocclbLWa0zGg36njI+Jx7mhpW8uoTvd/1ozT orN92K/6ol7aJA== X-Received: by 10.28.128.202 with SMTP id b193mr12686450wmd.53.1494260832348; Mon, 08 May 2017 09:27:12 -0700 (PDT) Received: from cervin (ABayonne-551-1-52-214.w90-11.abo.wanadoo.fr. [90.11.67.214]) by smtp.gmail.com with ESMTPSA id f189sm9551422wmf.34.2017.05.08.09.27.11 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 08 May 2017 09:27:11 -0700 (PDT) References: <20170506154154.17836-1-m.othacehe@gmail.com> <20170506154154.17836-7-m.othacehe@gmail.com> <20170507231414.120ef6f4@scratchpost.org> User-agent: mu4e 0.9.18; emacs 25.2.1 From: Mathieu Othacehe To: Danny Milosavljevic Subject: Re: bug#26339: [PATCH v3 6/9] scripts: system: Adapt "reconfigure" to new bootloader API. In-reply-to: <20170507231414.120ef6f4@scratchpost.org> Date: Mon, 08 May 2017 18:27:10 +0200 Message-ID: <87lgq7s49t.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 26339 Cc: 26339@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.5 (/) > That doesn't actually install a bootloader derivation, right? Nope it just returns a derivation. > Maybe call it "bootloader-installer-derivation" instead? I hesitate to use ".drv" because it isn't a derivation yet - it just returns one. bootloader-installer-derivation is fine for me. > > Also, can you add a docstring? Sure ! From debbugs-submit-bounces@debbugs.gnu.org Mon May 08 15:47:42 2017 Received: (at 26339) by debbugs.gnu.org; 8 May 2017 19:47:42 +0000 Received: from localhost ([127.0.0.1]:60192 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d7odC-00037S-Dl for submit@debbugs.gnu.org; Mon, 08 May 2017 15:47:42 -0400 Received: from eggs.gnu.org ([208.118.235.92]:40879) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d7odB-00037G-7i for 26339@debbugs.gnu.org; Mon, 08 May 2017 15:47:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d7od2-000851-Re for 26339@debbugs.gnu.org; Mon, 08 May 2017 15:47:36 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:57281) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d7od2-00084x-OW; Mon, 08 May 2017 15:47:32 -0400 Received: from reverse-83.fdn.fr ([80.67.176.83]:59336 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1d7od2-0002gW-31; Mon, 08 May 2017 15:47:32 -0400 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) To: Danny Milosavljevic Subject: Re: bug#26339: [PATCH v2 01/12] system: Pass to grub. References: <20170417090148.13791-1-m.othacehe@gmail.com> <20170417090148.13791-2-m.othacehe@gmail.com> <87zienofiy.fsf@gnu.org> <20170508155109.19fa060d@scratchpost.org> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 19 =?utf-8?Q?Flor=C3=A9al?= an 225 de la =?utf-8?Q?R?= =?utf-8?Q?=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-unknown-linux-gnu Date: Mon, 08 May 2017 21:47:29 +0200 In-Reply-To: <20170508155109.19fa060d@scratchpost.org> (Danny Milosavljevic's message of "Mon, 8 May 2017 15:51:09 +0200") Message-ID: <874lwvku5q.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 26339 Cc: 26339@debbugs.gnu.org, Mathieu Othacehe 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: -5.0 (-----) Hi Danny, Danny Milosavljevic skribis: > I've pushed 087efec496b91e3763be2e11e208d4a8f4ef3d43 to master which is a= two-line change removing this circular dependency. This does not remove the circular dependency, it just expresses it differently, so I don=E2=80=99t think it will help. Using (module-ref (resolve-interface '(gnu system grub)) 'grub-configuration-file) would have achieved the effect you wanted. However, that=E2=80=99s pretty much a band-aid, so we should look for a way= to improve this. Thanks, Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Mon May 08 15:48:33 2017 Received: (at control) by debbugs.gnu.org; 8 May 2017 19:48:34 +0000 Received: from localhost ([127.0.0.1]:60197 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d7oe1-00038x-O4 for submit@debbugs.gnu.org; Mon, 08 May 2017 15:48:33 -0400 Received: from eggs.gnu.org ([208.118.235.92]:41069) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d7oe0-00038j-8M for control@debbugs.gnu.org; Mon, 08 May 2017 15:48:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d7ods-0000Bn-4K for control@debbugs.gnu.org; Mon, 08 May 2017 15:48:27 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:57290) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d7ods-0000Bj-1d for control@debbugs.gnu.org; Mon, 08 May 2017 15:48:24 -0400 Received: from reverse-83.fdn.fr ([80.67.176.83]:59342 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1d7odr-0002jC-E3 for control@debbugs.gnu.org; Mon, 08 May 2017 15:48:23 -0400 Date: Mon, 08 May 2017 21:48:21 +0200 Message-Id: <8737cfku4a.fsf@gnu.org> To: control@debbugs.gnu.org From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: control message for bug #26339 MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) 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: -5.0 (-----) severity 26339 important From debbugs-submit-bounces@debbugs.gnu.org Mon May 08 16:04:21 2017 Received: (at 26339) by debbugs.gnu.org; 8 May 2017 20:04:21 +0000 Received: from localhost ([127.0.0.1]:60222 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d7otJ-0005Oa-45 for submit@debbugs.gnu.org; Mon, 08 May 2017 16:04:21 -0400 Received: from dd1012.kasserver.com ([85.13.128.8]:60642) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d7otH-0005OR-Im for 26339@debbugs.gnu.org; Mon, 08 May 2017 16:04:20 -0400 Received: from localhost (77.118.221.44.wireless.dyn.drei.com [77.118.221.44]) by dd1012.kasserver.com (Postfix) with ESMTPSA id E18901CA1CB0; Mon, 8 May 2017 22:04:17 +0200 (CEST) Date: Mon, 8 May 2017 22:04:15 +0200 From: Danny Milosavljevic To: ludo@gnu.org (Ludovic =?ISO-8859-1?Q?Court=E8s?=) Subject: Re: bug#26339: [PATCH v2 01/12] system: Pass to grub. Message-ID: <20170508220415.0a18be95@scratchpost.org> In-Reply-To: <874lwvku5q.fsf@gnu.org> References: <20170417090148.13791-1-m.othacehe@gmail.com> <20170417090148.13791-2-m.othacehe@gmail.com> <87zienofiy.fsf@gnu.org> <20170508155109.19fa060d@scratchpost.org> <874lwvku5q.fsf@gnu.org> X-Mailer: Claws Mail 3.14.1 (GTK+ 2.24.31; x86_64-unknown-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 26339 Cc: 26339@debbugs.gnu.org, Mathieu Othacehe 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.7 (/) Hi Ludo, On Mon, 08 May 2017 21:47:29 +0200 ludo@gnu.org (Ludovic Court=C3=A8s) wrote: > This does not remove the circular dependency, it just expresses it > differently, so I don=E2=80=99t think it will help. Using >=20 > (module-ref (resolve-interface '(gnu system grub)) > 'grub-configuration-file) >=20 > would have achieved the effect you wanted. Hmm.... I've tested the @@-version locally by removing all the .go files an= d then doing guix system reconfigure ... which took ages every time. And i= t worked just fine, no errors, no warnings, nothing. Did I test it wrong? > However, that=E2=80=99s pretty much a band-aid, so we should look for a w= ay to > improve this. Yes, but as soon as the other bootloader patches are merged the band-aid wo= uld be gone. We have multiple choices here,=20 (1) revert all ~12 commits, or (2) do the band-aid, leave the commits in and review and merge the remainde= r later, or (3) review and merge all the other bootloader patches now... I don't have a strong preference. If I knew how flaky even simple changes = in these modules are I wouldn't have been in favor of refactoring them at a= ll... (really, just having u-boot with Grub as payload - and grub-efi as pa= rt of regular grub - would have been much simpler than this, in retrospect) Note that there are now two other patch series by two different people whic= h depend on these. From debbugs-submit-bounces@debbugs.gnu.org Mon May 08 16:06:37 2017 Received: (at 26339) by debbugs.gnu.org; 8 May 2017 20:06:37 +0000 Received: from localhost ([127.0.0.1]:60228 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d7ovU-0005SC-GT for submit@debbugs.gnu.org; Mon, 08 May 2017 16:06:36 -0400 Received: from eggs.gnu.org ([208.118.235.92]:44863) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d7ovQ-0005Rr-Jz for 26339@debbugs.gnu.org; Mon, 08 May 2017 16:06:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d7ovK-0007xv-6M for 26339@debbugs.gnu.org; Mon, 08 May 2017 16:06:27 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:57538) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d7ovG-0007xM-Bv; Mon, 08 May 2017 16:06:22 -0400 Received: from reverse-83.fdn.fr ([80.67.176.83]:59384 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1d7ovF-0000qd-9t; Mon, 08 May 2017 16:06:21 -0400 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) To: Mathieu Othacehe Subject: Re: bug#26339: [PATCH 02/18] system: Add extlinux support. References: <20170402135242.2958-1-m.othacehe@gmail.com> <20170402135242.2958-2-m.othacehe@gmail.com> Date: Mon, 08 May 2017 22:06:18 +0200 In-Reply-To: <20170402135242.2958-2-m.othacehe@gmail.com> (Mathieu Othacehe's message of "Sun, 2 Apr 2017 15:52:26 +0200") Message-ID: <87mvanjepx.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 26339 Cc: 26339@debbugs.gnu.org, David Craven 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: -5.0 (-----) Hello! Sorry for the delay, and thanks for reminding me of this patch. Mathieu Othacehe skribis: > From: David Craven > > * gnu/system.scm (operating-system): Add default bootloader. > (operating-system-grub.cfg): Use bootloader-configuration-file-procedur= e. > * gnu/system/grub.scm (bootloader-configuration->grub-configuration): New > variable. > (grub-configuration-file): Use bootloader-configuration->grub-configura= tion. > * guix/scripts/system.scm (profile-grub-entries): Rename system->grub-ent= ry to > system->boot-parameters and adjust accordingly. > (perform-action): Make bootloader optional. Use > bootloader-configuration-device. > * gnu/system/bootloader.scm: New file. > * gnu/local.mk (GNU_SYSTEM_MODULES): Add it. > * tests/system.scm: Adjust operating-system to new API. > * tests/guix-system.sh: Adjust operating-system to new API. [...] > +(define-record-type* > + bootloader-configuration make-bootloader-configuration > + bootloader-configuration? > + (bootloader bootloader-configuration-bootloader = ; package > + (default #f)) > + (device bootloader-configuration-device = ; string > + (default #f)) > + (menu-entries bootloader-configuration-menu-entries= ; list of > + (default '())) > + (default-entry bootloader-configuration-default-entr= y ; integer > + (default 0)) > + (timeout bootloader-configuration-timeout = ; integer > + (default 5)) > + (configuration-file-location bootloader-configuration-file-location > + (default #f)) > + (configuration-file-procedure bootloader-configuration-file-procedu= re ; procedure > + (default #f)) > + (install-procedure bootloader-configuration-install-proc= edure ; procedure > + (default #f)) > + (additional-configuration bootloader-configuration-additional-c= onfiguration ; record > + (default #f))) > + To avoid mistakes, I think we should remove default values for fields that really need to be set. For example, =E2=80=98configuration-file-locat= ion=E2=80=99 and =E2=80=98install-procedure=E2=80=99 should probably not have a default = value. I would rename =E2=80=98configuration-file-location=E2=80=99 to =E2=80=98co= nfiguration-file=E2=80=99. I=E2=80=99m fine with =E2=80=98configuration-file-procedure=E2=80=99, but = =E2=80=98generator=E2=80=99 is OK too. I would make =E2=80=98bootloader=E2=80=99 a delayed field (see the =E2=80= =98patches=E2=80=99 field of for an example of that.) That would avoid loading the package modules upfront. > +;;; > +;;; Bootloader configurations. > +;;; > + > +(define* (extlinux-configuration #:optional (config (bootloader-configur= ation))) > + (bootloader-configuration > + (inherit config) > + (configuration-file-location "/boot/extlinux/extlinux.conf") > + (configuration-file-procedure extlinux-configuration-file))) > + > +(define* (grub-configuration #:optional (config (bootloader-configuratio= n))) > + (bootloader-configuration > + (inherit config) > + (bootloader (@ (gnu packages bootloaders) grub)) > + (configuration-file-location "/boot/grub/grub.cfg") > + (configuration-file-procedure grub-configuration-file) > + (install-procedure install-grub) > + (additional-configuration > + (let ((additional-config (bootloader-configuration-additional-config= uration config))) > + (if additional-config additional-config %default-theme))))) > + > +(define* (grub-efi-configuration #:optional (config (bootloader-configur= ation))) > + (bootloader-configuration > + (inherit (grub-configuration config)) > + (bootloader (@ (gnu packages bootloaders) grub-efi)))) > + > +(define* (syslinux-configuration #:optional (config (bootloader-configur= ation))) > + (bootloader-configuration > + (inherit (extlinux-configuration config)) > + (bootloader (@ (gnu packages bootloaders) syslinux)) > + (install-procedure install-syslinux))) So it looks like this is the reason for all the default values. What about distinguishing two things: bootloader configuration, and bootloader implementation? This would be akin to the relation between and . We=E2=80=99d have , but without the =E2=80=98boot= loader=E2=80=99, =E2=80=98install-procedure=E2=80=99, =E2=80=98configuration-file-procedure= =E2=80=99, and =E2=80=98configuration-file=E2=80=99 fields. Instead of those 4 fields, we= =E2=80=99d have a single =E2=80=98bootloader=E2=80=99 field whose value would be a record. The record would contain these 4 fields (package, install-procedure, configuration-file, configuration-file-procedure), maybe along with a =E2=80=98name=E2=80=99 field to aid debugging. The record would define the implementation (GRUB, extlinux, u-boot, etc.) while would be purely configuration. How does that sound? We could do: (define grub-bootloader (bootloader (package grub) =E2=80=A6)) in (gnu bootloader grub). Likewise we=E2=80=99d define =E2=80=98extlinux-bootloader=E2=80=99 in (gnu = bootloader extlinux). The (gnu system) module would include (gnu bootloader), but it would not include (gnu bootloader grub) nor (gnu bootloader extlinux). Users would include one of these in their config file instead. > --- a/tests/system.scm > +++ b/tests/system.scm > @@ -36,7 +36,6 @@ > (host-name "komputilo") > (timezone "Europe/Berlin") > (locale "en_US.utf8") > - (bootloader (grub-configuration (device "/dev/sdX"))) > (file-systems (cons %root-fs %base-file-systems)) In gnu/system.scm, there=E2=80=99s: > + (bootloader operating-system-bootloader ; > + (default (extlinux-configuration))) If there was a default value here, I think it=E2=80=99d rather be GRUB ;-),= but probably we=E2=80=99d better not have a default at all. How would the installation device be found? Thanks a lot, and sorry for the loooong delay! Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Mon May 08 16:17:08 2017 Received: (at 26339) by debbugs.gnu.org; 8 May 2017 20:17:08 +0000 Received: from localhost ([127.0.0.1]:60264 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d7p5g-0005ot-K6 for submit@debbugs.gnu.org; Mon, 08 May 2017 16:17:08 -0400 Received: from dd1012.kasserver.com ([85.13.128.8]:34446) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d7p5f-0005ol-AB for 26339@debbugs.gnu.org; Mon, 08 May 2017 16:17:07 -0400 Received: from dayas.3.home (77.118.221.44.wireless.dyn.drei.com [77.118.221.44]) by dd1012.kasserver.com (Postfix) with ESMTPSA id 0FDDD1CA1CCB; Mon, 8 May 2017 22:17:05 +0200 (CEST) From: Danny Milosavljevic To: 26339@debbugs.gnu.org, ludo@gnu.org Subject: [PATCH] system: Remove circular dependency between (gnu system) and (gnu system grub). Date: Mon, 8 May 2017 22:16:55 +0200 Message-Id: <20170508201655.31097-1-dannym@scratchpost.org> X-Mailer: git-send-email 2.12.1 In-Reply-To: <874lwvku5q.fsf@gnu.org> References: <874lwvku5q.fsf@gnu.org> Tags: patch X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 26339 Cc: Danny Milosavljevic 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.7 (/) Followup to 087efec496b91e3763be2e11e208d4a8f4ef3d43. * gnu/system.scm: (operating-system-bootcfg): Refer to (gnu system grub) by module-ref. --- gnu/system.scm | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/gnu/system.scm b/gnu/system.scm index baba0b5df..9fc6cc5e7 100644 --- a/gnu/system.scm +++ b/gnu/system.scm @@ -847,9 +847,11 @@ populate the \"old entries\" menu." (uuid->string (file-system-device root-fs)) (file-system-device root-fs))) (entry (operating-system-boot-parameters os system root-device))) - ((@@ (gnu system grub) grub-configuration-file) (operating-system-bootloader os) - (list entry) - #:old-entries old-entries))) + ((module-ref (resolve-interface '(gnu system grub)) + 'grub-configuration-file) + (operating-system-bootloader os) + (list entry) + #:old-entries old-entries))) (define (fs->boot-device fs) "Given FS, a object, return a value suitable for use as the From debbugs-submit-bounces@debbugs.gnu.org Mon May 08 17:01:47 2017 Received: (at 26339) by debbugs.gnu.org; 8 May 2017 21:01:47 +0000 Received: from localhost ([127.0.0.1]:60311 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d7pmt-0000Gw-LS for submit@debbugs.gnu.org; Mon, 08 May 2017 17:01:47 -0400 Received: from dd1012.kasserver.com ([85.13.128.8]:45956) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d7pmr-0000Gn-Ha for 26339@debbugs.gnu.org; Mon, 08 May 2017 17:01:45 -0400 Received: from localhost (77.118.221.44.wireless.dyn.drei.com [77.118.221.44]) by dd1012.kasserver.com (Postfix) with ESMTPSA id C0A291CA32E0; Mon, 8 May 2017 23:01:43 +0200 (CEST) Date: Mon, 8 May 2017 23:01:39 +0200 From: Danny Milosavljevic To: 26339@debbugs.gnu.org, ludo@gnu.org Subject: Re: [PATCH] system: Remove circular dependency between (gnu system) and (gnu system grub). Message-ID: <20170508230139.0f03ab96@scratchpost.org> In-Reply-To: <20170508201655.31097-1-dannym@scratchpost.org> References: <874lwvku5q.fsf@gnu.org> <20170508201655.31097-1-dannym@scratchpost.org> X-Mailer: Claws Mail 3.14.1 (GTK+ 2.24.31; x86_64-unknown-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 26339 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.7 (/) Pushed this one patch to master after a successful local test (also without .go files). Let me know when it still doesn't work / we decide to, then I can revert all of them. I know which they are... But I think it's going to work now - and we are gonna need them regardless. From debbugs-submit-bounces@debbugs.gnu.org Tue May 09 03:03:17 2017 Received: (at 26339) by debbugs.gnu.org; 9 May 2017 07:03:17 +0000 Received: from localhost ([127.0.0.1]:60550 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d7zAz-0007Sy-Ee for submit@debbugs.gnu.org; Tue, 09 May 2017 03:03:17 -0400 Received: from eggs.gnu.org ([208.118.235.92]:37108) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d7zAx-0007Sn-DG for 26339@debbugs.gnu.org; Tue, 09 May 2017 03:03:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d7zAo-0007Ef-BC for 26339@debbugs.gnu.org; Tue, 09 May 2017 03:03:10 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:35736) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d7zAo-0007EY-7f; Tue, 09 May 2017 03:03:06 -0400 Received: from [193.50.110.181] (port=33508 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1d7zAm-00020S-8t; Tue, 09 May 2017 03:03:04 -0400 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) To: Danny Milosavljevic Subject: Re: bug#26339: [PATCH v2 01/12] system: Pass to grub. References: <20170417090148.13791-1-m.othacehe@gmail.com> <20170417090148.13791-2-m.othacehe@gmail.com> <87zienofiy.fsf@gnu.org> <20170508155109.19fa060d@scratchpost.org> <874lwvku5q.fsf@gnu.org> <20170508220415.0a18be95@scratchpost.org> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 20 =?utf-8?Q?Flor=C3=A9al?= an 225 de la =?utf-8?Q?R?= =?utf-8?Q?=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-unknown-linux-gnu Date: Tue, 09 May 2017 09:03:00 +0200 In-Reply-To: <20170508220415.0a18be95@scratchpost.org> (Danny Milosavljevic's message of "Mon, 8 May 2017 22:04:15 +0200") Message-ID: <878tm6bjh7.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 26339 Cc: 26339@debbugs.gnu.org, Mathieu Othacehe 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: -5.0 (-----) Hi, Danny Milosavljevic skribis: > On Mon, 08 May 2017 21:47:29 +0200 > ludo@gnu.org (Ludovic Court=C3=A8s) wrote: > >> This does not remove the circular dependency, it just expresses it >> differently, so I don=E2=80=99t think it will help. Using >>=20 >> (module-ref (resolve-interface '(gnu system grub)) >> 'grub-configuration-file) >>=20 >> would have achieved the effect you wanted. > > Hmm.... I've tested the @@-version locally by removing all the .go files = and then doing guix system reconfigure ... which took ages every time. And= it worked just fine, no errors, no warnings, nothing. Did I test it wrong? No apparently it worked on Hydra (but as I wrote before, the way build-aux/compile-all.scm builds things doesn=E2=80=99t catch macro-used-before-defined errors, so testing locally doesn=E2=80=99t help m= uch). I was concerned that @@ would effectively cause the same problem as #:use-module, but apparently that=E2=80=99s fine. >> However, that=E2=80=99s pretty much a band-aid, so we should look for a = way to >> improve this. > > Yes, but as soon as the other bootloader patches are merged the band-aid = would be gone. > > We have multiple choices here,=20 > (1) revert all ~12 commits, or > (2) do the band-aid, leave the commits in and review and merge the remain= der later, or > (3) review and merge all the other bootloader patches now... I think we=E2=80=99re fine with the band-aid for now. ;-) We=E2=80=99ll keep reviewing/merging the rest of the series, which apparent= ly provides a nicer bootloader abstraction. > I don't have a strong preference. If I knew how flaky even simple change= s in these modules are I wouldn't have been in favor of refactoring them at= all... (really, just having u-boot with Grub as payload - and grub-efi as = part of regular grub - would have been much simpler than this, in retrospec= t) There=E2=80=99s some flakiness, but I think the circular dependency in this= case was the consequence of a half-baked abstraction. Fortunately the rest of the patch series appears to address this, so we=E2=80=99re all good! I think it remains easy to refactor GuixSD, especially now that we have system tests. Let=E2=80=99s not throw the baby out with the bath water. ;= -) Thanks, Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Tue May 09 03:21:19 2017 Received: (at 26339) by debbugs.gnu.org; 9 May 2017 07:21:19 +0000 Received: from localhost ([127.0.0.1]:60561 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d7zSR-0007sG-CE for submit@debbugs.gnu.org; Tue, 09 May 2017 03:21:19 -0400 Received: from dd1012.kasserver.com ([85.13.128.8]:50714) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d7zSQ-0007s8-7i for 26339@debbugs.gnu.org; Tue, 09 May 2017 03:21:18 -0400 Received: from localhost (77.118.221.44.wireless.dyn.drei.com [77.118.221.44]) by dd1012.kasserver.com (Postfix) with ESMTPSA id B5D701CA0632; Tue, 9 May 2017 09:21:15 +0200 (CEST) Date: Tue, 9 May 2017 09:21:10 +0200 From: Danny Milosavljevic To: ludo@gnu.org (Ludovic =?ISO-8859-1?Q?Court=E8s?=) Subject: Re: bug#26339: [PATCH v2 01/12] system: Pass to grub. Message-ID: <20170509092110.2457f4a0@scratchpost.org> In-Reply-To: <878tm6bjh7.fsf@gnu.org> References: <20170417090148.13791-1-m.othacehe@gmail.com> <20170417090148.13791-2-m.othacehe@gmail.com> <87zienofiy.fsf@gnu.org> <20170508155109.19fa060d@scratchpost.org> <874lwvku5q.fsf@gnu.org> <20170508220415.0a18be95@scratchpost.org> <878tm6bjh7.fsf@gnu.org> X-Mailer: Claws Mail 3.14.1 (GTK+ 2.24.31; x86_64-unknown-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 26339 Cc: 26339@debbugs.gnu.org, Mathieu Othacehe 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.7 (/) Hi Ludo, On Tue, 09 May 2017 09:03:00 +0200 ludo@gnu.org (Ludovic Court=C3=A8s) wrote: > No apparently it worked on Hydra (but as I wrote before, the way > build-aux/compile-all.scm builds things doesn=E2=80=99t catch > macro-used-before-defined errors, so testing locally doesn=E2=80=99t help= much). Hmm, but aren't the .go files the compiled files? I've removed those befor= e testing. And the guix script has "--no-auto-compile". I don't really und= erstand this part yet... > I was concerned that @@ would effectively cause the same problem as > #:use-module, but apparently that=E2=80=99s fine. The idea was that it would load the module just in time when the procedure = is executed. In any case, module-ref can't hurt either, so that's in maste= r now. > We=E2=80=99ll keep reviewing/merging the rest of the series, which appare= ntly > provides a nicer bootloader abstraction. It does. I think the state in master now is good and we can review the rem= ainder at our leisure and I can stop hot-fixing things now. Phiew... :) > There=E2=80=99s some flakiness, but I think the circular dependency in th= is case > was the consequence of a half-baked abstraction. Yeah... > I think it remains easy to refactor GuixSD, especially now that we have > system tests. Let=E2=80=99s not throw the baby out with the bath water. = ;-) True, it's okay. Though, it would be nice if there was a way to run the interpreted version = locally - without it taking several hours each time. Would it be possible = for guile to have some static analysis that catches these things? Doesn't = seem that difficult: Just walk the modules, remember when you see record de= finitions, remember when you see record usage. In fact I'll write a throwa= way script to do just that for next time. (I've already got my Makefile ge= nerator to find Guile module cycles :) ) From debbugs-submit-bounces@debbugs.gnu.org Tue May 09 03:38:25 2017 Received: (at 26339) by debbugs.gnu.org; 9 May 2017 07:38:25 +0000 Received: from localhost ([127.0.0.1]:60575 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d7ziz-0008Iv-8B for submit@debbugs.gnu.org; Tue, 09 May 2017 03:38:25 -0400 Received: from mail-wm0-f67.google.com ([74.125.82.67]:34802) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d7zix-0008Ii-M2 for 26339@debbugs.gnu.org; Tue, 09 May 2017 03:38:24 -0400 Received: by mail-wm0-f67.google.com with SMTP id d127so12161808wmf.1 for <26339@debbugs.gnu.org>; Tue, 09 May 2017 00:38:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=references:user-agent:from:to:cc:subject:in-reply-to:date :message-id:mime-version; bh=6nM8W0mzyauqbel/uyvTR49F7bTVE4coIXa5jHIjveQ=; b=a/7HMCNpyMXrmC7/jVqjlM2jGbFkyjJnUQK8ikI6/f67vPUcpGrg7eQP6z3A2CVn4U 2VszQ2TAaRjfy2+XtkJcISBJX2DVqdOosSChev6o4MNBbwH8pforU14O6vfdAIaS7s86 nkM9nyDdcA8RORLe2SH/J/Os0if3oZa5Oo2JGyT5ReWLYP5t3yKUTP+misYH1/FDx2Dy qNlO4HKUgs8F2imvFWnwUIJW4w2C7+f4AkjWWEOUJpwbtYR6bJJ67fIXoRd9//NZFrch BTy0AQziaNFeE4kxA62Ax39x1INT2dzfvQDI7Z7KtIA8FuDfJNHsxuATKkGhaMU4YZZu OVuw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:references:user-agent:from:to:cc:subject :in-reply-to:date:message-id:mime-version; bh=6nM8W0mzyauqbel/uyvTR49F7bTVE4coIXa5jHIjveQ=; b=E10GEIllmqzYEEok6k4Nw2EQBk7rxRcHzEpIY3Fwkcmm7Hi7th44LGqG0nb7l1AI3V VMm06XILe2hRL+wqrytZXqE+iDAWnrO7I8cKBgfetk6fm4arOAOTI3J5+zscVZ7ohGSm JAZXg8KG/nYinvOvSDahdjKcfs8M5VOMVpWwAV04pLtdDbFMyvtBp9guw88gLra7zKLV 2JKzdXCTaU6ZD+hLmFVY7DwWii876n+MNbQHELs1xZT7DRUzGtwNmv+Hm/SQSjoD1gTV AJ0oHZfPJxhwg5vAs7wjcHW0Tk3R7f3B6CNZzqrkrsHQMibLUB8VhjmkJl3KbcOHXRpC hO7g== X-Gm-Message-State: AODbwcBn+8Tohxf3K8/8U+Frlx7EozkoZpp2UIrMe/SfeeZUHGcu+ZGK Ho5IQA8yli5dVw== X-Received: by 10.28.52.9 with SMTP id b9mr77024wma.11.1494315497553; Tue, 09 May 2017 00:38:17 -0700 (PDT) Received: from cervin ([80.12.59.39]) by smtp.gmail.com with ESMTPSA id x17sm11862092wrd.63.2017.05.09.00.38.15 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 09 May 2017 00:38:15 -0700 (PDT) References: <20170402135242.2958-1-m.othacehe@gmail.com> <20170402135242.2958-2-m.othacehe@gmail.com> <87mvanjepx.fsf@gnu.org> User-agent: mu4e 0.9.18; emacs 25.2.1 From: Mathieu Othacehe To: Ludovic =?utf-8?Q?Court=C3=A8s?= Subject: Re: bug#26339: [PATCH 02/18] system: Add extlinux support. In-reply-to: <87mvanjepx.fsf@gnu.org> Date: Tue, 09 May 2017 09:38:11 +0200 Message-ID: <871sryqy3g.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 26339 Cc: 26339@debbugs.gnu.org, David Craven 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.5 (/) Hi Ludo, > Sorry for the delay, and thanks for reminding me of this patch. No problem :) > The record would define the implementation (GRUB, extlinux, > u-boot, etc.) while would be purely > configuration. > > How does that sound? > I implemented most of this split between bootloader-configuration/bootloader and it's waaay better ! I still have one small concern. In following patches, I added boot-type (and boot-device) to parameters file. This allows to re-install the correct bootloader (on the correct device) when using "guix system switch-generation". What field could we store in parameters to be able to restore the correct bootloader ? My initial idea was to add every to a list, a look it up by name to restore the correct bootloader. So we could store the bootloader name in the parameters file. This sounds a bit hack, do you have a better idea ? Thanks ! Mathieu From debbugs-submit-bounces@debbugs.gnu.org Tue May 09 05:46:01 2017 Received: (at 26339) by debbugs.gnu.org; 9 May 2017 09:46:01 +0000 Received: from localhost ([127.0.0.1]:60635 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d81iS-0002nO-WF for submit@debbugs.gnu.org; Tue, 09 May 2017 05:46:01 -0400 Received: from eggs.gnu.org ([208.118.235.92]:46541) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d81iR-0002n9-6Q for 26339@debbugs.gnu.org; Tue, 09 May 2017 05:45:59 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d81iH-0003MW-JJ for 26339@debbugs.gnu.org; Tue, 09 May 2017 05:45:53 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:37527) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d81iH-0003MS-FL; Tue, 09 May 2017 05:45:49 -0400 Received: from [193.50.110.181] (port=35584 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1d81iG-0000oj-Sk; Tue, 09 May 2017 05:45:49 -0400 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) To: Danny Milosavljevic Subject: Re: bug#26339: [PATCH v2 01/12] system: Pass to grub. References: <20170417090148.13791-1-m.othacehe@gmail.com> <20170417090148.13791-2-m.othacehe@gmail.com> <87zienofiy.fsf@gnu.org> <20170508155109.19fa060d@scratchpost.org> <874lwvku5q.fsf@gnu.org> <20170508220415.0a18be95@scratchpost.org> <878tm6bjh7.fsf@gnu.org> <20170509092110.2457f4a0@scratchpost.org> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 20 =?utf-8?Q?Flor=C3=A9al?= an 225 de la =?utf-8?Q?R?= =?utf-8?Q?=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-unknown-linux-gnu Date: Tue, 09 May 2017 11:45:46 +0200 In-Reply-To: <20170509092110.2457f4a0@scratchpost.org> (Danny Milosavljevic's message of "Tue, 9 May 2017 09:21:10 +0200") Message-ID: <87lgq69xdh.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 26339 Cc: 26339@debbugs.gnu.org, Mathieu Othacehe 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: -5.0 (-----) Heya, Danny Milosavljevic skribis: > On Tue, 09 May 2017 09:03:00 +0200 > ludo@gnu.org (Ludovic Court=C3=A8s) wrote: > >> No apparently it worked on Hydra (but as I wrote before, the way >> build-aux/compile-all.scm builds things doesn=E2=80=99t catch >> macro-used-before-defined errors, so testing locally doesn=E2=80=99t hel= p much). > > Hmm, but aren't the .go files the compiled files? I've removed those bef= ore testing. And the guix script has "--no-auto-compile". I don't really u= nderstand this part yet... Hydra does compile Scheme files, but not with compile-all.scm. Instead it simply relies on Guile=E2=80=99s auto-compilation mechanism. So everyth= ing is built in one process but differently, which can lead to this subtle bug (essentially compile-all.scm has a load phase followed by a build phases, whereas auto-compilation builds files on demand.) >> I was concerned that @@ would effectively cause the same problem as >> #:use-module, but apparently that=E2=80=99s fine. > > The idea was that it would load the module just in time when the procedur= e is executed. In any case, module-ref can't hurt either, so that's in mas= ter now. Yup, thanks for the quick hot fix! >> We=E2=80=99ll keep reviewing/merging the rest of the series, which appar= ently >> provides a nicer bootloader abstraction. > > It does. I think the state in master now is good and we can review the r= emainder at our leisure and I can stop hot-fixing things now. Phiew... :) Indeed. :-) > Though, it would be nice if there was a way to run the interpreted versio= n locally - without it taking several hours each time. Would it be possibl= e for guile to have some static analysis that catches these things? Doesn'= t seem that difficult: Just walk the modules, remember when you see record = definitions, remember when you see record usage. In fact I'll write a thro= waway script to do just that for next time. (I've already got my Makefile = generator to find Guile module cycles :) ) It=E2=80=99s not that simple to find macro-used-before-defined errors, I=E2= =80=99m afraid. If you build each file separately (as in =E2=80=9Cfor i in *.scm; = do guild compile $i; done=E2=80=9D), you definitely catch this issue. Circular dependencies could be caught and (guix modules) has some of the tools for that, though they are not necessarily a problem. Thanks for your responsiveness! Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Tue May 09 05:51:17 2017 Received: (at 26339) by debbugs.gnu.org; 9 May 2017 09:51:17 +0000 Received: from localhost ([127.0.0.1]:60639 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d81nY-0002vD-Pk for submit@debbugs.gnu.org; Tue, 09 May 2017 05:51:16 -0400 Received: from eggs.gnu.org ([208.118.235.92]:47689) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d81nX-0002v0-5c for 26339@debbugs.gnu.org; Tue, 09 May 2017 05:51:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d81nQ-0005Qm-TE for 26339@debbugs.gnu.org; Tue, 09 May 2017 05:51:09 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=BAYES_20,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:37554) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d81nL-0005Mf-U8; Tue, 09 May 2017 05:51:03 -0400 Received: from [193.50.110.181] (port=35594 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1d81nL-00015z-7X; Tue, 09 May 2017 05:51:03 -0400 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) To: Mathieu Othacehe Subject: Re: bug#26339: [PATCH 02/18] system: Add extlinux support. References: <20170402135242.2958-1-m.othacehe@gmail.com> <20170402135242.2958-2-m.othacehe@gmail.com> <87mvanjepx.fsf@gnu.org> <871sryqy3g.fsf@gmail.com> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 20 =?utf-8?Q?Flor=C3=A9al?= an 225 de la =?utf-8?Q?R?= =?utf-8?Q?=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-unknown-linux-gnu Date: Tue, 09 May 2017 11:51:01 +0200 In-Reply-To: <871sryqy3g.fsf@gmail.com> (Mathieu Othacehe's message of "Tue, 09 May 2017 09:38:11 +0200") Message-ID: <87bmr29x4q.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 26339 Cc: 26339@debbugs.gnu.org, David Craven 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: -5.0 (-----) Hi Mathieu, Mathieu Othacehe skribis: > I implemented most of this split between > bootloader-configuration/bootloader and it's waaay better ! Woow, that was fast! :-) > I still have one small concern. In following patches, I added boot-type > (and boot-device) to parameters file. This allows to re-install the > correct bootloader (on the correct device) when using "guix system > switch-generation". > > What field could we store in parameters to be able to restore the > correct bootloader ?=20 Good question! I guess we need to store the name of the bootloader type in the =E2=80=9Cparameters=E2=80=9D file, and then look it up upon switch-g= eneration? But maybe we also need to store a reference to the bootloader package so that it isn=E2=80=99t GC=E2=80=99d? > My initial idea was to add every to a list, a look it up by > name to restore the correct bootloader. So we could store the bootloader > name in the parameters file. This sounds a bit hack, do you have a > better idea ? No better idea, sounds like a good start. I think the most important is to make sure that our current use case, where people always use GRUB, doesn=E2=80=99t break. Thanks, Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Tue May 09 06:25:34 2017 Received: (at 26339) by debbugs.gnu.org; 9 May 2017 10:25:34 +0000 Received: from localhost ([127.0.0.1]:60661 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d82Kj-0003nO-Sg for submit@debbugs.gnu.org; Tue, 09 May 2017 06:25:34 -0400 Received: from eggs.gnu.org ([208.118.235.92]:54378) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d82Kh-0003nC-Lf for 26339@debbugs.gnu.org; Tue, 09 May 2017 06:25:31 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d82Kb-0000zA-NI for 26339@debbugs.gnu.org; Tue, 09 May 2017 06:25:26 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:37875) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d82KW-0000yB-17; Tue, 09 May 2017 06:25:20 -0400 Received: from [193.50.110.181] (port=36548 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1d82KV-00029r-D6; Tue, 09 May 2017 06:25:19 -0400 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) To: Mathieu Othacehe Subject: Re: bug#26339: [PATCH 02/18] system: Add extlinux support. References: <20170402135242.2958-1-m.othacehe@gmail.com> <20170402135242.2958-2-m.othacehe@gmail.com> <87mvanjepx.fsf@gnu.org> <871sryqy3g.fsf@gmail.com> Date: Tue, 09 May 2017 12:25:17 +0200 In-Reply-To: <871sryqy3g.fsf@gmail.com> (Mathieu Othacehe's message of "Tue, 09 May 2017 09:38:11 +0200") Message-ID: <87lgq68gz6.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 26339 Cc: 26339@debbugs.gnu.org, David Craven 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: -5.0 (-----) Hello! Mathieu Othacehe skribis: >> The record would define the implementation (GRUB, extlinux, >> u-boot, etc.) while would be purely >> configuration. >> >> How does that sound? >> > > I implemented most of this split between > bootloader-configuration/bootloader and it's waaay better ! Just to be clear: that will be =E2=80=9Cv4=E2=80=9D of the patch series, ri= ght? Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Tue May 09 10:16:51 2017 Received: (at 26339) by debbugs.gnu.org; 9 May 2017 14:16:51 +0000 Received: from localhost ([127.0.0.1]:34276 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d85wZ-0002zP-6z for submit@debbugs.gnu.org; Tue, 09 May 2017 10:16:51 -0400 Received: from out4-smtp.messagingengine.com ([66.111.4.28]:49165) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d85wW-0002zG-F2 for 26339@debbugs.gnu.org; Tue, 09 May 2017 10:16:49 -0400 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id 629EE20932; Tue, 9 May 2017 10:16:47 -0400 (EDT) Received: from frontend1 ([10.202.2.160]) by compute5.internal (MEProxy); Tue, 09 May 2017 10:16:47 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fastmail.com; h= cc:content-type:date:from:in-reply-to:message-id:mime-version :references:subject:to:x-me-sender:x-me-sender:x-sasl-enc :x-sasl-enc; s=fm1; bh=JNv4eWHgbHLna975V1ytfmsstr8wqsFMjPy/0+nYo 1g=; b=AQH/l9PAlTok+SIXISUkyUwkKqMbxfQro2gq6S9/xIobA60j5K4iqPrvz X5wR5hcf12kJb1sB0dVekk4Tx44/Kg6KGsYNwXEErtgbo0FmVy+WSikCaCiRvjYw yowGFsAAQY14ufduKyS69PuCID8ZFLF1LAg7n/NHxugAxXWlSmO7Pcli8JAYYKm5 GhYbLjdweCa7UG/ofh+JgHTB57mBU2HgaiUGPpge19dEMsZ2wuGcfFPPsycyg9D7 sdahIq39N4ciMPP88ae02TPqCCtWdQWAjAO+UPfub2D4RGK69T6duZL6hg5UPQ9I M3wVI7N6jK6hjViMDAjNFAtN7QOzg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc:x-sasl-enc; s=fm1; bh=JNv4eWHgbHLna975V1 ytfmsstr8wqsFMjPy/0+nYo1g=; b=ViZnvvpFNyzTkslMye5+xA7B95lBh4llFh 5680g9bUBd4V198Cd7TeD7N6p9vWaix/naAot3ZkBsCE2GQTjgwYWlf3LsJp04xl 14SInlaNsNlyQxs5pozIIitB6bUvSmZBdQv+8stnXfqyE+6NQJXThslpeW4A66Xe tgV99ClgWbjixU5IB75ISfj2uLWvFP+OkSEcYiw00dkahxzdqUDydAhdu33AgVJj pa1e0QOodHhzsuV8YU7cM5ttuUSqzQIkhof03AxtXAcLxjSPcqn0/c2AnPbHrmC/ Y56VmpfmxmGejcSfXw6i/TZIDG3uLoQWda+9tuPTMVhTTtF8PTXQ== X-ME-Sender: X-Sasl-enc: kENcSRScQMHFDqRJtRYNMbvHHa3Yz5QHQF1Qj0XG1QXu 1494339406 Received: from localhost (unknown [188.113.81.93]) by mail.messagingengine.com (Postfix) with ESMTPA id E13E27E9E4; Tue, 9 May 2017 10:16:46 -0400 (EDT) From: Marius Bakke To: Mathieu Othacehe , Danny Milosavljevic Subject: Re: bug#26339: [PATCH v2 01/12] system: Pass to grub. In-Reply-To: <87tw4vs89q.fsf@gmail.com> References: <20170417090148.13791-1-m.othacehe@gmail.com> <20170417090148.13791-2-m.othacehe@gmail.com> <87zienofiy.fsf@gnu.org> <20170508155109.19fa060d@scratchpost.org> <87tw4vs89q.fsf@gmail.com> User-Agent: Notmuch/0.24.1 (https://notmuchmail.org) Emacs/25.2.1 (x86_64-unknown-linux-gnu) Date: Tue, 09 May 2017 16:16:45 +0200 Message-ID: <87shkew1wy.fsf@fastmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 26339 Cc: 26339@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.7 (/) --=-=-= Content-Type: text/plain Mathieu Othacehe writes: > Hi Danny, > >> Also, you are right, this will eventually support other bootloaders - but right now the remainder is in review. The parts that are pushed already just make boot-parameters not weird. > > Thanks for the patch. I should be able to remove those lines in the v4 > of my bootloader serie if everything is going ok. > > I'll submit it tomorrow with the other renamings you suggested in v3. Hi Mathieu, Thanks a lot for working on this. I've tested it extensively while working on UEFI support and it works great with native EFI grub[0]. Can you push the updated patches to a "wip-bootloader" branch on Savannah? Please also send a `git request-pull` here ;-) No comments on the code, but I did notice many docstrings need to be updated. [0] I had that working, but since the native grub-install tries to update EFI variables in qemu, the grub-mksnapshot trick was necessary anyway for a generic image. --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCgAdFiEEu7At3yzq9qgNHeZDoqBt8qM6VPoFAlkRz00ACgkQoqBt8qM6 VPrdXAgAll+q2apv8CDA/mwHapYot+Fn01ydcQzDo4RRaD1jKJklZHh8wxp5kUpb l4Io80iX+anjLwonjvFD78RsZHx0UH/YLYwuD7ezcT3RxGKgWxWTtIBPDXA16gdS qk1I0K8+BigIcetCD6tcdiumf3kCRXSGjtcuBs0c51ASY55oAXSjkd6EFcYjicP6 H5Sde65rcABm44W5RrVa+kKHRuFfSnv9DNlvxPiw0aTvq+zIWJtgGmNLCHe+CrJ2 +Erv+5Xp1ETvT5x3h1z9CKrao4ExEu2tes3iZ9H5zTCAEgvv6zjE0SyMKFEEo9ws qdc7uneO5InbL3ytPG6Uf2T2yFfRYg== =tQ4Y -----END PGP SIGNATURE----- --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Tue May 09 10:29:57 2017 Received: (at 26339) by debbugs.gnu.org; 9 May 2017 14:29:57 +0000 Received: from localhost ([127.0.0.1]:34294 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d869F-0003IL-GZ for submit@debbugs.gnu.org; Tue, 09 May 2017 10:29:57 -0400 Received: from mail-wr0-f194.google.com ([209.85.128.194]:35214) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d869E-0003I8-GC for 26339@debbugs.gnu.org; Tue, 09 May 2017 10:29:56 -0400 Received: by mail-wr0-f194.google.com with SMTP id g12so542177wrg.2 for <26339@debbugs.gnu.org>; Tue, 09 May 2017 07:29:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=references:user-agent:from:to:cc:subject:in-reply-to:date :message-id:mime-version:content-transfer-encoding; bh=ziapD7bI2IZwk+mmONRx+aXn5ZU19ICgLOzZHvJkW9Q=; b=toweJ5JKS68R/xxlgm9k3KCyhprKs4j623UOKZb6cPTtXULD4Dh81pu2mQ7s8VONWc dtLBDlakRQ8b10NHFghUvQGV9hca5ECkrl4GKR/lrE5HSIJrVwX9KlvjT/r8CTh7u3gN BtmJYojRdyRgKtdo2gmlrszKnyjUh69khmuG785o8CRi5pqzv6BSKh59seruF5InrTF1 cLk+QIN5TCm3sQyvFa3bit07yrT0We3yFClR5FUcv6tfsNKiDcqOUU4QjY6I/koDpcTO pZAhf2duXIHdnPnUvVXM04L11SSuKDQo58Miarr32llewz941uNx8bFyH0ilH3dtvfUV WFlQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:references:user-agent:from:to:cc:subject :in-reply-to:date:message-id:mime-version:content-transfer-encoding; bh=ziapD7bI2IZwk+mmONRx+aXn5ZU19ICgLOzZHvJkW9Q=; b=A/9a+1FS8N5TJdFT+SGv6Jc7aAVCaIZ2LbZoglGTCLg0kaa8YOL335Yiep9bpyRX03 93uUfxs/GG4fEUbgOER58TbturGUyhNWZ4FLmFOpRY04jfIsI0gLSIod9uUPNHL40ycL w4fZBUud6j9HsqZKvfBcGnrC+Of0h2JKmKOKYmuaKB/2+B1JqVumw6jNSomEd1AjxTHp fNj2wXeat23+Rxk8fKE4+tCrb/m+pc5XxeHdMbYiTB2TPi6pwYl1MkmUtT5IYsOiLF5/ bkvXYx+aFvtYuvkK4nxqPcmcI0LUOpfpeQLH/1hn88CVk9EWChYL4EonxN7DYA1IplZJ NyEg== X-Gm-Message-State: AODbwcDyXCv8salLCODOsR0lrgKZW1NldtB/aRmGLMDViQE4uT8cQqpi YBpLZJnopu/Fz/0/ X-Received: by 10.28.74.70 with SMTP id x67mr314069wma.137.1494340190675; Tue, 09 May 2017 07:29:50 -0700 (PDT) Received: from zbook ([46.218.109.88]) by smtp.gmail.com with ESMTPSA id k4sm322756wmf.12.2017.05.09.07.29.49 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 09 May 2017 07:29:49 -0700 (PDT) References: <20170402135242.2958-1-m.othacehe@gmail.com> <20170402135242.2958-2-m.othacehe@gmail.com> <87mvanjepx.fsf@gnu.org> <871sryqy3g.fsf@gmail.com> <87bmr29x4q.fsf@gnu.org> User-agent: mu4e 0.9.18; emacs 25.2.1 From: Mathieu Othacehe To: Ludovic =?utf-8?Q?Court=C3=A8s?= Subject: Re: bug#26339: [PATCH 02/18] system: Add extlinux support. In-reply-to: <87bmr29x4q.fsf@gnu.org> Date: Tue, 09 May 2017 16:30:28 +0200 Message-ID: <864lwuje63.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 26339 Cc: 26339@debbugs.gnu.org, David Craven 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.3 (--) > Woow, that was fast! :-) I had time to kill during a train trip :) > Good question! I guess we need to store the name of the bootloader type > in the “parameters” file, and then look it up upon switch-generation? > But maybe we also need to store a reference to the bootloader package so > that it isn’t GC’d? We have three options for switch-generation : 1. Do not reinstall bootloader, only update config (current behaviour). -> It was ok with one bootloader, it's more problematic with multiple bootloaders. For example switching between two generations with two different bootloaders. 2. Save the bootloader type in "parameters" and reinstall bootloader (current bootloader build, not necessarily the one used when creating this generation) -> It's the option I choose in my series. 3. Same as 2. but also save bootloader used (store reference) and add a gc-root to keep it around. I can try to implement option 3 if you're ok ? > No better idea, sounds like a good start. > Ok. > I think the most important is to make sure that our current use case, > where people always use GRUB, doesn’t break. With my basic-one-unencrypted-partition setup it work fine, but it would be great if people with more complex setup could try this serie :) Thanks, Mathieu From debbugs-submit-bounces@debbugs.gnu.org Tue May 09 10:31:34 2017 Received: (at 26339) by debbugs.gnu.org; 9 May 2017 14:31:34 +0000 Received: from localhost ([127.0.0.1]:34298 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d86An-0003M3-R6 for submit@debbugs.gnu.org; Tue, 09 May 2017 10:31:33 -0400 Received: from mail-wr0-f182.google.com ([209.85.128.182]:33846) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d86Am-0003Lq-Hl for 26339@debbugs.gnu.org; Tue, 09 May 2017 10:31:32 -0400 Received: by mail-wr0-f182.google.com with SMTP id l9so1573020wre.1 for <26339@debbugs.gnu.org>; Tue, 09 May 2017 07:31:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=references:user-agent:from:to:cc:subject:in-reply-to:date :message-id:mime-version:content-transfer-encoding; bh=zGZ0sqAlMVW3ndrp4nq98jZGGLH/Fx8ae4akQVJa7aw=; b=nzLBjbVPhcnwJhoymPYeM4WiEru8E/ZzXgyiHAtuIIqcFym+C6GP789CKsWVFVqiei 5fYwuBSzXpSZi9paLODZevZzjK89ZZNcsu+J5n8j51R6dvszc82KLC7EJ6LTA50RGaRh ayqg/l0PJJuE7UDZrUDx+y1oOXEu1affr+TjYUqV7sdH5AzMiX5CutjKbuS1ml5EZ0R7 jDADQ2uvwRAPpz+HdcbSJw5Gtytbgu1TYXeXS7STBrQeDD2sufG777dpRF/l4fynSTtp q9QkBcf5wavVKnbOBroNSxwx+OuR9aTA+5xzimyxihAYigIFg/wYyhLLuwplHlhxfpu8 bUgg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:references:user-agent:from:to:cc:subject :in-reply-to:date:message-id:mime-version:content-transfer-encoding; bh=zGZ0sqAlMVW3ndrp4nq98jZGGLH/Fx8ae4akQVJa7aw=; b=n2T4AyIHxaNjO2+Rgfu4eZPxED5XvOvzcoRD3Gy5IOwdxu9meMvMEojkCU9u694vXT /+PHILVOzOiTKXPglI7fY32qGAT4zFoJXE2e/HYExU0iXiSsGferectV1KQibwFOYBtB VGcDafK32qpqnFJ2Lync8LQd+PcjMqyAZ5zXiubuTsh8bxpwr+5SYkChAz+/fVJPEmx0 PXXhiMSffy29xi+Ep7Gx0PbXJKYJrQz4VmwpVhR/OY+UoUTcHXUXZ2OnvOOJVgqaTQiW n/nj2crch/EZaCjVAJ/jOy4r6KCnzwEMqBTU370lBACbhW+kcKhYHIDdI1qNvOF+rVh+ uWWw== X-Gm-Message-State: AODbwcDMRdDgiuIE3AKoLGi8twbEr3NmKDlOisrFDKBdXThhY3b/1ouK pbTc+1uHkJMv4w== X-Received: by 10.28.27.197 with SMTP id b188mr339791wmb.61.1494340286895; Tue, 09 May 2017 07:31:26 -0700 (PDT) Received: from zbook ([46.218.109.88]) by smtp.gmail.com with ESMTPSA id o18sm69873wrb.47.2017.05.09.07.31.26 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 09 May 2017 07:31:26 -0700 (PDT) References: <20170402135242.2958-1-m.othacehe@gmail.com> <20170402135242.2958-2-m.othacehe@gmail.com> <87mvanjepx.fsf@gnu.org> <871sryqy3g.fsf@gmail.com> <87lgq68gz6.fsf@gnu.org> User-agent: mu4e 0.9.18; emacs 25.2.1 From: Mathieu Othacehe To: Ludovic =?utf-8?Q?Court=C3=A8s?= Subject: Re: bug#26339: [PATCH 02/18] system: Add extlinux support. In-reply-to: <87lgq68gz6.fsf@gnu.org> Date: Tue, 09 May 2017 16:32:04 +0200 Message-ID: <8637ceje3f.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 26339 Cc: 26339@debbugs.gnu.org, David Craven 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.3 (--) > Just to be clear: that will be “v4” of the patch series, right? Yes, with your review and the last one from Danny on v3 :) Mathieu From debbugs-submit-bounces@debbugs.gnu.org Tue May 09 10:35:56 2017 Received: (at 26339) by debbugs.gnu.org; 9 May 2017 14:35:56 +0000 Received: from localhost ([127.0.0.1]:34302 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d86F2-0003S0-BR for submit@debbugs.gnu.org; Tue, 09 May 2017 10:35:56 -0400 Received: from mail-wr0-f194.google.com ([209.85.128.194]:32771) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d86F0-0003Rl-Cb for 26339@debbugs.gnu.org; Tue, 09 May 2017 10:35:54 -0400 Received: by mail-wr0-f194.google.com with SMTP id w50so612893wrc.0 for <26339@debbugs.gnu.org>; Tue, 09 May 2017 07:35:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=references:user-agent:from:to:cc:subject:in-reply-to:date :message-id:mime-version; bh=b8U02ozIVOuH5EaBmFDLUKTId9e4DHfmZv6eoyr25ok=; b=TpwAVJ7W39alfTFyGRWelNI8NcE1+IL8m/lXBvELxAbYj+ON/VilWVkzy8xky38jb3 irTkTtWaA/95eD+qNun4aTsIfSZRkazH0PVLT2MaSF/YSxhuKCT3LJmSSl057fnNlrbb egaSg63zBoQKyYw8uFKPwEUTHE4JTyn33zAKKawGvQxMIs3OWiN6wNZ9/jTUvoDepHgD 0Aue6kJtyo3R66/4H2loRI0yApscLXAl4TKj3Yj+guizvlKVQD59JE1mu7RUqdgdkUfs WtwKZBt9vh5wNfrmrspw/iQp1zosYwhgGtL4sezdNH0GyDWtMYYw0sPKmIEZzV4LX+zj 7tVA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:references:user-agent:from:to:cc:subject :in-reply-to:date:message-id:mime-version; bh=b8U02ozIVOuH5EaBmFDLUKTId9e4DHfmZv6eoyr25ok=; b=FtruCHkftjdgcKhHY6LQVozc1Z7mFpKg4C3qZV1SM03ZkAWb62Q//0zvMVxdyu124m X85GZMos5NsKXjEmTGxQ7h05eXmNUTCEAOV0poVXpXYs6vX9Dfl+8+r2LYgEEeQK2NBu iZPuTFmXeFm8jpMpRw5az2tuJdyeYSiaSi+KsCjZ3PmwjZK8ljFQkQg5EI0ruv+3htmE Aacp0IAxKGteigqkBQ78Y7udp7cbIED1bp2PwWj9nzCYmyvEkLFNAvovqDgwhgdl60Z6 tSg3yu5yY7vNzXbd7k4k2/Jtbh3YVRbucBFevDbTYw5v0CP6yXdavdAsxMNaW1A89zOM 5Q2A== X-Gm-Message-State: AODbwcCOYzwdBQPn/cj4HF2WwtCBbjXZKxfDrXsBzik1BN2QbjZbZE9w Bv3yNz/4gt6Diw== X-Received: by 10.223.139.199 with SMTP id w7mr296583wra.92.1494340548741; Tue, 09 May 2017 07:35:48 -0700 (PDT) Received: from zbook ([46.218.109.88]) by smtp.gmail.com with ESMTPSA id w186sm424374wme.26.2017.05.09.07.35.47 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 09 May 2017 07:35:47 -0700 (PDT) References: <20170417090148.13791-1-m.othacehe@gmail.com> <20170417090148.13791-2-m.othacehe@gmail.com> <87zienofiy.fsf@gnu.org> <20170508155109.19fa060d@scratchpost.org> <87tw4vs89q.fsf@gmail.com> <87shkew1wy.fsf@fastmail.com> User-agent: mu4e 0.9.18; emacs 25.2.1 From: Mathieu Othacehe To: Marius Bakke Subject: Re: bug#26339: [PATCH v2 01/12] system: Pass to grub. In-reply-to: <87shkew1wy.fsf@fastmail.com> Date: Tue, 09 May 2017 16:36:26 +0200 Message-ID: <861sryjdw5.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 26339 Cc: 26339@debbugs.gnu.org, Danny Milosavljevic 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.3 (--) Hi Marius, > Thanks a lot for working on this. I've tested it extensively while > working on UEFI support and it works great with native EFI grub[0]. Can > you push the updated patches to a "wip-bootloader" branch on Savannah? > Please also send a `git request-pull` here ;-) Cool ! Thanks for your feedback ! I'll publish my v4 in wip-bootloader then. > No comments on the code, but I did notice many docstrings need to be > updated. Ok, Danny pointed some of them, I'll add the missing ones. Thanks, Mathieu From debbugs-submit-bounces@debbugs.gnu.org Tue May 09 16:40:38 2017 Received: (at 26339) by debbugs.gnu.org; 9 May 2017 20:40:38 +0000 Received: from localhost ([127.0.0.1]:34557 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d8Bvy-0007EN-MH for submit@debbugs.gnu.org; Tue, 09 May 2017 16:40:38 -0400 Received: from eggs.gnu.org ([208.118.235.92]:53745) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d8Bvw-0007E7-Ra for 26339@debbugs.gnu.org; Tue, 09 May 2017 16:40:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d8Bvq-0006wq-Sn for 26339@debbugs.gnu.org; Tue, 09 May 2017 16:40:31 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:46842) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d8Bvm-0006w4-PF; Tue, 09 May 2017 16:40:26 -0400 Received: from reverse-83.fdn.fr ([80.67.176.83]:60382 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1d8Bvm-000199-5C; Tue, 09 May 2017 16:40:26 -0400 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) To: Mathieu Othacehe Subject: Re: bug#26339: [PATCH 02/18] system: Add extlinux support. References: <20170402135242.2958-1-m.othacehe@gmail.com> <20170402135242.2958-2-m.othacehe@gmail.com> <87mvanjepx.fsf@gnu.org> <871sryqy3g.fsf@gmail.com> <87bmr29x4q.fsf@gnu.org> <864lwuje63.fsf@gmail.com> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 20 =?utf-8?Q?Flor=C3=A9al?= an 225 de la =?utf-8?Q?R?= =?utf-8?Q?=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-unknown-linux-gnu Date: Tue, 09 May 2017 22:40:23 +0200 In-Reply-To: <864lwuje63.fsf@gmail.com> (Mathieu Othacehe's message of "Tue, 09 May 2017 16:30:28 +0200") Message-ID: <87inl9zruw.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 26339 Cc: 26339@debbugs.gnu.org, David Craven 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: -5.0 (-----) Hello! Mathieu Othacehe skribis: >> Woow, that was fast! :-) > > I had time to kill during a train trip :) I like train trips too. :-) >> Good question! I guess we need to store the name of the bootloader type >> in the =E2=80=9Cparameters=E2=80=9D file, and then look it up upon switc= h-generation? >> But maybe we also need to store a reference to the bootloader package so >> that it isn=E2=80=99t GC=E2=80=99d? > > We have three options for switch-generation : > > 1. Do not reinstall bootloader, only update config (current behaviour). > > -> It was ok with one bootloader, it's more problematic with multiple > bootloaders. For example switching between two generations with two > different bootloaders. OTOH, if it turns out to be safer to keep the current bootloader, which is likely I think, then perhaps it=E2=80=99s best to not try to change. I mean, I prefer a rollback that doesn=E2=80=99t roll back the bootloader o= ver a rollback that tries to do something smart and makes the system unbootable. Of course, if we can make it safe to reinstall the previous bootloader, that=E2=80=99s optimal. > 2. Save the bootloader type in "parameters" and reinstall bootloader > (current bootloader build, not necessarily the one used when creating > this generation) > > -> It's the option I choose in my series. OK. I guess I should read that part of the series. > 3. Same as 2. but also save bootloader used (store reference) and add a > gc-root to keep it around. > > I can try to implement option 3 if you're ok ? Hmm maybe, I need to investigate. >> I think the most important is to make sure that our current use case, >> where people always use GRUB, doesn=E2=80=99t break. > > With my basic-one-unencrypted-partition setup it work fine, but it would > be great if people with more complex setup could try this serie :) Did you try something like: make check-system TESTS=3D"encrypted-root-os btrfs-root-os" ? It takes quite a bit of time to run, but it=E2=80=99s a good starting po= int to test these things. Thanks! Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Thu May 11 20:02:49 2017 Received: (at 26339) by debbugs.gnu.org; 12 May 2017 00:02:50 +0000 Received: from localhost ([127.0.0.1]:39416 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d8y2j-0003Ra-LO for submit@debbugs.gnu.org; Thu, 11 May 2017 20:02:49 -0400 Received: from dd1012.kasserver.com ([85.13.128.8]:52550) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d8y2g-0003RR-9Q for 26339@debbugs.gnu.org; Thu, 11 May 2017 20:02:47 -0400 Received: from localhost (77.118.153.245.wireless.dyn.drei.com [77.118.153.245]) by dd1012.kasserver.com (Postfix) with ESMTPSA id 1627F1CA030B; Fri, 12 May 2017 02:02:45 +0200 (CEST) Date: Fri, 12 May 2017 02:02:43 +0200 From: Danny Milosavljevic To: ludo@gnu.org (Ludovic =?ISO-8859-1?Q?Court=E8s?=) Subject: Re: bug#26339: [PATCH 02/18] system: Add extlinux support. Message-ID: <20170512020243.5af54ed2@scratchpost.org> In-Reply-To: <87inl9zruw.fsf@gnu.org> References: <20170402135242.2958-1-m.othacehe@gmail.com> <20170402135242.2958-2-m.othacehe@gmail.com> <87mvanjepx.fsf@gnu.org> <871sryqy3g.fsf@gmail.com> <87bmr29x4q.fsf@gnu.org> <864lwuje63.fsf@gmail.com> <87inl9zruw.fsf@gnu.org> X-Mailer: Claws Mail 3.14.1 (GTK+ 2.24.31; x86_64-unknown-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 26339 Cc: 26339@debbugs.gnu.org, Mathieu Othacehe 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.7 (/) Hi, On Tue, 09 May 2017 22:40:23 +0200 ludo@gnu.org (Ludovic Court=C3=A8s) wrote: > > -> It was ok with one bootloader, it's more problematic with multiple = =20 > > bootloaders. For example switching between two generations with two > > different bootloaders. =20 >=20 > OTOH, if it turns out to be safer to keep the current bootloader, which > is likely I think, then perhaps it=E2=80=99s best to not try to change. >=20 > I mean, I prefer a rollback that doesn=E2=80=99t roll back the bootloader= over a > rollback that tries to do something smart and makes the system > unbootable. If there is a switch between extlinux and grub, the bootloader config file = format (and name, too) will change. So if you do switch the config file out but don't switch the actual bootloa= der out it will not boot, right? That means we have to take care that this doesn't happen. I still think an easy way would be to just always install the config files = for all the bootloaders that we support. That way if there is a bootloader= that knows any of the configs, it will boot. Can't think of a downside ei= ther. From debbugs-submit-bounces@debbugs.gnu.org Fri May 12 04:27:09 2017 Received: (at 26339) by debbugs.gnu.org; 12 May 2017 08:27:09 +0000 Received: from localhost ([127.0.0.1]:39675 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d95um-0000O8-QT for submit@debbugs.gnu.org; Fri, 12 May 2017 04:27:09 -0400 Received: from eggs.gnu.org ([208.118.235.92]:49029) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d95uk-0000Ne-IR for 26339@debbugs.gnu.org; Fri, 12 May 2017 04:27:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d95ua-0000ug-JR for 26339@debbugs.gnu.org; Fri, 12 May 2017 04:27:01 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=BAYES_40,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:39218) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d95ua-0000ub-Fw; Fri, 12 May 2017 04:26:56 -0400 Received: from [193.50.110.203] (port=45992 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1d95uZ-0006ZO-I5; Fri, 12 May 2017 04:26:55 -0400 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) To: Danny Milosavljevic Subject: Re: bug#26339: [PATCH 02/18] system: Add extlinux support. References: <20170402135242.2958-1-m.othacehe@gmail.com> <20170402135242.2958-2-m.othacehe@gmail.com> <87mvanjepx.fsf@gnu.org> <871sryqy3g.fsf@gmail.com> <87bmr29x4q.fsf@gnu.org> <864lwuje63.fsf@gmail.com> <87inl9zruw.fsf@gnu.org> <20170512020243.5af54ed2@scratchpost.org> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 23 =?utf-8?Q?Flor=C3=A9al?= an 225 de la =?utf-8?Q?R?= =?utf-8?Q?=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-unknown-linux-gnu Date: Fri, 12 May 2017 10:26:53 +0200 In-Reply-To: <20170512020243.5af54ed2@scratchpost.org> (Danny Milosavljevic's message of "Fri, 12 May 2017 02:02:43 +0200") Message-ID: <87d1betr8y.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 26339 Cc: 26339@debbugs.gnu.org, Mathieu Othacehe 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: -5.0 (-----) Hello, Danny Milosavljevic skribis: > On Tue, 09 May 2017 22:40:23 +0200 > ludo@gnu.org (Ludovic Court=C3=A8s) wrote: > >> > -> It was ok with one bootloader, it's more problematic with multiple= =20=20 >> > bootloaders. For example switching between two generations with two >> > different bootloaders.=20=20 >>=20 >> OTOH, if it turns out to be safer to keep the current bootloader, which >> is likely I think, then perhaps it=E2=80=99s best to not try to change. >>=20 >> I mean, I prefer a rollback that doesn=E2=80=99t roll back the bootloade= r over a >> rollback that tries to do something smart and makes the system >> unbootable. > > If there is a switch between extlinux and grub, the bootloader config fil= e format (and name, too) will change. > > So if you do switch the config file out but don't switch the actual bootl= oader out it will not boot, right? Unless you regenerate the bootloader=E2=80=99s config file upon =E2=80=98switch-configuration=E2=80=99. > That means we have to take care that this doesn't happen. > > I still think an easy way would be to just always install the config file= s for all the bootloaders that we support. That way if there is a bootload= er that knows any of the configs, it will boot. Can't think of a downside = either. Yes, that=E2=80=99s also an option. The downside would be that if we regis= ter all of these as GC roots, then we end up retaining more than actually needed. Thanks, Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Fri May 12 07:26:34 2017 Received: (at 26339) by debbugs.gnu.org; 12 May 2017 11:26:34 +0000 Received: from localhost ([127.0.0.1]:39836 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d98iQ-0004ro-1W for submit@debbugs.gnu.org; Fri, 12 May 2017 07:26:34 -0400 Received: from dd1012.kasserver.com ([85.13.128.8]:57092) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d98iO-0004rf-PV for 26339@debbugs.gnu.org; Fri, 12 May 2017 07:26:33 -0400 Received: from localhost (unknown [193.170.94.190]) by dd1012.kasserver.com (Postfix) with ESMTPSA id 7E5BB1CA0678; Fri, 12 May 2017 13:26:31 +0200 (CEST) Date: Fri, 12 May 2017 13:26:30 +0200 From: Danny Milosavljevic To: ludo@gnu.org (Ludovic =?ISO-8859-1?Q?Court=E8s?=) Subject: Re: bug#26339: [PATCH 02/18] system: Add extlinux support. Message-ID: <20170512132630.1eeb75bc@scratchpost.org> In-Reply-To: <87d1betr8y.fsf@gnu.org> References: <20170402135242.2958-1-m.othacehe@gmail.com> <20170402135242.2958-2-m.othacehe@gmail.com> <87mvanjepx.fsf@gnu.org> <871sryqy3g.fsf@gmail.com> <87bmr29x4q.fsf@gnu.org> <864lwuje63.fsf@gmail.com> <87inl9zruw.fsf@gnu.org> <20170512020243.5af54ed2@scratchpost.org> <87d1betr8y.fsf@gnu.org> X-Mailer: Claws Mail 3.14.1 (GTK+ 2.24.31; x86_64-unknown-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 26339 Cc: 26339@debbugs.gnu.org, Mathieu Othacehe 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.7 (/) Hi Ludo, On Fri, 12 May 2017 10:26:53 +0200 ludo@gnu.org (Ludovic Court=C3=A8s) wrote: > > If there is a switch between extlinux and grub, the bootloader config f= ile format (and name, too) will change. > > > > So if you do switch the config file out but don't switch the actual boo= tloader out it will not boot, right? =20 >=20 > Unless you regenerate the bootloader=E2=80=99s config file upon > =E2=80=98switch-configuration=E2=80=99. Yes, for the last-guix-installed bootloader (presumably the still-installed= one). Good point. That would mean only the bootloader type of the newest system generation wo= uld be checked - also when restoring older generations. Can the newest system generation be deleted? Then eventually Guix could re= ad the wrong bootloader type (of a bootloader which isn't actually installe= d at the time). From debbugs-submit-bounces@debbugs.gnu.org Fri May 12 07:36:45 2017 Received: (at 26339) by debbugs.gnu.org; 12 May 2017 11:36:45 +0000 Received: from localhost ([127.0.0.1]:39851 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d98sG-0006u1-3J for submit@debbugs.gnu.org; Fri, 12 May 2017 07:36:45 -0400 Received: from eggs.gnu.org ([208.118.235.92]:39057) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d98sE-0006to-R4 for 26339@debbugs.gnu.org; Fri, 12 May 2017 07:36:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d98s5-0002xG-37 for 26339@debbugs.gnu.org; Fri, 12 May 2017 07:36:37 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=BAYES_20,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:50803) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d98s4-0002x7-W8; Fri, 12 May 2017 07:36:33 -0400 Received: from [193.50.110.203] (port=47188 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1d98s4-0004Dn-97; Fri, 12 May 2017 07:36:32 -0400 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) To: Danny Milosavljevic Subject: Re: bug#26339: [PATCH 02/18] system: Add extlinux support. References: <20170402135242.2958-1-m.othacehe@gmail.com> <20170402135242.2958-2-m.othacehe@gmail.com> <87mvanjepx.fsf@gnu.org> <871sryqy3g.fsf@gmail.com> <87bmr29x4q.fsf@gnu.org> <864lwuje63.fsf@gmail.com> <87inl9zruw.fsf@gnu.org> <20170512020243.5af54ed2@scratchpost.org> <87d1betr8y.fsf@gnu.org> <20170512132630.1eeb75bc@scratchpost.org> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 23 =?utf-8?Q?Flor=C3=A9al?= an 225 de la =?utf-8?Q?R?= =?utf-8?Q?=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-unknown-linux-gnu Date: Fri, 12 May 2017 13:36:29 +0200 In-Reply-To: <20170512132630.1eeb75bc@scratchpost.org> (Danny Milosavljevic's message of "Fri, 12 May 2017 13:26:30 +0200") Message-ID: <87k25ms3wi.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 26339 Cc: 26339@debbugs.gnu.org, Mathieu Othacehe 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: -5.0 (-----) Hi, Danny Milosavljevic skribis: > On Fri, 12 May 2017 10:26:53 +0200 > ludo@gnu.org (Ludovic Court=C3=A8s) wrote: > >> > If there is a switch between extlinux and grub, the bootloader config = file format (and name, too) will change. >> > >> > So if you do switch the config file out but don't switch the actual bo= otloader out it will not boot, right?=20=20 >>=20 >> Unless you regenerate the bootloader=E2=80=99s config file upon >> =E2=80=98switch-configuration=E2=80=99. > > Yes, for the last-guix-installed bootloader (presumably the still-install= ed one). Good point. > > That would mean only the bootloader type of the newest system generation = would be checked - also when restoring older generations. > > Can the newest system generation be deleted? Then eventually Guix could = read the wrong bootloader type (of a bootloader which isn't actually instal= led at the time). The newest generation can be deleted, but the current one cannot (it=E2=80= =99s possible that the current one is not the newest if you picked an old entry in the boot menu.) So it should probably pick the current (not the newest) bootloader type. Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Fri May 12 08:18:46 2017 Received: (at 26339) by debbugs.gnu.org; 12 May 2017 12:18:46 +0000 Received: from localhost ([127.0.0.1]:39892 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d99Wv-0007rs-Vm for submit@debbugs.gnu.org; Fri, 12 May 2017 08:18:46 -0400 Received: from mail-wm0-f47.google.com ([74.125.82.47]:37711) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d99Wu-0007re-4t for 26339@debbugs.gnu.org; Fri, 12 May 2017 08:18:44 -0400 Received: by mail-wm0-f47.google.com with SMTP id d127so13304617wmf.0 for <26339@debbugs.gnu.org>; Fri, 12 May 2017 05:18:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=/aK3N+mJinQqxcGeEySzKkrj4h251yEuPcoqwM2h5/4=; b=kpZAhuq5mG7nshVeEb2NZ/Zlq8rqQ4QOY1rAgSH/xAbBOlZHB1iJpb75Gwibw6ZdOG mC6xRm61tJZ4faBe0PRYCTJ3xheclBXCZykr+Fgu+Qp+Max7w/XaiO27eVljzAAiYglj PcqjldETGZfJIJBJPCkRp4fJz0xLRdzZnG9Yb0LsMO/wl7syqPL5IbjJXIfH5dvEaUNg nkvL+l4wTHJNifo54+LY90URwOAuypWmFXHl8MigR8TRfk765BYUJn/ZPtOWT78q09Ak WkI07Cw71Pz0/NI6r+xijC4HsuLFw3RJ+P1+LVqk1335JMaW/Ccocgz3YmpzERHsn7iG H5tg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=/aK3N+mJinQqxcGeEySzKkrj4h251yEuPcoqwM2h5/4=; b=TtPixuVBPNgrcCEAjMfRkA1sV4XbLPAxtP56ZTbTbWIzZrWZZgxTlj8MTZ6fUGdeX4 uKyUMccfb5lYt/1Gu5qoLrwTRgJZfVxBb1sTrWvf2RHjrEUgfFYEyZbOXDxQ6FSA76Au h+agsc5vzY/7DT0ZdvPo1SPVRb40YRNw9XvrpLZTs5M+Wr8vkC/q6CQ2oWfbHMUCtyJ/ mXCJJ3Vb9Bsq+tHIWsrp4DU+qtCiW9YLYDtLu1d1QkVJjw/roVvNt4VZXPOsvGmQqnOq +HEbjL42iybawf5la6xzMMdq8bsSVCoLQATsUP88Yu3s/N3ND9Tg4pvgLuQBC4LPxXQJ MC8Q== X-Gm-Message-State: AODbwcAc9v39dgccbF+kZgwsz3BgOmw5Q18jfvQsKa7r0IfL2k3LdHUe 9UD14NC3gNB8hrQMQaIB+AxxkTjkzA== X-Received: by 10.28.207.207 with SMTP id f198mr2517275wmg.85.1494591518035; Fri, 12 May 2017 05:18:38 -0700 (PDT) MIME-Version: 1.0 Received: by 10.223.134.67 with HTTP; Fri, 12 May 2017 05:18:37 -0700 (PDT) In-Reply-To: <87k25ms3wi.fsf@gnu.org> References: <20170402135242.2958-1-m.othacehe@gmail.com> <20170402135242.2958-2-m.othacehe@gmail.com> <87mvanjepx.fsf@gnu.org> <871sryqy3g.fsf@gmail.com> <87bmr29x4q.fsf@gnu.org> <864lwuje63.fsf@gmail.com> <87inl9zruw.fsf@gnu.org> <20170512020243.5af54ed2@scratchpost.org> <87d1betr8y.fsf@gnu.org> <20170512132630.1eeb75bc@scratchpost.org> <87k25ms3wi.fsf@gnu.org> From: Mathieu Othacehe Date: Fri, 12 May 2017 14:18:37 +0200 Message-ID: Subject: Re: bug#26339: [PATCH 02/18] system: Add extlinux support. To: =?UTF-8?Q?Ludovic_Court=C3=A8s?= Content-Type: multipart/alternative; boundary="94eb2c0d4530845325054f52b4ef" X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 26339 Cc: 26339@debbugs.gnu.org, Danny Milosavljevic 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.5 (/) --94eb2c0d4530845325054f52b4ef Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi ! > So it should probably pick the current (not the newest) bootloader type. I'm not fan of installing every bootloader config because it means multiple gcroots and filling /boot with possibly useless stuff. However, reading the "parameters" of current system, extracting bootloader type, and reinstalling *only* the bootloader configuration file for this type seems a good idea to me. I'll use this solution for v4. Plus we can come up later with a more intelligent solution, storing bootloader store path in "parameters" and creating a gcroot for it. Thanks, Mathieu 2017-05-12 13:36 GMT+02:00 Ludovic Court=C3=A8s : > Hi, > > Danny Milosavljevic skribis: > > > On Fri, 12 May 2017 10:26:53 +0200 > > ludo@gnu.org (Ludovic Court=C3=A8s) wrote: > > > >> > If there is a switch between extlinux and grub, the bootloader confi= g > file format (and name, too) will change. > >> > > >> > So if you do switch the config file out but don't switch the actual > bootloader out it will not boot, right? > >> > >> Unless you regenerate the bootloader=E2=80=99s config file upon > >> =E2=80=98switch-configuration=E2=80=99. > > > > Yes, for the last-guix-installed bootloader (presumably the > still-installed one). Good point. > > > > That would mean only the bootloader type of the newest system generatio= n > would be checked - also when restoring older generations. > > > > Can the newest system generation be deleted? Then eventually Guix coul= d > read the wrong bootloader type (of a bootloader which isn't actually > installed at the time). > > The newest generation can be deleted, but the current one cannot (it=E2= =80=99s > possible that the current one is not the newest if you picked an old > entry in the boot menu.) > > So it should probably pick the current (not the newest) bootloader type. > > Ludo=E2=80=99. > --94eb2c0d4530845325054f52b4ef Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi !

> So it should probably pick the current (n= ot the newest) bootloader type.

I'm not fan of installing every = bootloader config because it means
multiple gcroots and filling /boot wi= th possibly useless stuff.

However, reading the "parameters&quo= t; of current system, extracting
bootloader type, and reinstalling *only= * the bootloader configuration
file for this type seems a good idea to m= e.

I'll use this solution for v4. Plus we can come up later with= a more
intelligent solution, storing bootloader store path in "par= ameters" and
creating a gcroot for it.

Thanks,

Mathie= u


20= 17-05-12 13:36 GMT+02:00 Ludovic Court=C3=A8s <ludo@gnu.org>:
=
Hi,

Danny Milosavljevic <dannym@sc= ratchpost.org> skribis:

> On Fri, 12 May 2017 10:26:53 +0200
> ludo@gnu.org (Ludovic Court=C3=A8s= ) wrote:
>
>> > If there is a switch between extlinux and grub, the bootloade= r config file format (and name, too) will change.
>> >
>> > So if you do switch the config file out but don't switch = the actual bootloader out it will not boot, right?
>>
>> Unless you regenerate the bootloader=E2=80=99s config file upon >> =E2=80=98switch-configuration=E2=80=99.
>
> Yes, for the last-guix-installed bootloader (presumably the still-inst= alled one).=C2=A0 Good point.
>
> That would mean only the bootloader type of the newest system generati= on would be checked - also when restoring older generations.
>
> Can the newest system generation be deleted?=C2=A0 Then eventually Gui= x could read the wrong bootloader type (of a bootloader which isn't act= ually installed at the time).

The newest generation can be deleted, but the current one cannot (it= =E2=80=99s
possible that the current one is not the newest if you picked an old
entry in the boot menu.)

So it should probably pick the current (not the newest) bootloader type.
Ludo=E2=80=99.

--94eb2c0d4530845325054f52b4ef-- From debbugs-submit-bounces@debbugs.gnu.org Sat May 13 05:53:47 2017 Received: (at 26339) by debbugs.gnu.org; 13 May 2017 09:53:47 +0000 Received: from localhost ([127.0.0.1]:41803 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d9TkA-00081k-Pt for submit@debbugs.gnu.org; Sat, 13 May 2017 05:53:46 -0400 Received: from dd1012.kasserver.com ([85.13.128.8]:54404) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d9Tk9-00081d-7q for 26339@debbugs.gnu.org; Sat, 13 May 2017 05:53:45 -0400 Received: from localhost (178.113.190.188.wireless.dyn.drei.com [178.113.190.188]) by dd1012.kasserver.com (Postfix) with ESMTPSA id 01C851CA0156; Sat, 13 May 2017 11:53:43 +0200 (CEST) Date: Sat, 13 May 2017 11:53:39 +0200 From: Danny Milosavljevic To: Mathieu Othacehe Subject: Re: bug#26339: [PATCH 02/18] system: Add extlinux support. Message-ID: <20170513115339.4e9eb85e@scratchpost.org> In-Reply-To: References: <20170402135242.2958-1-m.othacehe@gmail.com> <20170402135242.2958-2-m.othacehe@gmail.com> <87mvanjepx.fsf@gnu.org> <871sryqy3g.fsf@gmail.com> <87bmr29x4q.fsf@gnu.org> <864lwuje63.fsf@gmail.com> <87inl9zruw.fsf@gnu.org> <20170512020243.5af54ed2@scratchpost.org> <87d1betr8y.fsf@gnu.org> <20170512132630.1eeb75bc@scratchpost.org> <87k25ms3wi.fsf@gnu.org> X-Mailer: Claws Mail 3.14.1 (GTK+ 2.24.31; x86_64-unknown-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 26339 Cc: 26339@debbugs.gnu.org, Ludovic =?ISO-8859-1?Q?Court=E8s?= 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.7 (/) Hi Mathieu, On Fri, 12 May 2017 14:18:37 +0200 Mathieu Othacehe wrote: > Hi ! > > > So it should probably pick the current (not the newest) bootloader type. > > I'm not fan of installing every bootloader config because it means > multiple gcroots and filling /boot with possibly useless stuff. > > However, reading the "parameters" of current system, extracting > bootloader type, and reinstalling *only* the bootloader configuration > file for this type seems a good idea to me. > > I'll use this solution for v4. If you mean that for "switch-generation" you use the current generation's bootloader but for "reconfigure" you use the newly-specified bootloader, I agree :) Otherwise one could never switch the bootloader. From debbugs-submit-bounces@debbugs.gnu.org Sun May 14 03:48:21 2017 Received: (at 26339) by debbugs.gnu.org; 14 May 2017 07:48:21 +0000 Received: from localhost ([127.0.0.1]:43504 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d9oGL-0003sb-6b for submit@debbugs.gnu.org; Sun, 14 May 2017 03:48:21 -0400 Received: from mail-wm0-f65.google.com ([74.125.82.65]:35451) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d9oGG-0003ry-9k for 26339@debbugs.gnu.org; Sun, 14 May 2017 03:48:19 -0400 Received: by mail-wm0-f65.google.com with SMTP id v4so21225942wmb.2 for <26339@debbugs.gnu.org>; Sun, 14 May 2017 00:48:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=QvFghpNKgKisutwwC3xgcGqvylACF6l8TMS11DOQRNE=; b=F6ZiPAqvLYQs0Iobb1zmhbF1rVAHuKEfLYqDjFCkfRdDBfWL+aUPiDbDHA2j6Sdauq PYvG3X+11Fxo2Qp7EKj9d++LYDxzD8mKuII1sHHYaa14o56Z6kQg0LSdg77XuCqrgBtu ggD81mRiNZpTxqyP5/Zh31AjWrWkOHnaNKAjh6t2SWXJZmOG15l8bJId74OcpcGlYFg2 qGx+DeLiVncG3XjV4I4V7RWc7OxuErOans2NWjc9KjZZbGPCIkTpajJXlNJlEyHhPXB7 GrT+MU51c4dOiK23C7xrSuDpZHHc8/vUeqCUT7V4k69chH/VyqBAp6HQCDr4uiO25uoz tHEw== 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:date:message-id; bh=QvFghpNKgKisutwwC3xgcGqvylACF6l8TMS11DOQRNE=; b=a+hpA9WEYOsseYeyUoMc9Cfunz09jnXkf683wgNS17dRq4u4744S37jpIaWoBE/OEd 3vySZH6wwVrBs4Xm+ajWgOLyzjV6yZA0RNkRHEj0m0qgiXs/K2q1l+RkwuV0MaEYTp1V VACVbywNUyEoFHpq7+zWWGYm46AS8Mu+6lvMTaNL7nCW7lNjhpQUSDvU3jdP8IZShLBE FS1SqWZ0DvEg1mlv06F9RC57KjJazVH1X9TjN6oa0jOwpz0Xjd2nzTgh97ncIlcWtwO/ 8sCRABejPkcUbd4X+WwXGSF7ThKnDt5/kZb45QNU4RpOxAQNdqVhr59LuTISIc7Cu64u Avuw== X-Gm-Message-State: AODbwcCfS27sK4Xu8iOFYzb6+8sQoMjaA3CE+iE1qVWDsEXk+wxS74xl 9Aq8IqU3085jlg== X-Received: by 10.28.57.6 with SMTP id g6mr277971wma.63.1494748090480; Sun, 14 May 2017 00:48:10 -0700 (PDT) Received: from cervin.8.8.8.8 (85-169-37-239.rev.numericable.fr. [85.169.37.239]) by smtp.gmail.com with ESMTPSA id e12sm4897094wrc.42.2017.05.14.00.48.09 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 14 May 2017 00:48:09 -0700 (PDT) From: Mathieu Othacehe To: 26339@debbugs.gnu.org Subject: [PATCH v4 0/7] Support non grub bootloaders. Date: Sun, 14 May 2017 09:47:56 +0200 Message-Id: <20170514074803.25556-1-m.othacehe@gmail.com> X-Mailer: git-send-email 2.13.0 X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 26339 Cc: Mathieu Othacehe 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.5 (/) Hi, Here's v4 of the serie. It addresses Danny and Ludo comments on v3. Changelog: * Add gnu/bootloader.scm and instanciate bootloaders in gnu/bootloader directory. * Split in two records. * Do not reinstall bootloader on switch-generation, only update configuration file. * Various renamings. Thanks, Mathieu Mathieu Othacehe (7): bootloader: Add extlinux support. bootloader: Adapt vm to new bootloader API. bootloader: Add bootloader name to boot-parameters record. scripts: system: Adapt "reconfigure" to new bootloader API. scripts: system: Adapt "init" to new bootloader API. scripts: system: Adapt "switch-generation" to new bootloader API. scripts: system: Display bootloader name in "list-generations". gnu.scm | 4 +- gnu/bootloader.scm | 114 ++++++++++++++++++ gnu/bootloader/extlinux.scm | 147 +++++++++++++++++++++++ gnu/{system => bootloader}/grub.scm | 105 ++++++++++++----- gnu/build/install.scm | 36 ++---- gnu/build/vm.scm | 17 ++- gnu/local.mk | 4 +- gnu/system.scm | 26 ++-- gnu/system/vm.scm | 38 ++++-- gnu/tests.scm | 3 +- gnu/tests/nfs.scm | 3 +- guix/scripts/system.scm | 228 ++++++++++++++++++++++-------------- 12 files changed, 546 insertions(+), 179 deletions(-) create mode 100644 gnu/bootloader.scm create mode 100644 gnu/bootloader/extlinux.scm rename gnu/{system => bootloader}/grub.scm (83%) -- 2.13.0 From debbugs-submit-bounces@debbugs.gnu.org Sun May 14 03:48:22 2017 Received: (at 26339) by debbugs.gnu.org; 14 May 2017 07:48:22 +0000 Received: from localhost ([127.0.0.1]:43506 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d9oGL-0003sh-Dh for submit@debbugs.gnu.org; Sun, 14 May 2017 03:48:22 -0400 Received: from mail-wm0-f53.google.com ([74.125.82.53]:36086) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d9oGI-0003s1-BM for 26339@debbugs.gnu.org; Sun, 14 May 2017 03:48:19 -0400 Received: by mail-wm0-f53.google.com with SMTP id u65so51690597wmu.1 for <26339@debbugs.gnu.org>; Sun, 14 May 2017 00:48:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=NTqmky9/NmGFFaKKbTA6aQN5zAtDm47/XrjcCuLcZzQ=; b=XQFEVr2tIc9UBO9Z6IfU4p8cmdR8QOxZeYbXwljZYhHS680AXAd5QlXQlL3Sy9S3o1 Ka56SgrYaN1IMyTKkLUZy1/SDX1FPpI20Sk5izKLa9ElG8/WpWLgsDLLoZR+gstaqmLt UkHIKZFVNRF+XgLEBBvtvHd4dBWDgS1ugeu+/PU1IZkwxrfqpX3gRqyiPq1yVrxMQ1vy nuXYfzcFTtWAFjsHHNNnhBWpC/bykACK9ADWqmbPURJQR5xKIQqoD3SWXD5ZKI3ISZUa Fpj8BOpCkmM/gzAV1elaK6EdnZphrwj3Bz7KQ87naQoLp/vxSmgjqJlrb/z0rwCN4PFQ QRSg== 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:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=NTqmky9/NmGFFaKKbTA6aQN5zAtDm47/XrjcCuLcZzQ=; b=ivrhuaoTnFZaUxfbioOoTJipbikSkFNvc8HPcBWnEkTYZ7w1srUbM5Lh1geYyIiSdJ 4SANtgzG409pQ+yWVGHYMZK6bdqNc3SjZKZfcaFe26SCPyXEEjdqRUuxUody9lf8hvT3 YQzJ6cj05Ye12A4HqhXkBrPQy0bE7KVNM9BhxMo5qwkeEBUNlx7HJOPq8dDc1Z3u1WMO WT4aMNIAncI+k7KiEusZIi60EFCbueebL5xVIRXfZHiY++HG3pQuxzdbcYfAmJbV9YWQ 8/TUSZ7Lg72Iv5Ghv82AVDLJx//Z0WJfH/bfp/Qd21j17pIo9wbd8q8mjMSu4ilfEzxK iWMg== X-Gm-Message-State: AODbwcAoiWU5j2TJY3JN5uXeqnFU5QTCp5wXLZjL5zQelltLyYamnZLY qGxfjeI2sArKSQ== X-Received: by 10.28.158.76 with SMTP id h73mr299261wme.140.1494748092060; Sun, 14 May 2017 00:48:12 -0700 (PDT) Received: from cervin.8.8.8.8 (85-169-37-239.rev.numericable.fr. [85.169.37.239]) by smtp.gmail.com with ESMTPSA id e12sm4897094wrc.42.2017.05.14.00.48.11 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 14 May 2017 00:48:11 -0700 (PDT) From: Mathieu Othacehe To: 26339@debbugs.gnu.org Subject: [PATCH v4 1/7] bootloader: Add extlinux support. Date: Sun, 14 May 2017 09:47:57 +0200 Message-Id: <20170514074803.25556-2-m.othacehe@gmail.com> X-Mailer: git-send-email 2.13.0 In-Reply-To: <20170514074803.25556-1-m.othacehe@gmail.com> References: <20170514074803.25556-1-m.othacehe@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 26339 Cc: Mathieu Othacehe 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.5 (/) * gnu/bootloader.scm: New file. * gnu/bootloader/extlinux.scm: New file. * gnu/bootloader/grub.scm: New file. * gnu/local.mk: Build new files. * gnu/system.scm: Adapt to new bootloader api. * gnu/scripts/system.scm: Adapt to new bootloader api. * gnu.scm: Remove (gnu system grub) and replace by (gnu bootloader) and (gnu bootloader grub) modules. * gnu/system/grub.scm: Moved content to gnu/bootloader/grub.scm. * gnu/system/vm: Replace (gnu system grub) module by (gnu bootloader). * gnu/tests.scm: Ditto. * gnu/tests/nfs.scm: Ditto. --- gnu.scm | 4 +- gnu/bootloader.scm | 114 ++++++++++++++++++++++++++++ gnu/bootloader/extlinux.scm | 147 ++++++++++++++++++++++++++++++++++++ gnu/{system => bootloader}/grub.scm | 105 ++++++++++++++++++-------- gnu/local.mk | 4 +- gnu/system.scm | 14 ++-- gnu/system/vm.scm | 2 +- gnu/tests.scm | 3 +- gnu/tests/nfs.scm | 3 +- guix/scripts/system.scm | 20 +++-- 10 files changed, 364 insertions(+), 52 deletions(-) create mode 100644 gnu/bootloader.scm create mode 100644 gnu/bootloader/extlinux.scm rename gnu/{system => bootloader}/grub.scm (83%) diff --git a/gnu.scm b/gnu.scm index 932e4cdd5..913ce6160 100644 --- a/gnu.scm +++ b/gnu.scm @@ -1,6 +1,7 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2014, 2015, 2016 Ludovic Courtès ;;; Copyright © 2015 Joshua S. Grant +;;; Copyright © 2017 Mathieu Othacehe ;;; ;;; This file is part of GNU Guix. ;;; @@ -34,7 +35,8 @@ '((gnu system) (gnu system mapped-devices) (gnu system file-systems) - (gnu system grub) ; 'grub-configuration' + (gnu bootloader) + (gnu bootloader grub) (gnu system pam) (gnu system shadow) ; 'user-account' (gnu system linux-initrd) diff --git a/gnu/bootloader.scm b/gnu/bootloader.scm new file mode 100644 index 000000000..77f81d33a --- /dev/null +++ b/gnu/bootloader.scm @@ -0,0 +1,114 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2017 David Craven +;;; Copyright © 2017 Mathieu Othacehe +;;; +;;; This file is part of GNU Guix. +;;; +;;; GNU Guix is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or (at +;;; your option) any later version. +;;; +;;; GNU Guix is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with GNU Guix. If not, see . + +(define-module (gnu bootloader) + #:use-module (guix discovery) + #:use-module (guix records) + #:use-module (guix ui) + #:use-module (srfi srfi-1) + #:export (bootloader + bootloader? + bootloader-name + bootloader-package + bootloader-theme + bootloader-installer + bootloader-configuration-file + bootloader-configuration-file-generator + + bootloader-configuration + bootloader-configuration? + bootloader-configuration-bootloader + bootloader-configuration-device + bootloader-configuration-menu-entries + bootloader-configuration-default-entry + bootloader-configuration-timeout + + %bootloaders + lookup-bootloader-by-name)) + + +;;; +;;; Bootloader record. +;;; + +;;; The record contains fields expressing how the bootloader +;;; should be installed. Every bootloader in gnu/bootloader/ directory +;;; has to be described by this record. + +(define-record-type* + bootloader make-bootloader + bootloader? + (name bootloader-name) + (package bootloader-package) + (theme bootloader-theme + (default #f)) + (installer bootloader-installer) + (configuration-file bootloader-configuration-file) + (configuration-file-generator bootloader-configuration-file-generator)) + + +;;; +;;; Bootloader configuration record. +;;; + +;;; The record contains bootloader independant +;;; configuration used to fill bootloader configuration file. + +(define-record-type* + bootloader-configuration make-bootloader-configuration + bootloader-configuration? + (bootloader bootloader-configuration-bootloader) ; + (device bootloader-configuration-device ; string + (default #f)) + (menu-entries bootloader-configuration-menu-entries ; list of + (default '())) + (default-entry bootloader-configuration-default-entry ; integer + (default 0)) + (timeout bootloader-configuration-timeout ; integer + (default 5)) + (additional-configuration bootloader-configuration-additional-configuration ; record + (default #f))) + + +;;; +;;; Bootloaders. +;;; + +(define (bootloader-modules) + "Return the list of bootloader modules." + (all-modules (map (lambda (entry) + `(,entry . "gnu/bootloader")) + %load-path))) + +(define %bootloaders + ;; The list of publically-known bootloaders. + (delay (fold-module-public-variables (lambda (obj result) + (if (bootloader? obj) + (cons obj result) + result)) + '() + (bootloader-modules)))) + +(define (lookup-bootloader-by-name name) + "Return the bootloader called NAME." + (or (find (lambda (bootloader) + (format #t "~a\n" (eq? name (bootloader-name bootloader))) + (eq? name (bootloader-name bootloader))) + (force %bootloaders)) + (leave (G_ "~a: no such bootloader~%") name))) diff --git a/gnu/bootloader/extlinux.scm b/gnu/bootloader/extlinux.scm new file mode 100644 index 000000000..002477c0c --- /dev/null +++ b/gnu/bootloader/extlinux.scm @@ -0,0 +1,147 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2017 David Craven +;;; Copyright © 2017 Mathieu Othacehe +;;; +;;; This file is part of GNU Guix. +;;; +;;; GNU Guix is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or (at +;;; your option) any later version. +;;; +;;; GNU Guix is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with GNU Guix. If not, see . + +(define-module (gnu bootloader extlinux) + #:use-module (gnu bootloader) + #:use-module (gnu system) + #:use-module (gnu packages bootloaders) + #:use-module (guix gexp) + #:use-module (guix monads) + #:use-module (guix records) + #:use-module (guix utils) + #:export (extlinux-bootloader + syslinux-bootloader + + extlinux-configuration + syslinux-configuration)) + +(define* (extlinux-configuration-file config entries + #:key + (system (%current-system)) + (old-entries '())) + "Return the U-Boot configuration file corresponding to CONFIG, a + object, and where the store is available at STORE-FS, a + object. OLD-ENTRIES is taken to be a list of menu entries +corresponding to old generations of the system." + + (define all-entries + (append entries (bootloader-configuration-menu-entries config))) + + (define (boot-parameters->gexp params) + (let ((label (boot-parameters-label params)) + (kernel (boot-parameters-kernel params)) + (kernel-arguments (boot-parameters-kernel-arguments params)) + (initrd (boot-parameters-initrd params))) + #~(format port "LABEL ~a + MENU LABEL ~a + KERNEL ~a + FDTDIR ~a/lib/dtbs + INITRD ~a + APPEND ~a +~%" + #$label #$label + #$kernel #$kernel #$initrd + (string-join (list #$@kernel-arguments))))) + + (define builder + #~(call-with-output-file #$output + (lambda (port) + (let ((timeout #$(bootloader-configuration-timeout config))) + (format port " +UI menu.c32 +PROMPT ~a +TIMEOUT ~a~%" + (if (> timeout 0) 1 0) + ;; timeout is expressed in 1/10s of seconds. + (* 10 timeout)) + #$@(map boot-parameters->gexp all-entries) + + #$@(if (pair? old-entries) + #~((format port "~%") + #$@(map boot-parameters->gexp old-entries) + (format port "~%")) + #~()))))) + + (gexp->derivation "extlinux.conf" builder)) + + + + +;;; +;;; Install procedures. +;;; + +(define dd + #~(lambda (bs count if of) + (zero? (system* "dd" + (string-append "bs=" (number->string bs)) + (string-append "count=" (number->string count)) + (string-append "if=" if) + (string-append "of=" of))))) + +(define install-syslinux + #~(lambda (bootloader device mount-point) + (let ((extlinux (string-append bootloader "/sbin/extlinux")) + (install-dir (string-append mount-point "/boot/extlinux")) + (syslinux-dir (string-append bootloader "/share/syslinux"))) + (mkdir-p install-dir) + (for-each (lambda (file) + (copy-file file + (string-append install-dir "/" (basename file)))) + (find-files syslinux-dir "\\.c32$")) + + (unless (and (zero? (system* extlinux "--install" install-dir)) + (#$dd 440 1 (string-append syslinux-dir "/mbr.bin") device)) + (error "failed to install SYSLINUX"))))) + + + +;;; +;;; Bootloader definitions. +;;; + +(define extlinux-bootloader + (bootloader + (name 'extlinux) + (package #f) + (installer #f) + (configuration-file "/boot/extlinux/extlinux.conf") + (configuration-file-generator extlinux-configuration-file))) + +(define syslinux-bootloader + (bootloader + (inherit extlinux-bootloader) + (name 'syslinux) + (package syslinux) + (installer install-syslinux))) + + +;;; +;;; Compatibility macros. +;;; + +(define-syntax-rule (extlinux-configuration fields ...) + (bootloader-configuration + (bootloader extlinux-bootloader) + fields ...)) + +(define-syntax-rule (syslinux-configuration fields ...) + (bootloader-configuration + (bootloader syslinux-bootloader) + fields ...)) diff --git a/gnu/system/grub.scm b/gnu/bootloader/grub.scm similarity index 83% rename from gnu/system/grub.scm rename to gnu/bootloader/grub.scm index 58096429f..1dd50e391 100644 --- a/gnu/system/grub.scm +++ b/gnu/bootloader/grub.scm @@ -1,6 +1,7 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2013, 2014, 2015, 2016, 2017 Ludovic Courtès ;;; Copyright © 2016 Chris Marusich +;;; Copyright © 2017 Mathieu Othacehe ;;; ;;; This file is part of GNU Guix. ;;; @@ -17,7 +18,7 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . -(define-module (gnu system grub) +(define-module (gnu bootloader grub) #:use-module (guix store) #:use-module (guix packages) #:use-module (guix derivations) @@ -27,6 +28,7 @@ #:use-module (guix download) #:use-module (gnu artwork) #:use-module (gnu system) + #:use-module (gnu bootloader) #:use-module (gnu system file-systems) #:autoload (gnu packages bootloaders) (grub) #:autoload (gnu packages compression) (gzip) @@ -49,15 +51,11 @@ %background-image %default-theme - grub-configuration - grub-configuration? - grub-configuration-device - grub-configuration-grub - - menu-entry - menu-entry? + grub-bootloader + grub-efi-bootloader - grub-configuration-file)) + grub-configuration + grub-efi-configuration)) ;;; Commentary: ;;; @@ -105,21 +103,6 @@ denoting a file name." (color-highlight '((fg . yellow) (bg . black))) (color-normal '((fg . light-gray) (bg . black))))) ;XXX: #x303030 -(define-record-type* - grub-configuration make-grub-configuration - grub-configuration? - (grub grub-configuration-grub ; package - (default (@ (gnu packages bootloaders) grub))) - (device grub-configuration-device) ; string - (menu-entries grub-configuration-menu-entries ; list - (default '())) - (default-entry grub-configuration-default-entry ; integer - (default 0)) - (timeout grub-configuration-timeout ; integer - (default 5)) - (theme grub-configuration-theme ; - (default %default-theme))) - (define-record-type* menu-entry make-menu-entry menu-entry? @@ -162,7 +145,8 @@ WIDTH/HEIGHT, or #f if none was found." (let* ((ratio (/ width height)) (image (find (lambda (image) (= (grub-image-aspect-ratio image) ratio)) - (grub-theme-images (grub-configuration-theme config))))) + (grub-theme-images (bootloader-theme + (bootloader-configuration-bootloader config)))))) (if image (svg->png (grub-image-file image) #:width width #:height height) @@ -205,7 +189,8 @@ system string---e.g., \"x86_64-linux\"." "")) (define (theme-colors type) - (let* ((theme (grub-configuration-theme config)) + (let* ((theme (bootloader-theme + (bootloader-configuration-bootloader config))) (colors (type theme))) (string-append (symbol->string (assoc-ref colors 'fg)) "/" (symbol->string (assoc-ref colors 'bg))))) @@ -282,12 +267,12 @@ code." (system (%current-system)) (old-entries '())) "Return the GRUB configuration file corresponding to CONFIG, a - object, and where the store is available at STORE-FS, a - object. OLD-ENTRIES is taken to be a list of menu entries -corresponding to old generations of the system." + object, and where the store is available at +STORE-FS, a object. OLD-ENTRIES is taken to be a list of menu +entries corresponding to old generations of the system." (define all-entries (append (map boot-parameters->menu-entry entries) - (grub-configuration-menu-entries config))) + (bootloader-configuration-menu-entries config))) (define entry->gexp (match-lambda @@ -326,8 +311,8 @@ corresponding to old generations of the system." (format port " set default=~a set timeout=~a~%" - #$(grub-configuration-default-entry config) - #$(grub-configuration-timeout config)) + #$(bootloader-configuration-default-entry config) + #$(bootloader-configuration-timeout config)) #$@(map entry->gexp all-entries) #$@(if (pair? old-entries) @@ -339,4 +324,60 @@ submenu \"GNU system, old configurations...\" {~%") (gexp->derivation "grub.cfg" builder))) + + +;;; +;;; Install procedures. +;;; + +(define install-grub + #~(lambda (bootloader device mount-point) + ;; Install GRUB on DEVICE which is mounted at MOUNT-POINT. + (let ((grub (string-append bootloader "/sbin/grub-install")) + (install-dir (string-append mount-point "/boot"))) + ;; Tell 'grub-install' that there might be a LUKS-encrypted /boot or + ;; root partition. + (setenv "GRUB_ENABLE_CRYPTODISK" "y") + + (unless (zero? (system* grub "--no-floppy" + "--boot-directory" install-dir + device)) + (error "failed to install GRUB"))))) + + + +;;; +;;; Bootloader definitions. +;;; + +(define grub-bootloader + (bootloader + (name 'grub) + (package grub) + (theme %default-theme) + (installer install-grub) + (configuration-file "/boot/grub/grub.cfg") + (configuration-file-generator grub-configuration-file))) + +(define* grub-efi-bootloader + (bootloader + (inherit grub-bootloader) + (name 'grub-efi) + (package grub-efi))) + + +;;; +;;; Compatibility macros. +;;; + +(define-syntax-rule (grub-configuration fields ...) + (bootloader-configuration + (bootloader grub-bootloader) + fields ...)) + +(define-syntax-rule (grub-efi-configuration fields ...) + (bootloader-configuration + (bootloader grub-efi-bootloader) + fields ...)) + ;;; grub.scm ends here diff --git a/gnu/local.mk b/gnu/local.mk index 28a283ab7..73650c673 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -36,6 +36,9 @@ GNU_SYSTEM_MODULES = \ gnu.scm \ %D%/artwork.scm \ + %D%/bootloader.scm \ + %D%/bootloader/grub.scm \ + %D%/bootloader/extlinux.scm \ %D%/packages.scm \ %D%/packages/abduco.scm \ %D%/packages/abiword.scm \ @@ -441,7 +444,6 @@ GNU_SYSTEM_MODULES = \ \ %D%/system.scm \ %D%/system/file-systems.scm \ - %D%/system/grub.scm \ %D%/system/install.scm \ %D%/system/linux-container.scm \ %D%/system/linux-initrd.scm \ diff --git a/gnu/system.scm b/gnu/system.scm index 9fc6cc5e7..8040e2b15 100644 --- a/gnu/system.scm +++ b/gnu/system.scm @@ -48,6 +48,7 @@ #:use-module (gnu services) #:use-module (gnu services shepherd) #:use-module (gnu services base) + #:use-module (gnu bootloader) #:use-module (gnu system shadow) #:use-module (gnu system nss) #:use-module (gnu system locale) @@ -138,7 +139,7 @@ booted from ROOT-DEVICE" (default linux-libre)) (kernel-arguments operating-system-user-kernel-arguments (default '())) ; list of gexps/strings - (bootloader operating-system-bootloader) ; + (bootloader operating-system-bootloader) ; (initrd operating-system-initrd ; (list fs) -> M derivation (default base-initrd)) @@ -846,12 +847,11 @@ populate the \"old entries\" menu." (root-device -> (if (eq? 'uuid (file-system-title root-fs)) (uuid->string (file-system-device root-fs)) (file-system-device root-fs))) - (entry (operating-system-boot-parameters os system root-device))) - ((module-ref (resolve-interface '(gnu system grub)) - 'grub-configuration-file) - (operating-system-bootloader os) - (list entry) - #:old-entries old-entries))) + (entry (operating-system-boot-parameters os system root-device)) + (bootloader-conf -> (operating-system-bootloader os))) + ((bootloader-configuration-file-generator + (bootloader-configuration-bootloader bootloader-conf)) + bootloader-conf (list entry) #:old-entries old-entries))) (define (fs->boot-device fs) "Given FS, a object, return a value suitable for use as the diff --git a/gnu/system/vm.scm b/gnu/system/vm.scm index 2c8b954c8..080014cde 100644 --- a/gnu/system/vm.scm +++ b/gnu/system/vm.scm @@ -49,7 +49,7 @@ #:use-module (gnu system shadow) #:use-module (gnu system pam) #:use-module (gnu system linux-initrd) - #:use-module (gnu system grub) + #:use-module (gnu bootloader) #:use-module (gnu system file-systems) #:use-module (gnu system) #:use-module (gnu services) diff --git a/gnu/tests.scm b/gnu/tests.scm index 810711ab9..2886a982f 100644 --- a/gnu/tests.scm +++ b/gnu/tests.scm @@ -1,5 +1,6 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2016, 2017 Ludovic Courtès +;;; Copyright © 2017 Mathieu Othacehe ;;; ;;; This file is part of GNU Guix. ;;; @@ -20,8 +21,8 @@ #:use-module (guix gexp) #:use-module (guix utils) #:use-module (guix records) + #:use-module (gnu bootloader grub) #:use-module (gnu system) - #:use-module (gnu system grub) #:use-module (gnu system file-systems) #:use-module (gnu system shadow) #:use-module (gnu services) diff --git a/gnu/tests/nfs.scm b/gnu/tests/nfs.scm index 1f28f5a5b..9e1ac1d55 100644 --- a/gnu/tests/nfs.scm +++ b/gnu/tests/nfs.scm @@ -1,6 +1,7 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2016 Ludovic Courtès ;;; Copyright © 2016 John Darrington +;;; Copyright © 2017 Mathieu Othacehe ;;; ;;; This file is part of GNU Guix. ;;; @@ -19,8 +20,8 @@ (define-module (gnu tests nfs) #:use-module (gnu tests) + #:use-module (gnu bootloader grub) #:use-module (gnu system) - #:use-module (gnu system grub) #:use-module (gnu system file-systems) #:use-module (gnu system shadow) #:use-module (gnu system vm) diff --git a/guix/scripts/system.scm b/guix/scripts/system.scm index 9c0976750..5fd0d7600 100644 --- a/guix/scripts/system.scm +++ b/guix/scripts/system.scm @@ -38,10 +38,10 @@ #:use-module (guix build utils) #:use-module (gnu build install) #:use-module (gnu system) + #:use-module (gnu bootloader) #:use-module (gnu system file-systems) #:use-module (gnu system linux-container) #:use-module (gnu system vm) - #:use-module (gnu system grub) #:use-module (gnu services) #:use-module (gnu services shepherd) #:use-module (gnu services herd) @@ -598,8 +598,12 @@ output when building a system derivation, such as a disk image." #:image-size image-size #:full-boot? full-boot? #:mappings mappings)) - (grub (package->derivation (grub-configuration-grub - (operating-system-bootloader os)))) + (bootloader (let ((bootloader (bootloader-package + (bootloader-configuration-bootloader + (operating-system-bootloader os))))) + (if bootloader + (package->derivation bootloader) + (return #f)))) (grub.cfg (if (eq? 'container action) (return #f) (operating-system-bootcfg os @@ -611,8 +615,8 @@ output when building a system derivation, such as a disk image." ;; --no-grub is passed, because GRUB.CFG because we then use it as a GC ;; root. See . (drvs -> (if (memq action '(init reconfigure)) - (if bootloader? - (list sys grub.cfg grub) + (if (and bootloader? bootloader) + (list sys grub.cfg bootloader) (list sys grub.cfg)) (list sys))) (% (if derivations-only? @@ -628,8 +632,8 @@ output when building a system derivation, such as a disk image." drvs) ;; Make sure GRUB is accessible. - (when bootloader? - (let ((prefix (derivation->output-path grub))) + (when (and bootloader? bootloader) + (let ((prefix (derivation->output-path bootloader))) (setenv "PATH" (string-append prefix "/bin:" prefix "/sbin:" (getenv "PATH"))))) @@ -832,7 +836,7 @@ resulting from command-line parsing." ((first second) second) (_ #f))) (device (and bootloader? - (grub-configuration-device + (bootloader-configuration-device (operating-system-bootloader os))))) (with-store store -- 2.13.0 From debbugs-submit-bounces@debbugs.gnu.org Sun May 14 03:48:23 2017 Received: (at 26339) by debbugs.gnu.org; 14 May 2017 07:48:23 +0000 Received: from localhost ([127.0.0.1]:43510 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d9oGM-0003sm-E8 for submit@debbugs.gnu.org; Sun, 14 May 2017 03:48:23 -0400 Received: from mail-wm0-f68.google.com ([74.125.82.68]:36192) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d9oGJ-0003s3-Hr for 26339@debbugs.gnu.org; Sun, 14 May 2017 03:48:20 -0400 Received: by mail-wm0-f68.google.com with SMTP id u65so21077367wmu.3 for <26339@debbugs.gnu.org>; Sun, 14 May 2017 00:48:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=J6SBhzjciyOVB8duV5E2tUnC6EI3jXB1P7y329fObXY=; b=t6aS5H6oX55hWsCfHTyZ0GM4UMcOjwwT70Zn+eU3DBnjgPVlWsxzars7n+DnKnw3mh fCfkRJI7+XYUclMyw94AWyb9WGWdK/pqHKepYv3qPagzJLftkhKiswm/Ctq/EzQubnen KClcQku+C+aGzOsWhtQcsg4eANXMaVyLH/yOGg3KkCRV00WVu7Ag9ZuhID1gZaYbZAw7 Rl2GgaQ5J5JMr2EhVYbAR6UZ7n/px/tOfs1bZLrvr9sZaUvo6YEvheftU1tgWzgzfg7m ynfOEui1ELJj/94kq7Gpl86kc6KOJqkHVsEjo3uo/VrxhFcDW2mfANs22wRBGMhLsly0 H2bQ== 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:date:message-id:in-reply-to :references; bh=J6SBhzjciyOVB8duV5E2tUnC6EI3jXB1P7y329fObXY=; b=CsrTqe+EIKIoARUQyZ4gwhqnqnwUrO1zcg4rU/GIOLbQasx9T7rL7IbV1tLJq6OYGa DlfWMcT/WOqN4H8F6sHEX9qATzKvdVjU/swQUAT59u7fMR6tYdvvJMGIyf61cXZkctmH 6A6H8prhj47CzkoBVqkrXxx+DaunsH3XBswBHITNLpJGchuG5JcEPHwOcx+Cum/lyqww oSiEnsy6n8u8f7iSKQ3b6p8066THBv6yJ0A0fEjzirVnSdTc29gBSoHBezZSdhNPVmu1 3kmRYBxMNBcbj6VOq+gF1sfnqGXi3ZsgSECagyKOlHb762wvX5T4/kcvpPKlr5Z9dGP5 dB6A== X-Gm-Message-State: AODbwcBFizSnzkvO1R/5FQT8D+2wLMjZdh8jcF7/3kwt6LLgDa+4R9tt s3urizaZ3Zhnn0PN X-Received: by 10.28.58.143 with SMTP id h137mr278804wma.72.1494748093387; Sun, 14 May 2017 00:48:13 -0700 (PDT) Received: from cervin.8.8.8.8 (85-169-37-239.rev.numericable.fr. [85.169.37.239]) by smtp.gmail.com with ESMTPSA id e12sm4897094wrc.42.2017.05.14.00.48.12 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 14 May 2017 00:48:12 -0700 (PDT) From: Mathieu Othacehe To: 26339@debbugs.gnu.org Subject: [PATCH v4 2/7] bootloader: Adapt vm to new bootloader API. Date: Sun, 14 May 2017 09:47:58 +0200 Message-Id: <20170514074803.25556-3-m.othacehe@gmail.com> X-Mailer: git-send-email 2.13.0 In-Reply-To: <20170514074803.25556-1-m.othacehe@gmail.com> References: <20170514074803.25556-1-m.othacehe@gmail.com> X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 26339 Cc: Mathieu Othacehe 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.5 (/) * gnu/build/install.scm (install-boot-config): New procedure. (install-grub): Move to (gnu bootloader grub). * gnu/build/vm.scm (register-bootcfg-root): Rename register-grub.cfg-root and adjust accordingly. (initialize-hard-disk): Takes a bootloader-package, bootcfg, bootcfg-location and bootloader-installer procedure. Adjust accordingly. * gnu/system/vm.scm (qemu-image): Adjust to initialize-hard-disk. (system-disk-image, system-qemu-image, system-qemu-image/shared-store): Adjust to qemu-image. --- gnu/build/install.scm | 36 ++++++++---------------------------- gnu/build/vm.scm | 17 +++++++++++------ gnu/system/vm.scm | 36 +++++++++++++++++++++++++----------- 3 files changed, 44 insertions(+), 45 deletions(-) diff --git a/gnu/build/install.scm b/gnu/build/install.scm index 5cb6055a0..9e30c0d23 100644 --- a/gnu/build/install.scm +++ b/gnu/build/install.scm @@ -22,8 +22,7 @@ #:use-module (guix build store-copy) #:use-module (srfi srfi-26) #:use-module (ice-9 match) - #:export (install-grub - install-grub-config + #:export (install-boot-config evaluate-populate-directive populate-root-file-system reset-timestamps @@ -39,36 +38,17 @@ ;;; ;;; Code: -(define (install-grub grub.cfg device mount-point) - "Install GRUB with GRUB.CFG on DEVICE, which is assumed to be mounted on -MOUNT-POINT. - -Note that the caller must make sure that GRUB.CFG is registered as a GC root -so that the fonts, background images, etc. referred to by GRUB.CFG are not -GC'd." - (install-grub-config grub.cfg mount-point) - - ;; Tell 'grub-install' that there might be a LUKS-encrypted /boot or root - ;; partition. - (setenv "GRUB_ENABLE_CRYPTODISK" "y") - - (unless (zero? (system* "grub-install" "--no-floppy" - "--boot-directory" - (string-append mount-point "/boot") - device)) - (error "failed to install GRUB"))) - -(define (install-grub-config grub.cfg mount-point) - "Atomically copy GRUB.CFG into boot/grub/grub.cfg on the MOUNT-POINT. Note -that the caller must make sure that GRUB.CFG is registered as a GC root so -that the fonts, background images, etc. referred to by GRUB.CFG are not GC'd." - (let* ((target (string-append mount-point "/boot/grub/grub.cfg")) +(define (install-boot-config bootcfg bootcfg-location mount-point) + "Atomically copy BOOTCFG into BOOTCFG-LOCATION on the MOUNT-POINT. Note +that the caller must make sure that BOOTCFG is registered as a GC root so +that the fonts, background images, etc. referred to by BOOTCFG are not GC'd." + (let* ((target (string-append mount-point bootcfg-location)) (pivot (string-append target ".new"))) (mkdir-p (dirname target)) - ;; Copy GRUB.CFG instead of just symlinking it, because symlinks won't + ;; Copy BOOTCFG instead of just symlinking it, because symlinks won't ;; work when /boot is on a separate partition. Do that atomically. - (copy-file grub.cfg pivot) + (copy-file bootcfg pivot) (rename-file pivot target))) (define (evaluate-populate-directive directive target) diff --git a/gnu/build/vm.scm b/gnu/build/vm.scm index 1eb9a4c45..9a77bee72 100644 --- a/gnu/build/vm.scm +++ b/gnu/build/vm.scm @@ -285,15 +285,18 @@ SYSTEM-DIRECTORY is the name of the directory of the 'system' derivation." (unless register-closures? (reset-timestamps target)))) -(define (register-grub.cfg-root target bootcfg) +(define (register-bootcfg-root target bootcfg) "On file system TARGET, register BOOTCFG as a GC root." (let ((directory (string-append target "/var/guix/gcroots"))) (mkdir-p directory) - (symlink bootcfg (string-append directory "/grub.cfg")))) + (symlink bootcfg (string-append directory "/bootcfg")))) (define* (initialize-hard-disk device #:key - grub.cfg + bootloader-package + bootcfg + bootcfg-location + bootloader-installer (partitions '())) "Initialize DEVICE as a disk containing all the objects listed in PARTITIONS, and using BOOTCFG as its bootloader configuration file. @@ -311,10 +314,12 @@ passing it a directory name where it is mounted." (display "mounting root partition...\n") (mkdir-p target) (mount (partition-device root) target (partition-file-system root)) - (install-grub grub.cfg device target) + (install-boot-config bootcfg bootcfg-location target) + (when bootloader-installer + (bootloader-installer bootloader-package device target)) - ;; Register GRUB.CFG as a GC root. - (register-grub.cfg-root target grub.cfg) + ;; Register BOOTCFG as a GC root. + (register-bootcfg-root target bootcfg) (umount target))) diff --git a/gnu/system/vm.scm b/gnu/system/vm.scm index 080014cde..fcdb5360d 100644 --- a/gnu/system/vm.scm +++ b/gnu/system/vm.scm @@ -46,6 +46,7 @@ #:select (%guile-static-stripped)) #:use-module (gnu packages admin) + #:use-module (gnu bootloader) #:use-module (gnu system shadow) #:use-module (gnu system pam) #:use-module (gnu system linux-initrd) @@ -176,8 +177,9 @@ made available under the /xchg CIFS share." (disk-image-format "qcow2") (file-system-type "ext4") file-system-label - os-derivation - grub-configuration + os.drv + bootcfg.drv + bootloader (register-closures? #t) (inputs '()) copy-inputs?) @@ -201,7 +203,7 @@ the image." (guix build utils)) (let ((inputs - '#$(append (list qemu parted grub e2fsprogs) + '#$(append (list qemu parted e2fsprogs) (map canonical-package (list sed grep coreutils findutils gawk)) (if register-closures? (list guix) '()))) @@ -223,7 +225,7 @@ the image." #:closures graphs #:copy-closures? #$copy-inputs? #:register-closures? #$register-closures? - #:system-directory #$os-derivation)) + #:system-directory #$os.drv)) (partitions (list (partition (size #$(- disk-image-size (* 10 (expt 2 20)))) @@ -233,7 +235,13 @@ the image." (initializer initialize))))) (initialize-hard-disk "/dev/vda" #:partitions partitions - #:grub.cfg #$grub-configuration) + #:bootloader-package + #$(bootloader-package bootloader) + #:bootcfg #$bootcfg.drv + #:bootcfg-location + #$(bootloader-configuration-file bootloader) + #:bootloader-installer + #$(bootloader-installer bootloader)) (reboot))))) #:system system #:make-disk-image? #t @@ -287,8 +295,10 @@ to USB sticks meant to be read-only." (mlet* %store-monad ((os-drv (operating-system-derivation os)) (bootcfg (operating-system-bootcfg os))) (qemu-image #:name name - #:os-derivation os-drv - #:grub-configuration bootcfg + #:os.drv os-drv + #:bootcfg.drv bootcfg + #:bootloader (bootloader-configuration-bootloader + (operating-system-bootloader os)) #:disk-image-size disk-image-size #:disk-image-format "raw" #:file-system-type file-system-type @@ -330,8 +340,10 @@ of the GNU system as described by OS." (mlet* %store-monad ((os-drv (operating-system-derivation os)) (bootcfg (operating-system-bootcfg os))) - (qemu-image #:os-derivation os-drv - #:grub-configuration bootcfg + (qemu-image #:os.drv os-drv + #:bootcfg.drv bootcfg + #:bootloader (bootloader-configuration-bootloader + (operating-system-bootloader os)) #:disk-image-size disk-image-size #:file-system-type file-system-type #:inputs `(("system" ,os-drv) @@ -429,8 +441,10 @@ bootloader refers to: OS kernel, initrd, bootloader data, etc." ;; BOOTCFG and all its dependencies, including the output of OS-DRV. ;; This is more than needed (we only need the kernel, initrd, GRUB for its ;; font, and the background image), but it's hard to filter that. - (qemu-image #:os-derivation os-drv - #:grub-configuration bootcfg + (qemu-image #:os.drv os-drv + #:bootcfg.drv bootcfg + #:bootloader (bootloader-configuration-bootloader + (operating-system-bootloader os)) #:disk-image-size disk-image-size #:inputs (if full-boot? `(("bootcfg" ,bootcfg)) -- 2.13.0 From debbugs-submit-bounces@debbugs.gnu.org Sun May 14 03:48:23 2017 Received: (at 26339) by debbugs.gnu.org; 14 May 2017 07:48:23 +0000 Received: from localhost ([127.0.0.1]:43512 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d9oGN-0003t5-AE for submit@debbugs.gnu.org; Sun, 14 May 2017 03:48:23 -0400 Received: from mail-wr0-f193.google.com ([209.85.128.193]:34552) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d9oGK-0003s5-47 for 26339@debbugs.gnu.org; Sun, 14 May 2017 03:48:20 -0400 Received: by mail-wr0-f193.google.com with SMTP id 6so11165008wrb.1 for <26339@debbugs.gnu.org>; Sun, 14 May 2017 00:48:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=DD+gAOS8BB6kwj5uSWZwLT+f5P0kwlfvJjC7HILdGOo=; b=TvoyvT6X1x3QDwQGwoOI8Hv6dYuMuJfQ3hOvfHFydPIKLHm3NOoMyCoYsur65c13kQ dBaXpvK7EKpApoTIzszQkbIpclFFL+lveD3P9szeWjX0VWHk/G5+OlyMQTDwziyzzySy TiZGKCWVXP5E0acz+4ttQFouKWsesZUK8d1HPmgd8kpdxlR9vWb2E+KaByOwp3+ItLoX wy6p0kuJh5g4NCtNZv3V0N/hFAuYiPF5Tw+KMIP8/79wvxbHds8040E+KVaU8lEw9lgh HQt3hyFbMiV+UQmEmiJShF0LYApL/kKhoXgVQAI2Jotwa+fwUIqXR/2ltuog3LaSfGhG dxfQ== 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:date:message-id:in-reply-to :references; bh=DD+gAOS8BB6kwj5uSWZwLT+f5P0kwlfvJjC7HILdGOo=; b=Ijq44YXDQYXaHwNo8j5zoQEtde1oxFVF6DuME0/fAg4ScHwM4/Cvn/M4hp74Ml1IC0 zEM2duvoO6Taoi5CKN9Y78gUkK4GX4s+qiczuPA8piKpQihNYjRRNnIaFnFG5WO+vrQg T7Uag9S0udiik8kJNdoRqXds9uev3Y4ig1DdODGCEa3fCVIjZ0s1odams1UI7d3P1nSg tG5fvIztK79fS5+cXAGQr+NQA4C9XvzwlqtmN/xSE9pRMFKsfPwP5MM+FytkOVB3z6dT OYKuddKvdKhLgE7f0dLSF8yfQP2vwMT4N0v44z6KxihY96eisDRsnmYJZunCleOv6BPH CBIw== X-Gm-Message-State: AODbwcD660JCMhZN6LyOs7pqd/yRYC/ysI9pQ18HklLOdTsMG96mMvF7 hcaWD9WhxyGIlQ== X-Received: by 10.223.171.238 with SMTP id s101mr268363wrc.83.1494748094493; Sun, 14 May 2017 00:48:14 -0700 (PDT) Received: from cervin.8.8.8.8 (85-169-37-239.rev.numericable.fr. [85.169.37.239]) by smtp.gmail.com with ESMTPSA id e12sm4897094wrc.42.2017.05.14.00.48.13 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 14 May 2017 00:48:13 -0700 (PDT) From: Mathieu Othacehe To: 26339@debbugs.gnu.org Subject: [PATCH v4 3/7] bootloader: Add bootloader name to boot-parameters record. Date: Sun, 14 May 2017 09:47:59 +0200 Message-Id: <20170514074803.25556-4-m.othacehe@gmail.com> X-Mailer: git-send-email 2.13.0 In-Reply-To: <20170514074803.25556-1-m.othacehe@gmail.com> References: <20170514074803.25556-1-m.othacehe@gmail.com> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 26339 Cc: Mathieu Othacehe 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.3 (--) * gnu/system.scm ()[name]: New field. (boot-parameters-boot-name): Ditto. (operating-system-boot-parameters-file): Add new field. (operating-system-boot-parameters): Ditto. (read-boot-parameters): Ditto. --- gnu/system.scm | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/gnu/system.scm b/gnu/system.scm index 8040e2b15..4631cc56f 100644 --- a/gnu/system.scm +++ b/gnu/system.scm @@ -104,6 +104,7 @@ boot-parameters? boot-parameters-label boot-parameters-root-device + boot-parameters-boot-name boot-parameters-store-device boot-parameters-store-mount-point boot-parameters-kernel @@ -213,6 +214,7 @@ directly by the user." ;; exactly to the device field of the object representing the ;; OS's root file system, so it might be a device path like "/dev/sda3". (root-device boot-parameters-root-device) + (boot-name boot-parameters-boot-name) (store-device boot-parameters-store-device) (store-mount-point boot-parameters-store-mount-point) (kernel boot-parameters-kernel) @@ -231,6 +233,11 @@ directly by the user." (label label) (root-device root) + (boot-name + (match (assq 'boot-name rest) + ((_ args) args) + (#f 'grub))) ; for compatibility reasons. + ;; In the past, we would store the directory name of the kernel instead ;; of the absolute file name of its image. Detect that and correct it. (kernel (if (string=? linux (direct-store-path linux)) @@ -868,6 +875,9 @@ kernel arguments for that derivation to ." (mlet* %store-monad ((initrd (operating-system-initrd-file os)) (store -> (operating-system-store-file-system os)) + (bootloader -> (bootloader-configuration-bootloader + (operating-system-bootloader os))) + (boot-name -> (bootloader-name bootloader)) (label -> (kernel->boot-label (operating-system-kernel os)))) (return (boot-parameters (label label) @@ -878,6 +888,7 @@ kernel arguments for that derivation to ." (operating-system-kernel-arguments os system.drv root-device) (operating-system-user-kernel-arguments os))) (initrd initrd) + (boot-name boot-name) (store-device (fs->boot-device store)) (store-mount-point (file-system-mount-point store)))))) @@ -903,6 +914,7 @@ being stored into the \"parameters\" file)." (kernel-arguments #$(boot-parameters-kernel-arguments params)) (initrd #$(boot-parameters-initrd params)) + (boot-name #$(boot-parameters-boot-name params)) (store (device #$(boot-parameters-store-device params)) (mount-point #$(boot-parameters-store-mount-point params)))) -- 2.13.0 From debbugs-submit-bounces@debbugs.gnu.org Sun May 14 03:48:28 2017 Received: (at 26339) by debbugs.gnu.org; 14 May 2017 07:48:28 +0000 Received: from localhost ([127.0.0.1]:43516 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d9oGR-0003tU-IR for submit@debbugs.gnu.org; Sun, 14 May 2017 03:48:27 -0400 Received: from mail-wr0-f194.google.com ([209.85.128.194]:36156) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d9oGL-0003s7-Gt for 26339@debbugs.gnu.org; Sun, 14 May 2017 03:48:22 -0400 Received: by mail-wr0-f194.google.com with SMTP id v42so11149958wrc.3 for <26339@debbugs.gnu.org>; Sun, 14 May 2017 00:48:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=yvL4izaa8ZJYqXeAiwspL+4wlnI2oxP5kizm6J8hM3w=; b=C0yJtaFJbZcm9pXq2S1S19i+DtxmZ8tt2mQTnfCZormwp1Xi5JxxPjckTJGbveK9hU yjlH65/aYUjHJeuoj9sZUheRkmEZcgNS/JyPXCG5e2hx2Bxx74ASuv2U/0R4AsiSwDme y6zuADDmAVkdUQzd9q0iwPsWRbt55Iqe8jKVvc6Dgf2Umr2uXw8ZFYwqJPYi/Dmn1KKZ WHeI+vsVZrVV8UBOcmnytDnWn9NMBtwhxd9sLBa7/d0yL7ZZC2Jvd/EpAEblH83JiCY4 4eZ3qyDKbRZLpEpgFH7Ux5uNtbJ7h1rGgR+wy3Nl4sfcPDYAGCEucpUVpKuQDkf/MQDH frfw== 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:date:message-id:in-reply-to :references; bh=yvL4izaa8ZJYqXeAiwspL+4wlnI2oxP5kizm6J8hM3w=; b=FAol+AZyWLlHwdkbmmCFW1NnyFJRmu7TLkHuapJ8N4gnb/dr14CpAt1fDdkcd9iC8R Q7jFliwm+1ZfSGuasR4WXyooMcuSmkXqk5cI/X6X+tf2Ll6FBMnZTj4Rc/k52jEVRGIW +pT/KCuv27G5PXMNCUqcyeQHdLhwfaRO4hgS0MgGhk7NbM8PziRRC7lwQdmkxpU2hOxl lcw2oPAsq9LPa5H31E1DWhdGD3d2mXQecGK0d77/reqprBE0cWnY5TXe06czbWB1KZNG r6tAEC5ENAUBhHBx9yAsFc5H+1TNQ6UieZ+kc0Q0Y69uWkSMuFEDssOU5O7DACqieYt5 ay4A== X-Gm-Message-State: AODbwcAsvyUrr4/ID+PVJb7M8IhBsyW6+pBshJYy8KbZy6F1zxVHwyNT RTNy1dNOqqLK9j5r X-Received: by 10.223.162.158 with SMTP id s30mr344676wra.34.1494748095494; Sun, 14 May 2017 00:48:15 -0700 (PDT) Received: from cervin.8.8.8.8 (85-169-37-239.rev.numericable.fr. [85.169.37.239]) by smtp.gmail.com with ESMTPSA id e12sm4897094wrc.42.2017.05.14.00.48.14 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 14 May 2017 00:48:14 -0700 (PDT) From: Mathieu Othacehe To: 26339@debbugs.gnu.org Subject: [PATCH v4 4/7] scripts: system: Adapt "reconfigure" to new bootloader API. Date: Sun, 14 May 2017 09:48:00 +0200 Message-Id: <20170514074803.25556-5-m.othacehe@gmail.com> X-Mailer: git-send-email 2.13.0 In-Reply-To: <20170514074803.25556-1-m.othacehe@gmail.com> References: <20170514074803.25556-1-m.othacehe@gmail.com> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 26339 Cc: Mathieu Othacehe 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.3 (--) * guix/scripts/system.scm (install-grub*): Rename to install-bootloader. Use keys to pass arguments. Pass a new argument, "installer.drv" which is a script in store dealing with bootloader-specific install actions. Also call "install-boot-config" to install the bootloader config file. (install-bootloader-derivation): New procedure. It returns a derivation that builds a file containing "install-procedure" gexp. (perform-action): Build install-proc derivation and call install-bootloader with the resulting file. Stop adding GRUB to PATH as bootloaders are called in install-proc with direct store paths. --- guix/scripts/system.scm | 129 +++++++++++++++++++++++++++++------------------- 1 file changed, 77 insertions(+), 52 deletions(-) diff --git a/guix/scripts/system.scm b/guix/scripts/system.scm index 5fd0d7600..b194b59a7 100644 --- a/guix/scripts/system.scm +++ b/guix/scripts/system.scm @@ -147,27 +147,34 @@ TARGET, and register them." (map (cut copy-item <> target #:log-port log-port) to-copy)))) -(define (install-grub* grub.cfg device target) - "This is a variant of 'install-grub' with error handling, lifted in -%STORE-MONAD" - (let* ((gc-root (string-append target %gc-roots-directory - "/grub.cfg")) - (temp-gc-root (string-append gc-root ".new")) - (delete-file (lift1 delete-file %store-monad)) - (make-symlink (lift2 switch-symlinks %store-monad)) - (rename (lift2 rename-file %store-monad))) - (mbegin %store-monad - ;; Prepare the symlink to GRUB.CFG to make sure that it's a GC root when - ;; 'install-grub' completes (being a bit paranoid.) - (make-symlink temp-gc-root grub.cfg) - - (munless (false-if-exception (install-grub grub.cfg device target)) +(define* (install-bootloader installer.drv + #:key + bootcfg bootcfg-file + device target) + "Call INSTALLER.DRV with error handling, in %STORE-MONAD." + (with-monad %store-monad + (let* ((gc-root (string-append target %gc-roots-directory + "/bootcfg")) + (temp-gc-root (string-append gc-root ".new")) + (install (and installer.drv + (derivation->output-path installer.drv))) + (bootcfg (derivation->output-path bootcfg))) + ;; Prepare the symlink to bootloader config file to make sure that it's + ;; a GC root when 'installer.drv' completes (being a bit paranoid.) + (switch-symlinks temp-gc-root bootcfg) + + (unless (false-if-exception + (begin + (install-boot-config bootcfg bootcfg-file target) + (when install + (save-load-path-excursion (primitive-load install))))) (delete-file temp-gc-root) - (leave (G_ "failed to install GRUB on device '~a'~%") device)) + (leave (G_ "failed to install bootloader on device ~a '~a'~%") install device)) - ;; Register GRUB.CFG as a GC root so that its dependencies (background - ;; image, font, etc.) are not reclaimed. - (rename temp-gc-root gc-root)))) + ;; Register bootloader config file as a GC root so that its dependencies + ;; (background image, font, etc.) are not reclaimed. + (rename-file temp-gc-root gc-root) + (return #t)))) (define* (install os-drv target #:key (log-port (current-output-port)) @@ -570,17 +577,28 @@ PATTERN, a string. When PATTERN is #f, display all the system generations." (warning (G_ "Consider running 'guix pull' before 'reconfigure'.~%")) (warning (G_ "Failing to do that may downgrade your system!~%")))) +(define (bootloader-installer-derivation installer + bootloader device target) + "Return a file calling INSTALLER gexp with given BOOTLOADER, DEVICE +and TARGET arguments." + (with-monad %store-monad + (gexp->file "bootloader-installer" + (with-imported-modules '((guix build utils)) + #~(begin + (use-modules (guix build utils)) + (#$installer #$bootloader #$device #$target)))))) + (define* (perform-action action os #:key bootloader? dry-run? derivations-only? use-substitutes? device target image-size full-boot? (mappings '()) (gc-root #f)) - "Perform ACTION for OS. GRUB? specifies whether to install GRUB; DEVICE is -the target devices for GRUB; TARGET is the target root directory; IMAGE-SIZE -is the size of the image to be built, for the 'vm-image' and 'disk-image' -actions. FULL-BOOT? is used for the 'vm' action; it determines whether to -boot directly to the kernel or to the bootloader. + "Perform ACTION for OS. BOOTLOADER? specifies whether to install +bootloader; DEVICE is the target devices for bootloader; TARGET is the target +root directory; IMAGE-SIZE is the size of the image to be built, for the +'vm-image' and 'disk-image' actions. FULL-BOOT? is used for the 'vm' action; +it determines whether to boot directly to the kernel or to the bootloader. When DERIVATIONS-ONLY? is true, print the derivation file name(s) without building anything. @@ -598,26 +616,37 @@ output when building a system derivation, such as a disk image." #:image-size image-size #:full-boot? full-boot? #:mappings mappings)) - (bootloader (let ((bootloader (bootloader-package - (bootloader-configuration-bootloader - (operating-system-bootloader os))))) - (if bootloader - (package->derivation bootloader) - (return #f)))) - (grub.cfg (if (eq? 'container action) - (return #f) - (operating-system-bootcfg os - (if (eq? 'init action) - '() - (profile-boot-parameters))))) - - ;; For 'init' and 'reconfigure', always build GRUB.CFG, even if - ;; --no-grub is passed, because GRUB.CFG because we then use it as a GC - ;; root. See . + (bootloader -> (bootloader-configuration-bootloader + (operating-system-bootloader os))) + (bootloader-package + (let ((package (bootloader-package bootloader))) + (if package + (package->derivation package) + (return #f)))) + (bootcfg (if (eq? 'container action) + (return #f) + (operating-system-bootcfg + os + (if (eq? 'init action) + '() + (profile-boot-parameters))))) + (bootcfg-file -> (bootloader-configuration-file bootloader)) + (bootloader-installer + (let ((installer (bootloader-installer bootloader)) + (target (or target "/"))) + (bootloader-installer-derivation installer + bootloader-package + device target))) + + ;; For 'init' and 'reconfigure', always build BOOTCFG, even if + ;; --no-bootloader is passed, because we then use it as a GC root. + ;; See . (drvs -> (if (memq action '(init reconfigure)) - (if (and bootloader? bootloader) - (list sys grub.cfg bootloader) - (list sys grub.cfg)) + (if (and bootloader? bootloader-package) + (list sys bootcfg + bootloader-package + bootloader-installer) + (list sys bootcfg)) (list sys))) (% (if derivations-only? (return (for-each (compose println derivation-file-name) @@ -631,20 +660,16 @@ output when building a system derivation, such as a disk image." (for-each (compose println derivation->output-path) drvs) - ;; Make sure GRUB is accessible. - (when (and bootloader? bootloader) - (let ((prefix (derivation->output-path bootloader))) - (setenv "PATH" - (string-append prefix "/bin:" prefix "/sbin:" - (getenv "PATH"))))) - (case action ((reconfigure) (mbegin %store-monad (switch-to-system os) (mwhen bootloader? - (install-grub* (derivation->output-path grub.cfg) - device "/")))) + (install-bootloader bootloader-installer + #:bootcfg bootcfg + #:bootcfg-file bootcfg-file + #:device device + #:target "/")))) ((init) (newline) (format #t (G_ "initializing operating system under '~a'...~%") -- 2.13.0 From debbugs-submit-bounces@debbugs.gnu.org Sun May 14 03:48:28 2017 Received: (at 26339) by debbugs.gnu.org; 14 May 2017 07:48:28 +0000 Received: from localhost ([127.0.0.1]:43518 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d9oGS-0003tX-1L for submit@debbugs.gnu.org; Sun, 14 May 2017 03:48:28 -0400 Received: from mail-wr0-f194.google.com ([209.85.128.194]:34556) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d9oGL-0003s9-VI for 26339@debbugs.gnu.org; Sun, 14 May 2017 03:48:22 -0400 Received: by mail-wr0-f194.google.com with SMTP id 6so11165038wrb.1 for <26339@debbugs.gnu.org>; Sun, 14 May 2017 00:48:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=XkgeLuKJJLc/42XFZMGvAtlTw75vkh6V8V8RYcqSwYk=; b=Dj5i0ODyFllWzjKNC5fTIPqAjPYnUzMMevXaKKEB0CH+3GaL0z11kZp74eNtVtsJhd G/glHs/iwfOe5NMYPjcbpKpzLYW173ZyjiQNpGzhuN05Xb0vI1Yxm3yy6uCVc3MPkkuh GVTu4Q2fHNCVECdslVDtcLvFoI34pC5MqsbJ3MqVl44qkGvMrDSCyAmXB/BJA9CFqcXH 6zE4xIvwBPjM7dLbk/YWvx/rlSFPBc+7Csv8Wdsphnsl2wBtANrColff0LVneLRrWxfq 4gboSOERr+R1PG8p8+cNMDCHxSSIgDo4WkX/kiQ2FnCCfG1B0hxxlllI/uxcAF5b74pR CbaA== 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:date:message-id:in-reply-to :references; bh=XkgeLuKJJLc/42XFZMGvAtlTw75vkh6V8V8RYcqSwYk=; b=hxAvNY2NqsakySIZcPm5pnfGfs5KBgz+SDkzwHpOoDol0loK3URSmUgXE1GTGF7Cgr NVQHwUeA9nRFumjdCnhLHF/TYEViIAQrzazQweEFoNfjyACaxeFX/Mg4aeQ9GMi48mzS pnNOVmz84AJqvXlVieJX//0GU8FxMaKYcEnINdp/kKnJKywreMDoCnLECp3DFfE8sjvh 5pBAd1O2oRbUls/pVbGvGwKPQLtkMsK+GhcjuZX37Qpo+gvVdNLBdLTnPiUN6UrZyu/s azHIfy4eztjQ/TYCko15X1A8en75CXhUff55Bz/hiGzmemTQHLwgH1qRBYBIs5nYsAVw 5DBA== X-Gm-Message-State: AODbwcDMeCpCV3JMOllR+v1ZpJ11LnMXLCK0FRPNOqzl6XYTiDGV/ejr Zc0dQKCGk7d+mQ== X-Received: by 10.223.132.163 with SMTP id 32mr297905wrg.154.1494748096343; Sun, 14 May 2017 00:48:16 -0700 (PDT) Received: from cervin.8.8.8.8 (85-169-37-239.rev.numericable.fr. [85.169.37.239]) by smtp.gmail.com with ESMTPSA id e12sm4897094wrc.42.2017.05.14.00.48.15 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 14 May 2017 00:48:15 -0700 (PDT) From: Mathieu Othacehe To: 26339@debbugs.gnu.org Subject: [PATCH v4 5/7] scripts: system: Adapt "init" to new bootloader API. Date: Sun, 14 May 2017 09:48:01 +0200 Message-Id: <20170514074803.25556-6-m.othacehe@gmail.com> X-Mailer: git-send-email 2.13.0 In-Reply-To: <20170514074803.25556-1-m.othacehe@gmail.com> References: <20170514074803.25556-1-m.othacehe@gmail.com> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 26339 Cc: Mathieu Othacehe 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.3 (--) * guix/scripts/system.scm (install): Pass installer a new argument. Rename other arguments. Call install-bootloader instead of install-grub*. (perform-action): Adapt. --- guix/scripts/system.scm | 44 +++++++++++++++++++++++++++----------------- 1 file changed, 27 insertions(+), 17 deletions(-) diff --git a/guix/scripts/system.scm b/guix/scripts/system.scm index b194b59a7..a40d026ec 100644 --- a/guix/scripts/system.scm +++ b/guix/scripts/system.scm @@ -178,12 +178,14 @@ TARGET, and register them." (define* (install os-drv target #:key (log-port (current-output-port)) - grub? grub.cfg device) - "Copy the closure of GRUB.CFG, which includes the output of OS-DRV, to + bootloader-installer install-bootloader? + bootcfg bootcfg-file + device) + "Copy the closure of BOOTCFG, which includes the output of OS-DRV, to directory TARGET. TARGET must be an absolute directory name since that's what 'guix-register' expects. -When GRUB? is true, install GRUB on DEVICE, using GRUB.CFG." +When INSTALL-BOOTLOADER? is true, install bootloader on DEVICE, using BOOTCFG." (define (maybe-copy to-copy) (with-monad %store-monad (if (string=? target "/") @@ -212,16 +214,21 @@ the ownership of '~a' may be incorrect!~%") (populate (lift2 populate-root-file-system %store-monad))) (mbegin %store-monad - ;; Copy the closure of GRUB.CFG, which includes OS-DIR, GRUB's - ;; background image and so on. - (maybe-copy grub.cfg) + ;; Copy the closure of BOOTCFG, which includes OS-DIR, + ;; eventual background image and so on. + (maybe-copy + (derivation->output-path bootcfg)) ;; Create a bunch of additional files. (format log-port "populating '~a'...~%" target) (populate os-dir target) - (mwhen grub? - (install-grub* grub.cfg device target))))) + (mwhen install-bootloader? + (install-bootloader bootloader-installer + #:bootcfg bootcfg + #:bootcfg-file bootcfg-file + #:device device + #:target target))))) ;;; @@ -589,12 +596,13 @@ and TARGET arguments." (#$installer #$bootloader #$device #$target)))))) (define* (perform-action action os - #:key bootloader? dry-run? derivations-only? + #:key install-bootloader? + dry-run? derivations-only? use-substitutes? device target image-size full-boot? (mappings '()) (gc-root #f)) - "Perform ACTION for OS. BOOTLOADER? specifies whether to install + "Perform ACTION for OS. INSTALL-BOOTLOADER? specifies whether to install bootloader; DEVICE is the target devices for bootloader; TARGET is the target root directory; IMAGE-SIZE is the size of the image to be built, for the 'vm-image' and 'disk-image' actions. FULL-BOOT? is used for the 'vm' action; @@ -642,10 +650,10 @@ output when building a system derivation, such as a disk image." ;; --no-bootloader is passed, because we then use it as a GC root. ;; See . (drvs -> (if (memq action '(init reconfigure)) - (if (and bootloader? bootloader-package) + (if (and install-bootloader? bootloader-package) (list sys bootcfg - bootloader-package - bootloader-installer) + bootloader-package + bootloader-installer) (list sys bootcfg)) (list sys))) (% (if derivations-only? @@ -664,7 +672,7 @@ output when building a system derivation, such as a disk image." ((reconfigure) (mbegin %store-monad (switch-to-system os) - (mwhen bootloader? + (mwhen install-bootloader? (install-bootloader bootloader-installer #:bootcfg bootcfg #:bootcfg-file bootcfg-file @@ -675,8 +683,10 @@ output when building a system derivation, such as a disk image." (format #t (G_ "initializing operating system under '~a'...~%") target) (install sys (canonicalize-path target) - #:grub? bootloader? - #:grub.cfg (derivation->output-path grub.cfg) + #:install-bootloader? install-bootloader? + #:bootcfg bootcfg + #:bootcfg-file bootcfg-file + #:bootloader-installer bootloader-installer #:device device)) (else ;; All we had to do was to build SYS and maybe register an @@ -890,7 +900,7 @@ resulting from command-line parsing." m) (_ #f)) opts) - #:bootloader? bootloader? + #:install-bootloader? bootloader? #:target target #:device device #:gc-root (assoc-ref opts 'gc-root))))) #:system system)))) -- 2.13.0 From debbugs-submit-bounces@debbugs.gnu.org Sun May 14 03:48:28 2017 Received: (at 26339) by debbugs.gnu.org; 14 May 2017 07:48:28 +0000 Received: from localhost ([127.0.0.1]:43520 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d9oGS-0003te-CM for submit@debbugs.gnu.org; Sun, 14 May 2017 03:48:28 -0400 Received: from mail-wr0-f195.google.com ([209.85.128.195]:35501) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d9oGN-0003sB-Hk for 26339@debbugs.gnu.org; Sun, 14 May 2017 03:48:23 -0400 Received: by mail-wr0-f195.google.com with SMTP id g12so11170663wrg.2 for <26339@debbugs.gnu.org>; Sun, 14 May 2017 00:48:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=1ZeVtBUtc2U0gSGhp0mbJmc6PxHxmlDK0OnNNQUQpBs=; b=FMkSyWBb82cyFQytdiklsWm+juH/IME7bns0iRcoYuJr8SC3ZJtDIlx50YscuBpboz QTvAFS2jTImwC3psNg28HyIPNXWeWTW8o+1OuNl+1FAUgoYPrR4bvun8Qc/dwk2Q2fjB ouDpTPHX9yGGQndJbaYk64vZCz7OhQBvJM1PaK9CFjvmcwIzc0Tkgq6DvUKKC5JH774D V8ORbzErX/ZjVSx9Ame/ZLurm5ArY5VsCWqvo3yVG03IkwLK5WpTflpOCBIvKQ4D9X0a UHWykxHuhWxlthdXd6fRb6Osw0jkCATltEa0PUOxcVuHPHr07cL4rQT3OQ+EJf0u3hc2 bLyA== 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:date:message-id:in-reply-to :references; bh=1ZeVtBUtc2U0gSGhp0mbJmc6PxHxmlDK0OnNNQUQpBs=; b=tbjHdHmZklGPDzZBVkS/9OizdpS2ZEC2+jw4fa5VZ16xdg9KzH3ceAEvMmiAMmablF Jh0WPUxmWVqcA0hgpR8fK9H1VenHc5z9e9Kb/++UHAKk1KHpehL23NQLeUbNRu39DTQx kDdif4lypWeaeYbGtW4Lg/YYdrJTLXanyQd6UxTc3QlhRxUSibWhMrALwzwawwKCgI3Y p0RJn5KT6CaSaVL1oClv2FUpvUCBGZoVbaAA+3oxwtCgPiYygb2OLsxvXRI+7FAqktig RunkgDVfpZZ1J0N2JgVoHLZEUlZWiHNsJO+elIVcMFzZiksRZpK779KOnNkTYyy0BiFb S/SQ== X-Gm-Message-State: AODbwcBq2PJ4D1L6NU+GpD4zJzgizQrGAlXkRaTt/danFq6v6FPcf+vx JWBKsWsAbdTV+qtO X-Received: by 10.223.177.219 with SMTP id r27mr280788wra.148.1494748097624; Sun, 14 May 2017 00:48:17 -0700 (PDT) Received: from cervin.8.8.8.8 (85-169-37-239.rev.numericable.fr. [85.169.37.239]) by smtp.gmail.com with ESMTPSA id e12sm4897094wrc.42.2017.05.14.00.48.16 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 14 May 2017 00:48:16 -0700 (PDT) From: Mathieu Othacehe To: 26339@debbugs.gnu.org Subject: [PATCH v4 6/7] scripts: system: Adapt "switch-generation" to new bootloader API. Date: Sun, 14 May 2017 09:48:02 +0200 Message-Id: <20170514074803.25556-7-m.othacehe@gmail.com> X-Mailer: git-send-email 2.13.0 In-Reply-To: <20170514074803.25556-1-m.othacehe@gmail.com> References: <20170514074803.25556-1-m.othacehe@gmail.com> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 26339 Cc: Mathieu Othacehe 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.3 (--) * guix/scripts/system.scm (reinstall-grub): Rename to reinstall-bootloader. Read boot-device and boot-type from parameters file to be able to restore the correct bootloader on specified device. Factorize bootloader installation code by calling install-bootloader. (system-bootloader-name): New procedure. (switch-to-system-generation): Adapt. --- guix/scripts/system.scm | 61 +++++++++++++++++++++++++++---------------------- 1 file changed, 34 insertions(+), 27 deletions(-) diff --git a/guix/scripts/system.scm b/guix/scripts/system.scm index a40d026ec..01070ce6e 100644 --- a/guix/scripts/system.scm +++ b/guix/scripts/system.scm @@ -412,49 +412,56 @@ connection to the store." ;;; (define (switch-to-system-generation store spec) "Switch the system profile to the generation specified by SPEC, and -re-install grub with a grub configuration file that uses the specified system +re-install bootloader with a configuration file that uses the specified system generation as its default entry. STORE is an open connection to the store." (let ((number (relative-generation-spec->number %system-profile spec))) (if number (begin - (reinstall-grub store number) + (reinstall-bootloader store number) (switch-to-generation* %system-profile number)) (leave (G_ "cannot switch to system generation '~a'~%") spec)))) -(define (reinstall-grub store number) - "Re-install grub for existing system profile generation NUMBER. STORE is an -open connection to the store." +(define* (system-bootloader-name #:optional (system %system-profile)) + "Return the bootloader name stored in SYSTEM's \"parameters\" file." + (let ((params (unless-file-not-found + (read-boot-parameters-file system)))) + (boot-parameters-boot-name params))) + +(define (reinstall-bootloader store number) + "Re-install bootloader for existing system profile generation NUMBER. +STORE is an open connection to the store." (let* ((generation (generation-file-name %system-profile number)) (params (unless-file-not-found (read-boot-parameters-file generation))) - (root-device (boot-parameters-root-device params)) ;; We don't currently keep track of past menu entries' details. The ;; default values will allow the system to boot, even if they differ ;; from the actual past values for this generation's entry. - (grub-config (grub-configuration (device root-device))) + (bootloader (lookup-bootloader-by-name (system-bootloader-name))) + (bootloader-config (bootloader-configuration + (bootloader bootloader))) ;; Make the specified system generation the default entry. (entries (profile-boot-parameters %system-profile (list number))) (old-generations (delv number (generation-numbers %system-profile))) - (old-entries (profile-boot-parameters %system-profile old-generations)) - (grub.cfg (run-with-store store - (grub-configuration-file grub-config - entries - #:old-entries old-entries)))) - (show-what-to-build store (list grub.cfg)) - (build-derivations store (list grub.cfg)) - ;; This is basically the same as install-grub*, but for now we avoid - ;; re-installing the GRUB boot loader itself onto a device, mainly because - ;; we don't in general have access to the same version of the GRUB package - ;; which was used when installing this other system generation. - (let* ((grub.cfg-path (derivation->output-path grub.cfg)) - (gc-root (string-append %gc-roots-directory "/grub.cfg")) - (temp-gc-root (string-append gc-root ".new"))) - (switch-symlinks temp-gc-root grub.cfg-path) - (unless (false-if-exception (install-grub-config grub.cfg-path "/")) - (delete-file temp-gc-root) - (leave (G_ "failed to re-install GRUB configuration file: '~a'~%") - grub.cfg-path)) - (rename-file temp-gc-root gc-root)))) + (old-entries (profile-boot-parameters + %system-profile old-generations))) + (run-with-store store + (mlet* %store-monad + ((bootcfg ((bootloader-configuration-file-generator bootloader) + bootloader-config entries + #:old-entries old-entries)) + (bootcfg-file -> (bootloader-configuration-file bootloader)) + (target -> "/") + (drvs -> (list bootcfg))) + (mbegin %store-monad + (show-what-to-build* drvs) + (built-derivations drvs) + ;; PARAMS file may not contain a suitable BOOT-DEVICE. If BOOT-DEVICE + ;; is #f do not run BOOTLOADER-INSTALLER during bootloader installation. + (install-bootloader #f + #:bootcfg bootcfg + #:bootcfg-file bootcfg-file + #:device #f + #:target target)))))) ;;; -- 2.13.0 From debbugs-submit-bounces@debbugs.gnu.org Sun May 14 03:48:29 2017 Received: (at 26339) by debbugs.gnu.org; 14 May 2017 07:48:29 +0000 Received: from localhost ([127.0.0.1]:43522 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d9oGS-0003tn-QN for submit@debbugs.gnu.org; Sun, 14 May 2017 03:48:29 -0400 Received: from mail-wr0-f193.google.com ([209.85.128.193]:36161) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d9oGO-0003sD-QF for 26339@debbugs.gnu.org; Sun, 14 May 2017 03:48:25 -0400 Received: by mail-wr0-f193.google.com with SMTP id v42so11150000wrc.3 for <26339@debbugs.gnu.org>; Sun, 14 May 2017 00:48:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=kJdES6E9yulPwvQ3H7J0vvsbjqlFgO3TH7AbhWhFCTw=; b=aRomqrBUlLot/mQ6zvYUPSnHiPcE5TeD7IU8O2bztfC2YoPczfUtJjscGHcP/wqQ8l kS0D9MA0npStHWK3RLsAz30vRv8uT/cNjT4z1cO0W0YPYCfFRUH7RB1/BQPm4RMaAUqE JtjhOhk/wDcEgPF5JwJg9pqenMBkM1gK0tXdKTkdzL6xoJA1Eb7Vfj6YTrk864BPVVgU Mg7mwedNxhpQzvZexa5lhifI1oSMFhqHVtZg/uRgEbCbZGqx9+0nUHCzg++8e3kDOZHb aqklii9iGJr2pnlyvLqbNKjyUUv8ztXnwk2TytN68BwK3liJItNGA9lWBaDQtLiwnT6G nNOA== 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:date:message-id:in-reply-to :references; bh=kJdES6E9yulPwvQ3H7J0vvsbjqlFgO3TH7AbhWhFCTw=; b=DN9U8Hm+SH/ym8HjGDI1vrl0mIAAiG7qXgZ/4Hpu3AOGBCdfrCe/oJCSHuYQ+RJBCO 7vW37gF3ecculgj+/arm5e788xfD2Gq1Seb/EJMtge7kZGAZUzcaaDW4dtnoeopQbZyn O6dNnJEF5c30Bamp3SyHS0Ju2kUKBLZACD9bkc95zTi6fcdTVDJc2sQ6dnNH8LWTLeoi bW2C44eMbqRba+OyRS2sg0fwOPGcsnp0G1D6uAfX05RHQ+xlSM8CV6RIzxAvkwAGBtC+ 1CjTp8YALwXgmxuzVsjVktgR7gRz3LF15FRzhDlB63wdUmE+LR9KxqvDiBLIRdlBXepc sUEw== X-Gm-Message-State: AODbwcAcNce1dOv7xaWvdABf7gGfYZcW+BU1pwGlA7DkC6VZMdqaNdzD 6ZvHDLm55qXKCQ== X-Received: by 10.223.161.65 with SMTP id r1mr326092wrr.114.1494748099310; Sun, 14 May 2017 00:48:19 -0700 (PDT) Received: from cervin.8.8.8.8 (85-169-37-239.rev.numericable.fr. [85.169.37.239]) by smtp.gmail.com with ESMTPSA id e12sm4897094wrc.42.2017.05.14.00.48.17 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 14 May 2017 00:48:17 -0700 (PDT) From: Mathieu Othacehe To: 26339@debbugs.gnu.org Subject: [PATCH v4 7/7] scripts: system: Display bootloader name in "list-generations". Date: Sun, 14 May 2017 09:48:03 +0200 Message-Id: <20170514074803.25556-8-m.othacehe@gmail.com> X-Mailer: git-send-email 2.13.0 In-Reply-To: <20170514074803.25556-1-m.othacehe@gmail.com> References: <20170514074803.25556-1-m.othacehe@gmail.com> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 26339 Cc: Mathieu Othacehe 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.3 (--) * guix/scripts/system.scm (display-system-generation): Display bootloader name. --- guix/scripts/system.scm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/guix/scripts/system.scm b/guix/scripts/system.scm index 01070ce6e..05ac13e7a 100644 --- a/guix/scripts/system.scm +++ b/guix/scripts/system.scm @@ -519,6 +519,7 @@ list of services." (let* ((generation (generation-file-name profile number)) (params (read-boot-parameters-file generation)) (label (boot-parameters-label params)) + (boot-name (boot-parameters-boot-name params)) (root (boot-parameters-root-device params)) (root-device (if (bytevector? root) (uuid->string root) @@ -529,6 +530,7 @@ list of services." (format #t (G_ " canonical file name: ~a~%") (readlink* generation)) ;; TRANSLATORS: Please preserve the two-space indentation. (format #t (G_ " label: ~a~%") label) + (format #t (G_ " bootloader name: ~a~%") boot-name) (format #t (G_ " root device: ~a~%") root-device) (format #t (G_ " kernel: ~a~%") kernel)))) -- 2.13.0 From debbugs-submit-bounces@debbugs.gnu.org Sun May 14 03:49:55 2017 Received: (at 26339) by debbugs.gnu.org; 14 May 2017 07:49:55 +0000 Received: from localhost ([127.0.0.1]:43533 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d9oHr-0003wj-6W for submit@debbugs.gnu.org; Sun, 14 May 2017 03:49:55 -0400 Received: from mail-wm0-f66.google.com ([74.125.82.66]:32943) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d9oHq-0003wX-4A for 26339@debbugs.gnu.org; Sun, 14 May 2017 03:49:54 -0400 Received: by mail-wm0-f66.google.com with SMTP id y10so21231549wmh.0 for <26339@debbugs.gnu.org>; Sun, 14 May 2017 00:49:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=references:user-agent:from:to:cc:subject:in-reply-to:date :message-id:mime-version; bh=k7C2YQlnVolHECvpBxfYFeN68XLoPspyDqHzbi8ZXW0=; b=XOukjkaWMEqNhH9CeXuw8vnH3SXK9ilbPBm53AOjYYp+hTh28CT6t71UmDCsmfKNJw TiS8ThAoccgUdBmwnedwXypJDwBmWWb9ob5YIh+/dTnxylX15HYHEa0S1/x1uPJvV/4P HMSGmIgUwhNiiGSE3yIObJjI8BDPTH4cmFyVya7MpNJEX5tjjyUqihHCOky8JuJt40B6 wNedTv6T+N+kzgf25O/FI8NeXMzNQaAYrQfFGlhPydgL5sdhNlxv6YtTHnGJw1gDmreC iwB439ot5VPaG2rRz/8QD/xbr60rflBQqV9tbMnDnlkow/WHRQxzShdlrUo4SsC8D0XC S7QA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:references:user-agent:from:to:cc:subject :in-reply-to:date:message-id:mime-version; bh=k7C2YQlnVolHECvpBxfYFeN68XLoPspyDqHzbi8ZXW0=; b=tVnvKGvW75v3tvUyIxRTyDh4BSGcMSNEcioVXlybOykTxcm15aJzQLskAsv7BRiO0t /gsU4PJSmSWc+zeI+IfkH0B/H4M9xYkpzqDDV5BbbD/AdvtSn4xFlOgjORRE5r3zFkOp SQSPEwA44rn20izGIhX0Cd8cSMczouLtVhOuhoSirBVHhRNoxzl4Ka49rHxETndW41cB c/J8ZN3jRnOoMpUkpOtnASmvs/pjYtSo9nM3mm/RWlU3hIvmxZNMdL49SUMv6Pr/UL09 2JreU385sCf+SSJXJya/Y26p7KBWzObEGylZQyD5qLHJQBpnqvC+eOKXm0aiPmKaa8za gh8Q== X-Gm-Message-State: AODbwcARqMFeyvE0j/GUuPpRc2kW5ANKYcLf0xq+fHenDDgWN85wLZVa HszWzZULTcx838WD X-Received: by 10.28.48.21 with SMTP id w21mr285821wmw.44.1494748188162; Sun, 14 May 2017 00:49:48 -0700 (PDT) Received: from cervin (85-169-37-239.rev.numericable.fr. [85.169.37.239]) by smtp.gmail.com with ESMTPSA id y60sm8860479wrb.39.2017.05.14.00.49.47 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 14 May 2017 00:49:47 -0700 (PDT) References: <20170402135242.2958-1-m.othacehe@gmail.com> <20170402135242.2958-2-m.othacehe@gmail.com> <87mvanjepx.fsf@gnu.org> <871sryqy3g.fsf@gmail.com> <87bmr29x4q.fsf@gnu.org> <864lwuje63.fsf@gmail.com> <87inl9zruw.fsf@gnu.org> <20170512020243.5af54ed2@scratchpost.org> <87d1betr8y.fsf@gnu.org> <20170512132630.1eeb75bc@scratchpost.org> <87k25ms3wi.fsf@gnu.org> <20170513115339.4e9eb85e@scratchpost.org> User-agent: mu4e 0.9.18; emacs 25.2.1 From: Mathieu Othacehe To: Danny Milosavljevic Subject: Re: bug#26339: [PATCH 02/18] system: Add extlinux support. In-reply-to: <20170513115339.4e9eb85e@scratchpost.org> Date: Sun, 14 May 2017 09:49:46 +0200 Message-ID: <87d1bb98th.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 26339 Cc: 26339@debbugs.gnu.org, Ludovic =?utf-8?Q?Court=C3=A8s?= 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.5 (/) Hi Danny, > If you mean that for "switch-generation" you use the current generation's bootloader but for "reconfigure" you use the newly-specified bootloader, I agree :) > Yes I meant for switch-generation, sorry for the imprecision. I just sent v4 if you want to have a look :) Mathieu From debbugs-submit-bounces@debbugs.gnu.org Sun May 14 04:43:56 2017 Received: (at 26339) by debbugs.gnu.org; 14 May 2017 08:43:56 +0000 Received: from localhost ([127.0.0.1]:43543 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d9p88-0005AF-Ij for submit@debbugs.gnu.org; Sun, 14 May 2017 04:43:56 -0400 Received: from dd1012.kasserver.com ([85.13.128.8]:37726) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d9p86-0005A6-Ep for 26339@debbugs.gnu.org; Sun, 14 May 2017 04:43:55 -0400 Received: from localhost (178.113.190.188.wireless.dyn.drei.com [178.113.190.188]) by dd1012.kasserver.com (Postfix) with ESMTPSA id 3B9E41CA0051; Sun, 14 May 2017 10:43:52 +0200 (CEST) Date: Sun, 14 May 2017 10:43:47 +0200 From: Danny Milosavljevic To: Mathieu Othacehe Subject: Re: bug#26339: [PATCH v4 1/7] bootloader: Add extlinux support. Message-ID: <20170514104347.1a87906f@scratchpost.org> In-Reply-To: <20170514074803.25556-2-m.othacehe@gmail.com> References: <20170514074803.25556-1-m.othacehe@gmail.com> <20170514074803.25556-2-m.othacehe@gmail.com> X-Mailer: Claws Mail 3.14.1 (GTK+ 2.24.31; x86_64-unknown-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 26339 Cc: 26339@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.7 (/) Hi Mathieu, >+++ b/gnu/bootloader.scm [...] >+(define-record-type* > + (menu-entries bootloader-configuration-menu-entries ; list of > + (default '())) At first I thought this could be confused with grub menu-entries - but on second thought they are similar enough. > + (timeout bootloader-configuration-timeout ; integer > + (default 5)) Can you add a comment about the unit? > +(define (lookup-bootloader-by-name name) > + "Return the bootloader called NAME." > + (or (find (lambda (bootloader) > + (format #t "~a\n" (eq? name (bootloader-name bootloader))) Left-over debugging message? > (append (map boot-parameters->menu-entry entries) > - (grub-configuration-menu-entries config))) > + (bootloader-configuration-menu-entries config))) So bootloader-configuration-menu-entries are grub menu-entries, right? Earlier the code said they were boot-parameters (see quoted text above). >+++ b/gnu/bootloader/grub.scm > +(define-syntax-rule (grub-configuration fields ...) > + (bootloader-configuration > + (bootloader grub-bootloader) > + fields ...)) Will these be able to resolve the symbols used? Because there are new modules now etc - do old configuration files which don't import those modules still work? > - (entry (operating-system-boot-parameters os system root-device))) > - ((module-ref (resolve-interface '(gnu system grub)) > - 'grub-configuration-file) > - (operating-system-bootloader os) > - (list entry) > - #:old-entries old-entries))) > + (entry (operating-system-boot-parameters os system root-device)) > + (bootloader-conf -> (operating-system-bootloader os))) > + ((bootloader-configuration-file-generator > + (bootloader-configuration-bootloader bootloader-conf)) > + bootloader-conf (list entry) #:old-entries old-entries))) Yay my band-aid is gone :) Remainder of this patch LGTM! From debbugs-submit-bounces@debbugs.gnu.org Sun May 14 04:47:27 2017 Received: (at 26339) by debbugs.gnu.org; 14 May 2017 08:47:27 +0000 Received: from localhost ([127.0.0.1]:43552 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d9pBX-0005GW-DJ for submit@debbugs.gnu.org; Sun, 14 May 2017 04:47:27 -0400 Received: from dd1012.kasserver.com ([85.13.128.8]:38058) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d9pBV-0005GO-OZ for 26339@debbugs.gnu.org; Sun, 14 May 2017 04:47:26 -0400 Received: from localhost (178.113.190.188.wireless.dyn.drei.com [178.113.190.188]) by dd1012.kasserver.com (Postfix) with ESMTPSA id B83961CA0051; Sun, 14 May 2017 10:47:24 +0200 (CEST) Date: Sun, 14 May 2017 10:47:20 +0200 From: Danny Milosavljevic To: Mathieu Othacehe Subject: Re: bug#26339: [PATCH v4 2/7] bootloader: Adapt vm to new bootloader API. Message-ID: <20170514104720.7511d8e0@scratchpost.org> In-Reply-To: <20170514074803.25556-3-m.othacehe@gmail.com> References: <20170514074803.25556-1-m.othacehe@gmail.com> <20170514074803.25556-3-m.othacehe@gmail.com> X-Mailer: Claws Mail 3.14.1 (GTK+ 2.24.31; x86_64-unknown-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 26339 Cc: 26339@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.7 (/) LGTM! From debbugs-submit-bounces@debbugs.gnu.org Sun May 14 04:47:57 2017 Received: (at 26339) by debbugs.gnu.org; 14 May 2017 08:47:57 +0000 Received: from localhost ([127.0.0.1]:43555 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d9pC1-0005HF-Lo for submit@debbugs.gnu.org; Sun, 14 May 2017 04:47:57 -0400 Received: from dd1012.kasserver.com ([85.13.128.8]:38108) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d9pC1-0005H8-1b for 26339@debbugs.gnu.org; Sun, 14 May 2017 04:47:57 -0400 Received: from localhost (178.113.190.188.wireless.dyn.drei.com [178.113.190.188]) by dd1012.kasserver.com (Postfix) with ESMTPSA id 0FC631CA0051; Sun, 14 May 2017 10:47:55 +0200 (CEST) Date: Sun, 14 May 2017 10:47:52 +0200 From: Danny Milosavljevic To: Mathieu Othacehe Subject: Re: bug#26339: [PATCH v4 3/7] bootloader: Add bootloader name to boot-parameters record. Message-ID: <20170514104752.4ae90307@scratchpost.org> In-Reply-To: <20170514074803.25556-4-m.othacehe@gmail.com> References: <20170514074803.25556-1-m.othacehe@gmail.com> <20170514074803.25556-4-m.othacehe@gmail.com> X-Mailer: Claws Mail 3.14.1 (GTK+ 2.24.31; x86_64-unknown-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 26339 Cc: 26339@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.7 (/) LGTM! From debbugs-submit-bounces@debbugs.gnu.org Sun May 14 04:50:12 2017 Received: (at 26339) by debbugs.gnu.org; 14 May 2017 08:50:12 +0000 Received: from localhost ([127.0.0.1]:43560 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d9pEC-0005Kg-2T for submit@debbugs.gnu.org; Sun, 14 May 2017 04:50:12 -0400 Received: from dd1012.kasserver.com ([85.13.128.8]:38312) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d9pEB-0005KZ-9A for 26339@debbugs.gnu.org; Sun, 14 May 2017 04:50:11 -0400 Received: from localhost (178.113.190.188.wireless.dyn.drei.com [178.113.190.188]) by dd1012.kasserver.com (Postfix) with ESMTPSA id 1BB751CA0051; Sun, 14 May 2017 10:50:10 +0200 (CEST) Date: Sun, 14 May 2017 10:50:05 +0200 From: Danny Milosavljevic To: Mathieu Othacehe Subject: Re: bug#26339: [PATCH v4 4/7] scripts: system: Adapt "reconfigure" to new bootloader API. Message-ID: <20170514105005.09fd81fc@scratchpost.org> In-Reply-To: <20170514074803.25556-5-m.othacehe@gmail.com> References: <20170514074803.25556-1-m.othacehe@gmail.com> <20170514074803.25556-5-m.othacehe@gmail.com> X-Mailer: Claws Mail 3.14.1 (GTK+ 2.24.31; x86_64-unknown-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 26339 Cc: 26339@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.7 (/) LGTM! From debbugs-submit-bounces@debbugs.gnu.org Sun May 14 04:51:06 2017 Received: (at 26339) by debbugs.gnu.org; 14 May 2017 08:51:06 +0000 Received: from localhost ([127.0.0.1]:43564 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d9pF4-0005MC-Ab for submit@debbugs.gnu.org; Sun, 14 May 2017 04:51:06 -0400 Received: from dd1012.kasserver.com ([85.13.128.8]:38374) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d9pF3-0005M5-8Y for 26339@debbugs.gnu.org; Sun, 14 May 2017 04:51:05 -0400 Received: from localhost (178.113.190.188.wireless.dyn.drei.com [178.113.190.188]) by dd1012.kasserver.com (Postfix) with ESMTPSA id 452FC1CA0051; Sun, 14 May 2017 10:51:04 +0200 (CEST) Date: Sun, 14 May 2017 10:51:00 +0200 From: Danny Milosavljevic To: Mathieu Othacehe Subject: Re: bug#26339: [PATCH v4 5/7] scripts: system: Adapt "init" to new bootloader API. Message-ID: <20170514105100.012a33eb@scratchpost.org> In-Reply-To: <20170514074803.25556-6-m.othacehe@gmail.com> References: <20170514074803.25556-1-m.othacehe@gmail.com> <20170514074803.25556-6-m.othacehe@gmail.com> X-Mailer: Claws Mail 3.14.1 (GTK+ 2.24.31; x86_64-unknown-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 26339 Cc: 26339@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.7 (/) LGTM! From debbugs-submit-bounces@debbugs.gnu.org Sun May 14 04:53:06 2017 Received: (at 26339) by debbugs.gnu.org; 14 May 2017 08:53:06 +0000 Received: from localhost ([127.0.0.1]:43571 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d9pGz-0005PU-Tm for submit@debbugs.gnu.org; Sun, 14 May 2017 04:53:06 -0400 Received: from dd1012.kasserver.com ([85.13.128.8]:38564) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d9pGy-0005PK-95 for 26339@debbugs.gnu.org; Sun, 14 May 2017 04:53:04 -0400 Received: from localhost (178.113.190.188.wireless.dyn.drei.com [178.113.190.188]) by dd1012.kasserver.com (Postfix) with ESMTPSA id 3B9DB1CA0051; Sun, 14 May 2017 10:53:03 +0200 (CEST) Date: Sun, 14 May 2017 10:52:58 +0200 From: Danny Milosavljevic To: Mathieu Othacehe Subject: Re: bug#26339: [PATCH v4 6/7] scripts: system: Adapt "switch-generation" to new bootloader API. Message-ID: <20170514105258.29360525@scratchpost.org> In-Reply-To: <20170514074803.25556-7-m.othacehe@gmail.com> References: <20170514074803.25556-1-m.othacehe@gmail.com> <20170514074803.25556-7-m.othacehe@gmail.com> X-Mailer: Claws Mail 3.14.1 (GTK+ 2.24.31; x86_64-unknown-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 26339 Cc: 26339@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.7 (/) LGTM! From debbugs-submit-bounces@debbugs.gnu.org Sun May 14 04:54:25 2017 Received: (at 26339) by debbugs.gnu.org; 14 May 2017 08:54:25 +0000 Received: from localhost ([127.0.0.1]:43577 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d9pIH-0005Re-8C for submit@debbugs.gnu.org; Sun, 14 May 2017 04:54:25 -0400 Received: from dd1012.kasserver.com ([85.13.128.8]:38670) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d9pIF-0005RU-Oj for 26339@debbugs.gnu.org; Sun, 14 May 2017 04:54:24 -0400 Received: from localhost (178.113.190.188.wireless.dyn.drei.com [178.113.190.188]) by dd1012.kasserver.com (Postfix) with ESMTPSA id BF6171CA0051; Sun, 14 May 2017 10:54:22 +0200 (CEST) Date: Sun, 14 May 2017 10:54:18 +0200 From: Danny Milosavljevic To: Mathieu Othacehe Subject: Re: bug#26339: [PATCH v4 6/7] scripts: system: Adapt "switch-generation" to new bootloader API. Message-ID: <20170514105418.12c2a55a@scratchpost.org> In-Reply-To: <20170514074803.25556-7-m.othacehe@gmail.com> References: <20170514074803.25556-1-m.othacehe@gmail.com> <20170514074803.25556-7-m.othacehe@gmail.com> X-Mailer: Claws Mail 3.14.1 (GTK+ 2.24.31; x86_64-unknown-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 26339 Cc: 26339@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.7 (/) > + ;; PARAMS file may not contain a suitable BOOT-DEVICE. If BOOT-DEVICE > + ;; is #f do not run BOOTLOADER-INSTALLER during bootloader installation. Comment outdated? From debbugs-submit-bounces@debbugs.gnu.org Sun May 14 09:25:46 2017 Received: (at 26339) by debbugs.gnu.org; 14 May 2017 13:25:46 +0000 Received: from localhost ([127.0.0.1]:43684 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d9tWs-0006xu-BB for submit@debbugs.gnu.org; Sun, 14 May 2017 09:25:46 -0400 Received: from eggs.gnu.org ([208.118.235.92]:53907) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d9tWq-0006xf-Pc for 26339@debbugs.gnu.org; Sun, 14 May 2017 09:25:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d9tWe-00038Q-Bn for 26339@debbugs.gnu.org; Sun, 14 May 2017 09:25:37 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=BAYES_40,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:33054) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d9tWe-00038F-87; Sun, 14 May 2017 09:25:32 -0400 Received: from reverse-83.fdn.fr ([80.67.176.83]:49804 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1d9tWd-0003Z1-HL; Sun, 14 May 2017 09:25:32 -0400 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) To: Mathieu Othacehe Subject: Re: bug#26339: [PATCH v4 1/7] bootloader: Add extlinux support. References: <20170514074803.25556-1-m.othacehe@gmail.com> <20170514074803.25556-2-m.othacehe@gmail.com> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 25 =?utf-8?Q?Flor=C3=A9al?= an 225 de la =?utf-8?Q?R?= =?utf-8?Q?=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-unknown-linux-gnu Date: Sun, 14 May 2017 15:25:28 +0200 In-Reply-To: <20170514074803.25556-2-m.othacehe@gmail.com> (Mathieu Othacehe's message of "Sun, 14 May 2017 09:47:57 +0200") Message-ID: <87lgpzwoxj.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 26339 Cc: 26339@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: -5.0 (-----) Hello Mathieu, Mathieu Othacehe skribis: > * gnu/bootloader.scm: New file. > * gnu/bootloader/extlinux.scm: New file. > * gnu/bootloader/grub.scm: New file. > * gnu/local.mk: Build new files. > * gnu/system.scm: Adapt to new bootloader api. > * gnu/scripts/system.scm: Adapt to new bootloader api. > * gnu.scm: Remove (gnu system grub) and replace by (gnu bootloader) and (= gnu > bootloader grub) modules. > * gnu/system/grub.scm: Moved content to gnu/bootloader/grub.scm. > * gnu/system/vm: Replace (gnu system grub) module by (gnu bootloader). > * gnu/tests.scm: Ditto. > * gnu/tests/nfs.scm: Ditto. Nice! Some very minor comments before you push: > +;;; The record contains fields expressing how the bootloader > +;;; should be installed. Every bootloader in gnu/bootloader/ directory > +;;; has to be described by this record. ^ Only two semicolons here. :-) > + (theme bootloader-theme > + (default #f)) I would expect the theme to be part of rather than no? For example GRUB does not impose a particular theme. > +(define dd > + #~(lambda (bs count if of) > + (zero? (system* "dd" > + (string-append "bs=3D" (number->string bs)) > + (string-append "count=3D" (number->string count)) > + (string-append "if=3D" if) > + (string-append "of=3D" of))))) Dunno but in the future it may be better to use =E2=80=98dump-port=E2=80=99= from (guix build utils) than to invoke =E2=80=98dd=E2=80=99. > +(define install-syslinux > + #~(lambda (bootloader device mount-point) > + (let ((extlinux (string-append bootloader "/sbin/extlinux")) > + (install-dir (string-append mount-point "/boot/extlinux")) > + (syslinux-dir (string-append bootloader "/share/syslinux"))) > + (mkdir-p install-dir) > + (for-each (lambda (file) > + (copy-file file > + (string-append install-dir "/" (basename = file)))) Rather: (install-file file install-dir). > +;;; > +;;; Bootloader definitions. > +;;; > + > +(define extlinux-bootloader > + (bootloader > + (name 'extlinux) > + (package #f) > + (installer #f) Why #f here? Looks fishy. > +;;; > +;;; Compatibility macros. > +;;; > + > +(define-syntax-rule (extlinux-configuration fields ...) > + (bootloader-configuration > + (bootloader extlinux-bootloader) > + fields ...)) > + > +(define-syntax-rule (syslinux-configuration fields ...) > + (bootloader-configuration > + (bootloader syslinux-bootloader) > + fields ...)) We can omit these two macros since they have never existed before this patch. New users will write: (bootloader-configuration (bootloader syslinux-bootloader) =E2=80=A6) Speaking of which, could you update guix.texi, maybe in a subsequent patch to avoid blocking this one? I suppose =E2=80=9CGRUB Configuration=E2= =80=9D would have to be renamed to =E2=80=9CBootloader Configuration=E2=80=9D. > +;;; > +;;; Compatibility macros. > +;;; > + > +(define-syntax-rule (grub-configuration fields ...) > + (bootloader-configuration > + (bootloader grub-bootloader) > + fields ...)) > + > +(define-syntax-rule (grub-efi-configuration fields ...) > + (bootloader-configuration > + (bootloader grub-efi-bootloader) > + fields ...)) The second macro can be removed (it did not exist before). However the first one might need to be improved to be really compatible with what exists now. For instance, my laptop=E2=80=99s config has this: (grub-configuration (grub grub-efi) (device "/dev/sda")) So we probably need something like this (untested): (define-syntax grub-configuration (syntax-rules (grub) ((_ (grub package) fields ...) (if (eq? package grub) (bootloader-configuration (bootloader grub-bootloader) fields ...) (bootloader-configuration (bootloader grub-efi-bootloader) fields ...))) ((_ fields ...) (bootloader-configuration (bootloader grub-bootloader) fields ...)))) This will only address the simple case where the =E2=80=98grub=E2=80=99 fie= ld comes first, but that should be OK (esp. since UEFI support was not documented until now=E2=80=A6). Otherwise LGTM, thanks! Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Sun May 14 09:29:03 2017 Received: (at 26339) by debbugs.gnu.org; 14 May 2017 13:29:03 +0000 Received: from localhost ([127.0.0.1]:43689 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d9ta3-00072U-3C for submit@debbugs.gnu.org; Sun, 14 May 2017 09:29:03 -0400 Received: from eggs.gnu.org ([208.118.235.92]:54282) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d9ta0-00071y-KO for 26339@debbugs.gnu.org; Sun, 14 May 2017 09:29:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d9tZq-00060k-Gt for 26339@debbugs.gnu.org; Sun, 14 May 2017 09:28:55 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=BAYES_20,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:33075) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d9tZq-00060g-DN; Sun, 14 May 2017 09:28:50 -0400 Received: from reverse-83.fdn.fr ([80.67.176.83]:49806 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1d9tZp-0006Tu-MI; Sun, 14 May 2017 09:28:50 -0400 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) To: Mathieu Othacehe Subject: Re: bug#26339: [PATCH v4 2/7] bootloader: Adapt vm to new bootloader API. References: <20170514074803.25556-1-m.othacehe@gmail.com> <20170514074803.25556-3-m.othacehe@gmail.com> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 25 =?utf-8?Q?Flor=C3=A9al?= an 225 de la =?utf-8?Q?R?= =?utf-8?Q?=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-unknown-linux-gnu Date: Sun, 14 May 2017 15:28:47 +0200 In-Reply-To: <20170514074803.25556-3-m.othacehe@gmail.com> (Mathieu Othacehe's message of "Sun, 14 May 2017 09:47:58 +0200") Message-ID: <87d1bbwos0.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 26339 Cc: 26339@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: -5.0 (-----) Mathieu Othacehe skribis: > * gnu/build/install.scm (install-boot-config): New procedure. > (install-grub): Move to (gnu bootloader grub). > * gnu/build/vm.scm (register-bootcfg-root): Rename register-grub.cfg-root= and > adjust accordingly. > (initialize-hard-disk): Takes a bootloader-package, bootcfg, bootcfg-lo= cation and > bootloader-installer procedure. Adjust accordingly. > * gnu/system/vm.scm (qemu-image): Adjust to initialize-hard-disk. > (system-disk-image, system-qemu-image, system-qemu-image/shared-store): > Adjust to qemu-image. [...] > --- a/gnu/system/vm.scm > +++ b/gnu/system/vm.scm > @@ -46,6 +46,7 @@ > #:select (%guile-static-stripped)) > #:use-module (gnu packages admin) >=20=20 > + #:use-module (gnu bootloader) > #:use-module (gnu system shadow) > #:use-module (gnu system pam) > #:use-module (gnu system linux-initrd) > @@ -176,8 +177,9 @@ made available under the /xchg CIFS share." > (disk-image-format "qcow2") > (file-system-type "ext4") > file-system-label > - os-derivation > - grub-configuration > + os.drv > + bootcfg.drv > + bootloader I suggest avoiding dots in identifiers (RnRS Scheme does not allow it because it can conflict with the dot notation for pairs.) Use a hyphen instead. Apart from that, if the system tests are happy after this change, fine with me too! Thank you, Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Sun May 14 09:29:42 2017 Received: (at 26339) by debbugs.gnu.org; 14 May 2017 13:29:42 +0000 Received: from localhost ([127.0.0.1]:43692 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d9tag-00073V-Cx for submit@debbugs.gnu.org; Sun, 14 May 2017 09:29:42 -0400 Received: from eggs.gnu.org ([208.118.235.92]:54352) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d9tae-00073G-Pg for 26339@debbugs.gnu.org; Sun, 14 May 2017 09:29:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d9taU-0006n6-ST for 26339@debbugs.gnu.org; Sun, 14 May 2017 09:29:35 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:33080) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d9taU-0006mx-Ps; Sun, 14 May 2017 09:29:30 -0400 Received: from reverse-83.fdn.fr ([80.67.176.83]:49808 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1d9taU-0007ZJ-1X; Sun, 14 May 2017 09:29:30 -0400 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) To: Danny Milosavljevic Subject: Re: bug#26339: [PATCH v4 3/7] bootloader: Add bootloader name to boot-parameters record. References: <20170514074803.25556-1-m.othacehe@gmail.com> <20170514074803.25556-4-m.othacehe@gmail.com> <20170514104752.4ae90307@scratchpost.org> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 25 =?utf-8?Q?Flor=C3=A9al?= an 225 de la =?utf-8?Q?R?= =?utf-8?Q?=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-unknown-linux-gnu Date: Sun, 14 May 2017 15:29:27 +0200 In-Reply-To: <20170514104752.4ae90307@scratchpost.org> (Danny Milosavljevic's message of "Sun, 14 May 2017 10:47:52 +0200") Message-ID: <878tlzwoqw.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 26339 Cc: 26339@debbugs.gnu.org, Mathieu Othacehe 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: -5.0 (-----) Danny Milosavljevic skribis: > LGTM! +1 From debbugs-submit-bounces@debbugs.gnu.org Sun May 14 09:31:34 2017 Received: (at 26339) by debbugs.gnu.org; 14 May 2017 13:31:34 +0000 Received: from localhost ([127.0.0.1]:43701 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d9tcU-00077w-6W for submit@debbugs.gnu.org; Sun, 14 May 2017 09:31:34 -0400 Received: from eggs.gnu.org ([208.118.235.92]:54840) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d9tcT-00077k-B2 for 26339@debbugs.gnu.org; Sun, 14 May 2017 09:31:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d9tcJ-0008Nk-5R for 26339@debbugs.gnu.org; Sun, 14 May 2017 09:31:28 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:33119) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d9tcJ-0008NV-1K; Sun, 14 May 2017 09:31:23 -0400 Received: from reverse-83.fdn.fr ([80.67.176.83]:49810 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1d9tcI-0001Ci-Am; Sun, 14 May 2017 09:31:22 -0400 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) To: Mathieu Othacehe Subject: Re: bug#26339: [PATCH v4 4/7] scripts: system: Adapt "reconfigure" to new bootloader API. References: <20170514074803.25556-1-m.othacehe@gmail.com> <20170514074803.25556-5-m.othacehe@gmail.com> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 25 =?utf-8?Q?Flor=C3=A9al?= an 225 de la =?utf-8?Q?R?= =?utf-8?Q?=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-unknown-linux-gnu Date: Sun, 14 May 2017 15:31:20 +0200 In-Reply-To: <20170514074803.25556-5-m.othacehe@gmail.com> (Mathieu Othacehe's message of "Sun, 14 May 2017 09:48:00 +0200") Message-ID: <874lwnwonr.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 26339 Cc: 26339@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: -5.0 (-----) Mathieu Othacehe skribis: > * guix/scripts/system.scm (install-grub*): Rename to install-bootloader. = Use > keys to pass arguments. Pass a new argument, "installer.drv" which is > a script in store dealing with bootloader-specific install actions. > Also call "install-boot-config" to install the bootloader config file. ^^ Extra space. > (install-bootloader-derivation): New procedure. It returns a derivation t= hat > builds a file containing "install-procedure" gexp. > (perform-action): Build install-proc derivation and call install-bootload= er > with the resulting file. Stop adding GRUB to PATH as bootloaders are call= ed in > install-proc with direct store paths. [...] > +(define* (install-bootloader installer.drv Please avoid dots in identifiers. Otherwise LGTM! Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Sun May 14 09:32:06 2017 Received: (at 26339) by debbugs.gnu.org; 14 May 2017 13:32:06 +0000 Received: from localhost ([127.0.0.1]:43705 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d9td0-000796-FJ for submit@debbugs.gnu.org; Sun, 14 May 2017 09:32:06 -0400 Received: from eggs.gnu.org ([208.118.235.92]:54879) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d9tcy-00078W-HY for 26339@debbugs.gnu.org; Sun, 14 May 2017 09:32:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d9tco-0000N2-7q for 26339@debbugs.gnu.org; Sun, 14 May 2017 09:31:59 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:33125) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d9tco-0000Mt-51; Sun, 14 May 2017 09:31:54 -0400 Received: from reverse-83.fdn.fr ([80.67.176.83]:49812 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1d9tcn-0001gm-Cm; Sun, 14 May 2017 09:31:53 -0400 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) To: Danny Milosavljevic Subject: Re: bug#26339: [PATCH v4 5/7] scripts: system: Adapt "init" to new bootloader API. References: <20170514074803.25556-1-m.othacehe@gmail.com> <20170514074803.25556-6-m.othacehe@gmail.com> <20170514105100.012a33eb@scratchpost.org> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 25 =?utf-8?Q?Flor=C3=A9al?= an 225 de la =?utf-8?Q?R?= =?utf-8?Q?=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-unknown-linux-gnu Date: Sun, 14 May 2017 15:31:50 +0200 In-Reply-To: <20170514105100.012a33eb@scratchpost.org> (Danny Milosavljevic's message of "Sun, 14 May 2017 10:51:00 +0200") Message-ID: <87ziefva2h.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 26339 Cc: 26339@debbugs.gnu.org, Mathieu Othacehe 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: -5.0 (-----) Danny Milosavljevic skribis: > LGTM! Ditto! From debbugs-submit-bounces@debbugs.gnu.org Sun May 14 09:32:30 2017 Received: (at 26339) by debbugs.gnu.org; 14 May 2017 13:32:30 +0000 Received: from localhost ([127.0.0.1]:43708 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d9tdN-00079e-PA for submit@debbugs.gnu.org; Sun, 14 May 2017 09:32:30 -0400 Received: from eggs.gnu.org ([208.118.235.92]:54957) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d9tdM-00079S-2U for 26339@debbugs.gnu.org; Sun, 14 May 2017 09:32:28 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d9tdC-0000Zx-3A for 26339@debbugs.gnu.org; Sun, 14 May 2017 09:32:22 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:33128) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d9tdB-0000Zt-W7; Sun, 14 May 2017 09:32:18 -0400 Received: from reverse-83.fdn.fr ([80.67.176.83]:49814 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1d9tdB-0002JP-7O; Sun, 14 May 2017 09:32:17 -0400 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) To: Danny Milosavljevic Subject: Re: bug#26339: [PATCH v4 6/7] scripts: system: Adapt "switch-generation" to new bootloader API. References: <20170514074803.25556-1-m.othacehe@gmail.com> <20170514074803.25556-7-m.othacehe@gmail.com> <20170514105258.29360525@scratchpost.org> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 25 =?utf-8?Q?Flor=C3=A9al?= an 225 de la =?utf-8?Q?R?= =?utf-8?Q?=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-unknown-linux-gnu Date: Sun, 14 May 2017 15:32:14 +0200 In-Reply-To: <20170514105258.29360525@scratchpost.org> (Danny Milosavljevic's message of "Sun, 14 May 2017 10:52:58 +0200") Message-ID: <87vap3va1t.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 26339 Cc: 26339@debbugs.gnu.org, Mathieu Othacehe 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: -5.0 (-----) Danny Milosavljevic skribis: > LGTM! +1! From debbugs-submit-bounces@debbugs.gnu.org Sun May 14 09:33:31 2017 Received: (at 26339) by debbugs.gnu.org; 14 May 2017 13:33:31 +0000 Received: from localhost ([127.0.0.1]:43713 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d9teN-0007BN-8c for submit@debbugs.gnu.org; Sun, 14 May 2017 09:33:31 -0400 Received: from eggs.gnu.org ([208.118.235.92]:55176) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d9teL-0007BB-Uh for 26339@debbugs.gnu.org; Sun, 14 May 2017 09:33:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d9teG-0001RP-5u for 26339@debbugs.gnu.org; Sun, 14 May 2017 09:33:24 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:33144) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d9teG-0001RF-3A; Sun, 14 May 2017 09:33:24 -0400 Received: from reverse-83.fdn.fr ([80.67.176.83]:49816 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1d9teF-0003y2-EA; Sun, 14 May 2017 09:33:23 -0400 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) To: Mathieu Othacehe Subject: Re: bug#26339: [PATCH v4 7/7] scripts: system: Display bootloader name in "list-generations". References: <20170514074803.25556-1-m.othacehe@gmail.com> <20170514074803.25556-8-m.othacehe@gmail.com> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 25 =?utf-8?Q?Flor=C3=A9al?= an 225 de la =?utf-8?Q?R?= =?utf-8?Q?=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-unknown-linux-gnu Date: Sun, 14 May 2017 15:33:21 +0200 In-Reply-To: <20170514074803.25556-8-m.othacehe@gmail.com> (Mathieu Othacehe's message of "Sun, 14 May 2017 09:48:03 +0200") Message-ID: <87pofbv9zy.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 26339 Cc: 26339@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: -5.0 (-----) Mathieu Othacehe skribis: > * guix/scripts/system.scm (display-system-generation): Display > bootloader name. [...] > + (format #t (G_ " bootloader name: ~a~%") boot-name) Simply =E2=80=9Cbootloader:=E2=80=9D. Otherwise OK, thanks! Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Sun May 14 09:36:06 2017 Received: (at 26339) by debbugs.gnu.org; 14 May 2017 13:36:07 +0000 Received: from localhost ([127.0.0.1]:43718 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d9tgs-0007FC-N0 for submit@debbugs.gnu.org; Sun, 14 May 2017 09:36:06 -0400 Received: from eggs.gnu.org ([208.118.235.92]:55484) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d9tgr-0007Ej-Nd for 26339@debbugs.gnu.org; Sun, 14 May 2017 09:36:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d9tgi-0003wz-O7 for 26339@debbugs.gnu.org; Sun, 14 May 2017 09:36:00 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:33199) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d9tgi-0003wR-Dr; Sun, 14 May 2017 09:35:56 -0400 Received: from reverse-83.fdn.fr ([80.67.176.83]:49818 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1d9tgh-0000sT-OU; Sun, 14 May 2017 09:35:56 -0400 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) To: Mathieu Othacehe Subject: Re: bug#26339: [PATCH v4 1/7] bootloader: Add extlinux support. References: <20170514074803.25556-1-m.othacehe@gmail.com> <20170514074803.25556-2-m.othacehe@gmail.com> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 25 =?utf-8?Q?Flor=C3=A9al?= an 225 de la =?utf-8?Q?R?= =?utf-8?Q?=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-unknown-linux-gnu Date: Sun, 14 May 2017 15:35:53 +0200 In-Reply-To: <20170514074803.25556-2-m.othacehe@gmail.com> (Mathieu Othacehe's message of "Sun, 14 May 2017 09:47:57 +0200") Message-ID: <87lgpzv9vq.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 26339 Cc: 26339@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: -5.0 (-----) BTW, it would be nice if, in a subsequent patch, you could add an extlinux/syslinux test. It=E2=80=99s probably going to be less used than G= RUB so having a test would help avoid bitrot. Anyway, thanks for your patience and hard work on this series, thanks to David for starting it and to Danny for tirelessly reviewing it! Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Sun May 14 10:59:35 2017 Received: (at 26339) by debbugs.gnu.org; 14 May 2017 14:59:35 +0000 Received: from localhost ([127.0.0.1]:44887 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d9uze-00011t-Ow for submit@debbugs.gnu.org; Sun, 14 May 2017 10:59:34 -0400 Received: from dd1012.kasserver.com ([85.13.128.8]:44256) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d9uzd-00011l-3X for 26339@debbugs.gnu.org; Sun, 14 May 2017 10:59:33 -0400 Received: from localhost (178.113.252.189.wireless.dyn.drei.com [178.113.252.189]) by dd1012.kasserver.com (Postfix) with ESMTPSA id 8BE9E1CA0026; Sun, 14 May 2017 16:59:29 +0200 (CEST) Date: Sun, 14 May 2017 16:59:27 +0200 From: Danny Milosavljevic To: ludo@gnu.org (Ludovic =?ISO-8859-1?Q?Court=E8s?=) Subject: Re: bug#26339: [PATCH v4 2/7] bootloader: Adapt vm to new bootloader API. Message-ID: <20170514165927.2708bd7a@scratchpost.org> In-Reply-To: <87d1bbwos0.fsf@gnu.org> References: <20170514074803.25556-1-m.othacehe@gmail.com> <20170514074803.25556-3-m.othacehe@gmail.com> <87d1bbwos0.fsf@gnu.org> X-Mailer: Claws Mail 3.14.1 (GTK+ 2.24.31; x86_64-unknown-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 26339 Cc: 26339@debbugs.gnu.org, Mathieu Othacehe 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.7 (/) On Sun, 14 May 2017 15:28:47 +0200 ludo@gnu.org (Ludovic Court=C3=A8s) wrote: > I suggest avoiding dots in identifiers (RnRS Scheme does not allow it > because it can conflict with the dot notation for pairs.) Use a hyphen > instead. ... oops. My fault for suggesting it. I didn't have practical problems wi= th dots before and some parts in Guix already use the dot (latest-kernel.org-release, package definitions and the previous bootloader= that's in master for a long time). But good to know. I shall use no dots in identifiers in the future. Any p= reference of how to name derivations? From debbugs-submit-bounces@debbugs.gnu.org Sun May 14 15:54:01 2017 Received: (at 26339) by debbugs.gnu.org; 14 May 2017 19:54:02 +0000 Received: from localhost ([127.0.0.1]:45115 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d9zab-00019z-Mc for submit@debbugs.gnu.org; Sun, 14 May 2017 15:54:01 -0400 Received: from eggs.gnu.org ([208.118.235.92]:53709) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d9zaa-00019f-7r for 26339@debbugs.gnu.org; Sun, 14 May 2017 15:54:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d9zaQ-0001Tl-TC for 26339@debbugs.gnu.org; Sun, 14 May 2017 15:53:54 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:38169) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d9zaQ-0001Th-Pe; Sun, 14 May 2017 15:53:50 -0400 Received: from reverse-83.fdn.fr ([80.67.176.83]:51084 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1d9zaQ-0005xO-27; Sun, 14 May 2017 15:53:50 -0400 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) To: Danny Milosavljevic Subject: Re: bug#26339: [PATCH v4 2/7] bootloader: Adapt vm to new bootloader API. References: <20170514074803.25556-1-m.othacehe@gmail.com> <20170514074803.25556-3-m.othacehe@gmail.com> <87d1bbwos0.fsf@gnu.org> <20170514165927.2708bd7a@scratchpost.org> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 25 =?utf-8?Q?Flor=C3=A9al?= an 225 de la =?utf-8?Q?R?= =?utf-8?Q?=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-unknown-linux-gnu Date: Sun, 14 May 2017 21:53:47 +0200 In-Reply-To: <20170514165927.2708bd7a@scratchpost.org> (Danny Milosavljevic's message of "Sun, 14 May 2017 16:59:27 +0200") Message-ID: <87pofbtdtg.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 26339 Cc: 26339@debbugs.gnu.org, Mathieu Othacehe 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: -5.0 (-----) Danny Milosavljevic skribis: > On Sun, 14 May 2017 15:28:47 +0200 > ludo@gnu.org (Ludovic Court=C3=A8s) wrote: > >> I suggest avoiding dots in identifiers (RnRS Scheme does not allow it >> because it can conflict with the dot notation for pairs.) Use a hyphen >> instead. > > ... oops. My fault for suggesting it. I didn't have practical problems = with dots before and some parts in Guix already use the dot > (latest-kernel.org-release, package definitions and the previous bootload= er that's in master for a long time). Right, dots in identifiers are valid in Guile, I even use them for packages, but somehow I mentally have double-standards between (gnu packages =E2=80=A6) modules and the rest. :-) > But good to know. I shall use no dots in identifiers in the future. Any= preference of how to name derivations? Often it=E2=80=99s enough to name them by what the correspond to (say =E2= =80=9Cprofile=E2=80=9D, =E2=80=9Cconfig-file=E2=80=9D, etc.). In other cases, I usually use things= like =E2=80=9Cos-drv=E2=80=9D or =E2=80=9Cdrv=E2=80=9D. Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Tue May 16 08:46:30 2017 Received: (at 26339) by debbugs.gnu.org; 16 May 2017 12:46:30 +0000 Received: from localhost ([127.0.0.1]:47526 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dAbry-0005Yq-3g for submit@debbugs.gnu.org; Tue, 16 May 2017 08:46:30 -0400 Received: from mail-wm0-f53.google.com ([74.125.82.53]:38891) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dAbrw-0005Yb-NX for 26339@debbugs.gnu.org; Tue, 16 May 2017 08:46:29 -0400 Received: by mail-wm0-f53.google.com with SMTP id v15so91367858wmv.1 for <26339@debbugs.gnu.org>; Tue, 16 May 2017 05:46:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=references:user-agent:from:to:cc:subject:in-reply-to:date :message-id:mime-version; bh=D9ueKVjEZRLpAgQv3xc/ADRrWlr0IkcNQ2JOFrDyy5g=; b=BxDAhRSjNmcz75cY++EcUH/bAbOPvRwhX8u7mkmf9P0QZ3yYHggwihp0k4lP8RubIQ FOzYtxlTG+OXHw/tueQJoTCs5ERN5VEF4BzpHz1UJrFZI89mODE5tGpuXB5bFBrjEaO/ jRHpFbaBPT57e08veGmKAmujU1wOcarzjH85yJ+xwdD3W9PW163LPmIK7ZIN0pTEa8Xb /2QvIexpZ6/sM/EJTuy0L41HckhOLEPQhXzivg2obMGzvLavctrD/OE8CudhFC3QogyM 8vcgzIk3KPglBlr09EpFHsYPrHRBv7V9++zn04atMUXuy3T2D7dd/NKzIxCuqR6RO/DA 13VQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:references:user-agent:from:to:cc:subject :in-reply-to:date:message-id:mime-version; bh=D9ueKVjEZRLpAgQv3xc/ADRrWlr0IkcNQ2JOFrDyy5g=; b=B6o3t5DP52Bi263dh6NMNUvNFvPa6VizAcvuw9Fx0GwnyhvSiq6OkVrceyFQTY1pbJ CxdA3iioEF9wsAywuwhet5XpT2G5/pshiVezEqEzQXwtoC/gqO6nluCaO++4hCgBNrKl Il9DkPssN6BzQXqZDF2JzxVRZjIzIF67BEu7cpKfKyUk20rpdcYI5dIHA9Mhrl+gfYCf /2SlL/tNn1IKlc+qE9vcx5TqxXRxLFocSLjd1fKFn9cBPq44YFGOtaB5JrtLZK7a/D2+ MncFiNMC5dI92bwSNBTavmiaxQrNlr4bh9/gUdgTC+65VjKSNc2HgkWyTRwboWZgEbRh pyEg== X-Gm-Message-State: AODbwcAx577X1YNLt/ZujuzBCAn/OU6r01TdrW6E825t6VRjZivv5GvF UPLbx1h/onPS5A== X-Received: by 10.28.0.200 with SMTP id 191mr7899913wma.12.1494938782718; Tue, 16 May 2017 05:46:22 -0700 (PDT) Received: from zbook ([46.218.109.88]) by smtp.gmail.com with ESMTPSA id 185sm2492683wmo.10.2017.05.16.05.46.22 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 16 May 2017 05:46:22 -0700 (PDT) References: <20170514074803.25556-1-m.othacehe@gmail.com> <20170514074803.25556-2-m.othacehe@gmail.com> <20170514104347.1a87906f@scratchpost.org> User-agent: mu4e 0.9.18; emacs 25.2.1 From: Mathieu Othacehe To: Danny Milosavljevic Subject: Re: bug#26339: [PATCH v4 1/7] bootloader: Add extlinux support. In-reply-to: <20170514104347.1a87906f@scratchpost.org> Date: Tue, 16 May 2017 14:46:24 +0200 Message-ID: <86k25ht1en.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 26339 Cc: 26339@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.5 (/) Hi Danny, > Can you add a comment about the unit? Done. > Left-over debugging message? Ooop ;) > So bootloader-configuration-menu-entries are grub menu-entries, right? Earlier the code said they were boot-parameters (see quoted text above). Yes you're right there were a confusion here. I fixed it before applying. > >>+++ b/gnu/bootloader/grub.scm >> +(define-syntax-rule (grub-configuration fields ...) >> + (bootloader-configuration >> + (bootloader grub-bootloader) >> + fields ...)) > > Will these be able to resolve the symbols used? Because there are new modules now etc - do old configuration files which don't import those modules still work? Yes the will because most modules included (gnu) which no includes (gnu bootloader grub). For modules directly including (gnu system grub), this patch was already ok. See (gnu tests) for instance. > >> - (entry (operating-system-boot-parameters os system root-device))) >> - ((module-ref (resolve-interface '(gnu system grub)) >> - 'grub-configuration-file) >> - (operating-system-bootloader os) >> - (list entry) >> - #:old-entries old-entries))) >> + (entry (operating-system-boot-parameters os system root-device)) >> + (bootloader-conf -> (operating-system-bootloader os))) >> + ((bootloader-configuration-file-generator >> + (bootloader-configuration-bootloader bootloader-conf)) >> + bootloader-conf (list entry) #:old-entries old-entries))) > > Yay my band-aid is gone :) Yop ! > > Remainder of this patch LGTM! Thanks for your review ! Mathieu From debbugs-submit-bounces@debbugs.gnu.org Tue May 16 08:47:01 2017 Received: (at 26339) by debbugs.gnu.org; 16 May 2017 12:47:01 +0000 Received: from localhost ([127.0.0.1]:47529 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dAbsT-0005Zs-C1 for submit@debbugs.gnu.org; Tue, 16 May 2017 08:47:01 -0400 Received: from mail-wm0-f67.google.com ([74.125.82.67]:36469) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dAbsS-0005Zc-37 for 26339@debbugs.gnu.org; Tue, 16 May 2017 08:47:00 -0400 Received: by mail-wm0-f67.google.com with SMTP id u65so37218525wmu.3 for <26339@debbugs.gnu.org>; Tue, 16 May 2017 05:47:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=references:user-agent:from:to:cc:subject:in-reply-to:date :message-id:mime-version; bh=yDrD9+MK0mo+0491AB827V8Ejoco2xbwwmWAY29ImYk=; b=gKfdQD82aT838Gy8zrS6AgSuSgc4mx74uUeUj3Qq/ZgnsdofLQJvrY8jHAb1FT1yKh aQA3Ae0QLP4OtM37f36RK5alc5nGhVfQZB+hezNyslJNph/9iXXOZe2BNJvVxB9piARC ty2GIBFr/xNyk1I2G1KXZlfksrbFoEs57dL9IIGSoP+0Ufdsa0o9qUQ3LHJrDZHWeRyi Ll2sW9annKCVvefM64jKDhbeLoWI9IUwuxlyBe01SbWIEwfcyw9u0onjSq9sfyaRdMQp J52WuFa0zKEpOTK0I6ZSV1pGkbBv3ANSw5DoJ7PLN+6b7itbP3KvBuj2gxu2EDCTDfeT lGoQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:references:user-agent:from:to:cc:subject :in-reply-to:date:message-id:mime-version; bh=yDrD9+MK0mo+0491AB827V8Ejoco2xbwwmWAY29ImYk=; b=FHbClyuKIj7sX3FnViET5hkqjdmSe+nhTvLWZ0VrQ8uxtaY3oP0TNNu/Xcx5+4Xn/0 3iWzMODs9tQ3kOvUGzdFMkKjefUpMwSjvqEUn0JSzaPo974kxUXdHL7bxSTQ/2zCAnDu ydbxVmWrLiknWZXmhUI3gAbBcrzL5IsRO5CLjtmh1HSId1cyGRMKtLYGPeaEfS1KoJ7P Us2rIW/HL85yYl5fGuxm/mmbMV/wif62/Am2cgmeAz0vNebu/RWQh2Z0JQdUJHvbrbFR St796sCg1ur2P0D3gsMv4cU/BL7KTm7hBThylSOuxMxXuhqTEChwPy/icWND0+y4whbg +v8w== X-Gm-Message-State: AODbwcAqO6MOjYqz4vybONQEsCZmiVWoqzeQ0k9VdOGAW4AmZaH50oaR hI/Z2d6aWtOrew== X-Received: by 10.223.171.68 with SMTP id r4mr7498597wrc.67.1494938814383; Tue, 16 May 2017 05:46:54 -0700 (PDT) Received: from zbook ([46.218.109.88]) by smtp.gmail.com with ESMTPSA id l1sm2364160wrl.15.2017.05.16.05.46.53 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 16 May 2017 05:46:53 -0700 (PDT) References: <20170514074803.25556-1-m.othacehe@gmail.com> <20170514074803.25556-7-m.othacehe@gmail.com> <20170514105418.12c2a55a@scratchpost.org> User-agent: mu4e 0.9.18; emacs 25.2.1 From: Mathieu Othacehe To: Danny Milosavljevic Subject: Re: bug#26339: [PATCH v4 6/7] scripts: system: Adapt "switch-generation" to new bootloader API. In-reply-to: <20170514105418.12c2a55a@scratchpost.org> Date: Tue, 16 May 2017 14:46:56 +0200 Message-ID: <86inl1t1dr.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 26339 Cc: 26339@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.5 (/) >> + ;; PARAMS file may not contain a suitable BOOT-DEVICE. If BOOT-DEVICE >> + ;; is #f do not run BOOTLOADER-INSTALLER during bootloader installation. > > Comment outdated? You're right I changed it before applying. Mathieu From debbugs-submit-bounces@debbugs.gnu.org Tue May 16 08:51:51 2017 Received: (at 26339) by debbugs.gnu.org; 16 May 2017 12:51:51 +0000 Received: from localhost ([127.0.0.1]:47535 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dAbx8-0005gg-VJ for submit@debbugs.gnu.org; Tue, 16 May 2017 08:51:51 -0400 Received: from mail-wm0-f50.google.com ([74.125.82.50]:36390) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dAbx7-0005gT-49 for 26339@debbugs.gnu.org; Tue, 16 May 2017 08:51:49 -0400 Received: by mail-wm0-f50.google.com with SMTP id u65so121371417wmu.1 for <26339@debbugs.gnu.org>; Tue, 16 May 2017 05:51:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=references:user-agent:from:to:cc:subject:in-reply-to:date :message-id:mime-version:content-transfer-encoding; bh=48HPkOO0J7f0wX2tVRYvalV8c24pLcynlX7zYWNGKeE=; b=BaEcECrypirtRFtl1OtQzeyrIY+ER6v9yMi+uFCvMga5cjAil+rCbZjaR936uoEODL ZMUrHrS3FgOnDXeXx2XGqwSrFDHKvbQZrBlG9vuTiiUY67VXe4uCdYvumaJeDggCUayG 6Nlc8XxFVuw6Ug3LBNVvpkyNfPhyK8Mpvn0CoxQoAHNLNiyqj26zmZxjwoaqaYPoR4Nh W1CEe0OOLbukjZzEUGPBhi9DMGxxxJ1jl/zsi06H1JDQ0ip0MpSYdQeqXe5wcE6ZcNkq IECPtOct6PCQtXS427kqtcIgUPd6wHTRDi1k+zbveTP/8L7N0QwTPNH2CfTFHKNR/gzi hvKg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:references:user-agent:from:to:cc:subject :in-reply-to:date:message-id:mime-version:content-transfer-encoding; bh=48HPkOO0J7f0wX2tVRYvalV8c24pLcynlX7zYWNGKeE=; b=g7df/UvsIfwLma+JANqL38A7Sc/cHRNxzenzRQPx/ucWs+tIEi8JNiRYQubk+7UcEv UETnqmNjlWjBz/Hw6HfB09VFY+c8/yY3SyjUYZeGquRHL6ioCpYejk5V8FPB7u1THmuW 8PK1IRhe3c+Q2pDZyldjsIMV80HVw0b0NWANtdAuah1azvPpE8otCutOaxiMtDMrkKcM 3UqT8Vuar4y+4knSKtNQs/DS+mZYtf8dXqhelodXLxgacZOnMPFonbMV23gcLpu2RlGR vOLCly/f4witIkvisH+oMvfXNh4SOr3MxaBOry0cqPSAmrGb7O+mx7mdaSiBn9HDdTLy pXZQ== X-Gm-Message-State: AODbwcDAQ/Dmg2hr9bRgLz8VPRLdfetCHrFXAtkMoMJrb9Fi8ZQKdfU9 U38ChKJ/KBxzFw== X-Received: by 10.28.147.9 with SMTP id v9mr6849114wmd.80.1494939102253; Tue, 16 May 2017 05:51:42 -0700 (PDT) Received: from zbook ([46.218.109.88]) by smtp.gmail.com with ESMTPSA id w68sm2084872wrb.49.2017.05.16.05.51.41 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 16 May 2017 05:51:41 -0700 (PDT) References: <20170514074803.25556-1-m.othacehe@gmail.com> <20170514074803.25556-2-m.othacehe@gmail.com> <87lgpzwoxj.fsf@gnu.org> User-agent: mu4e 0.9.18; emacs 25.2.1 From: Mathieu Othacehe To: Ludovic =?utf-8?Q?Court=C3=A8s?= Subject: Re: bug#26339: [PATCH v4 1/7] bootloader: Add extlinux support. In-reply-to: <87lgpzwoxj.fsf@gnu.org> Date: Tue, 16 May 2017 14:51:44 +0200 Message-ID: <86h90lt15r.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 26339 Cc: 26339@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.0 (/) Hi Ludo, > Nice! Some very minor comments before you push: Thank you :) > Only two semicolons here. :-) Ok. > >> + (theme bootloader-theme >> + (default #f)) > > I would expect the theme to be part of rather > than no? For example GRUB does not impose a particular > theme. Ok I moved it to . > >> +(define dd >> + #~(lambda (bs count if of) >> + (zero? (system* "dd" >> + (string-append "bs=" (number->string bs)) >> + (string-append "count=" (number->string count)) >> + (string-append "if=" if) >> + (string-append "of=" of))))) > > Dunno but in the future it may be better to use ‘dump-port’ from (guix > build utils) than to invoke ‘dd’. Ok, I'll consider it in a follow-up serie. > >> +(define install-syslinux >> + #~(lambda (bootloader device mount-point) >> + (let ((extlinux (string-append bootloader "/sbin/extlinux")) >> + (install-dir (string-append mount-point "/boot/extlinux")) >> + (syslinux-dir (string-append bootloader "/share/syslinux"))) >> + (mkdir-p install-dir) >> + (for-each (lambda (file) >> + (copy-file file >> + (string-append install-dir "/" (basename file)))) > > Rather: (install-file file install-dir). Ok. > >> +;;; >> +;;; Bootloader definitions. >> +;;; >> + >> +(define extlinux-bootloader >> + (bootloader >> + (name 'extlinux) >> + (package #f) >> + (installer #f) > > Why #f here? Looks fishy. It turns out that the distinction between extlinux and syslinux was weird in David serie. "extlinux" bootloader was no installing anything. My understanding is that extlinux is one of the bootloaders provided by the syslinux package. So, I removed the notion of "syslinux-bootloader" and only kepy an "extlinux-bootloader" before applying. > >> +;;; >> +;;; Compatibility macros. >> +;;; >> + >> +(define-syntax-rule (extlinux-configuration fields ...) >> + (bootloader-configuration >> + (bootloader extlinux-bootloader) >> + fields ...)) >> + >> +(define-syntax-rule (syslinux-configuration fields ...) >> + (bootloader-configuration >> + (bootloader syslinux-bootloader) >> + fields ...)) > > We can omit these two macros since they have never existed before this > patch. New users will write: > > (bootloader-configuration > (bootloader syslinux-bootloader) > …) Ok. > > Speaking of which, could you update guix.texi, maybe in a subsequent > patch to avoid blocking this one? I suppose “GRUB Configuration” would > have to be renamed to “Bootloader Configuration”. > >> +;;; >> +;;; Compatibility macros. >> +;;; >> + >> +(define-syntax-rule (grub-configuration fields ...) >> + (bootloader-configuration >> + (bootloader grub-bootloader) >> + fields ...)) >> + >> +(define-syntax-rule (grub-efi-configuration fields ...) >> + (bootloader-configuration >> + (bootloader grub-efi-bootloader) >> + fields ...)) > > The second macro can be removed (it did not exist before). > > However the first one might need to be improved to be really compatible > with what exists now. For instance, my laptop’s config has this: > > (grub-configuration > (grub grub-efi) > (device "/dev/sda")) > > So we probably need something like this (untested): > > (define-syntax grub-configuration > (syntax-rules (grub) > ((_ (grub package) fields ...) > (if (eq? package grub) > (bootloader-configuration > (bootloader grub-bootloader) > fields ...) > (bootloader-configuration > (bootloader grub-efi-bootloader) > fields ...))) > ((_ fields ...) > (bootloader-configuration > (bootloader grub-bootloader) > fields ...)))) > > This will only address the simple case where the ‘grub’ field comes > first, but that should be OK (esp. since UEFI support was not documented > until now…). It seems to work ok, I took it :) Thanks, Mathieu From debbugs-submit-bounces@debbugs.gnu.org Tue May 16 08:56:04 2017 Received: (at 26339) by debbugs.gnu.org; 16 May 2017 12:56:04 +0000 Received: from localhost ([127.0.0.1]:47539 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dAc1E-0005mh-HF for submit@debbugs.gnu.org; Tue, 16 May 2017 08:56:04 -0400 Received: from mail-wm0-f65.google.com ([74.125.82.65]:32880) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dAc1B-0005mB-DB for 26339@debbugs.gnu.org; Tue, 16 May 2017 08:56:01 -0400 Received: by mail-wm0-f65.google.com with SMTP id y10so38141590wmh.0 for <26339@debbugs.gnu.org>; Tue, 16 May 2017 05:56:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=references:user-agent:from:to:cc:subject:in-reply-to:date :message-id:mime-version; bh=oFedxv/XNnbUlidXfF52B0vstVeK0H0bKh8GkhJFbSM=; b=tXtO3VzpMl8OlINOjFpYrcyJ4bQz1pMv2d7WVKiBY7xskNEEUQTQV7wCt0jFd+iOgj lSsRRNkjYwzWOtfXP1xfEuviY3tRDfe5NyNwPUbpLUCq/eOtheu/5p+prQ3c4ABzFDnd JVLMAb2w37e1vxCpKU86A0js9a4YKS1q9mNtHroAyKXF7PjWb73b9cCvAEA3LX2lt8Bc Rb0+MzLim90vRtwQ4odMXySGvCq0uqcBV0xDPwZ3Y9yhw6LBThK+83JKWOawuqZbCm9i IdEe/0ETaxBr/p2YoMaJudXUjkF3b71K1iZCgA9Eps/Yfy/EMm/U0WRNVGGm4qL5mAn1 LvfA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:references:user-agent:from:to:cc:subject :in-reply-to:date:message-id:mime-version; bh=oFedxv/XNnbUlidXfF52B0vstVeK0H0bKh8GkhJFbSM=; b=ZjfBnw9dlQLldLEcvZGa4dMBjnOZkGKj2vKAENcaB1Z7T9qikVgXKmJH1VNkR2vbug gcFksOnvjk8Ab+bT6KJy8+FkHJYP6CxRwPDx3BLRPEzqNo8nwvwszzDlGoYbr4h4PAUB 3sPwuHYKpC10y3gnvuHYxyLjHVmKKWqi6yNT1f+dY5pfmhSGNyCZtfEL2aj6oDTUEZOn vRAHYykVIBx1rcRieg9Dz/UKce2RgF+Td3lVDbT35AcLTv4c0q2qZbINsidIL27vzne3 Cxww3lrMWdi8Qlg1pQrifEddAsSg7GPh+3ewOT+WGGljH7IQvTHHxK6ZgN7US6wlqRcW cBAA== X-Gm-Message-State: AODbwcBh4JcxMtzb9yegZqV0A6xloFwAFJgeK23BP63MbbWRzycEoAtM 6hKtj97QEfaQNQ== X-Received: by 10.223.157.11 with SMTP id k11mr7313170wre.71.1494939355707; Tue, 16 May 2017 05:55:55 -0700 (PDT) Received: from zbook ([46.218.109.88]) by smtp.gmail.com with ESMTPSA id l7sm2560036wrc.52.2017.05.16.05.55.54 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 16 May 2017 05:55:55 -0700 (PDT) References: <20170514074803.25556-1-m.othacehe@gmail.com> <20170514074803.25556-2-m.othacehe@gmail.com> <87lgpzv9vq.fsf@gnu.org> User-agent: mu4e 0.9.18; emacs 25.2.1 From: Mathieu Othacehe To: Ludovic =?utf-8?Q?Court=C3=A8s?= , Danny Milosavljevic Subject: Re: bug#26339: [PATCH v4 1/7] bootloader: Add extlinux support. In-reply-to: <87lgpzv9vq.fsf@gnu.org> Date: Tue, 16 May 2017 14:55:57 +0200 Message-ID: <86fug5t0yq.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 26339 Cc: 26339@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.5 (/) > Anyway, thanks for your patience and hard work on this series, thanks to > David for starting it and to Danny for tirelessly reviewing it! I pushed the whole serie. Thanks a lot to both of you for reviewing it ! I'll submit the doc patch soon. Mathieu From debbugs-submit-bounces@debbugs.gnu.org Tue May 16 09:03:24 2017 Received: (at 26339) by debbugs.gnu.org; 16 May 2017 13:03:25 +0000 Received: from localhost ([127.0.0.1]:47543 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dAc8K-0005xr-9x for submit@debbugs.gnu.org; Tue, 16 May 2017 09:03:24 -0400 Received: from mail-wm0-f65.google.com ([74.125.82.65]:33594) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dAc8F-0005xb-HB for 26339@debbugs.gnu.org; Tue, 16 May 2017 09:03:22 -0400 Received: by mail-wm0-f65.google.com with SMTP id y10so38198203wmh.0 for <26339@debbugs.gnu.org>; Tue, 16 May 2017 06:03:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=yCyE+SxW+p45+n69N+xilrA9fpowf8YU38ir30ZEE9U=; b=fD/aPxCRr9q5l1+01Mhn31nLlbzHwVHAFvLos90q7Fh3+AStT7wbvMm7mZAonotdUC 1ipehvml8et/6UhFXGbg4PVt5J2ylJrTCKdMV5SMpHGpmu00OhAQMpo3sNPCQdwa7/Ej coP7Wfd0nYwCoMUAuHJQs+sJvhTAwsb88ieEQ7GpeQsTV5oY2KZBmeJgCDDx51GvbNzs yfApOObmwCTAMjAQUp30HudZIfRYpdf2+itQplwy825THjM4mBy0eDwPSGmgxRJeMJOt SgwFkN5IGK0zh1rWWZabq5JLiZFbwzwWb8PDEuFHiw4R7vVQAuYIwJsm4k/bSBpKdAco XtDQ== 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:date:message-id; bh=yCyE+SxW+p45+n69N+xilrA9fpowf8YU38ir30ZEE9U=; b=BRf7uIa1EZ2Y4CLNcgWzv1u4Gggzt37INlf2XtQKn+NxhryynkG/JNoPCQ9NKZNnTt lwg9BKqc1eTYT+njq2l5BB7+Iolb3kHYQWaCyu3tenLN+nFyBLDWnENTdnaITq80vV8m XNWsQoF4lMiDHgjY2jtR+GVFZdWl/Ge3QSUYmKu2T7UoJm33thrtvUx21STdBAPaRdVt T34a0yLv3Qnu01NUOvXGuD/8mo3bD0x/tCSlaYPRT4F7WkgyRqnTOXFBkbmQpbnbO7bY ZfTfINj1iE2z48MHUwUlp/TatQGeYNsis73Yo2mL+Yg1Ug/PlnlSPMTcCfmqJBtqqwsd WFIQ== X-Gm-Message-State: AODbwcAC4uaxQtP8qnYYUA9uT1y6oE2Qej2PevpT26yKReSNfP8OATt1 qGpDxuMQk+kFRJ/W X-Received: by 10.28.105.204 with SMTP id z73mr6928391wmh.33.1494939793072; Tue, 16 May 2017 06:03:13 -0700 (PDT) Received: from cervin.8.8.8.8 (85-169-37-239.rev.numericable.fr. [85.169.37.239]) by smtp.gmail.com with ESMTPSA id 30sm1412144wrp.6.2017.05.16.06.03.12 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 16 May 2017 06:03:12 -0700 (PDT) From: Mathieu Othacehe To: 26339@debbugs.gnu.org Subject: [PATCH] doc: Adapt to multiple bootloader support. Date: Tue, 16 May 2017 15:03:06 +0200 Message-Id: <20170516130306.10414-1-m.othacehe@gmail.com> X-Mailer: git-send-email 2.13.0 X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 26339 Cc: Mathieu Othacehe 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.5 (/) * doc/guix.texi (GRUB configuration): Rename to "Bootloader configuration". [menu-entry]: Switch to "boot-parameters" and adapt fields. Adapt occurences of "GRUB" in other sections. --- Hi, Here's the doc patch. While writting it, I noticed that using for 's menu-entry fields was maybe not a good idea. has no default values and it might be hard to understand by final users. WDYT ? Thanks, Mathieu doc/guix.texi | 208 +++++++++++++++++++++++++++++++++------------------------- 1 file changed, 118 insertions(+), 90 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index 7baf6ee38..455dbbc84 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -198,7 +198,7 @@ System Configuration * X.509 Certificates:: Authenticating HTTPS servers. * Name Service Switch:: Configuring libc's name service switch. * Initial RAM Disk:: Linux-Libre bootstrapping. -* GRUB Configuration:: Configuring the boot loader. +* Bootloader Configuration:: Configuring the boot loader. * Invoking guix system:: Instantiating a system configuration. * Running GuixSD in a VM:: How to run GuixSD in a virtual machine. * Defining Services:: Adding new service definitions. @@ -7731,7 +7731,7 @@ instance to support new system services. * X.509 Certificates:: Authenticating HTTPS servers. * Name Service Switch:: Configuring libc's name service switch. * Initial RAM Disk:: Linux-Libre bootstrapping. -* GRUB Configuration:: Configuring the boot loader. +* Bootloader Configuration:: Configuring the boot loader. * Invoking guix system:: Instantiating a system configuration. * Running GuixSD in a VM:: How to run GuixSD in a virtual machine. * Defining Services:: Adding new service definitions. @@ -7914,7 +7914,7 @@ system, should you ever need to. Speaking of roll-back, each time you run @command{guix system reconfigure}, a new @dfn{generation} of the system is created---without modifying or deleting previous generations. Old system generations get -an entry in the GRUB boot menu, allowing you to boot them in case +an entry in the bootloader boot menu, allowing you to boot them in case something went wrong with the latest generation. Reassuring, no? The @command{guix system list-generations} command lists the system generations available on disk. It is also possible to roll back the @@ -7970,7 +7970,7 @@ List of strings or gexps representing additional arguments to pass on the command-line of the kernel---e.g., @code{("console=ttyS0")}. @item @code{bootloader} -The system bootloader configuration object. @xref{GRUB Configuration}. +The system bootloader configuration object. @xref{Bootloader Configuration}. @item @code{initrd} (default: @code{base-initrd}) @cindex initrd @@ -15229,32 +15229,41 @@ upon booting. All the derivations referenced by @var{exp} are automatically copied to the initrd. @end deffn -@node GRUB Configuration -@subsection GRUB Configuration +@node Bootloader Configuration +@subsection Bootloader Configuration -@cindex GRUB +@cindex Bootloader @cindex boot loader -The operating system uses GNU@tie{}GRUB as its boot loader -(@pxref{Overview, overview of GRUB,, grub, GNU GRUB Manual}). It is -configured using a @code{grub-configuration} declaration. This data type -is exported by the @code{(gnu system grub)} module and described below. +The operating system supports multiple bootloaders. The bootloader is +configured using @code{bootloader-configuration} declaration. All the +fields of this structure are bootloader agnostic except for one field, +@code{bootloader} that indicates the bootloader to be configured and +installed. -@deftp {Data Type} grub-configuration -The type of a GRUB configuration declaration. +Note that all fields of @code{bootloader-configuration} are not +necessarily handled by all GuixSD supported bootloaders. + +@deftp {Data Type} bootloader-configuration +The type of a bootloader configuration declaration. @table @asis +@item @code{bootloader} +The bootloader to use, as a @code{bootloader} object. For now +@code{grub}, @code{grub-efi} and @code{syslinux} are supported. + @item @code{device} This is a string denoting the boot device. It must be a device name -understood by the @command{grub-install} command, such as -@code{/dev/sda} or @code{(hd0)} (@pxref{Invoking grub-install,,, grub, +understood by the bootloader @command{installer} command, such as +@code{/dev/sda} or @code{(hd0)} (for GRUB, @pxref{Invoking grub-install,,, grub, GNU GRUB Manual}). @item @code{menu-entries} (default: @code{()}) -A possibly empty list of @code{menu-entry} objects (see below), denoting -entries to appear in the GRUB boot menu, in addition to the current -system entry and the entry pointing to previous system generations. +A possibly empty list of @code{boot-parameters} objects (see below), +denoting entries to appear in the bootloader menu, in addition to the +current system entry and the entry pointing to previous system +generations. @item @code{default-entry} (default: @code{0}) The index of the default boot menu entry. Index 0 is for the entry of the @@ -15264,37 +15273,37 @@ current system. The number of seconds to wait for keyboard input before booting. Set to 0 to boot immediately, and to -1 to wait indefinitely. -@item @code{theme} (default: @var{%default-theme}) -The @code{grub-theme} object describing the theme to use. - -@item @code{grub} (default: @code{grub}) -The GRUB package to use. +@item @code{theme} (default: @var{#f}) +The bootloader theme object describing the theme to use. If no theme +is provided, some bootloaders might use a default theme, that's true +for GRUB. @item @code{terminal-outputs} (default: @code{'gfxterm}) -The output terminals used for the GRUB boot menu, as a list of symbols. -These values are accepted: @code{console}, @code{serial}, -@code{serial_@{0-3@}}, @code{gfxterm}, @code{vga_text}, @code{mda_text}, -@code{morse}, and @code{pkmodem}. This field corresponds to the GRUB -variable GRUB_TERMINAL_OUTPUT (@pxref{Simple configuration,,, grub,GNU -GRUB manual}). +The output terminals used for the bootloader boot menu, as a list of +symbols. GRUB accepts the values: @code{console}, @code{serial}, +@code{serial_@{0-3@}}, @code{gfxterm}, @code{vga_text}, +@code{mda_text}, @code{morse}, and @code{pkmodem}. This field +corresponds to the GRUB variable GRUB_TERMINAL_OUTPUT (@pxref{Simple +configuration,,, grub,GNU GRUB manual}). @item @code{terminal-inputs} (default: @code{'()}) -The input terminals used for the GRUB boot menu, as a list of symbols. -The default is the native platform terminal as determined by GRUB at -run-time. These values are accepted: @code{console}, @code{serial}, -@code{serial_@{0-3@}}, @code{at_keyboard}, and @code{usb_keyboard}. -This field corresponds to the GRUB variable GRUB_TERMINAL_INPUT -(@pxref{Simple configuration,,, grub,GNU GRUB manual}). +The input terminals used for the bootloader boot menu, as a list of +symbols. For GRUB, the default is the native platform terminal as +determined at run-time. GRUB accepts the values: @code{console}, +@code{serial}, @code{serial_@{0-3@}}, @code{at_keyboard}, and +@code{usb_keyboard}. This field corresponds to the GRUB variable +GRUB_TERMINAL_INPUT (@pxref{Simple configuration,,, grub,GNU GRUB +manual}). @item @code{serial-unit} (default: @code{#f}) -The serial unit used by GRUB, as an integer from 0 to 3. The default -value is chosen by GRUB at run-time; currently GRUB chooses 0, which +The serial unit used by the bootloader, as an integer from 0 to 3. +For GRUB it is choosen at run-time; currently GRUB chooses 0, which corresponds to COM1 (@pxref{Serial terminal,,, grub,GNU GRUB manual}). @item @code{serial-speed} (default: @code{#f}) -The speed of the serial interface, as an integer. The default value is -chosen by GRUB at run-time; currently GRUB chooses 9600@tie{}bps -(@pxref{Serial terminal,,, grub,GNU GRUB manual}). +The speed of the serial interface, as an integer. For GRUB, the +default value is chosen at run-time; currently GRUB chooses +9600@tie{}bps (@pxref{Serial terminal,,, grub,GNU GRUB manual}). @end table @end deftp @@ -15303,38 +15312,68 @@ chosen by GRUB at run-time; currently GRUB chooses 9600@tie{}bps @cindex boot menu Should you want to list additional boot menu entries @i{via} the @code{menu-entries} field above, you will need to create them with the -@code{menu-entry} form. For example, imagine you want to be able to +@code{boot-parameters} form. For example, imagine you want to be able to boot another distro (hard to imagine!), you can define a menu entry along these lines: @example -(menu-entry +(boot-parameters (label "The Other Distro") - (linux "/boot/old/vmlinux-2.6.32") - (linux-arguments '("root=/dev/sda2")) + (root-device "my-root") + (boot-name 'grub) + (store-device "my-root") + (store-mount-point "/") + (kernel "/boot/old/vmlinux-2.6.32") + (kernel-arguments '("root=/dev/sda2")) (initrd "/boot/old/initrd")) @end example Details below. -@deftp {Data Type} menu-entry -The type of an entry in the GRUB boot menu. +@deftp {Data Type} boot-parameters +The type of an entry in the bootloader boot menu. @table @asis @item @code{label} The label to show in the menu---e.g., @code{"GNU"}. -@item @code{linux} -The Linux kernel image to boot, for example: +@item @code{root-device} +The root device identifier. It has to correspond exactly to the device +field of the object representing the OS's root file +system, so it might be a device path like @code{"/dev/sda3"}. + +@item @code{boot-device} +The name of the bootloader used to boot this entry (@code{'grub} or +@code{'syslinux} for instance). + +@item @code{store-device} +The device where the kernel and initrd are to be found---i.e., for GRUB +@dfn{root} for this menu entry (@pxref{root,,, grub, GNU GRUB manual}). + +Depending on the bootloader, this may be a file system label (a +string), a file system UUID (a bytevector, @pxref{File Systems}), or +@code{#f}. If set to @code{#f}, GRUB will search the device containing +the file specified by the @code{linux} field (@pxref{search,,, grub, +GNU GRUB manual}). It must @emph{not} be an OS device name such as +@file{/dev/sda1}. + +@item @code{store-mount-point} +The mount point of the above device on the system. You probably want +to set it to @code{"/"}. GuixSD uses it to strip the prefix of store +file names for systems where @file{/gnu} or @file{/gnu/store} is on a +separate partition. + +@item @code{kernel} +The kernel image to boot, for example: @example (file-append linux-libre "/bzImage") @end example -It is also possible to specify a device explicitly in the file path -using GRUB's device naming convention (@pxref{Naming convention,,, grub, -GNU GRUB manual}), for example: +For GRUB, It is also possible to specify a device explicitly in the +file path using GRUB's device naming convention (@pxref{Naming +convention,,, grub, GNU GRUB manual}), for example: @example "(hd0,msdos1)/boot/vmlinuz" @@ -15343,40 +15382,27 @@ GNU GRUB manual}), for example: If the device is specified explicitly as above, then the @code{device} field is ignored entirely. -@item @code{linux-arguments} (default: @code{()}) -The list of extra Linux kernel command-line arguments---e.g., +@item @code{kernel-arguments} +The list of extra kernel command-line arguments---e.g., @code{("console=ttyS0")}. @item @code{initrd} A G-Expression or string denoting the file name of the initial RAM disk to use (@pxref{G-Expressions}). - -@item @code{device} (default: @code{#f}) -The device where the kernel and initrd are to be found---i.e., the GRUB -@dfn{root} for this menu entry (@pxref{root,,, grub, GNU GRUB manual}). - -This may be a file system label (a string), a file system UUID (a -bytevector, @pxref{File Systems}), or @code{#f}, in which case GRUB will -search the device containing the file specified by the @code{linux} -field (@pxref{search,,, grub, GNU GRUB manual}). It must @emph{not} be -an OS device name such as @file{/dev/sda1}. - -@item @code{device-mount-point} (default: @code{"/"}) -The mount point of the above device on the system. You probably do not -need to change the default value. GuixSD uses it to strip the prefix of -store file names for systems where @file{/gnu} or @file{/gnu/store} is -on a separate partition. - @end table @end deftp @c FIXME: Write documentation once it's stable. -Themes are created using the @code{grub-theme} form, which is not -documented yet. +Fow now only GRUB has theme support. GRUB Themes are created using +the @code{grub-theme} form, which is not documented yet. @defvr {Scheme Variable} %default-theme -This is the default GRUB theme used by the operating system, with a -fancy background image displaying the GNU and Guix logos. +This is the default GRUB theme used by the operating system if no +@code{theme} field is specified in @code{bootloader-configuration} +record. + +It comes with a fancy background image displaying the GNU and Guix +logos. @end defvr @@ -15416,9 +15442,9 @@ list-generations}). If that generation already exists, it will be overwritten. This behavior mirrors that of @command{guix package} (@pxref{Invoking guix package}). -It also adds a GRUB menu entry for the new OS configuration, and moves -entries for older configurations to a submenu---unless -@option{--no-bootloader} is passed. +It also adds a bootloader menu entry for the new OS configuration, +---unless @option{--no-bootloader} is passed. For GRUB, it moves +entries for older configurations to a submenu. @quotation Note @c The paragraph below refers to the problem discussed at @@ -15432,11 +15458,12 @@ once @command{reconfigure} has completed. @item switch-generation @cindex generations Switch to an existing system generation. This action atomically -switches the system profile to the specified system generation. It also -rearranges the system's existing GRUB menu entries. It makes the menu -entry for the specified system generation the default, and it moves the -entries for the other generations to a submenu. The next time the -system boots, it will use the specified system generation. +switches the system profile to the specified system generation. It +also rearranges the system's existing bootloader menu entries. It +makes the menu entry for the specified system generation the default, +and it moves the entries for the other generations to a submenu. The +next time the system boots, it will use the specified system +generation. The target generation can be specified explicitly by its generation number. For example, the following invocation would switch to system @@ -15458,11 +15485,11 @@ guix system switch-generation -- -1 @end example Currently, the effect of invoking this action is @emph{only} to switch -the system profile to an existing generation and rearrange the GRUB menu -entries. To actually start using the target system generation, you must -reboot after running this action. In the future, it will be updated to -do the same things as @command{reconfigure}, like activating and -deactivating services. +the system profile to an existing generation and rearrange the +bootloader menu entries. To actually start using the target system +generation, you must reboot after running this action. In the future, +it will be updated to do the same things as @command{reconfigure}, +like activating and deactivating services. This action will fail if the specified generation does not exist. @@ -15497,8 +15524,9 @@ files, packages, and so on. It also creates other essential files needed for the system to operate correctly---e.g., the @file{/etc}, @file{/var}, and @file{/run} directories, and the @file{/bin/sh} file. -This command also installs GRUB on the device specified in -@file{my-os-config}, unless the @option{--no-bootloader} option was passed. +This command also installs bootloader on the device specified in +@file{my-os-config}, unless the @option{--no-bootloader} option was +passed. @item vm @cindex virtual machine @@ -15638,7 +15666,7 @@ build users of the daemon (@pxref{Build Environment Setup}). Once you have built, configured, re-configured, and re-re-configured your GuixSD installation, you may find it useful to list the operating system generations available on disk---and that you can choose from the -GRUB boot menu: +bootloader boot menu: @table @code -- 2.13.0 From debbugs-submit-bounces@debbugs.gnu.org Tue May 16 10:38:49 2017 Received: (at 26339) by debbugs.gnu.org; 16 May 2017 14:38:49 +0000 Received: from localhost ([127.0.0.1]:48889 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dAdcf-0008Qf-IH for submit@debbugs.gnu.org; Tue, 16 May 2017 10:38:49 -0400 Received: from dd1012.kasserver.com ([85.13.128.8]:51812) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dAdcd-0008QW-29 for 26339@debbugs.gnu.org; Tue, 16 May 2017 10:38:48 -0400 Received: from localhost (178.113.191.99.wireless.dyn.drei.com [178.113.191.99]) by dd1012.kasserver.com (Postfix) with ESMTPSA id 8576E1CA030B; Tue, 16 May 2017 16:38:44 +0200 (CEST) Date: Tue, 16 May 2017 16:38:40 +0200 From: Danny Milosavljevic To: Mathieu Othacehe Subject: Re: bug#26339: [PATCH v4 1/7] bootloader: Add extlinux support. Message-ID: <20170516163840.35a53ef7@scratchpost.org> In-Reply-To: <86h90lt15r.fsf@gmail.com> References: <20170514074803.25556-1-m.othacehe@gmail.com> <20170514074803.25556-2-m.othacehe@gmail.com> <87lgpzwoxj.fsf@gnu.org> <86h90lt15r.fsf@gmail.com> X-Mailer: Claws Mail 3.14.1 (GTK+ 2.24.31; x86_64-unknown-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 26339 Cc: 26339@debbugs.gnu.org, Ludovic =?ISO-8859-1?Q?Court=E8s?= 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.7 (/) U-Boot uses extlinux config. From debbugs-submit-bounces@debbugs.gnu.org Tue May 16 10:50:48 2017 Received: (at 26339) by debbugs.gnu.org; 16 May 2017 14:50:48 +0000 Received: from localhost ([127.0.0.1]:48899 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dAdoG-0000H7-ND for submit@debbugs.gnu.org; Tue, 16 May 2017 10:50:48 -0400 Received: from mail-wm0-f66.google.com ([74.125.82.66]:34783) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dAdoD-0000Gt-HL for 26339@debbugs.gnu.org; Tue, 16 May 2017 10:50:45 -0400 Received: by mail-wm0-f66.google.com with SMTP id d127so38840383wmf.1 for <26339@debbugs.gnu.org>; Tue, 16 May 2017 07:50:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=references:user-agent:from:to:cc:subject:in-reply-to:date :message-id:mime-version; bh=YCR65RMsRfjSy2YxVWNm36kuewhQmXite31C8rP1VQw=; b=hOIywIx/QnIlZt1Tn+LFwLNlAljClQEamIZ/1kkff4Uxqr4lbR2l4QzJwEDbKbVYvQ cBmbh5UY4CiG8MWI7oSN1Gm2uawM5UuqYYq55dzYACinowXY/h/Mvjvjxm814/VcwiA8 Yy50ZQxgZBHm4HHn1OxfPz9WG0M/r3O0FbW8CiiaMUOEFjId87xxCM5dsSEly5DElYjP jhWEmHFu/Zmjut5LeV0xvyPhbi2Pglnbag2dJ1QuTc7IjwTCXK0ICYSEoqm2Gx2i4wsB /aRWHA/qFSZxtJO9DtWm7oakqott0UJ1bIJ8N/UiqswlNVHlDyspGUjV74/kW4iyzuLP RgnA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:references:user-agent:from:to:cc:subject :in-reply-to:date:message-id:mime-version; bh=YCR65RMsRfjSy2YxVWNm36kuewhQmXite31C8rP1VQw=; b=GkFXBPCiw8iv0fjaUCUu3bK5bdx5dYIlqh/HfYAV6gEVkS3e/CE9ZtsstikjZZ2OaC s10eAs2//7EIMM77uFFyZSZvdKBaJat479JKnD5b2Pf2gRFFRASQpCuRGyS5CXk5hWI/ G4r3zGTR1ckswAlfdxVY7J9NqmBp86yDV2gCngd0bcfdFVZfNHd3Bumyx7ZepfEvr+OU rugHweONwj7vGomqSvcxsZebKc9qHaZj/r7qZjnM7MMhswPXEuS3MC0iSORjmGfA/aRD EvsG6v3auO1F8VI5/qTNJTjvTcl0UIMwgeIlju1sCDDaUOEc0kFKcOQtutLXvKmtrUQI N7dQ== X-Gm-Message-State: AODbwcAmMir0NT4jdKkWvz1RKJjqjiLSxHX6LGiOhvdvNJMwDnK3vDVg j62JQ0cHVF7/kAuh X-Received: by 10.28.203.131 with SMTP id b125mr7157854wmg.135.1494946239426; Tue, 16 May 2017 07:50:39 -0700 (PDT) Received: from zbook ([46.218.109.88]) by smtp.gmail.com with ESMTPSA id c37sm1978753wra.16.2017.05.16.07.50.38 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 16 May 2017 07:50:38 -0700 (PDT) References: <20170514074803.25556-1-m.othacehe@gmail.com> <20170514074803.25556-2-m.othacehe@gmail.com> <87lgpzwoxj.fsf@gnu.org> <86h90lt15r.fsf@gmail.com> <20170516163840.35a53ef7@scratchpost.org> User-agent: mu4e 0.9.18; emacs 25.2.1 From: Mathieu Othacehe To: Danny Milosavljevic Subject: Re: bug#26339: [PATCH v4 1/7] bootloader: Add extlinux support. In-reply-to: <20170516163840.35a53ef7@scratchpost.org> Date: Tue, 16 May 2017 16:50:41 +0200 Message-ID: <86d1b8ua7y.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 26339 Cc: 26339@debbugs.gnu.org, Ludovic =?utf-8?Q?Court=C3=A8s?= 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.5 (/) > U-Boot uses extlinux config. What do you mean by extlinux config ? An extlinux configuration file, without extlinux installed in MBR ? From debbugs-submit-bounces@debbugs.gnu.org Tue May 16 11:00:38 2017 Received: (at 26339) by debbugs.gnu.org; 16 May 2017 15:00:38 +0000 Received: from localhost ([127.0.0.1]:48908 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dAdxm-0000Xh-2g for submit@debbugs.gnu.org; Tue, 16 May 2017 11:00:38 -0400 Received: from dd1012.kasserver.com ([85.13.128.8]:54428) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dAdxk-0000XY-NJ for 26339@debbugs.gnu.org; Tue, 16 May 2017 11:00:37 -0400 Received: from localhost (178.113.191.99.wireless.dyn.drei.com [178.113.191.99]) by dd1012.kasserver.com (Postfix) with ESMTPSA id 761CE1CA030B; Tue, 16 May 2017 17:00:34 +0200 (CEST) Date: Tue, 16 May 2017 17:00:30 +0200 From: Danny Milosavljevic To: Mathieu Othacehe Subject: Re: bug#26339: [PATCH v4 1/7] bootloader: Add extlinux support. Message-ID: <20170516170030.15c8990c@scratchpost.org> In-Reply-To: <86d1b8ua7y.fsf@gmail.com> References: <20170514074803.25556-1-m.othacehe@gmail.com> <20170514074803.25556-2-m.othacehe@gmail.com> <87lgpzwoxj.fsf@gnu.org> <86h90lt15r.fsf@gmail.com> <20170516163840.35a53ef7@scratchpost.org> <86d1b8ua7y.fsf@gmail.com> X-Mailer: Claws Mail 3.14.1 (GTK+ 2.24.31; x86_64-unknown-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 26339 Cc: 26339@debbugs.gnu.org, Ludovic =?ISO-8859-1?Q?Court=E8s?= 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.7 (/) Hi Mathieu, On Tue, 16 May 2017 16:50:41 +0200 Mathieu Othacehe wrote: > > U-Boot uses extlinux config. > > What do you mean by extlinux config ? An extlinux configuration file, > without extlinux installed in MBR ? Yes. If an extlinux config file is there, u-boot prefers it even to u-boot's native config file (the latter is more like a list of commands than a configuration). From debbugs-submit-bounces@debbugs.gnu.org Tue May 16 11:03:53 2017 Received: (at 26339) by debbugs.gnu.org; 16 May 2017 15:03:53 +0000 Received: from localhost ([127.0.0.1]:48917 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dAe0u-0000dG-Oh for submit@debbugs.gnu.org; Tue, 16 May 2017 11:03:52 -0400 Received: from mail-wr0-f193.google.com ([209.85.128.193]:34234) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dAe0r-0000d3-Ra for 26339@debbugs.gnu.org; Tue, 16 May 2017 11:03:51 -0400 Received: by mail-wr0-f193.google.com with SMTP id 6so14510221wrb.1 for <26339@debbugs.gnu.org>; Tue, 16 May 2017 08:03:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=references:user-agent:from:to:cc:subject:in-reply-to:date :message-id:mime-version; bh=+1ZSdxxEi4hiehl49l1++ob2M/C7W3ZCL+hnNVaBkSI=; b=rTvwEsw+K5BGv/qkR5bBVqAkUgEjFWOUnd/AmrJTMjMzn/8G2F7nL22ULX8vE7uw2P pPOCfT/yIVxXXQMkBe9KcE+sMoFDYPtrjH1SuZ5PP1oREakPPwUz44bQZ4XIMqj0M19U z33hcN/IWzWlMfLvSS3WeyQbFz+/vUKDOwpDXJn3jHWFLc488y7smCcHDw3e59bsHtfN uZYU3aEhx7tny8DPUvZVC42/qykrsfwbKcu2zwYfBNqS+GPZBrCbNwr7NcDtjQu6VjJ2 h39C8dhIERhQ/yiWAcEYD/5KXUsfjFWoNISuIz4z+Nkn5PHjRVejfpoa7XMLdsvmfC1t dSmg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:references:user-agent:from:to:cc:subject :in-reply-to:date:message-id:mime-version; bh=+1ZSdxxEi4hiehl49l1++ob2M/C7W3ZCL+hnNVaBkSI=; b=XR9HWTISRlrMY6kfWMTLfK7f/0pdi18QoCkNczsl7txZlgpVQvVhFrfNEVJnUaeN4T qvkFba6dx8G2Cab3/W7GpqYWz5mQTE2vosmZypjdsc63Ubxpsmbr+3yUvzA/5LHxVqs9 FHSFCKHybmcRx1shvPR7uMqD0szMQuJP13+Bs9zri5LoVQW5CJeKJlwfNQajo3DV0T/E b+RTT3MRm0lyQVbf8RvYh/mZORVpM7xDgUDtleP07hQmFIQOZy8qpcvmc8dmlVHBEWLR rEjt/cM12PQ3LblLpi7we74R6J0LCaHCl7gHzDUZL6tbvmGaNFost12AW6bCMAtxCqNn F30A== X-Gm-Message-State: AODbwcB/+Xa5kL3VFkcKkHd0CmOhhFoZ2UZgPZuqFcV1PugpuNC9RwHX MNxDxTAPEHsg96M5 X-Received: by 10.223.135.42 with SMTP id a39mr7451114wra.113.1494947024020; Tue, 16 May 2017 08:03:44 -0700 (PDT) Received: from zbook ([46.218.109.88]) by smtp.gmail.com with ESMTPSA id y3sm1250899wmh.21.2017.05.16.08.03.42 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 16 May 2017 08:03:43 -0700 (PDT) References: <20170514074803.25556-1-m.othacehe@gmail.com> <20170514074803.25556-2-m.othacehe@gmail.com> <87lgpzwoxj.fsf@gnu.org> <86h90lt15r.fsf@gmail.com> <20170516163840.35a53ef7@scratchpost.org> <86d1b8ua7y.fsf@gmail.com> <20170516170030.15c8990c@scratchpost.org> User-agent: mu4e 0.9.18; emacs 25.2.1 From: Mathieu Othacehe To: Danny Milosavljevic Subject: Re: bug#26339: [PATCH v4 1/7] bootloader: Add extlinux support. In-reply-to: <20170516170030.15c8990c@scratchpost.org> Date: Tue, 16 May 2017 17:03:45 +0200 Message-ID: <86bmqsu9m6.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.8 (--) X-Debbugs-Envelope-To: 26339 Cc: 26339@debbugs.gnu.org, Ludovic =?utf-8?Q?Court=C3=A8s?= 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.8 (--) > Yes. If an extlinux config file is there, u-boot prefers it even to u-boot's native config file (the latter is more like a list of commands than a configuration). Ok then, would the following bootloader be ok ? --8<---------------cut here---------------start------------->8--- (define extlinux-bootloader-no-installer (bootloader (inherit extlinux-bootloader) (installer #f))) --8<---------------cut here---------------end--------------->8--- From debbugs-submit-bounces@debbugs.gnu.org Thu May 18 06:13:39 2017 Received: (at 26339) by debbugs.gnu.org; 18 May 2017 10:13:39 +0000 Received: from localhost ([127.0.0.1]:51955 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dBIR9-0005mF-Ay for submit@debbugs.gnu.org; Thu, 18 May 2017 06:13:39 -0400 Received: from mail-wm0-f68.google.com ([74.125.82.68]:33803) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dBIR7-0005lu-GN for 26339@debbugs.gnu.org; Thu, 18 May 2017 06:13:37 -0400 Received: by mail-wm0-f68.google.com with SMTP id d127so10054471wmf.1 for <26339@debbugs.gnu.org>; Thu, 18 May 2017 03:13:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=B7JlobairTMePIVJS+iWgAJ4/KO6oIrJ8iqCOPdhyg0=; b=HjM4ceU8fwhgxtrcyJt0Uv2UPOP7AO4Rb+K/Z9HnCsUjkMFgke6o3u+HWRTGYrCQk+ 1icoLU4ZRmtUNYgG2B+wxtgENL2C+9zG77OT5m9+H0Rg6Rp2AmlXyc3cjz9uF8ZJufOl dyV5LVzkWKSWzERT3VmFLDIegqyqBCXCb6/OXJ55Y7rTLBWdpOb6haCvE1225wKO8x6e 3TN6ctbrw/krVS1EzHMFu6vLhShbTTZPihDjPVN2gV+vm4/FyqW0bbDIADQXJsN6+Rky BCmZGmBhzSK6OymhfTQbFQ5imHACkyE/YNHONbNdOVRc7TcWbF+01U9PnMQ9YC3YgqW0 mCGQ== 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:date:message-id; bh=B7JlobairTMePIVJS+iWgAJ4/KO6oIrJ8iqCOPdhyg0=; b=acBWnmZyzzvxuoN0RElB4OqDDvuaPTGWobQdkq3mLatjPp7khAasTB4FLEwwUVEuT9 KQTNqxLft2LDS6FQeyYnnLdGZJ1+Dgo2prrLyOsyDFM4bwikqlwzW6vyt3S3zvSFjndP 7xLd6KdL7yaG0k4HfXZ+1DHRVpb5tuLTtJ9PMpehabno7Qd62kMNbyxgUmTsGOgbRo/9 SK6U7bPaztBKMQFeGeyWV/0W1m7L/I9h5wDbG+8gmVhbjWf9Tlp0f6UdWutMZpYUs4Wu 9VOYcLAIgWV6xsXl+SQI02FJaR9ZOTGVyDC4kTcGL2CXrGw4dDr6Hyjn6RYWqHmCFwCE lpAA== X-Gm-Message-State: AODbwcB59ymieQVhRsMA09oXGMTwu+uElBQEzgLNOL0oKB0cAQ8/whYm 55Zfl7ytCl8DCw== X-Received: by 10.28.168.3 with SMTP id r3mr13292848wme.33.1495102411908; Thu, 18 May 2017 03:13:31 -0700 (PDT) Received: from cervin.8.8.8.8 (85-169-37-239.rev.numericable.fr. [85.169.37.239]) by smtp.gmail.com with ESMTPSA id 4sm6193991wrv.33.2017.05.18.03.13.31 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 18 May 2017 03:13:31 -0700 (PDT) From: Mathieu Othacehe To: 26339@debbugs.gnu.org Subject: [PATCH] bootloader: extlinux: Add extlinux-bootloader-gpt. Date: Thu, 18 May 2017 12:13:26 +0200 Message-Id: <20170518101326.11450-1-m.othacehe@gmail.com> X-Mailer: git-send-email 2.13.0 X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 26339 Cc: Mathieu Othacehe 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.5 (/) * gnu/bootloader/extlinux.scm (extlinux-bootloader-gpt): New exported variable. (install-extlinux)[mbr]: New argument. (install-extlinux-mbr, install-extlinux-gpt): New variables. (extlinux-bootloader)[installer]: Use install-extlinux-mbr. --- Hi, Here's a patch to add gpt support to extlinux. I will be used later on system tests based on gpt. Thanks, Mathieu gnu/bootloader/extlinux.scm | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/gnu/bootloader/extlinux.scm b/gnu/bootloader/extlinux.scm index 12fa447c3..8f928ff22 100644 --- a/gnu/bootloader/extlinux.scm +++ b/gnu/bootloader/extlinux.scm @@ -26,7 +26,7 @@ #:use-module (guix records) #:use-module (guix utils) #:export (extlinux-bootloader - syslinux-bootloader)) + extlinux-bootloader-gpt)) (define* (extlinux-configuration-file config entries #:key @@ -92,7 +92,7 @@ TIMEOUT ~a~%" (string-append "if=" if) (string-append "of=" of))))) -(define install-extlinux +(define (install-extlinux mbr) #~(lambda (bootloader device mount-point) (let ((extlinux (string-append bootloader "/sbin/extlinux")) (install-dir (string-append mount-point "/boot/extlinux")) @@ -102,9 +102,15 @@ TIMEOUT ~a~%" (find-files syslinux-dir "\\.c32$")) (unless (and (zero? (system* extlinux "--install" install-dir)) - (#$dd 440 1 (string-append syslinux-dir "/mbr.bin") device)) + (#$dd 440 1 (string-append syslinux-dir "/" #$mbr) device)) (error "failed to install SYSLINUX"))))) +(define install-extlinux-mbr + (install-extlinux "mbr.bin")) + +(define install-extlinux-gpt + (install-extlinux "gptmbr.bin")) + ;;; @@ -115,6 +121,11 @@ TIMEOUT ~a~%" (bootloader (name 'extlinux) (package syslinux) - (installer install-extlinux) + (installer install-extlinux-mbr) (configuration-file "/boot/extlinux/extlinux.conf") (configuration-file-generator extlinux-configuration-file))) + +(define extlinux-bootloader-gpt + (bootloader + (inherit extlinux-bootloader) + (installer install-extlinux-gpt))) -- 2.13.0 From debbugs-submit-bounces@debbugs.gnu.org Thu May 18 06:26:32 2017 Received: (at 26339) by debbugs.gnu.org; 18 May 2017 10:26:32 +0000 Received: from localhost ([127.0.0.1]:51964 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dBIdb-0006M5-Uf for submit@debbugs.gnu.org; Thu, 18 May 2017 06:26:32 -0400 Received: from mail-wm0-f65.google.com ([74.125.82.65]:33924) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dBIdZ-0006Lj-72 for 26339@debbugs.gnu.org; Thu, 18 May 2017 06:26:29 -0400 Received: by mail-wm0-f65.google.com with SMTP id d127so10139672wmf.1 for <26339@debbugs.gnu.org>; Thu, 18 May 2017 03:26:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=eD31x/eW9agf9Mu77s7/W75jLE20TKs2O2zPt6upMrE=; b=fpNRs1xrCIJzPEfK+zSH+B6nV61mGQQFEY7qGtn5GehW5ubD42q22hWiriXjLhy3ER QMdzr6wdSDhNeYce/KOMpP/rZkLuPgzvU3QgSc1bIim5tPKXhM2oBHbZS+fBIOeZxDG6 l0HNOEF7lYLOKI7Lx/NPWaskYHHmNKVXqG00gTw9EJmY8FbnaXED3/ZnvLONiQHvkSxa BiB0ARK0Ip3LA5GyGjbbBeg8G8XYz7T3uQ+uwHeovCPSxQeglwwJg/QxchT3GTEpNOSJ xv8jRCExGunCDT+l9YeAAuPjI0WjQJ8+pFlyJU8eNKB4vPn+Z8MFN46PQ0sqqqqFaBvR 3HVw== 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:date:message-id; bh=eD31x/eW9agf9Mu77s7/W75jLE20TKs2O2zPt6upMrE=; b=udvGJC30j63D5xx09uJlWcRUTV4PTDqhzL8Cgc9iOPTxKKH1lU+RlOfL0Sn12b28s6 Bpzrqkkrqu7jA9fPY0atoyfLLDzDhxJaCD12HsSdeewnKOQYz/44A4V3ZS9sry1N7sHL XdNKzcQ4mXaEeGhpvvD4bEAbDQzes48mQcRQJIgVO+6rXxyl8BCsokrONmE9SEJxAdGj EPxMxUYi10NHxk0AfvYK04UGmRHQoTCuM3HLOvO9wMTNZ48UQ4ysF4CNKg4D9lRgc14b zqO88/6eCnGn026Be/q88+otwh0ttMvZLrq1zT2e+jZabm9TXO7c7C4Tuo0UH0Xoy1Hu RJDw== X-Gm-Message-State: AODbwcDveSVvi39tx4L3BhdBYXfgjIeYPaukCbncuHGWBnASitzZqeAD PWXJa9UQUxIEDw== X-Received: by 10.28.71.201 with SMTP id m70mr14571301wmi.89.1495103183370; Thu, 18 May 2017 03:26:23 -0700 (PDT) Received: from cervin.8.8.8.8 (85-169-37-239.rev.numericable.fr. [85.169.37.239]) by smtp.gmail.com with ESMTPSA id m205sm20440772wmf.1.2017.05.18.03.26.22 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 18 May 2017 03:26:22 -0700 (PDT) From: Mathieu Othacehe To: 26339@debbugs.gnu.org Subject: [PATCH] tests: Add syslinux gpt test. Date: Thu, 18 May 2017 12:26:18 +0200 Message-Id: <20170518102618.24842-1-m.othacehe@gmail.com> X-Mailer: git-send-email 2.13.0 X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 26339 Cc: Mathieu Othacehe 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.5 (/) * gnu/tests/install.scm (%test-installed-syslinux-os): New exported variable. (%minimal-syslinux-os, %minimal-syslinux-os-source): New variables. (%syslinux-gpt-installation-script): New variable. * gnu/system/install.scm (installation-os)[packages]: Add syslinux. --- Hi, Here's a test installing a GuixSD system with extlinux-bootloader-gpt as a bootloader. I had to rewrite %minimal-syslinux-os as a copy of %minimal-os, but the only change is the bootloader field. A better idea to avoid rewritting is welcome :) Thanks, Mathieu gnu/system/install.scm | 1 + gnu/tests/install.scm | 73 ++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 74 insertions(+) diff --git a/gnu/system/install.scm b/gnu/system/install.scm index 9a6febfeb..888998347 100644 --- a/gnu/system/install.scm +++ b/gnu/system/install.scm @@ -343,6 +343,7 @@ Use Alt-F2 for documentation. (packages (cons* (canonical-package glibc) ;for 'tzselect' & co. parted gptfdisk ddrescue grub ;mostly so xrefs to its manual work + syslinux cryptsetup mdadm dosfstools ;mkfs.fat, for the UEFI boot partition diff --git a/gnu/tests/install.scm b/gnu/tests/install.scm index b104efcfd..9dcb41ba1 100644 --- a/gnu/tests/install.scm +++ b/gnu/tests/install.scm @@ -18,6 +18,7 @@ (define-module (gnu tests install) #:use-module (gnu) + #:use-module (gnu bootloader extlinux) #:use-module (gnu tests) #:use-module (gnu tests base) #:use-module (gnu system) @@ -34,6 +35,7 @@ #:use-module (guix gexp) #:use-module (guix utils) #:export (%test-installed-os + %test-installed-syslinux-os %test-separate-store-os %test-separate-home-os %test-raid-root-os @@ -77,6 +79,39 @@ (guix combinators))))) %base-services)))) +(define-os-with-source (%minimal-syslinux-os + %minimal-syslinux-os-source) + (use-modules (gnu) (gnu tests) (gnu bootloader extlinux) + (srfi srfi-1)) + + (operating-system + (host-name "liberigilo") + (timezone "Europe/Paris") + (locale "en_US.UTF-8") + + (bootloader (bootloader-configuration + (bootloader extlinux-bootloader-gpt) + (device "/dev/vdb"))) + (kernel-arguments '("console=ttyS0")) + (file-systems (cons (file-system + (device "my-root") + (title 'label) + (mount-point "/") + (type "ext4")) + %base-file-systems)) + (users (cons (user-account + (name "alice") + (comment "Bob's sister") + (group "users") + (supplementary-groups '("wheel" "audio" "video")) + (home-directory "/home/alice")) + %base-user-accounts)) + (services (cons (service marionette-service-type + (marionette-configuration + (imported-modules '((gnu services herd) + (guix combinators))))) + %base-services)))) + (define (operating-system-with-current-guix os) "Return a variant of OS that uses the current Guix." (operating-system @@ -121,6 +156,30 @@ guix system init /mnt/etc/config.scm /mnt --no-substitutes sync reboot\n") +(define %syslinux-gpt-installation-script + ;; Shell script of a simple installation. + ;; As syslinux 6.0.3 does not handle 64bits ext4 partitions, + ;; we make sure to pass -O '^64bit' to mkfs. + "\ +. /etc/profile +set -e -x +guix --version + +export GUIX_BUILD_OPTIONS=--no-grafts +guix build isc-dhcp +parted --script /dev/vdb mklabel gpt \\ + mkpart ext2 1M 1G \\ + set 1 legacy_boot on +mkfs.ext4 -L my-root -O '^64bit' /dev/vdb1 +mount /dev/vdb1 /mnt +df -h /mnt +herd start cow-store /mnt +mkdir /mnt/etc +cp /etc/target-config.scm /mnt/etc/config.scm +guix system init /mnt/etc/config.scm /mnt --no-substitutes +sync +reboot\n") + (define* (run-install target-os target-os-source #:key (script %simple-installation-script) @@ -232,6 +291,20 @@ build (current-guix) and then store a couple of full system images.") (run-basic-test %minimal-os command "installed-os"))))) +(define %test-installed-syslinux-os + (system-test + (name "installed-syslinux-os") + (description + "...") + (value + (mlet* %store-monad ((image (run-install %minimal-syslinux-os + %minimal-syslinux-os-source + #:script + %syslinux-gpt-installation-script)) + (command (qemu-command/writable-image image))) + (run-basic-test %minimal-syslinux-os command + "installed-syslinux-os"))))) + ;;; ;;; Separate /home. -- 2.13.0 From debbugs-submit-bounces@debbugs.gnu.org Sat May 20 16:49:38 2017 Received: (at 26339) by debbugs.gnu.org; 20 May 2017 20:49:38 +0000 Received: from localhost ([127.0.0.1]:57332 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dCBJh-00075D-QE for submit@debbugs.gnu.org; Sat, 20 May 2017 16:49:38 -0400 Received: from dd1012.kasserver.com ([85.13.128.8]:45936) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dCBJg-000755-9f for 26339@debbugs.gnu.org; Sat, 20 May 2017 16:49:36 -0400 Received: from localhost (178.113.140.102.wireless.dyn.drei.com [178.113.140.102]) by dd1012.kasserver.com (Postfix) with ESMTPSA id A549D1CA006C; Sat, 20 May 2017 22:49:31 +0200 (CEST) Date: Sat, 20 May 2017 22:49:26 +0200 From: Danny Milosavljevic To: Mathieu Othacehe Subject: Re: bug#26339: [PATCH] doc: Adapt to multiple bootloader support. Message-ID: <20170520224926.25c8af21@scratchpost.org> In-Reply-To: <20170516130306.10414-1-m.othacehe@gmail.com> References: <20170402134916.2871-1-m.othacehe@gmail.com> <20170516130306.10414-1-m.othacehe@gmail.com> X-Mailer: Claws Mail 3.14.1 (GTK+ 2.24.31; x86_64-unknown-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 26339 Cc: 26339@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.7 (/) Hi Mathieu, On Tue, 16 May 2017 15:03:06 +0200 Mathieu Othacehe wrote: > Here's the doc patch. While writting it, I noticed that using > for 's menu-entry fields > was maybe not a good idea. >=20 > has no default values and it might be hard to understand > by final users. WDYT ? =46rom an understanding standpoint I don't think it's that bad. What worries me more is that now AND BEFORE, you can't boot anything other = than Linux, no bootsector chainloading or anything. I'm not sure what the use case that "menu-entries" is trying to address is,= then. I mean both the current generation and previous generations are aut= omatically there and you can't specify any menu-entries but Linux, so what = are you gonna specify? Also, already allows overriding = kernel-arguments, too. Luckily, Tom=C3=A1=C5=A1 =C4=8Cech just noticed that "menu-entries" changed= , so presumably he uses it. Will ask what use case he has... > +(boot-parameters > (label "The Other Distro") > - (linux "/boot/old/vmlinux-2.6.32") > - (linux-arguments '("root=3D/dev/sda2")) > + (root-device "my-root") > + (boot-name 'grub) > + (store-device "my-root") > + (store-mount-point "/") > + (kernel "/boot/old/vmlinux-2.6.32") > + (kernel-arguments '("root=3D/dev/sda2")) > (initrd "/boot/old/initrd")) > @end example This here isn't so bad. > +@item @code{root-device} > +The root device identifier. It has to correspond exactly to the device > +field of the object representing the OS's root file > +system, so it might be a device path like @code{"/dev/sda3"}. > + > +@item @code{boot-device} Did you mean "boot-name" ? > +The name of the bootloader used to boot this entry (@code{'grub} or > +@code{'syslinux} for instance). This one is a strange implementation detail to expose for menu entries, tho= ugh. Maybe have operating-system-bootcfg magically complete it if it's uns= et? Then add here "If in doubt, don't specify it.". > +@item @code{store-device} > +The device where the kernel and initrd are to be found---i.e., for GRUB > +@dfn{root} for this menu entry (@pxref{root,,, grub, GNU GRUB manual}). > + > +Depending on the bootloader, this may be a file system label (a > +string), a file system UUID (a bytevector, @pxref{File Systems}), or > +@code{#f}. If set to @code{#f}, GRUB will search the device containing > +the file specified by the @code{linux} field (@pxref{search,,, grub, > +GNU GRUB manual}). It must @emph{not} be an OS device name such as > +@file{/dev/sda1}. Maybe default to #f in in gnu/system.scm ? Then add here "If in doubt, don't specify it.". > +@item @code{store-mount-point} > +The mount point of the above device on the system. You probably want > +to set it to @code{"/"}. GuixSD uses it to strip the prefix of store > +file names for systems where @file{/gnu} or @file{/gnu/store} is on a > +separate partition. Maybe default to "/" in ) id 1dCBfS-0007bp-0d for submit@debbugs.gnu.org; Sat, 20 May 2017 17:12:06 -0400 Received: from mx2.suse.de ([195.135.220.15]:39389 helo=mx1.suse.de) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dCBfQ-0007bh-C7 for 26339@debbugs.gnu.org; Sat, 20 May 2017 17:12:04 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id B1770AC39; Sat, 20 May 2017 21:12:03 +0000 (UTC) Date: Sat, 20 May 2017 23:12:02 +0200 From: =?utf-8?B?VG9tw6HFoSDEjGVjaA==?= To: Mathieu Othacehe Subject: Re: bug#26339: [PATCH] doc: Adapt to multiple bootloader support. Message-ID: <20170520211202.56h5vvvutif743by@penguin.suse.cz> References: <20170402134916.2871-1-m.othacehe@gmail.com> <20170516130306.10414-1-m.othacehe@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="nzivruvvmvaolfjy" Content-Disposition: inline In-Reply-To: <20170516130306.10414-1-m.othacehe@gmail.com> User-Agent: Mutt/1.6.2 (2016-07-01) X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 26339 Cc: 26339@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: -2.3 (--) --nzivruvvmvaolfjy Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline On Tue, May 16, 2017 at 03:03:06PM +0200, Mathieu Othacehe wrote: > ... > @example >-(menu-entry >+(boot-parameters > (label "The Other Distro") >- (linux "/boot/old/vmlinux-2.6.32") >- (linux-arguments '("root=/dev/sda2")) >+ (root-device "my-root") >+ (boot-name 'grub) Is anywhere documented what does this line means? >+ (store-device "my-root") >+ (store-mount-point "/") >+ (kernel "/boot/old/vmlinux-2.6.32") >+ (kernel-arguments '("root=/dev/sda2")) > (initrd "/boot/old/initrd")) > @end example TIA, S_W --nzivruvvmvaolfjy Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEDOrssfr9jDQthC2PSiPjT6AzQ20FAlkgsSIACgkQSiPjT6Az Q23RchAAlGkcBwoY6H1DCYPWe9SCVAPtVe7H00DcsSKCVs9hD1BCbXSHTknp5ZEK q+M0xSAq6DbPtryRynnasgWqEWtAUv/0jj1jbyqNIeZYS7japrmQGfivPXEPBIw4 ZL32lN/ZWfQBm+Zix3lgdKR7YknWM/WZspGWX35r3rxtwhAiwoK62R20eFIyrATf ROUvOfoq5PlweBo2DETRx+FwpYARf+QG3IESewc1eYFhJLZEu48WulEgSSPpWqkV 0qP5PAStOdm2yJLWjQ3qzPB40dtG4ZWM57KtAYhAW70PLBhVKqXZoRjoxw2bhCA6 pruISalhrVoxKw/eNAcgMkoQMPQrg8q6YOH1jlTAD3hA5TmwB59e9o3CW/jhkihb s9LMxVPcSRvdlQ7DaVVKJjinyAbWIV66HQ2Erb4K2Znc6guhAKm52jMZsBl7Wb2C LwlXy860K6HtA/ljymw7vTSP4FdPaX0l9uAxZbOaODW87n0qPw/aAJmdXWSc91bR C41kLl/PDaSn2IfK+JijsG5QlLfXkis8rRixX5JwXpzlX/AvPGMGwjLCyMlh8cRr FRE4JMf0Z43bSVtiW4T79qTsowtON2sHDin95FkK5RtZP2QXDtERIe/4xHJi3qL/ wnzXwsQ0EQuJBpVXgJwZPkzLEuQ7oapLOVs8EiiwSbx9joeC3Lw= =4+tZ -----END PGP SIGNATURE----- --nzivruvvmvaolfjy-- From debbugs-submit-bounces@debbugs.gnu.org Sat May 20 17:19:58 2017 Received: (at 26339) by debbugs.gnu.org; 20 May 2017 21:19:58 +0000 Received: from localhost ([127.0.0.1]:57370 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dCBn3-0007mq-Qg for submit@debbugs.gnu.org; Sat, 20 May 2017 17:19:57 -0400 Received: from mail-wm0-f54.google.com ([74.125.82.54]:36509) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dCBn2-0007mc-16 for 26339@debbugs.gnu.org; Sat, 20 May 2017 17:19:56 -0400 Received: by mail-wm0-f54.google.com with SMTP id 7so27047016wmo.1 for <26339@debbugs.gnu.org>; Sat, 20 May 2017 14:19:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=references:user-agent:from:to:cc:subject:in-reply-to:date :message-id:mime-version; bh=S1zI7AmLBGGHuTWPPsqrHPfihaqhmO/b1sXo1ibDkkI=; b=YFl8UqG1syZZ8dVIm2uju8yHpvfJi27BDzz8e469MZx7WKuWzBY66x/iBAWedNjp1q j3ekgwz4JqZUuB7vVbHWi1XuvUHVlkvP5+DAt78cKROzcK5DF8xqMkYXZcjAFtRFAKCc HVj5qeheVZrKAPvlY1TdAF3VjR6ftXp/IpBwxSOzxJAjCnal0TsDlKymuLc1kLSigoL/ fje/1l7PEDFd062G11wG7N7FsIYiYCD/6ZHVSY1yuOnkengWpqfpjGoWE3c6jLqi72MZ virLSMAeCTpUyayBRRPcXxqkKE0ufGY3plWMX3Vbo0b2G+Hnub8ZmxBe0ln2bEeT7lOy lctg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:references:user-agent:from:to:cc:subject :in-reply-to:date:message-id:mime-version; bh=S1zI7AmLBGGHuTWPPsqrHPfihaqhmO/b1sXo1ibDkkI=; b=VlDbhYaytxre0rGHlU9wQ4YxZrC+h3fm9hWxWw/9ytmDZ/cpMFq8S1rgS2/bWv2G2B UvTQV7gEr+rgHyhj7/U4EbPs4TYMdfNDAMI7ax07pvnWkm7+ACwhSWwjGJKEJGuk83XU Irmh7kloek9LgKWBOdxygltvMjpUY1j2JsgDzxtyO153oo6do3xFRxyCYcdyr35u86xU v63eqrEoOGBY/rnTh4bMS84jJ1cz7JuUVTOYX810I5jH4FUgVd/v5yStBc/6k/YLNLUj 8zVF+I61zeFMZpPWzFhqVtEBdGngRQZ+QBLhCN1j7ShmCI+RsreFMHBMsIZ1k3F6cBUY 9EQA== X-Gm-Message-State: AODbwcD0Vpozk5q3jthcBEO5T/p0I+ycvsTVBfK0BFf7CnhptHmdazUm cS3LdVYao6Uypw== X-Received: by 10.28.149.68 with SMTP id x65mr10582709wmd.66.1495315190190; Sat, 20 May 2017 14:19:50 -0700 (PDT) Received: from cervin (85-169-37-239.rev.numericable.fr. [85.169.37.239]) by smtp.gmail.com with ESMTPSA id w16sm14177745wmw.10.2017.05.20.14.19.49 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 20 May 2017 14:19:49 -0700 (PDT) References: <20170402134916.2871-1-m.othacehe@gmail.com> <20170516130306.10414-1-m.othacehe@gmail.com> <20170520211202.56h5vvvutif743by@penguin.suse.cz> User-agent: mu4e 0.9.18; emacs 25.2.1 From: Mathieu Othacehe To: =?utf-8?B?VG9tw6HFoSDEjGVjaA==?= Subject: Re: bug#26339: [PATCH] doc: Adapt to multiple bootloader support. In-reply-to: <20170520211202.56h5vvvutif743by@penguin.suse.cz> Date: Sat, 20 May 2017 23:19:48 +0200 Message-ID: <87vaovkyyz.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 26339 Cc: 26339@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.5 (/) >>+ (boot-name 'grub) > > Is anywhere documented what does this line means? Mmh, I forget it in the doc patch sorry. This field is used to restore the correct bootloader when doing a "guix system switch-generation". In your case you can use any value. We definitely need to change this. From debbugs-submit-bounces@debbugs.gnu.org Sun May 21 09:57:41 2017 Received: (at 26339) by debbugs.gnu.org; 21 May 2017 13:57:42 +0000 Received: from localhost ([127.0.0.1]:59456 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dCRMb-0000cz-MX for submit@debbugs.gnu.org; Sun, 21 May 2017 09:57:41 -0400 Received: from mail-wm0-f54.google.com ([74.125.82.54]:33067) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dCRMZ-0000cj-HI for 26339@debbugs.gnu.org; Sun, 21 May 2017 09:57:39 -0400 Received: by mail-wm0-f54.google.com with SMTP id m7so1371513wmg.0 for <26339@debbugs.gnu.org>; Sun, 21 May 2017 06:57:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=yV/mK78T3AL72S98YfZduMCLMkI03+D+9rZmQLq7mS8=; b=C4upHg/AtnIozp1X9UxO5Wg58Sf3W9voS23uWyBQrk6mNhQ2MLhMeeJFSkj0uGlFxO e9hiUTe3jFR5qgl1PTKZcsKo0Xz1Cg4dJ2kwpBwnGG8m3lAxj0KPD9tLk3ex0lVkZn2Y YmOM+tqLUjjoPqFMzyZDpiWciFCawTE6CXJT/wqFvpGZpgpVtpUo8DjwqGrLECkQlb3C lNuITeXKlB6BWpbc9zBxFg9cQMbBElIWZ4pHg9hRQ1SCzIaZkQnNiMtI1EMQ8TQYVTuD aL0Hr3/gpZM1kVucOALaxJD0lB6wCf2wzGZXjefK+ZoVQIcdoC7CQrdwNSbeRbfxL6Oy fSyQ== 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:date:message-id:mime-version :content-transfer-encoding; bh=yV/mK78T3AL72S98YfZduMCLMkI03+D+9rZmQLq7mS8=; b=lhQT0h5eLR584FazledZ5bfgP4JI+AgL+go6D8+ZhvrYkcjDbvqFbBFHnPiDlBZBxp NPCzgz0+bCxF+RtEbAVuuzP/2/ao9sjNQLxSZM2iPUGmo5L0AqKT3hQttM5iHZvReukZ N30YijzEMiEPoabDmJsKAOEysy5EfubjxDuFu0ggyXHSBf9XOQgQxFsAIxIKWPb6A/Br uB6cPU9ZoeTfAOh6nvD/rxFLA4dgw/VVRQbrpBUSWh3gFFnhHRJ95ywheJPAWWSprL2l bGQjOqGA3JvHuxOBCMrj2DOGsWSxGhUvCrP5MN+5Sdth4hvKfLoSYN2SdBGd/beWMMqb X5Dg== X-Gm-Message-State: AODbwcABe5WYIIuRjYNaC12s8M5kCMrRqxZld3Z09IgqitUOAS8cuZeM m2nhnf8el9nwzw== X-Received: by 10.28.125.147 with SMTP id y141mr24648488wmc.87.1495375053552; Sun, 21 May 2017 06:57:33 -0700 (PDT) Received: from cervin.8.8.8.8 (85-169-37-239.rev.numericable.fr. [85.169.37.239]) by smtp.gmail.com with ESMTPSA id x133sm27189189wme.0.2017.05.21.06.57.32 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 21 May 2017 06:57:32 -0700 (PDT) From: Mathieu Othacehe To: 26339@debbugs.gnu.org Subject: [PATCH] scripts: system: Handle unspecified bootloader package and installer. Date: Sun, 21 May 2017 15:57:15 +0200 Message-Id: <20170521135715.14374-1-m.othacehe@gmail.com> X-Mailer: git-send-email 2.13.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 26339 Cc: Mathieu Othacehe 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.0 (/) * guix/scripts/system.system (perform-action): If bootloader installer or bootloader package are #f, do not add them to drvs but keep things going. This allows to write (installer #f) or (package #f) in definition. Reported-by: Clément Lassieur . --- guix/scripts/system.scm | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/guix/scripts/system.scm b/guix/scripts/system.scm index 5e4574f7c..0e29d3c05 100644 --- a/guix/scripts/system.scm +++ b/guix/scripts/system.scm @@ -653,19 +653,20 @@ output when building a system derivation, such as a disk image." (bootloader-installer (let ((installer (bootloader-installer bootloader)) (target (or target "/"))) - (bootloader-installer-derivation installer - bootloader-package - device target))) + (if installer + (bootloader-installer-derivation installer + bootloader-package + device target) + (return #f)))) ;; For 'init' and 'reconfigure', always build BOOTCFG, even if ;; --no-bootloader is passed, because we then use it as a GC root. ;; See . (drvs -> (if (memq action '(init reconfigure)) - (if (and install-bootloader? bootloader-package) - (list sys bootcfg - bootloader-package - bootloader-installer) - (list sys bootcfg)) + (delete #f + (list sys bootcfg + bootloader-package + bootloader-installer)) (list sys))) (% (if derivations-only? (return (for-each (compose println derivation-file-name) -- 2.13.0 From debbugs-submit-bounces@debbugs.gnu.org Mon May 22 04:11:46 2017 Received: (at 26339) by debbugs.gnu.org; 22 May 2017 08:11:46 +0000 Received: from localhost ([127.0.0.1]:59973 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dCiRN-0008Am-PB for submit@debbugs.gnu.org; Mon, 22 May 2017 04:11:46 -0400 Received: from mail-wm0-f49.google.com ([74.125.82.49]:37147) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dCiRL-0008Aa-Va for 26339@debbugs.gnu.org; Mon, 22 May 2017 04:11:44 -0400 Received: by mail-wm0-f49.google.com with SMTP id d127so142366886wmf.0 for <26339@debbugs.gnu.org>; Mon, 22 May 2017 01:11:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=references:user-agent:from:to:cc:subject:in-reply-to:date :message-id:mime-version:content-transfer-encoding; bh=rcwHdXlgvnO+WBPZkGWE121DtEVnY9RnPcBhsDskzP8=; b=VAP64KMOuuGLU7RSeZ28YCeTGDq00pbbY5B9TsENtrWatuU0UrsOWCpmn++lMdyH2d nykYkzbcaYY5/aHxN5ydsLfXRs3lNrngzcQNHbW99QEFZA98ykQeyRV92FFjFacCA9DS L9eZhG098gMAk+JUHStfcWPVr+JzFA3lV71vY9hA4OmvA6LNmXOqdJYHa80pVW7en1wA KgvKAZ5OcYBTYHsSi5Ntj8tNGvLD5eSwPBy0L11uVHepGPe0HN9KVFkTW6w/WY92x40P +w24ljnqZbUtZvaB/X8NEIzbxr8FXqrrbA3rbxQkJZlmFnMs4zLuncrGEPjM3QTJsojP yA4g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:references:user-agent:from:to:cc:subject :in-reply-to:date:message-id:mime-version:content-transfer-encoding; bh=rcwHdXlgvnO+WBPZkGWE121DtEVnY9RnPcBhsDskzP8=; b=pxv97mzp3cRckF0YIUU8mIDy4ZfdQXutfO4qXbojs4vnn+cwKLqWhK9htbtuBk0g0r W5lzvAmOXPIhs7ckCZXHyvMpKzJICgsT99FK0lM97YGnVRmdIi0dJ4L6lm6AIECiHWdO Oc/W9J1KdSiFD43CC4sXgFFVBuDuWShx7BCF1HTNBuae6Y89sr+rn3ROLI1//ZTY/nwW ZM/U0XWkbWkfgJHi/ryvXKdfL+PqyOgSdq0sZvEdomJle/aj2vU7JcI8zEwsgypxLFL3 Rm1WK7dJwwGxqEfiKTIC0KzxpUcPDoqBNFAfhSCoTprsA234cqr57qinKnOKX3xN+6/7 wHAA== X-Gm-Message-State: AODbwcD84/txmAntiyRSfYdzb4gVO+k0o0e3OwuvQHLWNYj1fSbJsQkw upqScC5uPr5EGw== X-Received: by 10.28.158.134 with SMTP id h128mr8325644wme.99.1495440697110; Mon, 22 May 2017 01:11:37 -0700 (PDT) Received: from zbook ([46.218.109.88]) by smtp.gmail.com with ESMTPSA id e19sm4619469wma.25.2017.05.22.01.11.36 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 22 May 2017 01:11:36 -0700 (PDT) References: <20170402134916.2871-1-m.othacehe@gmail.com> <20170516130306.10414-1-m.othacehe@gmail.com> <20170520224926.25c8af21@scratchpost.org> User-agent: mu4e 0.9.18; emacs 25.2.1 From: Mathieu Othacehe To: Danny Milosavljevic Subject: Re: bug#26339: [PATCH] doc: Adapt to multiple bootloader support. In-reply-to: <20170520224926.25c8af21@scratchpost.org> Date: Mon, 22 May 2017 10:11:38 +0200 Message-ID: <86inktux8l.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 26339 Cc: 26339@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.5 (/) Hi Danny, > From an understanding standpoint I don't think it's that bad. My concern is about the new fields, that might be hard to understand. > > What worries me more is that now AND BEFORE, you can't boot anything other than Linux, no bootsector chainloading or anything. > > I'm not sure what the use case that "menu-entries" is trying to address is, then. I mean both the current generation and previous generations are automatically there and you can't specify any menu-entries but Linux, so what are you gonna specify? Also, already allows overriding kernel-arguments, too. > > Luckily, Tomáš Čech just noticed that "menu-entries" changed, so presumably he uses it. Will ask what use case he has... Based on Tomáš answer, I guess menu-entries are used to boot on other Linux distributions. "reconfigure" is not able to "see" those distributions by himself, so the only way to add them to bootloader configuration is via menu-entries. > >> +(boot-parameters >> (label "The Other Distro") >> - (linux "/boot/old/vmlinux-2.6.32") >> - (linux-arguments '("root=/dev/sda2")) >> + (root-device "my-root") >> + (boot-name 'grub) >> + (store-device "my-root") >> + (store-mount-point "/") >> + (kernel "/boot/old/vmlinux-2.6.32") >> + (kernel-arguments '("root=/dev/sda2")) >> (initrd "/boot/old/initrd")) >> @end example > > This here isn't so bad. > >> +@item @code{root-device} >> +The root device identifier. It has to correspond exactly to the device >> +field of the object representing the OS's root file >> +system, so it might be a device path like @code{"/dev/sda3"}. >> + >> +@item @code{boot-device} > > Did you mean "boot-name" ? Yes it's a mistake :) > >> +The name of the bootloader used to boot this entry (@code{'grub} or >> +@code{'syslinux} for instance). > > This one is a strange implementation detail to expose for menu entries, though. Maybe have operating-system-bootcfg magically complete it if it's unset? Yes I totally agree. Maybe set it to 'unknown by default ? > > Then add here "If in doubt, don't specify it.". Ok. > >> +@item @code{store-device} >> +The device where the kernel and initrd are to be found---i.e., for GRUB >> +@dfn{root} for this menu entry (@pxref{root,,, grub, GNU GRUB manual}). >> + >> +Depending on the bootloader, this may be a file system label (a >> +string), a file system UUID (a bytevector, @pxref{File Systems}), or >> +@code{#f}. If set to @code{#f}, GRUB will search the device containing >> +the file specified by the @code{linux} field (@pxref{search,,, grub, >> +GNU GRUB manual}). It must @emph{not} be an OS device name such as >> +@file{/dev/sda1}. > > Maybe default to #f in in gnu/system.scm ? > > Then add here "If in doubt, don't specify it.". > Ok. >> +@item @code{store-mount-point} >> +The mount point of the above device on the system. You probably want >> +to set it to @code{"/"}. GuixSD uses it to strip the prefix of store >> +file names for systems where @file{/gnu} or @file{/gnu/store} is on a >> +separate partition. > > Maybe default to "/" in > Then add here "If in doubt, don't specify it.". Ok. > > That would make the amount of new fields the user has to specify to one, just "root-device". > Yes seems better. > That said, I'm wondering whether we should keep menu-entries at all (or if we do, maybe make it bootloader-specific like it was? At least then you can add entries that Guix doesn't use already). Let's see what Tomáš says it's for :) I'll propose a new patch. Thanks ! Mathieu From debbugs-submit-bounces@debbugs.gnu.org Sat Jun 10 04:53:44 2017 Received: (at 26339) by debbugs.gnu.org; 10 Jun 2017 08:53:44 +0000 Received: from localhost ([127.0.0.1]:37787 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dJc9Q-0002Lg-Hk for submit@debbugs.gnu.org; Sat, 10 Jun 2017 04:53:44 -0400 Received: from mail-wr0-f196.google.com ([209.85.128.196]:34056) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dJc9M-0002LR-Nb for 26339@debbugs.gnu.org; Sat, 10 Jun 2017 04:53:41 -0400 Received: by mail-wr0-f196.google.com with SMTP id u101so11215124wrc.1 for <26339@debbugs.gnu.org>; Sat, 10 Jun 2017 01:53:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=FCP98is0Eayhg5r7emAL3bId1ONb2Nac5bjjnpII6vQ=; b=pg5/RNr18p6gu/jC1VV36YNW7azPFbLdFvmHnhmnuaMLskAxVCBzzYMWRfcWPg/fRd w0s2WwyJLFOgu3lrlU9iV/jaKWBt3uP7BrM/XN1veTvJ3R4AYpFHumUPiNGZTlA3pv4g TAaBEzZQWvvxodIhjoKkiim7A/rPmwmTIDFZXYfcWTXwqj5FUDYY/Niw8TsqAOWwwmgB /5de0tkh3syAQRv3lAJ2yIAgFqY7fEu0XJIvXIri4k+9xAQv2lG98KMqzhsWTrNZ80v5 EN+hgEc/6gY/U95sEznOXZekH6CDDC3MS+4uGZE4uXpxET3iKQOaIDsPYmvg9k7VYhQg pC3g== 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:date:message-id; bh=FCP98is0Eayhg5r7emAL3bId1ONb2Nac5bjjnpII6vQ=; b=pg7FcvcXUsh6xx0MeuVAOPC/YS9lJUn4XkLwDV45W4VOIkCm32E7CAym6HXB3a0w73 PbAgzlddqxaJAglLG/2cqhsxFh8CjMrkD3tazjUWHLQRTv4deTWApsRnSPGVYJAInG/e sUzHNDE/3lQNu9R6vWf2GtZYEvpSw391B3MvpYrGjUtnI45hHba2hhanmwaxNxV4dncs sLUE69nDSn5Jg5epABF3DztldjdkDBb3jImNKcMSjOuX/aBN+ystJLKkSET3795+u6iH CmZwcU1Hl6o4Z7Jc3gyjHLOxNIj3soJiWHjom0eC68ay+z4iYBfXm7sRJ1pqxR9fhe9b m1yA== X-Gm-Message-State: AKS2vOzUUtKqLSb5pCiQSni90UgC8QVfHNGYP2pxqPkl7zxQfOhTE/vh BmC4qO3r3vRaD7lu X-Received: by 10.223.155.214 with SMTP id e22mr1529921wrc.33.1497084814717; Sat, 10 Jun 2017 01:53:34 -0700 (PDT) Received: from cervin.8.8.8.8 (85-169-37-239.rev.numericable.fr. [85.169.37.239]) by smtp.gmail.com with ESMTPSA id c71sm1047921wmh.21.2017.06.10.01.53.33 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 10 Jun 2017 01:53:33 -0700 (PDT) From: Mathieu Othacehe To: 26339@debbugs.gnu.org Subject: [PATCH] bootloader: Rename boot-name to bootloader-name. Date: Sat, 10 Jun 2017 10:53:27 +0200 Message-Id: <20170610085327.1353-1-m.othacehe@gmail.com> X-Mailer: git-send-email 2.13.1 X-Spam-Score: -1.0 (-) X-Debbugs-Envelope-To: 26339 Cc: Mathieu Othacehe 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.0 (-) * gnu/system.scm: Rename boot-name -> bootloader-name. * guix/scripts/system.scm: Rename boot-name -> bootloader-name. --- Hi, Here's a small patch to rename boot-name to bootloader-name. If a previous "parameters" files contains "boot-name" instead of now expected bootloader-name, 'grub bootloader will be set as default. Thanks, Mathieu gnu/system.scm | 16 ++++++++-------- guix/scripts/system.scm | 6 +++--- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/gnu/system.scm b/gnu/system.scm index 96ef06a48..228bf410c 100644 --- a/gnu/system.scm +++ b/gnu/system.scm @@ -104,7 +104,7 @@ boot-parameters? boot-parameters-label boot-parameters-root-device - boot-parameters-boot-name + boot-parameters-bootloader-name boot-parameters-store-device boot-parameters-store-mount-point boot-parameters-kernel @@ -216,7 +216,7 @@ directly by the user." ;; exactly to the device field of the object representing the ;; OS's root file system, so it might be a device path like "/dev/sda3". (root-device boot-parameters-root-device) - (boot-name boot-parameters-boot-name) + (bootloader-name boot-parameters-bootloader-name) (store-device boot-parameters-store-device) (store-mount-point boot-parameters-store-mount-point) (kernel boot-parameters-kernel) @@ -235,8 +235,8 @@ directly by the user." (label label) (root-device root) - (boot-name - (match (assq 'boot-name rest) + (bootloader-name + (match (assq 'bootloader-name rest) ((_ args) args) (#f 'grub))) ; for compatibility reasons. @@ -306,7 +306,7 @@ The object has its kernel-arguments extended in order to make it bootable." (boot-parameters (label (menu-entry-label menu-entry)) (root-device #f) - (boot-name 'custom) + (bootloader-name 'custom) (store-device (menu-entry-device menu-entry)) (store-mount-point (menu-entry-device-mount-point menu-entry)) (kernel (menu-entry-linux menu-entry)) @@ -892,7 +892,7 @@ kernel arguments for that derivation to ." (store -> (operating-system-store-file-system os)) (bootloader -> (bootloader-configuration-bootloader (operating-system-bootloader os))) - (boot-name -> (bootloader-name bootloader)) + (bootloader-name -> (bootloader-name bootloader)) (label -> (kernel->boot-label (operating-system-kernel os)))) (return (boot-parameters (label label) @@ -903,7 +903,7 @@ kernel arguments for that derivation to ." (operating-system-kernel-arguments os system.drv root-device) (operating-system-user-kernel-arguments os))) (initrd initrd) - (boot-name boot-name) + (bootloader-name bootloader-name) (store-device (fs->boot-device store)) (store-mount-point (file-system-mount-point store)))))) @@ -929,7 +929,7 @@ being stored into the \"parameters\" file)." (kernel-arguments #$(boot-parameters-kernel-arguments params)) (initrd #$(boot-parameters-initrd params)) - (boot-name #$(boot-parameters-boot-name params)) + (bootloader-name #$(boot-parameters-bootloader-name params)) (store (device #$(boot-parameters-store-device params)) (mount-point #$(boot-parameters-store-mount-point params)))) diff --git a/guix/scripts/system.scm b/guix/scripts/system.scm index f71b1d71b..35675cc01 100644 --- a/guix/scripts/system.scm +++ b/guix/scripts/system.scm @@ -425,7 +425,7 @@ generation as its default entry. STORE is an open connection to the store." "Return the bootloader name stored in SYSTEM's \"parameters\" file." (let ((params (unless-file-not-found (read-boot-parameters-file system)))) - (boot-parameters-boot-name params))) + (boot-parameters-bootloader-name params))) (define (reinstall-bootloader store number) "Re-install bootloader for existing system profile generation NUMBER. @@ -521,7 +521,7 @@ list of services." (let* ((generation (generation-file-name profile number)) (params (read-boot-parameters-file generation)) (label (boot-parameters-label params)) - (boot-name (boot-parameters-boot-name params)) + (bootloader-name (boot-parameters-bootloader-name params)) (root (boot-parameters-root-device params)) (root-device (if (bytevector? root) (uuid->string root) @@ -532,7 +532,7 @@ list of services." (format #t (G_ " canonical file name: ~a~%") (readlink* generation)) ;; TRANSLATORS: Please preserve the two-space indentation. (format #t (G_ " label: ~a~%") label) - (format #t (G_ " bootloader: ~a~%") boot-name) + (format #t (G_ " bootloader: ~a~%") bootloader-name) (format #t (G_ " root device: ~a~%") root-device) (format #t (G_ " kernel: ~a~%") kernel)))) -- 2.13.1 From debbugs-submit-bounces@debbugs.gnu.org Sat Jun 10 10:26:15 2017 Received: (at 26339) by debbugs.gnu.org; 10 Jun 2017 14:26:15 +0000 Received: from localhost ([127.0.0.1]:39015 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dJhLC-0005Nr-V9 for submit@debbugs.gnu.org; Sat, 10 Jun 2017 10:26:15 -0400 Received: from eggs.gnu.org ([208.118.235.92]:39436) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dJhLB-0005Nf-K1 for 26339@debbugs.gnu.org; Sat, 10 Jun 2017 10:26:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dJhL2-0005Yz-Ek for 26339@debbugs.gnu.org; Sat, 10 Jun 2017 10:26:08 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,T_RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:57070) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dJhL2-0005Ys-BJ; Sat, 10 Jun 2017 10:26:04 -0400 Received: from reverse-83.fdn.fr ([80.67.176.83]:60568 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1dJhL1-0004t9-NS; Sat, 10 Jun 2017 10:26:04 -0400 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) To: Mathieu Othacehe Subject: Re: bug#26339: [PATCH] bootloader: Rename boot-name to bootloader-name. References: <20170402134916.2871-1-m.othacehe@gmail.com> <20170610085327.1353-1-m.othacehe@gmail.com> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 22 Prairial an 225 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-unknown-linux-gnu Date: Sat, 10 Jun 2017 16:26:01 +0200 In-Reply-To: <20170610085327.1353-1-m.othacehe@gmail.com> (Mathieu Othacehe's message of "Sat, 10 Jun 2017 10:53:27 +0200") Message-ID: <87lgozyl52.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 26339 Cc: 26339@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: -5.0 (-----) Mathieu Othacehe skribis: > * gnu/system.scm: Rename boot-name -> bootloader-name. > * guix/scripts/system.scm: Rename boot-name -> bootloader-name. LGTM! It might be good to describe it like this: * gnu/system ()[boot-name]: Rename field to... [bootloader-name]: ... this. Adjust users. * gnu/scripts/system.scm: Adjust accordingly. That makes it clear that we renamed a field and that the rest is purely mechanical. Thank you, Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Sat Jun 10 12:33:51 2017 Received: (at 26339) by debbugs.gnu.org; 10 Jun 2017 16:33:51 +0000 Received: from localhost ([127.0.0.1]:39117 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dJjKh-0003Sp-2V for submit@debbugs.gnu.org; Sat, 10 Jun 2017 12:33:51 -0400 Received: from mail-wr0-f195.google.com ([209.85.128.195]:34767) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dJjKe-0003Sc-9Z for 26339@debbugs.gnu.org; Sat, 10 Jun 2017 12:33:48 -0400 Received: by mail-wr0-f195.google.com with SMTP id u101so13015019wrc.1 for <26339@debbugs.gnu.org>; Sat, 10 Jun 2017 09:33:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=references:user-agent:from:to:cc:subject:in-reply-to:date :message-id:mime-version; bh=dYPHx1aEpE4W8S2HkBCra/xl02t+ZJ3AltwTnRNtZ1Q=; b=ByTdsLAVCLBoAI3u3GgNhCrZ4ISDGGacOWY+AWkWs/2ydpt4Wd0GM5FyKw0WtTeLy7 ERpSh5uaGHcDX8ylnJfC0i7gLkBjGdJhb+gsz5CiuqJjrp20ASr93VB98oQ2VXKFUiWj ASxxu5jc3JKRT+Af/wD+PU38S7run/HxMWoEKvAMvCvTPKyJqvQLsdn/3koNca3Jb+nf A3zl+oZEp01Xtd6sLeq8dfoD+Bi0eqWOAmT6n5/5RrywYcMwq6nEbcb2rbpzdeQzhE46 mLzZIfJ8OF3QkcWgtaKn0J29b9cf+Z1CPKA7M5e3cjG3iS6RVDuIUerroJuVcjI1drpe 9xag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:references:user-agent:from:to:cc:subject :in-reply-to:date:message-id:mime-version; bh=dYPHx1aEpE4W8S2HkBCra/xl02t+ZJ3AltwTnRNtZ1Q=; b=sLwM+V7ijWXCNacxiIbZBY+af+TnOtELMjph+wkfDESJdvNzizzPtKDxTQ9kBsgChA wqDtSrT5gbTl6I5JTVj3i2yvtcDUAeChXTMyDQXkF5sPMTWIBcyHmiA0lgjW6Q/Jds4N Mm6GaCBKDoWf92+WV2WDyK+zU0CMfUqsJz1D1t2rV8dVWWu0HRwcCvK0X5oCyz6lRuq4 PxO9vKMmLm4NF+4kI/iY1UmV60h8GeqK9+ZKw3NIsWqop4RwjylI9BjM+O+npNONLnC/ wIZ/BMpwggKr94ha3xD2s1CYZ/CJ6eP18W3z0XKvHgUniBMuJP93yiMBj++bj/WKkDs0 wLSg== X-Gm-Message-State: AKS2vOxHZHMUAyy6xmPTxkUxuy/kLXLQC06fLRbr6IVTn7b+LMtOV+mX 7ZxD1v0K/9pgnFfP X-Received: by 10.28.101.213 with SMTP id z204mr3265656wmb.106.1497112422395; Sat, 10 Jun 2017 09:33:42 -0700 (PDT) Received: from cervin (85-169-37-239.rev.numericable.fr. [85.169.37.239]) by smtp.gmail.com with ESMTPSA id 22sm8663662wrt.36.2017.06.10.09.33.41 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 10 Jun 2017 09:33:41 -0700 (PDT) References: <20170402134916.2871-1-m.othacehe@gmail.com> <20170610085327.1353-1-m.othacehe@gmail.com> <87lgozyl52.fsf@gnu.org> User-agent: mu4e 0.9.18; emacs 25.2.1 From: Mathieu Othacehe To: Ludovic =?utf-8?Q?Court=C3=A8s?= Subject: Re: bug#26339: [PATCH] bootloader: Rename boot-name to bootloader-name. In-reply-to: <87lgozyl52.fsf@gnu.org> Date: Sat, 10 Jun 2017 18:33:40 +0200 Message-ID: <878tkzol97.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -1.0 (-) X-Debbugs-Envelope-To: 26339 Cc: 26339@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.0 (-) Hi Ludo, > That makes it clear that we renamed a field and that the rest is purely > mechanical. Ok, pushed as f96752e with an updated commit message. Thanks, Mathieu From debbugs-submit-bounces@debbugs.gnu.org Sun Jun 11 04:42:24 2017 Received: (at 26339) by debbugs.gnu.org; 11 Jun 2017 08:42:24 +0000 Received: from localhost ([127.0.0.1]:39742 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dJyS0-0005dH-Gy for submit@debbugs.gnu.org; Sun, 11 Jun 2017 04:42:24 -0400 Received: from mail-wr0-f196.google.com ([209.85.128.196]:36132) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dJyRy-0005d2-TW for 26339@debbugs.gnu.org; Sun, 11 Jun 2017 04:42:23 -0400 Received: by mail-wr0-f196.google.com with SMTP id e23so15550846wre.3 for <26339@debbugs.gnu.org>; Sun, 11 Jun 2017 01:42:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=references:user-agent:from:to:cc:subject:in-reply-to:date :message-id:mime-version; bh=RxtSnEpMCgAhL2Uo4epQj8K5ES2PN6p6AIdZ96Djeao=; b=kEsXorNYdrvHqPJ/EBU/8p7lvX6oiotFBfztp4l64wG+b7rw+L/BCPawJqNxArxlBD F3OQxwfgX9k0wbzio3FgFWFtpbKofi3XREWTGQupsLBxBEA/g3xz7QirnzO1oCAaroCN U8x+6VyvLk6GC6zxx9fgZt/ydVDDBk4h7Ws5rxvacV1mXOdhSI0cuaaJDGRxO2Rvt79F 2xeA0h43ZR7ZJUvsG41HF7HR5FS8kiPyoGrR1i79EDzrSTqvKJCvy42bMQ/JRADJxIIE 8AH8mlx4bWWxogY6lIuFmqnyOEVg6gYmHEj9DD39L6RaZfauCQYWgM6K0cBXyVtM8sOq BB+g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:references:user-agent:from:to:cc:subject :in-reply-to:date:message-id:mime-version; bh=RxtSnEpMCgAhL2Uo4epQj8K5ES2PN6p6AIdZ96Djeao=; b=NWbTgbQRSiVn5oUeUzFCZKh6YL2bSWv0fiidGuXF8MmrQRTEgN0DY+u25S9oxizhXc 3DkMBlelTMvPmp2OXJg9BhfKoArLE2hp5t1H+Wod5UQc2ORzIt/swF25mRJkIJZuSC6O ybB5+GiAAwt2ag2xsw6K2XrrsXWiiDkMYVbfijx7xZOK3c1QxeaJ4dJ8PlzKsCZHpm96 4ukwiwRcfn2bImv84MzGMK9mweC55qQCwG/dPDTOH3J60HQTzMgc+heeJzYNK/kfPzbb XU/YH4kjWMPbFXomOMCElM29XhLEnnRWzYmqcXAragb5ybXi2YJYtnwqmjH0h4B9vioS NBUg== X-Gm-Message-State: AODbwcAT6lAWgO3WtYedKjDVAPQ16D0HpnszupBK2my2Sc1T6msVROKc W9zf1O+4pgegwODW X-Received: by 10.223.179.86 with SMTP id k22mr4159781wrd.5.1497170537115; Sun, 11 Jun 2017 01:42:17 -0700 (PDT) Received: from cervin (85-169-37-239.rev.numericable.fr. [85.169.37.239]) by smtp.gmail.com with ESMTPSA id a9sm12336856wrc.22.2017.06.11.01.42.16 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 11 Jun 2017 01:42:16 -0700 (PDT) References: <20170402134916.2871-1-m.othacehe@gmail.com> <20170610085327.1353-1-m.othacehe@gmail.com> <87lgozyl52.fsf@gnu.org> User-agent: mu4e 0.9.18; emacs 25.2.1 From: Mathieu Othacehe To: Ludovic =?utf-8?Q?Court=C3=A8s?= , Danny Milosavljevic Subject: Re: bug#26339: [PATCH] bootloader: Rename boot-name to bootloader-name. In-reply-to: <87lgozyl52.fsf@gnu.org> Date: Sun, 11 Jun 2017 10:42:15 +0200 Message-ID: <8760g2oqzc.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -1.0 (-) X-Debbugs-Envelope-To: 26339 Cc: 26339@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.0 (-) Hi ! Just to review the situation on the bootloader serie, there are still 3 patches, that may have gone unnoticed in #26339, here are the links : https://debbugs.gnu.org/cgi/bugreport.cgi?bug=26339#504 (add extlinux gpt support). https://debbugs.gnu.org/cgi/bugreport.cgi?bug=26339#507 (add extlinux gpt test). https://debbugs.gnu.org/cgi/bugreport.cgi?bug=26339#519 (allow user to specifiy bootloader-configuration without package nor installer). Then, I'll send new patches adding a theme to extlinux :) Thanks, Mathieu From debbugs-submit-bounces@debbugs.gnu.org Sun Jun 11 05:55:16 2017 Received: (at 26339) by debbugs.gnu.org; 11 Jun 2017 09:55:16 +0000 Received: from localhost ([127.0.0.1]:39767 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dJzaN-0007Ex-Fg for submit@debbugs.gnu.org; Sun, 11 Jun 2017 05:55:16 -0400 Received: from dd1012.kasserver.com ([85.13.128.8]:43278) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dJzaK-0007En-62 for 26339@debbugs.gnu.org; Sun, 11 Jun 2017 05:55:05 -0400 Received: from localhost (178.113.233.117.wireless.dyn.drei.com [178.113.233.117]) by dd1012.kasserver.com (Postfix) with ESMTPSA id C3D341CA0535; Sun, 11 Jun 2017 11:55:01 +0200 (CEST) Date: Sun, 11 Jun 2017 11:54:57 +0200 From: Danny Milosavljevic To: Mathieu Othacehe Subject: "extlinux", "extlinux" gpt, bootloader-configuration without package nor installer Message-ID: <20170611115457.72395d51@scratchpost.org> In-Reply-To: <8760g2oqzc.fsf@gmail.com> References: <20170402134916.2871-1-m.othacehe@gmail.com> <20170610085327.1353-1-m.othacehe@gmail.com> <87lgozyl52.fsf@gnu.org> <8760g2oqzc.fsf@gmail.com> X-Mailer: Claws Mail 3.14.1 (GTK+ 2.24.31; x86_64-unknown-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 26339 Cc: 26339@debbugs.gnu.org, Ludovic =?ISO-8859-1?Q?Court=E8s?= 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.0 (/) Hi Mathieu, On Sun, 11 Jun 2017 10:42:15 +0200 Mathieu Othacehe wrote: >Ok then, would the following bootloader be ok ? >(define extlinux-bootloader-no-installer > (bootloader > (inherit extlinux-bootloader) > (installer #f))) Uhh I guess so. Weird to have the hierarchy like that, though. Much less strange would be to have a hierarchy like this: - extlinux-bootloader ; really means extlinux-configuration-style bootloader - syslinux-bootloader - u-boot-bootloader Using extlinux-bootloader directly as a user doesn't make a lot of sense - but if they do it, it shouldn't install any bootloader (only extlinux configuration). If you used syslinux-bootloader, it would do the same as extlinux-bootloader and also install syslinux (mbr.bin, gptmbr.bin). If you used u-boot-bootloader, it would do the same as extlinux-bootloader and, if you provided an u-boot package to use, also install u-boot (eventually. The latter is not easy and usually a bad idea except for a select few boards [1]). > Just to review the situation on the bootloader serie, there are still 3 > patches, that may have gone unnoticed in #26339, here are the links : > https://debbugs.gnu.org/cgi/bugreport.cgi?bug=26339#504 (add extlinux > gpt support). Not sure why this goes into extlinux. Extlinux is just a configuration standard. It wouldn't have those installation files "mbr.bin", "gptmbr.bin". According to http://www.syslinux.org/wiki/index.php?title=Mbr it seems these are part of the syslinux bootloader distribution. It was weird like that before patch 504 but I don't think it makes sense to conflate extlinux with syslinux. If you do it like that, that means when you use U-Boot (which also uses extlinux config file), extlinux-* will install useless files "mbr.bin" and "gptmbr.bin". Where would it get those in the first place? Does it install syslinux too, then? Apparently. So now the user machine has two bootloaders, syslinux *and* u-boot ? I hope it doesn't clobber u-boot in that case. Really, I think the inheritance should go like this: - extlinux-bootloader ; really means extlinux-configuration-style bootloader - syslinux-bootloader - u-boot-bootloader - maybe ipxe-bootloader And I think u-boot-bootloader, when it eventually exists, should not install the u-boot bootloader by default either (i.e. it shouldn't default to a specific u-boot package). WDYT? > https://debbugs.gnu.org/cgi/bugreport.cgi?bug=26339#507 (add extlinux > gpt test). Here, it correctly says syslinux-os. LGTM! I think complicating the tests by refactoring %minimal-os is not necessary - so it's OK as is. > https://debbugs.gnu.org/cgi/bugreport.cgi?bug=26339#519 (allow user to > specifiy bootloader-configuration without package nor installer). LGTM! [1] There are a lot of forks of u-boot. Vendors usually build and install their strange [usually old] u-boot fork on the device. Often, mainline u-boot eventually works after some time (i.e. after it was merged upstream), but I wouldn't bet on it. So one should load the new bootloader temporarily (by loading it via a RAMload stage like FEL over USB or my using a throwaway SD card or by using a test clip). Otherwise, if u-boot ever didn't work you couldn't recover without extra external hardware and a lot of pain. There's no "BIOS setup" where you can revert to a previous version of u-boot or anything. But if it's only "installed" in RAM, you can just reboot if it doesn't work - it will be gone. Also, for comparison, if one "just" broke the Linux kernel installation or the extlinux bootmenu file, u-boot has a console with keyboard, display and serial port support and can boot Linux from TFTP and from other files on SD cards and flash. So that wouldn't be that bad. To get an overview: - https://community.nxp.com/thread/436638 - https://devtalk.nvidia.com/default/topic/802953/jetson-tk1/how-to-compile-amp-install-mainline-u-boot-/ - https://eewiki.net/display/linuxonarm/i.MX6x+SABRE+Lite+Mainline+U-Boot - https://github.com/xobs/u-boot-novena - https://archlinuxarm.org/forum/viewtopic.php?f=53&t=7290 - https://forum.mqmaker.com/t/mainline-u-boot/673/2 - http://elinux.org/RPi_U-Boot#Mainline - https://blogs.s-osg.org/use-mainline-u-boot-non-signed-kernels-exynos-chromebooks/ - https://forum.odroid.com/viewtopic.php?t=25207 From debbugs-submit-bounces@debbugs.gnu.org Sun Jun 11 06:13:10 2017 Received: (at 26339) by debbugs.gnu.org; 11 Jun 2017 10:13:10 +0000 Received: from localhost ([127.0.0.1]:39777 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dJzrq-0007e7-0q for submit@debbugs.gnu.org; Sun, 11 Jun 2017 06:13:10 -0400 Received: from dd1012.kasserver.com ([85.13.128.8]:44874) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dJzro-0007e0-N2 for 26339@debbugs.gnu.org; Sun, 11 Jun 2017 06:13:09 -0400 Received: from localhost (178.113.233.117.wireless.dyn.drei.com [178.113.233.117]) by dd1012.kasserver.com (Postfix) with ESMTPSA id A0E031CA0535; Sun, 11 Jun 2017 12:13:07 +0200 (CEST) Date: Sun, 11 Jun 2017 12:13:06 +0200 From: Danny Milosavljevic To: Mathieu Othacehe Subject: Re: bug#26339: "extlinux", "extlinux" gpt, bootloader-configuration without package nor installer Message-ID: <20170611121306.3c0e36e9@scratchpost.org> In-Reply-To: <20170611115457.72395d51@scratchpost.org> References: <20170402134916.2871-1-m.othacehe@gmail.com> <20170610085327.1353-1-m.othacehe@gmail.com> <87lgozyl52.fsf@gnu.org> <8760g2oqzc.fsf@gmail.com> <20170611115457.72395d51@scratchpost.org> X-Mailer: Claws Mail 3.14.1 (GTK+ 2.24.31; x86_64-unknown-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 26339 Cc: 26339@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.7 (/) A possible gnu/bootloader/u-boot.scm: ;;; GNU Guix --- Functional package management for GNU ;;; Copyright =C2=A9 2017 David Craven ;;; Copyright =C2=A9 2017 Mathieu Othacehe ;;; Copyright =C2=A9 2017 Danny Milosavljevic ;;; ;;; This file is part of GNU Guix. ;;; ;;; GNU Guix is free software; you can redistribute it and/or modify it ;;; under the terms of the GNU General Public License as published by ;;; the Free Software Foundation; either version 3 of the License, or (at ;;; your option) any later version. ;;; ;;; GNU Guix is distributed in the hope that it will be useful, but ;;; WITHOUT ANY WARRANTY; without even the implied warranty of ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;;; GNU General Public License for more details. ;;; ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . (define-module (gnu bootloader u-boot) #:use-module (gnu bootloader extlinux) #:use-module (gnu bootloader) #:use-module (gnu system) #:use-module (gnu packages bootloaders) #:use-module (guix gexp) #:use-module (guix monads) #:use-module (guix records) #:use-module (guix utils) #:export (u-boot-bootloader)) ;;; ;;; Installation procedures. ;;; (define install-u-boot #~(lambda (bootloader device mount-point) (if bootloader (let ((u-boot-installer (string-append bootloader "/sbin/install-u-= boot")) ; doesn't actually exist yet. (installation-dir (string-append mount-point "/boot"))) (unless (zero? (system* u-boot-installer (string-append "--installdir=3D" installa= tion-dir) (string-append "--device" device)) (error "failed to install U-Boot"))))))) ;;; ;;; Bootloader definitions. ;;; (define u-boot-bootloader (bootloader (inherit extlinux-bootloader) (package #f) (name 'u-boot) (installer install-u-boot) (configuration-file "/boot/extlinux.conf"))) From debbugs-submit-bounces@debbugs.gnu.org Mon Jun 12 05:58:34 2017 Received: (at 26339) by debbugs.gnu.org; 12 Jun 2017 09:58:34 +0000 Received: from localhost ([127.0.0.1]:41853 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dKM7G-0001DY-16 for submit@debbugs.gnu.org; Mon, 12 Jun 2017 05:58:34 -0400 Received: from mail-wr0-f195.google.com ([209.85.128.195]:36577) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dKM7E-0001DM-CO for 26339@debbugs.gnu.org; Mon, 12 Jun 2017 05:58:32 -0400 Received: by mail-wr0-f195.google.com with SMTP id e23so20800151wre.3 for <26339@debbugs.gnu.org>; Mon, 12 Jun 2017 02:58:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=references:user-agent:from:to:cc:subject:in-reply-to:date :message-id:mime-version; bh=mPtz78id1onh2F7s7iK0dlfOZzNHg5cTlkw2J4Klgkw=; b=Agjpu04G6ytyv8zPAxAe06DTH8fL82sWB5K9SKSSZNnEnYRBJl6z3V69CDzw76/uLc VEwa2N0iAja79vDg2nvww734+yLWn0WtdF7vVlr74IXgR7vVkB9Lt4FfCrsjA4DY4oim acTQfE6onNICwGLujI/xeFwv3bceAm+8F6d99On+Tpl3AdkPM+H8CQiUQb954wmv0E04 ZPVj524G4d/+Z6VRPX/bcTRybt2AYYo5xyGNf8OIlg9SEyJ+QKkPZlza6VRTDGduO+G7 U+ckTCXJAqj1eNQE/vmiBAp53AV/IBM6V/ZhJ5+Z1bcLNxfXiFAd9P6jNkqVm0BGVHgB uBiw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:references:user-agent:from:to:cc:subject :in-reply-to:date:message-id:mime-version; bh=mPtz78id1onh2F7s7iK0dlfOZzNHg5cTlkw2J4Klgkw=; b=UXCqByk/EgLT2riemhCBOtD/wW1COVFSI1ZsgvlLfSGL2lXvoNlu7IrGdUm++Zf1jP pAFe2vQUyPx4jNFK7niB2QM2v8OiYCHGQyBVamd5stCVTs2stYgBx4voZdmGuwWPoDPy b7qxffOZYbKDJD6L5+gdrwJHXk2ZDPXokntGCPOeC/dZ8QKPp8r5krXkRBAGI0uVnG0d vsko0U6yPYfn+RvOnfy625v9dwiJCvVcVRsehxmCBen8G5eODoyPbYGk6HWmt/yeWc7r Rq4aMrcuEraDVdIQzuNsFrJc8s2PSJa1HIKB+9Ma2zfIS32vxMtQy0IPQlu8c+x5Cwt+ vE2g== X-Gm-Message-State: AKS2vOxV3i+QjdimLnv7P+t0EP2GzgQaunnMhqhGSJOg9NBokMU8KrPA SYGq6sZOdgTI1kpD X-Received: by 10.223.135.248 with SMTP id c53mr6699031wrc.109.1497261506257; Mon, 12 Jun 2017 02:58:26 -0700 (PDT) Received: from zbook ([46.218.109.88]) by smtp.gmail.com with ESMTPSA id l93sm15315642wrc.46.2017.06.12.02.58.25 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 12 Jun 2017 02:58:25 -0700 (PDT) References: <20170402134916.2871-1-m.othacehe@gmail.com> <20170610085327.1353-1-m.othacehe@gmail.com> <87lgozyl52.fsf@gnu.org> <8760g2oqzc.fsf@gmail.com> <20170611115457.72395d51@scratchpost.org> User-agent: mu4e 0.9.18; emacs 25.2.1 From: Mathieu Othacehe To: Danny Milosavljevic Subject: Re: "extlinux", "extlinux" gpt, bootloader-configuration without package nor installer In-reply-to: <20170611115457.72395d51@scratchpost.org> Date: Mon, 12 Jun 2017 11:58:31 +0200 Message-ID: <86ink1il2w.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -1.0 (-) X-Debbugs-Envelope-To: 26339 Cc: 26339@debbugs.gnu.org, Ludovic =?utf-8?Q?Court=C3=A8s?= 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.0 (-) Hi Danny, I must admin the disctinction between syslinux and extlinux is a bit unclear to me. Reading this page : http://www.syslinux.org/wiki/index.php?title=EXTLINUX "EXTLINUX is a Syslinux variant which boots from a Linux filesystem." Which means that extlinux is a bootloader per-se and the current naming in gnu/bootloader/extlinux.scm makes sense. The wikipedia page of syslinux, also explains that syslinux is a "suite of bootloaders" including : - syslinux (the original one used for booting from fat and ntfs) - extlinux - pxelinux - memdist However, I must admit there's something strange here : --8<---------------cut here---------------start------------->8--- (define u-boot-bootloader (bootloader (inherit extlinux-bootloader) (package #f) (name 'u-boot) (installer install-u-boot) (configuration-file "/boot/extlinux.conf"))) --8<---------------cut here---------------end--------------->8--- The fact that u-boot-bootloader inherits from extlinux-bootloader seems strange, even if u-boot is configured with a file following extlinux syntax. Maybe we could write : --8<---------------cut here---------------start------------->8--- (define u-boot-bootloader (bootloader (package #f) (name 'u-boot) (installer install-u-boot) (configuration-file "/boot/extlinux.conf") (configuration-file-generator extlinux-configuration-file))) --8<---------------cut here---------------end--------------->8--- where extlinux-configuration-file is exported from extlinux.scm ? Thanks, Mathieu From debbugs-submit-bounces@debbugs.gnu.org Mon Jun 12 16:09:35 2017 Received: (at 26339) by debbugs.gnu.org; 12 Jun 2017 20:09:35 +0000 Received: from localhost ([127.0.0.1]:44041 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dKVeZ-0008Tq-9S for submit@debbugs.gnu.org; Mon, 12 Jun 2017 16:09:35 -0400 Received: from eggs.gnu.org ([208.118.235.92]:41416) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dKVeX-0008Tc-B9 for 26339@debbugs.gnu.org; Mon, 12 Jun 2017 16:09:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dKVeO-0007lo-SU for 26339@debbugs.gnu.org; Mon, 12 Jun 2017 16:09:27 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,T_RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:58322) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dKVeO-0007li-OT; Mon, 12 Jun 2017 16:09:24 -0400 Received: from reverse-83.fdn.fr ([80.67.176.83]:60794 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1dKVeO-0003RS-25; Mon, 12 Jun 2017 16:09:24 -0400 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) To: Mathieu Othacehe Subject: Re: "extlinux", "extlinux" gpt, bootloader-configuration without package nor installer References: <20170402134916.2871-1-m.othacehe@gmail.com> <20170610085327.1353-1-m.othacehe@gmail.com> <87lgozyl52.fsf@gnu.org> <8760g2oqzc.fsf@gmail.com> <20170611115457.72395d51@scratchpost.org> <86ink1il2w.fsf@gmail.com> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 24 Prairial an 225 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-unknown-linux-gnu Date: Mon, 12 Jun 2017 22:09:21 +0200 In-Reply-To: <86ink1il2w.fsf@gmail.com> (Mathieu Othacehe's message of "Mon, 12 Jun 2017 11:58:31 +0200") Message-ID: <87ink155ou.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 26339 Cc: 26339@debbugs.gnu.org, Danny Milosavljevic 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: -5.0 (-----) Mathieu Othacehe skribis: > The fact that u-boot-bootloader inherits from extlinux-bootloader seems > strange, even if u-boot is configured with a file following extlinux > syntax. > > Maybe we could write : > > (define u-boot-bootloader > (bootloader > (package #f) > (name 'u-boot) > (installer install-u-boot) > (configuration-file "/boot/extlinux.conf") > (configuration-file-generator extlinux-configuration-file))) > > where extlinux-configuration-file is exported from extlinux.scm ? Given that the configuration file syntax is similar but presumably not identical (?) and that it=E2=80=99s fairly simple, it may be best to simply= have both =E2=80=98extlinux-configuration-file=E2=80=99 and =E2=80=98u-boot-conf= iguration-file=E2=80=99. It=E2=80=99s a case where factorization is probably a bad idea. WDYT? Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Mon Jun 12 16:21:07 2017 Received: (at 26339) by debbugs.gnu.org; 12 Jun 2017 20:21:07 +0000 Received: from localhost ([127.0.0.1]:44049 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dKVpj-0000J9-DK for submit@debbugs.gnu.org; Mon, 12 Jun 2017 16:21:07 -0400 Received: from eggs.gnu.org ([208.118.235.92]:43818) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dKVph-0000IK-MC for 26339@debbugs.gnu.org; Mon, 12 Jun 2017 16:21:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dKVpZ-0003lL-AY for 26339@debbugs.gnu.org; Mon, 12 Jun 2017 16:21:00 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,T_RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:58594) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dKVpZ-0003l8-4y; Mon, 12 Jun 2017 16:20:57 -0400 Received: from reverse-83.fdn.fr ([80.67.176.83]:60894 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1dKVpY-00049i-AB; Mon, 12 Jun 2017 16:20:56 -0400 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) To: Danny Milosavljevic Subject: Re: "extlinux", "extlinux" gpt, bootloader-configuration without package nor installer References: <20170402134916.2871-1-m.othacehe@gmail.com> <20170610085327.1353-1-m.othacehe@gmail.com> <87lgozyl52.fsf@gnu.org> <8760g2oqzc.fsf@gmail.com> <20170611115457.72395d51@scratchpost.org> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 24 Prairial an 225 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-unknown-linux-gnu Date: Mon, 12 Jun 2017 22:20:54 +0200 In-Reply-To: <20170611115457.72395d51@scratchpost.org> (Danny Milosavljevic's message of "Sun, 11 Jun 2017 11:54:57 +0200") Message-ID: <874lvl555l.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 26339 Cc: 26339@debbugs.gnu.org, Mathieu Othacehe 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: -5.0 (-----) Hi, Danny Milosavljevic skribis: > Not sure why this goes into extlinux. Extlinux is just a configuration s= tandard. It wouldn't have those installation files "mbr.bin", "gptmbr.bin". > > According to http://www.syslinux.org/wiki/index.php?title=3DMbr it seems = these are part of the syslinux bootloader distribution. > > It was weird like that before patch 504 but I don't think it makes sense = to conflate extlinux with syslinux. Oh I understand better now (sorry for not reading messages in the right order), and I agree with you. If =E2=80=9Cextlinux=E2=80=9D is just the name of the configuration file fo= rmat, I would argue in favor of having (gnu bootloaders extlinux) simply provide =E2=80=98extlinux-configuration-file=E2=80=99. It should not provide =E2= =80=98install-extlinux=E2=80=99 and =E2=80=98extlinux-bootloader=E2=80=99 at all. Instead these should go to (gnu bootloaders syslinux), with s/extlinux/syslinux/. In addition, I think {extlinux,syslinux}.scm and guix.texi should provide references to the relevant bits of upstream documentation (documentation for the extlinux format, documentation for the syslinux MBR and GPT bootloaders, etc.) This will be useful for those of us who=E2=80=99re not familiar with the thing (like me :-)). Thanks, Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Mon Jun 12 16:23:26 2017 Received: (at 26339) by debbugs.gnu.org; 12 Jun 2017 20:23:26 +0000 Received: from localhost ([127.0.0.1]:44056 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dKVrx-0000Ma-SM for submit@debbugs.gnu.org; Mon, 12 Jun 2017 16:23:26 -0400 Received: from eggs.gnu.org ([208.118.235.92]:44366) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dKVrv-0000MM-PZ for 26339@debbugs.gnu.org; Mon, 12 Jun 2017 16:23:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dKVrl-0004pY-QP for 26339@debbugs.gnu.org; Mon, 12 Jun 2017 16:23:18 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,T_RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:58614) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dKVrl-0004pS-MX; Mon, 12 Jun 2017 16:23:13 -0400 Received: from reverse-83.fdn.fr ([80.67.176.83]:60896 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1dKVrk-0004Gc-2s; Mon, 12 Jun 2017 16:23:12 -0400 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) To: Mathieu Othacehe Subject: Re: bug#26339: [PATCH] bootloader: extlinux: Add extlinux-bootloader-gpt. References: <20170402134916.2871-1-m.othacehe@gmail.com> <20170518101326.11450-1-m.othacehe@gmail.com> Date: Mon, 12 Jun 2017 22:23:09 +0200 In-Reply-To: <20170518101326.11450-1-m.othacehe@gmail.com> (Mathieu Othacehe's message of "Thu, 18 May 2017 12:13:26 +0200") Message-ID: <87wp8h3qhe.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 26339 Cc: 26339@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: -5.0 (-----) Mathieu Othacehe skribis: > * gnu/bootloader/extlinux.scm (extlinux-bootloader-gpt): New exported > variable. > (install-extlinux)[mbr]: New argument. > (install-extlinux-mbr, install-extlinux-gpt): New variables. > (extlinux-bootloader)[installer]: Use install-extlinux-mbr. So let=E2=80=99s have a separate (gnu bootloaders syslinux) module like Dan= ny and I suggested, and let=E2=80=99s keep extlinux.scm focused on just the extlinux file format. Sounds good to you? Thanks, Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Mon Jun 12 16:30:11 2017 Received: (at 26339) by debbugs.gnu.org; 12 Jun 2017 20:30:11 +0000 Received: from localhost ([127.0.0.1]:44068 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dKVyU-0000XG-RH for submit@debbugs.gnu.org; Mon, 12 Jun 2017 16:30:11 -0400 Received: from eggs.gnu.org ([208.118.235.92]:45795) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dKVyU-0000WA-4q for 26339@debbugs.gnu.org; Mon, 12 Jun 2017 16:30:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dKVyK-00074Y-62 for 26339@debbugs.gnu.org; Mon, 12 Jun 2017 16:30:05 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=BAYES_40,T_RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:58691) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dKVyK-00074E-2E; Mon, 12 Jun 2017 16:30:00 -0400 Received: from reverse-83.fdn.fr ([80.67.176.83]:60898 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1dKVyJ-0000To-CC; Mon, 12 Jun 2017 16:29:59 -0400 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) To: Mathieu Othacehe Subject: Re: bug#26339: [PATCH] tests: Add syslinux gpt test. References: <20170402134916.2871-1-m.othacehe@gmail.com> <20170518102618.24842-1-m.othacehe@gmail.com> Date: Mon, 12 Jun 2017 22:29:57 +0200 In-Reply-To: <20170518102618.24842-1-m.othacehe@gmail.com> (Mathieu Othacehe's message of "Thu, 18 May 2017 12:26:18 +0200") Message-ID: <87mv9d3q62.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 26339 Cc: 26339@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: -5.0 (-----) Mathieu Othacehe skribis: > * gnu/tests/install.scm (%test-installed-syslinux-os): New exported > variable. > (%minimal-syslinux-os, %minimal-syslinux-os-source): New variables. > (%syslinux-gpt-installation-script): New variable. > * gnu/system/install.scm (installation-os)[packages]: Add syslinux. Awesome! It=E2=80=99s really helpful, a good way to avoid bitrot. > --- a/gnu/system/install.scm > +++ b/gnu/system/install.scm > @@ -343,6 +343,7 @@ Use Alt-F2 for documentation. > (packages (cons* (canonical-package glibc) ;for 'tzselect' & co. > parted gptfdisk ddrescue > grub ;mostly so xrefs to its manua= l work > + syslinux I don=E2=80=99t think we should provide =E2=80=98syslinux=E2=80=99 in the i= nstallation image. The image is already fat enough. > +(define-os-with-source (%minimal-syslinux-os > + %minimal-syslinux-os-source) I think you can=E2=80=99t really avoid duplication because =E2=80=98define-os-with-source=E2=80=99 needs to see the full source. You = could remove the unnecessary bits like =E2=80=98users=E2=80=99 though. > +(define %syslinux-gpt-installation-script > + ;; Shell script of a simple installation. > + ;; As syslinux 6.0.3 does not handle 64bits ext4 partitions, > + ;; we make sure to pass -O '^64bit' to mkfs. Really? Woow. > +(define %test-installed-syslinux-os > + (system-test > + (name "installed-syslinux-os") > + (description > + "...") Please expound a bit. :-) Otherwise LGTM, thank you! Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Mon Jun 12 16:33:05 2017 Received: (at 26339) by debbugs.gnu.org; 12 Jun 2017 20:33:05 +0000 Received: from localhost ([127.0.0.1]:44077 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dKW1J-0000bb-JJ for submit@debbugs.gnu.org; Mon, 12 Jun 2017 16:33:05 -0400 Received: from eggs.gnu.org ([208.118.235.92]:46417) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dKW1H-0000b0-Sa for 26339@debbugs.gnu.org; Mon, 12 Jun 2017 16:33:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dKW17-0007rC-Up for 26339@debbugs.gnu.org; Mon, 12 Jun 2017 16:32:58 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,T_RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:58734) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dKW17-0007r3-RH; Mon, 12 Jun 2017 16:32:53 -0400 Received: from reverse-83.fdn.fr ([80.67.176.83]:60900 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1dKW17-0003YG-2e; Mon, 12 Jun 2017 16:32:53 -0400 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) To: Mathieu Othacehe Subject: Re: bug#26339: [PATCH] scripts: system: Handle unspecified bootloader package and installer. References: <20170402134916.2871-1-m.othacehe@gmail.com> <20170521135715.14374-1-m.othacehe@gmail.com> Date: Mon, 12 Jun 2017 22:32:50 +0200 In-Reply-To: <20170521135715.14374-1-m.othacehe@gmail.com> (Mathieu Othacehe's message of "Sun, 21 May 2017 15:57:15 +0200") Message-ID: <87h8zl3q19.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 26339 Cc: 26339@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: -5.0 (-----) Mathieu Othacehe skribis: > * guix/scripts/system.system (perform-action): If bootloader installer or > bootloader package are #f, do not add them to drvs but keep things goin= g. > > This allows to write (installer #f) or (package #f) in > definition. > > Reported-by: Cl=C3=A9ment Lassieur . What=E2=80=99s the point of setting these to #f? If really needed, I would rather set them to (const #f) and avoid the special case in (guix scripts system). WDYT? Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Tue Jun 13 01:07:19 2017 Received: (at 26339) by debbugs.gnu.org; 13 Jun 2017 05:07:19 +0000 Received: from localhost ([127.0.0.1]:44247 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dKe2w-0000kK-Sy for submit@debbugs.gnu.org; Tue, 13 Jun 2017 01:07:19 -0400 Received: from dd1012.kasserver.com ([85.13.128.8]:60892) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dKe2u-0000kC-NL for 26339@debbugs.gnu.org; Tue, 13 Jun 2017 01:07:17 -0400 Received: from localhost (77.118.174.151.wireless.dyn.drei.com [77.118.174.151]) by dd1012.kasserver.com (Postfix) with ESMTPSA id 7BA3C1CA0799; Tue, 13 Jun 2017 07:07:14 +0200 (CEST) Date: Tue, 13 Jun 2017 07:07:11 +0200 From: Danny Milosavljevic To: ludo@gnu.org (Ludovic =?ISO-8859-1?Q?Court=E8s?=) Subject: Re: "extlinux", "extlinux" gpt, bootloader-configuration without package nor installer Message-ID: <20170613070711.37377dea@scratchpost.org> In-Reply-To: <874lvl555l.fsf@gnu.org> References: <20170402134916.2871-1-m.othacehe@gmail.com> <20170610085327.1353-1-m.othacehe@gmail.com> <87lgozyl52.fsf@gnu.org> <8760g2oqzc.fsf@gmail.com> <20170611115457.72395d51@scratchpost.org> <874lvl555l.fsf@gnu.org> X-Mailer: Claws Mail 3.14.1 (GTK+ 2.24.31; x86_64-unknown-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 26339 Cc: 26339@debbugs.gnu.org, Mathieu Othacehe 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.7 (/) Hi Ludo, On Mon, 12 Jun 2017 22:20:54 +0200 ludo@gnu.org (Ludovic Court=C3=A8s) wrote: > If =E2=80=9Cextlinux=E2=80=9D is just the name of the configuration file = format,=20 It depends. Syslinux-the-website thinks extlinux is the entire bootloader. And https://fedoraproject.org//wiki/Changes/u-boot_syslinux which is a trac= king page for adding support for extlinux.conf to u-boot (back then) says "= syslinux style configuration files". So we can also keep it as Mathieu intended and just overwrite the installer= for u-boot. Looks good to me. >Given that the configuration file syntax is similar but presumably not ide= ntical (?)=20 u-boot doesn't support the entire format. For example it can't currently d= o submenus. But the idea with the above Fedora change was to use the same = extlinux.conf for ARM and x86_64. No idea whether they are actually using = a subset still. >and that it=E2=80=99s fairly simple, it may be best to simply have >both =E2=80=98extlinux-configuration-file=E2=80=99 and =E2=80=98u-boot-con= figuration-file=E2=80=99. >It=E2=80=99s a case where factorization is probably a bad idea. After looking into it some more, I'm fine with any of the ways to proceed a= nd defer the decision to Mathieu. At first I thought it would be clearer if we had the extlinux.conf file wri= ter common (also PXEboot and other things use it in the wild) - but it's no= t that bad to duplicated it. Maybe a little opaque and the different write= rs would probably diverge on accident as we added features - but if we were= careful it would be OK. From debbugs-submit-bounces@debbugs.gnu.org Tue Jun 13 10:34:29 2017 Received: (at 26339) by debbugs.gnu.org; 13 Jun 2017 14:34:29 +0000 Received: from localhost ([127.0.0.1]:46064 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dKmtk-0004hS-LT for submit@debbugs.gnu.org; Tue, 13 Jun 2017 10:34:29 -0400 Received: from dd1012.kasserver.com ([85.13.128.8]:34352) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dKmtf-0004hH-Ht for 26339@debbugs.gnu.org; Tue, 13 Jun 2017 10:34:24 -0400 Received: from localhost (77.118.140.169.wireless.dyn.drei.com [77.118.140.169]) by dd1012.kasserver.com (Postfix) with ESMTPSA id 44AEC1CA02CA; Tue, 13 Jun 2017 16:34:17 +0200 (CEST) Date: Tue, 13 Jun 2017 16:34:12 +0200 From: Danny Milosavljevic To: Mathieu Othacehe Subject: Re: bug#26339: [PATCH] bootloader: extlinux: Add extlinux-bootloader-gpt. Message-ID: <20170613163412.3aac9e95@scratchpost.org> In-Reply-To: <20170518101326.11450-1-m.othacehe@gmail.com> References: <20170402134916.2871-1-m.othacehe@gmail.com> <20170518101326.11450-1-m.othacehe@gmail.com> X-Mailer: Claws Mail 3.14.1 (GTK+ 2.24.31; x86_64-unknown-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Score: 2.4 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: LGTM! [...] Content analysis details: (2.4 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [85.13.128.8 listed in list.dnswl.org] 3.1 BODY_SINGLE_WORD Message body is only one word (no spaces) X-Debbugs-Envelope-To: 26339 Cc: 26339@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: 2.4 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: LGTM! [...] Content analysis details: (2.4 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [85.13.128.8 listed in list.dnswl.org] 0.0 TVD_SPACE_RATIO No description available. 3.1 BODY_SINGLE_WORD Message body is only one word (no spaces) LGTM! From debbugs-submit-bounces@debbugs.gnu.org Tue Jun 13 13:52:50 2017 Received: (at 26339) by debbugs.gnu.org; 13 Jun 2017 17:52:50 +0000 Received: from localhost ([127.0.0.1]:46193 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dKpzl-0004N6-Rf for submit@debbugs.gnu.org; Tue, 13 Jun 2017 13:52:49 -0400 Received: from mail-wr0-f195.google.com ([209.85.128.195]:35018) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dKpzk-0004Mu-9D for 26339@debbugs.gnu.org; Tue, 13 Jun 2017 13:52:48 -0400 Received: by mail-wr0-f195.google.com with SMTP id z45so1666456wrb.2 for <26339@debbugs.gnu.org>; Tue, 13 Jun 2017 10:52:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=references:user-agent:from:to:cc:subject:in-reply-to:date :message-id:mime-version:content-transfer-encoding; bh=FT8adtwj7dzm7NYJY2ne5wWagmfEZCdDx0Rmhddn6Tc=; b=fX/nMPN3hKvBFvuuPxvqh0KemIcNfBGQ0ZUSGopkeTvN8jtmSFWUcZY4nPOgRSFsQi ZhllSo8XgNtk3WGoS6baYX4Gor+kgOdEgSwh9fOuIFfdN31HOgybVdKxniD8Ua76dKLb ci5oKlqbmqFWc2JbfOHlNYrBJx1q3A6NovLpqgPfaljJ+h8fZz+XeLcqOUXmTv0KNeKw DNEuo/rlHn8wa5G/F26w0gXfb+i+J9jlfP4eKEq9HY0onLdkpBBNfnH9irKgRZTdA+QP 4aJD1qVv+ApHaMxvK07P8N7Z7sGDto/DUYIBYYT+rwzBuJtuP5ofGxlBE94svfBI2JT6 2ePg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:references:user-agent:from:to:cc:subject :in-reply-to:date:message-id:mime-version:content-transfer-encoding; bh=FT8adtwj7dzm7NYJY2ne5wWagmfEZCdDx0Rmhddn6Tc=; b=pTl5yJbNonsFVuymDTX60ctGKqRlk0Ki7sydhiV82C+phSBmBHrxick6YK0Mgt5O43 LfKIyAE8WW9Gmen9zqW1TbCWGukp5svwFUy2naG6FmSsp93iNrAkqoFMQH7iOlIAdAJl +AdOKsNde+RKcq+kgx7pY4aP0XGDjEoWbdqx7oQJZ3ThA2/AivwC7cub9oKo9lejh/wj QVOu7Z7N/0VSkomx/U7zO4/C6h3/TJZxFo3vG17mLKcv1ghj9MEJK8A+7ocCrN2poDjq JpqC9isqnuz/kMSXDYYMFasr9G9Glz699QjUA1oiqqUYJiqgFw5jm5VLd7v0IW5VLzJ2 0ztg== X-Gm-Message-State: AKS2vOwE/69bTcMx/ZxlriCXYLKANCkFZQIm0IOtzFCm5h/o8Kj1Yg5Q z+BIMpEFIS5mstDl X-Received: by 10.223.152.212 with SMTP id w78mr4227120wrb.64.1497376362107; Tue, 13 Jun 2017 10:52:42 -0700 (PDT) Received: from cervin (85-169-37-239.rev.numericable.fr. [85.169.37.239]) by smtp.gmail.com with ESMTPSA id l70sm11333088wmd.3.2017.06.13.10.52.41 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 13 Jun 2017 10:52:41 -0700 (PDT) References: <20170402134916.2871-1-m.othacehe@gmail.com> <20170518101326.11450-1-m.othacehe@gmail.com> <87wp8h3qhe.fsf@gnu.org> User-agent: mu4e 0.9.18; emacs 25.2.1 From: Mathieu Othacehe To: Ludovic =?utf-8?Q?Court=C3=A8s?= Subject: Re: bug#26339: [PATCH] bootloader: extlinux: Add extlinux-bootloader-gpt. In-reply-to: <87wp8h3qhe.fsf@gnu.org> Date: Tue, 13 Jun 2017 19:52:40 +0200 Message-ID: <87lgov3hcn.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 26339 Cc: 26339@debbugs.gnu.org, Danny Milosavljevic 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.0 (/) Hi Ludo, > So let’s have a separate (gnu bootloaders syslinux) module like Danny > and I suggested, and let’s keep extlinux.scm focused on just the > extlinux file format. Sounds good to you? Well I'm quite sure that extlinux is more than a file format, it's a bootloader per-se. Danny seems to agree after digging it up. So I'd like to commit this patch as is. Thanks, Mathieu From debbugs-submit-bounces@debbugs.gnu.org Wed Jun 14 03:37:36 2017 Received: (at 26339) by debbugs.gnu.org; 14 Jun 2017 07:37:36 +0000 Received: from localhost ([127.0.0.1]:46619 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dL2rv-0006GT-RX for submit@debbugs.gnu.org; Wed, 14 Jun 2017 03:37:36 -0400 Received: from eggs.gnu.org ([208.118.235.92]:49640) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dL2rt-0006GG-GX for 26339@debbugs.gnu.org; Wed, 14 Jun 2017 03:37:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dL2rj-00006j-AT for 26339@debbugs.gnu.org; Wed, 14 Jun 2017 03:37:28 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-0.5 required=5.0 tests=BAYES_05,T_RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:57340) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dL2rj-00006a-7A; Wed, 14 Jun 2017 03:37:23 -0400 Received: from reverse-83.fdn.fr ([80.67.176.83]:33432 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1dL2ri-00081u-7n; Wed, 14 Jun 2017 03:37:22 -0400 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) To: Mathieu Othacehe Subject: Re: bug#26339: [PATCH] bootloader: extlinux: Add extlinux-bootloader-gpt. References: <20170402134916.2871-1-m.othacehe@gmail.com> <20170518101326.11450-1-m.othacehe@gmail.com> <87wp8h3qhe.fsf@gnu.org> <87lgov3hcn.fsf@gmail.com> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 26 Prairial an 225 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-unknown-linux-gnu Date: Wed, 14 Jun 2017 09:37:18 +0200 In-Reply-To: <87lgov3hcn.fsf@gmail.com> (Mathieu Othacehe's message of "Tue, 13 Jun 2017 19:52:40 +0200") Message-ID: <87efunt3yp.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 26339 Cc: 26339@debbugs.gnu.org, Danny Milosavljevic 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: -5.0 (-----) Mathieu Othacehe skribis: >> So let=E2=80=99s have a separate (gnu bootloaders syslinux) module like = Danny >> and I suggested, and let=E2=80=99s keep extlinux.scm focused on just the >> extlinux file format. Sounds good to you? > > Well I'm quite sure that extlinux is more than a file format, it's a > bootloader per-se. Danny seems to agree after digging it up. So I'd like > to commit this patch as is. OK then, makes sense (modulo the other comments). I was surprised to see the naming situation was this confused. :-) Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Mon Jun 19 12:55:14 2017 Received: (at 26339) by debbugs.gnu.org; 19 Jun 2017 16:55:14 +0000 Received: from localhost ([127.0.0.1]:56461 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dMzxJ-00058v-MJ for submit@debbugs.gnu.org; Mon, 19 Jun 2017 12:55:13 -0400 Received: from mail-wr0-f171.google.com ([209.85.128.171]:33396) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dMzxI-00058h-Jl for 26339@debbugs.gnu.org; Mon, 19 Jun 2017 12:55:13 -0400 Received: by mail-wr0-f171.google.com with SMTP id r103so78165089wrb.0 for <26339@debbugs.gnu.org>; Mon, 19 Jun 2017 09:55:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=references:user-agent:from:to:cc:subject:in-reply-to:date :message-id:mime-version; bh=ZHhqQmHCfMwctXT2XCDAFILqyJcdgSJvtTzAAy0Nsm4=; b=PaB+DtpzDlZWSZCkAun9kYh7SRKqDTrO7S2Du9CmBY5TCxM9jJm3pv1s2uiutKDZjj BffGDyJCISz6vPgirRERyaLBU3D6FwQ72ROfQQhlf5EDCgSRVYMt36bfT+O9z/rzC+CS fLYknI4aMcZ/zf7qVGEHP9JH/O4OiJj8/W5SdLoCc2np7DkJNliUMEokMVywr6Cfs6tC DycA3Vr6Hr/JeWTsS3f4qfXHONjSTH/4j860Bx6DnlLkz14KO+HVZoyhaYnsjb1S3vpU B9yEX4W+R3DxHzt2rRbxs+TA2DS84o7BdlXK3iJ3qoviDBSoJmzKUKcADwYyGXpLA6a1 1UZA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:references:user-agent:from:to:cc:subject :in-reply-to:date:message-id:mime-version; bh=ZHhqQmHCfMwctXT2XCDAFILqyJcdgSJvtTzAAy0Nsm4=; b=E9yzy4iSrvj+YCX+IQNnu9jTpQj2mZe5IWg8e5fzeUqvIBuTgB7NSIbJjVBQJomcYD uJz7IB4rXgCdAnFqmqfJ2hCDlH9H/rX5F2+ZE5nF3ivBq4R72ZLRddw79PJauVuONP2P 8UZDVtMZ7TqY5DDX//cwftXlgrWoP60vPuX1siFHn2y6pcVS49ixCUOjJBgAnQR2ep8h kmJyc3R39zbhEiKsOQSsjDY4LfYQC4vIKjOfufRjW7dqrAGGljE5H1FvzWsoIyNF4sm1 vyPk9EWo44UbQRo4CHpsey2fhf/jhFEVH7nGfMaY1LenrNPuccPQ3AW7ho4GZNuRizLW NZ1Q== X-Gm-Message-State: AKS2vOyO7qoXT5ih24TUO9cIeOwR08eJASnJwJaNK2BiZCwVI9e9weai fvTaUvPgtvYHfwUZ X-Received: by 10.223.160.45 with SMTP id k42mr8212622wrk.121.1497891306553; Mon, 19 Jun 2017 09:55:06 -0700 (PDT) Received: from cervin (85-169-37-239.rev.numericable.fr. [85.169.37.239]) by smtp.gmail.com with ESMTPSA id 194sm11379664wmx.27.2017.06.19.09.55.05 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 19 Jun 2017 09:55:05 -0700 (PDT) References: <20170402134916.2871-1-m.othacehe@gmail.com> <20170518102618.24842-1-m.othacehe@gmail.com> <87mv9d3q62.fsf@gnu.org> User-agent: mu4e 0.9.18; emacs 25.2.1 From: Mathieu Othacehe To: Ludovic =?utf-8?Q?Court=C3=A8s?= Subject: Re: bug#26339: [PATCH] tests: Add syslinux gpt test. In-reply-to: <87mv9d3q62.fsf@gnu.org> Date: Mon, 19 Jun 2017 18:55:04 +0200 Message-ID: <87lgonkjdj.fsf@gmail.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: -1.0 (-) X-Debbugs-Envelope-To: 26339 Cc: 26339@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.0 (-) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Hi Ludo, > I don’t think we should provide ‘syslinux’ in the installation image. > The image is already fat enough. Yep you're right, I added it without really understanding why it has necessary for the test to succeed. Now I understand why, it's because the image has no network access, so every package that will be needed further has to be specified. I add a packages list to "run-install" to solve this issue. Thanks, Mathieu --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0001-tests-Add-extlinux-gpt-test.patch >From 7cf07ec0e909d99030e2646db9fdfef09d655316 Mon Sep 17 00:00:00 2001 From: Mathieu Othacehe Date: Thu, 18 May 2017 12:19:53 +0200 Subject: [PATCH] tests: Add extlinux gpt test. * gnu/tests/install.scm (%test-installed-extlinux-os): New exported variable. (%minimal-extlinux-os, %minimal-extlinux-os-source): New variables. (%extlinux-gpt-installation-script): New variable. --- gnu/tests/install.scm | 92 +++++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 86 insertions(+), 6 deletions(-) diff --git a/gnu/tests/install.scm b/gnu/tests/install.scm index b104efcfd..7c5d48104 100644 --- a/gnu/tests/install.scm +++ b/gnu/tests/install.scm @@ -18,12 +18,14 @@ (define-module (gnu tests install) #:use-module (gnu) + #:use-module (gnu bootloader extlinux) #:use-module (gnu tests) #:use-module (gnu tests base) #:use-module (gnu system) #:use-module (gnu system install) #:use-module (gnu system vm) #:use-module ((gnu build vm) #:select (qemu-command)) + #:use-module (gnu packages bootloaders) #:use-module (gnu packages ocr) #:use-module (gnu packages qemu) #:use-module (gnu packages package-management) @@ -34,6 +36,7 @@ #:use-module (guix gexp) #:use-module (guix utils) #:export (%test-installed-os + %test-installed-extlinux-os %test-separate-store-os %test-separate-home-os %test-raid-root-os @@ -77,6 +80,38 @@ (guix combinators))))) %base-services)))) +(define (operating-system-add-packages os packages) + "Append PACKAGES to OS packages list." + (operating-system + (inherit os) + (packages (append packages (operating-system-packages os))))) + +(define-os-with-source (%minimal-extlinux-os + %minimal-extlinux-os-source) + (use-modules (gnu) (gnu tests) (gnu bootloader extlinux) + (srfi srfi-1)) + + (operating-system + (host-name "liberigilo") + (timezone "Europe/Paris") + (locale "en_US.UTF-8") + + (bootloader (bootloader-configuration + (bootloader extlinux-bootloader-gpt) + (device "/dev/vdb"))) + (kernel-arguments '("console=ttyS0")) + (file-systems (cons (file-system + (device "my-root") + (title 'label) + (mount-point "/") + (type "ext4")) + %base-file-systems)) + (services (cons (service marionette-service-type + (marionette-configuration + (imported-modules '((gnu services herd) + (guix combinators))))) + %base-services)))) + (define (operating-system-with-current-guix os) "Return a variant of OS that uses the current Guix." (operating-system @@ -121,23 +156,51 @@ guix system init /mnt/etc/config.scm /mnt --no-substitutes sync reboot\n") +(define %extlinux-gpt-installation-script + ;; Shell script of a simple installation. + ;; As syslinux 6.0.3 does not handle 64bits ext4 partitions, + ;; we make sure to pass -O '^64bit' to mkfs. + "\ +. /etc/profile +set -e -x +guix --version + +export GUIX_BUILD_OPTIONS=--no-grafts +guix build isc-dhcp +parted --script /dev/vdb mklabel gpt \\ + mkpart ext2 1M 1G \\ + set 1 legacy_boot on +mkfs.ext4 -L my-root -O '^64bit' /dev/vdb1 +mount /dev/vdb1 /mnt +df -h /mnt +herd start cow-store /mnt +mkdir /mnt/etc +cp /etc/target-config.scm /mnt/etc/config.scm +guix system init /mnt/etc/config.scm /mnt --no-substitutes +sync +reboot\n") + (define* (run-install target-os target-os-source #:key (script %simple-installation-script) + (packages '()) (os (marionette-operating-system - ;; Since the image has no network access, use the - ;; current Guix so the store items we need are in - ;; the image. (operating-system - (inherit (operating-system-with-current-guix - installation-os)) + ;; Since the image has no network access, use the + ;; current Guix so the store items we need are in + ;; the image and add packages provided. + (inherit (operating-system-add-packages + (operating-system-with-current-guix + installation-os) + packages)) (kernel-arguments '("console=ttyS0"))) #:imported-modules '((gnu services herd) (guix combinators)))) (target-size (* 1200 MiB))) "Run SCRIPT (a shell script following the GuixSD installation procedure) in OS to install TARGET-OS. Return a VM image of TARGET-SIZE bytes containing -the installed system." +the installed system. The packages specified in PACKAGES will be appended to +packages defined in installation-os." (mlet* %store-monad ((_ (set-grafting #f)) (system (current-system)) @@ -232,6 +295,23 @@ build (current-guix) and then store a couple of full system images.") (run-basic-test %minimal-os command "installed-os"))))) +(define %test-installed-extlinux-os + (system-test + (name "installed-extlinux-os") + (description + "Test basic functionality of an OS booted with an extlinux bootloader. As +per %test-installed-os, this test is expensive in terms of CPU and storage.") + (value + (mlet* %store-monad ((image (run-install %minimal-extlinux-os + %minimal-extlinux-os-source + #:packages + (list syslinux) + #:script + %extlinux-gpt-installation-script)) + (command (qemu-command/writable-image image))) + (run-basic-test %minimal-extlinux-os command + "installed-extlinux-os"))))) + ;;; ;;; Separate /home. -- 2.13.1 --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Tue Jun 20 16:14:05 2017 Received: (at 26339) by debbugs.gnu.org; 20 Jun 2017 20:14:05 +0000 Received: from localhost ([127.0.0.1]:58478 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dNPXI-0001U2-S1 for submit@debbugs.gnu.org; Tue, 20 Jun 2017 16:14:05 -0400 Received: from eggs.gnu.org ([208.118.235.92]:56098) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dNPXG-0001TR-U4 for 26339@debbugs.gnu.org; Tue, 20 Jun 2017 16:14:03 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dNPX6-0004V2-H8 for 26339@debbugs.gnu.org; Tue, 20 Jun 2017 16:13:57 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=BAYES_20,T_RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:45040) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dNPX6-0004Uy-Ds; Tue, 20 Jun 2017 16:13:52 -0400 Received: from reverse-83.fdn.fr ([80.67.176.83]:54526 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1dNPX5-0008Vx-Nz; Tue, 20 Jun 2017 16:13:52 -0400 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) To: Mathieu Othacehe Subject: Re: bug#26339: [PATCH] tests: Add syslinux gpt test. References: <20170402134916.2871-1-m.othacehe@gmail.com> <20170518102618.24842-1-m.othacehe@gmail.com> <87mv9d3q62.fsf@gnu.org> <87lgonkjdj.fsf@gmail.com> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 2 Messidor an 225 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-unknown-linux-gnu Date: Tue, 20 Jun 2017 22:13:49 +0200 In-Reply-To: <87lgonkjdj.fsf@gmail.com> (Mathieu Othacehe's message of "Mon, 19 Jun 2017 18:55:04 +0200") Message-ID: <87tw3al8n6.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -3.4 (---) X-Debbugs-Envelope-To: 26339 Cc: 26339@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.4 (---) Hello! Mathieu Othacehe skribis: >> I don=E2=80=99t think we should provide =E2=80=98syslinux=E2=80=99 in th= e installation image. >> The image is already fat enough. > > Yep you're right, I added it without really understanding why it has > necessary for the test to succeed. > > Now I understand why, it's because the image has no network access, so > every package that will be needed further has to be specified. I add a > packages list to "run-install" to solve this issue. Sounds good. > From 7cf07ec0e909d99030e2646db9fdfef09d655316 Mon Sep 17 00:00:00 2001 > From: Mathieu Othacehe > Date: Thu, 18 May 2017 12:19:53 +0200 > Subject: [PATCH] tests: Add extlinux gpt test. > > * gnu/tests/install.scm (%test-installed-extlinux-os): New exported > variable. > (%minimal-extlinux-os, %minimal-extlinux-os-source): New variables. > (%extlinux-gpt-installation-script): New variable. ^^ Extra space. :-) Please also mention the =E2=80=98run-install=E2=80=99 change. Otherwise LGTM, thanks for taking the time to write this test! Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Wed Jun 21 04:06:01 2017 Received: (at 26339) by debbugs.gnu.org; 21 Jun 2017 08:06:01 +0000 Received: from localhost ([127.0.0.1]:58812 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dNaeH-0006Pq-DW for submit@debbugs.gnu.org; Wed, 21 Jun 2017 04:06:01 -0400 Received: from mail-wr0-f182.google.com ([209.85.128.182]:35151) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dNaeG-0006PW-Fe for 26339@debbugs.gnu.org; Wed, 21 Jun 2017 04:06:00 -0400 Received: by mail-wr0-f182.google.com with SMTP id y25so84378016wrd.2 for <26339@debbugs.gnu.org>; Wed, 21 Jun 2017 01:06:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=references:user-agent:from:to:cc:subject:in-reply-to:date :message-id:mime-version; bh=MeUqDW/eyRmBR20DaGfx+aK9BdjB9eMkPetoIyH9Ct0=; b=qJAUxF06wr0q7Em2rwnzD1BIohsEduQUJ3xJsd8bYj7iwt+TuOIY/EISEZvBB75w2m JqaCWCgLxx5zx3OesQp5YcC/9ZrVe0oA+kM5EXOGM4siDSDm+2vIDuKxHI0c2+ZQQmrB j9ifeG2XVPfq6dlDKuI/OogSe5dYyNrGWVAVPL/DUELzvMnheH69B0sBX+QLn+1zbONd O2uZsV5M/5feTCiAaPtsxWX9Ktleusj4xlcjfaNGXA6xFVahBNaNd+bIdOCIrpTcqLFv rPSmLQtCLLRiSqWzLzA1wzhGNOKAgErm4zp66tgTJI7xnCMICK2f34gYxUXOBe5SeVys +p7w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:references:user-agent:from:to:cc:subject :in-reply-to:date:message-id:mime-version; bh=MeUqDW/eyRmBR20DaGfx+aK9BdjB9eMkPetoIyH9Ct0=; b=ssZPG1omXH7yPugv74af7SIXLv7K+SWtl9VWCywXvMDrXRkJ73vjH/a/Z6bPpqAIt5 5U0MR46n8PlA6c5OvWAqvSMTT+XppdzCBPK1jku6M7+TJ2vqUBM18l2Xw4VCTHg2fzGU nppx0RXVdKkouK6X7YLRH4+g1MIzI1gK1f+SA6TR0dA7Wkw21J8VmXnqAwaEGWpah2VV cidXdGq3W+H8J92l1JEum3UK3DUMgItE4iunva1MQZhpq9iB25Xi+aBuRQtgSmOi+Hpx Z316j3X2Pmr0APE+BY+Hs5H0CajqAfWjGcrOu+t215HFACDdCQ+W/h3+tBH8t/Z1wy3d HqMQ== X-Gm-Message-State: AKS2vOzSnm2bCgg39H8/sZOYSlB3mkMXnuv5Ra/2c3k4gYPyu7g4hp9Y XgToDA8wSd71DcmT X-Received: by 10.28.174.6 with SMTP id x6mr5686393wme.12.1498032354419; Wed, 21 Jun 2017 01:05:54 -0700 (PDT) Received: from zbook ([46.218.109.88]) by smtp.gmail.com with ESMTPSA id u80sm17759230wrb.1.2017.06.21.01.05.52 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 21 Jun 2017 01:05:53 -0700 (PDT) References: <20170402134916.2871-1-m.othacehe@gmail.com> <20170518102618.24842-1-m.othacehe@gmail.com> <87mv9d3q62.fsf@gnu.org> <87lgonkjdj.fsf@gmail.com> <87tw3al8n6.fsf@gnu.org> User-agent: mu4e 0.9.18; emacs 25.2.1 From: Mathieu Othacehe To: Ludovic =?utf-8?Q?Court=C3=A8s?= Subject: Re: bug#26339: [PATCH] tests: Add syslinux gpt test. In-reply-to: <87tw3al8n6.fsf@gnu.org> Date: Wed, 21 Jun 2017 10:05:57 +0200 Message-ID: <86o9th22ai.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -1.0 (-) X-Debbugs-Envelope-To: 26339 Cc: 26339@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.0 (-) Hi Ludo, > Otherwise LGTM, thanks for taking the time to write this test! Thanks for the review I pushed those two patches as dbaef95 and a48a20fb. For the last one (#f package and installer), I have to give it some thought. Mathieu From debbugs-submit-bounces@debbugs.gnu.org Wed Oct 04 10:56:09 2017 Received: (at 26339) by debbugs.gnu.org; 4 Oct 2017 14:56:09 +0000 Received: from localhost ([127.0.0.1]:49036 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dzl5l-0002M5-FT for submit@debbugs.gnu.org; Wed, 04 Oct 2017 10:56:09 -0400 Received: from eggs.gnu.org ([208.118.235.92]:60087) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dzl5k-0002Lt-Fr for 26339@debbugs.gnu.org; Wed, 04 Oct 2017 10:56:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dzl5e-0006ml-CR for 26339@debbugs.gnu.org; Wed, 04 Oct 2017 10:56:03 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD, URIBL_BLOCKED autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:58210) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dzl5e-0006mf-7f; Wed, 04 Oct 2017 10:56:02 -0400 Received: from [2a01:e0a:1d:7270:6a6c:dc17:fc02:cfda] (port=53044 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1dzl5d-0003tE-Db; Wed, 04 Oct 2017 10:56:02 -0400 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) To: Danny Milosavljevic , Mathieu Othacehe Subject: Re: [bug#26339] "extlinux", "extlinux" gpt, bootloader-configuration without package nor installer References: <20170402134916.2871-1-m.othacehe@gmail.com> <20170610085327.1353-1-m.othacehe@gmail.com> <87lgozyl52.fsf@gnu.org> <8760g2oqzc.fsf@gmail.com> <20170611115457.72395d51@scratchpost.org> <874lvl555l.fsf@gnu.org> <20170613070711.37377dea@scratchpost.org> Date: Wed, 04 Oct 2017 16:55:57 +0200 In-Reply-To: <20170613070711.37377dea@scratchpost.org> (Danny Milosavljevic's message of "Tue, 13 Jun 2017 07:07:11 +0200") Message-ID: <87zi9755du.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 26339 Cc: 26339@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: -5.0 (-----) Hello Danny & Mathieu! So we=E2=80=99ve had this huge thread at , and I think the important bits were applied some time ago already. Are we still missing something? If yes, should we close this issue and open a new one with a clear focus? (BTW, too bad we missed your talk at the GHM, Mathieu! ;-)) Thanks, Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Wed Oct 04 15:56:37 2017 Received: (at 26339) by debbugs.gnu.org; 4 Oct 2017 19:56:38 +0000 Received: from localhost ([127.0.0.1]:49261 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dzpmX-00051X-NO for submit@debbugs.gnu.org; Wed, 04 Oct 2017 15:56:37 -0400 Received: from mail-wr0-f181.google.com ([209.85.128.181]:45538) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dzpmW-00051J-Ea for 26339@debbugs.gnu.org; Wed, 04 Oct 2017 15:56:36 -0400 Received: by mail-wr0-f181.google.com with SMTP id m18so9421876wrm.2 for <26339@debbugs.gnu.org>; Wed, 04 Oct 2017 12:56:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=references:user-agent:from:to:cc:subject:in-reply-to:date :message-id:mime-version:content-transfer-encoding; bh=EWVKmCqtGAgVs0hfpRmOvoFro/mLdPI57UCW3Qp6i0g=; b=A3UIsffNI/SQxlt1c6iltalBS9HG4CceIKCpICMiH8rGbc6F9LA43hg8GzlZc3J1LQ syxjhr1Mge3O/Aoz+BFmjEAuDTko8bJG3hQxv/gcwAkOhBwWTtFRzBnuuhTSrnb500sL +tGCrRqmjmW5Dvue+WpgCeM5l6UxEcnn4Wkb3i8ZdfZwZzlm6Asv2YSWrpe63MbOxISe mRzH3weL9egqQHfN45eIMnsplj9fENUmRq4IDJ0gB/NyMOxVVpU4ohwyoIrTuZ8ZHRK5 /KkUb9KaFtNUAQ2eKJozY/GgNWcxzdaAFD4p623LiFoS8eBk0scrcLMgseLm8ok36Dcz nZOA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:references:user-agent:from:to:cc:subject :in-reply-to:date:message-id:mime-version:content-transfer-encoding; bh=EWVKmCqtGAgVs0hfpRmOvoFro/mLdPI57UCW3Qp6i0g=; b=nf5lmxkXpszFzGZjJDXFuHlH8fvYP5A3JPjOZUD9HD0BYQXujDUWpFtevfu0S+5C9v U1ChS1Y1YU+9EIn8TwrXlINAoOWxvTSxxy9tPYp7ucTNji5DId2+irJ2Bi5iv58RcE5Q Mi7wcqERSDc/rzaANc9jIOPB3rHq149ghhxRGkbTssltJ9Nr9DpcIjIkadVEsESRosJe PYGONXDxd1ph5HLSC2XUYxZeZi7l23VGHokvcWTnqvW0GLKNYUyX/vQg+ZgI4liE3QEp QHE+RsDpaZGRp1sXuyNCKOJSAxsyU79q15BGMCcBiC0HGcLArBI7QUvfKOfHF70wqGQu HAJA== X-Gm-Message-State: AHPjjUiDYAnkWfgrGZ4x2jG8as5fMLqJDpvqjuWmQkWgVbm4+wKZpGo0 wqB057DeB3kESwJ9SFh9TnytwQ== X-Google-Smtp-Source: AOwi7QCMshQ7yN50onxYX8+11r0IecyMmx7yFxusLaNaJCjnZJiijGhBhRycOkXwCDsdw0NZCwfXxw== X-Received: by 10.223.186.202 with SMTP id w10mr23443568wrg.132.1507146990303; Wed, 04 Oct 2017 12:56:30 -0700 (PDT) Received: from cervin ([78.192.96.126]) by smtp.gmail.com with ESMTPSA id k126sm31925912wmd.1.2017.10.04.12.56.28 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 04 Oct 2017 12:56:29 -0700 (PDT) References: <20170402134916.2871-1-m.othacehe@gmail.com> <20170610085327.1353-1-m.othacehe@gmail.com> <87lgozyl52.fsf@gnu.org> <8760g2oqzc.fsf@gmail.com> <20170611115457.72395d51@scratchpost.org> <874lvl555l.fsf@gnu.org> <20170613070711.37377dea@scratchpost.org> <87zi9755du.fsf@gnu.org> User-agent: mu4e 0.9.18; emacs 25.3.1 From: Mathieu Othacehe To: Ludovic =?utf-8?Q?Court=C3=A8s?= Subject: Re: [bug#26339] "extlinux", "extlinux" gpt, bootloader-configuration without package nor installer In-reply-to: <87zi9755du.fsf@gnu.org> Date: Wed, 04 Oct 2017 21:56:28 +0200 Message-ID: <87r2uin0ur.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.8 (--) X-Debbugs-Envelope-To: 26339 Cc: 26339@debbugs.gnu.org, Danny Milosavljevic 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.8 (--) Hey Ludo ! > So we’ve had this huge thread at , and I > think the important bits were applied some time ago already. > > Are we still missing something? If yes, should we close this issue and > open a new one with a clear focus? I think the topic has been covered, and we can close this issue. Is it ok for you Danny ? > > (BTW, too bad we missed your talk at the GHM, Mathieu! ;-)) Maybe next year ;) Mathieu From debbugs-submit-bounces@debbugs.gnu.org Fri Oct 13 10:09:02 2017 Received: (at 26339-done) by debbugs.gnu.org; 13 Oct 2017 14:09:02 +0000 Received: from localhost ([127.0.0.1]:38201 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e30e5-0002CW-PI for submit@debbugs.gnu.org; Fri, 13 Oct 2017 10:09:02 -0400 Received: from mail-wr0-f169.google.com ([209.85.128.169]:56184) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e30e3-0002C8-Ob for 26339-done@debbugs.gnu.org; Fri, 13 Oct 2017 10:09:00 -0400 Received: by mail-wr0-f169.google.com with SMTP id 22so1142369wrb.12 for <26339-done@debbugs.gnu.org>; Fri, 13 Oct 2017 07:08:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=user-agent:from:to:subject:date:message-id:mime-version; bh=UZExJ0JAyIL7vMx0SIKCV5f7yRbNWcwoSRlLy6W9qrI=; b=aTZPs2D/IT7zZ/XlaTzUhv2zXaskxXjkXh5su6j7d9O1QIpy2iERp1bYIFlECiiqJx PwludDma9yKQO53k4p4Aypsd/9WZwFjImnx6Ud/ecUMWdhruTil12CMBp/DeZJhqj0r8 901nT8TqHJEbMUok/Omx+T+Vdl8oVgUI2JITEAdNDjNatD9SfNWXd29JQRJmvYE0zcAK h1zEtdsLB2HWSa+L4FvMdDQFfdMXmYUeWo/TPyU4zfve/lR/xTzdpD2+zBmqstBLCkRq CunuIapxWQ0ptDLn937Tcy1hjm7/1ZhED1RBSeh9FFRQyzrddRznfgRwqPh6nU9KRGAy /jJg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:user-agent:from:to:subject:date:message-id :mime-version; bh=UZExJ0JAyIL7vMx0SIKCV5f7yRbNWcwoSRlLy6W9qrI=; b=O5xRvniqc+jzHXDDGBAaULS3Li9xo49I/x2sD6mhlt8AfJ5/ZRJJLg3VpZzqf2ht2i 5pNFNxpHJ0GC7qHVexVzafaHyNmf2G1NXYxSWMpwiLeCvmfiTlrGaybmT50q4SU4m9/+ kKrkdCuqNY4a2oAb5R4ds0vQFbq98dGQ0xrt0sJUG2hcCBfDzEMffmNTW1HtEoMDZNpv +gT2voS/hHy/EccpArKdKrEyn1N3uz6jX1NLC6uyXLVqE3/rz4Ur8NxX0w1exE6mkLjv eeAr2DzPgbgGrldhbwmUMwAfCAuVVPuaZVMr8dUWofDZjzcvh3gCzwMM/njHWFPwqwR+ 9H5g== X-Gm-Message-State: AMCzsaWR4d/5LNPpNfbwseiOTQuXcxYg5alRMsNxv2GP3Z/M17giB2Ne ACNatIG7CjIcN+4LLvmeXX/mfg== X-Google-Smtp-Source: AOwi7QB/8/3KMNNfRi1Dlk6w9KYijwVNT/vCUnHvlKP3oI8pXNiILWENpJd5RTToJvG8bHljSVRXww== X-Received: by 10.223.184.246 with SMTP id c51mr1691600wrg.250.1507903733815; Fri, 13 Oct 2017 07:08:53 -0700 (PDT) Received: from denali ([46.218.109.88]) by smtp.gmail.com with ESMTPSA id j73sm3845609wmf.15.2017.10.13.07.08.52 for <26339-done@debbugs.gnu.org> (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 13 Oct 2017 07:08:53 -0700 (PDT) User-agent: mu4e 0.9.18; emacs 25.2.1 From: Mathieu Othacehe To: 26339-done@debbugs.gnu.org Subject: closing bootloader serie. Date: Fri, 13 Oct 2017 16:08:52 +0200 Message-ID: <87d15rdtsb.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.8 (--) X-Debbugs-Envelope-To: 26339-done 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.8 (--) All the related patches are merged by now. Mathieu From debbugs-submit-bounces@debbugs.gnu.org Fri Oct 13 11:31:24 2017 Received: (at 26339) by debbugs.gnu.org; 13 Oct 2017 15:31:24 +0000 Received: from localhost ([127.0.0.1]:38263 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e31vn-0004Sn-SZ for submit@debbugs.gnu.org; Fri, 13 Oct 2017 11:31:23 -0400 Received: from hera.aquilenet.fr ([141.255.128.1]:53573) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e31vn-0004Sg-21 for 26339@debbugs.gnu.org; Fri, 13 Oct 2017 11:31:23 -0400 Received: from localhost (localhost [127.0.0.1]) by hera.aquilenet.fr (Postfix) with ESMTP id EF14D707E; Fri, 13 Oct 2017 17:31:21 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at aquilenet.fr Received: from hera.aquilenet.fr ([127.0.0.1]) by localhost (hera.aquilenet.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id u0B1FNO2pJxk; Fri, 13 Oct 2017 17:31:20 +0200 (CEST) Received: from ribbon (unknown [193.50.110.214]) by hera.aquilenet.fr (Postfix) with ESMTPSA id 7E8F89BA; Fri, 13 Oct 2017 17:31:20 +0200 (CEST) From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) To: 26339@debbugs.gnu.org Subject: Re: bug#26339: closing bootloader serie. References: <20170402134916.2871-1-m.othacehe@gmail.com> <87d15rdtsb.fsf@gmail.com> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 22 =?utf-8?Q?Vend=C3=A9miaire?= an 226 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: Fri, 13 Oct 2017 17:31:18 +0200 In-Reply-To: <87d15rdtsb.fsf@gmail.com> (Mathieu Othacehe's message of "Fri, 13 Oct 2017 16:08:52 +0200") Message-ID: <87d15rm5dl.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 26339 Cc: m.othacehe@gmail.com 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.0 (+) Mathieu Othacehe skribis: > All the related patches are merged by now. Woohoo! \o/ Thanks again for your tireless work, to you and Danny. Hopefully this will unlock GuixSD-on-ARM in the not-too-distant future? Cheers, Ludo'. From debbugs-submit-bounces@debbugs.gnu.org Thu Oct 26 05:43:41 2017 Received: (at 26339) by debbugs.gnu.org; 26 Oct 2017 09:43:41 +0000 Received: from localhost ([127.0.0.1]:33992 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e7ehR-0008PL-ID for submit@debbugs.gnu.org; Thu, 26 Oct 2017 05:43:41 -0400 Received: from mail-wr0-f172.google.com ([209.85.128.172]:56552) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e7ehQ-0008P7-4D for 26339@debbugs.gnu.org; Thu, 26 Oct 2017 05:43:40 -0400 Received: by mail-wr0-f172.google.com with SMTP id r79so2535923wrb.13 for <26339@debbugs.gnu.org>; Thu, 26 Oct 2017 02:43:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=references:user-agent:from:to:cc:subject:in-reply-to:date :message-id:mime-version; bh=TwF/N/DYkyBPa1MvN4xfWw0OqvfYUOV8KskqI4jJgn8=; b=u4RuzulvB1obViofNsE4Q5SrY+OVIeskYSeZgp1u/edzJpkcLP3HAJ+d4sQILp1bdw HKCr8ngOVTombr7L5JH5vKUzaq5oiwl6yIFsC3dAqakrlZqKsiAGPalmr9/jhYZoIyjQ ey5SW2ELWIm3Ub73XWvsjkSFGeZqfhm3tHrywZfJ5wzLboBBllcyBPMeOT7iCVkG/9nV TM5s1wHkl7fhqCQKO2RG0txEVXGWf3Wni4v3DsOVTIeJ7r1zSaRVMEc84xYlldllBd7y KekMdgtZEAAXgnouxVc/wAbO2mosI5Nadf9/aCD7595RPZjZbp4t2Oj6vIu0QrlFsYjG 5diw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:references:user-agent:from:to:cc:subject :in-reply-to:date:message-id:mime-version; bh=TwF/N/DYkyBPa1MvN4xfWw0OqvfYUOV8KskqI4jJgn8=; b=mhtXTHMPy0jk9g57TM5wyagHHEdzD/ISKPQZOEjSXCMKpyaTEcrE2PVA3d8wXuNAzY K4EF7omeGC0/4SsSGF2j0O2+xrTq3hng4row9uQqHKnavd/atuIu74hfw9Vlq8lvlgqb XgTI2OLYPbXVcYUKdpRfEWV2gC5QyD8isZUGjFV3a93IPBUywF0QEz9YLPRgk4F8oQhc w2HTS5gsVW9zOmmQLp5NYZeAK0YV47ZwkKTpx7UnHbwFIGr+jP3zAn6A8quhjI70YdaM 0UJNfopAWnhq5d2WGqhIzyR4dFcdYqEmnYG9S3Zq3C5mo68s69HtekuSoNreCmMm7L76 D1gg== X-Gm-Message-State: AMCzsaVwh0Lc9lW+/thtBS2pI8bY7aBHfD8SVy+FQvrYofAW43Wx4/F/ i4ZQQwK3gRvUAndaiRQ7HNggRw== X-Google-Smtp-Source: ABhQp+Rj0Fx3UtVfWwdoIxWvGT/hQhPuHjwWecLc+W49pl9EsiLFe0ZupplWu33DSS9RyVb/8iSiMA== X-Received: by 10.223.176.57 with SMTP id f54mr5280952wra.126.1509011014012; Thu, 26 Oct 2017 02:43:34 -0700 (PDT) Received: from denali ([46.218.109.88]) by smtp.gmail.com with ESMTPSA id p28sm1742028wmf.2.2017.10.26.02.43.32 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 26 Oct 2017 02:43:32 -0700 (PDT) References: <20170402134916.2871-1-m.othacehe@gmail.com> <87d15rdtsb.fsf@gmail.com> <87d15rm5dl.fsf@gnu.org> User-agent: mu4e 0.9.18; emacs 25.2.1 From: Mathieu Othacehe To: Ludovic =?utf-8?Q?Court=C3=A8s?= Subject: Re: bug#26339: closing bootloader serie. In-reply-to: <87d15rm5dl.fsf@gnu.org> Date: Thu, 26 Oct 2017 11:43:32 +0200 Message-ID: <87zi8e1by3.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.8 (--) X-Debbugs-Envelope-To: 26339 Cc: 26339@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: -2.8 (--) Hi Ludo, > Thanks again for your tireless work, to you and Danny. :) Thanks to you for your support. > Hopefully this will unlock GuixSD-on-ARM in the not-too-distant future? Actually, I'm trying to produce a disk-image for a beaglebone black board. The problem I have is that a lot of packages have to be built on native target and qemu is really slow. So I have a naive question : why can't I cross-compile everything when building a disk-image ? Thanks, Mathieu From debbugs-submit-bounces@debbugs.gnu.org Thu Oct 26 13:14:19 2017 Received: (at 26339) by debbugs.gnu.org; 26 Oct 2017 17:14:19 +0000 Received: from localhost ([127.0.0.1]:35369 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e7ljX-0008H4-4I for submit@debbugs.gnu.org; Thu, 26 Oct 2017 13:14:19 -0400 Received: from hera.aquilenet.fr ([141.255.128.1]:52462) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e7ljT-0008Gu-Pi for 26339@debbugs.gnu.org; Thu, 26 Oct 2017 13:14:17 -0400 Received: from localhost (localhost [127.0.0.1]) by hera.aquilenet.fr (Postfix) with ESMTP id 41ED6F4F0; Thu, 26 Oct 2017 19:14:15 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at aquilenet.fr Received: from hera.aquilenet.fr ([127.0.0.1]) by localhost (hera.aquilenet.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 8vR04p-AXtCn; Thu, 26 Oct 2017 19:14:14 +0200 (CEST) Received: from ribbon (node-1w7jr9qot7winqrne9k8b99d1.ipv6.telus.net [IPv6:2001:569:7803:2c00:728:f466:18ad:22a5]) by hera.aquilenet.fr (Postfix) with ESMTPSA id A7D708B30; Thu, 26 Oct 2017 19:14:12 +0200 (CEST) From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) To: Mathieu Othacehe Subject: Re: bug#26339: closing bootloader serie. References: <20170402134916.2871-1-m.othacehe@gmail.com> <87d15rdtsb.fsf@gmail.com> <87d15rm5dl.fsf@gnu.org> <87zi8e1by3.fsf@gmail.com> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 5 Brumaire an 226 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: Thu, 26 Oct 2017 10:14:05 -0700 In-Reply-To: <87zi8e1by3.fsf@gmail.com> (Mathieu Othacehe's message of "Thu, 26 Oct 2017 11:43:32 +0200") Message-ID: <87she5hlwi.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 26339 Cc: 26339@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.0 (+) Hi, Mathieu Othacehe skribis: >> Hopefully this will unlock GuixSD-on-ARM in the not-too-distant future? > > Actually, I'm trying to produce a disk-image for a beaglebone black > board. The problem I have is that a lot of packages have to be built on > native target and qemu is really slow. > > So I have a naive question : why can't I cross-compile everything when > building a disk-image ? You could cross-compile stuff, but many packages with fail to cross-compile. That said, I experimented with cross-compiled GuixSD (that is, =E2=80=98guix system build --target=3Dfoo-linux-gnu=E2=80=99), and I think that=E2=80=99s= promising, with the caveat that you have to restrict your package set to those that can actually be cross-compiled. Should we try to get it off the ground? Thanks, Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Thu Oct 26 13:33:46 2017 Received: (at 26339) by debbugs.gnu.org; 26 Oct 2017 17:33:46 +0000 Received: from localhost ([127.0.0.1]:35389 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e7m2M-0002Cr-4n for submit@debbugs.gnu.org; Thu, 26 Oct 2017 13:33:46 -0400 Received: from mail-wm0-f46.google.com ([74.125.82.46]:45255) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e7m2J-0002CW-OS for 26339@debbugs.gnu.org; Thu, 26 Oct 2017 13:33:44 -0400 Received: by mail-wm0-f46.google.com with SMTP id q124so9432330wmb.0 for <26339@debbugs.gnu.org>; Thu, 26 Oct 2017 10:33:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=references:user-agent:from:to:cc:subject:in-reply-to:date :message-id:mime-version:content-transfer-encoding; bh=w7R0njxpAZhyWdohdjk8LX4uFgmdS8Rz6RLx2cRi5hs=; b=rA0tgFEqnA3RHcPdHvpklx4oH3RHJDmXhCT6OEWTp343NexxRkilc2egJ1S4Ih7FJE GHMjGOEDo4DVRaQEVbWe55xowugOUqyTT/7sFBBwgq3WbReF/4jn0nDmROigpiBTHSf/ OniCoGZC1CzHl24QCl5y/0eZUCwpray7XKsrMQtTa0gCkH55whOH3g/f9mILtFnwTQ8o cRWBQSFYhcmBu456c4SJcLgohPFgwL2yS/eL6wSgtc4ZvIyAN7xWQ+6OFJsIj/IKG8n3 U6cjhyc6ceBANDBmjJoVS/fnKkFs/YtOFaVxKqe02jdd6NIuZO5hfSl4sPvz3LJeYVJ8 YaSg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:references:user-agent:from:to:cc:subject :in-reply-to:date:message-id:mime-version:content-transfer-encoding; bh=w7R0njxpAZhyWdohdjk8LX4uFgmdS8Rz6RLx2cRi5hs=; b=MmNt8cpiNFfr2LdUbtGz4iYSK8Pl19Iyg/IZOVdp1oNM4QKvkfXGrr2kMjX6ujNqKl Z97D3xDM41jHy0qnHEFHjQzcMTvd12f6/sUYoaSYzJD+zLg3zGw6ADj73l1IxYslKd0O LBZ6ALOQ9c7jzCYUIDShBzcNSvlehurtTi1UFQ9dZxLxRw/7oAWHmjHWYNaMslRYHdL0 Xe/A10JlJjL2DCeJQHVWpKNGfStm7QKn+RrywVHIuRe3ryy6hDLJbPmMrBRrB5AeM4V4 AVNaElgTs9GWAGBHQld+a8wZ4CWp22iYFuINSuvYbOnL3D0HjmeJjxGQE/X83SiwUFfF 8KrA== X-Gm-Message-State: AMCzsaXBOPsykUWiYmkk1dulkfNERylhDOnTlvs98JeJ0U5VcWg5wtHh YqkL9kIY4tS4iE1Bfw0qONZgrg== X-Google-Smtp-Source: ABhQp+Soxh4Xa5X7oLfYd9A5uOWSj5NbbMRhXLtYojX4bafoXsIlFKdtHVQBVCZUG4FMmSsu6Xe4pA== X-Received: by 10.28.113.196 with SMTP id d65mr2036546wmi.151.1509039217626; Thu, 26 Oct 2017 10:33:37 -0700 (PDT) Received: from cervin ([78.192.96.126]) by smtp.gmail.com with ESMTPSA id k105sm5895422wrc.90.2017.10.26.10.33.36 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 26 Oct 2017 10:33:36 -0700 (PDT) References: <20170402134916.2871-1-m.othacehe@gmail.com> <87d15rdtsb.fsf@gmail.com> <87d15rm5dl.fsf@gnu.org> <87zi8e1by3.fsf@gmail.com> <87she5hlwi.fsf@gnu.org> User-agent: mu4e 0.9.18; emacs 25.3.1 From: Mathieu Othacehe To: Ludovic =?utf-8?Q?Court=C3=A8s?= Subject: Re: bug#26339: closing bootloader serie. In-reply-to: <87she5hlwi.fsf@gnu.org> Date: Thu, 26 Oct 2017 19:33:36 +0200 Message-ID: <87d159yftb.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 26339 Cc: 26339@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.0 (/) > That said, I experimented with cross-compiled GuixSD (that is, ‘guix > system build --target=foo-linux-gnu’), and I think that’s promising, > with the caveat that you have to restrict your package set to those that > can actually be cross-compiled. Should we try to get it off the ground? That would be really interesting. But to build an arm GuixSD installer for example, it would require that are all the packages needed to set-up the rootfs of the installer are cross-compilable, right ? Also, something I don't understand here. This does not work (without armhf offloading machine): --8<---------------cut here---------------start------------->8--- ./pre-inst-env guix system disk-image --file-system-type=iso9660 --system=armhf-linux gnu/system/boards/beaglebone-black.scm guix system: error: build failed: a `armhf-linux' is required to build `/gnu/store/pswlzi1bwdzalfidbzf5w96fbdiv3dc1-linux-libre-arm-omap2plus-4.13.8.drv', but I am a `x86_64-linux' --8<---------------cut here---------------end--------------->8--- but this works : --8<---------------cut here---------------start------------->8--- ./pre-inst-env guix build --target=arm-linux-gnueabihf linux-libre-arm-omap2plus /gnu/store/53lcpmpkbba661h3lrnxms1dfz750gw5-linux-libre-arm-omap2plus-4.13.8 --8<---------------cut here---------------end--------------->8--- What's the difference between --system=armhf-linux and --target=arm-linux-gnueabihf ? Why guix system do not use the already cross-compiled kernel and asks me to build it on an armhf machine ? Thanks, Mathieu From debbugs-submit-bounces@debbugs.gnu.org Thu Oct 26 18:20:37 2017 Received: (at 26339) by debbugs.gnu.org; 26 Oct 2017 22:20:37 +0000 Received: from localhost ([127.0.0.1]:35643 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e7qVx-0000iy-4F for submit@debbugs.gnu.org; Thu, 26 Oct 2017 18:20:37 -0400 Received: from hera.aquilenet.fr ([141.255.128.1]:53192) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e7qVu-0000ip-Rv for 26339@debbugs.gnu.org; Thu, 26 Oct 2017 18:20:35 -0400 Received: from localhost (localhost [127.0.0.1]) by hera.aquilenet.fr (Postfix) with ESMTP id A70B0F51A; Fri, 27 Oct 2017 00:20:35 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at aquilenet.fr Received: from hera.aquilenet.fr ([127.0.0.1]) by localhost (hera.aquilenet.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id mGmfLYLh7qai; Fri, 27 Oct 2017 00:20:35 +0200 (CEST) Received: from ribbon (unknown [72.28.92.19]) by hera.aquilenet.fr (Postfix) with ESMTPSA id 814A98B30; Fri, 27 Oct 2017 00:20:34 +0200 (CEST) From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) To: Mathieu Othacehe Subject: Re: bug#26339: closing bootloader serie. References: <20170402134916.2871-1-m.othacehe@gmail.com> <87d15rdtsb.fsf@gmail.com> <87d15rm5dl.fsf@gnu.org> <87zi8e1by3.fsf@gmail.com> <87she5hlwi.fsf@gnu.org> <87d159yftb.fsf@gmail.com> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 5 Brumaire an 226 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: Thu, 26 Oct 2017 15:20:30 -0700 In-Reply-To: <87d159yftb.fsf@gmail.com> (Mathieu Othacehe's message of "Thu, 26 Oct 2017 19:33:36 +0200") Message-ID: <871slpft5d.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 26339 Cc: 26339@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.0 (+) Mathieu Othacehe skribis: >> That said, I experimented with cross-compiled GuixSD (that is, =E2=80=98= guix >> system build --target=3Dfoo-linux-gnu=E2=80=99), and I think that=E2=80= =99s promising, >> with the caveat that you have to restrict your package set to those that >> can actually be cross-compiled. Should we try to get it off the ground? > > That would be really interesting. But to build an arm GuixSD installer > for example, it would require that are all the packages needed to set-up > the rootfs of the installer are cross-compilable, right ? Yes. So in my experiments I had =E2=80=98services=E2=80=99 and =E2=80=98pa= ckages=E2=80=99 almost empty, to be sure. > What's the difference between --system=3Darmhf-linux and > --target=3Darm-linux-gnueabihf ? =E2=80=98--target=E2=80=99 specifies a cross-compilation triplet, where =E2= =80=98--system=E2=80=99 specifies the system you want to build on. Without offloading, your x86_64 machine can only build for =E2=80=98x86_64-linux=E2=80=99 or =E2=80= =98i686-linux=E2=80=99. Conversely cross-compilation does not depend on offloading, it=E2=80=99s ju= st regular cross-compilation. Does that make sense? Ludo=E2=80=99. From unknown Fri Jun 20 07:19:54 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Fri, 24 Nov 2017 12:24:05 +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