From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:403:4789::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id ODPDMMH0DmVxxQAAG6o9tA:P1 (envelope-from ) for ; Sat, 23 Sep 2023 16:22:57 +0200 Received: from aspmx1.migadu.com ([2001:41d0:403:4789::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id ODPDMMH0DmVxxQAAG6o9tA (envelope-from ) for ; Sat, 23 Sep 2023 16:22:57 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 679C73E695 for ; Sat, 23 Sep 2023 16:22:57 +0200 (CEST) Authentication-Results: aspmx1.migadu.com; dkim=none; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1695478977; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post; bh=kd8XEphPnEXI4+fxx/8coKgts5V5U27+InN8TzzzBFs=; b=KBtUlk5Fl2UGJoAZTFcqu/lRATDY6OlJuwkzJ1vBFSdBLW51DrQqycSjZPpxhtqG0Bv60F q81dwhyMEXclGdP4NQfhuF/FwXCKDOR+kfsLmWIUZDCmcnXyfJKP9YfyFiGCM9boRgmZeS wzehgMGsp49hrFbLDlUWOjvsZbQBMkc5OE+a08XDD4je5+JZk0Ukgxf6pMQ7iVn1T7947o BMh82H9aWgW66jI6VBlqqcNZ/XQ6q/2qkPc9QA8Slrju8ePE2scYt0ATNsVqkiTwPqbzfK GYXNJ5oyjD9Oza3YGkNncj4/HCi4QnE1Sp6TGy1AILiUf36H/Lh6nPFC4L/aMQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1695478977; a=rsa-sha256; cv=none; b=rjwhPrnkNIv7XqmH1B70sN4NJZSKR8NIIXLS2kcRJN0uhTVbjjIdoDXxOBi2sc77aEMEYB 2pXcYtRYeYOu1SNtHZz+JHi1lNSYlj8FlRQqJrC6ZOj35eyX32hGt7hYah5poRdGOM8Ns/ Cw+2enHPJVYl0sNmtH1jPk9dVzMQrlPK7TyruPmJqjRFfxSu2UcFKdT4xn2itUv+e0TE4J 7QifjGHPx5V5RfxCgH00CX/2XT2uJwrg/bzh1e84cf0bkVkPUgywNw/T59VMwzQudB9gev evT9SmqlhXWnaDjcSTEkkeobwOftTYxMZnGIy0yPazu5KJuhvykGwTxOVOoX6A== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=none Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qk3WU-00071U-1N; Sat, 23 Sep 2023 10:22:18 -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 1qk3WE-0006yC-4f for guix-patches@gnu.org; Sat, 23 Sep 2023 10:22:02 -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 1qk3WD-0003AO-3N; Sat, 23 Sep 2023 10:22:01 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qk3WJ-00082u-GQ; Sat, 23 Sep 2023 10:22:07 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#65479] [PATCH core-updates v2 12/62] 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: Sat, 23 Sep 2023 14:22: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 , 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.169547891730763 (code B ref 65479); Sat, 23 Sep 2023 14:22:07 +0000 Received: (at 65479) by debbugs.gnu.org; 23 Sep 2023 14:21:57 +0000 Received: from localhost ([127.0.0.1]:40195 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qk3W8-000801-Lf for submit@debbugs.gnu.org; Sat, 23 Sep 2023 10:21:57 -0400 Received: from smtpm3.myservices.hosting ([185.26.105.234]:56806) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qk3Vs-0007yI-0C for 65479@debbugs.gnu.org; Sat, 23 Sep 2023 10:21:40 -0400 Received: from mail1.netim.hosting (unknown [185.26.106.173]) by smtpm3.myservices.hosting (Postfix) with ESMTP id 38D5821076 for <65479@debbugs.gnu.org>; Sat, 23 Sep 2023 16:21:27 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by mail1.netim.hosting (Postfix) with ESMTP id 6AD70800A0; Sat, 23 Sep 2023 16:21: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 RXZF3x09A4T4; Sat, 23 Sep 2023 16:21:21 +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 3C54980097; Sat, 23 Sep 2023 16:21:19 +0200 (CEST) From: Bruno Victal Date: Sat, 23 Sep 2023 15:19:47 +0100 Message-ID: X-Mailer: git-send-email 2.41.0 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN X-Spam-Score: 0.23 X-Migadu-Spam-Score: 0.23 X-Migadu-Scanner: mx1.migadu.com X-Migadu-Queue-Id: 679C73E695 X-TUID: t0eSvaYcrCuu 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 | 24 +++++++++++------------- gnu/packages/perl.scm | 7 +------ gnu/packages/xml.scm | 19 +++---------------- guix/search-paths.scm | 25 +++++++++++++++++++++++++ 4 files changed, 40 insertions(+), 35 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index 346af01e9d..5e7df75976 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -11132,17 +11132,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. @@ -11178,15 +11175,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 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 c0222f5518..75a14d0824 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 @@ -1787,14 +1781,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 8dc81861c9..752dc8099b 100644 --- a/guix/search-paths.scm +++ b/guix/search-paths.scm @@ -38,6 +38,8 @@ (define-module (guix search-paths) $SSL_CERT_DIR $SSL_CERT_FILE $TZDIR + $SGML_CATALOG_FILES + $XML_CATALOG_FILES search-path-specification->sexp sexp->search-path-specification @@ -121,6 +123,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'." -- 2.41.0