From patchwork Sat Mar 11 17:54:10 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bruno Victal X-Patchwork-Id: 47903 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id B74D016B92; Sat, 11 Mar 2023 17:55:32 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=MAILING_LIST_MULTI, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,URIBL_BLOCKED,URIBL_SBL_A autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id A3DE71685F for ; Sat, 11 Mar 2023 17:55:31 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pb3Qv-00065V-On; Sat, 11 Mar 2023 12:55: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 1pb3Qt-000651-Jg for guix-patches@gnu.org; Sat, 11 Mar 2023 12:55: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 1pb3Qt-00078T-BL for guix-patches@gnu.org; Sat, 11 Mar 2023 12:55:03 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pb3Qt-0003ny-7N for guix-patches@gnu.org; Sat, 11 Mar 2023 12:55:03 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#61015] [PATCH v2 1/4] gnu: docbook-xml: Use copy-build-system. References: In-Reply-To: Resent-From: Bruno Victal Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 11 Mar 2023 17:55:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 61015 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 61015@debbugs.gnu.org Cc: Bruno Victal Received: via spool by 61015-submit@debbugs.gnu.org id=B61015.167855727314562 (code B ref 61015); Sat, 11 Mar 2023 17:55:03 +0000 Received: (at 61015) by debbugs.gnu.org; 11 Mar 2023 17:54:33 +0000 Received: from localhost ([127.0.0.1]:58607 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pb3QO-0003mh-Hp for submit@debbugs.gnu.org; Sat, 11 Mar 2023 12:54:33 -0500 Received: from smtpmciv1.myservices.hosting ([185.26.107.237]:42794) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pb3QK-0003mG-Ll for 61015@debbugs.gnu.org; Sat, 11 Mar 2023 12:54:29 -0500 Received: from mail1.netim.hosting (unknown [185.26.106.173]) by smtpmciv1.myservices.hosting (Postfix) with ESMTP id C49B220D38 for <61015@debbugs.gnu.org>; Sat, 11 Mar 2023 18:54:27 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by mail1.netim.hosting (Postfix) with ESMTP id 69358800A0; Sat, 11 Mar 2023 18:54:24 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at mail1.netim.hosting Received: from mail1.netim.hosting ([127.0.0.1]) by localhost (mail1-2.netim.hosting [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id Jj7pqv6OKJjD; Sat, 11 Mar 2023 18:54:22 +0100 (CET) Received: from guix-nuc.home.arpa (bl9-119-177.dsl.telepac.pt [85.242.119.177]) (Authenticated sender: lumen@makinata.eu) by mail1.netim.hosting (Postfix) with ESMTPSA id 7A4B28009C; Sat, 11 Mar 2023 18:54:22 +0100 (CET) From: Bruno Victal Date: Sat, 11 Mar 2023 17:54:10 +0000 Message-Id: <821b168ca199012a29d7a95961c6380b40e46855.1678557210.git.mirai@makinata.eu> X-Mailer: git-send-email 2.39.1 MIME-Version: 1.0 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+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * gnu/packages/docbook.scm (docbook-xml-5)[build-system]: Switch to copy-build-system. [source][arguments]: Adapt to copy-build-system. (docbook-xml)[arguments]: Remove. [source]: Switch to url-fetch/zipbomb. (docbook-xml-4.4)[source]: Switch to url-fetch/zipbomb. (docbook-xml-4.3)[source]: Switch to url-fetch/zipbomb. (docbook-xml-4.2)[source]: Switch to url-fetch/zipbomb. (docbook-xml-4.1.2)[arguments]: Remove. [source]: Switch to url-fetch/zipbomb. --- gnu/packages/docbook.scm | 73 +++++++++------------------------------- 1 file changed, 15 insertions(+), 58 deletions(-) diff --git a/gnu/packages/docbook.scm b/gnu/packages/docbook.scm index 8d4892b93b..7cfe550593 100644 --- a/gnu/packages/docbook.scm +++ b/gnu/packages/docbook.scm @@ -59,27 +59,15 @@ (define-public docbook-xml-5 (sha256 (base32 "1iz3hq1lqgnshvlz4j9gvh4jy1ml74qf90vqf2ikbq0h4i2xzybs")))) - (build-system trivial-build-system) + (build-system copy-build-system) (arguments - `(#:modules ((guix build utils)) - #:builder - (begin - (use-modules (guix build utils)) - (let* ((unzip - (string-append (assoc-ref %build-inputs "unzip") - "/bin/unzip")) - (source (assoc-ref %build-inputs "source")) - (out (assoc-ref %outputs "out")) - (dtd (string-append out "/xml/dtd/docbook"))) - (invoke unzip source) - (mkdir-p dtd) - (copy-recursively (string-append "docbook-" ,version) dtd) - (with-directory-excursion dtd - (substitute* (string-append out "/xml/dtd/docbook/catalog.xml") - (("uri=\"") - (string-append - "uri=\"file://" dtd "/"))) - #t))))) + (list + #:phases + #~(modify-phases %standard-phases + (replace 'install + (lambda _ + (let ((dtd-path (string-append #$output "/xml/dtd/docbook"))) + (copy-recursively "." dtd-path))))))) (native-inputs (list unzip)) (home-page "https://docbook.org") (synopsis "DocBook XML DTDs for document authoring") @@ -95,37 +83,18 @@ (define-public docbook-xml (name "docbook-xml") (version "4.5") (source (origin - (method url-fetch) + (method url-fetch/zipbomb) (uri (string-append "https://docbook.org/xml/" version "/docbook-xml-" version ".zip")) (sha256 (base32 - "1d671lcjckjri28xfbf6dq7y3xnkppa910w1jin8rjc35dx06kjf")))) - (arguments - '(#:builder (begin - (use-modules (guix build utils)) - - (let* ((unzip - (string-append (assoc-ref %build-inputs "unzip") - "/bin/unzip")) - (source (assoc-ref %build-inputs "source")) - (out (assoc-ref %outputs "out")) - (dtd (string-append out "/xml/dtd/docbook"))) - (mkdir-p dtd) - (with-directory-excursion dtd - (invoke unzip source)) - (substitute* (string-append out "/xml/dtd/docbook/catalog.xml") - (("uri=\"") - (string-append - "uri=\"file://" dtd "/"))) - #t)) - #:modules ((guix build utils)))))) + "1d671lcjckjri28xfbf6dq7y3xnkppa910w1jin8rjc35dx06kjf")))))) (define-public docbook-xml-4.4 (package (inherit docbook-xml) (version "4.4") (source (origin - (method url-fetch) + (method url-fetch/zipbomb) (uri (string-append "https://docbook.org/xml/" version "/docbook-xml-" version ".zip")) (sha256 @@ -136,7 +105,7 @@ (define-public docbook-xml-4.3 (package (inherit docbook-xml) (version "4.3") (source (origin - (method url-fetch) + (method url-fetch/zipbomb) (uri (string-append "https://docbook.org/xml/" version "/docbook-xml-" version ".zip")) (sha256 @@ -147,7 +116,7 @@ (define-public docbook-xml-4.2 (package (inherit docbook-xml) (version "4.2") (source (origin - (method url-fetch) + (method url-fetch/zipbomb) (uri (string-append "https://docbook.org/xml/" version "/docbook-xml-" version ".zip")) (sha256 @@ -158,24 +127,12 @@ (define-public docbook-xml-4.1.2 (package (inherit docbook-xml) (version "4.1.2") (source (origin - (method url-fetch) + (method url-fetch/zipbomb) (uri (string-append "https://docbook.org/xml/" version "/docbkx412.zip")) (sha256 (base32 - "0wkp5rvnqj0ghxia0558mnn4c7s3n501j99q2isp3sp0ci069w1h")))) - (arguments - '(#:modules ((guix build utils)) - #:builder - (begin - (use-modules (guix build utils)) - (let ((source (assoc-ref %build-inputs "source")) - (unzip (string-append (assoc-ref %build-inputs "unzip") - "/bin/unzip")) - (dtd (string-append (assoc-ref %outputs "out") - "/xml/dtd/docbook"))) - (mkdir-p dtd) - (invoke unzip source "-d" dtd))))))) + "0wkp5rvnqj0ghxia0558mnn4c7s3n501j99q2isp3sp0ci069w1h")))))) (define-public docbook-xsl (package From patchwork Sat Mar 11 17:54:11 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bruno Victal X-Patchwork-Id: 47902 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 6C86516B70; Sat, 11 Mar 2023 17:55:23 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=MAILING_LIST_MULTI, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 0FF3B1685F for ; Sat, 11 Mar 2023 17:55:21 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pb3Qu-00065D-KG; Sat, 11 Mar 2023 12:55:04 -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 1pb3Qs-00064Z-K7 for guix-patches@gnu.org; Sat, 11 Mar 2023 12:55:02 -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 1pb3Qs-0006z1-6x for guix-patches@gnu.org; Sat, 11 Mar 2023 12:55:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pb3Qr-0003nb-TS for guix-patches@gnu.org; Sat, 11 Mar 2023 12:55:01 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#61015] [PATCH v2 2/4] gnu: docbook-xml: Fix permissions. Resent-From: Bruno Victal Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 11 Mar 2023 17:55:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 61015 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 61015@debbugs.gnu.org Cc: Bruno Victal Received: via spool by 61015-submit@debbugs.gnu.org id=B61015.167855726714520 (code B ref 61015); Sat, 11 Mar 2023 17:55:01 +0000 Received: (at 61015) by debbugs.gnu.org; 11 Mar 2023 17:54:27 +0000 Received: from localhost ([127.0.0.1]:58599 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pb3QI-0003m8-S8 for submit@debbugs.gnu.org; Sat, 11 Mar 2023 12:54:27 -0500 Received: from smtpm5.myservices.hosting ([185.26.105.236]:54860) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pb3QH-0003lu-Oa for 61015@debbugs.gnu.org; Sat, 11 Mar 2023 12:54:26 -0500 Received: from mail1.netim.hosting (unknown [185.26.106.173]) by smtpm5.myservices.hosting (Postfix) with ESMTP id 8414820CB2 for <61015@debbugs.gnu.org>; Sat, 11 Mar 2023 18:54:23 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by mail1.netim.hosting (Postfix) with ESMTP id 35683800A0; Sat, 11 Mar 2023 18:54:23 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at mail1.netim.hosting Received: from mail1.netim.hosting ([127.0.0.1]) by localhost (mail1-2.netim.hosting [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id I94jk4MRENgJ; Sat, 11 Mar 2023 18:54:23 +0100 (CET) Received: from guix-nuc.home.arpa (bl9-119-177.dsl.telepac.pt [85.242.119.177]) (Authenticated sender: lumen@makinata.eu) by mail1.netim.hosting (Postfix) with ESMTPSA id C92618009E; Sat, 11 Mar 2023 18:54:22 +0100 (CET) From: Bruno Victal Date: Sat, 11 Mar 2023 17:54:11 +0000 Message-Id: <1116fef363afce41f355e127107db35f3be99371.1678557210.git.mirai@makinata.eu> X-Mailer: git-send-email 2.39.1 In-Reply-To: <821b168ca199012a29d7a95961c6380b40e46855.1678557210.git.mirai@makinata.eu> References: <821b168ca199012a29d7a95961c6380b40e46855.1678557210.git.mirai@makinata.eu> MIME-Version: 1.0 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+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * gnu/packages/docbook.scm (docbook-xml-5) [arguments]: Remove unnecessary executable permissions. --- gnu/packages/docbook.scm | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/gnu/packages/docbook.scm b/gnu/packages/docbook.scm index 7cfe550593..6a8eeec386 100644 --- a/gnu/packages/docbook.scm +++ b/gnu/packages/docbook.scm @@ -62,8 +62,15 @@ (define-public docbook-xml-5 (build-system copy-build-system) (arguments (list + #:modules '((guix build copy-build-system) + (guix build utils) + (srfi srfi-26)) #:phases #~(modify-phases %standard-phases + (add-after 'unpack 'fix-permissions + (lambda _ + ;; XXX: These files do not need 0755 permission. + (for-each (cut chmod <> #o644) (find-files ".")))) (replace 'install (lambda _ (let ((dtd-path (string-append #$output "/xml/dtd/docbook"))) From patchwork Sat Mar 11 17:54:12 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Bruno Victal X-Patchwork-Id: 47905 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id D931816B70; Sat, 11 Mar 2023 17:55:42 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=MAILING_LIST_MULTI, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,URIBL_BLOCKED,URIBL_SBL_A autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id C47D71685F for ; Sat, 11 Mar 2023 17:55:41 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pb3Qv-00065H-Ax; Sat, 11 Mar 2023 12:55: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 1pb3Qt-00064t-7q for guix-patches@gnu.org; Sat, 11 Mar 2023 12:55: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 1pb3Qs-00074l-V0 for guix-patches@gnu.org; Sat, 11 Mar 2023 12:55:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pb3Qs-0003nq-Ra for guix-patches@gnu.org; Sat, 11 Mar 2023 12:55:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#61015] [PATCH v2 3/4] gnu: docbook-xml: Use XSLT to patch catalog.xml. Resent-From: Bruno Victal Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 11 Mar 2023 17:55:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 61015 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 61015@debbugs.gnu.org Cc: Bruno Victal Received: via spool by 61015-submit@debbugs.gnu.org id=B61015.167855727214554 (code B ref 61015); Sat, 11 Mar 2023 17:55:02 +0000 Received: (at 61015) by debbugs.gnu.org; 11 Mar 2023 17:54:32 +0000 Received: from localhost ([127.0.0.1]:58605 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pb3QO-0003mf-1H for submit@debbugs.gnu.org; Sat, 11 Mar 2023 12:54:32 -0500 Received: from smtpmciv2.myservices.hosting ([185.26.107.238]:49962) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pb3QK-0003mH-GW for 61015@debbugs.gnu.org; Sat, 11 Mar 2023 12:54:29 -0500 Received: from mail1.netim.hosting (unknown [185.26.106.173]) by smtpmciv2.myservices.hosting (Postfix) with ESMTP id D01DC2094D for <61015@debbugs.gnu.org>; Sat, 11 Mar 2023 18:54:27 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by mail1.netim.hosting (Postfix) with ESMTP id 72486800A1; Sat, 11 Mar 2023 18:54:24 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at mail1.netim.hosting Received: from mail1.netim.hosting ([127.0.0.1]) by localhost (mail1-2.netim.hosting [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id E_5pLVqLGeUh; Sat, 11 Mar 2023 18:54:23 +0100 (CET) Received: from guix-nuc.home.arpa (bl9-119-177.dsl.telepac.pt [85.242.119.177]) (Authenticated sender: lumen@makinata.eu) by mail1.netim.hosting (Postfix) with ESMTPSA id 233348009F; Sat, 11 Mar 2023 18:54:23 +0100 (CET) From: Bruno Victal Date: Sat, 11 Mar 2023 17:54:12 +0000 Message-Id: X-Mailer: git-send-email 2.39.1 In-Reply-To: <821b168ca199012a29d7a95961c6380b40e46855.1678557210.git.mirai@makinata.eu> References: <821b168ca199012a29d7a95961c6380b40e46855.1678557210.git.mirai@makinata.eu> MIME-Version: 1.0 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+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches (sxml transforms) are unsuited here due to guile-bug #20339. * gnu/packages/aux-files/xml/patch-catalog-xml.xsl: New file. * Makefile.am: Register it. * gnu/packages/docbook.scm (docbook-xml-5)[native-inputs]: Add libxslt. [arguments]: Add phase to patch catalog.xml using XSLT. --- Makefile.am | 3 ++- .../aux-files/xml/patch-catalog-xml.xsl | 24 +++++++++++++++++++ gnu/packages/docbook.scm | 14 ++++++++++- 3 files changed, 39 insertions(+), 2 deletions(-) create mode 100644 gnu/packages/aux-files/xml/patch-catalog-xml.xsl diff --git a/Makefile.am b/Makefile.am index 23b939b674..73369c746c 100644 --- a/Makefile.am +++ b/Makefile.am @@ -436,7 +436,8 @@ AUX_FILES = \ gnu/packages/aux-files/python/sanity-check-next.py \ gnu/packages/aux-files/python/sitecustomize.py \ gnu/packages/aux-files/renpy/renpy.in \ - gnu/packages/aux-files/run-in-namespace.c + gnu/packages/aux-files/run-in-namespace.c \ + gnu/packages/aux-files/xml/patch-catalog-xml.xsl # Templates, examples. EXAMPLES = \ diff --git a/gnu/packages/aux-files/xml/patch-catalog-xml.xsl b/gnu/packages/aux-files/xml/patch-catalog-xml.xsl new file mode 100644 index 0000000000..947517476d --- /dev/null +++ b/gnu/packages/aux-files/xml/patch-catalog-xml.xsl @@ -0,0 +1,24 @@ + + + + + / + + + + + + + + + + + + + + diff --git a/gnu/packages/docbook.scm b/gnu/packages/docbook.scm index 6a8eeec386..2d11333608 100644 --- a/gnu/packages/docbook.scm +++ b/gnu/packages/docbook.scm @@ -8,6 +8,7 @@ ;;; Copyright © 2021 Mark H Weaver ;;; Copyright © 2021 Efraim Flashner ;;; Copyright © 2021 Andrew Whatson +;;; Copyright © 2023 Bruno Victal ;;; ;;; This file is part of GNU Guix. ;;; @@ -71,11 +72,22 @@ (define-public docbook-xml-5 (lambda _ ;; XXX: These files do not need 0755 permission. (for-each (cut chmod <> #o644) (find-files ".")))) + (add-before 'install 'patch-catalog-xml + (lambda* (#:key inputs #:allow-other-keys) + (let ((xsltproc (search-input-file inputs "/bin/xsltproc")) + (dtd-path (string-append #$output "/xml/dtd/docbook"))) + (invoke xsltproc "--nonet" "--noout" + "--stringparam" "prefix" dtd-path + "--output" "catalog.xml.new" + #$(local-file + (search-auxiliary-file "xml/patch-catalog-xml.xsl")) + "catalog.xml") + (rename-file "catalog.xml.new" "catalog.xml")))) (replace 'install (lambda _ (let ((dtd-path (string-append #$output "/xml/dtd/docbook"))) (copy-recursively "." dtd-path))))))) - (native-inputs (list unzip)) + (native-inputs (list libxslt unzip)) (home-page "https://docbook.org") (synopsis "DocBook XML DTDs for document authoring") (description From patchwork Sat Mar 11 17:54:13 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bruno Victal X-Patchwork-Id: 47904 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 31B0D16B70; Sat, 11 Mar 2023 17:55:40 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=MAILING_LIST_MULTI, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 86FEC1685F for ; Sat, 11 Mar 2023 17:55:37 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pb3Qv-00065U-Jf; Sat, 11 Mar 2023 12:55: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 1pb3Qs-00064h-UD for guix-patches@gnu.org; Sat, 11 Mar 2023 12:55:02 -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 1pb3Qs-00070x-Gy for guix-patches@gnu.org; Sat, 11 Mar 2023 12:55:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pb3Qs-0003nj-Cc for guix-patches@gnu.org; Sat, 11 Mar 2023 12:55:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#61015] [PATCH v2 4/4] gnu: docbook-xml-4.1.2: Add missing catalog.xml. Resent-From: Bruno Victal Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 11 Mar 2023 17:55:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 61015 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 61015@debbugs.gnu.org Cc: Bruno Victal Received: via spool by 61015-submit@debbugs.gnu.org id=B61015.167855727014544 (code B ref 61015); Sat, 11 Mar 2023 17:55:02 +0000 Received: (at 61015) by debbugs.gnu.org; 11 Mar 2023 17:54:30 +0000 Received: from localhost ([127.0.0.1]:58603 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pb3QL-0003mK-3e for submit@debbugs.gnu.org; Sat, 11 Mar 2023 12:54:29 -0500 Received: from smtpm4.myservices.hosting ([185.26.105.235]:60428) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pb3QI-0003lw-0Z for 61015@debbugs.gnu.org; Sat, 11 Mar 2023 12:54:26 -0500 Received: from mail1.netim.hosting (unknown [185.26.106.173]) by smtpm4.myservices.hosting (Postfix) with ESMTP id 5599E20871 for <61015@debbugs.gnu.org>; Sat, 11 Mar 2023 18:54:25 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by mail1.netim.hosting (Postfix) with ESMTP id 0C9388009C; Sat, 11 Mar 2023 18:54:25 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at mail1.netim.hosting Received: from mail1.netim.hosting ([127.0.0.1]) by localhost (mail1-2.netim.hosting [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id Xv1nsHKKS4Ae; Sat, 11 Mar 2023 18:54:24 +0100 (CET) Received: from guix-nuc.home.arpa (bl9-119-177.dsl.telepac.pt [85.242.119.177]) (Authenticated sender: lumen@makinata.eu) by mail1.netim.hosting (Postfix) with ESMTPSA id 729468009E; Sat, 11 Mar 2023 18:54:23 +0100 (CET) From: Bruno Victal Date: Sat, 11 Mar 2023 17:54:13 +0000 Message-Id: X-Mailer: git-send-email 2.39.1 In-Reply-To: <821b168ca199012a29d7a95961c6380b40e46855.1678557210.git.mirai@makinata.eu> References: <821b168ca199012a29d7a95961c6380b40e46855.1678557210.git.mirai@makinata.eu> MIME-Version: 1.0 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+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * gnu/packages/aux-files/xml/docbook-xml/catalog-4.1.2.xml: New file. * Makefile.am: Register it. * gnu/packages/docbook.scm (docbook-xml-4.1.2)[arguments]: Use prebuilt catalog.xml. [native-inputs]: Add libxml2. --- Makefile.am | 3 +- .../xml/docbook-xml/catalog-4.1.2.xml | 31 ++++++++++++++++ gnu/packages/docbook.scm | 36 ++++++++++++++++++- 3 files changed, 68 insertions(+), 2 deletions(-) create mode 100644 gnu/packages/aux-files/xml/docbook-xml/catalog-4.1.2.xml diff --git a/Makefile.am b/Makefile.am index 73369c746c..310bbe1494 100644 --- a/Makefile.am +++ b/Makefile.am @@ -437,7 +437,8 @@ AUX_FILES = \ gnu/packages/aux-files/python/sitecustomize.py \ gnu/packages/aux-files/renpy/renpy.in \ gnu/packages/aux-files/run-in-namespace.c \ - gnu/packages/aux-files/xml/patch-catalog-xml.xsl + gnu/packages/aux-files/xml/patch-catalog-xml.xsl \ + gnu/packages/aux-files/xml/docbook-xml/catalog-4.1.2.xml # Templates, examples. EXAMPLES = \ diff --git a/gnu/packages/aux-files/xml/docbook-xml/catalog-4.1.2.xml b/gnu/packages/aux-files/xml/docbook-xml/catalog-4.1.2.xml new file mode 100644 index 0000000000..cfb1849202 --- /dev/null +++ b/gnu/packages/aux-files/xml/docbook-xml/catalog-4.1.2.xml @@ -0,0 +1,31 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/gnu/packages/docbook.scm b/gnu/packages/docbook.scm index 2d11333608..902e418b17 100644 --- a/gnu/packages/docbook.scm +++ b/gnu/packages/docbook.scm @@ -39,6 +39,7 @@ (define-module (gnu packages docbook) #:use-module (gnu packages web-browsers) #:use-module (gnu packages xml) #:use-module (guix gexp) + #:use-module (guix utils) #:use-module ((guix licenses) #:prefix license:) #:use-module (guix packages) #:use-module (guix download) @@ -151,7 +152,40 @@ (define-public docbook-xml-4.1.2 "/docbkx412.zip")) (sha256 (base32 - "0wkp5rvnqj0ghxia0558mnn4c7s3n501j99q2isp3sp0ci069w1h")))))) + "0wkp5rvnqj0ghxia0558mnn4c7s3n501j99q2isp3sp0ci069w1h")))) + (arguments + (substitute-keyword-arguments (package-arguments docbook-xml) + ((#:phases phases) + #~(modify-phases #$phases + (add-after 'unpack 'copy-catalog-file + ;; docbook-xml-4.1.2 is unique in the fact that it doesn't come + ;; with a catalog.xml file, requiring it to be generated by hand + ;; from the docbook.cat SGML catalog. We could automatically + ;; generate it here at the cost of enlarging the package + ;; definition with a rudimentary (PEG) parser for the SGML + ;; catalog but this is overkill since this file is unlikely to + ;; change, therefore we ship a pre-generated catalog.xml. + (lambda _ + (copy-file + #$(local-file + (search-auxiliary-file + "xml/docbook-xml/catalog-4.1.2.xml")) + "catalog.xml"))) + (add-after 'patch-catalog-xml 'add-rewrite-entries + (lambda* (#:key inputs #:allow-other-keys) + (let ((xmlcatalog (search-input-file inputs "/bin/xmlcatalog")) + (dtd-path (string-append #$output "/xml/dtd/docbook"))) + (for-each + (lambda (type) + (invoke xmlcatalog "--noout" + "--add" type + "http://www.oasis-open.org/docbook/xml/4.1.2/" + (string-append "file://" dtd-path "/") + "catalog.xml")) + (list "rewriteSystem" "rewriteURI"))))))))) + (native-inputs + (modify-inputs (package-native-inputs docbook-xml) + (prepend libxml2))))) (define-public docbook-xsl (package