Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 12 Jan 2012 10:24:29 GMT
From:      Garrett Cooper <yanegomi@gmail.com>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/164050: Ports fail to compile if unzip is present in the base system and port has EXTRACT_DEPENDS dependent on unzip
Message-ID:  <201201121024.q0CAOTHc006564@red.freebsd.org>
Resent-Message-ID: <201201121030.q0CAUDra010533@freefall.freebsd.org>

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

>Number:         164050
>Category:       ports
>Synopsis:       Ports fail to compile if unzip is present in the base system and port has EXTRACT_DEPENDS dependent on unzip
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Jan 12 10:30:12 UTC 2012
>Closed-Date:
>Last-Modified:
>Originator:     Garrett Cooper
>Release:        9.0-STABLE
>Organization:
iXsystems, Inc.
>Environment:
FreeBSD bayonetta.local 9.0-STABLE FreeBSD 9.0-STABLE #1 r229323M: Mon Jan  2 14:32:54 PST 2012     gcooper@bayonetta.local:/usr/obj/store/freebsd/stable/9/sys/BAYONETTA  amd64
>Description:
Current assumptions in bsd.port.mk assume that unzip will always live in ${LOCALBASE}/bin instead of /usr/bin in certain scenarios. This causes failures in ports that require unzip for the EXTRACT_DEPENDS, similar to the following:

test-1-mgmt# make install
===>  Vulnerability check disabled, database not found
===>  License check disabled, port has not defined LICENSE
===>  Found saved configuration for diablo-jdk-1.5.0.07.01_27
===>  Extracting for diablo-jdk-1.5.0.07.01_28
=> SHA256 Checksum OK for diablo-caffe-freebsd6-amd64-1.5.0_07-b01.tar.bz2.
=> SHA256 Checksum OK for tzupdater-1_3_45-2011n.zip.
===>   diablo-jdk-1.5.0.07.01_28 depends on executable: unzip - found
/usr/local/bin/unzip: No such file or directory
*** Error code 1

Stop in /usr/ports/java/diablo-jdk15.
*** Error code 1

Stop in /usr/ports/java/diablo-jdk15.
test-1-mgmt# which unzip
/usr/bin/unzip

The solution is to check the base system first, then ${LOCALBASE}/bin .
>How-To-Repeat:
1. Install a fresh copy of 9.0-RELEASE.
2. Attempt to install a port that requires unzip in EXTRACT_DEPENDS (e.g. java/diablo-jdk15).
>Fix:


Patch attached with submission follows:

--- Mk/bsd.port.mk	2012-01-12 02:19:49.132980012 -0800
+++ Mk/bsd.port.mk	2012-01-12 02:21:36.112978238 -0800
@@ -1635,9 +1635,11 @@
 
 .if defined(PATCHFILES)
 .if ${PATCHFILES:M*.zip}x != x
+.if !exists(/usr/bin/unzip)
 PATCH_DEPENDS+=		${LOCALBASE}/bin/unzip:${PORTSDIR}/archivers/unzip
 .endif
 .endif
+.endif
 
 # Check the compatibility layer for amd64/ia64
 
@@ -1668,8 +1670,10 @@
 PLIST_SUB+=	LIB32DIR=${LIB32DIR}
 
 .if defined(USE_ZIP)
+.if !exists(/usr/bin/unzip)
 EXTRACT_DEPENDS+=	${LOCALBASE}/bin/unzip:${PORTSDIR}/archivers/unzip
 .endif
+.endif
 .if defined(USE_XZ) && ( (${OSVERSION} >= 900000 && ${OSVERSION} < 900012) || ${OSVERSION} < 800505 )
 EXTRACT_DEPENDS+=	${LOCALBASE}/bin/xz:${PORTSDIR}/archivers/xz
 .endif


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



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