* [bug#59811] [PATCH] gnu: linux-libre: Move documentation to a separate package.
@ 2022-12-04 2:38 Maxim Cournoyer
2022-12-07 3:22 ` bug#59811: " Maxim Cournoyer
0 siblings, 1 reply; 2+ messages in thread
From: Maxim Cournoyer @ 2022-12-04 2:38 UTC (permalink / raw)
To: 59811; +Cc: Maxim Cournoyer
* gnu/packages/linux.scm (linux-libre-5.15-source)
(linux-libre-5.10-source): Do not apply linux-libre-infodocs-target.patch.
(make-linux-libre): Remove BUILD-DOC? argument, and
adjust patches conditional.
(make-linux-libre*): Likewise. Remove build-doc? validation.
[arguments]: Move documentation related phases to the new
linux-libre-documentation.
[native-inputs]: Move the documentation related native inputs to
linux-libre-documentation.
(linux-libre-documentation): New variable.
* guix/build-system/linux-module.scm
(make-linux-module-builder) [arguments]: Do not delete build-doc and
install-doc phases, which no longer exist for linux-libre.
---
gnu/packages/linux.scm | 82 ++++++++++++++++--------------
guix/build-system/linux-module.scm | 2 -
2 files changed, 43 insertions(+), 41 deletions(-)
diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index 8c417fb600..f22f6ed8cf 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -523,14 +523,12 @@ (define-public linux-libre-6.0-source
(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
- (search-patch "linux-libre-infodocs-target.patch"))))
+ %linux-libre-arm-export-__sync_icache_dcache-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
- (search-patch "linux-libre-infodocs-target.patch"))))
+ %linux-libre-arm-export-__sync_icache_dcache-patch)))
(define-public linux-libre-5.4-source
(source-with-patches linux-libre-5.4-pristine-source
@@ -798,10 +796,9 @@ (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
`(,%boot-logo-patch
- ,@(if build-doc?
+ ,@(if (doc-supported? version)
(list (search-patch
"linux-libre-infodocs-target.patch"))
'()))))
@@ -815,8 +812,7 @@ (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
- #:build-doc? build-doc?))
+ #:extra-options extra-options))
(define* (make-linux-libre* version gnu-revision source supported-systems
#:key
@@ -825,10 +821,7 @@ (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)
- (build-doc? (doc-supported? version)))
- (when (and build-doc? (not (doc-supported? version)))
- (error "unsupported 'build-doc?' for kernels <5.10"))
+ (extra-options %default-extra-linux-options))
(package
(name (if extra-version
(string-append "linux-libre-" extra-version)
@@ -853,20 +846,6 @@ (define* (make-linux-libre* version gnu-revision source supported-systems
(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")))
- (add-after 'build-doc 'install-doc
- (lambda _
- (with-directory-excursion "Documentation/output"
- (invoke "make" "-C" "texinfo" "install-info"
- (string-append "infodir=" #$output
- "/share/info"))))))
- #~())
(add-before 'configure 'set-environment
(lambda* (#:key target #:allow-other-keys)
;; Avoid introducing timestamps.
@@ -966,19 +945,6 @@ (define* (make-linux-libre* version gnu-revision source supported-systems
("gmp" ,gmp)
("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)
- ("texinfo" ,texinfo)
- ("which" ,which))
- '())
-
,@(match (let ((arch (platform-linux-architecture
(lookup-platform-by-target-or-system
(or (%current-target-system)
@@ -1017,6 +983,44 @@ (define-public linux-libre-pristine-source linux-libre-6.0-pristine-source)
(define-public linux-libre-source linux-libre-6.0-source)
(define-public linux-libre linux-libre-6.0)
+(define-public linux-libre-documentation
+ (package
+ (inherit linux-libre)
+ (name "linux-libre-documentation")
+ (arguments
+ (list
+ #:tests? #f
+ #:phases #~(modify-phases %standard-phases
+ (delete 'configure)
+ (replace 'build
+ (lambda _
+ (substitute* "Documentation/Makefile"
+ ;; Remove problematic environment check script.
+ ((".*scripts/sphinx-pre-install.*") ""))
+ (invoke "make" "infodocs")))
+ (replace 'install
+ (lambda _
+ (let* ((info-dir (string-append #$output "/share/info"))
+ (info (string-append info-dir
+ "/TheLinuxKernel.info.gz")))
+ (with-directory-excursion "Documentation/output"
+ (invoke "make" "-C" "texinfo" "install-info"
+ (string-append "infodir=" info-dir)))
+ ;; Create a symlink, for convenience.
+ (symlink info (string-append info-dir
+ "/linux.info.gz"))))))))
+ (native-inputs
+ (list fontconfig
+ graphviz
+ perl
+ python
+ python-sphinx
+ texinfo
+ which))
+ (synopsis "Documentation for the kernel Linux-Libre")
+ (description "This package provides the documentation for the kernel
+Linux-Libre, as an Info manual. To consult it, run @samp{info linux}.")))
+
(define-public linux-libre-5.15
(make-linux-libre* linux-libre-5.15-version
linux-libre-5.15-gnu-revision
diff --git a/guix/build-system/linux-module.scm b/guix/build-system/linux-module.scm
index c1ddeaea10..e46195b53c 100644
--- a/guix/build-system/linux-module.scm
+++ b/guix/build-system/linux-module.scm
@@ -67,8 +67,6 @@ (define (make-linux-module-builder linux)
(lambda _
(invoke "make" "modules_prepare")))
(delete 'strip) ;faster
- (delete 'build-doc) ;costly and not useful here
- (delete 'install-doc)
(replace 'install
(lambda* (#:key inputs #:allow-other-keys)
(let ((out-lib-build (string-append #$output "/lib/modules/build")))
base-commit: bf46192d4c7c4cd8d71edb8ace2cdf86322aafe7
--
2.38.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* bug#59811: [PATCH] gnu: linux-libre: Move documentation to a separate package.
2022-12-04 2:38 [bug#59811] [PATCH] gnu: linux-libre: Move documentation to a separate package Maxim Cournoyer
@ 2022-12-07 3:22 ` Maxim Cournoyer
0 siblings, 0 replies; 2+ messages in thread
From: Maxim Cournoyer @ 2022-12-07 3:22 UTC (permalink / raw)
To: 59811-done
Hi,
Maxim Cournoyer <maxim.cournoyer@gmail.com> writes:
> * gnu/packages/linux.scm (linux-libre-5.15-source)
> (linux-libre-5.10-source): Do not apply linux-libre-infodocs-target.patch.
> (make-linux-libre): Remove BUILD-DOC? argument, and
> adjust patches conditional.
> (make-linux-libre*): Likewise. Remove build-doc? validation.
> [arguments]: Move documentation related phases to the new
> linux-libre-documentation.
> [native-inputs]: Move the documentation related native inputs to
> linux-libre-documentation.
> (linux-libre-documentation): New variable.
> * guix/build-system/linux-module.scm
> (make-linux-module-builder) [arguments]: Do not delete build-doc and
> install-doc phases, which no longer exist for linux-libre.
I've tested this for a couple days and it seems fine, so I've applied it
to master already. You can now 'info linux' to read its doc.
Closing.
--
Thanks,
Maxim
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-12-07 3:24 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-12-04 2:38 [bug#59811] [PATCH] gnu: linux-libre: Move documentation to a separate package Maxim Cournoyer
2022-12-07 3:22 ` bug#59811: " Maxim Cournoyer
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.