From debbugs-submit-bounces@debbugs.gnu.org Wed Nov 16 11:56:25 2022 Received: (at submit) by debbugs.gnu.org; 16 Nov 2022 16:56:25 +0000 Received: from localhost ([127.0.0.1]:57990 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ovLi4-00080O-Gn for submit@debbugs.gnu.org; Wed, 16 Nov 2022 11:56:25 -0500 Received: from lists.gnu.org ([209.51.188.17]:37894) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ovLhz-00080D-VO for submit@debbugs.gnu.org; Wed, 16 Nov 2022 11:56:22 -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 1ovLhz-0000Z9-Ef for guix-patches@gnu.org; Wed, 16 Nov 2022 11:56:19 -0500 Received: from mail-qk1-x72e.google.com ([2607:f8b0:4864:20::72e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ovLhv-0005vT-K2 for guix-patches@gnu.org; Wed, 16 Nov 2022 11:56:18 -0500 Received: by mail-qk1-x72e.google.com with SMTP id x21so12066354qkj.0 for ; Wed, 16 Nov 2022 08:56:15 -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=bHbeul0UdOWA9ZDXTIreRCOWwHxTzapalWVdmT0cIrk=; b=ARSZva3eSJEW1/fuZPTSCyHAaaLWYk2khQcQ5e1m0Nvma+yG0FIRHyvlxhtTHY/T0O /6fcG66E3Fj3HEXY3FYWNuZ72lS7vwZeY0Z5laDV+oUvbyR6qmdi9gLBlVdavm+BhoaZ 9MV7cZ3fxCbaoyw4bTwq3aI9c8xIFlIMjGdF3BImhIV4k/X5ZjlJogoRRWY+PSS4qaZl vdcwqh8QacT48VkqORX/t5j0lX6cKcDI6hjdjZpqHBcwLPLRnaIMG2Om+TJIAHhQfwfH 3Dx9q4BJWwr7SFzAWgZ1zy/FVCV832P4PZ2pUqW8QrdEj+YxLK1EklDxdPdfS4Uu4wTk d77g== 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=bHbeul0UdOWA9ZDXTIreRCOWwHxTzapalWVdmT0cIrk=; b=DY8/H46R+3xj6gUp9T6m0bffOFXX49YKRR4fNYRjG5p0j+iJPdA3zLNDcPwITYdFpU gGK1F/EMskbQjIzKx6XB5QV+rAQIC6NKu37i0oCkUW0stxAgyPOOl+riwITbNN/1U4AX 0kh+A0AwXo9jqCuDtAAB4VPDvGsZt4NjekMzPXceWeps1eqN51939xBvJL47qqlHUP5x iPRbrMSYkJMhL67henIRyqINb+zgaHVeJTivEf5x0kBjevjE0cJueC7YwMHHIGaHQVyh /YZhiES++iC39xkgo92a1jMx1QIrNsDjQLM2kZSg1q/on/VgYWadgXl9dUXoWp6gvkbB LuAA== X-Gm-Message-State: ANoB5pkBkib8j57MGnfrOtII0nUIfB6lgyAk037RXMae7M1X1y5vlrsG qzIgQqie/k084N/4lIRqoIDHPamv62sWGA== X-Google-Smtp-Source: AA0mqf4VNwXtRjIeKnu5r1UK94n264ddKya2txx/As5T4ek9jVxF6FdWnxiOKnp4MPYxeMjL+7cQig== X-Received: by 2002:a05:620a:2623:b0:6fb:9b7e:7e5b with SMTP id z35-20020a05620a262300b006fb9b7e7e5bmr8691900qko.483.1668617773937; Wed, 16 Nov 2022 08:56:13 -0800 (PST) Received: from localhost.localdomain (dsl-10-133-21.b2b2c.ca. [72.10.133.21]) by smtp.gmail.com with ESMTPSA id w21-20020ac843d5000000b0039c72bb51f3sm8877931qtn.86.2022.11.16.08.56.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 16 Nov 2022 08:56:13 -0800 (PST) From: Maxim Cournoyer To: guix-patches@gnu.org Subject: [PATCH] gnu: linux-libre: Enable building html and info doc. Date: Wed, 16 Nov 2022 11:55:51 -0500 Message-Id: <20221116165551.23244-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 Received-SPF: pass client-ip=2607:f8b0:4864:20::72e; envelope-from=maxim.cournoyer@gmail.com; helo=mail-qk1-x72e.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: submit Cc: Maxim Cournoyer 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/packages/patches/linux-libre-infodocs-target.patch: New file. * gnu/local.mk (dist_patch_DATA): Register it. (linux-libre-6.0-source, linux-libre-5.15-source, linux-libre-5.10-source) (linux-libre-5.4-source, linux-libre-4.19-source) (linux-libre-4.9-source): Apply above patch. * gnu/packages/linux.scm (make-linux-libre): Add new patch in the default patches used. Add a BUILD-DOC? argument. (make-linux-libre*): Add a BUILD-DOC? argument. [outputs]: New field. [phases]: Conditionally add the build-doc and install-doc phases. [native-inputs]: Conditionally add graphviz, python, python-sphinx, python-sphinx-rtd-theme, texinfo and which. --- gnu/local.mk | 3 +- gnu/packages/linux.scm | 280 ++++++++++-------- .../patches/linux-libre-infodocs-target.patch | 88 ++++++ 3 files changed, 253 insertions(+), 118 deletions(-) create mode 100644 gnu/packages/patches/linux-libre-infodocs-target.patch diff --git a/gnu/local.mk b/gnu/local.mk index 71472f8410..83cd160864 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1481,7 +1481,8 @@ dist_patch_DATA = \ %D%/packages/patches/lierolibre-remove-arch-warning.patch \ %D%/packages/patches/lierolibre-try-building-other-arch.patch \ %D%/packages/patches/linbox-fix-pkgconfig.patch \ - %D%/packages/patches/linphone-desktop-without-sdk.patch \ + %D%/packages/patches/linphone-desktop-without-sdk.patch \ + %D%/packages/patches/linux-libre-infodocs-target.patch \ %D%/packages/patches/linux-libre-support-for-Pinebook-Pro.patch \ %D%/packages/patches/linux-pam-no-setfsuid.patch \ %D%/packages/patches/linuxdcpp-openssl-1.1.patch \ diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm index a879dcba8d..c45a54233c 100644 --- a/gnu/packages/linux.scm +++ b/gnu/packages/linux.scm @@ -33,7 +33,7 @@ ;;; Copyright © 2018, 2019 Pierre Langlois ;;; Copyright © 2018 Vasile Dumitrascu ;;; Copyright © 2019 Tim Gesthuizen -;;; Copyright © 2019, 2020, 2021 Maxim Cournoyer +;;; Copyright © 2019, 2020, 2021, 2022 Maxim Cournoyer ;;; Copyright © 2019 Stefan Stefanović ;;; Copyright © 2019-2022 Brice Waegeneire ;;; Copyright © 2019 Kei Kebreau @@ -119,6 +119,7 @@ (define-module (gnu packages linux) #:use-module (gnu packages gnupg) #:use-module (gnu packages golang) #:use-module (gnu packages gperf) + #:use-module (gnu packages graphviz) #:use-module (gnu packages gstreamer) #:use-module (gnu packages gtk) #:use-module (gnu packages haskell-apps) @@ -494,17 +495,20 @@ (define (source-with-patches source patches) (define-public linux-libre-6.0-source (source-with-patches linux-libre-6.0-pristine-source (list %boot-logo-patch - %linux-libre-arm-export-__sync_icache_dcache-patch))) + %linux-libre-arm-export-__sync_icache_dcache-patch + (search-patch "linux-libre-infodocs-target.patch")))) (define-public linux-libre-5.15-source (source-with-patches linux-libre-5.15-pristine-source (list %boot-logo-patch - %linux-libre-arm-export-__sync_icache_dcache-patch))) + %linux-libre-arm-export-__sync_icache_dcache-patch + (search-patch "linux-libre-infodocs-target.patch")))) (define-public linux-libre-5.10-source (source-with-patches linux-libre-5.10-pristine-source (list %boot-logo-patch - %linux-libre-arm-export-__sync_icache_dcache-patch))) + %linux-libre-arm-export-__sync_icache_dcache-patch + (search-patch "linux-libre-infodocs-target.patch")))) (define-public linux-libre-5.4-source (source-with-patches linux-libre-5.4-pristine-source @@ -512,21 +516,25 @@ (define-public linux-libre-5.4-source %linux-libre-arm-export-__sync_icache_dcache-patch ;; Pinebook Pro patch from linux-next, ;; can be dropped for linux-libre 5.7 - (search-patch - "linux-libre-support-for-Pinebook-Pro.patch")))) + (search-patches + "linux-libre-support-for-Pinebook-Pro.patch" + "linux-libre-infodocs-target.patch")))) (define-public linux-libre-4.19-source (source-with-patches linux-libre-4.19-pristine-source (list %boot-logo-patch - %linux-libre-arm-export-__sync_icache_dcache-patch))) + %linux-libre-arm-export-__sync_icache_dcache-patch + (search-patch "linux-libre-infodocs-target.patch")))) (define-public linux-libre-4.14-source (source-with-patches linux-libre-4.14-pristine-source - (list %boot-logo-patch))) + (list %boot-logo-patch + (search-patch "linux-libre-infodocs-target.patch")))) (define-public linux-libre-4.9-source (source-with-patches linux-libre-4.9-pristine-source - (list %boot-logo-patch))) + (list %boot-logo-patch + (search-patch "linux-libre-infodocs-target.patch")))) ;;; @@ -767,7 +775,11 @@ (define* (make-linux-libre version gnu-revision hash-string supported-systems (configuration-file #f) (defconfig "defconfig") (extra-options %default-extra-linux-options) - (patches (list %boot-logo-patch))) + (patches + (list %boot-logo-patch + (search-patch + "linux-libre-infodocs-target.patch"))) + (build-doc? #t)) (make-linux-libre* version gnu-revision (origin (method url-fetch) @@ -778,7 +790,8 @@ (define* (make-linux-libre version gnu-revision hash-string supported-systems #:extra-version extra-version #:configuration-file configuration-file #:defconfig defconfig - #:extra-options extra-options)) + #:extra-options extra-options + #:build-doc? build-doc?)) (define* (make-linux-libre* version gnu-revision source supported-systems #:key @@ -787,7 +800,8 @@ (define* (make-linux-libre* version gnu-revision source supported-systems ;; See kernel-config for an example. (configuration-file #f) (defconfig "defconfig") - (extra-options %default-extra-linux-options)) + (extra-options %default-extra-linux-options) + (build-doc? #t)) (package (name (if extra-version (string-append "linux-libre-" extra-version) @@ -795,12 +809,135 @@ (define* (make-linux-libre* version gnu-revision source supported-systems (version version) (source source) (supported-systems supported-systems) + (outputs `("out" + ,@(if build-doc? '("doc") '()))) (build-system gnu-build-system) + (arguments + (list + #:modules '((guix build gnu-build-system) + (guix build utils) + (srfi srfi-1) + (srfi srfi-26) + (ice-9 ftw) + (ice-9 match)) + #:tests? #f + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'patch-/bin/pwd + (lambda _ + (substitute* (find-files + "." "^Makefile(\\.include)?$") + (("/bin/pwd") "pwd")))) + #$@(if build-doc? + #~((add-before 'configure 'build-doc + (lambda _ + (substitute* "Documentation/Makefile" + ;; Remove problematic environment check script. + ((".*scripts/sphinx-pre-install.*") "")) + (invoke "make" "infodocs" "htmldocs"))) + (add-after 'build-doc 'install-doc + (lambda _ + (with-directory-excursion "Documentation/output" + (let ((docdir (string-append + #$output:doc + "/share/doc/linux-libre/html"))) + (mkdir-p docdir) + (copy-recursively "html" docdir)) + (invoke "make" "-C" "texinfo" "install-info" + (string-append "infodir=" #$output + "/share/info")))))) + #~()) + (replace 'configure + (lambda* (#:key inputs target #:allow-other-keys) + ;; Avoid introducing timestamps. + (setenv "KCONFIG_NOTIMESTAMP" "1") + (setenv "KBUILD_BUILD_TIMESTAMP" (getenv "SOURCE_DATE_EPOCH")) + + ;; Other variables useful for reproducibility. + (setenv "KBUILD_BUILD_USER" "guix") + (setenv "KBUILD_BUILD_HOST" "guix") + + ;; Set ARCH and CROSS_COMPILE. + (let ((arch #$(platform-linux-architecture + (lookup-platform-by-target-or-system + (or (%current-target-system) + (%current-system)))))) + (setenv "ARCH" arch) + (format #t "`ARCH' set to `~a'~%" (getenv "ARCH")) + + (when target + (setenv "CROSS_COMPILE" (string-append target "-")) + (format #t "`CROSS_COMPILE' set to `~a'~%" + (getenv "CROSS_COMPILE")))) + + (setenv "EXTRAVERSION" + #$(and extra-version + (string-append "-" extra-version))) + + (let ((config (assoc-ref inputs "kconfig"))) + + ;; Use a custom kernel configuration file or a default + ;; configuration file. + (if config + (begin + (copy-file config ".config") + (chmod ".config" #o666)) + (invoke "make" #$defconfig)) + + ;; Appending works even when the option wasn't in the + ;; file. The last one prevails if duplicated. + (let ((port (open-file ".config" "a")) + (extra-configuration #$(config->string extra-options))) + (display extra-configuration port) + (close-port port)) + + (invoke "make" "oldconfig")))) + (replace 'install + (lambda* (#:key inputs native-inputs #:allow-other-keys) + (let ((moddir (string-append #$output "/lib/modules")) + (dtbdir (string-append #$output "/lib/dtbs"))) + ;; Install kernel image, kernel configuration and link map. + (for-each (lambda (file) (install-file file #$output)) + (find-files "." "^(\\.config|bzImage|zImage|Image\ +|vmlinuz|System\\.map|Module\\.symvers)$")) + ;; Install device tree files + (unless (null? (find-files "." "\\.dtb$")) + (mkdir-p dtbdir) + (invoke "make" (string-append "INSTALL_DTBS_PATH=" dtbdir) + "dtbs_install")) + ;; Install kernel modules + (mkdir-p moddir) + (invoke "make" + ;; Disable depmod because the Guix system's + ;; module directory is an union of potentially + ;; multiple packages. It is not possible to use + ;; depmod to usefully calculate a dependency + ;; graph while building only one of them. + "DEPMOD=true" + (string-append "MODULE_DIR=" moddir) + (string-append "INSTALL_PATH=" #$output) + (string-append "INSTALL_MOD_PATH=" #$output) + "INSTALL_MOD_STRIP=1" + "modules_install") + (let* ((versions (filter (lambda (name) + (not (string-prefix? "." name))) + (scandir moddir))) + (version (match versions + ((x) x)))) + ;; There are symlinks to the build and source directory. + ;; Both will point to target /tmp/guix-build* and thus + ;; not be useful in a profile. Delete the symlinks. + (false-if-file-not-found + (delete-file + (string-append moddir "/" version "/build"))) + (false-if-file-not-found + (delete-file + (string-append moddir "/" version "/source")))))))))) (native-inputs `(("perl" ,perl) ("bc" ,bc) ("openssl" ,openssl) - ("elfutils" ,elfutils) ; Needed to enable CONFIG_STACK_VALIDATION + ("elfutils" ,elfutils) ;needed to enable CONFIG_STACK_VALIDATION ("flex" ,flex) ("bison" ,bison) @@ -809,6 +946,16 @@ (define* (make-linux-libre* version gnu-revision source supported-systems ("mpfr" ,mpfr) ("mpc" ,mpc) + ;; For generating the documentation. + ,@(if build-doc? + `(("graphviz" ,graphviz) + ("python" ,python) + ("python-sphinx" ,python-sphinx) + ("python-sphinx-rtd-theme" ,python-sphinx-rtd-theme) + ("texinfo" ,texinfo) + ("which" ,which)) + '()) + ,@(match (let ((arch (platform-linux-architecture (lookup-platform-by-target-or-system (or (%current-target-system) @@ -817,115 +964,14 @@ (define* (make-linux-libre* version gnu-revision source supported-systems (configuration-file arch #:variant (version-major+minor version)))) - (#f ;no config for this platform + (#f ;no config for this platform '()) ((? string? config) `(("kconfig" ,config)))))) - (arguments - (list #:modules '((guix build gnu-build-system) - (guix build utils) - (srfi srfi-1) - (srfi srfi-26) - (ice-9 ftw) - (ice-9 match)) - #:phases - #~(modify-phases %standard-phases - (add-after 'unpack 'patch-/bin/pwd - (lambda _ - (substitute* (find-files "." "^Makefile(\\.include)?$") - (("/bin/pwd") "pwd")))) - (replace 'configure - (lambda* (#:key inputs target #:allow-other-keys) - ;; Avoid introducing timestamps. - (setenv "KCONFIG_NOTIMESTAMP" "1") - (setenv "KBUILD_BUILD_TIMESTAMP" - (getenv "SOURCE_DATE_EPOCH")) - - ;; Other variables useful for reproducibility. - (setenv "KBUILD_BUILD_USER" "guix") - (setenv "KBUILD_BUILD_HOST" "guix") - - ;; Set ARCH and CROSS_COMPILE. - (let ((arch #$(platform-linux-architecture - (lookup-platform-by-target-or-system - (or (%current-target-system) - (%current-system)))))) - (setenv "ARCH" arch) - (format #t "`ARCH' set to `~a'~%" (getenv "ARCH")) - - (when target - (setenv "CROSS_COMPILE" (string-append target "-")) - (format #t "`CROSS_COMPILE' set to `~a'~%" - (getenv "CROSS_COMPILE")))) - - (setenv "EXTRAVERSION" - #$(and extra-version - (string-append "-" extra-version))) - - (let ((config (assoc-ref inputs "kconfig"))) - - ;; Use a custom kernel configuration file or a default - ;; configuration file. - (if config - (begin - (copy-file config ".config") - (chmod ".config" #o666)) - (invoke "make" #$defconfig)) - - ;; Appending works even when the option wasn't in the - ;; file. The last one prevails if duplicated. - (let ((port (open-file ".config" "a")) - (extra-configuration #$(config->string extra-options))) - (display extra-configuration port) - (close-port port)) - - (invoke "make" "oldconfig")))) - (replace 'install - (lambda* (#:key inputs native-inputs #:allow-other-keys) - (let ((moddir (string-append #$output "/lib/modules")) - (dtbdir (string-append #$output "/lib/dtbs"))) - ;; Install kernel image, kernel configuration and link map. - (for-each (lambda (file) (install-file file #$output)) - (find-files "." "^(\\.config|bzImage|zImage|Image|vmlinuz|System\\.map|Module\\.symvers)$")) - ;; Install device tree files - (unless (null? (find-files "." "\\.dtb$")) - (mkdir-p dtbdir) - (invoke "make" (string-append "INSTALL_DTBS_PATH=" dtbdir) - "dtbs_install")) - ;; Install kernel modules - (mkdir-p moddir) - (invoke "make" - ;; Disable depmod because the Guix system's - ;; module directory is an union of potentially - ;; multiple packages. It is not possible to use - ;; depmod to usefully calculate a dependency - ;; graph while building only one of them. - "DEPMOD=true" - (string-append "MODULE_DIR=" moddir) - (string-append "INSTALL_PATH=" #$output) - (string-append "INSTALL_MOD_PATH=" #$output) - "INSTALL_MOD_STRIP=1" - "modules_install") - (let* ((versions (filter (lambda (name) - (not (string-prefix? "." name))) - (scandir moddir))) - (version (match versions - ((x) x)))) - ;; There are symlinks to the build and source directory. - ;; Both will point to target /tmp/guix-build* and thus - ;; not be useful in a profile. Delete the symlinks. - (false-if-file-not-found - (delete-file - (string-append moddir "/" version "/build"))) - (false-if-file-not-found - (delete-file - (string-append moddir "/" version "/source")))))))) - #:tests? #f)) (home-page "https://www.gnu.org/software/linux-libre/") (synopsis "100% free redistribution of a cleaned Linux kernel") - (description - "GNU Linux-Libre is a free (as in freedom) variant of the Linux kernel. -It has been modified to remove all non-free binary blobs.") + (description "GNU Linux-Libre is a free (as in freedom) variant of the +Linux kernel. It has been modified to remove all non-free binary blobs.") (license license:gpl2) (properties '((max-silent-time . 3600))))) ;don't timeout on blob scan. diff --git a/gnu/packages/patches/linux-libre-infodocs-target.patch b/gnu/packages/patches/linux-libre-infodocs-target.patch new file mode 100644 index 0000000000..e9e6495c26 --- /dev/null +++ b/gnu/packages/patches/linux-libre-infodocs-target.patch @@ -0,0 +1,88 @@ +Upstream status: https://marc.info/?l=linux-doc&m=166861669723994&w=2 + +From 7edb5b278ee383ff9bed525329b2cdbe22317bf2 Mon Sep 17 00:00:00 2001 +From: Maxim Cournoyer +Date: Mon, 14 Nov 2022 22:51:11 -0500 +Subject: [PATCH] doc: add texinfodocs and infodocs targets + +Sphinx supports generating Texinfo sources and Info documentation, +which can be navigated easily and is convenient to search (via the +indexed nodes or anchors, for example). + +This change also causes the html output to appear under its own output +sub-directory, which makes it easier to install, since it's clean from +.doctrees or other output formats. + +Signed-off-by: Maxim Cournoyer +--- + Documentation/Makefile | 13 ++++++++++++- + Documentation/userspace-api/media/Makefile | 3 ++- + Makefile | 2 +- + 3 files changed, 15 insertions(+), 3 deletions(-) + +diff --git a/Documentation/Makefile b/Documentation/Makefile +index 64d44c1ecad3..bd8dac560633 100644 +--- a/Documentation/Makefile ++++ b/Documentation/Makefile +@@ -93,7 +93,16 @@ quiet_cmd_sphinx = SPHINX $@ --> file://$(abspath $(BUILDDIR)/$3/$4) + + htmldocs: + @$(srctree)/scripts/sphinx-pre-install --version-check +- @+$(foreach var,$(SPHINXDIRS),$(call loop_cmd,sphinx,html,$(var),,$(var))) ++ @+$(foreach var,$(SPHINXDIRS),$(call loop_cmd,sphinx,html,$(var),html,$(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 define above. ++infodocs: texinfodocs ++ $(MAKE) -C $(BUILDDIR)/texinfo info + + linkcheckdocs: + @$(foreach var,$(SPHINXDIRS),$(call loop_cmd,sphinx,linkcheck,$(var),,$(var))) +@@ -143,6 +152,8 @@ cleandocs: + dochelp: + @echo ' Linux kernel internal 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/Documentation/userspace-api/media/Makefile b/Documentation/userspace-api/media/Makefile +index 00922aa7efde..3d8aaf5c253b 100644 +--- a/Documentation/userspace-api/media/Makefile ++++ b/Documentation/userspace-api/media/Makefile +@@ -47,10 +47,11 @@ $(BUILDDIR)/lirc.h.rst: ${UAPI}/lirc.h ${PARSER} $(SRC_DIR)/lirc.h.rst.exception + + # 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 +diff --git a/Makefile b/Makefile +index 58cd4f5e1c3a..b3266c408b6c 100644 +--- a/Makefile ++++ b/Makefile +@@ -1785,7 +1785,7 @@ $(help-board-dirs): help-%: + # Documentation targets + # --------------------------------------------------------------------------- + DOC_TARGETS := xmldocs latexdocs pdfdocs htmldocs epubdocs cleandocs \ +- linkcheckdocs dochelp refcheckdocs ++ linkcheckdocs dochelp refcheckdocs texinfodocs infodocs + PHONY += $(DOC_TARGETS) + $(DOC_TARGETS): + $(Q)$(MAKE) $(build)=Documentation $@ + +base-commit: 81e7cfa3a9eb4ba6993a9c71772fdab21bc5d870 +-- +2.38.1 + base-commit: 4073f43cbc2a9e0a5156ff5f950973871bff49e3 -- 2.38.1 From debbugs-submit-bounces@debbugs.gnu.org Sun Nov 20 06:33:29 2022 Received: (at submit) by debbugs.gnu.org; 20 Nov 2022 11:33:29 +0000 Received: from localhost ([127.0.0.1]:42499 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1owiZl-0007ho-BY for submit@debbugs.gnu.org; Sun, 20 Nov 2022 06:33:29 -0500 Received: from lists.gnu.org ([209.51.188.17]:35276) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1owiZi-0007he-OV for submit@debbugs.gnu.org; Sun, 20 Nov 2022 06:33:26 -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 1owiZi-0002RC-K3 for guix-patches@gnu.org; Sun, 20 Nov 2022 06:33:26 -0500 Received: from mira.cbaines.net ([212.71.252.8]) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1owiZg-0004Sf-UL for guix-patches@gnu.org; Sun, 20 Nov 2022 06:33:26 -0500 Received: from localhost (unknown [IPv6:2a02:8010:68c1:0:54d1:d5d4:280e:f699]) by mira.cbaines.net (Postfix) with ESMTPSA id C315027BBE9; Sun, 20 Nov 2022 11:33:23 +0000 (GMT) Received: from felis (localhost [127.0.0.1]) by localhost (OpenSMTPD) with ESMTP id f9ddbf82; Sun, 20 Nov 2022 11:33:23 +0000 (UTC) References: <20221116165551.23244-1-maxim.cournoyer@gmail.com> User-agent: mu4e 1.8.11; emacs 28.2 From: Christopher Baines To: Maxim Cournoyer Subject: Re: [bug#59313] [PATCH] gnu: linux-libre: Enable building html and info doc. Date: Sun, 20 Nov 2022 11:31:54 +0000 In-reply-to: <20221116165551.23244-1-maxim.cournoyer@gmail.com> Message-ID: <87pmdhx3lo.fsf@cbaines.net> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" Received-SPF: pass client-ip=212.71.252.8; envelope-from=mail@cbaines.net; helo=mira.cbaines.net X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.4 (-) X-Debbugs-Envelope-To: submit Cc: 59313@debbugs.gnu.org, guix-patches@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 (--) --=-=-= Content-Type: text/plain Maxim Cournoyer writes: > * gnu/packages/patches/linux-libre-infodocs-target.patch: New file. > * gnu/local.mk (dist_patch_DATA): Register it. > (linux-libre-6.0-source, linux-libre-5.15-source, linux-libre-5.10-source) > (linux-libre-5.4-source, linux-libre-4.19-source) > (linux-libre-4.9-source): Apply above patch. > * gnu/packages/linux.scm (make-linux-libre): Add new patch in the default > patches used. Add a BUILD-DOC? argument. > (make-linux-libre*): Add a BUILD-DOC? argument. > [outputs]: New field. > [phases]: Conditionally add the build-doc and install-doc phases. > [native-inputs]: Conditionally add graphviz, python, python-sphinx, > python-sphinx-rtd-theme, texinfo and which. > --- > gnu/local.mk | 3 +- > gnu/packages/linux.scm | 280 ++++++++++-------- > .../patches/linux-libre-infodocs-target.patch | 88 ++++++ > 3 files changed, 253 insertions(+), 118 deletions(-) > create mode 100644 gnu/packages/patches/linux-libre-infodocs-target.patch Hi, Looking at https://qa.guix.gnu.org/issue/59313 this seems to break the build of linux-libre@5.10.154 on x86_64-linux and linux-libre-arm64-generic@5.10.154 on aarch64-linux, plus maybe some other things. Chris --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQKlBAEBCgCPFiEEPonu50WOcg2XVOCyXiijOwuE9XcFAmN6EINfFIAAAAAALgAo aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDNF ODlFRUU3NDU4RTcyMEQ5NzU0RTBCMjVFMjhBMzNCMEI4NEY1NzcRHG1haWxAY2Jh aW5lcy5uZXQACgkQXiijOwuE9XdHgA/9EKwqSGfR7Ntpg21wm26XIxKUFOWecKiB 99mbIRMskcDMZTceRo43eIHnV3Yqoj1FclRjHd3doHadcMQSutIz6RQMHLemMqm6 7bItroP2hIgZyxFgX/ENgVpgCM6bySBJkJ6MqN/al64hxIcGhyx/eeS3VjvHuBHB rHXqOJ+UfJbeoa0vmBumPpCbB7gBUwKAAhKE4+Iy1i2CXenINjqq2fBTnKXWIZCG NJ2Px5uHdAaxKLc+l/xS2zEPNlMbL+MYYktSfQGl9yyzOWG6xu0WLCQMNn5IOGOX 6BTn8JOWYc1uyTPHnh3wApONrA7b7cFRsUim4TJaymTaxsw1MKq1PlJbWIuqXed2 w5bwlVTuD/htdBg8liFx1KSEPlQbapccOr2kcLv3T4XP3bfTnLwwc8zW5o2bbGh8 kMTioMqRFCwIM/GHhZxQDtZ395JXdOccRt4zjWH1Hh7/jS9KW8wlPS/6riJPU81r giAq0acK7I0QPM03RBt28U9wmyLaPG5qP86FQOjGVMKOgWejZkqO5U8OK/m8y7tj 8izrQfSvR9WH5pWOMEUlNxWSJMsHh10OJxc+pD2DHevh1MxvBPJKrsBvJvEVZlmW iOjwgoIOdx7c4zRwhJ535YIyquPI6r7Pygc6Qm+TYSUVmfOXMmLBCggA1zwlxnJg WpzDvORaTto= =CqYn -----END PGP SIGNATURE----- --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Sun Nov 20 19:57:29 2022 Received: (at 59313) by debbugs.gnu.org; 21 Nov 2022 00:57:29 +0000 Received: from localhost ([127.0.0.1]:44931 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1owv7p-0001Y2-CC for submit@debbugs.gnu.org; Sun, 20 Nov 2022 19:57:29 -0500 Received: from mail-qt1-f179.google.com ([209.85.160.179]:38479) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1owv7m-0001Xm-EU for 59313@debbugs.gnu.org; Sun, 20 Nov 2022 19:57:27 -0500 Received: by mail-qt1-f179.google.com with SMTP id z6so6477452qtv.5 for <59313@debbugs.gnu.org>; Sun, 20 Nov 2022 16:57:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:user-agent:message-id:in-reply-to:date:references :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=hRclns4+MpTToMF2U5ViL+XcRWVvrhiXG/w6lfaLahg=; b=JOQrTdvHgrKcGD8Aq3FjvVfe4M07w0SbeGSg+OsvOp7mXoQP5qCvS+pC0GlhC2HKSx lytZKo+DvJ3eNt37M54CGz+y/Q7YdjxVdADZdATtepLmbHNSWeTzc63Db5onbMQFkKWA uaEggZgwATnTj4qEudp6n4+FzztB8MuZQ067Ssv9Yx8iWDi0cNfYraks1bqeFtdsAxCQ 2WR1o/Evf47KmDw6k/Zz0/k5o0++sNOLRL+9jesPrJnPqUopPEvDUAqtT/6Jjc2wsHIp 5kzxmRrKMuLHt6FALCfk0ezRB/RHhw8nLwdBRjtwAFBxGLXf8MYZDbYcG3cZX6S8xgXy DdTA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:user-agent:message-id:in-reply-to:date:references :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=hRclns4+MpTToMF2U5ViL+XcRWVvrhiXG/w6lfaLahg=; b=bwoNE508scztal5ZG/kCqrUm71egvOSoxwMyrpel/tSG2Gi6gUaXlkct7+7TbjFQpW Ar+488HYlUC/tJnD/h56yK7Rfqp9OSpv03eqW0LwRI+XpzyaZbCd6Fjc25SqhFsbhQ/y LrfS7yTVQ1Ravz6PGV+z//lXci2/FhhCemHRxlMNoNB1n2hDBVEhLyPhFQaqmml0dSFJ E04vpFMMG3h+rFh3M9TpY9oCCrL7IK+4lNaGNY4If7Nd1y5wWbGCPz6ohrGsKv6f0JJW l8+QpMV7S7k1vD2FHPXjMbHsas+XQj3x1J4PJx8i4U/tAMnM1JCKRfs+W0zvHVDd56Cb 9ekg== X-Gm-Message-State: ANoB5pnMsZ8PnjIRUbJfx10cSbaYFvidAWOId+iQyfxuYvmmjqhL7Qrh 7B5MccSUSLBa2LLecx06iC3lS04EB6s= X-Google-Smtp-Source: AA0mqf7Dlin1o0jMYJ2/Zcgl5tx8d2F2ppDo8bKVvN0rpusZuva49y3eYcV/Sn92BLTRbMwD2gGtLg== X-Received: by 2002:a05:622a:5c8e:b0:3a5:5c9e:d453 with SMTP id ge14-20020a05622a5c8e00b003a55c9ed453mr16068455qtb.403.1668992240561; Sun, 20 Nov 2022 16:57:20 -0800 (PST) Received: from hurd (dsl-141-193.b2b2c.ca. [66.158.141.193]) by smtp.gmail.com with ESMTPSA id gc7-20020a05622a59c700b0035ce8965045sm5967824qtb.42.2022.11.20.16.57.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 20 Nov 2022 16:57:19 -0800 (PST) From: Maxim Cournoyer To: Christopher Baines Subject: Re: [bug#59313] [PATCH] gnu: linux-libre: Enable building html and info doc. References: <20221116165551.23244-1-maxim.cournoyer@gmail.com> <87pmdhx3lo.fsf@cbaines.net> Date: Sun, 20 Nov 2022 19:57:18 -0500 In-Reply-To: <87pmdhx3lo.fsf@cbaines.net> (Christopher Baines's message of "Sun, 20 Nov 2022 11:31:54 +0000") Message-ID: <878rk52kgh.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 59313 Cc: 59313@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, Christopher Baines writes: > Maxim Cournoyer writes: > >> * gnu/packages/patches/linux-libre-infodocs-target.patch: New file. >> * gnu/local.mk (dist_patch_DATA): Register it. >> (linux-libre-6.0-source, linux-libre-5.15-source, linux-libre-5.10-source) >> (linux-libre-5.4-source, linux-libre-4.19-source) >> (linux-libre-4.9-source): Apply above patch. >> * gnu/packages/linux.scm (make-linux-libre): Add new patch in the default >> patches used. Add a BUILD-DOC? argument. >> (make-linux-libre*): Add a BUILD-DOC? argument. >> [outputs]: New field. >> [phases]: Conditionally add the build-doc and install-doc phases. >> [native-inputs]: Conditionally add graphviz, python, python-sphinx, >> python-sphinx-rtd-theme, texinfo and which. >> --- >> gnu/local.mk | 3 +- >> gnu/packages/linux.scm | 280 ++++++++++-------- >> .../patches/linux-libre-infodocs-target.patch | 88 ++++++ >> 3 files changed, 253 insertions(+), 118 deletions(-) >> create mode 100644 gnu/packages/patches/linux-libre-infodocs-target.patch > > Hi, > > Looking at https://qa.guix.gnu.org/issue/59313 this seems to break the > build of linux-libre@5.10.154 on x86_64-linux and > linux-libre-arm64-generic@5.10.154 on aarch64-linux, plus maybe some > other things. Thanks for pointing that! The data service is proving useful again! :-). I've made the following changes, which I'll send as v2 shortly: --8<---------------cut here---------------start------------->8--- 1 file changed, 26 insertions(+), 17 deletions(-) gnu/packages/linux.scm | 43 ++++++++++++++++++++++++++----------------- modified gnu/packages/linux.scm @@ -108,8 +108,9 @@ (define-module (gnu packages linux) #:use-module (gnu packages docbook) #:use-module (gnu packages documentation) #:use-module (gnu packages elf) - #:use-module (gnu packages flex) #:use-module (gnu packages file) + #:use-module (gnu packages flex) + #:use-module (gnu packages fontutils) #:use-module (gnu packages freedesktop) #:use-module (gnu packages gawk) #:use-module (gnu packages gcc) @@ -516,25 +517,21 @@ (define-public linux-libre-5.4-source %linux-libre-arm-export-__sync_icache_dcache-patch ;; Pinebook Pro patch from linux-next, ;; can be dropped for linux-libre 5.7 - (search-patches - "linux-libre-support-for-Pinebook-Pro.patch" - "linux-libre-infodocs-target.patch")))) + (search-patch + "linux-libre-support-for-Pinebook-Pro.patch")))) (define-public linux-libre-4.19-source (source-with-patches linux-libre-4.19-pristine-source (list %boot-logo-patch - %linux-libre-arm-export-__sync_icache_dcache-patch - (search-patch "linux-libre-infodocs-target.patch")))) + %linux-libre-arm-export-__sync_icache_dcache-patch))) (define-public linux-libre-4.14-source (source-with-patches linux-libre-4.14-pristine-source - (list %boot-logo-patch - (search-patch "linux-libre-infodocs-target.patch")))) + (list %boot-logo-patch))) (define-public linux-libre-4.9-source (source-with-patches linux-libre-4.9-pristine-source - (list %boot-logo-patch - (search-patch "linux-libre-infodocs-target.patch")))) + (list %boot-logo-patch))) ;;; @@ -767,6 +764,11 @@ (define (config->string options) ;;; Kernel package utilities. ;;; +(define (doc-supported? version) + ;; Versions older than 5.10 have different enough build scripts that the + ;; infodocs patch doesn't apply. + (version>=? version "5.10")) + (define* (make-linux-libre version gnu-revision hash-string supported-systems #:key (extra-version #f) @@ -775,11 +777,13 @@ (define* (make-linux-libre version gnu-revision hash-string supported-systems (configuration-file #f) (defconfig "defconfig") (extra-options %default-extra-linux-options) + (build-doc? (doc-supported? version)) (patches - (list %boot-logo-patch - (search-patch - "linux-libre-infodocs-target.patch"))) - (build-doc? #t)) + `(,%boot-logo-patch + ,@(if build-doc? + (list (search-patch + "linux-libre-infodocs-target.patch")) + '())))) (make-linux-libre* version gnu-revision (origin (method url-fetch) @@ -801,7 +805,9 @@ (define* (make-linux-libre* version gnu-revision source supported-systems (configuration-file #f) (defconfig "defconfig") (extra-options %default-extra-linux-options) - (build-doc? #t)) + (build-doc? (doc-supported? version))) + (when (and build-doc? (not (doc-supported? version))) + (error "unsupported 'build-doc?' for kernels <5.10")) (package (name (if extra-version (string-append "linux-libre-" extra-version) @@ -948,8 +954,11 @@ (define* (make-linux-libre* version gnu-revision source supported-systems ;; For generating the documentation. ,@(if build-doc? - `(("graphviz" ,graphviz) - ("python" ,python) + ;; TODO: remove fontconfig after the 5.10 kernel is dropped. + ;; Also replace python-wrapper by python at that time. + `(("fontconfig" ,fontconfig) + ("graphviz" ,graphviz) + ("python" ,python-wrapper) ("python-sphinx" ,python-sphinx) ("python-sphinx-rtd-theme" ,python-sphinx-rtd-theme) ("texinfo" ,texinfo) --8<---------------cut here---------------end--------------->8--- Any kernel older than 5.10 is now untouched. -- Thanks, Maxim From debbugs-submit-bounces@debbugs.gnu.org Sun Nov 20 20:03:46 2022 Received: (at 59313) by debbugs.gnu.org; 21 Nov 2022 01:03:46 +0000 Received: from localhost ([127.0.0.1]:44936 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1owvDt-0001iQ-Dn for submit@debbugs.gnu.org; Sun, 20 Nov 2022 20:03:46 -0500 Received: from mail-qt1-f181.google.com ([209.85.160.181]:37778) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1owvDq-0001iB-Ca for 59313@debbugs.gnu.org; Sun, 20 Nov 2022 20:03:43 -0500 Received: by mail-qt1-f181.google.com with SMTP id l15so6494031qtv.4 for <59313@debbugs.gnu.org>; Sun, 20 Nov 2022 17:03:42 -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=FiDWVAlohnu0IzEBxSRsA8gyT0EyD2MeO2xesMvL0Wo=; b=DG+4vcxpwEk0D0TpsmODhQ5Sh3jf+itxph22LSBADal60dzEh52bozvR8hkI/V6zqz ywitA07M9zHtDl2NriPu0CJyFMofinZ882lQfgUCBFn4U2cEiJX/+8Agl7K22q9Md8Se 7sc8YB9PsFevZtLNLMWcaV0yzUAxpakcxfo5/xvPcApqA7GwYu3fnsnBw5h1ZH6ndZtA rj3+Af1bS0M/TWR1a7zdXPM7z+SYD03gGUgm58gdW1jugLfWRqoatROiyRRrIlq+WyYh fxZcpBZy4U9VOsUQj/AngGA9YiSUvOnm3EQ7HWstF4Cd8HIH+pH4EoPujGPFdDEXT4nd EwkA== 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=FiDWVAlohnu0IzEBxSRsA8gyT0EyD2MeO2xesMvL0Wo=; b=uJrW5Z1w0kbRE/1KKenkQw4osISvxXJ77vkmJbb7ks6kJ0Al6FTAU5mJICqRT8xp7I gB2UPZ9rmHWA6TEdsichTO7nG1XUh975RV/2aUdr40CN8nYPaXKtXD6oBQR0UMQN3jgv Tz7eS8MiTdhHyYIN5WuVyrxidtPeNRflQvdPPUn7qCyGAIXDoM8OQIDG45cghlckngux mhqUzew4+xugnEZwydkbVBbxpacG0eSv79ihREEfrEhR4Zgji8Tkrw7k07x4crKy8xew rI3PNcJOx1ikQ51V2QoDjPTPTAv9GC8AWjPcsXote4UVBUfinF5cQ+pH1tApRWVJCHx7 UBDg== X-Gm-Message-State: ANoB5pkgfR9AcOb2USk9PpT2oaUeCHhvjNEUdw9kqz5h28Bd4aubmkuR UjaAX3inWdXLuDP7+sS5LqeO2nGDIqA= X-Google-Smtp-Source: AA0mqf6MowcgyTKlelXLxXwcH+5w+JBRP1Ozr1EAMmJhrxyInfhpyt2l/8JCK4ybSosWfmzyPv7BOg== X-Received: by 2002:a05:622a:4d0f:b0:3a5:25d4:2f2c with SMTP id fd15-20020a05622a4d0f00b003a525d42f2cmr1200952qtb.112.1668992616346; Sun, 20 Nov 2022 17:03:36 -0800 (PST) Received: from localhost.localdomain (dsl-141-193.b2b2c.ca. [66.158.141.193]) by smtp.gmail.com with ESMTPSA id k18-20020a05620a415200b006e54251993esm7401512qko.97.2022.11.20.17.03.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 20 Nov 2022 17:03:35 -0800 (PST) From: Maxim Cournoyer To: 59313@debbugs.gnu.org Subject: [PATCH v2] gnu: linux-libre: Enable building html and info doc. Date: Sun, 20 Nov 2022 20:03:24 -0500 Message-Id: <20221121010324.16069-1-maxim.cournoyer@gmail.com> X-Mailer: git-send-email 2.38.1 In-Reply-To: <87pmdhx3lo.fsf@cbaines.net> References: <87pmdhx3lo.fsf@cbaines.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 59313 Cc: mail@cbaines.net, Maxim Cournoyer 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/packages/patches/linux-libre-infodocs-target.patch: New file. * gnu/local.mk (dist_patch_DATA): Register it. (linux-libre-6.0-source, linux-libre-5.15-source) (linux-libre-5.10-source): Apply above patch. (doc-supported?): * gnu/packages/linux.scm (make-linux-libre) [DOC-SUPPORTED?]: Add new patch in the default patches used. Add a BUILD-DOC? argument. (make-linux-libre*): Add a BUILD-DOC? argument. Validate BUILD-DOC? for supported VERSION. [outputs]: New field. [phases]: Conditionally add the build-doc and install-doc phases. [native-inputs]: Conditionally add fontconfig, graphviz, python-wrapper, python-sphinx, python-sphinx-rtd-theme, texinfo and which. --- gnu/local.mk | 3 +- gnu/packages/linux.scm | 281 +++++++++++------- .../patches/linux-libre-infodocs-target.patch | 88 ++++++ 3 files changed, 258 insertions(+), 114 deletions(-) create mode 100644 gnu/packages/patches/linux-libre-infodocs-target.patch diff --git a/gnu/local.mk b/gnu/local.mk index 02cd182f06..5c3908a02a 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1482,7 +1482,8 @@ dist_patch_DATA = \ %D%/packages/patches/lierolibre-remove-arch-warning.patch \ %D%/packages/patches/lierolibre-try-building-other-arch.patch \ %D%/packages/patches/linbox-fix-pkgconfig.patch \ - %D%/packages/patches/linphone-desktop-without-sdk.patch \ + %D%/packages/patches/linphone-desktop-without-sdk.patch \ + %D%/packages/patches/linux-libre-infodocs-target.patch \ %D%/packages/patches/linux-libre-support-for-Pinebook-Pro.patch \ %D%/packages/patches/linux-pam-no-setfsuid.patch \ %D%/packages/patches/linuxdcpp-openssl-1.1.patch \ diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm index 601162b465..288a421fbc 100644 --- a/gnu/packages/linux.scm +++ b/gnu/packages/linux.scm @@ -33,7 +33,7 @@ ;;; Copyright © 2018, 2019 Pierre Langlois ;;; Copyright © 2018 Vasile Dumitrascu ;;; Copyright © 2019 Tim Gesthuizen -;;; Copyright © 2019, 2020, 2021 Maxim Cournoyer +;;; Copyright © 2019, 2020, 2021, 2022 Maxim Cournoyer ;;; Copyright © 2019 Stefan Stefanović ;;; Copyright © 2019-2022 Brice Waegeneire ;;; Copyright © 2019 Kei Kebreau @@ -108,8 +108,9 @@ (define-module (gnu packages linux) #:use-module (gnu packages docbook) #:use-module (gnu packages documentation) #:use-module (gnu packages elf) - #:use-module (gnu packages flex) #:use-module (gnu packages file) + #:use-module (gnu packages flex) + #:use-module (gnu packages fontutils) #:use-module (gnu packages freedesktop) #:use-module (gnu packages gawk) #:use-module (gnu packages gcc) @@ -119,6 +120,7 @@ (define-module (gnu packages linux) #:use-module (gnu packages gnupg) #:use-module (gnu packages golang) #:use-module (gnu packages gperf) + #:use-module (gnu packages graphviz) #:use-module (gnu packages gstreamer) #:use-module (gnu packages gtk) #:use-module (gnu packages haskell-apps) @@ -494,17 +496,20 @@ (define (source-with-patches source patches) (define-public linux-libre-6.0-source (source-with-patches linux-libre-6.0-pristine-source (list %boot-logo-patch - %linux-libre-arm-export-__sync_icache_dcache-patch))) + %linux-libre-arm-export-__sync_icache_dcache-patch + (search-patch "linux-libre-infodocs-target.patch")))) (define-public linux-libre-5.15-source (source-with-patches linux-libre-5.15-pristine-source (list %boot-logo-patch - %linux-libre-arm-export-__sync_icache_dcache-patch))) + %linux-libre-arm-export-__sync_icache_dcache-patch + (search-patch "linux-libre-infodocs-target.patch")))) (define-public linux-libre-5.10-source (source-with-patches linux-libre-5.10-pristine-source (list %boot-logo-patch - %linux-libre-arm-export-__sync_icache_dcache-patch))) + %linux-libre-arm-export-__sync_icache_dcache-patch + (search-patch "linux-libre-infodocs-target.patch")))) (define-public linux-libre-5.4-source (source-with-patches linux-libre-5.4-pristine-source @@ -759,6 +764,11 @@ (define (config->string options) ;;; Kernel package utilities. ;;; +(define (doc-supported? version) + ;; Versions older than 5.10 have different enough build scripts that the + ;; infodocs patch doesn't apply. + (version>=? version "5.10")) + (define* (make-linux-libre version gnu-revision hash-string supported-systems #:key (extra-version #f) @@ -767,7 +777,13 @@ (define* (make-linux-libre version gnu-revision hash-string supported-systems (configuration-file #f) (defconfig "defconfig") (extra-options %default-extra-linux-options) - (patches (list %boot-logo-patch))) + (build-doc? (doc-supported? version)) + (patches + `(,%boot-logo-patch + ,@(if build-doc? + (list (search-patch + "linux-libre-infodocs-target.patch")) + '())))) (make-linux-libre* version gnu-revision (origin (method url-fetch) @@ -778,7 +794,8 @@ (define* (make-linux-libre version gnu-revision hash-string supported-systems #:extra-version extra-version #:configuration-file configuration-file #:defconfig defconfig - #:extra-options extra-options)) + #:extra-options extra-options + #:build-doc? build-doc?)) (define* (make-linux-libre* version gnu-revision source supported-systems #:key @@ -787,7 +804,10 @@ (define* (make-linux-libre* version gnu-revision source supported-systems ;; See kernel-config for an example. (configuration-file #f) (defconfig "defconfig") - (extra-options %default-extra-linux-options)) + (extra-options %default-extra-linux-options) + (build-doc? (doc-supported? version))) + (when (and build-doc? (not (doc-supported? version))) + (error "unsupported 'build-doc?' for kernels <5.10")) (package (name (if extra-version (string-append "linux-libre-" extra-version) @@ -795,12 +815,135 @@ (define* (make-linux-libre* version gnu-revision source supported-systems (version version) (source source) (supported-systems supported-systems) + (outputs `("out" + ,@(if build-doc? '("doc") '()))) (build-system gnu-build-system) + (arguments + (list + #:modules '((guix build gnu-build-system) + (guix build utils) + (srfi srfi-1) + (srfi srfi-26) + (ice-9 ftw) + (ice-9 match)) + #:tests? #f + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'patch-/bin/pwd + (lambda _ + (substitute* (find-files + "." "^Makefile(\\.include)?$") + (("/bin/pwd") "pwd")))) + #$@(if build-doc? + #~((add-before 'configure 'build-doc + (lambda _ + (substitute* "Documentation/Makefile" + ;; Remove problematic environment check script. + ((".*scripts/sphinx-pre-install.*") "")) + (invoke "make" "infodocs" "htmldocs"))) + (add-after 'build-doc 'install-doc + (lambda _ + (with-directory-excursion "Documentation/output" + (let ((docdir (string-append + #$output:doc + "/share/doc/linux-libre/html"))) + (mkdir-p docdir) + (copy-recursively "html" docdir)) + (invoke "make" "-C" "texinfo" "install-info" + (string-append "infodir=" #$output + "/share/info")))))) + #~()) + (replace 'configure + (lambda* (#:key inputs target #:allow-other-keys) + ;; Avoid introducing timestamps. + (setenv "KCONFIG_NOTIMESTAMP" "1") + (setenv "KBUILD_BUILD_TIMESTAMP" (getenv "SOURCE_DATE_EPOCH")) + + ;; Other variables useful for reproducibility. + (setenv "KBUILD_BUILD_USER" "guix") + (setenv "KBUILD_BUILD_HOST" "guix") + + ;; Set ARCH and CROSS_COMPILE. + (let ((arch #$(platform-linux-architecture + (lookup-platform-by-target-or-system + (or (%current-target-system) + (%current-system)))))) + (setenv "ARCH" arch) + (format #t "`ARCH' set to `~a'~%" (getenv "ARCH")) + + (when target + (setenv "CROSS_COMPILE" (string-append target "-")) + (format #t "`CROSS_COMPILE' set to `~a'~%" + (getenv "CROSS_COMPILE")))) + + (setenv "EXTRAVERSION" + #$(and extra-version + (string-append "-" extra-version))) + + (let ((config (assoc-ref inputs "kconfig"))) + + ;; Use a custom kernel configuration file or a default + ;; configuration file. + (if config + (begin + (copy-file config ".config") + (chmod ".config" #o666)) + (invoke "make" #$defconfig)) + + ;; Appending works even when the option wasn't in the + ;; file. The last one prevails if duplicated. + (let ((port (open-file ".config" "a")) + (extra-configuration #$(config->string extra-options))) + (display extra-configuration port) + (close-port port)) + + (invoke "make" "oldconfig")))) + (replace 'install + (lambda* (#:key inputs native-inputs #:allow-other-keys) + (let ((moddir (string-append #$output "/lib/modules")) + (dtbdir (string-append #$output "/lib/dtbs"))) + ;; Install kernel image, kernel configuration and link map. + (for-each (lambda (file) (install-file file #$output)) + (find-files "." "^(\\.config|bzImage|zImage|Image\ +|vmlinuz|System\\.map|Module\\.symvers)$")) + ;; Install device tree files + (unless (null? (find-files "." "\\.dtb$")) + (mkdir-p dtbdir) + (invoke "make" (string-append "INSTALL_DTBS_PATH=" dtbdir) + "dtbs_install")) + ;; Install kernel modules + (mkdir-p moddir) + (invoke "make" + ;; Disable depmod because the Guix system's + ;; module directory is an union of potentially + ;; multiple packages. It is not possible to use + ;; depmod to usefully calculate a dependency + ;; graph while building only one of them. + "DEPMOD=true" + (string-append "MODULE_DIR=" moddir) + (string-append "INSTALL_PATH=" #$output) + (string-append "INSTALL_MOD_PATH=" #$output) + "INSTALL_MOD_STRIP=1" + "modules_install") + (let* ((versions (filter (lambda (name) + (not (string-prefix? "." name))) + (scandir moddir))) + (version (match versions + ((x) x)))) + ;; There are symlinks to the build and source directory. + ;; Both will point to target /tmp/guix-build* and thus + ;; not be useful in a profile. Delete the symlinks. + (false-if-file-not-found + (delete-file + (string-append moddir "/" version "/build"))) + (false-if-file-not-found + (delete-file + (string-append moddir "/" version "/source")))))))))) (native-inputs `(("perl" ,perl) ("bc" ,bc) ("openssl" ,openssl) - ("elfutils" ,elfutils) ; Needed to enable CONFIG_STACK_VALIDATION + ("elfutils" ,elfutils) ;needed to enable CONFIG_STACK_VALIDATION ("flex" ,flex) ("bison" ,bison) @@ -809,6 +952,19 @@ (define* (make-linux-libre* version gnu-revision source supported-systems ("mpfr" ,mpfr) ("mpc" ,mpc) + ;; For generating the documentation. + ,@(if build-doc? + ;; TODO: remove fontconfig after the 5.10 kernel is dropped. + ;; Also replace python-wrapper by python at that time. + `(("fontconfig" ,fontconfig) + ("graphviz" ,graphviz) + ("python" ,python-wrapper) + ("python-sphinx" ,python-sphinx) + ("python-sphinx-rtd-theme" ,python-sphinx-rtd-theme) + ("texinfo" ,texinfo) + ("which" ,which)) + '()) + ,@(match (let ((arch (platform-linux-architecture (lookup-platform-by-target-or-system (or (%current-target-system) @@ -817,115 +973,14 @@ (define* (make-linux-libre* version gnu-revision source supported-systems (configuration-file arch #:variant (version-major+minor version)))) - (#f ;no config for this platform + (#f ;no config for this platform '()) ((? string? config) `(("kconfig" ,config)))))) - (arguments - (list #:modules '((guix build gnu-build-system) - (guix build utils) - (srfi srfi-1) - (srfi srfi-26) - (ice-9 ftw) - (ice-9 match)) - #:phases - #~(modify-phases %standard-phases - (add-after 'unpack 'patch-/bin/pwd - (lambda _ - (substitute* (find-files "." "^Makefile(\\.include)?$") - (("/bin/pwd") "pwd")))) - (replace 'configure - (lambda* (#:key inputs target #:allow-other-keys) - ;; Avoid introducing timestamps. - (setenv "KCONFIG_NOTIMESTAMP" "1") - (setenv "KBUILD_BUILD_TIMESTAMP" - (getenv "SOURCE_DATE_EPOCH")) - - ;; Other variables useful for reproducibility. - (setenv "KBUILD_BUILD_USER" "guix") - (setenv "KBUILD_BUILD_HOST" "guix") - - ;; Set ARCH and CROSS_COMPILE. - (let ((arch #$(platform-linux-architecture - (lookup-platform-by-target-or-system - (or (%current-target-system) - (%current-system)))))) - (setenv "ARCH" arch) - (format #t "`ARCH' set to `~a'~%" (getenv "ARCH")) - - (when target - (setenv "CROSS_COMPILE" (string-append target "-")) - (format #t "`CROSS_COMPILE' set to `~a'~%" - (getenv "CROSS_COMPILE")))) - - (setenv "EXTRAVERSION" - #$(and extra-version - (string-append "-" extra-version))) - - (let ((config (assoc-ref inputs "kconfig"))) - - ;; Use a custom kernel configuration file or a default - ;; configuration file. - (if config - (begin - (copy-file config ".config") - (chmod ".config" #o666)) - (invoke "make" #$defconfig)) - - ;; Appending works even when the option wasn't in the - ;; file. The last one prevails if duplicated. - (let ((port (open-file ".config" "a")) - (extra-configuration #$(config->string extra-options))) - (display extra-configuration port) - (close-port port)) - - (invoke "make" "oldconfig")))) - (replace 'install - (lambda* (#:key inputs native-inputs #:allow-other-keys) - (let ((moddir (string-append #$output "/lib/modules")) - (dtbdir (string-append #$output "/lib/dtbs"))) - ;; Install kernel image, kernel configuration and link map. - (for-each (lambda (file) (install-file file #$output)) - (find-files "." "^(\\.config|bzImage|zImage|Image|vmlinuz|System\\.map|Module\\.symvers)$")) - ;; Install device tree files - (unless (null? (find-files "." "\\.dtb$")) - (mkdir-p dtbdir) - (invoke "make" (string-append "INSTALL_DTBS_PATH=" dtbdir) - "dtbs_install")) - ;; Install kernel modules - (mkdir-p moddir) - (invoke "make" - ;; Disable depmod because the Guix system's - ;; module directory is an union of potentially - ;; multiple packages. It is not possible to use - ;; depmod to usefully calculate a dependency - ;; graph while building only one of them. - "DEPMOD=true" - (string-append "MODULE_DIR=" moddir) - (string-append "INSTALL_PATH=" #$output) - (string-append "INSTALL_MOD_PATH=" #$output) - "INSTALL_MOD_STRIP=1" - "modules_install") - (let* ((versions (filter (lambda (name) - (not (string-prefix? "." name))) - (scandir moddir))) - (version (match versions - ((x) x)))) - ;; There are symlinks to the build and source directory. - ;; Both will point to target /tmp/guix-build* and thus - ;; not be useful in a profile. Delete the symlinks. - (false-if-file-not-found - (delete-file - (string-append moddir "/" version "/build"))) - (false-if-file-not-found - (delete-file - (string-append moddir "/" version "/source")))))))) - #:tests? #f)) (home-page "https://www.gnu.org/software/linux-libre/") (synopsis "100% free redistribution of a cleaned Linux kernel") - (description - "GNU Linux-Libre is a free (as in freedom) variant of the Linux kernel. -It has been modified to remove all non-free binary blobs.") + (description "GNU Linux-Libre is a free (as in freedom) variant of the +Linux kernel. It has been modified to remove all non-free binary blobs.") (license license:gpl2) (properties '((max-silent-time . 3600))))) ;don't timeout on blob scan. diff --git a/gnu/packages/patches/linux-libre-infodocs-target.patch b/gnu/packages/patches/linux-libre-infodocs-target.patch new file mode 100644 index 0000000000..e9e6495c26 --- /dev/null +++ b/gnu/packages/patches/linux-libre-infodocs-target.patch @@ -0,0 +1,88 @@ +Upstream status: https://marc.info/?l=linux-doc&m=166861669723994&w=2 + +From 7edb5b278ee383ff9bed525329b2cdbe22317bf2 Mon Sep 17 00:00:00 2001 +From: Maxim Cournoyer +Date: Mon, 14 Nov 2022 22:51:11 -0500 +Subject: [PATCH] doc: add texinfodocs and infodocs targets + +Sphinx supports generating Texinfo sources and Info documentation, +which can be navigated easily and is convenient to search (via the +indexed nodes or anchors, for example). + +This change also causes the html output to appear under its own output +sub-directory, which makes it easier to install, since it's clean from +.doctrees or other output formats. + +Signed-off-by: Maxim Cournoyer +--- + Documentation/Makefile | 13 ++++++++++++- + Documentation/userspace-api/media/Makefile | 3 ++- + Makefile | 2 +- + 3 files changed, 15 insertions(+), 3 deletions(-) + +diff --git a/Documentation/Makefile b/Documentation/Makefile +index 64d44c1ecad3..bd8dac560633 100644 +--- a/Documentation/Makefile ++++ b/Documentation/Makefile +@@ -93,7 +93,16 @@ quiet_cmd_sphinx = SPHINX $@ --> file://$(abspath $(BUILDDIR)/$3/$4) + + htmldocs: + @$(srctree)/scripts/sphinx-pre-install --version-check +- @+$(foreach var,$(SPHINXDIRS),$(call loop_cmd,sphinx,html,$(var),,$(var))) ++ @+$(foreach var,$(SPHINXDIRS),$(call loop_cmd,sphinx,html,$(var),html,$(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 define above. ++infodocs: texinfodocs ++ $(MAKE) -C $(BUILDDIR)/texinfo info + + linkcheckdocs: + @$(foreach var,$(SPHINXDIRS),$(call loop_cmd,sphinx,linkcheck,$(var),,$(var))) +@@ -143,6 +152,8 @@ cleandocs: + dochelp: + @echo ' Linux kernel internal 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/Documentation/userspace-api/media/Makefile b/Documentation/userspace-api/media/Makefile +index 00922aa7efde..3d8aaf5c253b 100644 +--- a/Documentation/userspace-api/media/Makefile ++++ b/Documentation/userspace-api/media/Makefile +@@ -47,10 +47,11 @@ $(BUILDDIR)/lirc.h.rst: ${UAPI}/lirc.h ${PARSER} $(SRC_DIR)/lirc.h.rst.exception + + # 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 +diff --git a/Makefile b/Makefile +index 58cd4f5e1c3a..b3266c408b6c 100644 +--- a/Makefile ++++ b/Makefile +@@ -1785,7 +1785,7 @@ $(help-board-dirs): help-%: + # Documentation targets + # --------------------------------------------------------------------------- + DOC_TARGETS := xmldocs latexdocs pdfdocs htmldocs epubdocs cleandocs \ +- linkcheckdocs dochelp refcheckdocs ++ linkcheckdocs dochelp refcheckdocs texinfodocs infodocs + PHONY += $(DOC_TARGETS) + $(DOC_TARGETS): + $(Q)$(MAKE) $(build)=Documentation $@ + +base-commit: 81e7cfa3a9eb4ba6993a9c71772fdab21bc5d870 +-- +2.38.1 + base-commit: 351bada95049f0023aaf2fc7c91ee4b33e94486c -- 2.38.1 From debbugs-submit-bounces@debbugs.gnu.org Tue Nov 22 01:46:30 2022 Received: (at 59313) by debbugs.gnu.org; 22 Nov 2022 06:46:30 +0000 Received: from localhost ([127.0.0.1]:49488 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oxN38-0006Zo-AX for submit@debbugs.gnu.org; Tue, 22 Nov 2022 01:46:30 -0500 Received: from eggs.gnu.org ([209.51.188.92]:46294) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oxN33-0006ZX-As for 59313@debbugs.gnu.org; Tue, 22 Nov 2022 01:46:28 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oxN2x-0005fj-Ko; Tue, 22 Nov 2022 01:46:19 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To: From; bh=60BQnbksw5vXEh8sy+eTRWHu9egc4ENO7pM5xPqvhB8=; b=Awv3c2FeVRYBeE3yVa1C q3ztYzt7crNriuXiKz3RKcL0snYHWcj0CAcPEVbGWyFipdR3IA/FvBE9M/jITC2XP5etotzzOmjAx A7NLkUQPzEkhe44OCL7bWvuegGjDxqwh4bd0YZpRFRcwV9AmBz3dUUMfVd0mdCGiPyvz8q5z8S/o3 Y8fkJVZp6TM2lmbgj5e970Ry70Fud8/KJoqcQx72NxcveASA5uxhZ37skgvGPZkOB9/PVwZfa8Aix 5+dxy4v09+/EBST0jyrvaqs49V364jBQ1ccM/YnLhQxjP2ZUPlobb8f7x3EzQtYEXqPTbiRWfCQhI Sj4rNtUgZq3lvg==; Received: from [89.207.171.76] (helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oxN2x-0004Tg-2h; Tue, 22 Nov 2022 01:46:19 -0500 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Maxim Cournoyer Subject: Re: bug#59313: [PATCH] gnu: linux-libre: Enable building html and info doc. References: <87pmdhx3lo.fsf@cbaines.net> <20221121010324.16069-1-maxim.cournoyer@gmail.com> Date: Tue, 22 Nov 2022 07:46:14 +0100 In-Reply-To: <20221121010324.16069-1-maxim.cournoyer@gmail.com> (Maxim Cournoyer's message of "Sun, 20 Nov 2022 20:03:24 -0500") Message-ID: <877cznjxl5.fsf_-_@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 59313 Cc: 59313@debbugs.gnu.org, mail@cbaines.net 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.3 (---) Hi Maxim, Maxim Cournoyer skribis: > * gnu/packages/patches/linux-libre-infodocs-target.patch: New file. > * gnu/local.mk (dist_patch_DATA): Register it. > (linux-libre-6.0-source, linux-libre-5.15-source) > (linux-libre-5.10-source): Apply above patch. > (doc-supported?): Looks like these 3 lines are misplaced. > * gnu/packages/linux.scm (make-linux-libre) [DOC-SUPPORTED?]: Add new pat= ch in > the default patches used. Add a BUILD-DOC? argument. > (make-linux-libre*): Add a BUILD-DOC? argument. Validate BUILD-DOC? for > supported VERSION. > [outputs]: New field. > [phases]: Conditionally add the build-doc and install-doc phases. Nitpick: I=E2=80=99d write =E2=80=9C[arguments]=E2=80=9D rather than =E2=80= =9C[phases]=E2=80=9D. > [native-inputs]: Conditionally add fontconfig, graphviz, python-wrapper, > python-sphinx, python-sphinx-rtd-theme, texinfo and which. [...] > + #~((add-before 'configure 'build-doc > + (lambda _ > + (substitute* "Documentation/Makefile" > + ;; Remove problematic environment check script. > + ((".*scripts/sphinx-pre-install.*") "")) > + (invoke "make" "infodocs" "htmldocs"))) > + (add-after 'build-doc 'install-doc > + (lambda _ > + (with-directory-excursion "Documentation/output" > + (let ((docdir (string-append > + #$output:doc > + "/share/doc/linux-libre/html"))) > + (mkdir-p docdir) > + (copy-recursively "html" docdir)) > + (invoke "make" "-C" "texinfo" "install-info" > + (string-append "infodir=3D" #$output > + "/share/info")))))) I would keep only Info documentation, which is much smaller than HTML. This is what we do for every packages where we have that possibility. Apart from that it looks great to me, thanks! Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Tue Nov 22 01:49:28 2022 Received: (at 59313) by debbugs.gnu.org; 22 Nov 2022 06:49:28 +0000 Received: from localhost ([127.0.0.1]:49503 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oxN60-0006hS-4i for submit@debbugs.gnu.org; Tue, 22 Nov 2022 01:49:28 -0500 Received: from knopi.disroot.org ([178.21.23.139]:51390) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oxN5x-0006hJ-JW for 59313@debbugs.gnu.org; Tue, 22 Nov 2022 01:49:26 -0500 Received: from localhost (localhost [127.0.0.1]) by disroot.org (Postfix) with ESMTP id 12A3341346; Tue, 22 Nov 2022 07:49:24 +0100 (CET) X-Virus-Scanned: SPAM Filter at disroot.org Received: from knopi.disroot.org ([127.0.0.1]) by localhost (disroot.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id EqoIn_vAwjKO; Tue, 22 Nov 2022 07:49:23 +0100 (CET) Mime-Version: 1.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=disroot.org; s=mail; t=1669099763; bh=XTKSueEoxuK7xNGGl4IIqozpVy3EbFjGMgAu7C1cn9Q=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=PM0+KngRxsTaqiZ3gBowsv64MuhHsWwSoAgv5qI1PBYdco+qUMfvZGfhZ5/FVs/mS gqpplwDT4ro4IVKn2E5fjEE7nze9CtO1sLn0zaLjOWTH6p6/HGAlKKHzAIwlneiToJ F5Kc1fAGIwLNfqL9rN539G3EAFjJI0edGb84qiZPAWOekshcWZpV4qIS4mD4ErtVKj h/ow42AA1iVm0/CT/d6dJl4BOSlzB6G9RQLMbT85a8Y/zyMv3hEAnAtDmu5Hh2/WSq z9bSgWbHT+YnGWC0H3SCJFE8H97LAu9Zr9RZBrtrjb2O/o2kKUHriDIqS7/mlmiLy0 wiAInwHDztTkg== Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Tue, 22 Nov 2022 06:49:22 +0000 Message-Id: From: "(" To: =?utf-8?q?Ludovic_Court=C3=A8s?= , "Maxim Cournoyer" Subject: Re: [bug#59313] [PATCH] gnu: linux-libre: Enable building html and info doc. References: <87pmdhx3lo.fsf@cbaines.net> <20221121010324.16069-1-maxim.cournoyer@gmail.com> <877cznjxl5.fsf_-_@gnu.org> In-Reply-To: <877cznjxl5.fsf_-_@gnu.org> X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 59313 Cc: 59313@debbugs.gnu.org, mail@cbaines.net 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 (-) On Tue Nov 22, 2022 at 6:46 AM GMT, Ludovic Court=C3=A8s wrote: > Nitpick: I=E2=80=99d write =E2=80=9C[arguments]=E2=80=9D rather than =E2= =80=9C[phases]=E2=80=9D. ``[arguments]<#:phases>'' would be better, no? -- ( From debbugs-submit-bounces@debbugs.gnu.org Tue Nov 22 05:32:36 2022 Received: (at 59313) by debbugs.gnu.org; 22 Nov 2022 10:32:36 +0000 Received: from localhost ([127.0.0.1]:49931 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oxQZv-0008VZ-R7 for submit@debbugs.gnu.org; Tue, 22 Nov 2022 05:32:36 -0500 Received: from mail-qk1-f179.google.com ([209.85.222.179]:44914) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oxQZt-0008VN-Hw for 59313@debbugs.gnu.org; Tue, 22 Nov 2022 05:32:35 -0500 Received: by mail-qk1-f179.google.com with SMTP id z17so9892539qki.11 for <59313@debbugs.gnu.org>; Tue, 22 Nov 2022 02:32:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:user-agent:message-id :in-reply-to:date:references:subject:cc:to:from:from:to:cc:subject :date:message-id:reply-to; bh=TfJYYzyBRnXmW0xhmf3u8Cd10RT1udfNSBCTWsBu/Dw=; b=jOrLtzDTfM6XUGDe5EUiEGvVFqWnaVhNJMa9bxST+3RTdgzzWJ3gx/qVaQk1qWTPwA VwrVRItTujRemyvf5KcaSBjP0GbItTRzlVvB+vFf+fqorMMxM1dSXZhnt8geYBKuw0TV dozAknBF6MFcMqvkA9Kbn8iJBfl1fan9NMsO2BTo0P1W3lwqIIye/TEenZzFjuf1OBcH HRgL/pAu6dive9XYHRkZE1pOY5rSUj8dh6emgp7Eq4eZqAsJI/ptPm59FzTZCdTQnthA hRuPj3RrkzOPE9QxRx2SVYbmCvxg1Bm/9Ru/U3fu7HAIfQ+xxp7gmCYMDYIdd+gkVoWx mSMQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:user-agent:message-id :in-reply-to:date:references:subject:cc:to:from:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=TfJYYzyBRnXmW0xhmf3u8Cd10RT1udfNSBCTWsBu/Dw=; b=FHsOBYTJILcpiwnlieIMwwdgpkmsFAtTFAIplu1CEw8Ml/iLeDZndLkjEQV44GFX+W W5NR3KIH73kf3LdXYWKPivF747B5M4rqqpjSaewgqR3b9jB18m84f1/f1d8+ihc2fPO3 8zbuRAixeics3j3oPc6i2Clfi7JtiT2kXKmH5DH/6S+ZcTmfU3EzkEXilaZVnRHt5Y2q EPU3uq19ewaYRqKriVlgPOK6tMtSaItiBqs3PcWXKLBz1DGCIoWM4Xd/HQxzEozQBT0L 5FkMtcfCbYYepKNMMpoDw12/KUFMcg3TvLiAXACs1JDaTivYHlBlrRlWfbxn9PPjEg3B zltQ== X-Gm-Message-State: ANoB5pl5z4xHr9krBuqb+9UkLhdlGASW9eJBDdbGzWHuEETDYgJFj5/Q wfrGllViG3+8F88Z74QCdHw= X-Google-Smtp-Source: AA0mqf6RUV3jZAZD1LosjFDpqm4lcQh9j7KcDORasrrCyolIPpDtf3TV48mSQaPjlz9UBItCv5bydw== X-Received: by 2002:a37:a98b:0:b0:6fb:dea3:bc4f with SMTP id s133-20020a37a98b000000b006fbdea3bc4fmr14334488qke.54.1669113147986; Tue, 22 Nov 2022 02:32:27 -0800 (PST) Received: from hurd ([2607:fad8:4:3::1003]) by smtp.gmail.com with ESMTPSA id u7-20020a05620a430700b006eed75805a2sm9921545qko.126.2022.11.22.02.32.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 22 Nov 2022 02:32:27 -0800 (PST) From: Maxim Cournoyer To: "(" Subject: Re: [bug#59313] [PATCH] gnu: linux-libre: Enable building html and info doc. References: <87pmdhx3lo.fsf@cbaines.net> <20221121010324.16069-1-maxim.cournoyer@gmail.com> <877cznjxl5.fsf_-_@gnu.org> Date: Tue, 22 Nov 2022 05:32:26 -0500 In-Reply-To: (paren@disroot.org's message of "Tue, 22 Nov 2022 06:49:22 +0000") Message-ID: <87zgcjnuth.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 59313 Cc: Ludovic =?utf-8?Q?Court=C3=A8s?= , mail@cbaines.net, 59313@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, "(" writes: > On Tue Nov 22, 2022 at 6:46 AM GMT, Ludovic Court=C3=A8s wrote: >> Nitpick: I=E2=80=99d write =E2=80=9C[arguments]=E2=80=9D rather than =E2= =80=9C[phases]=E2=80=9D. > > ``[arguments]<#:phases>'' would be better, no? To nitpick myself, if we want to stick to the canonical GNU ChangeLog style (in its most modern revision), we wouldn't use square brackets as that is meant for conditional changes [0, 1]; we'd only use ( ) for the variable name then < > to denote where the change occurred. Unfortunately < > are a pain to use (breaks auto-completion for some reason). [0] info '(standards) Conditional Changes' [1] info '(standards) Indicating the Part Changed' --=20 Thanks, Maxim From debbugs-submit-bounces@debbugs.gnu.org Thu Nov 24 16:37:40 2022 Received: (at 59313-done) by debbugs.gnu.org; 24 Nov 2022 21:37:40 +0000 Received: from localhost ([127.0.0.1]:60434 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oyJue-0008TS-EI for submit@debbugs.gnu.org; Thu, 24 Nov 2022 16:37:40 -0500 Received: from mail-qt1-f180.google.com ([209.85.160.180]:42848) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oyJub-0008TE-RN for 59313-done@debbugs.gnu.org; Thu, 24 Nov 2022 16:37:38 -0500 Received: by mail-qt1-f180.google.com with SMTP id h24so1600941qta.9 for <59313-done@debbugs.gnu.org>; Thu, 24 Nov 2022 13:37:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:user-agent:message-id :in-reply-to:date:references:subject:cc:to:from:from:to:cc:subject :date:message-id:reply-to; bh=aoGtrgHNQbKS9bcyGJavu/fMsZj81JeJmiaRWM8HNt8=; b=R52rnHNLpTuAxw24cbVWRpofTg9XTGNRU6Ll4/lHg2b7jT0q644LnZahbAD/A6jYUP qnxTzGhOcjZjIaqgMwabQYKc4hx7GcwVq2mV8pkPUz+Rr4vpJYyzzylpVADslafvsOrE ig9W+N4np4uTLjsJrJwf0NYqd0KlhPiF9/YTOUKQLqU+oBzGqakJJAJuL0v0ijGnYbOU 5YYJQ9dAs/JtC6ws/WrZ5/zZyTPL92sLtIWuL58s09vJl5w4B6ScKlj4tHjVJASBK/UH Z8rJ+ow22QVedu22LwKTGhJMTSNBQI3Z7cU93D/gpTgCCHSPMOa44s4fpo/bI3fyG41I 6wRg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:user-agent:message-id :in-reply-to:date:references:subject:cc:to:from:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=aoGtrgHNQbKS9bcyGJavu/fMsZj81JeJmiaRWM8HNt8=; b=Jh1oap9yqzz8JsVGQrzE8aKfuMRZOsNiNWeBob7HTg1ZJ1ZaGFr4y/eRbZkyNVpQDH pSNHs2seY5loFL3ZRL5Y+cVlm5fYsbthiTwjeLqzsUm4uRb1QBcIsoAWagH1QgvyDRgu soALjjNvCsBkF9zsMtv5ErZjG8AMNMAmHVWJiHqOMmv3ZmH+DHJnB7Cbe8JcE5xiZgcN 7gYgdBNhI4Dx9JHdst0aWUsa8m5TAQF7KdlHHn+Pqo1H4gbjEn2o9o+agb+B1gOKKOfR 22HnTZUwHdIaBSIMI8bWFWG2x2W8l3O8ILKcnaA+pe6MFEK8Hpn1ihJN3e5JRiv2qaiA jePw== X-Gm-Message-State: ANoB5plCfqVo+QEYZcvB/uYqjIbhlheIsUdftkN1Mq56OQ7GLsw3SWSD Qy4bZ5znjvZJMYA5FLJtaHBIAropmMMQ1g== X-Google-Smtp-Source: AA0mqf7PczXTjFzVYPOC9/37fupbtNoWbMANj/R8OzV6339ryKVps8bZZoOTuQ0F5e75Ka/6bf9LUA== X-Received: by 2002:a05:622a:4a1b:b0:3a5:44e9:314f with SMTP id fv27-20020a05622a4a1b00b003a544e9314fmr32092497qtb.630.1669325852230; Thu, 24 Nov 2022 13:37:32 -0800 (PST) Received: from hurd ([2607:fad8:4:3::1003]) by smtp.gmail.com with ESMTPSA id m21-20020a05622a119500b00397e97baa96sm1210413qtk.0.2022.11.24.13.37.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 24 Nov 2022 13:37:31 -0800 (PST) From: Maxim Cournoyer To: Ludovic =?utf-8?Q?Court=C3=A8s?= Subject: Re: bug#59313: [PATCH] gnu: linux-libre: Enable building html and info doc. References: <87pmdhx3lo.fsf@cbaines.net> <20221121010324.16069-1-maxim.cournoyer@gmail.com> <877cznjxl5.fsf_-_@gnu.org> Date: Thu, 24 Nov 2022 16:37:30 -0500 In-Reply-To: <877cznjxl5.fsf_-_@gnu.org> ("Ludovic =?utf-8?Q?Court=C3=A8s?= =?utf-8?Q?=22's?= message of "Tue, 22 Nov 2022 07:46:14 +0100") Message-ID: <87edtskp9h.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 59313-done Cc: 59313-done@debbugs.gnu.org, mail@cbaines.net 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, Ludovic Court=C3=A8s writes: > Hi Maxim, > > Maxim Cournoyer skribis: > >> * gnu/packages/patches/linux-libre-infodocs-target.patch: New file. >> * gnu/local.mk (dist_patch_DATA): Register it. >> (linux-libre-6.0-source, linux-libre-5.15-source) >> (linux-libre-5.10-source): Apply above patch. >> (doc-supported?): > > Looks like these 3 lines are misplaced. Fixed. > >> * gnu/packages/linux.scm (make-linux-libre) [DOC-SUPPORTED?]: Add new pa= tch in >> the default patches used. Add a BUILD-DOC? argument. >> (make-linux-libre*): Add a BUILD-DOC? argument. Validate BUILD-DOC? for >> supported VERSION. >> [outputs]: New field. >> [phases]: Conditionally add the build-doc and install-doc phases. > > Nitpick: I=E2=80=99d write =E2=80=9C[arguments]=E2=80=9D rather than =E2= =80=9C[phases]=E2=80=9D. Adjusted. >> [native-inputs]: Conditionally add fontconfig, graphviz, python-wrapper, >> python-sphinx, python-sphinx-rtd-theme, texinfo and which. > > [...] > >> + #~((add-before 'configure 'build-doc >> + (lambda _ >> + (substitute* "Documentation/Makefile" >> + ;; Remove problematic environment check scrip= t. >> + ((".*scripts/sphinx-pre-install.*") "")) >> + (invoke "make" "infodocs" "htmldocs"))) >> + (add-after 'build-doc 'install-doc >> + (lambda _ >> + (with-directory-excursion "Documentation/output" >> + (let ((docdir (string-append >> + #$output:doc >> + "/share/doc/linux-libre/html")= )) >> + (mkdir-p docdir) >> + (copy-recursively "html" docdir)) >> + (invoke "make" "-C" "texinfo" "install-info" >> + (string-append "infodir=3D" #$output >> + "/share/info")))))) > > I would keep only Info documentation, which is much smaller than HTML. > This is what we do for every packages where we have that possibility. Done, like this: --8<---------------cut here---------------start------------->8--- modified gnu/packages/linux.scm @@ -815,8 +815,6 @@ (define* (make-linux-libre* version gnu-revision source= supported-systems (version version) (source source) (supported-systems supported-systems) - (outputs `("out" - ,@(if build-doc? '("doc") '()))) (build-system gnu-build-system) (arguments (list @@ -840,15 +838,10 @@ (define* (make-linux-libre* version gnu-revision sour= ce supported-systems (substitute* "Documentation/Makefile" ;; Remove problematic environment check script. ((".*scripts/sphinx-pre-install.*") "")) - (invoke "make" "infodocs" "htmldocs"))) + (invoke "make" "infodocs"))) (add-after 'build-doc 'install-doc (lambda _ (with-directory-excursion "Documentation/output" - (let ((docdir (string-append - #$output:doc - "/share/doc/linux-libre/html"))) - (mkdir-p docdir) - (copy-recursively "html" docdir)) (invoke "make" "-C" "texinfo" "install-info" (string-append "infodir=3D" #$output "/share/info")))))) --8<---------------cut here---------------end--------------->8--- (as well as python-sphinx-rtd, not shown above) and pushed. Thanks for the review! --=20 Thanks, Maxim From unknown Sun Aug 17 01:22:39 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, 23 Dec 2022 12:24:06 +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