From patchwork Sat Dec 17 04:35:48 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Maxim Cournoyer X-Patchwork-Id: 45389 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 25AD527BBEB; Sat, 17 Dec 2022 04:37:31 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-3.7 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable 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 EB82E27BBE9 for ; Sat, 17 Dec 2022 04:37:28 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p6Owd-00048X-D6; Fri, 16 Dec 2022 23:37:07 -0500 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 1p6OwZ-00045t-M3 for guix-patches@gnu.org; Fri, 16 Dec 2022 23:37:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1p6OwZ-00061g-2t for guix-patches@gnu.org; Fri, 16 Dec 2022 23:37:03 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1p6OwY-0001lF-FI for guix-patches@gnu.org; Fri, 16 Dec 2022 23:37:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#60145] [PATCH 1/2] gnu: Add u-boot-documentation. References: <20221217041541.20193-1-maxim.cournoyer@gmail.com> In-Reply-To: <20221217041541.20193-1-maxim.cournoyer@gmail.com> Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 17 Dec 2022 04:37:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 60145 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 60145@debbugs.gnu.org Cc: vagrant@debian.org, Maxim Cournoyer Received: via spool by 60145-submit@debbugs.gnu.org id=B60145.16712517806742 (code B ref 60145); Sat, 17 Dec 2022 04:37:02 +0000 Received: (at 60145) by debbugs.gnu.org; 17 Dec 2022 04:36:20 +0000 Received: from localhost ([127.0.0.1]:53632 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p6Ovs-0001kg-4r for submit@debbugs.gnu.org; Fri, 16 Dec 2022 23:36:20 -0500 Received: from mail-qt1-f174.google.com ([209.85.160.174]:34512) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p6Ovo-0001kY-69 for 60145@debbugs.gnu.org; Fri, 16 Dec 2022 23:36:18 -0500 Received: by mail-qt1-f174.google.com with SMTP id g7so4368705qts.1 for <60145@debbugs.gnu.org>; Fri, 16 Dec 2022 20:36:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=sQfUFiYc7JfRWZyGeg0Wb/7u7kJuEqYrdejJac8yiQg=; b=dU9sk41KnbrRyy2Mv6YbUWhs0qAPXH4lAdX0uBMb0nc5GGV0gjnuKXwOHeLEzGQGhe hfGoz5GtBtnUIqczPElctsof3C+0hG7mYAZih75zSUeFXE1pkctRRhRa8m2I/G2nhP4x EUKMQBdfozCwzIqxGFE1X2BCrjWfboJEWEaun02kyvQsygXos+MZrm7Vd4fcdMlZe90q SZaswXl1FOkd9OdQ44qFGSI12i1YgfC8unPG/xVJJ29V6NZ3jVkG9YuTDauIovRshLkT PImFntYamA/h8+vmqD01SMrCmWOFo16s6xDprXs8QZr7PRbldQkbfRsH7iv/ZGepE5lV cFGQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=sQfUFiYc7JfRWZyGeg0Wb/7u7kJuEqYrdejJac8yiQg=; b=Uvprjha/80gidFd7j/WIyIu7AGbLpB1y1GDxZOXXxD+mOdYZCTWTCcv+vsCWSka24N P4L8+/nD2zn9mGtZ6cuPo38uaQy701TwI2v/WvpzHrbFrKWFymQRJZZBqXFbE20Ec094 QYbz6//LSGRVMYIcv5SiQ0Cf+4azZO4CCFXNXiy8LI2FL/ejJ9TZiUSxLjnZPAPuRKZB 7FvBvQ7JhsOVkO0H4tPe1bNAcPhgYAOQGO38IFzhBfh7vmvVFIHoJR1iwRN4UeZaWE4y JLQLgp4ncBoL3tDjMOZzH8wk9wXeLK4kCB0APD/c7XjckdarXQx5dPPEss8cA0VWY+he 8jgA== X-Gm-Message-State: ANoB5pmWPn3EQhchbVGzJV35R7abu0FZHlMj5knc/Enl8MTm+AvNxmph OGeWWnlFFU2HIZLZz6g1lbnUqj0jqDTvc0+o X-Google-Smtp-Source: AA0mqf6rsb0MpHSVNNEsfnWMItBYcLh9TYlpwDNUGkwbxOmXzmqgOiFaKchpvTec9p2pi+4mP7gyDw== X-Received: by 2002:a05:622a:2586:b0:3a7:fdfa:7ee with SMTP id cj6-20020a05622a258600b003a7fdfa07eemr47765892qtb.43.1671251770235; Fri, 16 Dec 2022 20:36:10 -0800 (PST) Received: from localhost.localdomain (dsl-159-157.b2b2c.ca. [66.158.159.157]) by smtp.gmail.com with ESMTPSA id ci27-20020a05622a261b00b003a580cd979asm2479291qtb.58.2022.12.16.20.36.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 16 Dec 2022 20:36:09 -0800 (PST) From: Maxim Cournoyer Date: Fri, 16 Dec 2022 23:35:48 -0500 Message-Id: <20221217043549.23069-1-maxim.cournoyer@gmail.com> X-Mailer: git-send-email 2.38.1 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 * gnu/packages/patches/u-boot-infodocs-target.patch: New patch. * gnu/local.mk: (dist_patch_DATA): Register it. * gnu/packages/bootloaders.scm (u-boot): Apply it. (u-boot-documentation): New variable. --- gnu/local.mk | 1 + gnu/packages/bootloaders.scm | 47 +++++++++++++- .../patches/u-boot-infodocs-target.patch | 61 +++++++++++++++++++ 3 files changed, 108 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/u-boot-infodocs-target.patch base-commit: 90a2b8c64a0155a1cd663ee5408dc6bb09d64123 diff --git a/gnu/local.mk b/gnu/local.mk index 5b8944f568..8ae21641d7 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1923,6 +1923,7 @@ dist_patch_DATA = \ %D%/packages/patches/tuxpaint-stamps-path.patch \ %D%/packages/patches/twinkle-bcg729.patch \ %D%/packages/patches/u-boot-allow-disabling-openssl.patch \ + %D%/packages/patches/u-boot-infodocs-target.patch \ %D%/packages/patches/u-boot-nintendo-nes-serial.patch \ %D%/packages/patches/u-boot-rockchip-inno-usb.patch \ %D%/packages/patches/u-boot-sifive-prevent-reloc-initrd-fdt.patch \ diff --git a/gnu/packages/bootloaders.scm b/gnu/packages/bootloaders.scm index 3c96453e5c..f52b2130ac 100644 --- a/gnu/packages/bootloaders.scm +++ b/gnu/packages/bootloaders.scm @@ -17,6 +17,7 @@ ;;; Copyright © 2021 Brice Waegeneire ;;; Copyright © 2022 Denis 'GNUtoo' Carikli ;;; Copyright © 2021 Stefan +;;; Copyright © 2022 Maxim Cournoyer ;;; ;;; This file is part of GNU Guix. ;;; @@ -62,6 +63,7 @@ (define-module (gnu packages bootloaders) #:use-module (gnu packages texinfo) #:use-module (gnu packages tls) #:use-module (gnu packages sdl) + #:use-module (gnu packages sphinx) #:use-module (gnu packages serialization) #:use-module (gnu packages swig) #:use-module (gnu packages valgrind) @@ -637,7 +639,8 @@ (define u-boot (list %u-boot-rockchip-inno-usb-patch %u-boot-allow-disabling-openssl-patch %u-boot-sifive-prevent-relocating-initrd-fdt - %u-boot-rk3399-enable-emmc-phy-patch)) + %u-boot-rk3399-enable-emmc-phy-patch + (search-patch "u-boot-infodocs-target.patch"))) (method url-fetch) (uri (string-append "https://ftp.denx.de/pub/u-boot/" @@ -667,6 +670,48 @@ (define u-boot also initializes the boards (RAM etc).") (license license:gpl2+))) +;;; This is very similar to the linux-libre-documentation package, since it +;;; reuses the same Makefile-based build system. +(define-public u-boot-documentation + (package + (inherit u-boot) + (name "u-boot-documentation") + (arguments + (list + #:make-flags #~(list "HOSTCC=gcc" + ;; Avoid treating Sphinx warnings as errors. + "SPHINXOPTS=") + #:tests? #f + #:phases #~(modify-phases %standard-phases + (delete 'configure) + (replace 'build + (lambda* (#:key make-flags #:allow-other-keys) + (substitute* "doc/Makefile" + ;; Remove problematic environment check script. + ((".*scripts/sphinx-pre-install.*") "")) + (apply invoke "make" "infodocs" make-flags))) + (replace 'install + (lambda* (#:key make-flags #:allow-other-keys) + (let* ((info-dir (string-append #$output "/share/info")) + (info (string-append info-dir + "/DasUBoot.info.gz"))) + (with-directory-excursion "doc/output" + (apply invoke "make" "-C" "texinfo" "install-info" + (string-append "infodir=" info-dir) + make-flags)) + ;; Create a symlink, for convenience. + (symlink info (string-append info-dir + "/uboot.info.gz")))))))) + (native-inputs + (modify-inputs (package-native-inputs u-boot) + (append fontconfig + python-sphinx + texinfo + which))) + (synopsis "U-Boot documentation") + (description "This package provides the documentation for U-Boot, as an +Info manual."))) + (define-public u-boot-tools (package (inherit u-boot) diff --git a/gnu/packages/patches/u-boot-infodocs-target.patch b/gnu/packages/patches/u-boot-infodocs-target.patch new file mode 100644 index 0000000000..ba32f1913a --- /dev/null +++ b/gnu/packages/patches/u-boot-infodocs-target.patch @@ -0,0 +1,61 @@ +Submitted upstream on Dec 16th, 2022. + +diff --git a/Makefile b/Makefile +index de5746399a..597a8886c3 100644 +--- a/Makefile ++++ b/Makefile +@@ -2372,7 +2372,7 @@ tcheck: + # Documentation targets + # --------------------------------------------------------------------------- + DOC_TARGETS := xmldocs latexdocs pdfdocs htmldocs epubdocs cleandocs \ +- linkcheckdocs dochelp refcheckdocs ++ linkcheckdocs dochelp refcheckdocs texinfodocs infodocs + PHONY += $(DOC_TARGETS) + $(DOC_TARGETS): scripts_basic FORCE + $(Q)$(MAKE) $(build)=doc $@ +diff --git a/doc/Makefile b/doc/Makefile +index f5de65e927..62effd0fec 100644 +--- a/doc/Makefile ++++ b/doc/Makefile +@@ -69,6 +69,15 @@ quiet_cmd_sphinx = SPHINX $@ --> file://$(abspath $(BUILDDIR)/$3/$4) + htmldocs: + @+$(foreach var,$(SPHINXDIRS),$(call loop_cmd,sphinx,html,$(var),,$(var))) + ++texinfodocs: ++ @$(srctree)/scripts/sphinx-pre-install --version-check ++ @+$(foreach var,$(SPHINXDIRS),$(call loop_cmd,sphinx,texinfo,$(var),texinfo,$(var))) ++ ++# Note: the 'info' Make target is generated by sphinx itself when ++# running the texinfodocs target defined above. ++infodocs: texinfodocs ++ $(MAKE) -C $(BUILDDIR)/texinfo info ++ + linkcheckdocs: + @$(foreach var,$(SPHINXDIRS),$(call loop_cmd,sphinx,linkcheck,$(var),,$(var))) + +@@ -109,6 +118,8 @@ cleandocs: + dochelp: + @echo ' U-Boot documentation in different formats from ReST:' + @echo ' htmldocs - HTML' ++ @echo ' texinfodocs - Texinfo' ++ @echo ' infodocs - Info' + @echo ' latexdocs - LaTeX' + @echo ' pdfdocs - PDF' + @echo ' epubdocs - EPUB' +diff --git a/doc/media/Makefile b/doc/media/Makefile +index b9b43a34c3..9b32258696 100644 +--- a/doc/media/Makefile ++++ b/doc/media/Makefile +@@ -22,10 +22,11 @@ $(BUILDDIR)/linker_lists.h.rst: ${API}/linker_lists.h ${PARSER} $(SRC_DIR)/linke + + # Media build rules + +-.PHONY: all html epub xml latex ++.PHONY: all html texinfo epub xml latex + + all: $(IMGDOT) $(BUILDDIR) ${TARGETS} + html: all ++texinfo: all + epub: all + xml: all + latex: $(IMGPDF) all From patchwork Sat Dec 17 04:35:49 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxim Cournoyer X-Patchwork-Id: 45388 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 C5C2527BBED; Sat, 17 Dec 2022 04:37:14 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-3.7 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,URIBL_BLOCKED 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 58B7527BBE9 for ; Sat, 17 Dec 2022 04:37:13 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p6Owb-00047C-HI; Fri, 16 Dec 2022 23:37:05 -0500 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 1p6OwZ-00045w-M3 for guix-patches@gnu.org; Fri, 16 Dec 2022 23:37:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1p6OwZ-00061j-7w for guix-patches@gnu.org; Fri, 16 Dec 2022 23:37:03 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1p6OwY-0001lM-Tx for guix-patches@gnu.org; Fri, 16 Dec 2022 23:37:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#60145] [PATCH 2/2] gnu: Add patman. Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 17 Dec 2022 04:37:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 60145 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 60145@debbugs.gnu.org Cc: vagrant@debian.org, Maxim Cournoyer Received: via spool by 60145-submit@debbugs.gnu.org id=B60145.16712517876756 (code B ref 60145); Sat, 17 Dec 2022 04:37:02 +0000 Received: (at 60145) by debbugs.gnu.org; 17 Dec 2022 04:36:27 +0000 Received: from localhost ([127.0.0.1]:53635 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p6Ovy-0001ks-Pf for submit@debbugs.gnu.org; Fri, 16 Dec 2022 23:36:27 -0500 Received: from mail-qt1-f171.google.com ([209.85.160.171]:35787) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p6Ovx-0001kf-8F for 60145@debbugs.gnu.org; Fri, 16 Dec 2022 23:36:25 -0500 Received: by mail-qt1-f171.google.com with SMTP id h26so509427qtu.2 for <60145@debbugs.gnu.org>; Fri, 16 Dec 2022 20:36:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; 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=hJgIMz5b1IirLsFOY2+I3tLAc1RqR/4ktOZMSNsmh04=; b=MAOe6Xn1hW+bTsYefN+tMmeFVQlR1/PsXr1xjRoA7cRbQsz80lMf8uz4oo1xQaeDpr IDtdLUCdOGGjfPR67VHTgecwNRfHp0n2oVVWOtVEb8HRlyB+6bE/RQvv3tHYZFD3XQzz nvA5uIDV8amzwVbemYtHN4yNSRR+hM08itCSSH89NIohyg9TXH4Jiw2OPNsZ6DTfVd6r CLK7MOcXKRhlkKvgQ+gVbtuP/tt3HhcCUYXPxQgnZiHiGoOqgvZzpv9wb2+Nf2Nt7rI9 dR8JU5SJGGnLdPNU5HTfNg8mvTfBUpGvjXmCFK57h2HbCjnFskQ9514qo60Cdj37dIga cfWg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=hJgIMz5b1IirLsFOY2+I3tLAc1RqR/4ktOZMSNsmh04=; b=fRNULO6TDecDVbWcEVzcymPZXBN0wHoSHZcU72eb9EN6qPL4jz6pVvz47Aq9ww9suD UDaiTNyBKA+JJLu7FwPg/VA9Did2tbqGsW/1+xsbY6FptmkshcvLpEYEN4uflpLpskQp gUS/Hvnkji2whkEooIYgaUsWS9h7hW1XFj80Xjti0FFeipvBTifp6siEzAG4siZmjsYY hjFaIRFvie588y8I3A2OhTmN+RgYF8JKqIIiBzEgf1OzFA9uDRiEgqjPO7Qu5XaaVUNn AZZVSaGrB5GM1lsCcsneBJh1qxcBWc5UU3w8hWwgS3tXJKkUT3Oh57H3wGNADKtTbiSf Sc+Q== X-Gm-Message-State: ANoB5pn2n+hY1oLdlH1zUKjRKeDKfHLcqMo8JzOtTOzPnjUVRIc4D7FA 2j1tfIZsWyTdt7g9JDB5n3JcAjiocZuJu3w5 X-Google-Smtp-Source: AA0mqf5Y0Kw+egyyaD+j0prhYRB7vqev6ZfrRn4y7DaAHqzYO7554XCb4GHsqOV3GRifdvSFjN9krw== X-Received: by 2002:ac8:6b4e:0:b0:3a8:2a89:d57d with SMTP id x14-20020ac86b4e000000b003a82a89d57dmr19256185qts.67.1671251779480; Fri, 16 Dec 2022 20:36:19 -0800 (PST) Received: from localhost.localdomain (dsl-159-157.b2b2c.ca. [66.158.159.157]) by smtp.gmail.com with ESMTPSA id ci27-20020a05622a261b00b003a580cd979asm2479291qtb.58.2022.12.16.20.36.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 16 Dec 2022 20:36:19 -0800 (PST) From: Maxim Cournoyer Date: Fri, 16 Dec 2022 23:35:49 -0500 Message-Id: <20221217043549.23069-2-maxim.cournoyer@gmail.com> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221217043549.23069-1-maxim.cournoyer@gmail.com> References: <20221217043549.23069-1-maxim.cournoyer@gmail.com> 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 * gnu/packages/bootloaders.scm (patman): New variable. * gnu/packages/patches/u-boot-patman-fix-help.patch: New patch. * gnu/local.mk (dist_patch_DATA): Register it. --- gnu/local.mk | 1 + gnu/packages/bootloaders.scm | 34 +++++++++++++++- .../patches/u-boot-patman-fix-help.patch | 40 +++++++++++++++++++ 3 files changed, 74 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/u-boot-patman-fix-help.patch diff --git a/gnu/local.mk b/gnu/local.mk index 8ae21641d7..456d955616 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1924,6 +1924,7 @@ dist_patch_DATA = \ %D%/packages/patches/twinkle-bcg729.patch \ %D%/packages/patches/u-boot-allow-disabling-openssl.patch \ %D%/packages/patches/u-boot-infodocs-target.patch \ + %D%/packages/patches/u-boot-patman-fix-help.patch \ %D%/packages/patches/u-boot-nintendo-nes-serial.patch \ %D%/packages/patches/u-boot-rockchip-inno-usb.patch \ %D%/packages/patches/u-boot-sifive-prevent-reloc-initrd-fdt.patch \ diff --git a/gnu/packages/bootloaders.scm b/gnu/packages/bootloaders.scm index f52b2130ac..335b5a56d8 100644 --- a/gnu/packages/bootloaders.scm +++ b/gnu/packages/bootloaders.scm @@ -69,7 +69,10 @@ (define-module (gnu packages bootloaders) #:use-module (gnu packages valgrind) #:use-module (gnu packages virtualization) #:use-module (gnu packages xorg) + #:use-module (gnu packages python-web) + #:use-module (gnu packages python-xyz) #:use-module (guix build-system gnu) + #:use-module (guix build-system pyproject) #:use-module (guix build-system trivial) #:use-module (guix download) #:use-module (guix gexp) @@ -640,7 +643,8 @@ (define u-boot %u-boot-allow-disabling-openssl-patch %u-boot-sifive-prevent-relocating-initrd-fdt %u-boot-rk3399-enable-emmc-phy-patch - (search-patch "u-boot-infodocs-target.patch"))) + (search-patch "u-boot-infodocs-target.patch") + (search-patch "u-boot-patman-fix-help.patch"))) (method url-fetch) (uri (string-append "https://ftp.denx.de/pub/u-boot/" @@ -822,6 +826,34 @@ (define-public u-boot-tools " This package provides board-independent tools " "of U-Boot.")))) +;;; This is packaged separately, as it can be used in other contexts than for +;;; U-Boot development. +(define-public patman + (package + (inherit u-boot) + (name "patman") + (build-system pyproject-build-system) + (arguments + ;; The test suite strongly relies on the git metadata being available (23 + ;; failed, 14 passed). + (list + #:tests? #f + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'chdir + (lambda _ + (chdir "tools/patman")))))) + (inputs (list python-pygit2 python-requests)) + (synopsis "Patch automation tool") + (description "Patman is a patch automation script which: +@itemize +@item Creates patches directly from your branch +@item Cleans them up by removing unwanted tags +@item Inserts a cover letter with change lists +@item Runs the patches through automated checks +@item Optionally emails them out to selected people. +@end itemize"))) + (define*-public (make-u-boot-package board triplet #:key defconfig diff --git a/gnu/packages/patches/u-boot-patman-fix-help.patch b/gnu/packages/patches/u-boot-patman-fix-help.patch new file mode 100644 index 0000000000..15b1aa3b55 --- /dev/null +++ b/gnu/packages/patches/u-boot-patman-fix-help.patch @@ -0,0 +1,40 @@ +Submitted upstream on Dec 16th, 2022. + +diff --git a/tools/patman/main.py b/tools/patman/main.py +index 5a7756a221..bf300c6e64 100755 +--- a/tools/patman/main.py ++++ b/tools/patman/main.py +@@ -7,6 +7,7 @@ + """See README for more information""" + + from argparse import ArgumentParser ++import importlib.resources + import os + import re + import shutil +@@ -163,11 +164,8 @@ elif args.cmd == 'send': + fd.close() + + elif args.full_help: +- tools.print_full_help( +- os.path.join(os.path.dirname(os.path.realpath(sys.argv[0])), +- 'README.rst') +- ) +- ++ with importlib.resources.path('patman', 'README.rst') as readme: ++ tools.print_full_help(str(readme)) + else: + # If we are not processing tags, no need to warning about bad ones + if not args.process_tags: +diff --git a/tools/patman/setup.py b/tools/patman/setup.py +index 43fdc00ce6..ce9bb4aa63 100644 +--- a/tools/patman/setup.py ++++ b/tools/patman/setup.py +@@ -7,6 +7,6 @@ setup(name='patman', + scripts=['patman'], + packages=['patman'], + package_dir={'patman': ''}, +- package_data={'patman': ['README']}, ++ package_data={'patman': ['README.rst']}, + classifiers=['Environment :: Console', + 'Topic :: Software Development'])