From owner-freebsd-ports-bugs@FreeBSD.ORG Wed Apr 22 20:00:13 2009 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 75D35106566C; Wed, 22 Apr 2009 20:00:02 +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 E97FE8FC19; Wed, 22 Apr 2009 20:00:01 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id n3MK013e030032; Wed, 22 Apr 2009 20:00:01 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id n3MK014W030031; Wed, 22 Apr 2009 20:00:01 GMT (envelope-from gnats) Resent-Date: Wed, 22 Apr 2009 20:00:01 GMT Resent-Message-Id: <200904222000.n3MK014W030031@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@freebsd.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Cc: dinoex@freebsd.org Resent-Reply-To: FreeBSD-gnats-submit@freebsd.org, Eygene Ryabinkin Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 11322106566B for ; Wed, 22 Apr 2009 19:57:56 +0000 (UTC) (envelope-from rea-fbsd@codelabs.ru) Received: from 0.mx.codelabs.ru (0.mx.codelabs.ru [144.206.177.45]) by mx1.freebsd.org (Postfix) with ESMTP id A379C8FC15 for ; Wed, 22 Apr 2009 19:57:55 +0000 (UTC) (envelope-from rea-fbsd@codelabs.ru) Received: from amnesiac.at.no.dns (ppp91-77-11-103.pppoe.mtu-net.ru [91.77.11.103]) by 0.mx.codelabs.ru with esmtps (TLSv1:CAMELLIA256-SHA:256) id 1LwiZt-000M9S-Vv for FreeBSD-gnats-submit@freebsd.org; Wed, 22 Apr 2009 23:57:54 +0400 Message-Id: <20090422195753.4D1621712A@amnesiac.at.no.dns> Date: Wed, 22 Apr 2009 23:57:53 +0400 (MSD) From: Eygene Ryabinkin To: FreeBSD-gnats-submit@freebsd.org X-Send-Pr-Version: 3.113 X-GNATS-Notify: dinoex@freebsd.org Cc: Subject: ports/133927: [patch] bsd.openssl.mk: silence warnings when OPENSSL_INSTALLED is empty X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Eygene Ryabinkin List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Apr 2009 20:00:13 -0000 >Number: 133927 >Category: ports >Synopsis: [patch] bsd.openssl.mk: silence warnings when OPENSSL_INSTALLED is empty >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Wed Apr 22 20:00:01 UTC 2009 >Closed-Date: >Last-Modified: >Originator: Eygene Ryabinkin >Release: FreeBSD 7.2-PRERELEASE amd64 >Organization: Code Labs >Environment: System: FreeBSD 7.2-PRERELEASE amd64 >Description: While doing 'port test' for 'devel/git' I had seen the following warning messages: ----- grep: : No such file or directory grep: : No such file or directory "/usr/ports/Mk/bsd.openssl.mk", line 111: warning: "grep "^lib/libssl.so." """ returned non-zero status ----- The appear because porttools use /tmp/ as the package database and build the port without dependencies. This should not happen for real port building, because OpenSSL dependency should be satisfied first. >How-To-Repeat: Do 'port test' for 'devel/git' or some other port that requires OpenSSL from ports. >Fix: The following patch shuts the warning messages: --- bsd.openssl.mk-fix-empty-grep-args.diff begins here --- >From f11455108e7f02fd16661a6fe5d12fa09b0a8a48 Mon Sep 17 00:00:00 2001 From: Eygene Ryabinkin Date: Wed, 22 Apr 2009 22:59:18 +0400 When no OpenSSL library installed via port is found, OPENSSL_INSTALLED will be empty and grep for OPENSSL_PORT and OPENSSL_SHLIBFILE will be called with empty filename. This will produce verbose warnings that look rather ugly. I had encountered these while was running 'port test' for the 'git/devel': PKG_DBDIR is set to /tmp/, so no OpenSSL is present there. Signed-off-by: Eygene Ryabinkin --- Mk/bsd.openssl.mk | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/Mk/bsd.openssl.mk b/Mk/bsd.openssl.mk index 194fb86..845416c 100644 --- a/Mk/bsd.openssl.mk +++ b/Mk/bsd.openssl.mk @@ -107,8 +107,10 @@ OPENSSL_INSTALLED!= find "${PKG_DBDIR}/" -type f -name "+CONTENTS" -print0 | \ if test "$${sslprefix}" = "@cwd ${LOCALBASE}" ; then \ echo "$${contents}"; break; fi; done .endif +.if defined(OPENSSL_INSTALLED) && ${OPENSSL_INSTALLED} != "" OPENSSL_PORT!= grep "^@comment ORIGIN:" "${OPENSSL_INSTALLED}" | ${CUT} -d : -f 2 OPENSSL_SHLIBFILE!= grep "^lib/libssl.so." "${OPENSSL_INSTALLED}" +.endif OPENSSL_SHLIBVER?= ${OPENSSL_SHLIBFILE:E} .endif OPENSSL_PORT?= security/openssl -- 1.6.2.4 --- bsd.openssl.mk-fix-empty-grep-args.diff ends here --- >Release-Note: >Audit-Trail: >Unformatted: