From patchwork Sun Feb 19 21:38:13 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Elberger X-Patchwork-Id: 19783 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 5C7EBC05027 for ; Sun, 19 Feb 2023 21:38:21 +0000 (UTC) Received: from a11-122.smtp-out.amazonses.com (a11-122.smtp-out.amazonses.com [54.240.11.122]) by mx.groups.io with SMTP id smtpd.web11.6604.1676842694937129549 for ; Sun, 19 Feb 2023 13:38:15 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@richelberger.com header.s=5u2mht5g5nbgnd5xxu4iibla5zobc5bd header.b=aeSRsLr3; spf=pass (domain: amazonses.com, ip: 54.240.11.122, mailfrom: 010001866b9cf531-82d2c73e-d459-4055-93f9-a7c83fcce6f9-000000@amazonses.com) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/simple; s=5u2mht5g5nbgnd5xxu4iibla5zobc5bd; d=richelberger.com; t=1676842694; h=Subject:From:To:Cc:Date:Mime-Version:Content-Type:Content-Transfer-Encoding:References:Message-Id; bh=s55fUdTqNzplFbjzIGs4Gnd7+1teVplikPNIHmmMuq4=; b=aeSRsLr3Ub2XZwVTyHZsQ3AVqEGtOx5vELVS63pLmOJpdi60+uImORD4Kr/zEJBv jAIYEIdMC6QVbII/NYk0bkRPtNzb6rME1gxmwlNAtaGHY46UWWBipCKfQ7PiK8xB1fK IIQWC6Y+MPqg3RxwehHUal1v8PdnoO4+vVlNpJUA= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/simple; s=6gbrjpgwjskckoa6a5zn6fwqkn67xbtw; d=amazonses.com; t=1676842694; h=Subject:From:To:Cc:Date:Mime-Version:Content-Type:Content-Transfer-Encoding:References:Message-Id:Feedback-ID; bh=s55fUdTqNzplFbjzIGs4Gnd7+1teVplikPNIHmmMuq4=; b=AMnBf5GV4KHf2jRMa+PL701tDeQtqFWv+9ZsH8sPYrAqhiYCMwul8AdsGuGdERcq 8Zvm7DrlVmJIMlEziwbw/tsxMLCV6L7TXuXH3U0vEPpeSDkvfMJy9VVZUX3XhYs99dB DH+dVM68RaXXcNbsowZici0i6FrSCzyChOdlHVu8= Subject: [PATCH 1/2] [YOCTO #13270] Refactor the docbook-xml recipe to use docbook.org packages rather than hacked up debian package From: =?utf-8?q?Richard_Elberger?= To: =?utf-8?q?openembedded-core=40lists=2Eopenembedded=2Eorg?= Cc: =?utf-8?q?Richard_Elberger?= Date: Sun, 19 Feb 2023 21:38:13 +0000 Mime-Version: 1.0 References: <20230219213807.3415938-1-rich@richelberger.com> X-Mailer: Amazon WorkMail Thread-Index: AQHZRKp3Rd+89yRvQFycCVf28l/dgw== Thread-Topic: [PATCH 1/2] [YOCTO #13270] Refactor the docbook-xml recipe to use docbook.org packages rather than hacked up debian package X-Original-Mailer: git-send-email 2.34.1 X-Wm-Sent-Timestamp: 1676842693 Message-ID: <010001866b9cf531-82d2c73e-d459-4055-93f9-a7c83fcce6f9-000000@email.amazonses.com> Feedback-ID: 1.us-east-1.LF00NED762KFuBsfzrtoqw+Brn/qlF9OYdxWukAhsl8=:AmazonSES X-SES-Outgoing: 2023.02.19-54.240.11.122 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 ; Sun, 19 Feb 2023 21:38:21 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/177391 --- .../docbook-xml/docbook-xml-dtd4_4.5.bb | 74 ++++++++++++------- 1 file changed, 49 insertions(+), 25 deletions(-) --- 2.34.1 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..71aa8c14ec 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,54 @@ 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" -LICENSE = "OASIS" -LIC_FILES_CHKSUM = "file://${WORKDIR}/LICENSE-OASIS;md5=c608985dd5f7f215e669e7639a0b1d2e" +inherit allarch +BBCLASSEXTEND = "native" -# 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 packages at https://docbook.org/xml/ +# +# These packages are available as source but it requires the ability +# to use the Gradle build system to do so. It might be safer to use +# the source tree which would also enable proper SBOM generation +# through the bitbake build system. https://github.com/docbook/docbook +# -SRC_URI[md5sum] = "487b4d44e15cffb1f4048af23f98208e" -SRC_URI[sha256sum] = "b0f8edcf697f5318e63dd98c9a931f3fee167af0805ba441db372e0f17b2a44f" +S = "${WORKDIR}" -UPSTREAM_CHECK_URI = "${DEBIAN_MIRROR}/main/d/docbook-xml/" +SRC_URI += "https://docbook.org/xml/4.1.2/docbkx412.zip;name=payload412;subdir=docbook-xml-4.1.2" +SRC_URI[payload412.md5sum] = "900d7609fb7e6d78901b357e4acfbc17" +SRC_URI[payload412.sha256sum] = "30f0644064e0ea71751438251940b1431f46acada814a062870f486c772e7772" -S = "${WORKDIR}/docbook-xml-4.5.c31424" +SRC_URI += "https://docbook.org/xml/4.2/docbook-xml-4.2.zip;name=payload42;subdir=docbook-xml-4.2" +SRC_URI[payload42.md5sum] = "73fe50dfe74ca631c1602f558ed8961f" +SRC_URI[payload42.sha256sum] = "acc4601e4f97a196076b7e64b368d9248b07c7abf26b34a02cca40eeebe60fa2" -inherit allarch -BBCLASSEXTEND = "native" +SRC_URI += "https://docbook.org/xml/4.3/docbook-xml-4.3.zip;name=payload43;subdir=docbook-xml-4.3" +SRC_URI[payload43.md5sum] = "ab200202b9e136a144db1e0864c45074" +SRC_URI[payload43.sha256sum] = "23068a94ea6fd484b004c5a73ec36a66aa47ea8f0d6b62cc1695931f5c143464" + +SRC_URI += "https://docbook.org/xml/4.4/docbook-xml-4.4.zip;name=payload44;subdir=docbook-xml-4.4" +SRC_URI[payload44.md5sum] = "cbb04e9a700955d88c50962ef22c1634" +SRC_URI[payload44.sha256sum] = "02f159eb88c4254d95e831c51c144b1863b216d909b5ff45743a1ce6f5273090" + +SRC_URI += "https://docbook.org/xml/${PV}/docbook-xml-${PV}.zip;name=payloadPV;subdir=docbook-xml-${PV}" +SRC_URI[payloadPV.md5sum] = "03083e288e87a7e829e437358da7ef9e" +SRC_URI[payloadPV.sha256sum] = "4e4e037a2b83c98c6c94818390d4bdd3f6e10f6ec62dd79188594e26190dc7b4" + +# 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" +SRC_URI += "file://LICENSE-OASIS" do_configure (){ : @@ -34,19 +58,19 @@ do_compile (){ : } +inherit xmlcatalog + 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 + cp -v -R docbook-xml-$DTDVERSION/* ${D}$DEST + xmlcatalog --verbose --noout --add nextCatalog unused \ + file://$DEST/catalog.xml ${D}${sysconfdir}/xml/docbook-xml.xml done } -XMLCATALOGS = "${sysconfdir}/xml/docbook-xml.xml" -inherit xmlcatalog - FILES:${PN} = "${datadir}/* ${sysconfdir}/xml/docbook-xml.xml"