From patchwork Mon Apr 1 10:43:42 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sharlatan Hellseher X-Patchwork-Id: 62423 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 86A9627BBEA; Mon, 1 Apr 2024 11:44:29 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI, SPF_HELO_PASS autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 30C4327BBE2 for ; Mon, 1 Apr 2024 11:44:25 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rrF97-0006uq-Bo; Mon, 01 Apr 2024 06:44:09 -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 1rrF95-0006ta-Gv for guix-patches@gnu.org; Mon, 01 Apr 2024 06:44:07 -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 1rrF95-0002Ph-8s for guix-patches@gnu.org; Mon, 01 Apr 2024 06:44:07 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rrF98-0005un-Af for guix-patches@gnu.org; Mon, 01 Apr 2024 06:44:10 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#70123] [PATCH 12/12] gnu: fiano: Update to 1.2.0. Resent-From: Sharlatan Hellseher Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 01 Apr 2024 10:44:10 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 70123 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 70123@debbugs.gnu.org Cc: Sharlatan Hellseher Received: via spool by 70123-submit@debbugs.gnu.org id=B70123.171196824922727 (code B ref 70123); Mon, 01 Apr 2024 10:44:10 +0000 Received: (at 70123) by debbugs.gnu.org; 1 Apr 2024 10:44:09 +0000 Received: from localhost ([127.0.0.1]:49686 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rrF96-0005uI-HQ for submit@debbugs.gnu.org; Mon, 01 Apr 2024 06:44:09 -0400 Received: from mail-lj1-x22c.google.com ([2a00:1450:4864:20::22c]:48198) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rrF93-0005r2-Es for 70123@debbugs.gnu.org; Mon, 01 Apr 2024 06:44:06 -0400 Received: by mail-lj1-x22c.google.com with SMTP id 38308e7fff4ca-2d48d75ab70so56137441fa.0 for <70123@debbugs.gnu.org>; Mon, 01 Apr 2024 03:44:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1711968236; x=1712573036; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=jBicrpfBdiKv5owMQ5u/Bucvozzqjihy/pgVQmrBx+A=; b=jQis/xXSgtQJfvVD8VY5IlFKHhhi8oknkuL7SKo+5auy0tQkZrknJe0euKPcEj+L5Q QpWdfMs9i2y12HUjW5b3A8W10ooOazPHLDaZ4MiZItiRUsgBHBFLYPkNdaLxjMWreqfL K3kRAvvcWWyb1elmW0QRXSFGAm0O+Od/aIEtRlMT3zww2T2ZJbNOOqsQHhcjT7QT/5sa 5X/3zhe1fcw146cMfi08RMYPDj5yPRYmwKZSEJ3WSGvsbTh51eXIG2DNl29qeK2Mi+Fs PyQvNQrJ2I470ZJkjt7Xyfc6MJgSc0KnjMfaPQgr1Az4LS5BiUgQinu8hb8TJ1+jK5ry Humg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711968236; x=1712573036; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=jBicrpfBdiKv5owMQ5u/Bucvozzqjihy/pgVQmrBx+A=; b=iu9p4cQHPFrczknNGfb+Sn0bzDtgx9b/3xcSIoH275kBRg/gkjRVoBuDwI2iQIRf73 8kZKDOqpR7hJztZ9EX1joCHEVjyXZPnEbi4jeL2F03Wa3og6qasYoFJpPK4Z6w9Vyjko /RgxrD8kxBhDXPdaP3WKUN+Y+5j5VpPF/XeIg9gzbPH5yjG2yDxgSEETRMxU1iRmB1BL nOIgmeIzJ0Pw+1g+zKyS/DxDwgj1NUL9z4LvF0TogD/RddUHwOhusWHLeqJKFQZGQemA 6ybFX62gkMaxbqOP/Ve4CqILHnD7jue6bcBTBc6QQn6wl7YYBfciZl2MJ+XCy6wdjXhO yRzQ== X-Gm-Message-State: AOJu0YzrRmX5mfgWGuIxrcVmdNfjEDOBafGzyf9WUGCR+dYTPe3yWhll IvGRsySfH8orwzvB5QBKn3+5+9DfYn03twBQP0GSBl8qVMxYbjj+O8ZCYdTHwHc= X-Google-Smtp-Source: AGHT+IFPCYo1ay4lKLq1ZVD/DAiICouuwIhHFa14s80FfdN4S7M8JzI5R+CYneF/wdpLvL3oSWFrDQ== X-Received: by 2002:a2e:9d9a:0:b0:2d6:f545:5e13 with SMTP id c26-20020a2e9d9a000000b002d6f5455e13mr5561468ljj.46.1711968236247; Mon, 01 Apr 2024 03:43:56 -0700 (PDT) Received: from localhost.localdomain (cpc100856-bagu15-2-0-cust368.1-3.cable.virginm.net. [82.25.93.113]) by smtp.gmail.com with ESMTPSA id iv16-20020a05600c549000b004146a1bf590sm17468404wmb.32.2024.04.01.03.43.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 01 Apr 2024 03:43:55 -0700 (PDT) From: Sharlatan Hellseher Date: Mon, 1 Apr 2024 11:43:42 +0100 Message-ID: <900f5467d3196f4baed9c7938904748e4ececf95.1711915492.git.sharlatanus@gmail.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: References: MIME-Version: 1.0 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: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches The version style has been changed from v7.0.2 starting v1.0.3. This change may cause guix refresh to detect incorrect latest version, see . This changes consolidate building all commands directly from the fiano package. * gnu/packages/admin.scm (fiano): Make variable public, update to 1.2.0. [source]: Remove snippet, there is no longer 'vendor' directory in a new release. [arguments] <#:phases>: Add custom 'build, 'check and 'install phases to cover complex package structure and produce all provided commands. [inputs]: Add go-github-com-dustin-go-humanize, go-github-com-hashicorp-errwrap, go-github-com-hashicorp-go-multierror, go-github-com-jessevdk-go-flags, go-github-com-pierrec-lz4, and go-github-com-spf13-pflag. [description]: Highlight which commands are included in the package. * gnu/packages/admin.scm (fiano-utk, fiano-fmap): Delete variables. Change-Id: I4b7573e20953ba52c9736e7f64c6b6347221fc72 --- gnu/packages/admin.scm | 126 +++++++++++++++++++++++++++++++---------- 1 file changed, 97 insertions(+), 29 deletions(-) diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm index 78e5e355d6..e5a4895dc9 100644 --- a/gnu/packages/admin.scm +++ b/gnu/packages/admin.scm @@ -135,6 +135,7 @@ (define-module (gnu packages admin) #:use-module (gnu packages golang) #:use-module (gnu packages golang-build) #:use-module (gnu packages golang-compression) + #:use-module (gnu packages golang-xyz) #:use-module (gnu packages groff) #:use-module (gnu packages gtk) #:use-module (gnu packages guile) @@ -5161,10 +5162,12 @@ (define-public atop (license license:gpl2+))) ;; TODO: Pack u-root for: forth, and some tests. -(define fiano - (package - (name "fiano") - (version "5.0.0") +(define-public fiano + (package + (name "fiano") + ;; The versioning count has been changed since commit <2021-12-01> + ;; 1eb599564549691603589219c2be34f966a32ff1. + (version "1.2.0") (source (origin (method git-fetch) (uri (git-reference @@ -5173,41 +5176,106 @@ (define fiano (file-name (git-file-name name version)) (sha256 (base32 - "03ihdwwhb7g6bihx141cn0924sjs5ps6q3ps58pk1cg0g0srrr9h")) - (modules '((guix build utils))) - (snippet - #~(begin - ;; Remove all vendored sources. - (delete-file-recursively "vendor"))))) + "0s5fx4lhgb68qbx4ql34rcm678qdf0c4xl97bgc8dx9xwwqifza1")))) (build-system go-build-system) (arguments (list + #:install-source? #f #:import-path "github.com/linuxboot/fiano" - #:unpack-path "github.com/linuxboot/fiano")) + #:unpack-path "github.com/linuxboot/fiano" + #:phases + #~(modify-phases %standard-phases + ;; XXX: Replace this part when it's implemented in go-build-system. + (replace 'build + (lambda* (#:key import-path #:allow-other-keys) + (for-each + (lambda (cmd) + (invoke "go" "build" "-v" "-x" "-ldflags=-s -w" "-trimpath" + (string-append import-path "/cmds/" cmd))) + (list "cbfs" + "create-ffs" + ;; TODO: Not packed yet in guix, long jorney: + ;; - github.com/tjfoc/gmsm + ;; + ;; "fittool" + "fmap" + "fspinfo" + "glzma" + "guid2english" + "microcode" + "utk")))) + (replace 'check + (lambda* (#:key import-path tests? #:allow-other-keys) + (when tests? + (for-each + (lambda (dir) + (invoke "go" "test" "-v" + (string-append import-path dir "/..."))) + (list "/pkg/bytes" + ;; TODO: Not packed yet in Guix, long jorney: + ;; - github.com/jedib0t + ;; + ;; "/pkg/amd" + "/pkg/cbfs" + "/pkg/compression" + "/pkg/fmap" + "/pkg/fsp" + "/pkg/guid" + "/pkg/guid2english" + ;; TODO: Not packed yet in Guix, long jorney: + ;; - github.com/tjfoc/gmsm + ;; + ;; "/pkg/intel" + "/pkg/knownguids" + "/pkg/log" + "/pkg/uefi" + "/pkg/unicode" + "/pkg/utk" + "/pkg/visitors" + "/cmds/cbfs" + "/cmds/create-ffs" + ;; TODO: Not packed yet in Guix, long jorney: + ;; - github.com/u-root/u-root + ;; + ;; "/cmds/fmap" + ;; "/cmds/fittool" + "/cmds/fspinfo" + "/cmds/glzma" + "/cmds/guid2english" + "/cmds/microcode" + "/cmds/utk"))))) + (replace 'install + (lambda _ + (let ((bindir (string-append #$output "/bin"))) + (for-each + (lambda (cmd) + (install-file cmd bindir)) + (list "cbfs" + "create-ffs" + ;; "fittool" + "fmap" + "fspinfo" + "glzma" + "guid2english" + "microcode" + "utk")))))))) (inputs - (list go-golang-org-x-text go-github-com-ulikunitz-xz)) + (list go-github-com-dustin-go-humanize + go-github-com-hashicorp-errwrap + go-github-com-hashicorp-go-multierror + go-github-com-jessevdk-go-flags + go-github-com-pierrec-lz4 + go-github-com-spf13-pflag + go-github-com-ulikunitz-xz + go-golang-org-x-text)) (home-page "https://github.com/linuxboot/fiano") (synopsis "UEFI image editor") (description - "This package provides a command-line UEFI image editor.") + "This package provides a command-line UEFI image editor, including cbfs, +create-ffs, fmap, fspinfo, glzma, guid2english, microcode and utk CLI +utilities.") (license license:bsd-3))) -(define-public fiano-utk - (package - (inherit fiano) - (name "fiano-utk") - (arguments - `(#:import-path "github.com/linuxboot/fiano/cmds/utk" - #:unpack-path "github.com/linuxboot/fiano")))) - -(define-public fiano-fmap - (package - (inherit fiano) - (name "fiano-fmap") - (arguments - `(#:import-path "github.com/linuxboot/fiano/cmds/fmap" - #:unpack-path "github.com/linuxboot/fiano")))) - (define-public novena-eeprom (package (name "novena-eeprom")