From d00b3ccfa3e1238131c07aead94e19b1b5dce0fe Mon Sep 17 00:00:00 2001 From: Muhammad Moinur Rahman Date: Sat, 30 May 2020 00:31:39 +0000 Subject: [NEW] net/libiscsi: Client-side library to implement the iSCSI protocol Libiscsi is a client-side library to implement the iSCSI protocol that can be used to access the resources of an iSCSI target. The library is fully asynchronous with regards to iSCSI commands and SCSI tasks, but a synchronous layer is also provided for ease of use for simpler applications. WWW: https://github.com/sahlberg/libiscsi PR: 217355 Submitted by: d8zNeCFG@aon.at --- net/Makefile | 1 + net/libiscsi/Makefile | 24 ++++++++++++++++++++++++ net/libiscsi/distinfo | 3 +++ net/libiscsi/files/patch-configure.ac | 12 ++++++++++++ net/libiscsi/files/patch-lib_login.c | 16 ++++++++++++++++ net/libiscsi/pkg-descr | 8 ++++++++ net/libiscsi/pkg-plist | 16 ++++++++++++++++ 7 files changed, 80 insertions(+) create mode 100644 net/libiscsi/Makefile create mode 100644 net/libiscsi/distinfo create mode 100644 net/libiscsi/files/patch-configure.ac create mode 100644 net/libiscsi/files/patch-lib_login.c create mode 100644 net/libiscsi/pkg-descr create mode 100644 net/libiscsi/pkg-plist (limited to 'net') diff --git a/net/Makefile b/net/Makefile index d549e611c40c..1e2616d7d065 100644 --- a/net/Makefile +++ b/net/Makefile @@ -361,6 +361,7 @@ SUBDIR += libgrss SUBDIR += libgweather SUBDIR += libilbc + SUBDIR += libiscsi SUBDIR += libjson-rpc-cpp SUBDIR += libkgapi SUBDIR += libksieve diff --git a/net/libiscsi/Makefile b/net/libiscsi/Makefile new file mode 100644 index 000000000000..91762f95d0af --- /dev/null +++ b/net/libiscsi/Makefile @@ -0,0 +1,24 @@ +# Created by: M. Birgmeier +# $FreeBSD$ + +PORTNAME= libiscsi +DISTVERSION= 1.19.0 +CATEGORIES= net + +MAINTAINER= d8zNeCFG@aon.at +COMMENT= Client-side library to implement the iSCSI protocol + +LICENSE= LGPL21+ GPLv2+ +LICENSE_COMB= multi +LICENSE_FILE_LGPL21+ = ${WRKSRC}/LICENCE-LGPL-2.1.txt +LICENSE_FILE_GPLv2+ = ${WRKSRC}/LICENCE-GPL-2.txt + +USES= autoreconf libtool pathfix +USE_GITHUB= yes +USE_LDCONFIG= yes + +GH_ACCOUNT= sahlberg + +GNU_CONFIGURE= yes + +.include diff --git a/net/libiscsi/distinfo b/net/libiscsi/distinfo new file mode 100644 index 000000000000..8f222be13bb2 --- /dev/null +++ b/net/libiscsi/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1588264800 +SHA256 (sahlberg-libiscsi-1.19.0_GH0.tar.gz) = c7848ac722c8361d5064654bc6e926c2be61ef11dd3875020a63931836d806df +SIZE (sahlberg-libiscsi-1.19.0_GH0.tar.gz) = 284969 diff --git a/net/libiscsi/files/patch-configure.ac b/net/libiscsi/files/patch-configure.ac new file mode 100644 index 000000000000..db7ed62873b3 --- /dev/null +++ b/net/libiscsi/files/patch-configure.ac @@ -0,0 +1,12 @@ +--- configure.ac.orig 2019-07-13 22:04:44 UTC ++++ configure.ac +@@ -144,7 +144,8 @@ AC_CACHE_CHECK([for iSER support],libiscsi_cv_HAVE_LIN + AC_TRY_COMPILE([ + #include + #include +-#include ], ++#include ++#error not on FreeBSD], + [int ibv = IBV_WC_SEND;], + libiscsi_cv_HAVE_LINUX_ISER=yes,libiscsi_cv_HAVE_LINUX_ISER=no)]) + if test x"$libiscsi_cv_HAVE_LINUX_ISER" = x"yes"; then diff --git a/net/libiscsi/files/patch-lib_login.c b/net/libiscsi/files/patch-lib_login.c new file mode 100644 index 000000000000..209886e35cec --- /dev/null +++ b/net/libiscsi/files/patch-lib_login.c @@ -0,0 +1,16 @@ +--- lib/login.c.orig 2019-07-13 22:04:44 UTC ++++ lib/login.c +@@ -1242,11 +1242,11 @@ iscsi_process_login_reply(struct iscsi_context *iscsi, + + /* iSER specific keys */ + if (!strncmp(ptr, "InitiatorRecvDataSegmentLength=", 31)) { +- iscsi->initiator_max_recv_data_segment_length = MIN(strtol(ptr + 31, NULL, 10), ++ iscsi->initiator_max_recv_data_segment_length = MIN(strtoul(ptr + 31, NULL, 10), + iscsi->initiator_max_recv_data_segment_length); + } + if (!strncmp(ptr, "TargetRecvDataSegmentLength=", 28)) { +- iscsi->target_max_recv_data_segment_length = MIN(strtol(ptr + 28, NULL, 10), ++ iscsi->target_max_recv_data_segment_length = MIN(strtoul(ptr + 28, NULL, 10), + iscsi->target_max_recv_data_segment_length); + } + diff --git a/net/libiscsi/pkg-descr b/net/libiscsi/pkg-descr new file mode 100644 index 000000000000..159ed8230016 --- /dev/null +++ b/net/libiscsi/pkg-descr @@ -0,0 +1,8 @@ +Libiscsi is a client-side library to implement the iSCSI protocol +that can be used to access the resources of an iSCSI target. + +The library is fully asynchronous with regards to iSCSI commands +and SCSI tasks, but a synchronous layer is also provided for ease +of use for simpler applications. + +WWW: https://github.com/sahlberg/libiscsi diff --git a/net/libiscsi/pkg-plist b/net/libiscsi/pkg-plist new file mode 100644 index 000000000000..a5cb3cd09132 --- /dev/null +++ b/net/libiscsi/pkg-plist @@ -0,0 +1,16 @@ +bin/iscsi-inq +bin/iscsi-ls +bin/iscsi-perf +bin/iscsi-readcapacity16 +bin/iscsi-swp +include/iscsi/iscsi.h +include/iscsi/scsi-lowlevel.h +lib/libiscsi.a +lib/libiscsi.so +lib/libiscsi.so.9 +lib/libiscsi.so.9.0.0 +libdata/pkgconfig/libiscsi.pc +man/man1/iscsi-inq.1.gz +man/man1/iscsi-ls.1.gz +man/man1/iscsi-swp.1.gz +man/man1/iscsi-test-cu.1.gz -- cgit v1.2.3