Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

xmlto: use docbook-xml-ns package XSD files (offline mode) #301631

Merged
merged 3 commits into from
Apr 16, 2024

Conversation

anthonyroussel
Copy link
Member

@anthonyroussel anthonyroussel commented Apr 4, 2024

Description of changes

  • Substitute Docbook XSD URLs by docbook-xml-ns package XSD files
    • Required to build documentation of other nixpkgs package relying on gdbus-codegen or xmlto (like realmd)
  • Format with nixfmt-rfc-style
  • Add passthru.tests.version

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 24.05 Release Notes (or backporting 23.05 and 23.11 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

Add a 👍 reaction to pull requests you find important.

@marsam marsam merged commit e442e02 into NixOS:staging Apr 16, 2024
42 checks passed
@alyssais
Copy link
Member

Since c1ae842 ("xmlto: use docbook-xml-ns package XSD files (offline mode)"), the dbus-daemon man page is garbled:

Before:

OPTIONS
       The following options are supported:

       --config-file=FILE
           Use the given configuration file.

       --fork
           Force the message bus to fork and become a daemon, even if the
           configuration file does not specify that it should. In most contexts
           the configuration file already gets this right, though. This option
           is not supported on Windows.

       --nofork
           Force the message bus not to fork and become a daemon, even if the
           configuration file specifies that it should. On Windows, the
           dbus-daemon never forks, so this option is allowed but does nothing.

After:

OPTIONS
       The following options are supported:

         .PP --config-file=FILE

           Use the given configuration file.

             .RE
             .PP --fork

               Force the message bus to fork and become a daemon, even if the
               configuration file does not specify that it should. In most
               contexts the configuration file already gets this right, though.
               This option is not supported on Windows.

                 .RE
                 .PP --nofork

                       Force the message bus not to fork and become a daemon,
                   even if the configuration file specifies that it should. On
                   Windows, the dbus-daemon never forks, so this option is
                   allowed but does nothing.

Any ideas?

jtojnar pushed a commit that referenced this pull request Oct 3, 2024
c1ae842 changed `xmlto` to use docbook stylesheets from the nix store instead of downloading them. However, it used the namespaced version despite the URI being for non-namespaced version, causing problems with generated man pages as reported in #301631 (comment), #299081 (comment), and #339078.

This patch fixes the issue by pointing to `nons` version of the stylesheets.
@jtojnar
Copy link
Member

jtojnar commented Oct 3, 2024

Fixed in 6d24a9c.

I believe we previously relied on findXMLCatalogs setup hook so the file would not be downloaded but it required adding docbook-xsl-nons to every consumer of xmlto, which is probably pointless if every use of xmlto requires it as the name would suggest.

In other toolchains where DocBook is only one of many supported formats and not always used, having it looked up through XML catalog at runtime might be desirable to avoid the hefty 22 MiB build time closure increase in cases that do not need docbook-xsl-nons.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants