From 72be7c4946561d3a910506ea2f40258b45ee8664 Mon Sep 17 00:00:00 2001 From: Sayan Chowdhury Date: Fri, 6 Nov 2020 11:13:28 +0530 Subject: [PATCH] sys-block/open-isns: Add the new package Signed-off-by: Sayan Chowdhury --- .../sys-block/open-isns/Manifest | 3 + .../files/open-isns-0.100-no_Werror.patch | 41 ++++++++++++++ ...pen-isns-0.98-libressl-compatibility.patch | 11 ++++ .../sys-block/open-isns/metadata.xml | 11 ++++ .../open-isns/open-isns-0.100.ebuild | 56 +++++++++++++++++++ .../sys-block/open-isns/open-isns-0.98.ebuild | 39 +++++++++++++ .../sys-block/open-isns/open-isns-0.99.ebuild | 46 +++++++++++++++ 7 files changed, 207 insertions(+) create mode 100644 sdk_container/src/third_party/portage-stable/sys-block/open-isns/Manifest create mode 100644 sdk_container/src/third_party/portage-stable/sys-block/open-isns/files/open-isns-0.100-no_Werror.patch create mode 100644 sdk_container/src/third_party/portage-stable/sys-block/open-isns/files/open-isns-0.98-libressl-compatibility.patch create mode 100644 sdk_container/src/third_party/portage-stable/sys-block/open-isns/metadata.xml create mode 100644 sdk_container/src/third_party/portage-stable/sys-block/open-isns/open-isns-0.100.ebuild create mode 100644 sdk_container/src/third_party/portage-stable/sys-block/open-isns/open-isns-0.98.ebuild create mode 100644 sdk_container/src/third_party/portage-stable/sys-block/open-isns/open-isns-0.99.ebuild diff --git a/sdk_container/src/third_party/portage-stable/sys-block/open-isns/Manifest b/sdk_container/src/third_party/portage-stable/sys-block/open-isns/Manifest new file mode 100644 index 0000000000..7aa31df83d --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/sys-block/open-isns/Manifest @@ -0,0 +1,3 @@ +DIST open-isns-0.100.tar.gz 300611 BLAKE2B a40e8d2bd6e5ac8ed8475d3d50ed6256871134547a044a6b51102ad47c66c335f06372b29e5585df4e59ecd7a817e5f2e48c5e944eea31333ab9f45d51040306 SHA512 ccf49ba1c60d46ae49b75424a966abc1f7e104c8ffa13013951a58a8f0ccaa1cf550f24fd2743fcaba1211a0ec8033c5df5249b7a108ae5974d4f1144dd3b169 +DIST open-isns-0.98.tar.gz 278410 BLAKE2B f90df85de4d5fd2abdcd267e3c873dff62fcac523ee280e21def057eca366bbba21c2b3bfbf5cc0798b8d0f3b0d5028ebb49000cccc850abdfb85142a7b66c34 SHA512 04263b9ace9d272f4e3776c4e1a034815475590d4b4864217a6200fcd5baea391cd788723db3c17fe0d764efc9769a70a3d2167b00e5998fb4bcb8d5fe2547ed +DIST open-isns-0.99.tar.gz 282831 BLAKE2B 7140daf08fda894bcbed3e25b122909ad0ed86b4f3db2e42a23b97480dea554194d2a33a3ebdf4e2017a57c2023dd8589f2e2fcfa60470cc3a6a3fbfb0d0ccbc SHA512 90a2297535c5e939f83c761173ce5f5f88e68adc31e41e833b23d07b6dc6959572ae7184db0084b861918199a877b251ebae4b4a7456fdd8c93400dc8457adc9 diff --git a/sdk_container/src/third_party/portage-stable/sys-block/open-isns/files/open-isns-0.100-no_Werror.patch b/sdk_container/src/third_party/portage-stable/sys-block/open-isns/files/open-isns-0.100-no_Werror.patch new file mode 100644 index 0000000000..2d966dd3a4 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/sys-block/open-isns/files/open-isns-0.100-no_Werror.patch @@ -0,0 +1,41 @@ +From 40eb9ce75518817762a0eac4a93016ab817add89 Mon Sep 17 00:00:00 2001 +From: Lee Duncan +Date: Sat, 1 Feb 2020 10:23:04 -0800 +Subject: [PATCH] Fix 586 compile issue and remove -Werror + +Using -Werror causes any issue to break the build, whereas +I'd rather let the build continue and address the issue. + +Also, fixed one signed-vs-unsigned compare for time_t, which +shows up only on 586 (32-bit). +--- + configure.ac | 2 +- + isnsdd.c | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/configure.ac b/configure.ac +index e4f3995..d956e58 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -17,7 +17,7 @@ AC_PATH_PROG(SH, sh) + dnl C Compiler features + AC_C_INLINE + if test "$GCC" = "yes"; then +- CFLAGS="-Wall -Werror -Wextra $CFLAGS" ++ CFLAGS="-Wall -Wextra $CFLAGS" + CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE" + fi + +diff --git a/isnsdd.c b/isnsdd.c +index 58825cc..9cedb9f 100644 +--- a/isnsdd.c ++++ b/isnsdd.c +@@ -401,7 +401,7 @@ check_portal_registration(__attribute__((unused))void *ptr) + continue; + + last_modified = isns_object_last_modified(obj); +- if (last_modified + 2 * interval > now) { ++ if ((time_t)(last_modified + 2 * interval) > now) { + good_portals++; + continue; + } diff --git a/sdk_container/src/third_party/portage-stable/sys-block/open-isns/files/open-isns-0.98-libressl-compatibility.patch b/sdk_container/src/third_party/portage-stable/sys-block/open-isns/files/open-isns-0.98-libressl-compatibility.patch new file mode 100644 index 0000000000..b4d5ae6378 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/sys-block/open-isns/files/open-isns-0.98-libressl-compatibility.patch @@ -0,0 +1,11 @@ +--- a/pki.c.orig ++++ b/pki.c +@@ -30,7 +30,7 @@ + #endif + /* OpenSSL 1.1 made a lot of structures opaque, so we need to + * define the 1.1 wrappers in previous versions. */ +-#if OPENSSL_VERSION_NUMBER < 0x10100000L ++#if OPENSSL_VERSION_NUMBER < 0x10100000L || (defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x2070000fL) + #define EVP_PKEY_base_id(o) ((o)->type) + #define EVP_PKEY_get0_DSA(o) ((o)->pkey.dsa) + static EVP_MD_CTX *EVP_MD_CTX_new(void) diff --git a/sdk_container/src/third_party/portage-stable/sys-block/open-isns/metadata.xml b/sdk_container/src/third_party/portage-stable/sys-block/open-isns/metadata.xml new file mode 100644 index 0000000000..c3470797ff --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/sys-block/open-isns/metadata.xml @@ -0,0 +1,11 @@ + + + + + base-system@gentoo.org + Gentoo Base System + + + open-iscsi/open-isns + + diff --git a/sdk_container/src/third_party/portage-stable/sys-block/open-isns/open-isns-0.100.ebuild b/sdk_container/src/third_party/portage-stable/sys-block/open-isns/open-isns-0.100.ebuild new file mode 100644 index 0000000000..878669c907 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/sys-block/open-isns/open-isns-0.100.ebuild @@ -0,0 +1,56 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit autotools flag-o-matic + +DESCRIPTION="iSNS server and client for Linux" +HOMEPAGE="https://github.com/open-iscsi/open-isns" +SRC_URI="https://github.com/open-iscsi/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="LGPL-2.1" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86" +IUSE="debug libressl ssl static" + +DEPEND=" + ssl? ( + !libressl? ( dev-libs/openssl:0= ) + libressl? ( dev-libs/libressl:0= ) + ) +" +RDEPEND="${DEPEND}" + +PATCHES=( + "${FILESDIR}/${PN}-0.98-libressl-compatibility.patch" + + # Upstream patches (can usually be removed with next version bump) + "${FILESDIR}"/${P}-no_Werror.patch +) + +src_prepare() { + default + eautoreconf +} + +src_configure() { + use debug && append-cppflags -DDEBUG_TCP -DDEBUG_SCSI + append-lfs-flags + local myeconfargs=( + --without-slp + $(use_with ssl security) + $(use_enable !static shared) + ) + econf "${myeconfargs[@]}" +} + +src_install() { + default + emake DESTDIR="${D}" install_hdrs + emake DESTDIR="${D}" install_lib + keepdir /var/lib/${PN/open-} + if ! use static ; then + find "${ED}" -type f -name "*.a" -delete || die + fi +} diff --git a/sdk_container/src/third_party/portage-stable/sys-block/open-isns/open-isns-0.98.ebuild b/sdk_container/src/third_party/portage-stable/sys-block/open-isns/open-isns-0.98.ebuild new file mode 100644 index 0000000000..d429794c4e --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/sys-block/open-isns/open-isns-0.98.ebuild @@ -0,0 +1,39 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +inherit flag-o-matic + +DESCRIPTION="iSNS server and client for Linux" +HOMEPAGE="https://github.com/open-iscsi/open-isns" +SRC_URI="https://github.com/open-iscsi/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="LGPL-2.1" +SLOT="0" +KEYWORDS="~alpha amd64 arm arm64 ~ia64 ~mips ppc ppc64 sparc ~x86" +IUSE="debug libressl slp ssl static" + +DEPEND=" + ssl? ( + !libressl? ( dev-libs/openssl:0= ) + libressl? ( dev-libs/libressl:0= ) + ) + slp? ( net-libs/openslp )" +RDEPEND="${DEPEND}" + +PATCHES=( "${FILESDIR}/${P}-libressl-compatibility.patch" ) + +src_configure() { + use debug && append-cppflags -DDEBUG_TCP -DDEBUG_SCSI + append-lfs-flags + econf $(use_with slp) \ + $(use_with ssl security) \ + $(use_enable !static shared) +} + +src_install() { + default + emake DESTDIR="${D}" install_hdrs + emake DESTDIR="${D}" install_lib +} diff --git a/sdk_container/src/third_party/portage-stable/sys-block/open-isns/open-isns-0.99.ebuild b/sdk_container/src/third_party/portage-stable/sys-block/open-isns/open-isns-0.99.ebuild new file mode 100644 index 0000000000..e9c2b890b9 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/sys-block/open-isns/open-isns-0.99.ebuild @@ -0,0 +1,46 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit flag-o-matic + +DESCRIPTION="iSNS server and client for Linux" +HOMEPAGE="https://github.com/open-iscsi/open-isns" +SRC_URI="https://github.com/open-iscsi/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="LGPL-2.1" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86" +IUSE="debug libressl slp ssl static" + +DEPEND=" + ssl? ( + !libressl? ( dev-libs/openssl:0= ) + libressl? ( dev-libs/libressl:0= ) + ) + slp? ( net-libs/openslp )" +RDEPEND="${DEPEND}" + +PATCHES=( "${FILESDIR}/${PN}-0.98-libressl-compatibility.patch" ) + +src_configure() { + use debug && append-cppflags -DDEBUG_TCP -DDEBUG_SCSI + append-lfs-flags + local myeconfargs=( + $(use_with slp) + $(use_with ssl security) + $(use_enable !static shared) + ) + econf "${myeconfargs[@]}" +} + +src_install() { + default + emake DESTDIR="${D}" install_hdrs + emake DESTDIR="${D}" install_lib + keepdir /var/lib/${PN/open-} + if ! use static ; then + find "${ED}" -type f -name "*.a" -delete || die + fi +}