From patchwork Wed Feb 22 13:49:40 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Elberger X-Patchwork-Id: 19990 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 38FEDC61DA4 for ; Wed, 22 Feb 2023 13:49:47 +0000 (UTC) Received: from a11-127.smtp-out.amazonses.com (a11-127.smtp-out.amazonses.com [54.240.11.127]) by mx.groups.io with SMTP id smtpd.web11.9144.1677073781575702006 for ; Wed, 22 Feb 2023 05:49:41 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@richelberger.com header.s=5u2mht5g5nbgnd5xxu4iibla5zobc5bd header.b=J4L+71/1; spf=pass (domain: amazonses.com, ip: 54.240.11.127, mailfrom: 0100018679630f6c-73495791-c342-49dd-8686-28447f180ae3-000000@amazonses.com) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/simple; s=5u2mht5g5nbgnd5xxu4iibla5zobc5bd; d=richelberger.com; t=1677073780; h=Subject:From:To:Cc:Date:Mime-Version:Content-Type:Content-Transfer-Encoding:References:Message-Id; bh=CExTSd2cp6HW11m9rLHJvojxDCVtOVDnXuyfY4Dohno=; b=J4L+71/1ubSCQt4dy9/2us6mDChEvgm6exgkGzg86dyu25qlri6iSC3qkUO/7YC7 r7vMSp8QGnez+WnJSZZdfhyxSM9DvWSl8lnYHzTkmiiyoffs6yTiOKIwM/vsdkjYpe0 M+osHv5cxGoXpcmRvyIy7X/+7MPzI3aezKZaKQpc= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/simple; s=6gbrjpgwjskckoa6a5zn6fwqkn67xbtw; d=amazonses.com; t=1677073780; h=Subject:From:To:Cc:Date:Mime-Version:Content-Type:Content-Transfer-Encoding:References:Message-Id:Feedback-ID; bh=CExTSd2cp6HW11m9rLHJvojxDCVtOVDnXuyfY4Dohno=; b=JZghorxVx7oqPbplBj9VqzN6PBHl4wqME8rLPFsIs5AKCQZNQn4F+DEeqDrsUGjq 0B7GAlnSIpRvWhMza5zBEXebvFoY9VjHd3k+9oHl5ke1+c30MTSoqO1ZpCwUYH/aqz9 RIPA3ILKBAEQulgdsuFdiIn5p/+ew9sy3sYydwVw= Subject: [PATCH] docbook-xml: Switch from debian packages to upstream docbook sources From: =?utf-8?q?Richard_Elberger?= To: =?utf-8?q?openembedded-core=40lists=2Eopenembedded=2Eorg?= Cc: =?utf-8?q?Richard_Elberger?= Date: Wed, 22 Feb 2023 13:49:40 +0000 Mime-Version: 1.0 References: <20230222134932.260932-1-rich@richelberger.com> X-Mailer: Amazon WorkMail Thread-Index: AQHZRsSBfl5J2XBRTK+UlXpt6TFZ1Q== Thread-Topic: [PATCH] docbook-xml: Switch from debian packages to upstream docbook sources X-Original-Mailer: git-send-email 2.34.1 X-Wm-Sent-Timestamp: 1677073779 Message-ID: <0100018679630f6c-73495791-c342-49dd-8686-28447f180ae3-000000@email.amazonses.com> Feedback-ID: 1.us-east-1.LF00NED762KFuBsfzrtoqw+Brn/qlF9OYdxWukAhsl8=:AmazonSES X-SES-Outgoing: 2023.02.22-54.240.11.127 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Wed, 22 Feb 2023 13:49:47 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/177570 This patch changes the docbook-xml distribution package source from debian to docbook which aligns the recipe with the source originator. Other changes made to the recipe include: This patch resolves [YOCTO #13270]. - removal of version 4.0 given docbook no longer distributes version 4.0 - simplification of the header description. - inline comments to communicate the rationale behind gathering multiple versions and LICENSE file handling. - minor ordering changes to align with styling conventions and better context to better communicate use - Added commend about magic XMLCATALOGS variable. This variable and subsequent inherit might be better placed in recipes that depend on docbook-xml but leave it for now to not cause a patch landslide. - Modify the related docbook-xml patch to remove docbook-xml-4.0 since it is no longer provided. - Put BBCLASSEXTEND to end of recipe per RP note on convention Signed-off-by: Richard Elberger --- .../docbook-xml-update-catalog.xml.patch | 89 +------------------ .../docbook-xml/docbook-xml-dtd4_4.5.bb | 60 +++++++++---- 2 files changed, 43 insertions(+), 106 deletions(-) -- 2.34.1 diff --git a/meta/recipes-devtools/docbook-xml/docbook-xml-dtd4/docbook-xml-update-catalog.xml.patch b/meta/recipes-devtools/docbook-xml/docbook-xml-dtd4/docbook-xml-update-catalog.xml.patch index c1385631d7..1f3364900c 100644 --- a/meta/recipes-devtools/docbook-xml/docbook-xml-dtd4/docbook-xml-update-catalog.xml.patch +++ b/meta/recipes-devtools/docbook-xml/docbook-xml-dtd4/docbook-xml-update-catalog.xml.patch @@ -1,97 +1,12 @@ +21/3/2023: modified to remove 4.0 + docbook-xml: update catalog.xml Refer Ubuntu 13.04 to update catalog.xml Upstream-Status: Inappropriate [docbook 4.x development has ceased, docbook 5 is entirely different] Signed-off-by: Hongxu Jia ---- - docbook-4.0/catalog.xml | 72 +++++++++++++++++++++++++++++++++++++++++++++++ - docbook-4.1.2/catalog.xml | 66 +++++++++++++++++++++++++++++++++++++++++++ - docbook-4.2/catalog.xml | 69 ++++++--------------------------------------- - docbook-4.3/catalog.xml | 72 ++++++++--------------------------------------- - docbook-4.4/catalog.xml | 63 ++--------------------------------------- - docbook-4.5/catalog.xml | 63 ++--------------------------------------- - 6 files changed, 165 insertions(+), 240 deletions(-) - create mode 100644 docbook-4.0/catalog.xml - create mode 100644 docbook-4.1.2/catalog.xml -diff --git a/docbook-4.0/catalog.xml b/docbook-4.0/catalog.xml -new file mode 100644 ---- /dev/null -+++ b/docbook-4.0/catalog.xml -@@ -0,0 +1,72 @@ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ diff --git a/docbook-4.1.2/catalog.xml b/docbook-4.1.2/catalog.xml new file mode 100644 --- /dev/null diff --git a/meta/recipes-devtools/docbook-xml/docbook-xml-dtd4_4.5.bb b/meta/recipes-devtools/docbook-xml/docbook-xml-dtd4_4.5.bb index 2bec1442af..e4b4201b1f 100644 --- a/meta/recipes-devtools/docbook-xml/docbook-xml-dtd4_4.5.bb +++ b/meta/recipes-devtools/docbook-xml/docbook-xml-dtd4_4.5.bb @@ -1,30 +1,47 @@ SUMMARY = "Document type definitions for verification of XML data files" DESCRIPTION = "Document type definitions for verification of XML data \ -files against the DocBook rule set, it ships with the latest DocBook 4.5 \ -XML DTD, as well as a selected set of legacy DTDs for use with older \ -documents, including 4.0, 4.1.2, 4.2, 4.3 and 4.4" -HOMEPAGE = "http://www.docbook.org/xml/" +files against the DocBook rule set." +HOMEPAGE = "https://docbook.org" + +# The upstream sources are not distributed with a license file. +# LICENSE-OASIS is included as a "patch" to workaround this. When +# upgrading this recipe, please verify whether this is still needed. LICENSE = "OASIS" LIC_FILES_CHKSUM = "file://${WORKDIR}/LICENSE-OASIS;md5=c608985dd5f7f215e669e7639a0b1d2e" -# Note: the upstream sources are not distributed with a license file. -# LICENSE-OASIS is included as a "patch" to workaround this. When -# upgrading this recipe, please verify whether this is still needed. -SRC_URI = "http://snapshot.debian.org/archive/debian/20160728T043443Z/pool/main/d/docbook-xml/docbook-xml_${PV}.orig.tar.gz \ - file://LICENSE-OASIS \ - file://docbook-xml-update-catalog.xml.patch \ -" +# To support apps with xml schema backward compatibility, we must +# install a set of schemas. Install the latest based on PV and then +# name any specific versions as required. TODO: Figure out a mechanism +# to filter exactly which versions are necessary, if that's even +# possible. +# +# DocBook.org lists available release packages at https://docbook.org/xml/. +# +# The release packages relate docbook source at +# https://github.com/docbook/docbook but building them requires the +# Gradle build system. In future, it might be safer to use the source +# tree which would also enable proper SBOM generation through the +# bitbake build system. +# -SRC_URI[md5sum] = "487b4d44e15cffb1f4048af23f98208e" -SRC_URI[sha256sum] = "b0f8edcf697f5318e63dd98c9a931f3fee167af0805ba441db372e0f17b2a44f" +SRC_URI = "https://docbook.org/xml/4.1.2/docbkx412.zip;name=payload412;subdir=docbook-4.1.2 \ + https://docbook.org/xml/4.2/docbook-xml-4.2.zip;name=payload42;subdir=docbook-4.2 \ + https://docbook.org/xml/4.3/docbook-xml-4.3.zip;name=payload43;subdir=docbook-4.3 \ + https://docbook.org/xml/4.4/docbook-xml-4.4.zip;name=payload44;subdir=docbook-4.4 \ + https://docbook.org/xml/${PV}/docbook-xml-${PV}.zip;name=payloadPV;subdir=docbook-${PV} \ + file://docbook-xml-update-catalog.xml.patch \ + file://LICENSE-OASIS" -UPSTREAM_CHECK_URI = "${DEBIAN_MIRROR}/main/d/docbook-xml/" +SRC_URI[payload412.sha256sum] = "30f0644064e0ea71751438251940b1431f46acada814a062870f486c772e7772" +SRC_URI[payload42.sha256sum] = "acc4601e4f97a196076b7e64b368d9248b07c7abf26b34a02cca40eeebe60fa2" +SRC_URI[payload43.sha256sum] = "23068a94ea6fd484b004c5a73ec36a66aa47ea8f0d6b62cc1695931f5c143464" +SRC_URI[payload44.sha256sum] = "02f159eb88c4254d95e831c51c144b1863b216d909b5ff45743a1ce6f5273090" +SRC_URI[payloadPV.sha256sum] = "4e4e037a2b83c98c6c94818390d4bdd3f6e10f6ec62dd79188594e26190dc7b4" -S = "${WORKDIR}/docbook-xml-4.5.c31424" +UPSTREAM_CHECK_REGEX = "docbook-xml-(?P4(\.\d+)).zip" -inherit allarch -BBCLASSEXTEND = "native" +S = "${WORKDIR}" do_configure (){ : @@ -38,15 +55,20 @@ do_install () { install -d ${D}${sysconfdir}/xml/ xmlcatalog --create --noout ${D}${sysconfdir}/xml/docbook-xml.xml - for DTDVERSION in 4.0 4.1.2 4.2 4.3 4.4 4.5; do + for DTDVERSION in 4.1.2 4.2 4.3 4.4 4.5; do DEST=${datadir}/xml/docbook/schema/dtd/$DTDVERSION install -d -m 755 ${D}$DEST cp -v -R docbook-$DTDVERSION/* ${D}$DEST - xmlcatalog --verbose --noout --add nextCatalog unused file://$DEST/catalog.xml ${D}${sysconfdir}/xml/docbook-xml.xml + xmlcatalog --verbose --noout --add nextCatalog unused \ + file://$DEST/catalog.xml ${D}${sysconfdir}/xml/docbook-xml.xml done } +# Magic environment variable is required for downstream recipe processing XMLCATALOGS = "${sysconfdir}/xml/docbook-xml.xml" inherit xmlcatalog FILES:${PN} = "${datadir}/* ${sysconfdir}/xml/docbook-xml.xml" + +inherit allarch +BBCLASSEXTEND = "native"