From owner-svn-ports-head@FreeBSD.ORG Fri Aug 8 19:03:21 2014 Return-Path: Delivered-To: svn-ports-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 08D214C5 for ; Fri, 8 Aug 2014 19:03:21 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EB5DB2CAD for ; Fri, 8 Aug 2014 19:03:20 +0000 (UTC) Received: from marino (uid 1323) (envelope-from marino@FreeBSD.org) id 2e35 by svn.freebsd.org (DragonFly Mail Agent v0.9+); Fri, 08 Aug 2014 19:03:20 +0000 From: John Marino Date: Fri, 8 Aug 2014 19:03:20 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r364376 - in head/net/istgt: . files X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Message-Id: <53e51ef8.2e35.3ecf4815@svn.freebsd.org> X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Aug 2014 19:03:21 -0000 Author: marino Date: Fri Aug 8 19:03:19 2014 New Revision: 364376 URL: http://svnweb.freebsd.org/changeset/ports/364376 QAT: https://qat.redports.org/buildarchive/r364376/ Log: net/istgt: Fix broken linking and casts While here, fix stage-qa warnings about unstripped binaries. Also the maintainer should have been reset due to lack of staging, but the presence of this PR prevented it. Due to this and the lack of response on this old PR, reset the maintainer too. PR: 179989 Submitted by: Dan Lukes Added: head/net/istgt/files/patch-invalidcast (contents, props changed) head/net/istgt/files/patch-replacecrypto (contents, props changed) head/net/istgt/files/patch-src_Makefile.in (contents, props changed) Modified: head/net/istgt/Makefile Modified: head/net/istgt/Makefile ============================================================================== --- head/net/istgt/Makefile Fri Aug 8 19:02:40 2014 (r364375) +++ head/net/istgt/Makefile Fri Aug 8 19:03:19 2014 (r364376) @@ -3,10 +3,11 @@ PORTNAME= istgt PORTVERSION= 20121028 +PORTREVISION= 1 CATEGORIES= net MASTER_SITES= http://www.peach.ne.jp/archives/istgt/ -MAINTAINER= aoyama@peach.ne.jp +MAINTAINER= ports@FreeBSD.org COMMENT= iSCSI target for openSUSE/Debian/NetBSD/FreeBSD SUB_FILES= pkg-message Added: head/net/istgt/files/patch-invalidcast ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/net/istgt/files/patch-invalidcast Fri Aug 8 19:03:19 2014 (r364376) @@ -0,0 +1,84 @@ +--- src/istgt_iscsi.c.orig 2012-10-28 00:26:36.000000000 +0200 ++++ src/istgt_iscsi.c 2013-06-26 00:44:07.000000000 +0200 +@@ -670,16 +670,16 @@ + if (rc < 0) { + now = time(NULL); + if (errno == ECONNRESET) { +- ISTGT_WARNLOG("Connection reset by peer (%s,time=%d)\n", +- conn->initiator_name, (int)difftime(now, start)); ++ ISTGT_WARNLOG("Connection reset by peer (%s,time=%.0f)\n", ++ conn->initiator_name, difftime(now, start)); + conn->state = CONN_STATE_EXITING; + } else if (errno == ETIMEDOUT) { +- ISTGT_WARNLOG("Operation timed out (%s,time=%d)\n", +- conn->initiator_name, (int)difftime(now, start)); ++ ISTGT_WARNLOG("Operation timed out (%s,time=%.0f)\n", ++ conn->initiator_name, difftime(now, start)); + conn->state = CONN_STATE_EXITING; + } else { +- ISTGT_ERRLOG("iscsi_read() failed (errno=%d,%s,time=%d)\n", +- errno, conn->initiator_name, (int)difftime(now, start)); ++ ISTGT_ERRLOG("iscsi_read() failed (errno=%d,%s,time=%.0f)\n", ++ errno, conn->initiator_name, difftime(now, start)); + } + return -1; + } +@@ -762,8 +762,8 @@ + rc = readv(conn->sock, &iovec[0], 4); + if (rc < 0) { + now = time(NULL); +- ISTGT_ERRLOG("readv() failed (%d,errno=%d,%s,time=%d)\n", +- rc, errno, conn->initiator_name, (int)difftime(now, start)); ++ ISTGT_ERRLOG("readv() failed (%d,errno=%d,%s,time=%.0f)\n", ++ rc, errno, conn->initiator_name, difftime(now, start)); + return -1; + } + if (rc == 0) { +@@ -1257,8 +1257,8 @@ + rc = writev(conn->sock, &iovec[0], 5); + if (rc < 0) { + now = time(NULL); +- ISTGT_ERRLOG("writev() failed (errno=%d,%s,time=%d)\n", +- errno, conn->initiator_name, (int)difftime(now, start)); ++ ISTGT_ERRLOG("writev() failed (errno=%d,%s,time=%.0f)\n", ++ errno, conn->initiator_name, difftime(now, start)); + return -1; + } + nbytes -= rc; +@@ -3590,9 +3590,9 @@ + if (rc < 0) { + now = time(NULL); + ISTGT_ERRLOG("MCS: CmdSN(%u) error ExpCmdSN=%u " +- "(time=%d)\n", ++ "(time=%.0f)\n", + CmdSN, conn->sess->ExpCmdSN, +- (int)difftime(now, start)); ++ difftime(now, start)); + SESS_MTX_UNLOCK(conn); + return -1; + } +--- src/istgt_lu_disk.c.orig 2012-10-28 00:26:36.000000000 +0200 ++++ src/istgt_lu_disk.c 2013-06-26 00:44:05.000000000 +0200 +@@ -5288,9 +5288,9 @@ + MTX_UNLOCK(&lu_task->trans_mutex); + now = time(NULL); + ISTGT_ERRLOG("timeout trans_cond CmdSN=%u " +- "(time=%d)\n", ++ "(time=%.0f)\n", + lu_task->lu_cmd.CmdSN, +- (int)difftime(now, start)); ++ difftime(now, start)); + /* timeout */ + return -1; + } +@@ -5326,8 +5326,8 @@ + if (rc == ETIMEDOUT) { + lu_task->error = 1; + now = time(NULL); +- ISTGT_ERRLOG("timeout trans_cond CmdSN=%u (time=%d)\n", +- lu_task->lu_cmd.CmdSN, (int)difftime(now, start)); ++ ISTGT_ERRLOG("timeout trans_cond CmdSN=%u (time=%.0f)\n", ++ lu_task->lu_cmd.CmdSN, difftime(now, start)); + return -1; + } + lu_task->error = 1; Added: head/net/istgt/files/patch-replacecrypto ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/net/istgt/files/patch-replacecrypto Fri Aug 8 19:03:19 2014 (r364376) @@ -0,0 +1,139 @@ +--- src/config.h.in.orig 2012-08-19 06:51:15.000000000 +0200 ++++ src/config.h.in 2013-06-26 01:30:15.000000000 +0200 +@@ -54,8 +54,8 @@ + /* Define to 1 if you have the `cam' library (-lcam). */ + #undef HAVE_LIBCAM + +-/* Define to 1 if you have the `crypto' library (-lcrypto). */ +-#undef HAVE_LIBCRYPTO ++/* Define to 1 if you have the `md' library (-lmd). */ ++#undef HAVE_LIBMD + + /* Define to 1 if you have the `pthread' library (-lpthread). */ + #undef HAVE_LIBPTHREAD +--- src/istgt_md5.c.orig 2010-01-02 18:57:26.000000000 +0100 ++++ src/istgt_md5.c 2013-06-26 01:35:24.000000000 +0200 +@@ -33,7 +33,8 @@ + #include + + #include +-#include ++#include ++#include + + #include "istgt.h" + #include "istgt_md5.h" +@@ -41,34 +42,28 @@ + int + istgt_md5init(ISTGT_MD5CTX *md5ctx) + { +- int rc; +- + if (md5ctx == NULL) + return -1; +- rc = MD5_Init(&md5ctx->md5ctx); +- return rc; ++ MD5Init(&md5ctx->md5ctx); ++ return 1; + } + + int + istgt_md5final(void *md5, ISTGT_MD5CTX *md5ctx) + { +- int rc; +- + if (md5ctx == NULL || md5 == NULL) + return -1; +- rc = MD5_Final(md5, &md5ctx->md5ctx); +- return rc; ++ MD5Final(md5, &md5ctx->md5ctx); ++ return 1; + } + + int + istgt_md5update(ISTGT_MD5CTX *md5ctx, const void *data, size_t len) + { +- int rc; +- + if (md5ctx == NULL) + return -1; + if (data == NULL || len <= 0) + return 0; +- rc = MD5_Update(&md5ctx->md5ctx, data, len); +- return rc; ++ MD5Update(&md5ctx->md5ctx, data, len); ++ return 1; + } +--- src/istgt_md5.h.orig 2010-01-02 18:57:26.000000000 +0100 ++++ src/istgt_md5.h 2013-06-26 01:20:46.000000000 +0200 +@@ -30,7 +30,8 @@ + + #include + +-#include ++#include ++#include + + #define ISTGT_MD5DIGEST_LEN MD5_DIGEST_LENGTH + +--- configure.orig 2012-08-24 12:19:24.000000000 +0200 ++++ configure 2013-06-26 01:23:49.000000000 +0200 +@@ -3472,13 +3472,13 @@ + + fi + +-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for MD5_Update in -lcrypto" >&5 +-$as_echo_n "checking for MD5_Update in -lcrypto... " >&6; } +-if ${ac_cv_lib_crypto_MD5_Update+:} false; then : ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for MD5Update in -lmd" >&5 ++$as_echo_n "checking for MD5Update in -lmd... " >&6; } ++if ${ac_cv_lib_crypto_MD5Update+:} false; then : + $as_echo_n "(cached) " >&6 + else + ac_check_lib_save_LIBS=$LIBS +-LIBS="-lcrypto $LIBS" ++LIBS="-lmd $LIBS" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + +@@ -3488,32 +3488,32 @@ + #ifdef __cplusplus + extern "C" + #endif +-char MD5_Update (); ++char MD5Update (); + int + main () + { +-return MD5_Update (); ++return MD5Update (); + ; + return 0; + } + _ACEOF + if ac_fn_c_try_link "$LINENO"; then : +- ac_cv_lib_crypto_MD5_Update=yes ++ ac_cv_lib_crypto_MD5Update=yes + else +- ac_cv_lib_crypto_MD5_Update=no ++ ac_cv_lib_crypto_MD5Update=no + fi + rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + LIBS=$ac_check_lib_save_LIBS + fi +-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_MD5_Update" >&5 +-$as_echo "$ac_cv_lib_crypto_MD5_Update" >&6; } +-if test "x$ac_cv_lib_crypto_MD5_Update" = xyes; then : ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_MD5Update" >&5 ++$as_echo "$ac_cv_lib_crypto_MD5Update" >&6; } ++if test "x$ac_cv_lib_crypto_MD5Update" = xyes; then : + cat >>confdefs.h <<_ACEOF +-#define HAVE_LIBCRYPTO 1 ++#define HAVE_LIBMD 1 + _ACEOF + +- LIBS="-lcrypto $LIBS" ++ LIBS="-lmd $LIBS" + + fi Added: head/net/istgt/files/patch-src_Makefile.in ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/net/istgt/files/patch-src_Makefile.in Fri Aug 8 19:03:19 2014 (r364376) @@ -0,0 +1,13 @@ +--- src/Makefile.in.orig 2012-10-15 21:40:18.000000000 +0000 ++++ src/Makefile.in +@@ -88,8 +88,8 @@ istgtcontrol: $(ISTGTCONTROL) + $(CC) $(LDFLAGS) -o $@ $(ISTGTCONTROL) $(LIBS) + + install: install-dirs +- $(INSTALL) -m 0755 istgt $(DESTDIR)$(bindir) +- $(INSTALL) -m 0755 istgtcontrol $(DESTDIR)$(bindir) ++ $(BSD_INSTALL_PROGRAM) istgt $(DESTDIR)$(bindir) ++ $(BSD_INSTALL_PROGRAM) istgtcontrol $(DESTDIR)$(bindir) + + install-dirs: + $(MKDIR_P) $(DESTDIR)$(bindir)