Bug 181624

Summary: Fix port: textproc/docbook-420 dependencies are incorrectly expressed
Product: Ports & Packages Reporter: Chris Rees <crees>
Component: Individual Port(s)Assignee: Chris Rees <crees>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Latest   
Hardware: Any   
OS: Any   

Description Chris Rees freebsd_committer freebsd_triage 2013-08-28 18:10:00 UTC
	http://www.bayofrum.net/medusa/tinderlogs/9.1-local-20130828122206/docbook-4.2.log

	When installing docbook-420 it depends on an unzip executable, which is found a /usr/bin/unzip, but it actually uses UNZIP_CMD, which is defined in bsd.commands.mk as ${LOCALBASE}/bin/unzip.

	Also, we do not mute installation commands.

	While here, remove useless check for directory's existence (mkdir -p does not complain if it exists).

Fix: 

-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.--gBUhsn1zkIjdvRhIco7BpjttKa3sa806KaiBd3Kihes3MMYd
Content-Type: text/plain; name="docbook-420-dependencies.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename="docbook-420-dependencies.diff"

Index: Makefile
===================================================================
--- Makefile	(revision 325543)
+++ Makefile	(working copy)
@@ -1,12 +1,5 @@
-# New ports collection makefile for:	docbook-420
-# Date created:		29 Oct 2003
-# Whom:			kutulu
-#
-# Based on murray's docbook-410 port
-#     which is based on niks' docbook-310 port
-#
+# Created by: kutulu
 # $FreeBSD$
-#
 
 PORTNAME=	docbook
 PORTVERSION=	4.2
@@ -20,7 +13,8 @@
 RUN_DEPENDS=	${ISOCAT}:${PORTSDIR}/textproc/iso8879 \
 		${XMLCATMGR}:${PORTSDIR}/textproc/xmlcatmgr
 
-BUILD_DEPENDS=	unzip:${PORTSDIR}/archivers/unzip
+BUILD_DEPENDS=	${UNZIP_CMD}:${PORTSDIR}/archivers/unzip
+INSTALL_DEPENDS=${UNZIP_CMD}:${PORTSDIR}/archivers/unzip
 USE_ZIP=	yes
 NO_MTREE=	yes
 NO_BUILD=	yes
@@ -38,11 +32,11 @@
 LATEST_LINK=	docbook-420
 
 pre-su-install:
-	@[ -d ${INSTDIR}/${PORTVERSION} ] || ${MKDIR} ${INSTDIR}/${PORTVERSION}
+	${MKDIR} ${INSTDIR}/${PORTVERSION}
 
 do-install:
