From patchwork Mon Oct 9 20:05:49 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bruno Victal X-Patchwork-Id: 54637 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 E734927BBEC; Mon, 9 Oct 2023 21:08:08 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI, SPF_HELO_PASS,URIBL_BLOCKED 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 38BE127BBE2 for ; Mon, 9 Oct 2023 21:08:05 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qpwXX-0005mr-Ct; Mon, 09 Oct 2023 16:07:43 -0400 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 1qpwXW-0005mh-4G for guix-patches@gnu.org; Mon, 09 Oct 2023 16:07:42 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qpwXV-0007p5-Rq for guix-patches@gnu.org; Mon, 09 Oct 2023 16:07:41 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qpwXq-0002SM-I0 for guix-patches@gnu.org; Mon, 09 Oct 2023 16:08:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#65479] [PATCH core-updates v3 01/63] Partial revert d3a0869e9b667d563e7e877c93f30a70896c5831. Resent-From: Bruno Victal Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 09 Oct 2023 20:08:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 65479 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 65479@debbugs.gnu.org Cc: Bruno Victal Received: via spool by 65479-submit@debbugs.gnu.org id=B65479.16968820579181 (code B ref 65479); Mon, 09 Oct 2023 20:08:02 +0000 Received: (at 65479) by debbugs.gnu.org; 9 Oct 2023 20:07:37 +0000 Received: from localhost ([127.0.0.1]:33251 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qpwXR-0002O0-7b for submit@debbugs.gnu.org; Mon, 09 Oct 2023 16:07:37 -0400 Received: from smtpm5.myservices.hosting ([185.26.105.236]:39380) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qpwXO-0002Nf-M7 for 65479@debbugs.gnu.org; Mon, 09 Oct 2023 16:07:35 -0400 Received: from mail1.netim.hosting (unknown [185.26.106.173]) by smtpm5.myservices.hosting (Postfix) with ESMTP id 3C0EE20CC4 for <65479@debbugs.gnu.org>; Mon, 9 Oct 2023 22:07:11 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by mail1.netim.hosting (Postfix) with ESMTP id A317B8009F; Mon, 9 Oct 2023 22:07:11 +0200 (CEST) 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 eUBPxRtW8TIJ; Mon, 9 Oct 2023 22:07:11 +0200 (CEST) Received: from guix-nuc.home.arpa (unknown [10.192.1.83]) (Authenticated sender: lumen@makinata.eu) by mail1.netim.hosting (Postfix) with ESMTPSA id E4E5580060; Mon, 9 Oct 2023 22:07:10 +0200 (CEST) From: Bruno Victal Date: Mon, 9 Oct 2023 21:05:49 +0100 Message-ID: <3a2a3b969ad1d0aac1e459f4d28e8b732bb67bc8.1696881354.git.mirai@makinata.eu> X-Mailer: git-send-email 2.41.0 In-Reply-To: References: 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 This reconciles the changes from d3a0869e9b667d563e7e877c93f30a70896c5831 and a2ee092ff2f3c37be0d47fc19e6cd7aa84bd9490. --- gnu/packages/docbook.scm | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/gnu/packages/docbook.scm b/gnu/packages/docbook.scm index cbd1fe2f14..ead1235edf 100644 --- a/gnu/packages/docbook.scm +++ b/gnu/packages/docbook.scm @@ -582,6 +582,31 @@ (define-public dblatex (base32 "0yd09nypswy3q4scri1dg7dr99d7gd6r2dwx0xm81l9f4y32gs0n")))) (build-system python-build-system) + (arguments + (list + ;; Using setuptools causes an invalid "package_base" path in + ;; out/bin/.dblatex-real due to a missing leading '/'. This is caused + ;; by dblatex's setup.py stripping the root path when creating the + ;; script. (dblatex's setup.py still uses distutils and thus has to + ;; create the script by itself. The feature for creating scripts is one + ;; of setuptools' features.) + ;; See this thread for details: + ;; https://lists.gnu.org/archive/html/guix-devel/2016-12/msg00030.html + #:use-setuptools? #f + #:tests? #f ;no test suite + #:phases + #~(modify-phases %standard-phases + (add-after 'wrap 'set-path + (lambda* (#:key inputs #:allow-other-keys) + (let ((path (map (lambda (x) + (string-append (assoc-ref inputs x) + "/bin")) + (list "libxslt" + "imagemagick" "inkscape" + "texlive-updmap.cfg")))) + ;; dblatex executes helper programs at runtime. + (wrap-program (string-append #$output "/bin/dblatex") + `("PATH" ":" prefix ,path)))))))) ;; TODO: Add fig2dev for fig2dev utility. (inputs (list (texlive-updmap.cfg (list texlive-anysize From patchwork Mon Oct 9 20:05:50 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Bruno Victal X-Patchwork-Id: 54641 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 70A7C27BBEA; Mon, 9 Oct 2023 21:08:28 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI, 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 8427627BBEB for ; Mon, 9 Oct 2023 21:08:22 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qpwXi-0005rj-Cx; Mon, 09 Oct 2023 16:07:54 -0400 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 1qpwXb-0005oM-Ds for guix-patches@gnu.org; Mon, 09 Oct 2023 16:07:47 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qpwXa-0007rq-DG; Mon, 09 Oct 2023 16:07:46 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qpwXr-0002Sm-Fj; Mon, 09 Oct 2023 16:08:03 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#65479] [PATCH core-updates v3 02/63] search-paths: Add $XML_CATALOG_FILES and $SGML_CATALOG_FILES. Resent-From: Bruno Victal Original-Sender: "Debbugs-submit" Resent-CC: guix@cbaines.net, dev@jpoiret.xyz, ludo@gnu.org, othacehe@gnu.org, rekado@elephly.net, zimon.toutoune@gmail.com, me@tobias.gr, guix-patches@gnu.org Resent-Date: Mon, 09 Oct 2023 20:08:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 65479 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 65479@debbugs.gnu.org Cc: Bruno Victal , Christopher Baines , Josselin Poiret , Ludovic =?utf-8?q?Court=C3=A8s?= , Mathieu Othacehe , Ricardo Wurmus , Simon Tournier , Tobias Geerinckx-Rice X-Debbugs-Original-Xcc: Christopher Baines , Josselin Poiret , Ludovic =?utf-8?q?Court=C3=A8s?= , Mathieu Othacehe , Ricardo Wurmus , Simon Tournier , Tobias Geerinckx-Rice Received: via spool by 65479-submit@debbugs.gnu.org id=B65479.16968820589188 (code B ref 65479); Mon, 09 Oct 2023 20:08:03 +0000 Received: (at 65479) by debbugs.gnu.org; 9 Oct 2023 20:07:38 +0000 Received: from localhost ([127.0.0.1]:33253 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qpwXR-0002O2-I2 for submit@debbugs.gnu.org; Mon, 09 Oct 2023 16:07:38 -0400 Received: from smtpm3.myservices.hosting ([185.26.105.234]:59254) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qpwXP-0002Nh-3N for 65479@debbugs.gnu.org; Mon, 09 Oct 2023 16:07:35 -0400 Received: from mail1.netim.hosting (unknown [185.26.106.173]) by smtpm3.myservices.hosting (Postfix) with ESMTP id BDA2220FDE for <65479@debbugs.gnu.org>; Mon, 9 Oct 2023 22:07:13 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by mail1.netim.hosting (Postfix) with ESMTP id 268448009C; Mon, 9 Oct 2023 22:07:13 +0200 (CEST) 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 SHTXuYDg5h-m; Mon, 9 Oct 2023 22:07:12 +0200 (CEST) Received: from guix-nuc.home.arpa (unknown [10.192.1.83]) (Authenticated sender: lumen@makinata.eu) by mail1.netim.hosting (Postfix) with ESMTPSA id 792768009D; Mon, 9 Oct 2023 22:07:11 +0200 (CEST) From: Bruno Victal Date: Mon, 9 Oct 2023 21:05:50 +0100 Message-ID: <6cb2e86fb52e37573db40d9de435f64f48cac90b.1696881354.git.mirai@makinata.eu> X-Mailer: git-send-email 2.41.0 In-Reply-To: References: 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 These variables are used by some packages for XML/SGML catalog lookups. * guix/search-paths ($XML_CATALOG_FILES, $SGML_CATALOG_FILES): New variable, extracted from … * gnu/packages/xml.scm (libxml2, opensp)[native-search-paths]: … here. Refer to the variables from (guix search-paths) respectively. * gnu/packages/perl.scm (perl-app-xml-docbook-builder)[native-search-paths]: Use $XML_CATALOG_FILES. * doc/guix.texi (Search Paths): Update documentation to reflect changes. --- doc/guix.texi | 33 ++++++++++++++++++++------------- gnu/packages/perl.scm | 7 +------ gnu/packages/xml.scm | 19 +++---------------- guix/search-paths.scm | 25 +++++++++++++++++++++++++ 4 files changed, 49 insertions(+), 35 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index 8c5697589f..4afe1af6c0 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -11144,17 +11144,14 @@ Search Paths to be found in @file{xml} sub-directories---nothing less. The search path specification looks like this: +@c This is defined at (guix search-paths) as $XML_CATALOG_FILES. @lisp -(package - (name "libxml2") - ;; some fields omitted - (native-search-paths - (list (search-path-specification - (variable "XML_CATALOG_FILES") - (separator " ") - (files '("xml")) - (file-pattern "^catalog\\.xml$") - (file-type 'regular))))) +(search-path-specification + (variable "XML_CATALOG_FILES") + (separator " ") + (files '("xml")) + (file-pattern "^catalog\\.xml$") + (file-type 'regular)) @end lisp Worry not, search path specifications are usually not this tricky. @@ -11190,15 +11187,16 @@ Search Paths though it can be any symbol returned by @code{stat:type} (@pxref{File System, @code{stat},, guile, GNU Guile Reference Manual}). -In the libxml2 example above, we would match regular files; in the -Python example, we would match directories. +In the @env{XML_CATALOG_FILES} example above, we would match regular +files; in the Python example, we would match directories. @item @code{file-pattern} (default: @code{#f}) This must be either @code{#f} or a regular expression specifying files to be matched @emph{within} the sub-directories specified by the @code{files} field. -Again, the libxml2 example shows a situation where this is needed. +Again, the @env{XML_CATALOG_FILES} example shows a situation where this +is needed. @end table @end deftp @@ -11206,6 +11204,15 @@ Search Paths To reduce duplications, some of them are pre-defined in @code{(guix search-paths)}. +@defvar $SGML_CATALOG_FILES +@defvarx $XML_CATALOG_FILES +These two search paths indicate where the +@url{https://www.oasis-open.org/specs/a401.htm,TR9401 catalog}@footnote{ +Alternatively known as SGML catalog.} or +@url{https://www.oasis-open.org/committees/download.php/14809/xml-catalogs.html, +XML catalog} files can be found. +@end defvar + @defvar $SSL_CERT_DIR @defvarx $SSL_CERT_FILE These two search paths indicate where X.509 certificates can be found diff --git a/gnu/packages/perl.scm b/gnu/packages/perl.scm index 8b82c272fc..267a35e560 100644 --- a/gnu/packages/perl.scm +++ b/gnu/packages/perl.scm @@ -601,12 +601,7 @@ (define-public perl-app-xml-docbook-builder (list perl-class-xsaccessor perl-test-trap)) (native-search-paths ;; xsltproc's search paths, to avoid propagating libxslt. - (list (search-path-specification - (variable "XML_CATALOG_FILES") - (separator " ") - (files '("xml")) - (file-pattern "^catalog\\.xml$") - (file-type 'regular)))) + (list $XML_CATALOG_FILES)) (home-page "https://www.shlomifish.org/open-source/projects/docmake/") (synopsis "Translate DocBook/XML documentation into other file formats") (description diff --git a/gnu/packages/xml.scm b/gnu/packages/xml.scm index cc26e2fa67..baf024820c 100644 --- a/gnu/packages/xml.scm +++ b/gnu/packages/xml.scm @@ -83,6 +83,7 @@ (define-module (gnu packages xml) #:use-module (guix build-system python) #:use-module (guix deprecation) #:use-module (guix utils) + #:use-module (guix search-paths) #:use-module (gnu packages linux) #:use-module (gnu packages pkg-config)) @@ -225,14 +226,7 @@ (define-public libxml2 (inputs (list xz)) (propagated-inputs (list zlib)) ; libxml2.la says '-lz'. (native-inputs (list perl)) - ;; $XML_CATALOG_FILES lists 'catalog.xml' files found in under the 'xml' - ;; sub-directory of any given package. - (native-search-paths (list (search-path-specification - (variable "XML_CATALOG_FILES") - (separator " ") - (files '("xml")) - (file-pattern "^catalog\\.xml$") - (file-type 'regular)))) + (native-search-paths (list $XML_CATALOG_FILES)) (search-paths native-search-paths) (description "Libxml2 is the XML C parser and toolkit developed for the Gnome @@ -1806,14 +1800,7 @@ (define-public opensp (("^\tOSGMLNORM=`echo osgmlnorm\\|sed '\\$\\(transform\\)'`\\\\") "\tOSGMLNORM=`echo osgmlnorm|sed '$(transform)'`") (("^\t\\$\\(SHELL\\)\n") ""))))))) - ;; $SGML_CATALOG_FILES lists 'catalog' or 'CATALOG' or '*.cat' files found - ;; under the 'sgml' sub-directory of any given package. - (native-search-paths (list (search-path-specification - (variable "SGML_CATALOG_FILES") - (separator ":") - (files '("sgml")) - (file-pattern "^catalog$|^CATALOG$|^.*\\.cat$") - (file-type 'regular)))) + (native-search-paths (list $SGML_CATALOG_FILES)) (home-page "https://openjade.sourceforge.net/") (synopsis "Suite of SGML/XML processing tools") (description "OpenSP is an object-oriented toolkit for SGML parsing and diff --git a/guix/search-paths.scm b/guix/search-paths.scm index 5375fae34b..d325e57989 100644 --- a/guix/search-paths.scm +++ b/guix/search-paths.scm @@ -42,6 +42,8 @@ (define-module (guix search-paths) $SSL_CERT_DIR $SSL_CERT_FILE $TZDIR + $SGML_CATALOG_FILES + $XML_CATALOG_FILES %gcc-search-paths @@ -154,6 +156,29 @@ (define $TZDIR (files '("share/zoneinfo")) (separator #f))) ;single entry +;; Some packages (notably libxml2) make use of 'XML_CATALOG_FILES' +;; and 'SGML_CATALOG_FILES' for remapping URI references or public/system +;; identifiers to other URI references. +(define $SGML_CATALOG_FILES + ;; $SGML_CATALOG_FILES lists 'catalog' or 'CATALOG' or '*.cat' files found + ;; under the 'sgml' sub-directory of any given package. + (search-path-specification + (variable "SGML_CATALOG_FILES") + (separator ":") + (files '("sgml")) + (file-pattern "^catalog$|^CATALOG$|^.*\\.cat$") + (file-type 'regular))) + +(define $XML_CATALOG_FILES + ;; $XML_CATALOG_FILES lists 'catalog.xml' files found in under the 'xml' + ;; sub-directory of any given package. + (search-path-specification + (variable "XML_CATALOG_FILES") + (separator " ") + (files '("xml")) + (file-pattern "^catalog\\.xml$") + (file-type 'regular))) + (define (search-path-specification->sexp spec) "Return an sexp representing SPEC, a . The sexp corresponds to the arguments expected by `set-path-environment-variable'." From patchwork Mon Oct 9 20:05:51 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bruno Victal X-Patchwork-Id: 54640 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 962E527BBEC; Mon, 9 Oct 2023 21:08:25 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI, SPF_HELO_PASS,URIBL_BLOCKED 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 B1C3027BBE2 for ; Mon, 9 Oct 2023 21:08:21 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qpwXa-0005nT-NI; Mon, 09 Oct 2023 16:07:46 -0400 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 1qpwXX-0005ms-NM for guix-patches@gnu.org; Mon, 09 Oct 2023 16:07:43 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qpwXX-0007qk-F9 for guix-patches@gnu.org; Mon, 09 Oct 2023 16:07:43 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qpwXs-0002Sv-4s for guix-patches@gnu.org; Mon, 09 Oct 2023 16:08:04 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#65479] [PATCH core-updates v3 03/63] gnu: libxml2: Add SGML_CATALOG_FILES to native-search-path. Resent-From: Bruno Victal Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 09 Oct 2023 20:08:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 65479 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 65479@debbugs.gnu.org Cc: Bruno Victal , gemmaro Received: via spool by 65479-submit@debbugs.gnu.org id=B65479.16968820609207 (code B ref 65479); Mon, 09 Oct 2023 20:08:04 +0000 Received: (at 65479) by debbugs.gnu.org; 9 Oct 2023 20:07:40 +0000 Received: from localhost ([127.0.0.1]:33256 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qpwXU-0002OM-7a for submit@debbugs.gnu.org; Mon, 09 Oct 2023 16:07:40 -0400 Received: from smtpm4.myservices.hosting ([185.26.105.235]:37964) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qpwXQ-0002No-AK for 65479@debbugs.gnu.org; Mon, 09 Oct 2023 16:07:37 -0400 Received: from mail1.netim.hosting (unknown [185.26.106.173]) by smtpm4.myservices.hosting (Postfix) with ESMTP id 779E520C7A; Mon, 9 Oct 2023 22:07:14 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by mail1.netim.hosting (Postfix) with ESMTP id C3304800A0; Mon, 9 Oct 2023 22:07:13 +0200 (CEST) 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 4xh5a9z4xDBM; Mon, 9 Oct 2023 22:07:13 +0200 (CEST) Received: from guix-nuc.home.arpa (unknown [10.192.1.83]) (Authenticated sender: lumen@makinata.eu) by mail1.netim.hosting (Postfix) with ESMTPSA id F0B3480099; Mon, 9 Oct 2023 22:07:11 +0200 (CEST) From: Bruno Victal Date: Mon, 9 Oct 2023 21:05:51 +0100 Message-ID: <02d9912c06708bb0b6a2008f361fd2fda7b29590.1696881354.git.mirai@makinata.eu> X-Mailer: git-send-email 2.41.0 In-Reply-To: References: 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 According to the xmllint manpage it also makes use of the SGML_CATALOG_FILES environment variable. * gnu/packages/xml.scm (libxml2)[native-search-paths]: Add SGML_CATALOG_FILES. Co-authored-by: gemmaro --- gnu/packages/xml.scm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gnu/packages/xml.scm b/gnu/packages/xml.scm index baf024820c..16aabffca8 100644 --- a/gnu/packages/xml.scm +++ b/gnu/packages/xml.scm @@ -226,7 +226,8 @@ (define-public libxml2 (inputs (list xz)) (propagated-inputs (list zlib)) ; libxml2.la says '-lz'. (native-inputs (list perl)) - (native-search-paths (list $XML_CATALOG_FILES)) + (native-search-paths + (list $SGML_CATALOG_FILES $XML_CATALOG_FILES)) (search-paths native-search-paths) (description "Libxml2 is the XML C parser and toolkit developed for the Gnome From patchwork Mon Oct 9 20:05:52 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bruno Victal X-Patchwork-Id: 54639 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 4F19727BBE9; Mon, 9 Oct 2023 21:08:20 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI, 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 63F6B27BBE2 for ; Mon, 9 Oct 2023 21:08:16 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qpwXk-0005uQ-Jc; Mon, 09 Oct 2023 16:07:56 -0400 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 1qpwXg-0005rJ-QX for guix-patches@gnu.org; Mon, 09 Oct 2023 16:07:52 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qpwXg-0007vx-IN; Mon, 09 Oct 2023 16:07:52 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qpwXy-0002V8-LQ; Mon, 09 Oct 2023 16:08:10 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#65479] [PATCH core-updates v3 04/63] gnu: libxslt: Set search-paths for XML and SGML catalogs. Resent-From: Bruno Victal Original-Sender: "Debbugs-submit" Resent-CC: guix@cbaines.net, dev@jpoiret.xyz, ludo@gnu.org, othacehe@gnu.org, rekado@elephly.net, zimon.toutoune@gmail.com, me@tobias.gr, guix-patches@gnu.org Resent-Date: Mon, 09 Oct 2023 20:08:10 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 65479 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 65479@debbugs.gnu.org Cc: Bruno Victal , Christopher Baines , Josselin Poiret , Ludovic =?utf-8?q?Court=C3=A8s?= , Mathieu Othacehe , Ricardo Wurmus , Simon Tournier , Tobias Geerinckx-Rice X-Debbugs-Original-Xcc: Christopher Baines , Josselin Poiret , Ludovic =?utf-8?q?Court=C3=A8s?= , Mathieu Othacehe , Ricardo Wurmus , Simon Tournier , Tobias Geerinckx-Rice Received: via spool by 65479-submit@debbugs.gnu.org id=B65479.16968820829439 (code B ref 65479); Mon, 09 Oct 2023 20:08:10 +0000 Received: (at 65479) by debbugs.gnu.org; 9 Oct 2023 20:08:02 +0000 Received: from localhost ([127.0.0.1]:33297 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qpwXp-0002Ru-9z for submit@debbugs.gnu.org; Mon, 09 Oct 2023 16:08:01 -0400 Received: from smtpmciv4.myservices.hosting ([185.26.107.240]:45948) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qpwXi-0002QW-30 for 65479@debbugs.gnu.org; Mon, 09 Oct 2023 16:07:54 -0400 Received: from mail1.netim.hosting (unknown [185.26.106.173]) by smtpmciv4.myservices.hosting (Postfix) with ESMTP id AD935203DB for <65479@debbugs.gnu.org>; Mon, 9 Oct 2023 22:07:16 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by mail1.netim.hosting (Postfix) with ESMTP id 22908800A1; Mon, 9 Oct 2023 22:07:16 +0200 (CEST) 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 uAGhOCrTFUYz; Mon, 9 Oct 2023 22:07:15 +0200 (CEST) Received: from guix-nuc.home.arpa (unknown [10.192.1.83]) (Authenticated sender: lumen@makinata.eu) by mail1.netim.hosting (Postfix) with ESMTPSA id 8F46C8009F; Mon, 9 Oct 2023 22:07:12 +0200 (CEST) From: Bruno Victal Date: Mon, 9 Oct 2023 21:05:52 +0100 Message-ID: <085c08f80f64fa4ecc69f741152026061bd4826d.1696881354.git.mirai@makinata.eu> X-Mailer: git-send-email 2.41.0 In-Reply-To: References: 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 According to xsltproc manpage it supports both XML_CATALOG_FILES and SGML_CATALOG_FILES for catalog lookup. Since the native-search-paths field is not thunked, doing (package-native-search-paths libxslt) can lead to module import cycles so we define a %libxslt-search-paths variable to avoid this kind of trouble. * guix/search-paths.scm (%libxslt-search-paths): New variable. * gnu/packages/xml.scm (libxslt)[native-search-paths]: Set to %libxslt-search-paths. * gnu/packages/perl.scm (perl-app-xml-docbook-builder)[native-search-paths]: Ditto. --- gnu/packages/perl.scm | 4 +--- gnu/packages/xml.scm | 1 + guix/search-paths.scm | 4 ++++ 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/gnu/packages/perl.scm b/gnu/packages/perl.scm index 267a35e560..f0b91e6b65 100644 --- a/gnu/packages/perl.scm +++ b/gnu/packages/perl.scm @@ -599,9 +599,7 @@ (define-public perl-app-xml-docbook-builder (list libxslt)) (propagated-inputs (list perl-class-xsaccessor perl-test-trap)) - (native-search-paths - ;; xsltproc's search paths, to avoid propagating libxslt. - (list $XML_CATALOG_FILES)) + (native-search-paths %libxslt-search-paths) (home-page "https://www.shlomifish.org/open-source/projects/docmake/") (synopsis "Translate DocBook/XML documentation into other file formats") (description diff --git a/gnu/packages/xml.scm b/gnu/packages/xml.scm index 16aabffca8..0b31bb5928 100644 --- a/gnu/packages/xml.scm +++ b/gnu/packages/xml.scm @@ -365,6 +365,7 @@ (define-public libxslt xz)) (native-inputs (list pkg-config)) + (native-search-paths %libxslt-search-paths) (description "Libxslt is an XSLT C library developed for the GNOME project. It is based on libxml for XML parsing, tree manipulation and XPath support.") diff --git a/guix/search-paths.scm b/guix/search-paths.scm index d325e57989..a935684952 100644 --- a/guix/search-paths.scm +++ b/guix/search-paths.scm @@ -46,6 +46,7 @@ (define-module (guix search-paths) $XML_CATALOG_FILES %gcc-search-paths + %libxslt-search-paths search-path-specification->sexp sexp->search-path-specification @@ -179,6 +180,9 @@ (define $XML_CATALOG_FILES (file-pattern "^catalog\\.xml$") (file-type 'regular))) +(define %libxslt-search-paths + (list $SGML_CATALOG_FILES $XML_CATALOG_FILES)) + (define (search-path-specification->sexp spec) "Return an sexp representing SPEC, a . The sexp corresponds to the arguments expected by `set-path-environment-variable'." From patchwork Mon Oct 9 20:05:53 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Bruno Victal X-Patchwork-Id: 54648 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 813DB27BBEC; Mon, 9 Oct 2023 21:08:59 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI, SPF_HELO_PASS,URIBL_BLOCKED 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 1C65227BBE2 for ; Mon, 9 Oct 2023 21:08:57 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qpwXd-0005pi-Vp; Mon, 09 Oct 2023 16:07:50 -0400 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 1qpwXb-0005oC-6Z for guix-patches@gnu.org; Mon, 09 Oct 2023 16:07:47 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qpwXa-0007sn-UW for guix-patches@gnu.org; Mon, 09 Oct 2023 16:07:46 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qpwXv-0002U6-LS for guix-patches@gnu.org; Mon, 09 Oct 2023 16:08:07 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#65479] [PATCH core-updates v3 05/63] gnu: docbook-xml: Fix installation paths. Resent-From: Bruno Victal Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 09 Oct 2023 20:08:07 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 65479 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 65479@debbugs.gnu.org Cc: Bruno Victal Received: via spool by 65479-submit@debbugs.gnu.org id=B65479.16968820749338 (code B ref 65479); Mon, 09 Oct 2023 20:08:07 +0000 Received: (at 65479) by debbugs.gnu.org; 9 Oct 2023 20:07:54 +0000 Received: from localhost ([127.0.0.1]:33279 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qpwXh-0002QQ-DG for submit@debbugs.gnu.org; Mon, 09 Oct 2023 16:07:54 -0400 Received: from smtpmciv1.myservices.hosting ([185.26.107.237]:43876) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qpwXb-0002PJ-5x for 65479@debbugs.gnu.org; Mon, 09 Oct 2023 16:07:48 -0400 Received: from mail1.netim.hosting (unknown [185.26.106.173]) by smtpmciv1.myservices.hosting (Postfix) with ESMTP id 7FD70203C4 for <65479@debbugs.gnu.org>; Mon, 9 Oct 2023 22:07:25 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by mail1.netim.hosting (Postfix) with ESMTP id C9832800A1; Mon, 9 Oct 2023 22:07:16 +0200 (CEST) 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 OpvUm1i_1siw; Mon, 9 Oct 2023 22:07:16 +0200 (CEST) Received: from guix-nuc.home.arpa (unknown [10.192.1.83]) (Authenticated sender: lumen@makinata.eu) by mail1.netim.hosting (Postfix) with ESMTPSA id 163468009B; Mon, 9 Oct 2023 22:07:13 +0200 (CEST) From: Bruno Victal Date: Mon, 9 Oct 2023 21:05:53 +0100 Message-ID: X-Mailer: git-send-email 2.41.0 In-Reply-To: References: 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 Using xml/dtd/docbook as installation path had two problems: * The paths would conflict in profile, which made it impossible for two different docbook-xml packages to coexist within the XML_CATALOG_FILES variable. * It was technically incorrect since non-DTD schemas were also placed here. This commit makes docbook-xml use versioned paths instead. Additionally the store URI for docbook-xml-4.1.2 was adjusted to conform to RFC8089 as according to RFC1738 the double slash "//" is intended for schemes that involve the direct use of an IP-based protocol. * gnu/packages/docbook.scm (docbook-xml-package, docbook-xml-4.x-package): New procedure. (docbook-xml): Make docbook-xml an alias for docbook-xml-5.1. (docbook-xml-5.1): New variable. (docbook-xml-4.5, docbook-xml-4.4, docbook-xml-4.3, docbook-xml-4.2) (docbook-xml-4.1.2): Refactor to use docbook-xml-4.x-package procedure. --- gnu/packages/docbook.scm | 265 ++++++++++++++++++++++++--------------- 1 file changed, 163 insertions(+), 102 deletions(-) diff --git a/gnu/packages/docbook.scm b/gnu/packages/docbook.scm index ead1235edf..e68507398d 100644 --- a/gnu/packages/docbook.scm +++ b/gnu/packages/docbook.scm @@ -50,17 +50,17 @@ (define-module (gnu packages docbook) #:use-module (guix build-system trivial) #:use-module (guix build-system python)) -(define-public docbook-xml +;; The fetch-plan, install-plan and phases for docbook-xml tend to vary +;; between releases therefore we use a “template” package for the +;; transformations that are common to these packages. +(define* (docbook-xml-package source version) + "Return a package for a docbook-xml package version @var{version} and +downloading from @var{source}, where @var{version} is a string and +@var{source} is a @code{} record." (package (name "docbook-xml") - (version "5.1") - (source (origin - (method url-fetch) - (uri (string-append "https://docbook.org/xml/" version - "/docbook-v" version "-os.zip")) - (sha256 - (base32 - "0zqy9prj9wam9dn7v3mgr7ld1axqxdhgrmv06dviwg00ahv43wxk")))) + (version version) + (source source) (build-system copy-build-system) (arguments (list @@ -71,23 +71,27 @@ (define-public docbook-xml #~(modify-phases %standard-phases (add-after 'unpack 'fix-permissions (lambda _ - ;; XXX: These files do not need 0755 permission. + ;; 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))))))) + (xslt-file #$(local-file + (search-auxiliary-file + "xml/patch-catalog-xml.xsl"))) + ;; Avoid profile conflicts by installing to a + ;; versioned path. + (dest-path + (format #f "~a/xml/docbook/~a" #$output #$version))) + (for-each + (lambda (catalog) + (let ((catalog* (string-append catalog ".new"))) + (invoke xsltproc "--nonet" "--novalid" "--noout" + "--stringparam" "prefix" dest-path + "--output" catalog* + xslt-file catalog) + (rename-file catalog* catalog))) + (find-files "." "catalog\\.xml$")))))))) (native-inputs (list libxslt unzip)) (home-page "https://docbook.org") (synopsis "DocBook XML DTDs for document authoring") @@ -97,95 +101,152 @@ (define-public docbook-xml by no means limited to these applications.) This package provides XML DTDs.") (license (license:x11-style "" "See file headers.")))) +(define-public docbook-xml-5.1 + (let* ((version "5.1") + (source (origin + (method url-fetch/zipbomb) + (uri (string-append "https://docbook.org/xml/" version + "/docbook-v" version "-os.zip")) + (sha256 + (base32 + "0zqy9prj9wam9dn7v3mgr7ld1axqxdhgrmv06dviwg00ahv43wxk")))) + (template (docbook-xml-package source version))) + (package + (inherit template) + (arguments + (let ((dest-dir (format #f "xml/docbook/~a/" version))) + (substitute-keyword-arguments (package-arguments template) + ;; XXX: A default value must be provided otherwise this + ;; substitution has no effect. + ((#:install-plan _ #f) + #~`(("schemas/" #$dest-dir))))))))) +;; XXX: docbook-xml-4.x versions use the same #:install-plan but since the +;; paths are versioned we can't use (inherit …). +(define* (docbook-xml-4.x-package source version) + "Return a template for a docbook-xml-4.x package version @var{version} and +downloading from @var{source}, where @var{version} is a string and +@var{source} is a @code{} record." + (let ((base-template (docbook-xml-package source version))) + (package + (inherit base-template) + (arguments + (let* ((dest-dir (format #f "xml/docbook/~a/" version))) + (substitute-keyword-arguments (package-arguments base-template) + ((#:phases phases) + ;; Some programs, such as kdoctools, instead of using + ;; XML_CATALOG_FILES, prefer to use cmake to locate + ;; the DTDs for docbook-xml-4.x packages but + ;; since there's no agreed standard as to where these files + ;; should be placed, in practice the .cmake files + ;; end up searching for paths that are distribution specific. + #~(modify-phases #$phases + (add-after 'install 'symlink-alternate-path + (lambda _ + ;; kdoctools searches under xml/dtd/docbook/ + ;; which is the convention used by Nix. + (mkdir-p (string-append #$output "/xml/dtd")) + (symlink (string-append #$output "/" #$dest-dir) + (string-append #$output "/xml/dtd/docbook")))))) + ((#:install-plan _ #f) + #~`(("./" #$dest-dir + #:exclude-regexp ("ChangeLog$" + "README$" + "docbook\\.cat$" + "\\.txt$")))))))))) + (define-public docbook-xml-4.5 - (package - (inherit docbook-xml) - (version "4.5") - (source (origin - (method url-fetch/zipbomb) - (uri (string-append "https://docbook.org/xml/" version - "/docbook-xml-" version ".zip")) - (sha256 - (base32 - "1d671lcjckjri28xfbf6dq7y3xnkppa910w1jin8rjc35dx06kjf")))))) + (let* ((version "4.5") + (source (origin + (method url-fetch/zipbomb) + (uri (string-append "https://docbook.org/xml/" version + "/docbook-xml-" version ".zip")) + (sha256 + (base32 + "1d671lcjckjri28xfbf6dq7y3xnkppa910w1jin8rjc35dx06kjf"))))) + (docbook-xml-4.x-package source version))) (define-public docbook-xml-4.4 - (package (inherit docbook-xml) - (version "4.4") - (source (origin - (method url-fetch/zipbomb) - (uri (string-append "https://docbook.org/xml/" version - "/docbook-xml-" version ".zip")) - (sha256 - (base32 - "141h4zsyc71sfi2zzd89v4bb4qqq9ca1ri9ix2als9f4i3mmkw82")))))) + (let* ((version "4.4") + (source (origin + (method url-fetch/zipbomb) + (uri (string-append "https://docbook.org/xml/" version + "/docbook-xml-" version ".zip")) + (sha256 + (base32 + "141h4zsyc71sfi2zzd89v4bb4qqq9ca1ri9ix2als9f4i3mmkw82"))))) + (docbook-xml-4.x-package source version))) (define-public docbook-xml-4.3 - (package (inherit docbook-xml) - (version "4.3") - (source (origin - (method url-fetch/zipbomb) - (uri (string-append "https://docbook.org/xml/" version - "/docbook-xml-" version ".zip")) - (sha256 - (base32 - "0r1l2if1z4wm2v664sqdizm4gak6db1kx9y50jq89m3gxaa8l1i3")))))) + (let* ((version "4.3") + (source (origin + (method url-fetch/zipbomb) + (uri (string-append "https://docbook.org/xml/" version + "/docbook-xml-" version ".zip")) + (sha256 + (base32 + "0r1l2if1z4wm2v664sqdizm4gak6db1kx9y50jq89m3gxaa8l1i3"))))) + (docbook-xml-4.x-package source version))) (define-public docbook-xml-4.2 - (package (inherit docbook-xml) - (version "4.2") - (source (origin - (method url-fetch/zipbomb) - (uri (string-append "https://docbook.org/xml/" version - "/docbook-xml-" version ".zip")) - (sha256 - (base32 - "18hgwvmywh6a5jh38szjmg3hg2r4v5lb6r3ydc3rd8cp9wg61i5c")))))) + (let* ((version "4.2") + (source (origin + (method url-fetch/zipbomb) + (uri (string-append "https://docbook.org/xml/" version + "/docbook-xml-" version ".zip")) + (sha256 + (base32 + "18hgwvmywh6a5jh38szjmg3hg2r4v5lb6r3ydc3rd8cp9wg61i5c"))))) + (docbook-xml-4.x-package source version))) (define-public docbook-xml-4.1.2 - (package - (inherit docbook-xml) - (version "4.1.2") - (source (origin - (method url-fetch/zipbomb) - (uri (string-append "https://docbook.org/xml/" version - "/docbkx412.zip")) - (sha256 - (base32 - "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))))) + (let* ((version "4.1.2") + (source (origin + (method url-fetch/zipbomb) + (uri (string-append "https://docbook.org/xml/" version + "/docbkx412.zip")) + (sha256 + (base32 + "0wkp5rvnqj0ghxia0558mnn4c7s3n501j99q2isp3sp0ci069w1h")))) + (template (docbook-xml-4.x-package source version))) + (package + (inherit template) + (arguments + (substitute-keyword-arguments (package-arguments template) + ((#: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 (format #f "~a/xml/docbook/~a" + #$output #$version))) + (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 template) + (prepend libxml2)))))) + +(define-public docbook-xml docbook-xml-5.1) ;;; There's an issue in docbook-xsl 1.79.2 that causes manpages to be ;;; generated incorrectly and embed raw nroff syntax such as '.PP' when there From patchwork Mon Oct 9 20:05:54 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Bruno Victal X-Patchwork-Id: 54649 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 2348027BBE2; Mon, 9 Oct 2023 21:09:00 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI, SPF_HELO_PASS,URIBL_BLOCKED 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 701CC27BBEA for ; Mon, 9 Oct 2023 21:08:58 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qpwXj-0005rq-2i; Mon, 09 Oct 2023 16:07:55 -0400 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 1qpwXa-0005nZ-DK for guix-patches@gnu.org; Mon, 09 Oct 2023 16:07:46 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qpwXa-0007s9-5Y for guix-patches@gnu.org; Mon, 09 Oct 2023 16:07:46 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qpwXt-0002TZ-TG for guix-patches@gnu.org; Mon, 09 Oct 2023 16:08:05 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#65479] [PATCH core-updates v3 06/63] gnu: Add docbook-xml-5.0.1. Resent-From: Bruno Victal Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 09 Oct 2023 20:08:05 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 65479 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 65479@debbugs.gnu.org Cc: Bruno Victal Received: via spool by 65479-submit@debbugs.gnu.org id=B65479.16968820679265 (code B ref 65479); Mon, 09 Oct 2023 20:08:05 +0000 Received: (at 65479) by debbugs.gnu.org; 9 Oct 2023 20:07:47 +0000 Received: from localhost ([127.0.0.1]:33266 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qpwXb-0002PM-4Y for submit@debbugs.gnu.org; Mon, 09 Oct 2023 16:07:47 -0400 Received: from smtpmciv5.myservices.hosting ([185.26.107.241]:54890) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qpwXX-0002Oi-L3 for 65479@debbugs.gnu.org; Mon, 09 Oct 2023 16:07:44 -0400 Received: from mail1.netim.hosting (unknown [185.26.106.173]) by smtpmciv5.myservices.hosting (Postfix) with ESMTP id 1209520D92 for <65479@debbugs.gnu.org>; Mon, 9 Oct 2023 22:07:21 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by mail1.netim.hosting (Postfix) with ESMTP id 545D280099; Mon, 9 Oct 2023 22:07:18 +0200 (CEST) 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 CtmAVwqTx_dV; Mon, 9 Oct 2023 22:07:18 +0200 (CEST) Received: from guix-nuc.home.arpa (unknown [10.192.1.83]) (Authenticated sender: lumen@makinata.eu) by mail1.netim.hosting (Postfix) with ESMTPSA id 966958009D; Mon, 9 Oct 2023 22:07:13 +0200 (CEST) From: Bruno Victal Date: Mon, 9 Oct 2023 21:05:54 +0100 Message-ID: X-Mailer: git-send-email 2.41.0 In-Reply-To: References: 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.xml (docbook-xml-5.0.1): New variable. --- gnu/packages/docbook.scm | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/gnu/packages/docbook.scm b/gnu/packages/docbook.scm index e68507398d..664acd4bad 100644 --- a/gnu/packages/docbook.scm +++ b/gnu/packages/docbook.scm @@ -120,6 +120,30 @@ (define-public docbook-xml-5.1 ;; substitution has no effect. ((#:install-plan _ #f) #~`(("schemas/" #$dest-dir))))))))) + +(define-public docbook-xml-5.0.1 + (let* ((version "5.0.1") + (source (origin + (method url-fetch) + (uri (string-append "https://docbook.org/xml/" version + "/docbook-" version ".zip")) + (sha256 + (base32 + "1iz3hq1lqgnshvlz4j9gvh4jy1ml74qf90vqf2ikbq0h4i2xzybs")))) + (template (docbook-xml-package source version))) + (package + (inherit template) + (arguments + (let ((dest-dir (format #f "xml/docbook/~a/" version))) + (substitute-keyword-arguments (package-arguments template) + ((#:install-plan _ #f) + #~`(("catalog.xml" #$dest-dir) + ("docbook.nvdl" #$dest-dir) + ("dtd" #$dest-dir) + ("rng" #$dest-dir) + ("sch" #$dest-dir) + ("xsd" #$dest-dir))))))))) + ;; XXX: docbook-xml-4.x versions use the same #:install-plan but since the ;; paths are versioned we can't use (inherit …). (define* (docbook-xml-4.x-package source version) From patchwork Mon Oct 9 20:05:55 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bruno Victal X-Patchwork-Id: 54655 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 7FFAB27BBEB; Mon, 9 Oct 2023 21:09:12 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI, SPF_HELO_PASS,URIBL_BLOCKED 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 8251827BBEC for ; Mon, 9 Oct 2023 21:09:07 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qpwXd-0005pr-WB; Mon, 09 Oct 2023 16:07:50 -0400 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 1qpwXa-0005nY-Ca for guix-patches@gnu.org; Mon, 09 Oct 2023 16:07:46 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qpwXa-0007s8-4v for guix-patches@gnu.org; Mon, 09 Oct 2023 16:07:46 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qpwXs-0002TF-Se for guix-patches@gnu.org; Mon, 09 Oct 2023 16:08:04 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#65479] [PATCH core-updates v3 07/63] gnu: docbook-xml-5.1: Fix URIs in catalog.xml. Resent-From: Bruno Victal Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 09 Oct 2023 20:08:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 65479 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 65479@debbugs.gnu.org Cc: Bruno Victal Received: via spool by 65479-submit@debbugs.gnu.org id=B65479.16968820649228 (code B ref 65479); Mon, 09 Oct 2023 20:08:04 +0000 Received: (at 65479) by debbugs.gnu.org; 9 Oct 2023 20:07:44 +0000 Received: from localhost ([127.0.0.1]:33259 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qpwXX-0002Ol-GA for submit@debbugs.gnu.org; Mon, 09 Oct 2023 16:07:43 -0400 Received: from smtpm5.myservices.hosting ([185.26.105.236]:39408) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qpwXT-0002OK-TV for 65479@debbugs.gnu.org; Mon, 09 Oct 2023 16:07:40 -0400 Received: from mail1.netim.hosting (unknown [185.26.106.173]) by smtpm5.myservices.hosting (Postfix) with ESMTP id 8EDD420CC4 for <65479@debbugs.gnu.org>; Mon, 9 Oct 2023 22:07:18 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by mail1.netim.hosting (Postfix) with ESMTP id 07105800A4; Mon, 9 Oct 2023 22:07:18 +0200 (CEST) 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 Lm8aRGyhyURg; Mon, 9 Oct 2023 22:07:16 +0200 (CEST) Received: from guix-nuc.home.arpa (unknown [10.192.1.83]) (Authenticated sender: lumen@makinata.eu) by mail1.netim.hosting (Postfix) with ESMTPSA id 21C5E80099; Mon, 9 Oct 2023 22:07:14 +0200 (CEST) From: Bruno Victal Date: Mon, 9 Oct 2023 21:05:55 +0100 Message-ID: <8b1971d4c055aae76d1c592c18c6adec30cb6d45.1696881354.git.mirai@makinata.eu> X-Mailer: git-send-email 2.41.0 In-Reply-To: References: 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.1)[source]: Patch version in URI. --- gnu/packages/docbook.scm | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/gnu/packages/docbook.scm b/gnu/packages/docbook.scm index 664acd4bad..d23844306c 100644 --- a/gnu/packages/docbook.scm +++ b/gnu/packages/docbook.scm @@ -109,7 +109,13 @@ (define-public docbook-xml-5.1 "/docbook-v" version "-os.zip")) (sha256 (base32 - "0zqy9prj9wam9dn7v3mgr7ld1axqxdhgrmv06dviwg00ahv43wxk")))) + "0zqy9prj9wam9dn7v3mgr7ld1axqxdhgrmv06dviwg00ahv43wxk")) + (modules '((guix build utils))) + (snippet + ;; The .zip release mistakenly uses '5.1CR4' instead of + ;; '5.1' as intended by . + #~(substitute* "schemas/catalog.xml" + (("5\\.1CR4") #$version))))) (template (docbook-xml-package source version))) (package (inherit template) From patchwork Mon Oct 9 20:05:56 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Bruno Victal X-Patchwork-Id: 54681 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 B10F327BBEA; Mon, 9 Oct 2023 21:16:58 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI, 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 08B5C27BBE9 for ; Mon, 9 Oct 2023 21:16:58 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qpwgK-0001Hb-CZ; Mon, 09 Oct 2023 16:16:51 -0400 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 1qpwgE-0001HA-1l for guix-patches@gnu.org; Mon, 09 Oct 2023 16:16:43 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qpwgD-00022B-QF for guix-patches@gnu.org; Mon, 09 Oct 2023 16:16:41 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qpwgY-00030p-HT for guix-patches@gnu.org; Mon, 09 Oct 2023 16:17:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#65479] [PATCH core-updates v3 08/63] gnu: docbook-xsl: Add compatibility entry. Resent-From: Bruno Victal Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 09 Oct 2023 20:17:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 65479 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 65479@debbugs.gnu.org Cc: Bruno Victal Received: via spool by 65479-submit@debbugs.gnu.org id=B65479.169688262011565 (code B ref 65479); Mon, 09 Oct 2023 20:17:02 +0000 Received: (at 65479) by debbugs.gnu.org; 9 Oct 2023 20:17:00 +0000 Received: from localhost ([127.0.0.1]:33444 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qpwgV-00030T-KH for submit@debbugs.gnu.org; Mon, 09 Oct 2023 16:16:59 -0400 Received: from smtpmciv5.myservices.hosting ([185.26.107.241]:56636) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qpwgS-00030K-WA for 65479@debbugs.gnu.org; Mon, 09 Oct 2023 16:16:57 -0400 Received: from mail1.netim.hosting (unknown [185.26.106.173]) by smtpmciv5.myservices.hosting (Postfix) with ESMTP id A111C20D7F for <65479@debbugs.gnu.org>; Mon, 9 Oct 2023 22:16:35 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by mail1.netim.hosting (Postfix) with ESMTP id 9E34A8009D; Mon, 9 Oct 2023 22:07:18 +0200 (CEST) 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 hiGrX6HD1jWd; Mon, 9 Oct 2023 22:07:18 +0200 (CEST) Received: from guix-nuc.home.arpa (unknown [10.192.1.83]) (Authenticated sender: lumen@makinata.eu) by mail1.netim.hosting (Postfix) with ESMTPSA id 9D71380060; Mon, 9 Oct 2023 22:07:14 +0200 (CEST) From: Bruno Victal Date: Mon, 9 Oct 2023 21:05:56 +0100 Message-ID: <3dd3f5197c0dd390fbc05579680fe10a0eaf2405.1696881354.git.mirai@makinata.eu> X-Mailer: git-send-email 2.41.0 In-Reply-To: References: 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 Remap "http://docbook.sourceforge.net/release/xsl-ns/" to "http://docbook.sourceforge.net/release/xsl/". * gnu/packages/docbook.scm (docbook-xsl)[arguments]<#:phases>: Add compatibility entry. --- gnu/packages/docbook.scm | 41 +++++++++++++++++++++++++++++++++++++++- 1 file changed, 40 insertions(+), 1 deletion(-) diff --git a/gnu/packages/docbook.scm b/gnu/packages/docbook.scm index d23844306c..b3b7a37249 100644 --- a/gnu/packages/docbook.scm +++ b/gnu/packages/docbook.scm @@ -388,7 +388,46 @@ (define-public docbook-xsl "http://docbook.sourceforge.net/release/xsl/current/" store-uri catalog)) - (list "rewriteSystem" "rewriteURI"))) + (list "rewriteSystem" "rewriteURI")) + + ;; Originally the + ;; "http://docbook.sourceforge.net/release/xsl/" + ;; URI referred to the non-namespaced docbook-xsl, + ;; with its namespaced version using a URI differing in + ;; the path component as '…/xsl-ns/'. + ;; At some point the namespaced version was made the + ;; canonical docbook-xsl package whilst preserving the + ;; original URI. + ;; + ;; For compatibility with XML files that still specify + ;; the legacy namespaced docbook-xsl URIs we re-add them + ;; here. + (for-each + (lambda (type) + ;; Remap /xsl-ns/ to /xsl/. + ;; Note: URI resolutions are not recursive. + ;; A rewrite rule from: + ;; 'http://docbook.sourceforge.net/release/xsl-ns/' + ;; to + ;; 'http://docbook.sourceforge.net/release/xsl/' + ;; will not trigger the rewrite rule that ultimately + ;; remaps to a /gnu/store URI, as can be seen by + ;; invoking: + ;; $ xmlcatalog "" \ + ;; 'http://docbook.sourceforge.net/release/xsl-ns/current/' + ;; http://docbook.sourceforge.net/release/xsl/current/ + ;; $ xmlcatalog "" \ + ;; 'http://docbook.sourceforge.net/release/xsl/current/' + ;; file://gnu/store/…/xml/xsl/… + ;; + ;; See XML Catalog specification, item 7.2.2. for + ;; details. + (invoke xmlcatalog "--noout" + "--add" type + "http://docbook.sourceforge.net/release/xsl-ns/current/" + store-uri + catalog)) + (list "rewriteSystem" "rewriteURI"))) catalog-files)))) (replace 'install (lambda _ From patchwork Mon Oct 9 20:05:57 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Bruno Victal X-Patchwork-Id: 54651 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 BE5A527BBE9; Mon, 9 Oct 2023 21:09:05 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI, SPF_HELO_PASS,URIBL_BLOCKED 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 EDF4A27BBEC for ; Mon, 9 Oct 2023 21:09:00 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qpwXd-0005oj-4R; Mon, 09 Oct 2023 16:07:49 -0400 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 1qpwXY-0005nG-Vh for guix-patches@gnu.org; Mon, 09 Oct 2023 16:07:44 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qpwXY-0007s0-No for guix-patches@gnu.org; Mon, 09 Oct 2023 16:07:44 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qpwXt-0002TR-Ek for guix-patches@gnu.org; Mon, 09 Oct 2023 16:08:05 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#65479] [PATCH core-updates v3 09/63] gnu: docbook-xsl: Add rewrite entries for http. Resent-From: Bruno Victal Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 09 Oct 2023 20:08:05 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 65479 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 65479@debbugs.gnu.org Cc: Bruno Victal Received: via spool by 65479-submit@debbugs.gnu.org id=B65479.16968820659248 (code B ref 65479); Mon, 09 Oct 2023 20:08:05 +0000 Received: (at 65479) by debbugs.gnu.org; 9 Oct 2023 20:07:45 +0000 Received: from localhost ([127.0.0.1]:33263 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qpwXX-0002On-SD for submit@debbugs.gnu.org; Mon, 09 Oct 2023 16:07:45 -0400 Received: from smtpm3.myservices.hosting ([185.26.105.234]:59274) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qpwXU-0002OY-VG for 65479@debbugs.gnu.org; Mon, 09 Oct 2023 16:07:41 -0400 Received: from mail1.netim.hosting (unknown [185.26.106.173]) by smtpm3.myservices.hosting (Postfix) with ESMTP id 9F0B720FDE for <65479@debbugs.gnu.org>; Mon, 9 Oct 2023 22:07:19 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by mail1.netim.hosting (Postfix) with ESMTP id 0E756800A4; Mon, 9 Oct 2023 22:07:19 +0200 (CEST) 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 zvQGN0MCcFQ4; Mon, 9 Oct 2023 22:07:18 +0200 (CEST) Received: from guix-nuc.home.arpa (unknown [10.192.1.83]) (Authenticated sender: lumen@makinata.eu) by mail1.netim.hosting (Postfix) with ESMTPSA id 2B9028009C; Mon, 9 Oct 2023 22:07:15 +0200 (CEST) From: Bruno Victal Date: Mon, 9 Oct 2023 21:05:57 +0100 Message-ID: X-Mailer: git-send-email 2.41.0 In-Reply-To: References: 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 Refactored 'patch-catalog.xml to reduce code duplication. The catalog for docbook-xsl hosted on the CDN [1] have entries for the 'http' scheme yet when building from source only 'https' entries are generated. Patch the XML catalog to provide them both. [1]: * gnu/packages/docbook.scm (docbook-xsl)[arguments]<#:phases>: Rename 'patch-catalog-xml to 'patch-catalog.xml. Refactor this phase for deduplication and add 'https' entries. --- gnu/packages/docbook.scm | 142 +++++++++++++++++---------------------- 1 file changed, 60 insertions(+), 82 deletions(-) diff --git a/gnu/packages/docbook.scm b/gnu/packages/docbook.scm index b3b7a37249..a09d356c8a 100644 --- a/gnu/packages/docbook.scm +++ b/gnu/packages/docbook.scm @@ -342,93 +342,71 @@ (define-public docbook-xsl (add-before 'install 'generate-catalog.xml (lambda* (#:key make-flags #:allow-other-keys) (apply invoke "make" "-C" "xsl" "catalog.xml" make-flags))) - (add-before 'install 'patch-catalog-xml + (add-after 'generate-catalog.xml 'patch-catalog.xml + ;; Note: URI resolutions are not recursive. + ;; A rewrite rule from: + ;; 'http://docbook.sourceforge.net/release/xsl-ns/' + ;; to + ;; 'http://docbook.sourceforge.net/release/xsl/' + ;; will not trigger the rewrite rule that ultimately + ;; remaps to a /gnu/store URI, as can be seen by + ;; invoking: + ;; $ xmlcatalog "" \ + ;; 'http://docbook.sourceforge.net/release/xsl-ns/current/' + ;; http://docbook.sourceforge.net/release/xsl/current/ + ;; $ xmlcatalog "" \ + ;; 'http://docbook.sourceforge.net/release/xsl/current/' + ;; file:/gnu/store/…/xml/xsl/… + ;; + ;; See XML Catalog specification, item 7.2.2. for + ;; details. (lambda* (#:key inputs #:allow-other-keys) (let ((xmlcatalog (search-input-file inputs "/bin/xmlcatalog")) - (catalog-files (find-files "." "catalog\\.xml$")) - (store-uri (string-append "file://" dest-path "/"))) + (catalog-file "xsl/catalog.xml") + (store-uri (string-append "file:" dest-path "/"))) + ;; Remove /snapshot/ references. (for-each - (lambda (catalog) - ;; Replace /snapshot/ reference with one based on - ;; BASE-VERSION. - (let ((versioned-uri - (format - #f "https://cdn.docbook.org/release/xsl/~a/" - #$base-version))) - (invoke xmlcatalog "--noout" - "--del" - "https://cdn.docbook.org/release/xsl/snapshot/" - catalog) - (for-each - (lambda (type) - (invoke xmlcatalog "--noout" - "--add" type - versioned-uri - store-uri - catalog)) - (list "rewriteSystem" "rewriteURI"))) - - ;; Patch /current/ references to point to /gnu/store/…. - (for-each - (lambda (type) - (invoke xmlcatalog "--noout" - "--add" type - "https://cdn.docbook.org/release/xsl/current/" - store-uri - catalog)) - (list "rewriteSystem" "rewriteURI")) - - ;; Re-add the no longer present compatibility entries for - ;; v.1.79.1 or earlier URIs. - (for-each - (lambda (type) - (invoke xmlcatalog "--noout" - "--add" type - "http://docbook.sourceforge.net/release/xsl/current/" - store-uri - catalog)) - (list "rewriteSystem" "rewriteURI")) - - ;; Originally the - ;; "http://docbook.sourceforge.net/release/xsl/" - ;; URI referred to the non-namespaced docbook-xsl, - ;; with its namespaced version using a URI differing in - ;; the path component as '…/xsl-ns/'. - ;; At some point the namespaced version was made the - ;; canonical docbook-xsl package whilst preserving the - ;; original URI. - ;; - ;; For compatibility with XML files that still specify - ;; the legacy namespaced docbook-xsl URIs we re-add them - ;; here. + (lambda (scheme) + (invoke xmlcatalog "--noout" + "--del" + (string-append + scheme + "://cdn.docbook.org/release/xsl/snapshot/") + catalog-file)) + (list "http" "https")) + ;; Rewrite both http:// and https:// URIs. + (for-each + (lambda (path) (for-each - (lambda (type) - ;; Remap /xsl-ns/ to /xsl/. - ;; Note: URI resolutions are not recursive. - ;; A rewrite rule from: - ;; 'http://docbook.sourceforge.net/release/xsl-ns/' - ;; to - ;; 'http://docbook.sourceforge.net/release/xsl/' - ;; will not trigger the rewrite rule that ultimately - ;; remaps to a /gnu/store URI, as can be seen by - ;; invoking: - ;; $ xmlcatalog "" \ - ;; 'http://docbook.sourceforge.net/release/xsl-ns/current/' - ;; http://docbook.sourceforge.net/release/xsl/current/ - ;; $ xmlcatalog "" \ - ;; 'http://docbook.sourceforge.net/release/xsl/current/' - ;; file://gnu/store/…/xml/xsl/… - ;; - ;; See XML Catalog specification, item 7.2.2. for - ;; details. - (invoke xmlcatalog "--noout" - "--add" type - "http://docbook.sourceforge.net/release/xsl-ns/current/" - store-uri - catalog)) - (list "rewriteSystem" "rewriteURI"))) - catalog-files)))) + (lambda (scheme) + (for-each + (lambda (entry-type) + (let ((uri (string-append scheme "://" path))) + (invoke xmlcatalog "--noout" + "--add" entry-type uri store-uri + catalog-file))) + (list "rewriteSystem" "rewriteURI"))) + (list "http" "https"))) + (list #$(format #f "cdn.docbook.org/release/xsl/~a/" + base-version) + "cdn.docbook.org/release/xsl/current/" + ;; Re-add the no longer present compatibility entries for + ;; v.1.79.1 or earlier URIs. + "docbook.sourceforge.net/release/xsl/current/" + ;; Originally the + ;; "http://docbook.sourceforge.net/release/xsl/" + ;; URI referred to the non-namespaced docbook-xsl, + ;; with its namespaced version using a URI differing in + ;; the path component as '…/xsl-ns/'. + ;; At some point the namespaced version was made the + ;; canonical docbook-xsl package whilst preserving the + ;; original URI. + ;; + ;; For compatibility with XML files that still specify + ;; the legacy namespaced docbook-xsl URIs we re-add them + ;; here. + "docbook.sourceforge.net/release/xsl-ns/current/"))))) (replace 'install (lambda _ (let ((select-rx (make-regexp From patchwork Mon Oct 9 20:05:58 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bruno Victal X-Patchwork-Id: 54653 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 8C66127BBF5; Mon, 9 Oct 2023 21:09:10 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-1.6 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI, SPF_HELO_PASS,URIBL_ABUSE_SURBL,URIBL_BLOCKED autolearn=no 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 7996027BBEE for ; Mon, 9 Oct 2023 21:09:02 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qpwXj-0005rp-20; Mon, 09 Oct 2023 16:07:55 -0400 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 1qpwXa-0005nX-B6 for guix-patches@gnu.org; Mon, 09 Oct 2023 16:07:46 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qpwXa-0007sE-2x for guix-patches@gnu.org; Mon, 09 Oct 2023 16:07:46 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qpwXu-0002Tp-PN for guix-patches@gnu.org; Mon, 09 Oct 2023 16:08:06 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#65479] [PATCH core-updates v3 10/63] gnu: docbook: Remove leftovers. Resent-From: Bruno Victal Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 09 Oct 2023 20:08:06 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 65479 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 65479@debbugs.gnu.org Cc: Bruno Victal Received: via spool by 65479-submit@debbugs.gnu.org id=B65479.16968820699294 (code B ref 65479); Mon, 09 Oct 2023 20:08:06 +0000 Received: (at 65479) by debbugs.gnu.org; 9 Oct 2023 20:07:49 +0000 Received: from localhost ([127.0.0.1]:33272 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qpwXb-0002PZ-TZ for submit@debbugs.gnu.org; Mon, 09 Oct 2023 16:07:49 -0400 Received: from smtpm3.myservices.hosting ([185.26.105.234]:59284) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qpwXY-0002Ov-FQ for 65479@debbugs.gnu.org; Mon, 09 Oct 2023 16:07:45 -0400 Received: from mail1.netim.hosting (unknown [185.26.106.173]) by smtpm3.myservices.hosting (Postfix) with ESMTP id 2D48B20FDF for <65479@debbugs.gnu.org>; Mon, 9 Oct 2023 22:07:19 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by mail1.netim.hosting (Postfix) with ESMTP id 8BD89800A9; Mon, 9 Oct 2023 22:07:19 +0200 (CEST) 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 HlB2Bc0ltsBI; Mon, 9 Oct 2023 22:07:19 +0200 (CEST) Received: from guix-nuc.home.arpa (unknown [10.192.1.83]) (Authenticated sender: lumen@makinata.eu) by mail1.netim.hosting (Postfix) with ESMTPSA id A6279800A0; Mon, 9 Oct 2023 22:07:15 +0200 (CEST) From: Bruno Victal Date: Mon, 9 Oct 2023 21:05:58 +0100 Message-ID: X-Mailer: git-send-email 2.41.0 In-Reply-To: References: 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 docbook-xsl patches are probably remnants from 1f7d94597f1e78776f854eeca46c03a3aded8466. * gnu/packages/docbook.scm: Remove unused import. * gnu/packages/patches/docbook-xsl-nonrecursive-string-subst.patch: Remove. * gnu/packages/patches/docbook-xsl-support-old-url.patch: Ditto. * gnu/local.mk: Unregister it. * gnu/packages/moreutils.scm (moreutils)[native-inputs]: Drop obsolete comment. --- gnu/local.mk | 2 - gnu/packages/docbook.scm | 1 - gnu/packages/moreutils.scm | 2 +- ...ocbook-xsl-nonrecursive-string-subst.patch | 40 ------------------- .../patches/docbook-xsl-support-old-url.patch | 17 -------- 5 files changed, 1 insertion(+), 61 deletions(-) delete mode 100644 gnu/packages/patches/docbook-xsl-nonrecursive-string-subst.patch delete mode 100644 gnu/packages/patches/docbook-xsl-support-old-url.patch diff --git a/gnu/local.mk b/gnu/local.mk index f20de7fa82..cf64fc64a7 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1070,8 +1070,6 @@ dist_patch_DATA = \ %D%/packages/patches/diffutils-fix-signal-processing.patch \ %D%/packages/patches/directfb-davinci-glibc-228-compat.patch \ %D%/packages/patches/dkimproxy-add-ipv6-support.patch \ - %D%/packages/patches/docbook-xsl-nonrecursive-string-subst.patch \ - %D%/packages/patches/docbook-xsl-support-old-url.patch \ %D%/packages/patches/doc++-include-directives.patch \ %D%/packages/patches/doc++-segfault-fix.patch \ %D%/packages/patches/dovecot-opensslv3.patch \ diff --git a/gnu/packages/docbook.scm b/gnu/packages/docbook.scm index a09d356c8a..3d9509c620 100644 --- a/gnu/packages/docbook.scm +++ b/gnu/packages/docbook.scm @@ -47,7 +47,6 @@ (define-module (gnu packages docbook) #:use-module (guix git-download) #:use-module (guix build-system copy) #:use-module (guix build-system gnu) - #:use-module (guix build-system trivial) #:use-module (guix build-system python)) ;; The fetch-plan, install-plan and phases for docbook-xml tend to vary diff --git a/gnu/packages/moreutils.scm b/gnu/packages/moreutils.scm index d219c78d4f..d7f4a8522a 100644 --- a/gnu/packages/moreutils.scm +++ b/gnu/packages/moreutils.scm @@ -71,7 +71,7 @@ (define-public moreutils ;; For building the manual pages. (native-inputs (list docbook-xml-4.4 - docbook-xsl ;without -next, man pages are corrupted + docbook-xsl libxml2 libxslt)) (home-page "https://joeyh.name/code/moreutils/") diff --git a/gnu/packages/patches/docbook-xsl-nonrecursive-string-subst.patch b/gnu/packages/patches/docbook-xsl-nonrecursive-string-subst.patch deleted file mode 100644 index fed4b76429..0000000000 --- a/gnu/packages/patches/docbook-xsl-nonrecursive-string-subst.patch +++ /dev/null @@ -1,40 +0,0 @@ -Use a non-recursive replace function when the parser supports it. - -https://bugs.gnu.org/29782 -https://bugzilla.samba.org/show_bug.cgi?id=9515 -https://bugzilla.gnome.org/show_bug.cgi?id=736077 (for xsltproc) - -Patch copied from Debian: -https://salsa.debian.org/debian/docbook-xsl/-/blob/master/debian/patches/765567_non-recursive_string_subst.patch - -Description: use EXSLT "replace" function when available - A recursive implementation of string.subst is problematic, - long strings with many matches will cause stack overflows. -Author: Peter De Wachter -Bug-Debian: https://bugs.debian.org/750593 - ---- a/lib/lib.xsl -+++ b/lib/lib.xsl -@@ -6,7 +6,11 @@ - - This module implements DTD-independent functions - -- ******************************************************************** --> -+ ******************************************************************** --> -+ - - - -@@ -52,6 +56,9 @@ - - - -+ -+ -+ - - - diff --git a/gnu/packages/patches/docbook-xsl-support-old-url.patch b/gnu/packages/patches/docbook-xsl-support-old-url.patch deleted file mode 100644 index 5b7dda458f..0000000000 --- a/gnu/packages/patches/docbook-xsl-support-old-url.patch +++ /dev/null @@ -1,17 +0,0 @@ -Docbook 1.79.2 makes very few changes apart from changing the canonical URL -to cdn.docbook.org. This patch adds support for the previous URL to avoid -breaking packages that still use that. - -Adapted from Debian: -https://salsa.debian.org/debian/docbook-xsl/-/blob/master/debian/patches/0005-catalog.xml-Compatibility-with-1.79.1-or-earlier.patch - ---- a/catalog.xml -+++ b/catalog.xml -@@ -5,4 +5,7 @@ - - - -+ -+ -+ - From patchwork Mon Oct 9 20:05:59 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Bruno Victal X-Patchwork-Id: 54661 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 D492A27BBEE; Mon, 9 Oct 2023 21:09:23 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.4 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI, SPF_HELO_PASS,URIBL_BLOCKED,URI_NOVOWEL 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 2EA3027BBE2 for ; Mon, 9 Oct 2023 21:09:09 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qpwXj-0005st-Ok; Mon, 09 Oct 2023 16:07:55 -0400 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 1qpwXb-0005oV-TM for guix-patches@gnu.org; Mon, 09 Oct 2023 16:07:47 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qpwXb-0007t6-LR for guix-patches@gnu.org; Mon, 09 Oct 2023 16:07:47 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qpwXw-0002UK-Bd for guix-patches@gnu.org; Mon, 09 Oct 2023 16:08:08 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#65479] [PATCH core-updates v3 11/63] gnu: docbook-utils: Import patches from debian. Resent-From: Bruno Victal Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 09 Oct 2023 20:08:08 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 65479 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 65479@debbugs.gnu.org Cc: Bruno Victal Received: via spool by 65479-submit@debbugs.gnu.org id=B65479.16968820779372 (code B ref 65479); Mon, 09 Oct 2023 20:08:08 +0000 Received: (at 65479) by debbugs.gnu.org; 9 Oct 2023 20:07:57 +0000 Received: from localhost ([127.0.0.1]:33283 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qpwXi-0002QZ-9e for submit@debbugs.gnu.org; Mon, 09 Oct 2023 16:07:56 -0400 Received: from smtpm3.myservices.hosting ([185.26.105.234]:59306) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qpwXd-0002Px-JP for 65479@debbugs.gnu.org; Mon, 09 Oct 2023 16:07:52 -0400 Received: from mail1.netim.hosting (unknown [185.26.106.173]) by smtpm3.myservices.hosting (Postfix) with ESMTP id 37C9B20CBC for <65479@debbugs.gnu.org>; Mon, 9 Oct 2023 22:07:20 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by mail1.netim.hosting (Postfix) with ESMTP id 9A448800A9; Mon, 9 Oct 2023 22:07:20 +0200 (CEST) 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 iRMZGtpFmQ0V; Mon, 9 Oct 2023 22:07:19 +0200 (CEST) Received: from guix-nuc.home.arpa (unknown [10.192.1.83]) (Authenticated sender: lumen@makinata.eu) by mail1.netim.hosting (Postfix) with ESMTPSA id 347FE8009F; Mon, 9 Oct 2023 22:07:16 +0200 (CEST) From: Bruno Victal Date: Mon, 9 Oct 2023 21:05:59 +0100 Message-ID: <22460876f565f5624f7cfe351756fb79d354f9e4.1696881354.git.mirai@makinata.eu> X-Mailer: git-send-email 2.41.0 In-Reply-To: References: 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-utils)[source]: Import patches from debian. Drop snippet for patching OpenSP and OpenJade. [native-inputs]: Add autoconf, automake and libtool. * gnu/packages/patches/docbook-utils-documentation-edits.patch: New file. * gnu/packages/patches/docbook-utils-escape-characters.patch: Ditto. * gnu/packages/patches/docbook-utils-remove-jade-sp.patch: Ditto. * gnu/packages/patches/docbook-utils-respect-refentry-for-name.patch: Ditto. * gnu/packages/patches/docbook-utils-source-date-epoch.patch: Ditto. * gnu/packages/patches/docbook-utils-use-date-element.patch: Ditto. * gnu/local.mk: Register them. --- gnu/local.mk | 6 + gnu/packages/docbook.scm | 23 +- .../docbook-utils-documentation-edits.patch | 102 +++++++++ .../docbook-utils-escape-characters.patch | 36 +++ .../docbook-utils-remove-jade-sp.patch | 216 ++++++++++++++++++ ...book-utils-respect-refentry-for-name.patch | 36 +++ .../docbook-utils-source-date-epoch.patch | 31 +++ .../docbook-utils-use-date-element.patch | 63 +++++ 8 files changed, 505 insertions(+), 8 deletions(-) create mode 100644 gnu/packages/patches/docbook-utils-documentation-edits.patch create mode 100644 gnu/packages/patches/docbook-utils-escape-characters.patch create mode 100644 gnu/packages/patches/docbook-utils-remove-jade-sp.patch create mode 100644 gnu/packages/patches/docbook-utils-respect-refentry-for-name.patch create mode 100644 gnu/packages/patches/docbook-utils-source-date-epoch.patch create mode 100644 gnu/packages/patches/docbook-utils-use-date-element.patch diff --git a/gnu/local.mk b/gnu/local.mk index cf64fc64a7..c4ad7cb901 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1070,6 +1070,12 @@ dist_patch_DATA = \ %D%/packages/patches/diffutils-fix-signal-processing.patch \ %D%/packages/patches/directfb-davinci-glibc-228-compat.patch \ %D%/packages/patches/dkimproxy-add-ipv6-support.patch \ + %D%/packages/patches/docbook-utils-documentation-edits.patch \ + %D%/packages/patches/docbook-utils-escape-characters.patch \ + %D%/packages/patches/docbook-utils-remove-jade-sp.patch \ + %D%/packages/patches/docbook-utils-respect-refentry-for-name.patch \ + %D%/packages/patches/docbook-utils-source-date-epoch.patch \ + %D%/packages/patches/docbook-utils-use-date-element.patch \ %D%/packages/patches/doc++-include-directives.patch \ %D%/packages/patches/doc++-segfault-fix.patch \ %D%/packages/patches/dovecot-opensslv3.patch \ diff --git a/gnu/packages/docbook.scm b/gnu/packages/docbook.scm index 3d9509c620..f0e320ea9a 100644 --- a/gnu/packages/docbook.scm +++ b/gnu/packages/docbook.scm @@ -774,18 +774,20 @@ (define-public docbook-utils (sha256 (base32 "1scj5vgw1xz872pq54a89blcxqqm11p90yzv8a9mqq57x27apyj8")) + (patches + (search-patches "docbook-utils-documentation-edits.patch" + "docbook-utils-escape-characters.patch" + "docbook-utils-remove-jade-sp.patch" + "docbook-utils-respect-refentry-for-name.patch" + "docbook-utils-use-date-element.patch" + "docbook-utils-source-date-epoch.patch")) (modules '((guix build utils))) (snippet #~(begin ;; Patch build system. - (substitute* (find-files "." "\\.in$") + (substitute* (find-files "." "\\.(in|am)$") ;; Do not hard-code SGML_CATALOG_FILES. - ((".*SGML_CATALOG_FILES=/etc/sgml/catalog.*") "") - ;; Use OpenSP and OpenJade. - (("\\bjade\\b") - "openjade") - (("\\bnsgmls\\b") - "onsgmls")) + ((".*SGML_CATALOG_FILES=/etc/sgml/catalog.*") "")) ;; Do not override the SGML_CATALOG_FILES environment ;; variable. @@ -805,7 +807,12 @@ (define-public docbook-utils (("CONVERT=/usr/bin/") "CONVERT=") (("\\[ -x /usr/bin/([^ ]+) \\]" _ command) - (format #f "command -v ~a > /dev/null" command))))))) + (format #f "command -v ~a > /dev/null" command))) + + ;; This forces autoreconf to be invoked, needed for patches + ;; to be effective. + (delete-file "configure"))))) + (native-inputs (list autoconf automake libtool)) (build-system gnu-build-system) ;; Propagated for convenience. All these tools are used at run time to ;; provide the complete functionality of the docbook-utils commands. diff --git a/gnu/packages/patches/docbook-utils-documentation-edits.patch b/gnu/packages/patches/docbook-utils-documentation-edits.patch new file mode 100644 index 0000000000..7258d12675 --- /dev/null +++ b/gnu/packages/patches/docbook-utils-documentation-edits.patch @@ -0,0 +1,102 @@ +# Source: + +Description: Fix some typos in man pages +Author: Mathieu Malaterre + +Index: docbook-utils-0.6.14/doc/man/docbook2man-spec.pl.1 +=================================================================== +--- docbook-utils-0.6.14.orig/doc/man/docbook2man-spec.pl.1 2012-05-09 18:39:17.932819095 +0200 ++++ docbook-utils-0.6.14/doc/man/docbook2man-spec.pl.1 2012-05-09 18:39:24.780818845 +0200 +@@ -17,7 +17,7 @@ + .SH "DESCRIPTION" + .PP + \fBdocbook2man\fR is a sgmlspl spec file that produced man +-pages (using the -man macros) from DocBook RefEntry markup. ++pages (using the \-man macros) from DocBook RefEntry markup. + .PP + The program reads ESIS produced by nsgmls (or other SGML parsers) from + standard input. Markup not found in RefEntry is discarded. +Index: docbook-utils-0.6.14/doc/man/frontend-spec.7 +=================================================================== +--- docbook-utils-0.6.14.orig/doc/man/frontend-spec.7 2012-05-09 18:41:45.172813778 +0200 ++++ docbook-utils-0.6.14/doc/man/frontend-spec.7 2012-05-09 18:42:03.176813129 +0200 +@@ -10,7 +10,7 @@ + .SH "DESCRIPTION" + .PP + \fBjw\fR(1) calls frontends like +-\fIfrontends/docbook\fR to get the informations ++\fIfrontends/docbook\fR to get the information + specific to a given input format. The frontend knows which information + to return from the first command line parameter. It gets all necessary + data via environment variables ready to use. +Index: docbook-utils-0.6.14/doc/man/jw.1 +=================================================================== +--- docbook-utils-0.6.14.orig/doc/man/jw.1 2012-05-09 18:39:35.612818456 +0200 ++++ docbook-utils-0.6.14/doc/man/jw.1 2012-05-09 18:40:51.736815708 +0200 +@@ -142,7 +142,7 @@ + The following options apply to the conversion script: + .TP + \fB -f \fIfrontend\fB | --frontend \fIfrontend\fB \fR +-Allows to specify another frontend than default \fIdocbook\fR\&. ++Allows one to specify another frontend than default \fIdocbook\fR\&. + The list of currently available frontends is: + .RS + .TP +@@ -156,13 +156,13 @@ + .RE + .TP + \fB -b \fIbackend\fB | --backend \fIbackend\fB \fR +-Allows to specify another backend than default ++Allows one to specify another backend than default + \fIHTML\fR\&. The list of currently available + backends is: + .RS + .TP + \fB\fIdvi\fB\fR +-Converts to DVI (DeVice Independant ++Converts to DVI (DeVice Independent + files) by calling \fBJade\fR or + \fBOpenJade\fR\&. + .TP +@@ -210,7 +210,7 @@ + .RE + .TP + \fB -c \fIfile\fB | --cat \fIfile\fB \fR +-Allows to use an extra SGML Open Catalog that will list ++Allows one to use an extra SGML Open Catalog that will list + other files like customization style sheets, adaptations to the + DocBook Document Type Definition, special character entities, + etc. This catalog is added to the list of catalogs determined +@@ -241,7 +241,7 @@ + are specified on the command line. + .TP + \fB -d \fIfile\fB|default|none | --dsl \fIfile\fB|default|none \fR +-Allows to use a customized style sheet instead ++Allows one to use a customized style sheet instead + of the default one. + + A "target" starting with a hash mark "#" can be appended +Index: docbook-utils-0.6.14/doc/man/sgmldiff.1 +=================================================================== +--- docbook-utils-0.6.14.orig/doc/man/sgmldiff.1 2012-05-09 18:41:13.316814927 +0200 ++++ docbook-utils-0.6.14/doc/man/sgmldiff.1 2012-05-09 18:41:38.032814038 +0200 +@@ -17,7 +17,7 @@ + + .SH "DESCRIPTION" + .PP +-This perl script allows to determine the structural differences ++This perl script allows one to determine the structural differences + between two SGML files. It compares the files, regardless of what + is in between the tags, to only focus on the markup. Its output + is similar to \fBdiff\fR(1)\&. +@@ -62,8 +62,8 @@ + Lines 5 to 7 of the first file have been changed + into lines 8 to 10 of the second line. + In addition to those summaries, the lines of the first file are +-shown preceeded by '<' and the lines of the second file are +-shown preceeded by '>". ++shown preceded by '<' and the lines of the second file are ++shown preceded by '>". + .SH "OPTIONS" + .PP + Here is the list of actions that can be requested to diff --git a/gnu/packages/patches/docbook-utils-escape-characters.patch b/gnu/packages/patches/docbook-utils-escape-characters.patch new file mode 100644 index 0000000000..3845ee6238 --- /dev/null +++ b/gnu/packages/patches/docbook-utils-escape-characters.patch @@ -0,0 +1,36 @@ +# Source: + +Description: incorrectly strips whitespace (patch included) + In the previous upload, docbook2man was patched to escape the special + characters . and ' at the beginning of a line (see #399947). + Unfortunately that patch was incorrect -- as well as escaping the special + characters, it also removes all whitespace from the beginning of + affected lines. As a result, if you are in a block where whitespace + matters (such as ...) then the output is now incorrect. + + This is very easy to fix -- just match the whitespace and preserve it, + instead of tossing it away. The full patch (just two lines) is included + below. +Author: Ben Burton +Forwarded: not-needed +Bug-Debian: http://bugs.debian.org/528334 + +Edit by Bruno Victal : + Patch was edited so that it could be applied against the original + docbook-utils-0.6.14 sources. + +Index: docbook-utils-0.6.14/helpers/docbook2man-spec.pl +=================================================================== +--- docbook-utils-0.6.14.orig/helpers/docbook2man-spec.pl 2012-05-09 18:59:42.584774885 +0200 ++++ docbook-utils-0.6.14/helpers/docbook2man-spec.pl 2012-05-09 19:00:34.788773002 +0200 +@@ -1212,8 +1212,8 @@ + $_[0] =~ s/\\/\\\\/g; + + # Escape dots and single quotes in column 1 +- $_[0] =~ s/^\./\\\&\./; +- $_[0] =~ s/^\'/\\\&\'/; ++ $_[0] =~ s/^([ \t]*)\./$1\\\&\./; ++ $_[0] =~ s/^([ \t]*)\'/$1\\\&\'/; + + # In non-'pre'-type elements: + if(!$nocollapse_whitespace) { diff --git a/gnu/packages/patches/docbook-utils-remove-jade-sp.patch b/gnu/packages/patches/docbook-utils-remove-jade-sp.patch new file mode 100644 index 0000000000..99751b4de3 --- /dev/null +++ b/gnu/packages/patches/docbook-utils-remove-jade-sp.patch @@ -0,0 +1,216 @@ +# Source: +Description: Change dependencies on jade and sp to openjade and opensp +Author: Neil Roeth +Last-Update: 2016-07-24 + +Edit by Bruno Victal : + Patch was edited so that it could be applied against the original + docbook-utils-0.6.14 sources. +--- +This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ +--- a/doc/HTML/Makefile.am ++++ b/doc/HTML/Makefile.am +@@ -1,4 +1,4 @@ +-htmldir = $(docdir)/html/docbook-utils-@VERSION@ ++htmldir = $(docdir)/html + html_DATA = api.html \ + backend-spec.html \ + docbook2man.html \ +@@ -25,6 +25,6 @@ + $(top_srcdir)/doc/refentry/sgmldiff.sgml + SGML_CATALOG_FILES=/etc/sgml/catalog \ + SGML_SEARCH_PATH=$(top_srcdir):$(top_srcdir)/doc:.. \ +- jade -t sgml -i html -d $(top_srcdir)/docbook-utils.dsl\#html \ ++ openjade -t sgml -i html -d $(top_srcdir)/docbook-utils.dsl\#html \ + -V '%use-id-as-filename%' $< + +--- a/doc/man/Makefile.am ++++ b/doc/man/Makefile.am +@@ -12,5 +12,5 @@ + $(top_srcdir)/helpers/docbook2man-spec.pl + SGML_CATALOG_FILES=/etc/sgml/catalog \ + SGML_SEARCH_PATH=$(top_srcdir)/doc:.. \ +- nsgmls $< | \ ++ onsgmls $< | \ + sgmlspl $(top_srcdir)/helpers/docbook2man-spec.pl +--- a/backends/man.in ++++ b/backends/man.in +@@ -7,8 +7,8 @@ + TMPDIR=`mktemp -d /tmp/man.XXXXXX` || \ + { echo >&2 "man backend: could not create secure temporary directory"; exit 1;} + trap 'rm -rf "${TMPDIR}"' EXIT +-nsgmls $SGML_FILE > "${TMPDIR}/nsgmls.tmp" +-sgmlspl $HELPER <"${TMPDIR}/nsgmls.tmp" 2>"${TMPDIR}/errs" ++onsgmls $SGML_FILE > "${TMPDIR}/onsgmls.tmp" ++sgmlspl $HELPER <"${TMPDIR}/onsgmls.tmp" 2>"${TMPDIR}/errs" + if [ $? -ne 0 ] + then + cat "${TMPDIR}/errs" +@@ -18,7 +18,7 @@ + if grep unresolved "${TMPDIR}/errs" >/dev/null 2>&1 + then + echo "Resolving references.." +- sgmlspl $HELPER <"${TMPDIR}/nsgmls.tmp" ++ sgmlspl $HELPER <"${TMPDIR}/onsgmls.tmp" + if [ $? -ne 0 ] + then exit 1 + fi +--- a/backends/texi.in ++++ b/backends/texi.in +@@ -3,7 +3,7 @@ + # This program is under GPL license. See LICENSE file for details. + + # Convert to texinfo +-nsgmls $SGML_FILE | sgmlspl $SGML_BASE_DIR/docbook/utils-@VERSION@/helpers/docbook2texi-spec.pl >$SGML_FILE_NAME.texi ++onsgmls $SGML_FILE | sgmlspl docbook2texi-spec.pl >$SGML_FILE_NAME.texi + if [ $? -ne 0 ] + then exit 1 + fi +--- a/bin/sgmldiff.in ++++ b/bin/sgmldiff.in +@@ -22,13 +22,13 @@ + + use strict; + use integer; +-use vars qw($nsgmls $errors $errorlog $VERSION); ++use vars qw($onsgmls $errors $errorlog $VERSION); + use Getopt::Long 2.01; + + $VERSION = 1.03; + +-my $nsgmls; +-$nsgmls = "@jade_bindir@/nsgmls"; ++my $onsgmls; ++$onsgmls = "@jade_bindir@/onsgmls"; + + #---------------------------------------------------------------------- + # TODO: +@@ -37,7 +37,7 @@ + # - Wait for suggestions ;-) + # + # Note: the input file need not be valid, nor is it necessary to have +-# the DTDs. nsgmls always returns a structure. ++# the DTDs. onsgmls always returns a structure. + #---------------------------------------------------------------------- + + # Get file name +@@ -141,11 +141,11 @@ + unlink $diff2; + + #--------------------------------------------------------------------- +-# Process nsgmls output: keep all stuff that is important for the ++# Process onsgmls output: keep all stuff that is important for the + # structure comparison. Make two structures: one that is diffed + # (without text) (DIFF) and one that is used to present the + # differences to the user (@full). For more info: see SP +-# documentation, nsgmls output format. ++# documentation, onsgmls output format. + + sub prepare { + my($filename,$todiffname) = @_; +@@ -161,7 +161,7 @@ + my @line_numbered = (); + my $line = 0; + +- open(ESIS, "$nsgmls -l $errors $errorlog -onotation-sysid -oid -oempty $filename | "); #-oentity generates strange output; ? -ononsgml ++ open(ESIS, "$onsgmls -l $errors $errorlog -onotation-sysid -oid -oempty $filename | "); #-oentity generates strange output; ? -ononsgml + open(DIFF, "> $todiffname"); + while () { + chomp $_; +@@ -375,7 +375,7 @@ + }; + + #---------------------------------------------------------------------- +-# Normalise data text from nsgmls (i.e. don't print the escaped text). ++# Normalise data text from onsgmls (i.e. don't print the escaped text). + sub normalise_text { + my($string,$prefix) = @_; + my $result = "$prefix"; +--- a/configure.in ++++ b/configure.in +@@ -21,7 +21,7 @@ + + dnl Checks for programs. + jade_bindirs="/usr/bin /usr/local/bin" +-AC_FIND_PROGRAM(nsgmls, $jade_bindirs, jade_bindir) ++AC_FIND_PROGRAM(onsgmls, $jade_bindirs, jade_bindir) + AC_SUBST(jade_bindir) + + perl_bindirs="/usr/bin /usr/local/bin" +--- a/doc/refentry/docbook2man-spec.pl.sgml ++++ b/doc/refentry/docbook2man-spec.pl.sgml +@@ -19,7 +19,7 @@ + + + +-nsgmls ++onsgmls + sgml document + | sgmlspl + docbook2man-spec.pl +@@ -35,7 +35,7 @@ + + + +-The program reads ESIS produced by nsgmls (or other SGML parsers) from ++The program reads ESIS produced by onsgmls (or other SGML parsers) from + standard input. Markup not found in RefEntry is discarded. + + +--- a/doc/refentry/docbook2texi-spec.pl.sgml ++++ b/doc/refentry/docbook2texi-spec.pl.sgml +@@ -20,7 +20,7 @@ + + + +-nsgmls ++onsgmls + sgml document + | sgmlspl + docbook2texi-spec.pl +@@ -37,7 +37,7 @@ + + + +-The program reads ESIS produced by nsgmls (or other SGML parsers) from ++The program reads ESIS produced by onsgmls (or other SGML parsers) from + standard input. Currently the document element must be Book, + otherwise the results are undefined. + +--- a/doc/refentry/jw.sgml ++++ b/doc/refentry/jw.sgml +@@ -630,7 +630,7 @@ + 1, + install-catalog + 8, +- nsgmls ++ onsgmls + 1, docbook-utils + homepage. +--- a/doc/refentry/sgmldiff.sgml ++++ b/doc/refentry/sgmldiff.sgml +@@ -238,10 +238,10 @@ + + + +- nsgmls 1 ++ onsgmls 1 + + +- a base component of Jade DSSSL engine ++ a base component of OpenJade DSSSL engine + + + +--- a/helpers/docbook2man-spec.pl ++++ b/helpers/docbook2man-spec.pl +@@ -7,7 +7,7 @@ + The SGMLSpm package from CPAN. This contains the sgmlspl script which + is used to grok this file. Use it like this: + +-nsgmls some-docbook-document.sgml | sgmlspl docbook2man-spec.pl ++onsgmls some-docbook-document.sgml | sgmlspl docbook2man-spec.pl + + =head1 DESCRIPTION + diff --git a/gnu/packages/patches/docbook-utils-respect-refentry-for-name.patch b/gnu/packages/patches/docbook-utils-respect-refentry-for-name.patch new file mode 100644 index 0000000000..1b8ce7a0de --- /dev/null +++ b/gnu/packages/patches/docbook-utils-respect-refentry-for-name.patch @@ -0,0 +1,36 @@ +# Source: + +Description: docbook2man should translate the NAME section according to the REFENTRY's lang attribute + Currently, docbook2man translates the NAME section according to the lang + attribute provided to the REFNAMEDIV tag. + When a lang attribute is specified in the REFENTRY tag and no lang + attribute is specified with the REFNAMEDIV, the lang attribute of the + REFENTRY should be used. +Author: Nicolas François +Forwarded: not-needed +Bug-Debian: http://bugs.debian.org/394511 + +Index: docbook-utils-0.6.14/helpers/docbook2man-spec.pl +=================================================================== +--- docbook-utils-0.6.14.orig/helpers/docbook2man-spec.pl 2012-05-09 18:55:53.276783163 +0200 ++++ docbook-utils-0.6.14/helpers/docbook2man-spec.pl 2012-05-09 18:58:04.792778418 +0200 +@@ -359,11 +359,14 @@ + # NAME section + man_sgml('', sub { + my %words = qw( fr NOM es NOMBRE de NAME ); +- if (defined($_[0]->attribute('LANG')->value)) { +- my $id = $_[0]->attribute('LANG')->value; +- my $ad = $words{$id}; +- output("\n.SH $ad\n");} +- else {output("\n.SH NAME\n");} ++ # Use the REFNAMEDIV's lang attribute, and default to the ++ # REFENTRY's lang attribute. ++ my $lang = $_[0]->attribute('LANG')->value; ++ $lang = $manpage_lang unless defined $lang; ++ if (defined($lang) and defined $words{lc($lang)}) { ++ my $ad = $words{lc($lang)}; ++ output("\n.SH $ad\n");} ++ else { output("\n.SH NAME\n");} + }); + + sgml('', \&save_cdata); diff --git a/gnu/packages/patches/docbook-utils-source-date-epoch.patch b/gnu/packages/patches/docbook-utils-source-date-epoch.patch new file mode 100644 index 0000000000..15c025a726 --- /dev/null +++ b/gnu/packages/patches/docbook-utils-source-date-epoch.patch @@ -0,0 +1,31 @@ +# Source: + +Author: Reiner Herrmann +Description: Support SOURCE_DATE_EPOCH for timestamps + To allow generating documents in a reproducible way, + allow overriding the timestamp through the environment. + . + See also: https://reproducible-builds.org/specs/source-date-epoch/ +Bug-Debian: https://bugs.debian.org/800797 + +--- a/helpers/docbook2man-spec.pl ++++ b/helpers/docbook2man-spec.pl +@@ -57,6 +57,7 @@ + use SGMLS; # Use the SGMLS package. + use SGMLS::Output; # Use stack-based output. + use SGMLS::Refs; ++use POSIX qw(strftime setlocale LC_TIME); + + ######################################################################## + # SGMLSPL script produced automatically by the script sgmlspl.pl +@@ -279,6 +280,10 @@ + _END_BANNER + + my $date = `date "+%d %B %Y"`; ++ if ($ENV{SOURCE_DATE_EPOCH}) { ++ setlocale(LC_TIME, "C"); ++ $date = strftime("%d %B %Y", gmtime($ENV{SOURCE_DATE_EPOCH} || time)); ++ } + my $manpage_date = $manpage_date || $date ; + + output '.TH "'; diff --git a/gnu/packages/patches/docbook-utils-use-date-element.patch b/gnu/packages/patches/docbook-utils-use-date-element.patch new file mode 100644 index 0000000000..106707f7d4 --- /dev/null +++ b/gnu/packages/patches/docbook-utils-use-date-element.patch @@ -0,0 +1,63 @@ +# Source: + +Description: patch to get the from the sgml file + For the moment, docbook2man doesn't use the tag date in + to but `date "+%d %B %Y"`, and thus depend on the current locale. + + + + 06 September 2003 + + + + A patch against /usr/share/perl5/sgmlspl-specs/docbook2man-spec.pl + allows to use the date written in the source SGML file (which can be + localized) instead of the current date. + + However, if no correct date tag is present in the SGML file, the date + written in the manpage will depend on the current locale. +Author: Simon Paillard +Forwarded: not-needed +Bug-Debian: http://bugs.debian.org/214982 + +Index: docbook-utils-0.6.14/helpers/docbook2man-spec.pl +=================================================================== +--- docbook-utils-0.6.14.orig/helpers/docbook2man-spec.pl 2012-05-09 18:27:28.000000000 +0200 ++++ docbook-utils-0.6.14/helpers/docbook2man-spec.pl 2012-05-09 18:55:53.276783163 +0200 +@@ -278,8 +278,9 @@ + .\\" etc. to Steve Cheng . + _END_BANNER + +- my $manpage_date = `date "+%d %B %Y"`; +- ++ my $date = `date "+%d %B %Y"`; ++ my $manpage_date = $manpage_date || $date ; ++ + output '.TH "'; + + # If the title is not mixed-case, convention says to +@@ -292,7 +293,7 @@ + } + + output '" "', fold_string($manpage_sect), +- '" "', fold_string(`date "+%d %B %Y"`), ++ '" "', fold_string($manpage_date), + '" "', $manpage_misc, + '" "', $manpage_manual, + "\"\n"; +@@ -568,6 +569,15 @@ + sgml('', sub { $_[0]->parent->ext->{'attribution'} = pop_output(); }); + + ++sgml('', sub { ++ save_cdata(); ++}); ++sgml('', sub { ++ $manpage_date = fold_string(pop_output()); ++ $raw_cdata--; ++}); ++ ++ + # IGNORE. + sgml('', sub { push_output('nul'); }); + sgml('', sub { pop_output(); }); From patchwork Mon Oct 9 20:06:00 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bruno Victal X-Patchwork-Id: 54642 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 0FD3027BBEA; Mon, 9 Oct 2023 21:08:31 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI, SPF_HELO_PASS,URIBL_BLOCKED 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 BF5F627BBE2 for ; Mon, 9 Oct 2023 21:08:26 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qpwXk-0005tY-3y; Mon, 09 Oct 2023 16:07:56 -0400 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 1qpwXf-0005qZ-CU for guix-patches@gnu.org; Mon, 09 Oct 2023 16:07:51 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qpwXf-0007tw-4c for guix-patches@gnu.org; Mon, 09 Oct 2023 16:07:51 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qpwXz-0002VV-QY for guix-patches@gnu.org; Mon, 09 Oct 2023 16:08:11 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#65479] [PATCH core-updates v3 12/63] gnu: docbook2x: Import patches from debian. Resent-From: Bruno Victal Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 09 Oct 2023 20:08:11 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 65479 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 65479@debbugs.gnu.org Cc: Bruno Victal Received: via spool by 65479-submit@debbugs.gnu.org id=B65479.16968820849494 (code B ref 65479); Mon, 09 Oct 2023 20:08:11 +0000 Received: (at 65479) by debbugs.gnu.org; 9 Oct 2023 20:08:04 +0000 Received: from localhost ([127.0.0.1]:33305 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qpwXr-0002Se-0R for submit@debbugs.gnu.org; Mon, 09 Oct 2023 16:08:04 -0400 Received: from smtpm3.myservices.hosting ([185.26.105.234]:59326) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qpwXj-0002Qs-Ie for 65479@debbugs.gnu.org; Mon, 09 Oct 2023 16:07:57 -0400 Received: from mail1.netim.hosting (unknown [185.26.106.173]) by smtpm3.myservices.hosting (Postfix) with ESMTP id 07D2620FDE for <65479@debbugs.gnu.org>; Mon, 9 Oct 2023 22:07:21 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by mail1.netim.hosting (Postfix) with ESMTP id 6A69F800A9; Mon, 9 Oct 2023 22:07:21 +0200 (CEST) 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 9qFcfBVRiDUG; Mon, 9 Oct 2023 22:07:20 +0200 (CEST) Received: from guix-nuc.home.arpa (unknown [10.192.1.83]) (Authenticated sender: lumen@makinata.eu) by mail1.netim.hosting (Postfix) with ESMTPSA id BB25C8009E; Mon, 9 Oct 2023 22:07:16 +0200 (CEST) From: Bruno Victal Date: Mon, 9 Oct 2023 21:06:00 +0100 Message-ID: <6b5e1ff27df3710beaf3238df4d1a603f9ce46a1.1696881354.git.mirai@makinata.eu> X-Mailer: git-send-email 2.41.0 In-Reply-To: References: 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 (docbook2x)[source]: Import patches from debian. Prefer patching in source over 'patch-sources phase. Drop docbook-xml workaround. [arguments]<#:phases>: Drop 'patch-sources. [inputs]: Move after arguments. Remove docbook-xml-4.5. [natine-inputs]: Add autoconf, automake and libtool. * gnu/packages/patches/docbook2x-filename-handling.patch: New file. * gnu/packages/patches/docbook2x-fix-synopsis.patch: Ditto. * gnu/packages/patches/docbook2x-manpage-typo.patch: Ditto. * gnu/packages/patches/docbook2x-preprocessor-declaration.patch: Ditto. * gnu/packages/patches/docbook2x-static-datadir-evaluation.patch: Ditto. * gnu/local.mk: Register it. --- gnu/local.mk | 5 + gnu/packages/docbook.scm | 59 ++++++------ .../patches/docbook2x-filename-handling.patch | 44 +++++++++ .../patches/docbook2x-fix-synopsis.patch | 26 ++++++ .../patches/docbook2x-manpage-typo.patch | 26 ++++++ .../docbook2x-preprocessor-declaration.patch | 91 +++++++++++++++++++ .../docbook2x-static-datadir-evaluation.patch | 21 +++++ 7 files changed, 241 insertions(+), 31 deletions(-) create mode 100644 gnu/packages/patches/docbook2x-filename-handling.patch create mode 100644 gnu/packages/patches/docbook2x-fix-synopsis.patch create mode 100644 gnu/packages/patches/docbook2x-manpage-typo.patch create mode 100644 gnu/packages/patches/docbook2x-preprocessor-declaration.patch create mode 100644 gnu/packages/patches/docbook2x-static-datadir-evaluation.patch diff --git a/gnu/local.mk b/gnu/local.mk index c4ad7cb901..d26a2e73b8 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1076,6 +1076,11 @@ dist_patch_DATA = \ %D%/packages/patches/docbook-utils-respect-refentry-for-name.patch \ %D%/packages/patches/docbook-utils-source-date-epoch.patch \ %D%/packages/patches/docbook-utils-use-date-element.patch \ + %D%/packages/patches/docbook2x-filename-handling.patch \ + %D%/packages/patches/docbook2x-fix-synopsis.patch \ + %D%/packages/patches/docbook2x-manpage-typo.patch \ + %D%/packages/patches/docbook2x-preprocessor-declaration.patch \ + %D%/packages/patches/docbook2x-static-datadir-evaluation.patch \ %D%/packages/patches/doc++-include-directives.patch \ %D%/packages/patches/doc++-segfault-fix.patch \ %D%/packages/patches/dovecot-opensslv3.patch \ diff --git a/gnu/packages/docbook.scm b/gnu/packages/docbook.scm index f0e320ea9a..9d90779701 100644 --- a/gnu/packages/docbook.scm +++ b/gnu/packages/docbook.scm @@ -27,6 +27,7 @@ (define-module (gnu packages docbook) #:use-module (gnu packages) + #:use-module (gnu packages autotools) #:use-module (gnu packages bash) #:use-module (gnu packages compression) #:use-module (gnu packages imagemagick) @@ -865,42 +866,27 @@ (define-public docbook2x version "/docbook2X-" version ".tar.gz")) (sha256 (base32 - "0ifwzk99rzjws0ixzimbvs83x6cxqk1xzmg84wa1p7bs6rypaxs0")))) + "0ifwzk99rzjws0ixzimbvs83x6cxqk1xzmg84wa1p7bs6rypaxs0")) + (patches + (search-patches "docbook2x-filename-handling.patch" + "docbook2x-fix-synopsis.patch" + "docbook2x-manpage-typo.patch" + "docbook2x-preprocessor-declaration.patch" + "docbook2x-static-datadir-evaluation.patch")) + (modules '((guix build utils))) + (snippet + ;; Fix a failing test (maybe it worked with old texinfo?) + #~(begin + (substitute* "test/complete-manuals/at1.xml" + (("") + "")) + ;; Force a new autoreconf run. + (delete-file "configure"))))) (build-system gnu-build-system) - (inputs - (list bash-minimal - docbook-xml-4.5 - perl - perl-xml-namespacesupport - perl-xml-parser - perl-xml-sax - perl-xml-sax-base - texinfo - libxslt)) (arguments (list #:phases #~(modify-phases %standard-phases - (add-after 'configure 'patch-sources - (lambda* (#:key inputs #:allow-other-keys) - ;; Fix failed substitution in config.pl - (substitute* "perl/config.pl" - (("\\$\\{prefix\\}") - #$output)) - ;; Fix a failing test (maybe it worked with old texinfo?) - (substitute* "test/complete-manuals/at1.xml" - (("") - "")) - ;; Patch all the tests use DocBook 4.5 - (substitute* (find-files "test" "\\.xml$") - (("\"-//OASIS//DTD DocBook XML V4\\..+//EN\"") - "\"-//OASIS//DTD DocBook XML V4.5//EN\"") - (("\"http://www\\.oasis-open\\.org/docbook/xml/4\\..+/docbookx.dtd\"") - "\"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd\"")) - ;; Set XML catalogs for tests to pass - (setenv "XML_CATALOG_FILES" - (string-append (assoc-ref inputs "docbook-xml") - "/xml/dtd/docbook/catalog.xml")))) (add-after 'install 'wrap-programs (lambda* (#:key inputs outputs #:allow-other-keys) (let* ((programs @@ -934,6 +920,17 @@ (define-public docbook2x (symlink prog (string-append #$output "/bin/db2x_" prog))) '("docbook2man" "docbook2texi"))))))) + (inputs + (list bash-minimal + perl + perl-xml-namespacesupport + perl-xml-parser + perl-xml-sax + perl-xml-sax-base + texinfo + libxslt)) + (native-inputs + (list autoconf automake libtool)) (home-page "https://docbook2x.sourceforge.net") (synopsis "Convert DocBook to man page and Texinfo format") (description diff --git a/gnu/packages/patches/docbook2x-filename-handling.patch b/gnu/packages/patches/docbook2x-filename-handling.patch new file mode 100644 index 0000000000..ebffd7b7ae --- /dev/null +++ b/gnu/packages/patches/docbook2x-filename-handling.patch @@ -0,0 +1,44 @@ +# Source: + +## 03_fix_420153_filename_whitespace_handling.dpatch by +## Daniel Leidert (dale) +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: Peter Eisentraut reported a regression in the whitespace handling of +## DP: refentrytitle content during filename creation: +## DP: http://bugs.debian.org/420153. The problem is, that upstream first +## DP: replaces all spaces (but not linebreaks btw) with underlines and then +## DP: it tries to normalize the result. This means, that a linebreak with +## DP: additional whitespaces results in manpage names like 'foo_ ____bar.9'. +## DP: So what we basically do in this patch is, that we first normalize the +## DP: refentrytitle and then replace any spaces left with underlines. + +Edit by Bruno Victal : + Removed dpatch lines. + +--- docbook2x-0.8.8~/xslt/man/manpage.xsl 2006-04-20 15:45:55.000000000 +0200 ++++ docbook2x-0.8.8/xslt/man/manpage.xsl 2007-04-20 16:19:28.000000000 +0200 +@@ -30,7 +30,7 @@ + + + +- ++ + + + +--- docbook2x-0.8.8~/xslt/man/refentry.xsl 2006-04-21 04:39:55.000000000 +0200 ++++ docbook2x-0.8.8/xslt/man/refentry.xsl 2007-04-20 16:21:53.000000000 +0200 +@@ -38,7 +38,11 @@ + + + +- ++ ++ ++ ++ ++ + +