From debbugs-submit-bounces@debbugs.gnu.org Sat Dec 03 21:38:21 2022 Received: (at submit) by debbugs.gnu.org; 4 Dec 2022 02:38:22 +0000 Received: from localhost ([127.0.0.1]:54688 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p1etZ-0004wi-Ck for submit@debbugs.gnu.org; Sat, 03 Dec 2022 21:38:21 -0500 Received: from lists.gnu.org ([209.51.188.17]:45576) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p1etV-0004wb-GF for submit@debbugs.gnu.org; Sat, 03 Dec 2022 21:38:19 -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 1p1etU-00010i-Vf for guix-patches@gnu.org; Sat, 03 Dec 2022 21:38:17 -0500 Received: from mail-qt1-x82c.google.com ([2607:f8b0:4864:20::82c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1p1etT-00075J-5i for guix-patches@gnu.org; Sat, 03 Dec 2022 21:38:16 -0500 Received: by mail-qt1-x82c.google.com with SMTP id cg5so9294690qtb.12 for ; Sat, 03 Dec 2022 18:38:13 -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=fq6cj1FoI+uGslAcX7zZrxfze/5728hqm2HoW1uwSxE=; b=JW4JmnC8/FgUvDpEDamgMoO8kaeBanfiwqA3dzFNN3mJ0XkNiUTv+9ke0ufTbA3VX6 EA+HAldM/25PLO8lR/PnbPvFKuEsaCojHfTRB5jrQuT+LGU6CTxY24EsB83nhLZqO5dw DKKpLa30KO8hXSDbcHQDfqjIH9IfZY7X9RPq38Z+I2TRMAof1SkZpJtapF1zusx6glhF sZigIi+4pwu9qqea3TflWc5gC98VGXVNm+rqIR4XflDWzzCFAtCzK37zhUlqK7OvC6eF K2r8mN9X79poXCDd9SdRGv5d0Rlw54Ukn+T4tT0rIQRGfe5IFnl+6GlOJCV17vK9x3c8 +33g== 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=fq6cj1FoI+uGslAcX7zZrxfze/5728hqm2HoW1uwSxE=; b=RszRq474ysvg+iR6YVWZMoktIdzdL4piDkEMokwNRNQS37TLiJ0szyTwr86ZMLCIUP RAcjsgIZEz8U3qH2ZLiCeoAEimd0Zfwxj8lfn4bb2nPI5fw89sB4ZI4ySlyOjtuJRKwl Lf9I+ImcbuASGcx2roNxg2wKMsx7GOnmlFhFWCwathjE1jncgA+egxWwHwN+ITUs4Rcs NbP9j425bwU2G/rJKxiY7nc/BSM+1CcsAySKS5ieqAtGoRxFFB8uqtPDN2ZKPcv21xdO zjkitil86P2lULjVIhnUvPdDOLTiLBryJnC2vBTSRU/nmhMT76nGt6llpxBTDrTYtXC1 0rQA== X-Gm-Message-State: ANoB5pmKrwXd2izOUckNi6Wus1vXPIN+pnUQgy6tEXDw5QqmkN0NUsKJ r2zLpVhSLQDRL0doiShke87hdAQ8Lv0= X-Google-Smtp-Source: AA0mqf70g+q2GGNbAmzwwdVquqxR5c3iim4Wy9bImC5nhcgdJi3bZrxiRG2pcpKZc7spGmsNU1cSdg== X-Received: by 2002:ac8:4649:0:b0:3a5:8ea9:34f5 with SMTP id f9-20020ac84649000000b003a58ea934f5mr72161525qto.420.1670121492977; Sat, 03 Dec 2022 18:38:12 -0800 (PST) Received: from localhost.localdomain (dsl-157-235.b2b2c.ca. [66.158.157.235]) by smtp.gmail.com with ESMTPSA id dm12-20020a05620a1d4c00b006fb11eee465sm8931776qkb.64.2022.12.03.18.38.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 03 Dec 2022 18:38:12 -0800 (PST) From: Maxim Cournoyer To: guix-patches@gnu.org Subject: [PATCH] gnu: linux-libre: Move documentation to a separate package. Date: Sat, 3 Dec 2022 21:38:04 -0500 Message-Id: <20221204023804.15451-1-maxim.cournoyer@gmail.com> X-Mailer: git-send-email 2.38.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=2607:f8b0:4864:20::82c; envelope-from=maxim.cournoyer@gmail.com; helo=mail-qt1-x82c.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/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