From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id oPo7AYpHnWPUQAAAbAwnHQ (envelope-from ) for ; Sat, 17 Dec 2022 05:37:30 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id CEolAYpHnWMzQAAA9RJhRA (envelope-from ) for ; Sat, 17 Dec 2022 05:37:30 +0100 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 E444B2C98A for ; Sat, 17 Dec 2022 05:37:28 +0100 (CET) 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 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit 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+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1671251849; h=from:from:sender:sender: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=sQfUFiYc7JfRWZyGeg0Wb/7u7kJuEqYrdejJac8yiQg=; b=cxFpoyViPizrIQvGXKCVL85nDzuSB0gDvYqZhBv6dsGOynfktVKp8W7uhF5OodUZtBidhi j0Y1mL7Cs+uMoNU2ScghB3a40pKzIJJjgfmGCGiD2gqOJjwDwS5fbYikoxOJahBbs9n63A 2QYWbmy+Fk58cDBHLs1Xh87cLlxdkUtNFyJPOK5ZYCsaaO050LM961TSAFrPgkLcZgb+sG B0e73Lg/UdBH0dgZ/Q/d7qLQxhjAMEDjYA4WcLDIpIzXjDBbKWld9C7htZmuMnM4E1J8aw C+4Ft/7DxMxZKYGWVOKd0m7nn/+fc+SZrOt1fBIhJuuJDSzLCg7qfkKLtMevDQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=dU9sk41K; 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=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none) ARC-Seal: i=1; s=key1; d=yhetil.org; t=1671251849; a=rsa-sha256; cv=none; b=FvocyzSskFjanBHCPInwOz5O6Oe38heNMAknFf8XmY3ElVej8wuc2JIqtc1lpVYbUiZgGo hUb+hGr9u7nDDYMZTurLHgZBCrvSMUQGbqcqpirJcRsNytSuM+5D8jbtOb47iJ6GckLGwj M7sbuavO2qmjIlU1KLJB13PcrmkbVW8tzA/ZC6HbmUNoy0ZUTjMg0JXau1+iq5IP7uwGIM 7b51NCohGRsM8kK4wODt0zZVLLp6bZY0a70AQeq66z1jCCmQLR7KZ9+bTRx055IhGdoZXX PsqD44QrKpw1C08jvlxoNfUcjvKKe/LYh6Ey7HgKt4ku1YdF6Ba44sNu6axVag== X-Migadu-Spam-Score: -0.88 X-Spam-Score: -0.88 X-Migadu-Queue-Id: E444B2C98A X-Migadu-Scanner: scn0.migadu.com Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=dU9sk41K; 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=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none) X-TUID: Pk3z7copLKtq * 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 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 base-commit: 90a2b8c64a0155a1cd663ee5408dc6bb09d64123 -- 2.38.1