From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id EEgfLl8IjGNrDAEAbAwnHQ (envelope-from ) for ; Sun, 04 Dec 2022 03:39:27 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id iKwLLl8IjGMQFgEAauVa8A (envelope-from ) for ; Sun, 04 Dec 2022 03:39:27 +0100 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 6A61138300 for ; Sun, 4 Dec 2022 03:39:26 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p1euH-00013g-RM; Sat, 03 Dec 2022 21:39:05 -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 1p1euF-00013Q-Fi for guix-patches@gnu.org; Sat, 03 Dec 2022 21:39:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1p1euF-00078X-32 for guix-patches@gnu.org; Sat, 03 Dec 2022 21:39:03 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1p1euE-0004wz-MC for guix-patches@gnu.org; Sat, 03 Dec 2022 21:39:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#59811] [PATCH] gnu: linux-libre: Move documentation to a separate package. Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 04 Dec 2022 02:39:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 59811 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 59811@debbugs.gnu.org Cc: Maxim Cournoyer X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.167012150219020 (code B ref -1); Sun, 04 Dec 2022 02:39:02 +0000 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 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-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1670121566; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=fq6cj1FoI+uGslAcX7zZrxfze/5728hqm2HoW1uwSxE=; b=Y8ny5MqEkO9iVGa7P1gnbbCm6JYb3F2Rnyk3t4KDNINrNXbjLVMcUTZYYdUBkyDQchIGCA JigTEbO/u2plgXI0xK2xEQO+dqoCfT7t8MHtcTWxlJlt2H3FRIv4ftDBDBzOHzC05Co64l lrLHjoBI5DMuJh6bCiOY2ot3dQzxJ5KvMCyWNwz+1aRU6KilQTi9/iOKSE2kARyhNdOJyq Eh5NyHNiOfzblzTUz/zBwlz9fZvyLFB+yXWrXTMSwx2oLsOmJSK4K6sHmSdaf2vTChHcU+ JKMQ+RVFplpYBffKlbd4/N+JY1krIC0qOEpLbeh10RLTiKCFikydMYDrhv4MOw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1670121566; a=rsa-sha256; cv=none; b=Jg1MEOWajOZKQzmTunIEvISLIPNnGbmbTUR7nEiYxu5Fuj5GzLpdgEl1CoFD7UaFRSohPV UXEP80SkOPoLIWJFLT5lHrmjT0snlJv46ZsQcLBzZS5fg1rs/ozIpC0D5n01NSN1ucREDk tdVMbbM5v41nn8qTmaw+oozFdSCLI8xrCOrvQlUAIKbQTFYjXi5UAoi5AInMLNFgtyK7i5 dk5ZjZvvZCyB8t67LCzTmWjdjPJyYSWqU6MqqYx6iQ2bjBzfE3qft+37Vtz2mO1WfJpxyy EvrdbZTjEewD2ppO+YvDWOhNgD45u3VreY9kdFYidxmKWfC0vDiiOR6hCpvCng== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=JW4JmnC8; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: 6.34 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=JW4JmnC8; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 6A61138300 X-Spam-Score: 6.34 X-Migadu-Scanner: scn1.migadu.com X-TUID: x+NdHiTqHLCK * 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