mbox series

[bug#63081,0/8] Comprehensive DocBook refactoring.

Message ID cover.1682469248.git.mirai@makinata.eu
Headers show
Series Comprehensive DocBook refactoring. | expand

Message

Bruno Victal April 26, 2023, 12:52 a.m. UTC
Notable changes:
* Fixes profile conflicts for docbook-xml packages by using versioned paths.
* Implements the path convention used by NixOS for docbook-xml 4.x packages,
this allows for packages that use cmake to search for these files (such as kdoctools)
to work correctly without having to patch the sources.
* Stores the schema files correctly rather than lumping it all within …/dtd/.
* Source fetching methods were reviewed and were fixed where incorrect. (docbook-xml-5.1)
* Unbundles binary leftovers in docbook-xsl-1.79.1 packages.
* Removes executable permissions for SGML DTDs.
* Uses proper tools to manipulate XML instead of substitute*.
* Uses sxml instead of representing XML as a string.
* Fixes tests for docbook-xsl.
* Uses copy-build-system over trivial-build-system.
* Modernizes the style used for the package definitions.


It is hoped that these patches will substantially reduce the amount of
source patching done in guix and solve obscure build failures.

This patch-series is “Core-Updates” material, it will trigger mass rebuilds.


Bruno Victal (8):
  gnu: docbook-xml: Fix installation paths.
  gnu: Add docbook-xml-5.0.1.
  gnu: docbook-xsl: Refactor package.
  gnu: docbook-xsl-1.79.1: Refactor package.
  gnu: docbook-utils: Refactor package.
  gnu: docbook: Refactor docbook-sgml packages.
  gnu: docbook: Refactor dblatex packages.
  gnu: docbook-dsssl: Switch to copy-build-system.

 gnu/packages/docbook.scm | 875 +++++++++++++++++++++++----------------
 1 file changed, 507 insertions(+), 368 deletions(-)


base-commit: 8093c6ba21c51efe901ba98ce698c545bf13dcd0

Comments

Maxim Cournoyer July 27, 2023, 4:21 p.m. UTC | #1
Hi,

Bruno Victal <mirai@makinata.eu> writes:

> Notable changes:
> * Fixes profile conflicts for docbook-xml packages by using versioned paths.
> * Implements the path convention used by NixOS for docbook-xml 4.x packages,
> this allows for packages that use cmake to search for these files (such as kdoctools)
> to work correctly without having to patch the sources.
> * Stores the schema files correctly rather than lumping it all within …/dtd/.
> * Source fetching methods were reviewed and were fixed where incorrect. (docbook-xml-5.1)
> * Unbundles binary leftovers in docbook-xsl-1.79.1 packages.
> * Removes executable permissions for SGML DTDs.
> * Uses proper tools to manipulate XML instead of substitute*.
> * Uses sxml instead of representing XML as a string.
> * Fixes tests for docbook-xsl.
> * Uses copy-build-system over trivial-build-system.
> * Modernizes the style used for the package definitions.

I've applied this locally on core-updates and made some cosmetic
changes, but attempting to build the various touched packages led to
this newly introduced elogind failure:

--8<---------------cut here---------------start------------->8---
CMakeFiles/LLVMObjectYAML.dir/yaml2obj.cpp.o
 --xinclude --maxdepth 9000 --stringparam man.output.quietly 1 --stringparam funcsynopsis.style ansi --stringparam man.authors.section.enabled 0 --stringparam man.copyright.section.enabled 0 --stringparam elogind.version 246.10 --path /tmp/guix-build-elogind-246.10.drv-0/build/man:/tmp/guix-build-elogind-246.10.drv-0/source/man ../source/man/custom-man.xsl ../source/man/sd_bus_add_object.xml
I/O error : Attempt to load network entity http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd
../source/man/sd_bus_add_object.xml:3: 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">
                                                           ^
I/O error : Attempt to load network entity http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd
../source/man/sd_bus_add_match.xml:3: 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">
                                                           ^
I/O error : Attempt to load network entity http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd
../source/man/libelogind-pkgconfig.xml:3: warning: failed to load external entity "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd"
  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
                                                           ^
../source/man/sd_bus_add_match.xml:157: element include: XInclude error : could not load ../source/man/libelogind-pkgconfig.xml, and no fallback was found
../source/man/sd_bus_add_object.xml:44: element include: XInclude error : could not load ../source/man/sd_bus_add_match.xml, and no fallback was found
I/O error : Attempt to load network entity http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd
../source/man/libelogind-pkgconfig.xml:3: warning: failed to load external entity "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd"
  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
                                                           ^
[339/540] Generating man/pam_elogind.8 with a custom command
I/O error : Attempt to load network entity http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd
../source/man/pam_elogind.xml:3: 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">
                                                           ^
Note: namesp. add : added namespace before processing              pam_elogind
[340/540] Generating man/sd_bus_add_node_enumerator.3 with a custom command
I/O error : Attempt to load network entity http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd
../source/man/sd_bus_add_node_enumerator.xml:3: 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">
                                                           ^
I/O error : Attempt to load network entity http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd
../source/man/libelogind-pkgconfig.xml:3: warning: failed to load external entity "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd"
  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
                                                           ^
Note: namesp. add : added namespace before processing              sd_bus_add_node_enumerator
[341/540] Linking target pam_elogind.so
[342/540] Linking target src/shared/libelogind-shared-246.10.so
ninja: build stopped: subcommand failed.
error: in phase 'build': uncaught exception:
%exception #<&invoke-error program: "ninja" arguments: ("-j" "24") exit-status: 1 term-signal: #f stop-signal: #f> 
phase `build' failed after 12.5 seconds
command "ninja" "-j" "24" failed with status 1
builder for `/gnu/store/836v9khss2hdrzqwwwxm3856la5agzl2-elogind-246.10.drv' failed with exit code 1
@ build-failed /gnu/store/836v9khss2hdrzqwwwxm3856la5agzl2-elogind-246.10.drv - 1 builder for `/gnu/store/836v9khss2hdrzqwwwxm3856la5agzl2-elogind-246.10.drv' failed with exit code 1
--8<---------------cut here---------------end--------------->8---

Would you have an idea of what went wrong here?
Maxim Cournoyer Aug. 10, 2023, 2:10 p.m. UTC | #2
Hello Bruno,

Bruno Victal <mirai@makinata.eu> writes:

> Notable changes:
> * Fixes profile conflicts for docbook-xml packages by using versioned paths.
> * Implements the path convention used by NixOS for docbook-xml 4.x packages,
> this allows for packages that use cmake to search for these files (such as kdoctools)
> to work correctly without having to patch the sources.
> * Stores the schema files correctly rather than lumping it all within …/dtd/.
> * Source fetching methods were reviewed and were fixed where incorrect. (docbook-xml-5.1)
> * Unbundles binary leftovers in docbook-xsl-1.79.1 packages.
> * Removes executable permissions for SGML DTDs.
> * Uses proper tools to manipulate XML instead of substitute*.
> * Uses sxml instead of representing XML as a string.
> * Fixes tests for docbook-xsl.
> * Uses copy-build-system over trivial-build-system.
> * Modernizes the style used for the package definitions.

I've applied it to core-updates, with some light edits.  If you know of
any packages that could be streamlined thanks to it, please send patches
doing so, marked for core-updates.

Closing for now,