-	@${UNZIP_CMD} ${EXTRACT_BEFORE_ARGS} ${DISTDIR}/${DISTFILES} -d ${INSTDIR}/${PORTVERSION}
-	@${INSTALL_DATA} ${FILESDIR}/catalog ${INSTDIR}/${PORTVERSION}/catalog
+	${UNZIP_CMD} ${EXTRACT_BEFORE_ARGS} ${DISTDIR}/${DISTFILES} -d ${INSTDIR}/${PORTVERSION}
+	${INSTALL_DATA} ${FILESDIR}/catalog ${INSTDIR}/${PORTVERSION}/catalog
 	@${ECHO_CMD} "CATALOG \"${ISOCAT}\"" >> ${INSTDIR}/${PORTVERSION}/catalog
 	@${CHMOD} ${SHAREMODE} ${INSTDIR}/${PORTVERSION}/*
 	@${CHOWN} -R ${SHAREOWN}:${SHAREGRP} ${INSTDIR}
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2013-08-28 18:10:21 UTC
State Changed
From-To: open->feedback

Awaiting maintainers feedback (via the GNATS Auto Assign Tool)
Comment 2 Edwin Groothuis freebsd_committer freebsd_triage 2013-08-28 18:10:21 UTC
Maintainer of textproc/docbook-420,

Please note that PR ports/181624 has just been submitted.

If it contains a patch for an upgrade, an enhancement or a bug fix
you agree on, reply to this email stating that you approve the patch
and a committer will take care of it.

The full text of the PR can be found at:
    http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/181624

-- 
Edwin Groothuis via the GNATS Auto Assign Tool
edwin@FreeBSD.org
Comment 3 Chris Rees freebsd_committer freebsd_triage 2013-08-28 18:41:30 UTC
Responsible Changed
From-To: freebsd-ports-bugs->crees

Mine.
Comment 4 dfilter service freebsd_committer freebsd_triage 2013-10-01 13:35:42 UTC
Author: crees
Date: Tue Oct  1 12:35:34 2013
New Revision: 328943
URL: http://svnweb.freebsd.org/changeset/ports/328943

Log:
  This port depended on unzip, but used ${UNZIP_CMD}, thus breaking systems that
  do not have archivers/unzip installed.  Perhaps the correct fix is in
  bsd.commands.mk...
  
  PR:		ports/181624
  Approved by:	maintainer timeout (kutulu@kutulu.org, 4 weeks)

Modified:
  head/textproc/docbook-420/Makefile

Modified: head/textproc/docbook-420/Makefile
==============================================================================
--- head/textproc/docbook-420/Makefile	Tue Oct  1 12:33:57 2013	(r328942)
+++ head/textproc/docbook-420/Makefile	Tue Oct  1 12:35:34 2013	(r328943)
@@ -35,7 +35,7 @@ pre-su-install:
 	@[ -d ${INSTDIR}/${PORTVERSION} ] || ${MKDIR} ${INSTDIR}/${PORTVERSION}
 
 do-install:
-	@${UNZIP_CMD} ${EXTRACT_BEFORE_ARGS} ${DISTDIR}/${DISTFILES} -d ${INSTDIR}/${PORTVERSION}
+	@unzip ${EXTRACT_BEFORE_ARGS} ${DISTDIR}/${DISTFILES} -d ${INSTDIR}/${PORTVERSION}
 	@${INSTALL_DATA} ${FILESDIR}/catalog ${INSTDIR}/${PORTVERSION}/catalog
 	@${ECHO_CMD} "CATALOG \"${ISOCAT}\"" >> ${INSTDIR}/${PORTVERSION}/catalog
 	@${CHMOD} ${SHAREMODE} ${INSTDIR}/${PORTVERSION}/*
_______________________________________________
svn-ports-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-ports-all
To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
Comment 5 Chris Rees freebsd_committer freebsd_triage 2013-10-01 13:35:50 UTC
State Changed
From-To: feedback->closed

Committed. Thanks!
Comment 6 Chris Rees freebsd_committer freebsd_triage 2013-10-01 20:31:13 UTC
State Changed
From-To: closed->feedback

Actually, after ak@ pointed out that base unzip isn't perfect, I have 
converted the port to stage, and doing the extraction in the appropriate 
place.  Please review: 
http://www.bayofrum.net/~crees/patches/docbook-420-stage.diff
Comment 7 dfilter service freebsd_committer freebsd_triage 2013-12-21 16:58:01 UTC
Author: crees
Date: Sat Dec 21 16:57:53 2013
New Revision: 337154
URL: http://svnweb.freebsd.org/changeset/ports/337154

Log:
  Stagify and correct extraction.
  
  PR:		ports/181624
  Submitted by:	crees
  Approved by:	maintainer timeout (kutulu@kutulu.org, 5 months)

Added:
  head/textproc/docbook-420/files/catalog.in
     - copied, changed from r337153, head/textproc/docbook-420/files/catalog
Deleted:
  head/textproc/docbook-420/files/catalog
Modified:
  head/textproc/docbook-420/Makefile

Modified: head/textproc/docbook-420/Makefile
==============================================================================
--- head/textproc/docbook-420/Makefile	Sat Dec 21 16:52:11 2013	(r337153)
+++ head/textproc/docbook-420/Makefile	Sat Dec 21 16:57:53 2013	(r337154)
@@ -5,43 +5,39 @@ PORTNAME=	docbook
 PORTVERSION=	4.2
 CATEGORIES=	textproc
 MASTER_SITES=	http://www.docbook.org/sgml/4.2/
-EXTRACT_ONLY=	# empty
 
 MAINTAINER=	kutulu@kutulu.org
 COMMENT=	V4.2 of the DocBook DTD, designed for technical documentation
 
+EXTRACT_DEPENDS=${UNZIP_CMD}:${PORTSDIR}/archivers/unzip
 RUN_DEPENDS=	${ISOCAT}:${PORTSDIR}/textproc/iso8879 \
 		${XMLCATMGR}:${PORTSDIR}/textproc/xmlcatmgr
 
-BUILD_DEPENDS=	unzip:${PORTSDIR}/archivers/unzip
 USE_ZIP=	yes
 NO_MTREE=	yes
 NO_BUILD=	yes
-NO_WRKSUBDIR=	yes
 PLIST_SUB=	DTD_NAME=${PORTNAME}
 PLIST_SUB+=	DTD_VERSION=${PORTVERSION}
 PLIST_SUB+=	XMLCATMGR=${XMLCATMGR}
 PLIST_SUB+=	CATALOG_PORTS_SGML=${CATALOG_PORTS_SGML}
+SUB_FILES+=	catalog
+SUB_LIST+=	ISOCAT=${ISOCAT}
 
-INSTDIR=	${PREFIX}/share/sgml/docbook
-ISOCAT=		${PREFIX}/share/sgml/iso8879/catalog
+INSTDIR=	${STAGEDIR}${PREFIX}/share/sgml/docbook
+ISOCAT=		${LOCALBASE}/share/sgml/iso8879/catalog
 XMLCATMGR=	${LOCALBASE}/bin/xmlcatmgr
-CATALOG_PORTS_SGML=	${PREFIX}/share/sgml/catalog.ports
+CATALOG_PORTS_SGML=	${LOCALBASE}/share/sgml/catalog.ports
 
 LATEST_LINK=	docbook-420
 
-NO_STAGE=	yes
-pre-su-install:
-	@[ -d ${INSTDIR}/${PORTVERSION} ] || ${MKDIR} ${INSTDIR}/${PORTVERSION}
+do-extract:
+	${MKDIR} ${WRKSRC}
+	${UNZIP_CMD} ${EXTRACT_BEFORE_ARGS} ${DISTDIR}/${DISTFILES} \
+		-d ${WRKSRC}
 
 do-install:
-	@unzip ${EXTRACT_BEFORE_ARGS} ${DISTDIR}/${DISTFILES} -d ${INSTDIR}/${PORTVERSION}
-	@${INSTALL_DATA} ${FILESDIR}/catalog ${INSTDIR}/${PORTVERSION}/catalog
-	@${ECHO_CMD} "CATALOG \"${ISOCAT}\"" >> ${INSTDIR}/${PORTVERSION}/catalog
-	@${CHMOD} ${SHAREMODE} ${INSTDIR}/${PORTVERSION}/*
-	@${CHOWN} -R ${SHAREOWN}:${SHAREGRP} ${INSTDIR}
-
-post-install:
-	@-${XMLCATMGR} -sc ${CATALOG_PORTS_SGML} add CATALOG ${PORTNAME}/${PORTVERSION}/catalog
+	@${MKDIR} ${INSTDIR}/${PORTVERSION}
+	${INSTALL_DATA} ${WRKSRC}/* ${WRKDIR}/catalog \
+		${INSTDIR}/${PORTVERSION}/
 
 .include <bsd.port.mk>

Copied and modified: head/textproc/docbook-420/files/catalog.in (from r337153, head/textproc/docbook-420/files/catalog)
==============================================================================
--- head/textproc/docbook-420/files/catalog	Sat Dec 21 16:52:11 2013	(r337153, copy source)
+++ head/textproc/docbook-420/files/catalog.in	Sat Dec 21 16:57:53 2013	(r337154)
@@ -83,3 +83,5 @@ PUBLIC "ISO 8879:1986//ENTITIES Non-Russ
 
   -- End of catalog data for DocBook V4.2 ................................. --
   -- ...................................................................... --
+
+CATALOG "%%ISOCAT%%"
_______________________________________________
svn-ports-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-ports-all
To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
Comment 8 Chris Rees freebsd_committer freebsd_triage 2013-12-21 16:58:07 UTC
State Changed
From-To: feedback->closed

Committed. Thanks!