From owner-freebsd-ports-bugs@FreeBSD.ORG Thu Jan 12 10:30:13 2012 Return-Path: Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7BE1B1065680 for ; Thu, 12 Jan 2012 10:30:13 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 49E3B8FC0C for ; Thu, 12 Jan 2012 10:30:13 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id q0CAUDpZ010536 for ; Thu, 12 Jan 2012 10:30:13 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id q0CAUDra010533; Thu, 12 Jan 2012 10:30:13 GMT (envelope-from gnats) Resent-Date: Thu, 12 Jan 2012 10:30:13 GMT Resent-Message-Id: <201201121030.q0CAUDra010533@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Garrett Cooper Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 26A771065677 for ; Thu, 12 Jan 2012 10:24:30 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22]) by mx1.freebsd.org (Postfix) with ESMTP id 0EE368FC22 for ; Thu, 12 Jan 2012 10:24:30 +0000 (UTC) Received: from red.freebsd.org (localhost [127.0.0.1]) by red.freebsd.org (8.14.4/8.14.4) with ESMTP id q0CAOThx006565 for ; Thu, 12 Jan 2012 10:24:29 GMT (envelope-from nobody@red.freebsd.org) Received: (from nobody@localhost) by red.freebsd.org (8.14.4/8.14.4/Submit) id q0CAOTHc006564; Thu, 12 Jan 2012 10:24:29 GMT (envelope-from nobody) Message-Id: <201201121024.q0CAOTHc006564@red.freebsd.org> Date: Thu, 12 Jan 2012 10:24:29 GMT From: Garrett Cooper To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: ports/164050: Ports fail to compile if unzip is present in the base system and port has EXTRACT_DEPENDS dependent on unzip X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Jan 2012 10:30:13 -0000 >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: