Opened 15 years ago

Closed 14 years ago

#19784 closed defect (duplicate)

missing docbook-xml catalog entry causes policykit 0.9 to fail while making doc

Reported by: jim@… Owned by: boeyms@…
Priority: Normal Milestone:
Component: ports Version: 1.7.1
Keywords: Cc:
Port: docbook-xsl

Description

This looks like a bug in the source which could be patched; in the <builddir>/doc/man, lines 556-557 of Makefile.in are:

@MAN_PAGES_ENABLED_TRUE@%.1 %.5 %.8 : %.xml
@MAN_PAGES_ENABLED_TRUE@        $(XSLTPROC) -nonet http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $<

It's the -nonet option that's killing things; not only should it be --nonet (double-dash), it also seems kinda silly to specify an HTTP URL as the stylesheet, then tell xsltproc "oh, and don't use the internet to fetch that, now, got it?"

I just removed the '-nonet' from /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_security_policykit/work/PolicyKit-0.9/doc/man/Makefile and everything went peachy.

Attachments (2)

policykit.patch (2.9 KB) - added by jim@… 15 years ago.
Creates files/patch-doc-man-Makefile.{am,in}.diff and patches Portfile to use them
catalog (784 bytes) - added by jim@… 15 years ago.

Download all attachments as: .zip

Change History (11)

Changed 15 years ago by jim@…

Attachment: policykit.patch added

Creates files/patch-doc-man-Makefile.{am,in}.diff and patches Portfile to use them

comment:1 in reply to:  description Changed 15 years ago by raimue (Rainer Müller)

Replying to jim@…:

It's the -nonet option that's killing things; not only should it be --nonet (double-dash), it also seems kinda silly to specify an HTTP URL as the stylesheet, then tell xsltproc "oh, and don't use the internet to fetch that, now, got it?"

It will use a local version if found in the catalog file even though you specify an URL. Entries in the catalog file are referenced by an URL, that is why it is using an URL here. Often the stylesheet is not even available at that URL. As far as I know, this is the recommended way to do it. The --nonet switch avoids downloading the stylesheet, but use the local copy instead. It would be wrong to require web access during build.

Did you experience a build error? There might be a problem with your xml catalog file.

comment:2 Changed 15 years ago by jim@…

I did experience a build error. It looked like:

> sudo port install policykit
--->  Building policykit
Error: Target org.macports.build returned: shell command " cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_security_policykit/work/PolicyKit-0.9" && make all " returned error 2
Command output: make  all-recursive
Making all in data
make[2]: Nothing to be done for `all'.
Making all in src
Making all in kit
make[3]: Nothing to be done for `all'.
Making all in polkit
make[3]: Nothing to be done for `all'.
Making all in polkit-dbus
make[3]: Nothing to be done for `all'.
Making all in polkit-grant
make[3]: Nothing to be done for `all'.
make[3]: Nothing to be done for `all-am'.
Making all in polkitd
make  all-am
make[3]: Nothing to be done for `all-am'.
Making all in doc
Making all in man
/opt/local/bin/xsltproc -nonet http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl polkit-auth.xml
I/O error : Attempt to load network entity http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl
warning: failed to load external entity "http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl"
cannot parse http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl
make[3]: *** [polkit-auth.1] Error 4
make[2]: *** [all-recursive] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2

Error: Status 1 encountered during processing.

Fetching the file via curl worked, so I patched as attached. If there's a good way to detect/repair the breakage, it'd be nice if we hint it to the user.

I'll attach my /opt/local/etc/xml/catalog for examination.

Changed 15 years ago by jim@…

Attachment: catalog added

comment:3 Changed 15 years ago by jmroot (Joshua Root)

If you search trac, there are some other tickets where docbook-xsl or docbook-xml doesn't seem to be found in the catalog and something attempts to download it.

comment:4 Changed 15 years ago by raimue (Rainer Müller)

docbook-xsl is missing from your catalog file. One solution would be to reinstall docbook-xsl. Or you could try to fix it manually:

xmlcatmgr add nextCatalog /opt/local/share/xsl/docbook-xsl/catalog.xml

comment:5 Changed 15 years ago by jim@…

Much better solution. Uninstalling and reinstalling docbook-xsl 1.75.0 (and uninstalling 1.74.0, which was there but deactivated) made it all better.

Thanks!

comment:6 Changed 15 years ago by dbevans (David B. Evans)

Port: docbook-xsl added; policykit removed

comment:7 Changed 15 years ago by dbevans (David B. Evans)

Owner: changed from macports-tickets@… to boeyms@…
Summary: policykit 0.9 fails while making docmissing docbook-xml catalog entry causes policykit 0.9 to fail while making doc

I note that the post-activate message in docbook-xml advises to manually remove this catalog entry when uninstalling docbook-xml using this command

xmlcatmgr remove nextCatalog ${prefix}/${instxsldir}/catalog.xml

Is it possible that this is being done inappropriately? That is after install rather than uninstall?

Since this seems to be a possible problem upgrading docbook-xml, assigning to that ports maintainer to investigate further.

comment:8 Changed 14 years ago by dbevans (David B. Evans)

Cc: devans@… removed

comment:9 Changed 14 years ago by jmroot (Joshua Root)

Resolution: duplicate
Status: newclosed

Duping to the more general #26151.

Note: See TracTickets for help on using tickets.