Skip to contentSkip to conversation

Refactor the docbook-xml recipe to use docbook.org packages rather than hacked up debian package

PATCH In review Richard Elberger 4 participants 9 messages Feb 19, 2023 – Feb 22, 2023 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

PATCH 1/2 Refactor the docbook-xml recipe to use docbook.org packages rather than hacked up debian package

---
 .../docbook-xml/docbook-xml-dtd4_4.5.bb       | 74 ++++++++++++-------
 1 file changed, 49 insertions(+), 25 deletions(-)
meta/recipes-devtools/docbook-xml/docbook-xml-dtd4_4.5.bb +49 -25
index 2bec1442af..71aa8c14ec 100644
@@ -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"
Signature · 1 line
2.34.1
#2 lore raw

Please squash the two commits into one.

Alex

Quoted 122 lines · Richard Elberger
---
 .../docbook-xml/docbook-xml-dtd4_4.5.bb       | 74 ++++++++++++-------
 1 file changed, 49 insertions(+), 25 deletions(-)
meta/recipes-devtools/docbook-xml/docbook-xml-dtd4_4.5.bb +49 -26
index 2bec1442af..71aa8c14ec 100644
@@ -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"
--

2.34.1

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#177391): https://lists.openembedded.org/g/openembedded-core/message/177391
Mute This Topic: https://lists.openembedded.org/mt/97074292/1686489
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

#3 lore raw
In reply to Richard Elberger

Hi Richard,

Thanks for the patch!

There are a few things that need tweaking. Firstly, the shortlog and commit log aren't quite right. The shortlog needs to be along the lines of:

<area/recipename>: <short summary of the change>

so something like:

docbook-xml: Switch from debian packages to upstream docbook sources

This means someone glancing at the shortlogs can know which area it applies to and what it was about (in summary).

After this you'd have a more verbose log message and I usually put the [YOCTO #13270] at the end on a line of it's own.

I've commented a little more below inline.

I think 4.0 support was removed, if so, that should be mentioned in the commit message log. I then noticed the note about that is in the other commit, it should be in this one!

Quoted 12 lines · Richard Elberger
---
 .../docbook-xml/docbook-xml-dtd4_4.5.bb       | 74 ++++++++++++-------
 1 file changed, 49 insertions(+), 25 deletions(-)
meta/recipes-devtools/docbook-xml/docbook-xml-dtd4_4.5.bb +0 -1
index 2bec1442af..71aa8c14ec 100644
@@ -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 \

meta/recipes-devtools/docbook-xml/docbook-xml-dtd4_4.5.bb line 7

Quoted 10 lines
meta/recipes-devtools/docbook-xml/docbook-xml-dtd4_4.5.bb +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"

BBCLASSEXTEND by concention is at the end of the recipe. I see it moves in the second patch and it wasn't clear what the two different purposes of the patch were. Style fixes are ok as patch but if the first patch is introducing them, we may as well squash things?

Quoted 10 lines
meta/recipes-devtools/docbook-xml/docbook-xml-dtd4_4.5.bb +2 -7
-# 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

meta/recipes-devtools/docbook-xml/docbook-xml-dtd4_4.5.bb line 20

Quoted 10 lines
meta/recipes-devtools/docbook-xml/docbook-xml-dtd4_4.5.bb +10 -0
+# 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

"packages" is an overloaded term. Do you mean packages here? Components maybe?

meta/recipes-devtools/docbook-xml/docbook-xml-dtd4_4.5.bb line 26

Quoted 9 lines
meta/recipes-devtools/docbook-xml/docbook-xml-dtd4_4.5.bb +4 -3
+# 
 
-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"

We've effectively dropped md5sums so there is no need to add new ones.

Cheers,

Richard

#4 lore raw

Thank you for the additional tips. This morning I was trying to close out the asks from yesterday. I was about to submit yet again and then I saw your message :D. I will need to try to get to the additional asks this evening instead given the workday is about to begin full on.

Quoted 89 lines · Richard Purdie

Hi Richard,

Thanks for the patch!

There are a few things that need tweaking. Firstly, the shortlog and commit log aren't quite right. The shortlog needs to be along the lines of:

<area/recipename>: <short summary of the change>

so something like:

docbook-xml: Switch from debian packages to upstream docbook sources

This means someone glancing at the shortlogs can know which area it applies to and what it was about (in summary).

After this you'd have a more verbose log message and I usually put the [YOCTO #13270] at the end on a line of it's own.

I've commented a little more below inline.

I think 4.0 support was removed, if so, that should be mentioned in the commit message log. I then noticed the note about that is in the other commit, it should be in this one!

Quoted 12 lines · Richard Elberger
---
  .../docbook-xml/docbook-xml-dtd4_4.5.bb       | 74 ++++++++++++-------
  1 file changed, 49 insertions(+), 25 deletions(-)
meta/recipes-devtools/docbook-xml/docbook-xml-dtd4_4.5.bb +0 -1
index 2bec1442af..71aa8c14ec 100644
@@ -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 \

meta/recipes-devtools/docbook-xml/docbook-xml-dtd4_4.5.bb line 7

Quoted 10 lines
meta/recipes-devtools/docbook-xml/docbook-xml-dtd4_4.5.bb +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"

BBCLASSEXTEND by concention is at the end of the recipe. I see it moves in the second patch and it wasn't clear what the two different purposes of the patch were. Style fixes are ok as patch but if the first patch is introducing them, we may as well squash things?

Quoted 9 lines
meta/recipes-devtools/docbook-xml/docbook-xml-dtd4_4.5.bb +2 -7
-# 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

meta/recipes-devtools/docbook-xml/docbook-xml-dtd4_4.5.bb line 20

Quoted 10 lines
meta/recipes-devtools/docbook-xml/docbook-xml-dtd4_4.5.bb +10 -0
+# 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

"packages" is an overloaded term. Do you mean packages here? Components maybe?

meta/recipes-devtools/docbook-xml/docbook-xml-dtd4_4.5.bb line 26

Quoted 9 lines
meta/recipes-devtools/docbook-xml/docbook-xml-dtd4_4.5.bb +4 -3
+#
 
-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"

We've effectively dropped md5sums so there is no need to add new ones.

Cheers,

Richard

#5 lore raw

PATCH 2/2 docbook-xml-dtd: refactor for style, add version check regex

In reply to a message not in the archive

Try to keep everything else the same. Added package version filtering for devtool upgrade check. 4.0 no longer available on docbook.org so removed.

---
 .../docbook-xml/docbook-xml-dtd4_4.5.bb       | 37 +++++++++----------
 1 file changed, 18 insertions(+), 19 deletions(-)
meta/recipes-devtools/docbook-xml/docbook-xml-dtd4_4.5.bb +18 -19
index 71aa8c14ec..f8a5631d77 100644
@@ -3,8 +3,12 @@ DESCRIPTION = "Document type definitions for verification of XML data \
 files against the DocBook rule set."
 HOMEPAGE = "https://docbook.org"
 
-inherit allarch
-BBCLASSEXTEND = "native"
+# 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"
 
 # To support apps with xml schema backward compatibility, we must
 # install a set of schemas. Install the latest based on PV and then
@@ -18,37 +22,32 @@ BBCLASSEXTEND = "native"
 # 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
-# 
+#
 
-S = "${WORKDIR}"
+SRC_URI = "https://docbook.org/xml/4.1.2/docbkx412.zip;name=payload412;subdir=docbook-xml-4.1.2 \
+           https://docbook.org/xml/4.2/docbook-xml-4.2.zip;name=payload42;subdir=docbook-xml-4.2 \
+           https://docbook.org/xml/4.3/docbook-xml-4.3.zip;name=payload43;subdir=docbook-xml-4.3 \
+           https://docbook.org/xml/4.4/docbook-xml-4.4.zip;name=payload44;subdir=docbook-xml-4.4 \
+           https://docbook.org/xml/${PV}/docbook-xml-${PV}.zip;name=payloadPV;subdir=docbook-xml-${PV} \
+           file://LICENSE-OASIS"
 
