From debbugs-submit-bounces@debbugs.gnu.org Tue Apr 25 20:53:15 2023 Received: (at submit) by debbugs.gnu.org; 26 Apr 2023 00:53:15 +0000 Received: from localhost ([127.0.0.1]:53826 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1prTPG-0001Pv-St for submit@debbugs.gnu.org; Tue, 25 Apr 2023 20:53:15 -0400 Received: from lists.gnu.org ([209.51.188.17]:39910) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1prTPE-0001Pk-9p for submit@debbugs.gnu.org; Tue, 25 Apr 2023 20:53:13 -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 1prTPD-00068i-Si for guix-patches@gnu.org; Tue, 25 Apr 2023 20:53:11 -0400 Received: from smtpmciv4.myservices.hosting ([185.26.107.240]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1prTPC-0000DW-8X for guix-patches@gnu.org; Tue, 25 Apr 2023 20:53:11 -0400 Received: from mail1.netim.hosting (unknown [185.26.106.173]) by smtpmciv4.myservices.hosting (Postfix) with ESMTP id 1B93A21E88 for ; Wed, 26 Apr 2023 02:52:59 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by mail1.netim.hosting (Postfix) with ESMTP id 99AC58009F; Wed, 26 Apr 2023 02:52:59 +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 wZK90YOVYgmk; Wed, 26 Apr 2023 02:52:59 +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 2CF068009E; Wed, 26 Apr 2023 02:52:59 +0200 (CEST) From: Bruno Victal To: guix-patches@gnu.org Subject: [PATCH 0/8] Comprehensive DocBook refactoring. Date: Wed, 26 Apr 2023 01:52:53 +0100 Message-Id: X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 X-Debbugs-CC: maxim.cournoyer@gmail.com, andreas@enge.fr Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=185.26.107.240; envelope-from=mirai@makinata.eu; helo=smtpmciv4.myservices.hosting X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: submit Cc: Bruno Victal X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) Notable changes: * Fixes profile conflicts for docbook-xml packages by using versioned paths. * Implements the path convention used by NixOS for docbook-xml 4.x packages, this allows for packages that use cmake to search for these files (such as kdoctools) to work correctly without having to patch the sources. * Stores the schema files correctly rather than lumping it all within …/dtd/. * Source fetching methods were reviewed and were fixed where incorrect. (docbook-xml-5.1) * Unbundles binary leftovers in docbook-xsl-1.79.1 packages. * Removes executable permissions for SGML DTDs. * Uses proper tools to manipulate XML instead of substitute*. * Uses sxml instead of representing XML as a string. * Fixes tests for docbook-xsl. * Uses copy-build-system over trivial-build-system. * Modernizes the style used for the package definitions. It is hoped that these patches will substantially reduce the amount of source patching done in guix and solve obscure build failures. This patch-series is “Core-Updates” material, it will trigger mass rebuilds. Bruno Victal (8): gnu: docbook-xml: Fix installation paths. gnu: Add docbook-xml-5.0.1. gnu: docbook-xsl: Refactor package. gnu: docbook-xsl-1.79.1: Refactor package. gnu: docbook-utils: Refactor package. gnu: docbook: Refactor docbook-sgml packages. gnu: docbook: Refactor dblatex packages. gnu: docbook-dsssl: Switch to copy-build-system. gnu/packages/docbook.scm | 875 +++++++++++++++++++++++---------------- 1 file changed, 507 insertions(+), 368 deletions(-) base-commit: 8093c6ba21c51efe901ba98ce698c545bf13dcd0 -- 2.39.2 From debbugs-submit-bounces@debbugs.gnu.org Tue Apr 25 20:57:41 2023 Received: (at 63081) by debbugs.gnu.org; 26 Apr 2023 00:57:41 +0000 Received: from localhost ([127.0.0.1]:53835 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1prTTY-0001b5-JI for submit@debbugs.gnu.org; Tue, 25 Apr 2023 20:57:41 -0400 Received: from smtpmciv3.myservices.hosting ([185.26.107.239]:44464) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1prTTX-0001av-DM for 63081@debbugs.gnu.org; Tue, 25 Apr 2023 20:57:39 -0400 Received: from mail1.netim.hosting (unknown [185.26.106.173]) by smtpmciv3.myservices.hosting (Postfix) with ESMTP id 1E17821F7B; Wed, 26 Apr 2023 02:57:37 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by mail1.netim.hosting (Postfix) with ESMTP id C698D8009F; Wed, 26 Apr 2023 02:57:37 +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 f1j47p9-UHi4; Wed, 26 Apr 2023 02:57:37 +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 340E68009D; Wed, 26 Apr 2023 02:57:37 +0200 (CEST) From: Bruno Victal To: 63081@debbugs.gnu.org Subject: [PATCH 2/8] gnu: Add docbook-xml-5.0.1. Date: Wed, 26 Apr 2023 01:56:54 +0100 Message-Id: X-Mailer: git-send-email 2.39.2 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 63081 Cc: andreas@enge.fr, Bruno Victal , maxim.cournoyer@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) * 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 73a14855b9..79d5069fb0 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) -- 2.39.2 From debbugs-submit-bounces@debbugs.gnu.org Tue Apr 25 20:57:44 2023 Received: (at 63081) by debbugs.gnu.org; 26 Apr 2023 00:57:44 +0000 Received: from localhost ([127.0.0.1]:53839 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1prTTc-0001bQ-5O for submit@debbugs.gnu.org; Tue, 25 Apr 2023 20:57:44 -0400 Received: from smtpm3.myservices.hosting ([185.26.105.234]:42738) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1prTTY-0001ax-0y for 63081@debbugs.gnu.org; Tue, 25 Apr 2023 20:57:40 -0400 Received: from mail1.netim.hosting (unknown [185.26.106.173]) by smtpm3.myservices.hosting (Postfix) with ESMTP id A22E0216F3; Wed, 26 Apr 2023 02:57:38 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by mail1.netim.hosting (Postfix) with ESMTP id 547E4800A0; Wed, 26 Apr 2023 02:57:38 +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 xbl27_eFDydE; Wed, 26 Apr 2023 02:57:37 +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 9DBC58009E; Wed, 26 Apr 2023 02:57:37 +0200 (CEST) From: Bruno Victal To: 63081@debbugs.gnu.org Subject: [PATCH 3/8] gnu: docbook-xsl: Refactor package. Date: Wed, 26 Apr 2023 01:56:55 +0100 Message-Id: X-Mailer: git-send-email 2.39.2 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 63081 Cc: andreas@enge.fr, Bruno Victal , maxim.cournoyer@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) * gnu/packages/docbook.scm (docbook-xsl)[source]: Patch in snippet. [arguments]: Use sxml representation for xmlc file. Use xmlcatalog to manipulate catalog.xml instead of substitute*. Use #:install-plan instead of replacing 'install phase. [native-inputs]: Add docbook-xml-4.4 and libxml2, required for tests. --- gnu/packages/docbook.scm | 158 +++++++++++++++++++++++++-------------- 1 file changed, 102 insertions(+), 56 deletions(-) diff --git a/gnu/packages/docbook.scm b/gnu/packages/docbook.scm index 79d5069fb0..2fe0c2dbc5 100644 --- a/gnu/packages/docbook.scm +++ b/gnu/packages/docbook.scm @@ -290,9 +290,16 @@ (define-public docbook-xsl (url "https://github.com/docbook/xslt10-stylesheets") (commit commit))) (file-name (git-file-name name version)) - ;; Multiple .jar files are bundled with the sources. (modules '((guix build utils))) - (snippet '(for-each delete-file (find-files "." "\\.jar$"))) + (snippet + #~(begin + ;; Multiple .jar files are bundled with the sources. + (for-each delete-file + (find-files "." "\\.jar$")) + ;; Do not build webhelp files, as they require a Saxon from + ;; 2005, which is not packaged in Guix. + (substitute* "xsl/Makefile" + ((" webhelp") "")))) (sha256 (base32 "1bl8dwrcy7skrlh80fpsmiw045bv2j0aym231ikcv3hvm2pi98dj")))) @@ -300,67 +307,106 @@ (define-public docbook-xsl (arguments (list #:make-flags #~(list "XSLTENGINE=xsltproc") + #:modules '((guix build gnu-build-system) + (guix build utils) + (sxml simple)) #:phases - #~(modify-phases %standard-phases - (replace 'configure - (lambda _ - ;; The build systems insist on a ~/.xmlc, and it is simpler to - ;; create a dummy config file than to patch it into - ;; submission. - (setenv "HOME" "/tmp") - (call-with-output-file "/tmp/.xmlc" - (lambda (port) - (format port "\ - - - - - - - -\n"))) - (substitute* "xsl/Makefile" - ;; Do not build webhelp files, as they require a Saxon from - ;; 2005, which is not packaged in Guix. - ((" webhelp") "")))) - (add-before 'install 'generate-catalog.xml - (lambda* (#:key make-flags #:allow-other-keys) - (apply invoke "make" "-C" "xsl" "catalog.xml" make-flags))) + #~(let ((dest-path (format #f "~a/xml/xsl/~a-~a" + #$output #$name #$version))) + (modify-phases %standard-phases + (replace 'configure + (lambda _ + ;; The build systems insist on a ~/.xmlc, and it is simpler to + ;; create a dummy config file than to patch it into + ;; submission. + (setenv "HOME" "/tmp") + (call-with-output-file "/tmp/.xmlc" + (lambda (port) + (sxml->xml + '(*TOP* + (*PI* xml "version='1.0'") + (config + (java (@ (xml:id "bigmem")) + (java-options (@ (name "Xmx512m")))) + (xsltproc (@ (xml:id "xsltproc") + (exec "xsltproc"))) + (xmllint (@ (xml:id "xmllint") + (exec "xmllint"))))) + port))))) + (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 + (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 "/"))) + (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"))) + catalog-files)))) (replace 'install (lambda _ - (let ((xml (string-append #$output "/xml/xsl/" - #$name "-" #$version)) - (select-rx (make-regexp + (let ((select-rx (make-regexp "(\\.xml$|\\.xsl$|\\.dtd$|\\.ent$)"))) ;; Install catalog. (chdir "xsl") - (install-file "catalog.xml" xml) - (install-file "VERSION.xsl" xml) - (substitute* (string-append xml "/catalog.xml") - ;; Re-add the no longer present compatibility entries. - ((".*.*" anchor) - (string-append "\ - - - \n" anchor)) - (("/snapshot/") - (string-append "/" #$base-version "/")) - (("rewritePrefix=\"./") - (string-append "rewritePrefix=\"file://" xml "/"))) + (install-file "catalog.xml" dest-path) + (install-file "VERSION.xsl" dest-path) ;; Install style sheets. - (for-each (lambda (dir) - (for-each (lambda (f) - (install-file - f (string-append xml "/" (dirname f)))) - (find-files dir select-rx))) - '("assembly" "common" "eclipse" "epub" "epub3" "fo" - "highlighting" "html" "htmlhelp" "javahelp" "lib" - "manpages" "params" "profiling" "roundtrip" - "template" "website" - "xhtml" "xhtml-1_1" "xhtml5")))))))) - (native-inputs (list libxml2 + (for-each + (lambda (dir) + (for-each (lambda (f) + (install-file + f + (string-append dest-path "/" (dirname f)))) + (find-files dir select-rx))) + '("assembly" "common" "eclipse" "epub" "epub3" "fo" + "highlighting" "html" "htmlhelp" "javahelp" "lib" + "manpages" "params" "profiling" "roundtrip" + "template" "website" + "xhtml" "xhtml-1_1" "xhtml5"))))))))) + (native-inputs (list docbook-xml-4.4 ; for tests + libxml2 libxslt perl perl-xml-xpath)) -- 2.39.2 From debbugs-submit-bounces@debbugs.gnu.org Tue Apr 25 20:57:45 2023 Received: (at 63081) by debbugs.gnu.org; 26 Apr 2023 00:57:45 +0000 Received: from localhost ([127.0.0.1]:53842 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1prTTc-0001bY-NE for submit@debbugs.gnu.org; Tue, 25 Apr 2023 20:57:45 -0400 Received: from smtpm4.myservices.hosting ([185.26.105.235]:46020) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1prTTY-0001b4-UC for 63081@debbugs.gnu.org; Tue, 25 Apr 2023 20:57:41 -0400 Received: from mail1.netim.hosting (unknown [185.26.106.173]) by smtpm4.myservices.hosting (Postfix) with ESMTP id D177B214A5; Wed, 26 Apr 2023 02:57:39 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by mail1.netim.hosting (Postfix) with ESMTP id 88D76800A0; Wed, 26 Apr 2023 02:57:39 +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 pT9nmvDw1gv0; Wed, 26 Apr 2023 02:57:39 +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 E5CA88009D; Wed, 26 Apr 2023 02:57:38 +0200 (CEST) From: Bruno Victal To: 63081@debbugs.gnu.org Subject: [PATCH 6/8] gnu: docbook: Refactor docbook-sgml packages. Date: Wed, 26 Apr 2023 01:56:58 +0100 Message-Id: <26db108569ee144702131e5099081a6ece3978dc.1682470616.git.mirai@makinata.eu> X-Mailer: git-send-email 2.39.2 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 63081 Cc: andreas@enge.fr, Bruno Victal , maxim.cournoyer@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) * gnu/packages/docbook.scm (docbook-sgml)[build-system]: Switch to copy-build-system. [arguments]: Replace #:builder with #:install-plan. Add phases 'fix-permission and 'patch-iso-entities. [sources]: Use url-fetch/zipbomb. (docbook-sgml-4.1, docbook-sgml-3.1)[sources]: Ditto. (iso-8879-entities)[source]: Ditto. [build-system]: Switch to copy-build-system. [native-inputs]: Restyle. --- gnu/packages/docbook.scm | 70 ++++++++++++++++++---------------------- 1 file changed, 32 insertions(+), 38 deletions(-) diff --git a/gnu/packages/docbook.scm b/gnu/packages/docbook.scm index d4441bacee..cc0a663f68 100644 --- a/gnu/packages/docbook.scm +++ b/gnu/packages/docbook.scm @@ -585,35 +585,39 @@ (define-public docbook-sgml-4.2 (name "docbook-sgml") (version "4.2") (source (origin - (method url-fetch) + (method url-fetch/zipbomb) (uri (string-append "https://www.oasis-open.org/docbook/sgml/4.2/docbook-" version ".zip")) (sha256 (base32 "1hrm4qmmzi285bkxkc74lxvjvw2gbl7ycbaxhv31h9rl9g4x5sv7")))) - (build-system trivial-build-system) + (build-system copy-build-system) (arguments - '(#:modules ((guix build utils)) - #:builder - (begin - (use-modules (guix build utils)) - (let ((source (assoc-ref %build-inputs "source")) - (iso-entities-dir (string-append - (assoc-ref %build-inputs "iso-8879-entities"))) - (unzip (string-append (assoc-ref %build-inputs "unzip") - "/bin/unzip")) - (dtd (string-append (assoc-ref %outputs "out") - "/sgml/dtd/docbook"))) - ;; Extract the sources. - (mkdir-p dtd) - (chdir dtd) - (invoke unzip source) - ;; Reference the ISO 8879 character entities. - ;; e.g. "iso-lat1.gml" --> "/ISOlat1" - (substitute* "docbook.cat" - (("\"iso-(.*)\\.gml\"" _ name) - (string-append "\"" iso-entities-dir "/ISO" name "\""))))))) + (list + #:modules '((guix build copy-build-system) + (guix build utils) + (srfi srfi-26)) + #:install-plan + #~`(("./" "sgml/dtd/docbook" + #:exclude-regexp ("catalog\\.xml$" + "ChangeLog$" + "README$" + "\\.txt$"))) + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'fix-permissions + (lambda _ + (for-each (cut chmod <> #o644) (find-files ".")))) + (add-before 'install 'patch-iso-entities + (lambda* (#:key inputs #:allow-other-keys) + ;; Reference the ISO 8879 character entities. + ;; e.g. "iso-lat1.gml" --> "/ISOlat1" + (let ((iso-entities-dir + (assoc-ref %build-inputs "iso-8879-entities"))) + (substitute* "docbook.cat" + (("\"iso-(.*)\\.gml\"" _ name) + (string-append "\"" iso-entities-dir "/ISO" name "\""))))))))) (native-inputs (list unzip)) (inputs @@ -628,7 +632,7 @@ (define-public docbook-sgml-4.1 (inherit docbook-sgml-4.2) (version "4.1") (source (origin - (method url-fetch) + (method url-fetch/zipbomb) (uri (string-append "https://www.oasis-open.org/docbook/sgml/" version "/docbk41.zip")) (sha256 @@ -642,7 +646,7 @@ (define-public docbook-sgml-3.1 (inherit docbook-sgml) (version "3.1") (source (origin - (method url-fetch) + (method url-fetch/zipbomb) (uri (string-append "https://www.oasis-open.org/docbook/sgml/" version "/docbk31.zip")) (sha256 @@ -655,23 +659,13 @@ (define iso-8879-entities (name "iso-8879-entities") (version "0.0") ;no proper version (source (origin - (method url-fetch) - (uri "http://www.oasis-open.org/cover/ISOEnts.zip") + (method url-fetch/zipbomb) + (uri "https://www.oasis-open.org/cover/ISOEnts.zip") (sha256 (base32 "1clrkaqnvc1ja4lj8blr0rdlphngkcda3snm7b9jzvcn76d3br6w")))) - (build-system trivial-build-system) - (arguments - '(#:modules ((guix build utils)) - #:builder - (begin - (use-modules (guix build utils)) - (let ((source (assoc-ref %build-inputs "source")) - (unzip (string-append (assoc-ref %build-inputs "unzip") - "/bin/unzip")) - (out (string-append (assoc-ref %outputs "out")))) - (invoke unzip source "-d" out))))) - (native-inputs `(("unzip" ,unzip))) + (build-system copy-build-system) + (native-inputs (list unzip)) (home-page "https://www.oasis-open.org/") (synopsis "ISO 8879 character entities") (description "ISO 8879 character entities that are typically used in -- 2.39.2 From debbugs-submit-bounces@debbugs.gnu.org Tue Apr 25 20:57:45 2023 Received: (at 63081) by debbugs.gnu.org; 26 Apr 2023 00:57:45 +0000 Received: from localhost ([127.0.0.1]:53844 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1prTTd-0001br-AL for submit@debbugs.gnu.org; Tue, 25 Apr 2023 20:57:45 -0400 Received: from smtpmciv3.myservices.hosting ([185.26.107.239]:44490) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1prTTb-0001bO-MR for 63081@debbugs.gnu.org; Tue, 25 Apr 2023 20:57:44 -0400 Received: from mail1.netim.hosting (unknown [185.26.106.173]) by smtpmciv3.myservices.hosting (Postfix) with ESMTP id 9861B21F7C; Wed, 26 Apr 2023 02:57:39 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by mail1.netim.hosting (Postfix) with ESMTP id A0B488009F; Wed, 26 Apr 2023 02:57:38 +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 ar6cZsFqmR7u; Wed, 26 Apr 2023 02:57:38 +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 1230F8009D; Wed, 26 Apr 2023 02:57:38 +0200 (CEST) From: Bruno Victal To: 63081@debbugs.gnu.org Subject: [PATCH 4/8] gnu: docbook-xsl-1.79.1: Refactor package. Date: Wed, 26 Apr 2023 01:56:56 +0100 Message-Id: X-Mailer: git-send-email 2.39.2 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 63081 Cc: andreas@enge.fr, Bruno Victal , maxim.cournoyer@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) * gnu/packages/docbook.scm (docbook-xsl-1.79.1)[source]: Remove bundled binary files. [arguments]: Use #:install-plan. Patch catalog.xml using xmlcatalog. Add phase 'install-doc. [native-inputs]: Add libxml2. --- gnu/packages/docbook.scm | 94 ++++++++++++++++++++++++++-------------- 1 file changed, 61 insertions(+), 33 deletions(-) diff --git a/gnu/packages/docbook.scm b/gnu/packages/docbook.scm index 2fe0c2dbc5..b3e53557e8 100644 --- a/gnu/packages/docbook.scm +++ b/gnu/packages/docbook.scm @@ -430,44 +430,72 @@ (define-public docbook-xsl-1.79.1 name "-ns-" version ".tar.bz2")) (sha256 (base32 - "170ggf5dgjar65kkn5n33kvjr3pdinpj66nnxfx8b2avw0k91jin")))) + "170ggf5dgjar65kkn5n33kvjr3pdinpj66nnxfx8b2avw0k91jin")) + (modules '((guix build utils))) + ;; Bundled binary files. + (snippet + #~(delete-file-recursively "tools")))) (build-system copy-build-system) (outputs '("out" "doc")) (arguments (list + #:install-plan + (let ((target (format #f "xml/xsl/~a-~a/" name version)) + (select-rx '("\\.xml$" "\\.xsl$" "\\.dtd$" "\\.ent$"))) + #~`(#$@(map + (lambda (directory) + ;; XXX: When filters are used, the source basename + ;; isn't kept under the target path, append it again. + (let ((target* (string-append target directory))) + (list directory target* #:include-regexp select-rx))) + (list "assembly" "common" "eclipse" "epub" "epub3" "fo" + "highlighting" "html" "htmlhelp" "javahelp" "lib" + "manpages" "params" "profiling" "roundtrip" + "template" "website" + "xhtml" "xhtml-1_1" "xhtml5")) + ("catalog.xml" #$target) + ("VERSION.xsl" #$target))) #:phases - #~(modify-phases %standard-phases - ;; XXX: The copy-build-system doesn't seem to allow installing to a - ;; different output. - (replace 'install - (lambda _ - (let ((xml (string-append #$output "/xml/xsl/" #$name "-" #$version)) - (doc (string-append #$output:doc - "/share/doc/" #$name "-" #$version)) - (select-rx (make-regexp - "(\\.xml$|\\.xsl$|\\.dtd$|\\.ent$)"))) - ;; Install catalog. - (install-file "catalog.xml" xml) - (install-file "VERSION.xsl" xml) - (substitute* (string-append xml "/catalog.xml") - (("rewritePrefix=\"./") - (string-append "rewritePrefix=\"file://" xml "/"))) - ;; Install style sheets. - (for-each (lambda (dir) - (for-each (lambda (f) - (install-file - f (string-append xml "/" (dirname f)))) - (find-files dir select-rx))) - '("assembly" "common" "eclipse" "epub" "epub3" "fo" - "highlighting" "html" "htmlhelp" "javahelp" "lib" - "manpages" "params" "profiling" "roundtrip" - "template" "website" - "xhtml" "xhtml-1_1" "xhtml5")) - ;; Install documentation. - (install-file "NEWS" doc) - (install-file "RELEASE-NOTES.html" doc) - (copy-recursively "slides" doc) - (copy-recursively "webhelp" doc))))))) + #~(let ((dest-path (format #f "~a/xml/xsl/~a-~a" + #$output #$name #$version))) + (modify-phases %standard-phases + (add-before 'install 'patch-catalog-xml + (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 "/"))) + (for-each + (lambda (catalog) + (for-each + (lambda (type) + ;; Patch /current/ references to point to /gnu/store/…. + (invoke xmlcatalog "--noout" + "--add" type + "http://docbook.sourceforge.net/release/xsl-ns/current/" + store-uri + catalog) + ;; Patch versioned references to point to /gnu/store/…. + (invoke xmlcatalog "--noout" + "--add" type + (format + #f "http://docbook.sourceforge.net/release/xsl-ns/~a/" + #$version) + store-uri + catalog)) + (list "rewriteSystem" "rewriteURI"))) + catalog-files)))) + ;; XXX: The copy-build-system doesn't seem to allow installing to a + ;; different output. + (add-after 'install 'install-doc + (lambda _ + (let ((doc (format #f "~a/share/doc/~a-~a" + #$output:doc #$name #$version))) + (install-file "NEWS" doc) + (install-file "RELEASE-NOTES.html" doc) + (copy-recursively "slides" doc) + (copy-recursively "webhelp" doc)))))))) + (native-inputs (list libxml2)) (home-page "https://docbook.org") (synopsis "DocBook XSL namespaced style sheets for document authoring") (description "This package provides the @emph{namespaced} XSL style sheets -- 2.39.2 From debbugs-submit-bounces@debbugs.gnu.org Tue Apr 25 20:57:55 2023 Received: (at 63081) by debbugs.gnu.org; 26 Apr 2023 00:57:55 +0000 Received: from localhost ([127.0.0.1]:53848 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1prTTm-0001cJ-St for submit@debbugs.gnu.org; Tue, 25 Apr 2023 20:57:55 -0400 Received: from smtpm4.myservices.hosting ([185.26.105.235]:46042) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1prTTc-0001bR-Fk for 63081@debbugs.gnu.org; Tue, 25 Apr 2023 20:57:45 -0400 Received: from mail1.netim.hosting (unknown [185.26.106.173]) by smtpm4.myservices.hosting (Postfix) with ESMTP id A6985214A6; Wed, 26 Apr 2023 02:57:40 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by mail1.netim.hosting (Postfix) with ESMTP id 5CD788009E; Wed, 26 Apr 2023 02:57:40 +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 oyTTnH552k6k; Wed, 26 Apr 2023 02:57:40 +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 C531B8009D; Wed, 26 Apr 2023 02:57:39 +0200 (CEST) From: Bruno Victal To: 63081@debbugs.gnu.org Subject: [PATCH 8/8] gnu: docbook-dsssl: Switch to copy-build-system. Date: Wed, 26 Apr 2023 01:57:00 +0100 Message-Id: <10eb0782541de88bafd0dc1660ef43cc2220b7bf.1682470616.git.mirai@makinata.eu> X-Mailer: git-send-email 2.39.2 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 63081 Cc: andreas@enge.fr, Bruno Victal , maxim.cournoyer@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) * gnu/packages/docbook.scm (docbook-dsssl)[build-system]: Switch to copy-build-system. [arguments]: Add phase to install documentation as separate output. (docbook-dsssl-doc)[build-system]: Switch to copy-build-system. [arguments]: Adapt to new build-system. --- gnu/packages/docbook.scm | 54 ++++++++++++++-------------------------- 1 file changed, 18 insertions(+), 36 deletions(-) diff --git a/gnu/packages/docbook.scm b/gnu/packages/docbook.scm index ced174b3b8..4a911bcec7 100644 --- a/gnu/packages/docbook.scm +++ b/gnu/packages/docbook.scm @@ -514,25 +514,22 @@ (define-public docbook-dsssl (sha256 (base32 "1g72y2yyc2k89kzs0lvrb9n7hjayw1hdskfpplpz97pf1c99wcig")))) - (build-system trivial-build-system) + (build-system copy-build-system) (outputs '("out" "doc")) (arguments - `(#:modules ((guix build utils)) - #:builder - (begin - (use-modules (guix build utils)) - (let ((source (assoc-ref %build-inputs "source")) - (dtd (string-append (assoc-ref %outputs "out") - "/sgml/dtd/docbook")) - (docbook-dsssl-doc (assoc-ref %build-inputs "docbook-dsssl-doc")) - (doc (assoc-ref %outputs "doc")) - (tar (assoc-ref %build-inputs "tar")) - (bzip2 (assoc-ref %build-inputs "bzip2"))) - (setenv "PATH" (string-append tar "/bin" ":" bzip2 "/bin")) - (mkdir-p dtd) - (invoke "tar" "-xf" source "-C" dtd) - ;; The doc output contains 1.4 MiB of HTML documentation. - (symlink docbook-dsssl-doc doc))))) + (list + #:install-plan + #~`(("./" "sgml/dtd/docbook/" + #:exclude ("doc" "docsrc"))) + #:phases + #~(modify-phases %standard-phases + ;; The doc output contains 1.4 MiB of HTML documentation. + (add-after 'install 'install-doc + (lambda* (#:key inputs #:allow-other-keys) + (mkdir-p (string-append #$output:doc "/share/doc")) + (symlink (assoc-ref inputs "docbook-dsssl-doc") + (format #f "~a/share/doc/~a-~a" + #$output:doc #$name #$version))))))) (inputs (list docbook-dsssl-doc)) (native-inputs @@ -555,26 +552,11 @@ (define docbook-dsssl-doc (sha256 (base32 "1plp5ngc96pbna4rwglp9glcadnirbm3hlcjb4gjvq1f8biic9lz")))) - (build-system trivial-build-system) + (build-system copy-build-system) (arguments - `(#:modules ((guix build utils)) - #:builder - (begin - (use-modules (guix build utils)) - (let ((source (assoc-ref %build-inputs "source")) - (docdir (string-append (assoc-ref %outputs "out") - "/share/doc/" "docbook-dsssl-" ,version)) - (tar (assoc-ref %build-inputs "tar")) - (bzip2 (assoc-ref %build-inputs "bzip2"))) - (setenv "PATH" (string-append tar "/bin" ":" bzip2 "/bin")) - (mkdir-p docdir) - ;; Extract the "doc" subdirectory. - (invoke "tar" "-xf" source "--strip-components=2" - "--no-same-owner" "-C" docdir - (string-append "docbook-dsssl-" ,version "/doc")))))) - (native-inputs - `(("bzip2" ,bzip2) - ("tar" ,tar))) + (list + #:install-plan + #~`(("doc/" #$(string-append "/share/doc/docbook-dsssl-" version))))) (home-page "https://docbook.org/") (synopsis "DocBook DSSSL style sheets documentation") (description "Documentation for the DocBook DSSSL style sheets.") -- 2.39.2 From debbugs-submit-bounces@debbugs.gnu.org Tue Apr 25 20:57:55 2023 Received: (at 63081) by debbugs.gnu.org; 26 Apr 2023 00:57:55 +0000 Received: from localhost ([127.0.0.1]:53850 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1prTTn-0001cM-8u for submit@debbugs.gnu.org; Tue, 25 Apr 2023 20:57:55 -0400 Received: from smtpmciv3.myservices.hosting ([185.26.107.239]:44510) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1prTTg-0001c1-40 for 63081@debbugs.gnu.org; Tue, 25 Apr 2023 20:57:48 -0400 Received: from mail1.netim.hosting (unknown [185.26.106.173]) by smtpmciv3.myservices.hosting (Postfix) with ESMTP id 93AC521F7B; Wed, 26 Apr 2023 02:57:40 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by mail1.netim.hosting (Postfix) with ESMTP id 408C78009F; Wed, 26 Apr 2023 02:57:40 +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 t0p5z4E689IV; Wed, 26 Apr 2023 02:57:39 +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 5C4128009E; Wed, 26 Apr 2023 02:57:39 +0200 (CEST) From: Bruno Victal To: 63081@debbugs.gnu.org Subject: [PATCH 7/8] gnu: docbook: Refactor dblatex packages. Date: Wed, 26 Apr 2023 01:56:59 +0100 Message-Id: X-Mailer: git-send-email 2.39.2 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 63081 Cc: andreas@enge.fr, Bruno Victal , maxim.cournoyer@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) * gnu/packages/docbook.scm (dblatex): Rewrite using G-Expressions. (dblatex/stable): Use modify-inputs. --- gnu/packages/docbook.scm | 114 ++++++++++++++++++++------------------- 1 file changed, 58 insertions(+), 56 deletions(-) diff --git a/gnu/packages/docbook.scm b/gnu/packages/docbook.scm index cc0a663f68..ced174b3b8 100644 --- a/gnu/packages/docbook.scm +++ b/gnu/packages/docbook.scm @@ -37,6 +37,7 @@ (define-module (gnu packages docbook) #:use-module (gnu packages python) #:use-module (gnu packages base) #:use-module (gnu packages web-browsers) + #:use-module (gnu packages xfig) #:use-module (gnu packages xml) #:use-module (guix gexp) #:use-module (guix utils) @@ -44,7 +45,6 @@ (define-module (gnu packages docbook) #:use-module (guix packages) #:use-module (guix download) #:use-module (guix git-download) - #:use-module ((guix build utils) #:select (alist-replace)) #:use-module (guix build-system copy) #:use-module (guix build-system gnu) #:use-module (guix build-system trivial) @@ -685,62 +685,64 @@ (define-public dblatex (base32 "0yd09nypswy3q4scri1dg7dr99d7gd6r2dwx0xm81l9f4y32gs0n")))) (build-system python-build-system) - ;; TODO: Add xfig/transfig for fig2dev utility + (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' command + #: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)))))))) (inputs - `(("texlive" ,(texlive-updmap.cfg (list texlive-amsfonts - texlive-latex-anysize - texlive-latex-appendix - texlive-latex-bookmark - texlive-latex-changebar - texlive-latex-colortbl - texlive-latex-fancybox - texlive-fancyhdr - texlive-fancyvrb - texlive-latex-float - texlive-latex-footmisc - texlive-hyperref - texlive-latex-jknapltx - texlive-listings - texlive-latex-multirow - texlive-latex-overpic - texlive-pdfpages - texlive-refcount - texlive-subfigure - texlive-titlesec - texlive-wasysym + (list (texlive-updmap.cfg (list texlive-amsfonts + texlive-latex-anysize + texlive-latex-appendix + texlive-latex-bookmark + texlive-latex-changebar + texlive-latex-colortbl + texlive-latex-fancybox + texlive-fancyhdr + texlive-fancyvrb + texlive-latex-float + texlive-latex-footmisc + texlive-hyperref + texlive-latex-jknapltx + texlive-listings + texlive-latex-multirow + texlive-latex-overpic + texlive-pdfpages + texlive-refcount + texlive-subfigure + texlive-titlesec + texlive-wasysym - texlive-fonts-rsfs - texlive-stmaryrd + texlive-fonts-rsfs + texlive-stmaryrd - texlive-iftex))) - ("imagemagick" ,imagemagick) ;for convert - ("inkscape" ,inkscape/stable) ;for svg conversion - ("docbook" ,docbook-xml) - ("libxslt" ,libxslt))) ;for xsltproc - (arguments - `(;; 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' command - #:phases - (modify-phases %standard-phases - (add-after 'wrap 'set-path - (lambda* (#:key inputs outputs #:allow-other-keys) - (let ((out (assoc-ref outputs "out"))) - ;; dblatex executes helper programs at runtime. - (wrap-program (string-append out "/bin/dblatex") - `("PATH" ":" prefix - ,(map (lambda (input) - (string-append (assoc-ref inputs input) - "/bin")) - '("libxslt" "texlive" - "imagemagick" "inkscape")))))))))) + texlive-iftex)) + ;; FIXME: transfig is failing to build. + ;;transfig ;for fig2dev + imagemagick ;for convert + inkscape/stable ;for svg conversion + docbook-xml + libxslt)) ;for xsltproc (home-page "https://dblatex.sourceforge.net") (synopsis "DocBook to LaTeX Publishing") (description @@ -759,8 +761,8 @@ (define-public dblatex (define-public dblatex/stable (hidden-package (package/inherit dblatex - (inputs (alist-replace "imagemagick" `(,imagemagick/stable) - (package-inputs dblatex)))))) + (inputs (modify-inputs (package-inputs dblatex) + (replace "imagemagick" imagemagick/stable)))))) (define-public docbook-utils (package -- 2.39.2 From debbugs-submit-bounces@debbugs.gnu.org Tue Apr 25 20:57:56 2023 Received: (at 63081) by debbugs.gnu.org; 26 Apr 2023 00:57:56 +0000 Received: from localhost ([127.0.0.1]:53852 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1prTTn-0001cT-PQ for submit@debbugs.gnu.org; Tue, 25 Apr 2023 20:57:56 -0400 Received: from smtpmciv3.myservices.hosting ([185.26.107.239]:44526) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1prTTj-0001cA-IZ for 63081@debbugs.gnu.org; Tue, 25 Apr 2023 20:57:52 -0400 Received: from mail1.netim.hosting (unknown [185.26.106.173]) by smtpmciv3.myservices.hosting (Postfix) with ESMTP id ADA2A21F7E; Wed, 26 Apr 2023 02:57:42 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by mail1.netim.hosting (Postfix) with ESMTP id 43582800A1; Wed, 26 Apr 2023 02:57:39 +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 l13YvJuWA1Qx; Wed, 26 Apr 2023 02:57:38 +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 7B3848009E; Wed, 26 Apr 2023 02:57:38 +0200 (CEST) From: Bruno Victal To: 63081@debbugs.gnu.org Subject: [PATCH 5/8] gnu: docbook-utils: Refactor package. Date: Wed, 26 Apr 2023 01:56:57 +0100 Message-Id: <2b886bdc0bf4d36d565ac3702768dc0bb053f21c.1682470616.git.mirai@makinata.eu> X-Mailer: git-send-email 2.39.2 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 63081 Cc: andreas@enge.fr, Bruno Victal , maxim.cournoyer@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) * gnu/packages/docbook.scm (docbook-utils)[description]: Fix description. [source]: Patch source in snippet. [arguments]: Remove. --- gnu/packages/docbook.scm | 96 ++++++++++++++++++++-------------------- 1 file changed, 49 insertions(+), 47 deletions(-) diff --git a/gnu/packages/docbook.scm b/gnu/packages/docbook.scm index b3e53557e8..d4441bacee 100644 --- a/gnu/packages/docbook.scm +++ b/gnu/packages/docbook.scm @@ -780,45 +780,40 @@ (define-public docbook-utils version ".orig.tar.gz")) (sha256 (base32 - "1scj5vgw1xz872pq54a89blcxqqm11p90yzv8a9mqq57x27apyj8")))) + "1scj5vgw1xz872pq54a89blcxqqm11p90yzv8a9mqq57x27apyj8")) + (modules '((guix build utils))) + (snippet + #~(begin + ;; Patch build system. + (substitute* (find-files "." "\\.in$") + ;; Do not hard-code SGML_CATALOG_FILES. + ((".*SGML_CATALOG_FILES=/etc/sgml/catalog.*") "") + ;; Use OpenSP and OpenJade. + (("\\bjade\\b") + "openjade") + (("\\bnsgmls\\b") + "onsgmls")) + + ;; Do not override the SGML_CATALOG_FILES environment + ;; variable. + (substitute* "bin/jw.in" + ((".*SGML_CATALOG_FILES=`find.*") + "") + (("SGML_CATALOG_FILES=`echo.*") + ":\n") + (("SGML_CATALOG_FILES=\"\"") + ":") + (("\\bwhich\\b") + "command -v")) + + ;; Locate lynx, links or w3m from the PATH, not from + ;; /usr/bin. + (substitute* "backends/txt" + (("CONVERT=/usr/bin/") + "CONVERT=") + (("\\[ -x /usr/bin/([^ ]+) \\]" _ command) + (format #f "command -v ~a > /dev/null" command))))))) (build-system gnu-build-system) - (arguments - `(#:phases (modify-phases %standard-phases - (add-after 'unpack 'patch-build-system - (lambda _ - (substitute* (find-files "." "\\.in$") - ;; Do not hard-code SGML_CATALOG_FILES. - ((".*SGML_CATALOG_FILES=/etc/sgml/catalog.*") "") - ;; Use OpenSP and OpenJade. - (("\\bjade\\b") - "openjade") - (("\\bnsgmls\\b") - "onsgmls")) - #t)) - (add-after 'unpack 'patch-jw.in - ;; Do not override the SGML_CATALOG_FILES environment - ;; variable. - (lambda _ - (substitute* "bin/jw.in" - ((".*SGML_CATALOG_FILES=`find.*") - "") - (("SGML_CATALOG_FILES=`echo.*") - ":\n") - (("SGML_CATALOG_FILES=\"\"") - ":") - (("\\bwhich\\b") - "command -v")) - #t)) - (add-after 'unpack 'patch-txt-backend - (lambda _ - ;; Locate lynx, links or w3m from the PATH, not from - ;; /usr/bin. - (substitute* "backends/txt" - (("CONVERT=/usr/bin/") - "CONVERT=") - (("\\[ -x /usr/bin/([^ ]+) \\]" dummy command) - (string-append "command -v " command " > /dev/null"))) - #t))))) ;; Propagated for convenience. All these tools are used at run time to ;; provide the complete functionality of the docbook-utils commands. (propagated-inputs @@ -839,15 +834,22 @@ (define-public docbook-utils Language (HTML), Rich Text Format (RTF), PostScript (PS), man, Portable Document Format (PDF), TeX, Texinfo or plain text (txt). It can be used more conveniently via the following wrappers: -@itemx docbook2dvi Convert a SGML DocBook file to the DVI format. -@itemx docbook2html Convert a SGML DocBook file to an HTML document. -@itemx docbook2man Convert a SGML DocBook file a man page. -@itemx docbook2pdf Convert a SGML DocBook file to a PDF document. -@itemx docbook2ps Convert a SGML DocBook file to a PS document. -@itemx docbook2rtf Convert a SGML DocBook file to a RTF document. -@itemx docbook2tex Convert a SGML DocBook file to a TeX document. -@itemx docbook2texi Convert a SGML DocBook file to a Texinfo document. -@itemx docbook2txt Convert a SGML DocBook file to a plain text document. +@table @command +@item docbook2dvi +Convert a SGML DocBook file to the DVI format. +@item docbook2html +Convert a SGML DocBook file to an HTML document. +@item docbook2man +Convert a SGML DocBook file a man page. +@item docbook2pdf +@itemx docbook2ps +@itemx docbook2rtf +@itemx docbook2tex +@itemx docbook2texi +Convert a SGML DocBook file to a PDF/PS/RTF/TeX document. +@item docbook2txt +Convert a SGML DocBook file to a plain text document. +@end table @item sgmldiff Detect the differences in markup between two SGML files. @end table") -- 2.39.2 From debbugs-submit-bounces@debbugs.gnu.org Tue Apr 25 21:15:57 2023 Received: (at 63081) by debbugs.gnu.org; 26 Apr 2023 01:15:57 +0000 Received: from localhost ([127.0.0.1]:53863 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1prTlE-00023o-Ou for submit@debbugs.gnu.org; Tue, 25 Apr 2023 21:15:57 -0400 Received: from smtpmciv4.myservices.hosting ([185.26.107.240]:50846) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1prTlB-00023e-Fp for 63081@debbugs.gnu.org; Tue, 25 Apr 2023 21:15:55 -0400 Received: from mail1.netim.hosting (unknown [185.26.106.173]) by smtpmciv4.myservices.hosting (Postfix) with ESMTP id C5A1621EB1; Wed, 26 Apr 2023 03:15:51 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by mail1.netim.hosting (Postfix) with ESMTP id BF25D80098; Wed, 26 Apr 2023 02:57:05 +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 jV6A8x5XKsNC; Wed, 26 Apr 2023 02:57:04 +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 7D4B380097; Wed, 26 Apr 2023 02:57:04 +0200 (CEST) From: Bruno Victal To: 63081@debbugs.gnu.org Subject: [PATCH 1/8] gnu: docbook-xml: Fix installation paths. Date: Wed, 26 Apr 2023 01:56:53 +0100 Message-Id: X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 63081 Cc: andreas@enge.fr, Bruno Victal , maxim.cournoyer@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) 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. * 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 070b957339..73a14855b9 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 base-commit: 8093c6ba21c51efe901ba98ce698c545bf13dcd0 -- 2.39.2 From debbugs-submit-bounces@debbugs.gnu.org Thu Jul 27 12:21:20 2023 Received: (at 63081) by debbugs.gnu.org; 27 Jul 2023 16:21:20 +0000 Received: from localhost ([127.0.0.1]:42944 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qP3js-0000XJ-4S for submit@debbugs.gnu.org; Thu, 27 Jul 2023 12:21:20 -0400 Received: from mail-qk1-x736.google.com ([2607:f8b0:4864:20::736]:55642) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qP3jn-0000X1-I3 for 63081@debbugs.gnu.org; Thu, 27 Jul 2023 12:21:19 -0400 Received: by mail-qk1-x736.google.com with SMTP id af79cd13be357-76c4890a220so88739885a.3 for <63081@debbugs.gnu.org>; Thu, 27 Jul 2023 09:21:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1690474870; x=1691079670; h=content-transfer-encoding:mime-version:user-agent:message-id :in-reply-to:date:references:subject:cc:to:from:from:to:cc:subject :date:message-id:reply-to; bh=wJhDe3ZI7wBda8M9pIrl9YLM2R44lfxMivMYs2+bWT4=; b=pXoB6a4FDcb5eSTBRv99vV/mLGfs6nnVV+JUVTDa4LANjPAokLLSfsAADpM3LLeG5t BRK0/Iow2ESbRoTkXG4Qmuecpl6byWifdrxcrYUxQR4nGxuN13Tp+qJx25k25fh6J13/ Xe4LB4BGBB2tzALoeN0nWXE9jdeLr2mrY+BVnc94M0hPio3g2bb/9w1iSCYQ7P994VIA iKU1wrP8hZpDpGHK3ZFg75qlyx8lDuqpYtFbaptA+deCXKiByH6XjXCYcgAhQXIt7V91 RjZBMIcpSTi7fk9B4XwFhYgNkJNDHm473Aq2xYbN6AFLoyu70T3t5WSb9kiNgRg/vF/s OvBg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690474870; x=1691079670; h=content-transfer-encoding:mime-version:user-agent:message-id :in-reply-to:date:references:subject:cc:to:from:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=wJhDe3ZI7wBda8M9pIrl9YLM2R44lfxMivMYs2+bWT4=; b=aKCbuPHy2Gs07Zsi/EdyeeqxVJpoEK4HNI3tNn9MO7TqOY0K+LDkHNBiIcEFzPJCwM E2lE+xOAdGm+McrA8cTgUDu8Ch65zpxZh66Y+zp8QokhFCUBrG9p3Iri45SX6z0+GKRf 45YU86agdKAJxYYLeOYGl5ehM1FXDMb6IALYqdFdoN2gDIXoIEeqNwU7jyK/W6Zo73r+ yjWrAq5MxucniXrL0m8FtDqhBHNX5PNzv7yU8GlEQopswjWaL6NtnGJJOwkC+RxXTTcU r4BNWBOIzgyad9nB/VtZCvxpvr5+5RonW41R3oqC1mcU+xCbAAK6i/ScK0lr8a/33D7k EoQQ== X-Gm-Message-State: ABy/qLZ1B1wC8Ogy1nO3pSXKtq8A6DX7NyFIfbYlghaaIhrgylopu7jv 84mB03Q2HsXKv1Qx2V/cses8wCg3ROM= X-Google-Smtp-Source: APBJJlFp4LocXTgAaoLQ40QwdnUKeTaWyFL212/PUOq7Iy5H8uMwnPMMCy1MNaSCG5gsPJ25Xckerg== X-Received: by 2002:a05:620a:1aa8:b0:765:a720:5a61 with SMTP id bl40-20020a05620a1aa800b00765a7205a61mr460916qkb.31.1690474869875; Thu, 27 Jul 2023 09:21:09 -0700 (PDT) Received: from hurd (dsl-205-233-124-231.b2b2c.ca. [205.233.124.231]) by smtp.gmail.com with ESMTPSA id b22-20020a05620a127600b00767c8fe810bsm510834qkl.5.2023.07.27.09.21.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 27 Jul 2023 09:21:09 -0700 (PDT) From: Maxim Cournoyer To: Bruno Victal Subject: Re: bug#63081: [PATCH 0/8] Comprehensive DocBook refactoring. References: Date: Thu, 27 Jul 2023 12:21:08 -0400 In-Reply-To: (Bruno Victal's message of "Wed, 26 Apr 2023 01:52:53 +0100") Message-ID: <87y1j1xr4b.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 63081 Cc: andreas@enge.fr, 63081@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hi, Bruno Victal writes: > Notable changes: > * Fixes profile conflicts for docbook-xml packages by using versioned pat= hs. > * Implements the path convention used by NixOS for docbook-xml 4.x packag= es, > this allows for packages that use cmake to search for these files (such a= s kdoctools) > to work correctly without having to patch the sources. > * Stores the schema files correctly rather than lumping it all within =E2= =80=A6/dtd/. > * Source fetching methods were reviewed and were fixed where incorrect. (= docbook-xml-5.1) > * Unbundles binary leftovers in docbook-xsl-1.79.1 packages. > * Removes executable permissions for SGML DTDs. > * Uses proper tools to manipulate XML instead of substitute*. > * Uses sxml instead of representing XML as a string. > * Fixes tests for docbook-xsl. > * Uses copy-build-system over trivial-build-system. > * Modernizes the style used for the package definitions. I've applied this locally on core-updates and made some cosmetic changes, but attempting to build the various touched packages led to this newly introduced elogind failure: --8<---------------cut here---------------start------------->8--- CMakeFiles/LLVMObjectYAML.dir/yaml2obj.cpp.o --xinclude --maxdepth 9000 --stringparam man.output.quietly 1 --stringpara= m funcsynopsis.style ansi --stringparam man.authors.section.enabled 0 --str= ingparam man.copyright.section.enabled 0 --stringparam elogind.version 246.= 10 --path /tmp/guix-build-elogind-246.10.drv-0/build/man:/tmp/guix-build-el= ogind-246.10.drv-0/source/man ../source/man/custom-man.xsl ../source/man/sd= _bus_add_object.xml I/O error : Attempt to load network entity http://www.oasis-open.org/docboo= k/xml/4.2/docbookx.dtd ../source/man/sd_bus_add_object.xml:3: warning: failed to load external ent= ity "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"> ^ I/O error : Attempt to load network entity http://www.oasis-open.org/docboo= k/xml/4.2/docbookx.dtd ../source/man/sd_bus_add_match.xml:3: warning: failed to load external enti= ty "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"> ^ I/O error : Attempt to load network entity http://www.oasis-open.org/docboo= k/xml/4.5/docbookx.dtd ../source/man/libelogind-pkgconfig.xml:3: warning: failed to load external = entity "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd"> ^ ../source/man/sd_bus_add_match.xml:157: element include: XInclude error : c= ould not load ../source/man/libelogind-pkgconfig.xml, and no fallback was f= ound ../source/man/sd_bus_add_object.xml:44: element include: XInclude error : c= ould not load ../source/man/sd_bus_add_match.xml, and no fallback was found I/O error : Attempt to load network entity http://www.oasis-open.org/docboo= k/xml/4.5/docbookx.dtd ../source/man/libelogind-pkgconfig.xml:3: warning: failed to load external = entity "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd"> ^ [339/540] Generating man/pam_elogind.8 with a custom command I/O error : Attempt to load network entity http://www.oasis-open.org/docboo= k/xml/4.2/docbookx.dtd ../source/man/pam_elogind.xml:3: warning: failed to load external entity "h= ttp://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"> ^ Note: namesp. add : added namespace before processing pam_elog= ind [340/540] Generating man/sd_bus_add_node_enumerator.3 with a custom command I/O error : Attempt to load network entity http://www.oasis-open.org/docboo= k/xml/4.2/docbookx.dtd ../source/man/sd_bus_add_node_enumerator.xml:3: warning: failed to load ext= ernal entity "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"> ^ I/O error : Attempt to load network entity http://www.oasis-open.org/docboo= k/xml/4.5/docbookx.dtd ../source/man/libelogind-pkgconfig.xml:3: warning: failed to load external = entity "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd"> ^ Note: namesp. add : added namespace before processing sd_bus_a= dd_node_enumerator [341/540] Linking target pam_elogind.so [342/540] Linking target src/shared/libelogind-shared-246.10.so ninja: build stopped: subcommand failed. error: in phase 'build': uncaught exception: %exception #<&invoke-error program: "ninja" arguments: ("-j" "24") exit-sta= tus: 1 term-signal: #f stop-signal: #f>=20 phase `build' failed after 12.5 seconds command "ninja" "-j" "24" failed with status 1 builder for `/gnu/store/836v9khss2hdrzqwwwxm3856la5agzl2-elogind-246.10.drv= ' failed with exit code 1 @ build-failed /gnu/store/836v9khss2hdrzqwwwxm3856la5agzl2-elogind-246.10.d= rv - 1 builder for `/gnu/store/836v9khss2hdrzqwwwxm3856la5agzl2-elogind-246= .10.drv' failed with exit code 1 --8<---------------cut here---------------end--------------->8--- Would you have an idea of what went wrong here? --=20 Thanks, Maxim From debbugs-submit-bounces@debbugs.gnu.org Thu Aug 10 10:11:02 2023 Received: (at 63081-done) by debbugs.gnu.org; 10 Aug 2023 14:11:02 +0000 Received: from localhost ([127.0.0.1]:43768 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qU6NS-0005qu-8A for submit@debbugs.gnu.org; Thu, 10 Aug 2023 10:11:02 -0400 Received: from mail-qv1-xf32.google.com ([2607:f8b0:4864:20::f32]:42237) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qU6NO-0005qL-Qk for 63081-done@debbugs.gnu.org; Thu, 10 Aug 2023 10:11:01 -0400 Received: by mail-qv1-xf32.google.com with SMTP id 6a1803df08f44-63cf96c37beso4412186d6.0 for <63081-done@debbugs.gnu.org>; Thu, 10 Aug 2023 07:10:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1691676653; x=1692281453; h=content-transfer-encoding:mime-version:user-agent:message-id :in-reply-to:date:references:subject:cc:to:from:from:to:cc:subject :date:message-id:reply-to; bh=WpImVhR8+ILkg3Qgg3z3nnrcy0yO0rFjnxiRgaL075Q=; b=R66BG7ICY+161sxlV+SQU2Sio5KW7SPncyU6FFFvL1eyUEZ5Q3ck2j1zB9ZSZXzcYy 7PDiDNyDFiJlTX/BMoBOZn1jC2fAiFD8Q8DuNlK1jBLPJOy1CI/5iCi7CUlyFfckdDva 0Uhr517cNYbGE63A493B3AE+mefAkebi5IMJ12sJslJ/0Sn3IvF0DEn2mgp7/snZEJ4C viobHUcnVDCJmiHkj/fVYlPqp788YVkfFqdpBTLW8qTrTUfHMKCUFmPgcHav9o2BvdY/ eiWHGpRIpsi4UMxrv81KBN8Dh8Q6SQgprOGG1PKAr1/O6h6VMfPS+bf5XebElqdp5JEJ tupA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691676653; x=1692281453; h=content-transfer-encoding:mime-version:user-agent:message-id :in-reply-to:date:references:subject:cc:to:from:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=WpImVhR8+ILkg3Qgg3z3nnrcy0yO0rFjnxiRgaL075Q=; b=E4q0UU0+K0bJ0VkmAsjtDfqp14eyX32/7MDg87DrJhr+3KMyjtWBwzZI6WWBYKBQWQ JVTtwcVLc5E95jWVRXYYMoKz1VljOb92M2f++oPGGTrnsTayBqnsSuy/ZsxbzAk/fl0O z/HK1DY+FKO2nohQkJ5cPJhWc77o23ODLzUx9b7sOra1UyMu5xvR6WeUxmIyjc7Ca+t4 kX9wBOmeK9ZJVMr+oCB8oDjhBfckfnTQUoP5bIBKtQMD2lEiGfI9sFnz2WmvD2MbtlZr bcAO6ats6J2PoQNZp3ZSVyWEPU1aeYwk9elpzxV+h6FqbzbGm7EEsS+aUDddsyQlh2pU Dhug== X-Gm-Message-State: AOJu0YwTNdjLGSCGx6QsGbVWgzybvoBjAmwTMO+IgUCRD8fl1N+Qegtj P1E1yglUJR79dm2qz6WME8U= X-Google-Smtp-Source: AGHT+IGng+5mTqcW1NQ7iLG29P+eSTd2en2l+abtNFzemiyZ7U2S20BrkEdYErGMfzAIQY++NozTkA== X-Received: by 2002:a0c:f547:0:b0:636:1d3f:3d77 with SMTP id p7-20020a0cf547000000b006361d3f3d77mr2418981qvm.14.1691676653018; Thu, 10 Aug 2023 07:10:53 -0700 (PDT) Received: from hurd (dsl-205-236-230-92.b2b2c.ca. [205.236.230.92]) by smtp.gmail.com with ESMTPSA id h11-20020a0cf44b000000b0063d7524eb96sm501577qvm.67.2023.08.10.07.10.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Aug 2023 07:10:52 -0700 (PDT) From: Maxim Cournoyer To: Bruno Victal Subject: Re: [bug#63081] [PATCH 0/8] Comprehensive DocBook refactoring. References: Date: Thu, 10 Aug 2023 10:10:51 -0400 In-Reply-To: (Bruno Victal's message of "Wed, 26 Apr 2023 01:52:53 +0100") Message-ID: <871qgbgf84.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 63081-done Cc: andreas@enge.fr, 63081-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hello Bruno, Bruno Victal writes: > Notable changes: > * Fixes profile conflicts for docbook-xml packages by using versioned pat= hs. > * Implements the path convention used by NixOS for docbook-xml 4.x packag= es, > this allows for packages that use cmake to search for these files (such a= s kdoctools) > to work correctly without having to patch the sources. > * Stores the schema files correctly rather than lumping it all within =E2= =80=A6/dtd/. > * Source fetching methods were reviewed and were fixed where incorrect. (= docbook-xml-5.1) > * Unbundles binary leftovers in docbook-xsl-1.79.1 packages. > * Removes executable permissions for SGML DTDs. > * Uses proper tools to manipulate XML instead of substitute*. > * Uses sxml instead of representing XML as a string. > * Fixes tests for docbook-xsl. > * Uses copy-build-system over trivial-build-system. > * Modernizes the style used for the package definitions. I've applied it to core-updates, with some light edits. If you know of any packages that could be streamlined thanks to it, please send patches doing so, marked for core-updates. Closing for now, --=20 Thanks, Maxim From unknown Sun Jun 22 08:11:31 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Fri, 08 Sep 2023 11:24:11 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator