Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 15 Aug 2011 11:29:42 +0200 (CEST)
From:      Romain Tartière <romain@FreeBSD.org>
To:        FreeBSD-gnats-submit@FreeBSD.org
Cc:        skv@FreeBSD.org
Subject:   ports/159784: [patch] textproc/docbook-xsl does not install smoothly from packages.
Message-ID:  <20110815092942.AD7B51899E@marvin.blogreen.org>
Resent-Message-ID: <201108150930.p7F9UAET020241@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         159784
>Category:       ports
>Synopsis:       [patch] textproc/docbook-xsl does not install smoothly from packages.
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Mon Aug 15 09:30:10 UTC 2011
>Closed-Date:
>Last-Modified:
>Originator:     Romain Tartiere
>Release:        FreeBSD 8.2-STABLE amd64
>Organization:
>Environment:
System: FreeBSD marvin.blogreen.org 8.2-STABLE
>Description:

The files/pkg-install.in script runs %%XMLCATMGR%% at the post install script.
xmlcatmgr(1) is only a build-dependency:

BUILD_DEPENDS=  ${LOCALBASE}/bin/xmlcatmgr:${PORTSDIR}/textproc/xmlcatmgr

If installed as a package, the script may not work correctly because
xmlcatmgr(1) may not be available.

>How-To-Repeat:

If a user creates a package for docbook-xsl on a system and install this
package on another system, the setup on the second system will be incmomplete
if xmlcatmgr(1) is not installed there, e.g.

------------------------------------------8<---------------------------------
===>   Installing existing package /usr/ports/packages/All/docbook-xsl-1.75.2_1.tbz
./+INSTALL: /usr/local/bin/xmlcatmgr: not found
./+INSTALL: /usr/local/bin/xmlcatmgr: not found
./+INSTALL: /usr/local/bin/xmlcatmgr: not found
./+INSTALL: /usr/local/bin/xmlcatmgr: not found
./+INSTALL: /usr/local/bin/xmlcatmgr: not found
./+INSTALL: /usr/local/bin/xmlcatmgr: not found
./+INSTALL: /usr/local/bin/xmlcatmgr: not found
[...]
------------------------------------------8<---------------------------------

This is basically what happen when using build systems and trying to compile
textproc/xmlto after only this ports dependency using packages:

------------------------------------------8<---------------------------------
===>  Building for xmlto-0.0.24
make  all-am
depbase=`echo xmlif/xmlif.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`; cc -DHAVE_CONFIG_H -I.      -O2 -pipe -fno-strict-aliasing -MT xmlif/xmlif.o -MD -MP -MF $depbase.Tpo -c -o xmlif/xmlif.o xmlif/xmlif.c && mv -f $depbase.Tpo $depbase.Po
cc  -O2 -pipe -fno-strict-aliasing   -o xmlif/xmlif xmlif/xmlif.o  
for xml in xmlif.xml xmlto.xml; do  FORMAT_DIR=./format  /usr/local/bin/bash ./xmlto -o man/man1 man ./doc/$xml ;  done || ( RC=$?; exit $RC )
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"
compilation error: file /tmp/xmlto-xsl.fmVk3K line 4 element import
xsl:import : unable to load http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl
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"
compilation error: file /tmp/xmlto-xsl.RO2DwP line 4 element import
xsl:import : unable to load http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl
*** Error code 1
------------------------------------------8<---------------------------------

Hint from docbook-xsl's post-install script:
------------------------------------------8<---------------------------------
 28         %%XMLCATMGR%% -c "${CATALOG_XSL}" add rewriteSystem \
 29                 http://docbook.sourceforge.net/release/xsl/$version \
 30                 "file://${XSL_DIR}"
 31         %%XMLCATMGR%% -c "${CATALOG_XSL}" add rewriteURI \
 32                 http://docbook.sourceforge.net/release/xsl/$version \
 33                 "file://${XSL_DIR}"
------------------------------------------8<---------------------------------

>Fix:

Adding xmlcatmgr as a RUN_DEPENDS do the trick.  


--- docbook-xsl.patch begins here --- 
--- /usr/ports/textproc/docbook-xsl/Makefile    2010-11-22 03:13:52.000000000 +0100
+++ Makefile    2011-08-15 11:23:30.286645641 +0200
@@ -17,7 +17,8 @@
 COMMENT=       XSL DocBook stylesheets
 
 BUILD_DEPENDS= ${LOCALBASE}/bin/xmlcatmgr:${PORTSDIR}/textproc/xmlcatmgr
-RUN_DEPENDS=   docbook>=0:${PORTSDIR}/textproc/docbook
+RUN_DEPENDS=   ${LOCALBASE}/bin/xmlcatmgr:${PORTSDIR}/textproc/xmlcatmgr \
+               docbook>=0:${PORTSDIR}/textproc/docbook
 
 .if !defined(NOPORTDOCS)
 DISTFILES+=    ${PORTNAME}-doc-${PORTVERSION}${EXTRACT_SUFX}:doc
--- docbook-xsl.patch ends here --- 


>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20110815092942.AD7B51899E>