-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"
-
-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"
-
-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"
+UPSTREAM_CHECK_REGEX = "docbook-xml-(?P<pver>4(\.\d+)).zip"
+
+S = "${WORKDIR}"
+inherit allarch
+BBCLASSEXTEND = "native"
 
 do_configure (){
     :
Signature · 1 line
2.34.1
#6 lore raw

Re: [OE-core] [PATCH 2/2] [YOCTO #13270] docbook-xml-dtd: refactor for style, add version check regex

Sorry, but this doesn’t work:

If you build xmlto-native:

validity error : Could not load the external subset "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"
Document /yocto/ross/build/tmp/work/aarch64-linux/xmlto-native/0.0.28+0.0.29+gitAUTOINC+6fa6a0e076-r0/build/../git/doc/xmlif.xml does not validate

/yocto/ross/build/tmp/work/aarch64-linux/xmlto-native/0.0.28+0.0.29+gitAUTOINC+6fa6a0e076-r0/build/../git/doc/xmlif.xml:4: warning: failed to load external entity "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"

    "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd”>

Ross

#7 lore raw

Re: [OE-core] [PATCH 2/2] [YOCTO #13270] docbook-xml-dtd: refactor for style, add version check regex

Hello Ross,

It wasn't entirely clear to me that the patch would be required if taken from docbook, but I see that my "test scope" was not appropriate and you have surfaced why patching is required. Now that I have a test target this helps but in future I probably should build world but... just tried that and got a gtk4 dependency error.

rpcme@proteus:~/elinux/oe-core/meta/recipes-devtools/docbook-xml$
bitbake world
Loading cache: 100% |#############################################################################################################|
Time: 0:00:00
Loaded 1692 entries from dependency cache.
NOTE: Resolving any missing task queue dependencies
ERROR: Nothing PROVIDES 'gtk4' (but /home/rpcme/elinux/oe-core/meta/recipes-gnome/libportal/libportal_0.6.bb
DEPENDS on or otherwise requires it)
gtk4 was skipped: missing required distro feature 'opengl' (not in
DISTRO_FEATURES)
ERROR: Required build target 'meta-world-pkgdata' has no buildable
providers.
Missing or unbuildable dependency chain was: ['meta-world-pkgdata',
'libportal', 'gtk4']

Given oe-core is distroless (this is my first time not using a distro conf), how best to ensure I'm checking everything I need to check (beyond getting the patch right to make this buildable).

Will do it this evening after normal working hours ... the workday is now in full swing and cannot work on it right now...

Quoted 11 lines · Ross Burton

Sorry, but this doesn’t work:

If you build xmlto-native:

validity error : Could not load the external subset "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"
Document /yocto/ross/build/tmp/work/aarch64-linux/xmlto-native/0.0.28+0.0.29+gitAUTOINC+6fa6a0e076-r0/build/../git/doc/xmlif.xml does not validate

/yocto/ross/build/tmp/work/aarch64-linux/xmlto-native/0.0.28+0.0.29+gitAUTOINC+6fa6a0e076-r0/build/../git/doc/xmlif.xml:4: warning: failed to load external entity "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"

     "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd”>

Ross

#8 lore raw

Re: [OE-core] [PATCH 2/2] [YOCTO #13270] docbook-xml-dtd: refactor for style, add version check regex

Quoted 8 lines · Richard Elberger via lists.openembedded.org

Hello Ross,

It wasn't entirely clear to me that the patch would be required if taken from docbook, but I see that my "test scope" was not appropriate and you have surfaced why patching is required. Now that I have a test target this helps but in future I probably should build world but... just tried that and got a gtk4 dependency error.

My test was to enable the api-documentation DISTRO_FEATURE and then build one of the many recipes that use xmlto (and thus, docbook) to make man pages, such as kmod.

Ross

#9 lore raw

Re: [OE-core] [PATCH 2/2] [YOCTO #13270] docbook-xml-dtd: refactor for style, add version check regex

In reply to Ross Burton

Ross, I found the problem. Since I can't build world I will do best effort and build core-image-minimal through. In the patch I with put comment, with additional explanation in the commit message, about the magic variable. In my opinion a couple lines are misplaced but for sake of not causing a patch domino effect I will revert to the old behavior. I'll let the core group decide if you want to live with it or make a workitem for future effort.

Quoted 11 lines · Ross Burton

Sorry, but this doesn’t work:

If you build xmlto-native:

validity error : Could not load the external subset "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"
Document /yocto/ross/build/tmp/work/aarch64-linux/xmlto-native/0.0.28+0.0.29+gitAUTOINC+6fa6a0e076-r0/build/../git/doc/xmlif.xml does not validate

/yocto/ross/build/tmp/work/aarch64-linux/xmlto-native/0.0.28+0.0.29+gitAUTOINC+6fa6a0e076-r0/build/../git/doc/xmlif.xml:4: warning: failed to load external entity "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"

     "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd”>

Ross