From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id 8Kd5L1m8smabUAEAqHPOHw:P1 (envelope-from ) for ; Wed, 07 Aug 2024 00:14:17 +0000 Received: from aspmx1.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id 8Kd5L1m8smabUAEAqHPOHw (envelope-from ) for ; Wed, 07 Aug 2024 02:14:17 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b=O9K0Oc7c; dkim=fail ("headers rsa verify failed") header.d=lunabee.space header.s=purelymail3 header.b=Oe3fDUtI; dkim=fail ("headers rsa verify failed") header.d=purelymail.com header.s=purelymail3 header.b=UGjwbZcz; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gnu.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1722989657; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=FP6FAXaAbnxroq8CvRF5iJ5aR0k8jQGaqrR3EwMt6Lo=; b=OFYynpw0ljF/HFUVtHUwPNIWGbEl4y7PjkxVjjOWHFZVu/kkzNx6D+v5CoOEHROsYg5cz4 HY9S94UHX11FcBRAm8r54Mw9DOa4TwtJZazn5pKrV9xlmS39SgHTU8861x17lymEVma6TQ GF5xVHlWryH7NHLeBGxoi2ie+CoGj9I9+IsMw91tV++LhnWrC9lFvwQKE4HxH0ayjIGUs5 TJ7YTjjlDNmbzMGRSzLSBVBf9IsqlE/4g0QTAxdQSjzH9hOevthVeDZ153AFmeuHMDOsrQ ByDz7aHjs9SLAjyG1IzErKcTeq4MKwi42WX7a/nKf81V+Y4bDS++YVavUIFl3A== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b=O9K0Oc7c; dkim=fail ("headers rsa verify failed") header.d=lunabee.space header.s=purelymail3 header.b=Oe3fDUtI; dkim=fail ("headers rsa verify failed") header.d=purelymail.com header.s=purelymail3 header.b=UGjwbZcz; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gnu.org ARC-Seal: i=1; s=key1; d=yhetil.org; t=1722989657; a=rsa-sha256; cv=none; b=g4SBPW9qQi20FHR4R6kRRtFlaJOWVJbbgSnXC/3MnlDvV/HQOv0KQr7DPShQsVyFRQNJmw k5Zjiybp87rG4GM4c3Yw7f6E5/LjBeIa0UxPdArP64SeC0ZX7FgCH83uyHglBufEe5ZS3Y sTAkObQk6/4A1rZwJ+G2QQvuXpKZ8BroCbCMLlzuUte9ExBSrQVUZfVW+gqcAU+0D2vS6p 65IcDTwep2Npdgvv/KeU4ZETUHygJfGcdo3TKo0+nqGTzoPhoG5nwUiZn9UfYc6mfDm3rm 48WQLnCpAmocTi+csMnHRei0zQ1xK3kN0d7ieFXZsVhE+sSPfMCzSR/Q+LZbcg== Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 81966561D0 for ; Wed, 7 Aug 2024 02:14:17 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sbUJN-0004vb-C8; Tue, 06 Aug 2024 20:13:53 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sbUJG-0004Rx-Ew for guix-patches@gnu.org; Tue, 06 Aug 2024 20:13:47 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sbUJF-00029B-Pw for guix-patches@gnu.org; Tue, 06 Aug 2024 20:13:46 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:References:In-Reply-To:Date:From:To:Subject; bh=FP6FAXaAbnxroq8CvRF5iJ5aR0k8jQGaqrR3EwMt6Lo=; b=O9K0Oc7cOMHGpKMCcsK8OlCimQ1A/c66i8aIEESPHcqFlgTbJ2eW0XZBUH+717uMxgso4vy52ajfp2nwjeywB6yc2Kl9fbpKROTX0fB1lkrM6ZeWuKLrrrvHymL5IIdFIxyrfnOX46ptrrHh+EAKITRFCr4YoxnuxELfFaAXvNiUt8UZKQ++/L/oGoiYLBDPL5IufDBKr9HasUHo74W6siRIGGGgc/T0B2aSeG8lQBSZ6ywhEeYHCTOhiFYp1NiXschHsSsCYxxN3C/gbz7D8vic0VOxyBC+XAQqC1GuWcZeUVMcMdNWxHtcQZq3fe2VWsnHHxA6tWsf42Hcgfmlhw==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sbUJc-0006yy-7x; Tue, 06 Aug 2024 20:14:08 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#72457] [PATCH v5 10/15] gnu: packages: Add systemd-stub. Resent-From: Lilah Tascheter Original-Sender: "Debbugs-submit" Resent-CC: efraim@flashner.co.il, lilah@lunabee.space, vagrant@debian.org, guix-patches@gnu.org Resent-Date: Wed, 07 Aug 2024 00:14:08 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 72457 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 72457@debbugs.gnu.org Cc: Lilah Tascheter , Sergey Trofimov , Efraim Flashner , Lilah Tascheter , Vagrant Cascadian X-Debbugs-Original-Xcc: Efraim Flashner , Lilah Tascheter , Vagrant Cascadian Received: via spool by 72457-submit@debbugs.gnu.org id=B72457.172298964726819 (code B ref 72457); Wed, 07 Aug 2024 00:14:08 +0000 Received: (at 72457) by debbugs.gnu.org; 7 Aug 2024 00:14:07 +0000 Received: from localhost ([127.0.0.1]:33281 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sbUJa-0006yA-7H for submit@debbugs.gnu.org; Tue, 06 Aug 2024 20:14:07 -0400 Received: from sendmail.purelymail.com ([34.202.193.197]:55786) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sbUJV-0006wB-9S for 72457@debbugs.gnu.org; Tue, 06 Aug 2024 20:14:01 -0400 DKIM-Signature: a=rsa-sha256; b=Oe3fDUtII+XKmIj4MkPAIAiSOJOPxxPcza+rjH7g9gf/TRnBGAeNHS+/o+j1fe6T83woUbx6E4IXw/d4EHIz9779P8mUsmSYav3mRLLYGu6emn+I0MXXMdWZkmGdsWMK60oZB0bemoS6rBrQpcjGJoEXtUMfiXzhqgInT3I0Gx243LgjkAqNpYYE2xCig1b6NgPv/h2cMrnWSPQ0WQuTYpZKihpHpOhJkc8LKWROIo6YYFB+7fIUQb677CmALcCDum0gshBp1SOKNT/Aq/XggdvAZZt88hpVoIt/CzRoNO/lp253n+lckDgCse/7kKRO7uSw+eHclQsANDQCdEIyFg==; s=purelymail3; d=lunabee.space; v=1; bh=LZ5eOj+I+ecRX/QnnKY0hdVeUpX46HGuyTTr8VUAGB8=; h=Received:From:To:Subject:Date; DKIM-Signature: a=rsa-sha256; b=UGjwbZczTHgVjh5qOTia+XUImb5lAQiOAUhjrdHBr+CaZiEbkWq4jfwoE2a7x4nl3WdQD8c7rhQE8wqvf/y/aAeGN4ieH/1AiTC1P8NzgR1MWOQYR6VePZ5SBf6EG+sQt0cEP9vEMHSqvupV2HT96itqlHBSHD1vzLeMw3PleaM1J9Bq4ncAaQsedYiFcwhwMPLSYqWSRbLsEPCuNAe5rgd36/0AmuOA1VHHf+XS7AXtBdMeRu0sK03MXZmcrXog0D1e3pBrAHN1BUb2uwuXg46voG2wmzqFvRV4Xi3BPEyth0/L0txDtVvszjEkrqE1nJP9wr6aRGuHuQPK0rMp3A==; s=purelymail3; d=purelymail.com; v=1; bh=LZ5eOj+I+ecRX/QnnKY0hdVeUpX46HGuyTTr8VUAGB8=; h=Feedback-ID:Received:From:To:Subject:Date; Feedback-ID: 8937:2070:null:purelymail X-Pm-Original-To: 72457@debbugs.gnu.org Received: by smtp.purelymail.com (Purelymail SMTP) with ESMTPSA id -1661201426; (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384); Wed, 07 Aug 2024 00:13:15 +0000 (UTC) Date: Tue, 6 Aug 2024 19:11:23 -0500 Message-ID: <76ddcd42c4eca0791ee8c883647a3fa00a75b777.1722989488.git.lilah@lunabee.space> In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-MIME-Autoconverted: from 8bit to quoted-printable by Purelymail Content-Type: text/plain; charset=UTF-8 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Lilah Tascheter via Guix-patches Reply-To: Lilah Tascheter Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN X-Migadu-Queue-Id: 81966561D0 X-Migadu-Scanner: mx13.migadu.com X-Migadu-Spam-Score: -6.94 X-Spam-Score: -6.94 X-TUID: vK0VM0Z/4kNz * gnu/bootloader.scm (%efi-supported-systems, lazy-efibootmgr): New variabl= e. (install-efi): Use lazy-efibootmgr. * gnu/packages/bootloaders.scm (systemd-stub): New variable. Change-Id: I974bad9ff7a52f736286d05de53f7c5ccb60b9d6 --- gnu/bootloader.scm | 13 +++++++++-- gnu/packages/bootloaders.scm | 43 ++++++++++++++++++++++++++++++++++++ 2 files changed, 54 insertions(+), 2 deletions(-) diff --git a/gnu/bootloader.scm b/gnu/bootloader.scm index 97305265b7..3a58d74a47 100644 --- a/gnu/bootloader.scm +++ b/gnu/bootloader.scm @@ -28,7 +28,6 @@ (define-module (gnu bootloader) #:autoload (gnu build file-systems) (read-partition-label read-partition-uuid find-partition-by-label find-partition-by-uuid) - #:use-module (gnu packages linux) #:use-module (gnu system file-systems) #:use-module (gnu system uuid) #:autoload (guix build syscalls) @@ -115,6 +114,7 @@ (define-module (gnu bootloader) bootloader-configuration->gexp bootloader-configurations->gexp =20 + %efi-supported-systems efi-arch install-efi)) =20 @@ -651,6 +651,11 @@ (define (bootloader-configurations->gexp bootloader-co= nfigs . rest) ;;; EFI shit ;;; =20 +;; systems currently supported by efi-arch. should be used for packages re= lying +;; on it. +(define %efi-supported-systems + '("i686-linux" "x86_64-linux" "armhf-linux" "aarch64-linux" "riscv64-lin= ux")) + (define* (efi-arch #:key (target (or (%current-target-system) (%current-sy= stem))) (32? #f)) "Returns the UEFI architecture name for the current target, in lowercase= ." @@ -662,6 +667,10 @@ (define* (efi-arch #:key (target (or (%current-target-= system) (%current-system)) (else (raise (formatted-message (G_ "no UEFI standard arch for ~a!= ") target))))) =20 +(define (lazy-efibootmgr) + "Lazy-loaded efibootmgr package, in order to prevent circular refs." + (module-ref (resolve-interface '(gnu packages linux)) 'efibootmgr)) + (define (install-efi bootloader-config plan) "Returns a gexp installing PLAN to the ESP, as denoted by the 'vendir ta= rget. PLAN is a gexp of a list of '(BUILDER DEST-BASENAME . LABEL) triples, that @@ -684,5 +693,5 @@ (define (install-efi bootloader-config plan) ;; normal install when not doing a removable config (with-targets targets (('vendir =3D> (vendir :path) (loader :devpath) (disk :device)) - #~(install-efi #+(file-append efibootmgr "/sbin/efibootmgr") + #~(install-efi #+(file-append (lazy-efibootmgr) "/sbin/efibootmgr= ") #$vendir #$loader #$disk #$plan)))))) diff --git a/gnu/packages/bootloaders.scm b/gnu/packages/bootloaders.scm index 04bb1b06f0..2bc04059d2 100644 --- a/gnu/packages/bootloaders.scm +++ b/gnu/packages/bootloaders.scm @@ -38,6 +38,7 @@ ;;; along with GNU Guix. If not, see . =20 (define-module (gnu packages bootloaders) + #:use-module (gnu bootloader) #:use-module (gnu packages) #:use-module (gnu packages assembly) #:use-module (gnu packages base) @@ -54,6 +55,7 @@ (define-module (gnu packages bootloaders) #:use-module (gnu packages fontutils) #:use-module (gnu packages gcc) #:use-module (gnu packages gettext) + #:use-module (gnu packages gperf) #:use-module (gnu packages linux) #:use-module (gnu packages llvm) #:use-module (gnu packages man) @@ -592,6 +594,47 @@ (define systemd-source (base32 "1qdyw9g3jgvsbc1aryr11gpc3075w5pg00mqv4pyf3hwixxkwaq6")))) =20 +(define-public systemd-stub + (package + (name "systemd-stub") + (version systemd-version) + (source systemd-source) + (build-system meson-build-system) + (arguments + (list #:configure-flags + #~(list "-Dmode=3Drelease" "-Defi=3Dtrue" "-Dsbat-distro=3Dgui= x" + "-Dsbat-distro-generation=3D1" ; package revision! + "-Dsbat-distro-summary=3DGuix System" + "-Dsbat-distro-url=3Dhttps://guix.gnu.org" + #$(string-append "-Dsbat-distro-pkgname=3D" + (package-name this-package)) + #$(string-append "-Dsbat-distro-version=3D" + (package-version this-package))) + #:phases + ;; TODO: 32bit support + (let* ((stub (string-append + "src/boot/efi/linux" (efi-arch) ".efi.stub"))) + #~(modify-phases %standard-phases + (replace 'build + (lambda* (#:key parallel-build? #:allow-other-keys) + (invoke "ninja" #$stub + "-j" (if parallel-build? + (number->string (parallel-job-count)) "1"))= )) + (replace 'install + (lambda _ + (let ((libexec (string-append #$output "/libexec"))) + (install-file #$stub libexec)))) + (delete 'check))))) + (supported-systems %efi-supported-systems) + (inputs (list libcap python-pyelftools `(,util-linux "lib"))) + (native-inputs (list gperf pkg-config python-3 python-jinja2)) + (home-page "https://systemd.io/") + (synopsis "Unified kernel image UEFI stub") + (description "Simple UEFI boot stub that loads a conjoined kernel imag= e and +supporting data to their proper locations, before chainloading to the kern= el. +Supports measured and/or verified boot environments.") + (license license:lgpl2.1+))) + (define-public ukify (package (name "ukify") --=20 2.45.2