all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
To: Christopher Baines <mail@cbaines.net>
Cc: 59313@debbugs.gnu.org
Subject: [bug#59313] [PATCH] gnu: linux-libre: Enable building html and info doc.
Date: Sun, 20 Nov 2022 19:57:18 -0500	[thread overview]
Message-ID: <878rk52kgh.fsf@gmail.com> (raw)
In-Reply-To: <87pmdhx3lo.fsf@cbaines.net> (Christopher Baines's message of "Sun, 20 Nov 2022 11:31:54 +0000")

Hi,

Christopher Baines <mail@cbaines.net> writes:

> Maxim Cournoyer <maxim.cournoyer@gmail.com> 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)))
 
 \f
 ;;;
@@ -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




  reply	other threads:[~2022-11-21  0:58 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-16 16:55 [bug#59313] [PATCH] gnu: linux-libre: Enable building html and info doc Maxim Cournoyer
2022-11-20 11:31 ` Christopher Baines
2022-11-21  0:57   ` Maxim Cournoyer [this message]
2022-11-21  1:03   ` [bug#59313] [PATCH v2] " Maxim Cournoyer
2022-11-22  6:46     ` [bug#59313] [PATCH] " Ludovic Courtès
2022-11-22  6:49       ` ( via Guix-patches via
2022-11-22 10:32         ` Maxim Cournoyer
2022-11-24 21:37       ` bug#59313: " Maxim Cournoyer
2023-02-26  2:21 ` bug#61798: infodoc patch doesn't apply to linux 6.2 Leo Famulari
2023-02-26  4:23   ` Maxim Cournoyer
2023-02-26 17:38     ` Leo Famulari
2023-02-27 13:40       ` Maxim Cournoyer
2023-03-04  0:34         ` Leo Famulari

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=878rk52kgh.fsf@gmail.com \
    --to=maxim.cournoyer@gmail.com \
    --cc=59313@debbugs.gnu.org \
    --cc=mail@cbaines.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.