From patchwork Mon Jan 23 03:31:16 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bruno Victal X-Patchwork-Id: 1216 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 DF60927BBED; Mon, 23 Jan 2023 03:32:16 +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=-3.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS 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 4C1EF27BBEB for ; Mon, 23 Jan 2023 03:32:14 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pJnYy-0005ve-4s; Sun, 22 Jan 2023 22:32: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 1pJnYx-0005vU-61 for guix-patches@gnu.org; Sun, 22 Jan 2023 22:32: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 1pJnYw-0007hp-UX for guix-patches@gnu.org; Sun, 22 Jan 2023 22:32:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pJnYw-00051U-Ha for guix-patches@gnu.org; Sun, 22 Jan 2023 22:32:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#61015] [PATCH core-updates 0/9] Modernize and fix docbook-xml Resent-From: Bruno Victal Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 23 Jan 2023 03:32:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 61015 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 61015@debbugs.gnu.org Cc: Bruno Victal X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.167444471819297 (code B ref -1); Mon, 23 Jan 2023 03:32:02 +0000 Received: (at submit) by debbugs.gnu.org; 23 Jan 2023 03:31:58 +0000 Received: from localhost ([127.0.0.1]:52937 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pJnYs-00051A-7z for submit@debbugs.gnu.org; Sun, 22 Jan 2023 22:31:58 -0500 Received: from lists.gnu.org ([209.51.188.17]:51782) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pJnYr-000513-0A for submit@debbugs.gnu.org; Sun, 22 Jan 2023 22:31:57 -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 1pJnYo-0005uR-5Y for guix-patches@gnu.org; Sun, 22 Jan 2023 22:31:56 -0500 Received: from smtpmciv7.myservices.hosting ([185.26.106.202]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pJnYm-0007fH-Ij for guix-patches@gnu.org; Sun, 22 Jan 2023 22:31:53 -0500 Received: from mail1.netim.hosting (unknown [185.26.106.172]) by smtpmciv7.myservices.hosting (Postfix) with ESMTP id C14F820B99 for ; Mon, 23 Jan 2023 04:31:37 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by mail1.netim.hosting (Postfix) with ESMTP id 763F780096; Mon, 23 Jan 2023 04:31:37 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at mail1.netim.hosting Received: from mail1.netim.hosting ([127.0.0.1]) by localhost (mail1-1.netim.hosting [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id AQmTnKK1U7pH; Mon, 23 Jan 2023 04:31:37 +0100 (CET) Received: from guix-nuc.home.arpa (bl9-118-236.dsl.telepac.pt [85.242.118.236]) (Authenticated sender: lumen@makinata.eu) by mail1.netim.hosting (Postfix) with ESMTPSA id 055AD80093; Mon, 23 Jan 2023 04:31:36 +0100 (CET) From: Bruno Victal Date: Mon, 23 Jan 2023 03:31:16 +0000 Message-Id: X-Mailer: git-send-email 2.38.1 MIME-Version: 1.0 tags: patch Received-SPF: pass client-ip=185.26.106.202; envelope-from=mirai@makinata.eu; helo=smtpmciv7.myservices.hosting X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, 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+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches This patch-series modernizes docbook-xml package definitions and properly patches the catalog.xml paths using XSLT. I've used XSLT here as it seems easier (and better documented) to perform XML operations with it. I did a small prototype with (sxml transforms) but due to guile-bug #20339, it's impossible to go from sxml->xml, ruling it out from being a suitable replacement for XSLT. The situation for docbook-xml-4.1.2 could be considered extraordinary since it's the only package that doesn't come with a catalog.xml file, requiring a pre-built one to be used. (It can be generated from source, by implementing a (PEG) parser for SGML catalogs but this seems unnecessary for a file that is unlikely to see any changes.) With these changes, it's no longer required for packages to do substitute* or other workarounds to coerce docbook-xml to play nicely, libxml2 will automatically find the DTDs through its native-search-path. (XML_CATALOG_FILES variable) A good follow-up to this patch-series would be to search and destroy the workarounds currently employed by docbook-xml dependant packages to discourage cargo-culting redundant procedures. Bruno Victal (9): gnu: docbook-xml: Use copy-build-system. gnu: docbook-xml-4.1.2: Adapt to copy-build-system. gnu: docbook-xml: Adapt to copy-build-system. gnu: docbook-xml-4.4: Adapt to copy-build-system. gnu: docbook-xml-4.3: Adapt to copy-build-system. gnu: docbook-xml-4.2: Adapt to copy-build-system. gnu: docbook-xml: Fix permissions. gnu: docbook-xml: Use XSLT to patch catalog.xml. gnu: docbook-xml-4.1.2: Add missing catalog.xml. .../xml/docbook-xml/catalog-4.1.2.xml | 31 +++++ gnu/packages/aux-files/xml/patch-uri.xsl | 24 ++++ gnu/packages/docbook.scm | 127 +++++++++--------- 3 files changed, 116 insertions(+), 66 deletions(-) create mode 100644 gnu/packages/aux-files/xml/docbook-xml/catalog-4.1.2.xml create mode 100644 gnu/packages/aux-files/xml/patch-uri.xsl base-commit: ca124b098dcc7ce7898df10faf9986f44a14e0a1