From patchwork Tue Apr 2 16:52:07 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ross Burton X-Patchwork-Id: 161643 Delivered-To: patch@linaro.org Received: by 2002:a02:c6d8:0:0:0:0:0 with SMTP id r24csp1971374jan; Tue, 2 Apr 2019 09:52:15 -0700 (PDT) X-Google-Smtp-Source: APXvYqx3JIfPWCTMZqYk5YzAm56Z8mxdALn22xb//bYljWhAX7OApt70Qy8DquYae6ppJ6Z+dcFV X-Received: by 2002:a63:78ce:: with SMTP id t197mr54787201pgc.314.1554223935543; Tue, 02 Apr 2019 09:52:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554223935; cv=none; d=google.com; s=arc-20160816; b=Vnl65FMxh27lZRu+SAUPxLDNkpykQecsczrKB2zKU/xebbzN8AHEi6LfshHu/HvDoL ZOv+NSU4kMwd42XcmVHR4gNxgtKMVkRuzLLM8hsqFapBDuvmFERtezYSrc/pl/oklC/Q YKqlm+ghZnpD9quL7Eez1C4vsrxL82dIy7Q2Vy7jIHDoSvCxIkUoZhFhU8o07SMHM4z9 4Qsu8AtLIxsibbIPj1ojFIXQjt9hoOXHHcgCfXkzwQuDdefN8JAbgfkbgaCVEPgfQ9L4 q+0TtzXoccDgG+Vk5mbqPVdK134IWhAVyxmGUAeE4Sv+nINbz3479sjq9yqQtKATwt+S 5f8g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:sender:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:message-id:date:to:from:dkim-signature :delivered-to; bh=R0mduCFT1iL0NaCsuOU3y5VXxiHi1LdFgTML8Td06PM=; b=WlIeQJ4qAUOJ3EbV1QBeUQYVpZvVWPcT5aJTe4qoW068W2TIT25XX6nS69XkGfAQWx Z1v4ZrH+aBHIunE6UIqQFQ0WvAuBI8VmZJgn49+rP9pw+uAlti1jGAh+5aRDkE6wfgY4 IpqKryKrNjERYANE326kEqFdMB+RLIeakS0dhcqT6HINUqzFdSu+Qu5wqJ2a839QqnjD TNuuVF5sYITkOtUbclL2sVLBtXlskeS8KkhdwyOlN4GfVsNdmX93PoA5I06SJoSjnWOJ +0jfInZGE8Sp44OpPTWe0rxDb7QvUsjLFLEs6CJ/sikquHugzbtaKGJbG8ezomaD9qu5 vTIA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@intel-com.20150623.gappssmtp.com header.s=20150623 header.b=xi+MMYQL; spf=pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) smtp.mailfrom=openembedded-core-bounces@lists.openembedded.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from mail.openembedded.org (mail.openembedded.org. [140.211.169.62]) by mx.google.com with ESMTP id l32si11507399pgm.130.2019.04.02.09.52.14; Tue, 02 Apr 2019 09:52:15 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) client-ip=140.211.169.62; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@intel-com.20150623.gappssmtp.com header.s=20150623 header.b=xi+MMYQL; spf=pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) smtp.mailfrom=openembedded-core-bounces@lists.openembedded.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from ec2-34-214-78-129.us-west-2.compute.amazonaws.com (localhost [127.0.0.1]) by mail.openembedded.org (Postfix) with ESMTP id C3C817D202; Tue, 2 Apr 2019 16:52:11 +0000 (UTC) X-Original-To: openembedded-core@lists.openembedded.org Delivered-To: openembedded-core@lists.openembedded.org Received: from mail-wr1-f50.google.com (mail-wr1-f50.google.com [209.85.221.50]) by mail.openembedded.org (Postfix) with ESMTP id DB7937D1F7 for ; Tue, 2 Apr 2019 16:52:09 +0000 (UTC) Received: by mail-wr1-f50.google.com with SMTP id k17so17528302wrx.10 for ; Tue, 02 Apr 2019 09:52:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel-com.20150623.gappssmtp.com; s=20150623; h=from:to:subject:date:message-id; bh=c4w3esIkBKtzRcoqoRwpC6LwOIAa1Bqj5t3tVk5o7rM=; b=xi+MMYQLd28iI5AvV1zCerM5RyTTMM6U2PUF6OOQgC+oRW747rV6VYwInIMF3yp2It rbt5lZZe2cc7f58yqATtN3nTPzlc+6nKWgXTW2d4gpLm+huxK9gDi5otYGNySplhY9NZ 0ovk0bkn5QNUVZOW05jw0Spbc/OcnDBDHTskF6u4m58aJi+Oe0nB4Q6opiswhDNHCzwk bGL/4dMwe/mThWGfowy8xaUUeqW0KqkPMw1/Llgk0I+efaz1VAEvW8fUESW4ppcl0tiE /2wyKWuRv5VCcovKfB50LfMZdf9MiB1NKk2vdJIBhT0IMXjOs1zm41BDNN6t96pTCcQJ G6+g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id; bh=c4w3esIkBKtzRcoqoRwpC6LwOIAa1Bqj5t3tVk5o7rM=; b=OQef4Q/mpQVufF4zf7spv6NjnlUoEF1Yw56tRA5c6OskBG3GY+9ZotUBYx6vevCpb+ 4rCYGu7Xu+O8KmmEgfP8qQ4PiD/5WQ7AQuE7B+6EfBVlPvqCwL/gav0UnfmZ4LcF+By3 fkKSHswUqDrljJkwkuHaFLXgYRYUk80gV4+Jj9h9svwcMtZgjLlWURtyG2W1UB7vDr/A aWy0ysyvzdLCoeKz1RXreY1CPj19rv4a46c5RSm0UGs1l+PyYSV2YtTBYWmuR6+bMIt8 JUxAQ7pQ+bXLMSESWg4YyCt5m4K6MYaoiJyCiIij7TbWUcGElyZCNKVKvg3kaKc+NqBl 5X4Q== X-Gm-Message-State: APjAAAU8Rp5cvS4c0QTRqkQoNV37QxcrLnmydec8jGhluGOMsi06iwqF 5o1yaasB2RMNL4EKr8tL1xjT5L8BB1Y= X-Received: by 2002:adf:cf05:: with SMTP id o5mr9278922wrj.8.1554223930307; Tue, 02 Apr 2019 09:52:10 -0700 (PDT) Received: from flashheart.burtonini.com (35.106.2.81.in-addr.arpa. [81.2.106.35]) by smtp.gmail.com with ESMTPSA id t15sm19898114wmt.2.2019.04.02.09.52.09 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 02 Apr 2019 09:52:09 -0700 (PDT) From: Ross Burton To: openembedded-core@lists.openembedded.org Date: Tue, 2 Apr 2019 17:52:07 +0100 Message-Id: <20190402165207.24366-1-ross.burton@intel.com> X-Mailer: git-send-email 2.11.0 Subject: [OE-core] [PATCH] asciidoc: specify XML catalogue to use X-BeenThere: openembedded-core@lists.openembedded.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Patches and discussions about the oe-core layer List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: openembedded-core-bounces@lists.openembedded.org Errors-To: openembedded-core-bounces@lists.openembedded.org libxml-native by default uses a XML catalogue at /etc/xml/catalog, instead of the one in the sysroot. Until this is fixed (#13260) override the XML catalogue manually in the recipe to point explicitly at the docbook-xml and docbook-xsl catalogues. This fixes either complete build failures (where the host doesn't have docbook-xml installed) or slow builds (where the host doesn't have docbook-xsl installed). Signed-off-by: Ross Burton --- .../asciidoc/asciidoc/auto-catalogs.patch | 53 ++++++++++++++++++++++ meta/recipes-extended/asciidoc/asciidoc_8.6.9.bb | 9 +++- 2 files changed, 60 insertions(+), 2 deletions(-) create mode 100644 meta/recipes-extended/asciidoc/asciidoc/auto-catalogs.patch -- 2.11.0 -- _______________________________________________ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core diff --git a/meta/recipes-extended/asciidoc/asciidoc/auto-catalogs.patch b/meta/recipes-extended/asciidoc/asciidoc/auto-catalogs.patch new file mode 100644 index 00000000000..ca170db00f2 --- /dev/null +++ b/meta/recipes-extended/asciidoc/asciidoc/auto-catalogs.patch @@ -0,0 +1,53 @@ +If SGML_CATALOG_FILES is in the environment, pass --catalogs to xmllint and +xsltproc. Also pass --nonet to xsltproc to detect future missing stylesheet +problems. + +An earlier version of this patch was filed upstream at +https://github.com/asciidoc/asciidoc-py3/issues/61 so depending on how that goes +this could get merged. + +Upstream-Status: Inappropriate +Signed-off-by: Ross Burton + +diff --git a/a2x.py b/a2x.py +index 2d7699a..582d809 100755 +--- a/a2x.py ++++ b/a2x.py +@@ -57,6 +57,10 @@ LYNX_OPTS = '-dump' + W3M_OPTS = '-dump -cols 70 -T text/html -no-graph' + XSLTPROC_OPTS = '' + ++if "SGML_CATALOG_FILES" in os.environ: ++ XMLLINT += " --catalogs" ++ XSLTPROC += " --catalogs" ++ + ###################################################################### + # End of configuration file parameters. + ###################################################################### +@@ -298,7 +302,7 @@ def exec_xsltproc(xsl_file, xml_file, dst_dir, opts = ''): + cwd = os.getcwd() + shell_cd(dst_dir) + try: +- shell('"%s" %s "%s" "%s"' % (XSLTPROC, opts, xsl_file, xml_file)) ++ shell('%s %s "%s" "%s"' % (XSLTPROC, opts, xsl_file, xml_file)) + finally: + shell_cd(cwd) + +@@ -483,7 +487,7 @@ class A2X(AttrDict): + self.asciidoc_opts += ' --doctype %s' % self.doctype + for attr in self.attributes: + self.asciidoc_opts += ' --attribute "%s"' % attr +-# self.xsltproc_opts += ' --nonet' ++ self.xsltproc_opts += ' --nonet' + if self.verbose: + self.asciidoc_opts += ' --verbose' + self.dblatex_opts += ' -V' +@@ -634,7 +638,7 @@ class A2X(AttrDict): + shell('"%s" --backend docbook -a "a2x-format=%s" %s --out-file "%s" "%s"' % + (self.asciidoc, self.format, self.asciidoc_opts, docbook_file, self.asciidoc_file)) + if not self.no_xmllint and XMLLINT: +- shell('"%s" --nonet --noout --valid "%s"' % (XMLLINT, docbook_file)) ++ shell('%s --nonet --noout --valid "%s"' % (XMLLINT, docbook_file)) + + def to_xhtml(self): + self.to_docbook() diff --git a/meta/recipes-extended/asciidoc/asciidoc_8.6.9.bb b/meta/recipes-extended/asciidoc/asciidoc_8.6.9.bb index d0d15171ac4..f684f12dc72 100644 --- a/meta/recipes-extended/asciidoc/asciidoc_8.6.9.bb +++ b/meta/recipes-extended/asciidoc/asciidoc_8.6.9.bb @@ -8,14 +8,19 @@ LICENSE = "GPLv2" LIC_FILES_CHKSUM = "file://COPYING;md5=8ca43cbc842c2336e835926c2166c28b \ file://COPYRIGHT;md5=029ad5428ba5efa20176b396222d4069" -SRC_URI = "git://github.com/asciidoc/asciidoc-py3;protocol=https" +SRC_URI = "git://github.com/asciidoc/asciidoc-py3;protocol=https \ + file://auto-catalogs.patch" SRCREV = "618f6e6f6b558ed1e5f2588cd60a5a6b4f881ca0" PV .= "+py3-git${SRCPV}" -DEPENDS = "libxml2-native libxslt-native docbook-xml-dtd4-native" +DEPENDS = "libxml2-native libxslt-native docbook-xml-dtd4-native docbook-xsl-stylesheets-native" S = "${WORKDIR}/git" +# Tell xmllint where to find the DocBook XML catalogue, because right now it +# opens /etc/xml/catalog on the host. Depends on auto-catalogs.patch +export SGML_CATALOG_FILES="file://${STAGING_ETCDIR_NATIVE}/xml/docbook-xml.xml file://${STAGING_ETCDIR_NATIVE}/xml/docbook-xsl.xml" + # Not using automake inherit autotools-brokensep CLEANBROKEN = "1"