Date: Wed, 22 Apr 2009 23:57:53 +0400 (MSD) From: Eygene Ryabinkin <rea-fbsd@codelabs.ru> To: FreeBSD-gnats-submit@freebsd.org Subject: ports/133927: [patch] bsd.openssl.mk: silence warnings when OPENSSL_INSTALLED is empty Message-ID: <20090422195753.4D1621712A@amnesiac.at.no.dns> Resent-Message-ID: <200904222000.n3MK014W030031@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>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/<something> 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 <rea-fbsd@codelabs.ru> 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/<something>, so no OpenSSL is present there. Signed-off-by: Eygene Ryabinkin <rea-fbsd@codelabs.ru> --- 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:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20090422195753.4D1621712A>