[gentoo-commits] repo/gentoo:master commit in: sys-block/open-iscsi/, sys-block/open-iscsi/files/

2023-12-22 Thread Sam James
commit: a4679a1282ec6986ce6f603bc81ab25c29ce7d49
Author: Stijn Tintel  linux-ipv6  be>
AuthorDate: Fri Nov  3 01:09:30 2023 +
Commit: Sam James  gentoo  org>
CommitDate: Fri Dec 22 08:46:19 2023 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a4679a12

sys-block/open-iscsi: fix build against musl

Add an upstream patch that fixes build on musl.

Closes: https://bugs.gentoo.org/908587
Signed-off-by: Stijn Tintel  linux-ipv6.be>
Closes: https://github.com/gentoo/gentoo/pull/33657
Signed-off-by: Sam James  gentoo.org>

 ...iscsi-2.1.9-usr-idbm.c-fix-musl-build-426.patch | 40 ++
 sys-block/open-iscsi/open-iscsi-2.1.9.ebuild   |  1 +
 2 files changed, 41 insertions(+)

diff --git 
a/sys-block/open-iscsi/files/open-iscsi-2.1.9-usr-idbm.c-fix-musl-build-426.patch
 
b/sys-block/open-iscsi/files/open-iscsi-2.1.9-usr-idbm.c-fix-musl-build-426.patch
new file mode 100644
index ..0c4a2aa13ab7
--- /dev/null
+++ 
b/sys-block/open-iscsi/files/open-iscsi-2.1.9-usr-idbm.c-fix-musl-build-426.patch
@@ -0,0 +1,40 @@
+From 11bdc17938ba648c81a853355a6bbddad69a9fc7 Mon Sep 17 00:00:00 2001
+From: Fabrice Fontaine 
+Date: Wed, 4 Oct 2023 23:18:20 +0200
+Subject: [PATCH] usr/idbm.c: fix musl build (#426)
+
+Fix the following musl build failure raised since version 2.1.9 and
+https://github.com/open-iscsi/open-iscsi/commit/7b571d76d6937a78c141630fc38c3c57c532466c:
+
+../usr/idbm.c: In function 'idbm_rec_write_old':
+../usr/idbm.c:2230:27: error: 'GLOB_ONLYDIR' undeclared (first use in this 
function)
+ 2230 | rc = glob(portal, GLOB_ONLYDIR, NULL, );
+  |   ^~~~
+
+Fixes:
+ - 
http://autobuild.buildroot.org/results/14fc1c139f055b5b1eaa6e04e327863c06176a7b
+
+Signed-off-by: Fabrice Fontaine 
+---
+ usr/idbm.c | 5 +
+ 1 file changed, 5 insertions(+)
+
+diff --git a/usr/idbm.c b/usr/idbm.c
+index ca4a4ec..c39abb6 100644
+--- a/usr/idbm.c
 b/usr/idbm.c
+@@ -45,6 +45,11 @@
+ #include "fw_context.h"
+ #include "iscsi_err.h"
+ 
++// GLOB_ONLYDIR is not defined under musl
++#ifndef GLOB_ONLYDIR
++#define GLOB_ONLYDIR  0x100
++#endif
++
+ #define IDBM_HIDE 0/* Hide parameter when print. */
+ #define IDBM_SHOW 1/* Show parameter when print. */
+ #define IDBM_MASKED   2/* Show "stars" instead of real value when print */
+-- 
+2.41.0
+

diff --git a/sys-block/open-iscsi/open-iscsi-2.1.9.ebuild 
b/sys-block/open-iscsi/open-iscsi-2.1.9.ebuild
index a64f3cc0f0b1..d5126eaad442 100644
--- a/sys-block/open-iscsi/open-iscsi-2.1.9.ebuild
+++ b/sys-block/open-iscsi/open-iscsi-2.1.9.ebuild
@@ -34,6 +34,7 @@ BDEPEND="virtual/pkgconfig"
 
 PATCHES=(
"${FILESDIR}"/${PN}-2.1.7-fix_bitwise.patch
+   "${FILESDIR}"/${P}-usr-idbm.c-fix-musl-build-426.patch
 )
 
 pkg_setup() {



[gentoo-commits] repo/gentoo:master commit in: sys-block/open-iscsi/, sys-block/open-iscsi/files/

2022-10-28 Thread Sam James
commit: fdfdde7b9167fa1d8740b2d35947aa0c9d94025b
Author: Sam James  gentoo  org>
AuthorDate: Fri Oct 28 19:39:34 2022 +
Commit: Sam James  gentoo  org>
CommitDate: Fri Oct 28 19:50:09 2022 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fdfdde7b

sys-block/open-iscsi: drop 2.1.7

Signed-off-by: Sam James  gentoo.org>

 sys-block/open-iscsi/Manifest  |   1 -
 .../files/open-iscsi-2.1.7-fix_sed.patch   |  67 --
 sys-block/open-iscsi/open-iscsi-2.1.7.ebuild   | 145 -
 3 files changed, 213 deletions(-)

diff --git a/sys-block/open-iscsi/Manifest b/sys-block/open-iscsi/Manifest
index cc797e94f30c..a7246276375b 100644
--- a/sys-block/open-iscsi/Manifest
+++ b/sys-block/open-iscsi/Manifest
@@ -1,3 +1,2 @@
 DIST open-iscsi-2.1.4.tar.gz 621247 BLAKE2B 
043a999b2f397a6c740d61654079d7ab966caee6cf6cfb244ddd70eae4f5201045b371ce5fbe244216a2a210a5379c92e8c3fbe62d33707cf05e7a4a20a13a91
 SHA512 
ae0663a964d86e6a4c19203598b859173c93ecce550f9bc9855ff735dd51a3c45822f2bc1cc99e6891c56ef1d16c42223803f07a961558fe6e38ead2164faef3
-DIST open-iscsi-2.1.7.tar.gz 627848 BLAKE2B 
c8b572dc71046b722b9455799b4360c17963f05ce2cac48f122d40fc61bef6f01b98287003fc222bdb0dd4706218add8c41d3eb40464023b9b240a8205069dd3
 SHA512 
619c57b988c6972da09428b3a84ca375ca46653fbfca9cb61389c70a95871b665f93b75b8e6ff2aa993bdb89e2a078a188c0a7b45c3bf9c15a16b496e9ebc892
 DIST open-iscsi-2.1.8.tar.gz 638346 BLAKE2B 
1e85b6bd75ac31e5aaa65ea8869c2e6e13190786e28e473ab8bd1ea3edb0ef835624194e2ba53718fb2a49c25af53bff9035f5109e1a569155244f03a7dccdc0
 SHA512 
168ce68dc495cc8b2f217ad0373851d681f9274036b8ec562ece513de493adfdbba55f2038518f246f5244f6405102b2e096a9cce15e73fce9654f06790002c1

diff --git a/sys-block/open-iscsi/files/open-iscsi-2.1.7-fix_sed.patch 
b/sys-block/open-iscsi/files/open-iscsi-2.1.7-fix_sed.patch
deleted file mode 100644
index ad56b823b557..
--- a/sys-block/open-iscsi/files/open-iscsi-2.1.7-fix_sed.patch
+++ /dev/null
@@ -1,67 +0,0 @@
-From 66d76978f2ffbe276e84b03a7fac1041a7c3b4c3 Mon Sep 17 00:00:00 2001
-From: Matthias Maier 
-Date: Thu, 2 Jun 2022 13:17:10 -0500
-Subject: [PATCH] Do not hardcode the path of sed
-

- doc/Makefile | 2 +-
- etc/Makefile | 2 +-
- libopeniscsiusr/Makefile | 2 +-
- utils/Makefile   | 2 +-
- 4 files changed, 4 insertions(+), 4 deletions(-)
-
-diff --git a/doc/Makefile b/doc/Makefile
-index 9ed025d..e121270 100644
 a/doc/Makefile
-+++ b/doc/Makefile
-@@ -7,7 +7,7 @@ ifeq ($(TOPDIR),)
-   TOPDIR = ..
- endif
- 
--SED = /usr/bin/sed
-+SED = sed
- INSTALL = install
- 
- DESTDIR ?=
-diff --git a/etc/Makefile b/etc/Makefile
-index d065319..2d98027 100644
 a/etc/Makefile
-+++ b/etc/Makefile
-@@ -19,7 +19,7 @@ initddir ?= $(etcdir)/init.d
- 
- HOMEDIR ?= $(etcdir)/iscsi
- 
--SED = /usr/bin/sed
-+SED = sed
- INSTALL = install
- 
- SYSTEMD_SOURCE_FILES  = iscsid.socket iscsiuio.socket
-diff --git a/libopeniscsiusr/Makefile b/libopeniscsiusr/Makefile
-index 523518b..90903dd 100644
 a/libopeniscsiusr/Makefile
-+++ b/libopeniscsiusr/Makefile
-@@ -29,7 +29,7 @@ PKGCONF_DIR ?= $(LIB_DIR)/pkgconfig
- MAN_DIR = $(prefix)/share/man
- 
- PKG_CONFIG ?= /usr/bin/pkg-config
--SED ?= /usr/bin/sed
-+SED ?= sed
- 
- LIBISCSI_USR_DIR=$(TOPDIR)/libopeniscsiusr
- 
-diff --git a/utils/Makefile b/utils/Makefile
-index a7eb352..15539eb 100644
 a/utils/Makefile
-+++ b/utils/Makefile
-@@ -7,7 +7,7 @@
- # from the top-level make file.
- #
- 
--SED = /usr/bin/sed
-+SED = sed
- INSTALL = install
- CHMOD = chmod
- 
--- 
-2.35.1
-

diff --git a/sys-block/open-iscsi/open-iscsi-2.1.7.ebuild 
b/sys-block/open-iscsi/open-iscsi-2.1.7.ebuild
deleted file mode 100644
index 552d373862e7..
--- a/sys-block/open-iscsi/open-iscsi-2.1.7.ebuild
+++ /dev/null
@@ -1,145 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-inherit autotools linux-info flag-o-matic toolchain-funcs systemd udev
-
-DESCRIPTION="A performant, transport independent, multi-platform 
implementation of RFC3720"
-HOMEPAGE="https://www.open-iscsi.com/;
-SRC_URI="https://github.com/${PN}/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
-
-LICENSE="GPL-2"
-SLOT="0/0.2"
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~ia64 ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86"
-IUSE="debug infiniband +tcp rdma systemd"
-REQUIRED_USE="infiniband? ( rdma ) || ( rdma tcp )"
-
-DEPEND="
-   sys-apps/kmod
-   sys-block/open-isns:=
-   sys-kernel/linux-headers
-   infiniband? ( sys-cluster/rdma-core )
-   dev-libs/openssl:0=
-   systemd? ( sys-apps/systemd )
-"
-RDEPEND="${DEPEND}
-   sys-fs/lsscsi
-   sys-apps/util-linux"
-BDEPEND="virtual/pkgconfig"
-
-PATCHES=(
-   "${FILESDIR}"/${PN}-2.1.7-fix_bitwise.patch
-   "${FILESDIR}"/${PN}-2.1.7-fix_sed.patch
-   "${FILESDIR}"/${PN}-2.1.7-no_werror.patch
-)
-
-pkg_setup() {
-   linux-info_pkg_setup
-
-

[gentoo-commits] repo/gentoo:master commit in: sys-block/open-iscsi/, sys-block/open-iscsi/files/

2022-06-02 Thread Matthias Maier
commit: 5536cd18a01bb593e72daa0dfe54297022cb5e7a
Author: Matthias Maier  gentoo  org>
AuthorDate: Thu Jun  2 18:18:56 2022 +
Commit: Matthias Maier  gentoo  org>
CommitDate: Thu Jun  2 18:20:46 2022 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5536cd18

sys-block/open-iscsi: version bump to 2.1.7, various fixes

 - drop (parts of the) old patches for 2.1.6 as they have been upstreamed

 - remove -Werror from compiler command line

 - remove hardcoded sed path

 - use __bitwise instead of __bitwise__ macro. The latter seems to be a
   typo

Bug: https://bugs.gentoo.org/847418
Signed-off-by: Matthias Maier  gentoo.org>

 sys-block/open-iscsi/Manifest  |  1 +
 .../files/open-iscsi-2.1.7-fix_bitwise.patch   | 52 +
 .../files/open-iscsi-2.1.7-fix_sed.patch   | 67 ++
 .../files/open-iscsi-2.1.7-no_werror.patch | 26 +
 sys-block/open-iscsi/open-iscsi-2.1.6-r1.ebuild|  2 +-
 ...csi-2.1.6-r1.ebuild => open-iscsi-2.1.7.ebuild} |  5 +-
 6 files changed, 150 insertions(+), 3 deletions(-)

diff --git a/sys-block/open-iscsi/Manifest b/sys-block/open-iscsi/Manifest
index 29d5b970a89c..4c6d1313583c 100644
--- a/sys-block/open-iscsi/Manifest
+++ b/sys-block/open-iscsi/Manifest
@@ -1,2 +1,3 @@
 DIST open-iscsi-2.1.4.tar.gz 621247 BLAKE2B 
043a999b2f397a6c740d61654079d7ab966caee6cf6cfb244ddd70eae4f5201045b371ce5fbe244216a2a210a5379c92e8c3fbe62d33707cf05e7a4a20a13a91
 SHA512 
ae0663a964d86e6a4c19203598b859173c93ecce550f9bc9855ff735dd51a3c45822f2bc1cc99e6891c56ef1d16c42223803f07a961558fe6e38ead2164faef3
 DIST open-iscsi-2.1.6.tar.gz 623721 BLAKE2B 
c7c09e38fd10bd5c2a5e8ad8030cf2338de3382fe4acae0e3c1bf3cacb6e244e411b7556403e0c43fd03035836f46cc4836683188e2f159cd7fc066aef78a868
 SHA512 
4a32a76c1c32d7d1a01fe3a0f88ce9616a54323ec043757be73051eb41ebae8de90ce057acce72fb6fe07aa47e814c9bc6ee88b13fa7d7769ca10c5175974f1d
+DIST open-iscsi-2.1.7.tar.gz 627848 BLAKE2B 
c8b572dc71046b722b9455799b4360c17963f05ce2cac48f122d40fc61bef6f01b98287003fc222bdb0dd4706218add8c41d3eb40464023b9b240a8205069dd3
 SHA512 
619c57b988c6972da09428b3a84ca375ca46653fbfca9cb61389c70a95871b665f93b75b8e6ff2aa993bdb89e2a078a188c0a7b45c3bf9c15a16b496e9ebc892

diff --git a/sys-block/open-iscsi/files/open-iscsi-2.1.7-fix_bitwise.patch 
b/sys-block/open-iscsi/files/open-iscsi-2.1.7-fix_bitwise.patch
new file mode 100644
index ..2ff094c83f0f
--- /dev/null
+++ b/sys-block/open-iscsi/files/open-iscsi-2.1.7-fix_bitwise.patch
@@ -0,0 +1,52 @@
+From 0a6432de1a2186449d5e6557f75a9f30e487471d Mon Sep 17 00:00:00 2001
+From: Matthias Maier 
+Date: Thu, 2 Jun 2022 13:12:43 -0500
+Subject: [PATCH] Use __bitwise instead of __bitwise__
+
+The iscsi_proto.h header goes into great length ensuring that the
+__bitwise macro is defined:
+
+  #if !defined(__bitwise)
+  /*
+   * If running svn modules we may need to define these.
+   * This should not go upstream since this is already properly defined there
+   */
+  #ifdef __CHECKER__
+  #define __bitwise__ __attribute__((bitwise))
+  #else
+  #define __bitwise__
+  #endif
+  #ifdef __CHECK_ENDIAN__
+  #define __bitwise __bitwise__
+  #else
+  #define __bitwise
+  #endif
+  #endif
+
+But then uses the __bitwise__ macro instead:
+
+  typedef uint32_t __bitwise__ itt_t;
+
+(This is the only occurence where the __bitwise__ (or __bitwise) macro
+is actually used). This seems to be a typo, changing this to __bitwise
+fixes compilation with gcc-11 onwards.
+---
+ include/iscsi_proto.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/include/iscsi_proto.h b/include/iscsi_proto.h
+index 1d14b89..3fe9018 100644
+--- a/include/iscsi_proto.h
 b/include/iscsi_proto.h
+@@ -63,7 +63,7 @@
+ #endif
+ 
+ /* initiator tags; opaque for target */
+-typedef uint32_t __bitwise__ itt_t;
++typedef uint32_t __bitwise itt_t;
+ /* below makes sense only for initiator that created this tag */
+ #define build_itt(itt, age) ((__force itt_t)\
+   ((itt) | ((age) << ISCSI_AGE_SHIFT)))
+-- 
+2.35.1
+

diff --git a/sys-block/open-iscsi/files/open-iscsi-2.1.7-fix_sed.patch 
b/sys-block/open-iscsi/files/open-iscsi-2.1.7-fix_sed.patch
new file mode 100644
index ..ad56b823b557
--- /dev/null
+++ b/sys-block/open-iscsi/files/open-iscsi-2.1.7-fix_sed.patch
@@ -0,0 +1,67 @@
+From 66d76978f2ffbe276e84b03a7fac1041a7c3b4c3 Mon Sep 17 00:00:00 2001
+From: Matthias Maier 
+Date: Thu, 2 Jun 2022 13:17:10 -0500
+Subject: [PATCH] Do not hardcode the path of sed
+
+---
+ doc/Makefile | 2 +-
+ etc/Makefile | 2 +-
+ libopeniscsiusr/Makefile | 2 +-
+ utils/Makefile   | 2 +-
+ 4 files changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/doc/Makefile b/doc/Makefile
+index 9ed025d..e121270 100644
+--- a/doc/Makefile
 b/doc/Makefile
+@@ -7,7 +7,7 @@ ifeq ($(TOPDIR),)
+   TOPDIR = ..
+ endif
+ 
+-SED = /usr/bin/sed
++SED = sed
+ INSTALL = install
+ 
+ DESTDIR ?=
+diff --git 

[gentoo-commits] repo/gentoo:master commit in: sys-block/open-iscsi/, sys-block/open-iscsi/files/

2021-05-23 Thread David Seifert
commit: e46fda46397b6ba1a2cc60ee000f626355d913bd
Author: David Seifert  gentoo  org>
AuthorDate: Sun May 23 12:14:08 2021 +
Commit: David Seifert  gentoo  org>
CommitDate: Sun May 23 12:14:08 2021 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e46fda46

sys-block/open-iscsi: drop 2.0.875

Signed-off-by: David Seifert  gentoo.org>

 sys-block/open-iscsi/Manifest  |   1 -
 sys-block/open-iscsi/files/99-iscsi.rules  |   1 -
 sys-block/open-iscsi/files/iscsidev.sh |  78 -
 .../files/open-iscsi-2.0.874-Makefiles.patch   | 116 ---
 .../open-iscsi-2.0.874-musl-ethtool-compat.patch   |  69 ---
 .../files/open-iscsi-2.0.874-musl-fixes.patch  |  51 -
 .../open-iscsi-2.0.875-include-sysmacros.patch |  21 
 sys-block/open-iscsi/open-iscsi-2.0.875.ebuild | 127 -
 8 files changed, 464 deletions(-)

diff --git a/sys-block/open-iscsi/Manifest b/sys-block/open-iscsi/Manifest
index 9d4de0cdd17..b7cd9738e2e 100644
--- a/sys-block/open-iscsi/Manifest
+++ b/sys-block/open-iscsi/Manifest
@@ -1,3 +1,2 @@
-DIST open-iscsi-2.0.875.tar.gz 635121 BLAKE2B 
34a7083087c53ed0e59d293d26efe166b09c5ea18b6022869cc9ff3d2edb2fb8b69e2c1ce6c9011bd20fc590b02dafd6d7c13d8bfa1eae6408c4bace13992e5e
 SHA512 
1709011d7d12d3dd9278a0d775af064d5f7da37357f35d6d5c5b3aa8ec16385c28b201b1261f4581dca3d815015ed8696e1694aa19f3231132f90d1e5b36
 DIST open-iscsi-2.1.3.tar.gz 619746 BLAKE2B 
884e24ae6e16578f3cbd8ccea2557e820d4bf4d20c7f88890100ca93f48df88dc7284cc4eca19d93187516fd21a2c5b71eb53f0d8fe395d2ce42fd202dc355d6
 SHA512 
0de417dc45b765458c5a1f09029b5df9b5c18d45d7a8fb6b38d539b7013f512a3c8731d5046f554611eccc77b93fea0df30fe4932d79cea44776ac944c398a52
 DIST open-iscsi-2.1.4.tar.gz 621247 BLAKE2B 
043a999b2f397a6c740d61654079d7ab966caee6cf6cfb244ddd70eae4f5201045b371ce5fbe244216a2a210a5379c92e8c3fbe62d33707cf05e7a4a20a13a91
 SHA512 
ae0663a964d86e6a4c19203598b859173c93ecce550f9bc9855ff735dd51a3c45822f2bc1cc99e6891c56ef1d16c42223803f07a961558fe6e38ead2164faef3

diff --git a/sys-block/open-iscsi/files/99-iscsi.rules 
b/sys-block/open-iscsi/files/99-iscsi.rules
deleted file mode 100644
index 3816126264c..000
--- a/sys-block/open-iscsi/files/99-iscsi.rules
+++ /dev/null
@@ -1 +0,0 @@
-KERNEL=="sd*", SUBSYSTEMS=="block", 
RUN{program}+="/etc/udev/scripts/iscsidev.sh"

diff --git a/sys-block/open-iscsi/files/iscsidev.sh 
b/sys-block/open-iscsi/files/iscsidev.sh
deleted file mode 100644
index d045fae570f..000
--- a/sys-block/open-iscsi/files/iscsidev.sh
+++ /dev/null
@@ -1,78 +0,0 @@
-#!/usr/bin/env bash
-
-# KERNEL=="sd*", SUBSYSTEMS=="block", 
RUN{program}="/etc/udev/scripts/iscsidev.sh"
-
-# we only care about iscsi devices
-[[ $ID_VENDOR = "IET" ]] || exit 1
-
-# don't care about partitions either
-echo $DEVNAME | egrep -q "[0-9]$"
-status=$?
-[[ $status != 0 ]] || exit 1
-
-#ID_MODEL=VIRTUAL-DISK
-#ID_MODEL_ENC=VIRTUAL-DISK
-#ID_REVISION=0001
-#DEVTYPE=disk
-#ID_BUS=scsi
-#SUBSYSTEM=block
-#ID_SERIAL=1IET_00010001
-#DEVPATH=/devices/platform/host74/session68/target74:0:0/74:0:0:1/block/sde
-#ID_VENDOR_ENC=IET\x20\x20\x20\x20\x20
-#MINOR=64
-#ID_SCSI=1
-#ACTION=add
-#PWD=/
-#ID_PART_TABLE_UUID=54f71c65-a5d5-45cd-8915-5ffd5ff4fea6
-#ID_FS_TYPE=
-#USEC_INITIALIZED=999037905
-#MAJOR=8
-#ID_SCSI_SERIAL=beaf11
-#DEVLINKS=/dev/disk/by-id/scsi-1IET_00010001
-#DEVNAME=/dev/sde
-#SHLVL=1
-#ID_TYPE=disk
-#ID_PART_TABLE_TYPE=gpt
-#ID_VENDOR=IET
-#ID_SERIAL_SHORT=IET_00010001
-#SEQNUM=25775
-
-# do the removal
-if [[ $ACTION = 'remove' ]]; then
-  # nohup needed so this isn't constantly run...
-  nohup find -L /dev/disk/by-path/ -type l -lname ${DEVNAME} -exec rm "{}" + 
2>/dev/null &
-  exit 0
-fi
-
-TARGET_NAME=$(lsscsi -t | grep "${DEVNAME}" | awk '{print $3}' | awk -F, 
'{print $1}')
-[[ $TARGET_NAME = '' ]] && exit 1
-
-# we don't know which host is correct
-declare -a POSSIBLE_HOSTS
-declare -a POSSIBLE_PORTS
-for item in $(cat /sys/class/iscsi_connection/connection*/address); do
-  POSSIBLE_HOSTS+=("${item}")
-done
-for item in $(cat /sys/class/iscsi_connection/connection*/port); do
-  POSSIBLE_PORTS+=("${item}")
-done
-
-#get correct ip and port
-for ((i=0;i<${#POSSIBLE_HOSTS[@]};++i)); do
-  printf "%s is in %s\n" "$POSSIBLE_HOSTS[i]}" "${POSSIBLE_PORTS[i]}"
-  iscsiadm --mode node --targetname "${TARGET_NAME}" -p 
"${POSSIBLE_HOSTS[i]}":"${POSSIBLE_PORTS[i]}"
-  status=$?
-  if [[ $status = 0 ]]; then
-TARGET_IP="${POSSIBLE_HOSTS[i]}"
-TARGET_PORT="${POSSIBLE_PORTS[i]}"
-break
-  fi
-done
-
-# exit if not found
-[[ -z $TARGET_IP ]] && exit 1
-[[ -z $TARGET_PORT ]] && exit 1
-
-# actually create the link
-mkdir -p /dev/disk/by-path/
-ln -s "${DEVNAME}" 
"/dev/disk/by-path/ip-${TARGET_IP}:${TARGET_PORT}-iscsi-${TARGET_NAME}-lun-1"

diff --git a/sys-block/open-iscsi/files/open-iscsi-2.0.874-Makefiles.patch 
b/sys-block/open-iscsi/files/open-iscsi-2.0.874-Makefiles.patch
deleted 

[gentoo-commits] repo/gentoo:master commit in: sys-block/open-iscsi/, sys-block/open-iscsi/files/

2020-05-03 Thread Thomas Deutschmann
commit: 2b34abb755bf4dd2500e6a59d09a58ddee12842f
Author: Thomas Deutschmann  gentoo  org>
AuthorDate: Sun May  3 20:35:36 2020 +
Commit: Thomas Deutschmann  gentoo  org>
CommitDate: Sun May  3 20:35:49 2020 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2b34abb7

sys-block/open-iscsi: drop -Werror

Package-Manager: Portage-2.3.99, Repoman-2.3.22
Signed-off-by: Thomas Deutschmann  gentoo.org>

 .../files/open-iscsi-2.1.1-Makefiles.patch | 78 ++
 sys-block/open-iscsi/open-iscsi-2.1.1.ebuild   |  2 +-
 2 files changed, 79 insertions(+), 1 deletion(-)

diff --git a/sys-block/open-iscsi/files/open-iscsi-2.1.1-Makefiles.patch 
b/sys-block/open-iscsi/files/open-iscsi-2.1.1-Makefiles.patch
new file mode 100644
index 000..02e651e27c2
--- /dev/null
+++ b/sys-block/open-iscsi/files/open-iscsi-2.1.1-Makefiles.patch
@@ -0,0 +1,78 @@
+--- a/libopeniscsiusr/Makefile
 b/libopeniscsiusr/Makefile
+@@ -44,7 +44,7 @@ EXTRA_MAN_FILES = libopeniscsiusr.h.3
+ OBJS = context.o misc.o session.o sysfs.o iface.o idbm.o node.o default.o
+ 
+ CFLAGS ?= -O2 -g
+-CFLAGS += -Wall -Werror -Wextra -fvisibility=hidden -fPIC
++CFLAGS += -Wall -Wextra -fvisibility=hidden -fPIC
+ CFLAGS += $(shell $(PKG_CONFIG) --cflags libkmod)
+ 
+ LDFLAGS += $(shell $(PKG_CONFIG) --libs libkmod)
+--- a/usr/Makefile
 b/usr/Makefile
+@@ -35,7 +35,7 @@ endif
+ PKG_CONFIG = /usr/bin/pkg-config
+ 
+ CFLAGS ?= -O2 -g
+-WARNFLAGS ?= -Wall -Wextra -Werror -Wstrict-prototypes -fno-common
++WARNFLAGS ?= -Wall -Wextra -Wstrict-prototypes -fno-common
+ CFLAGS += $(WARNFLAGS) -I../include -I. -D_GNU_SOURCE \
+ -I$(TOPDIR)/libopeniscsiusr
+ CFLAGS += $(shell $(PKG_CONFIG) --cflags libkmod)
+@@ -76,9 +76,9 @@ iscsistart: $(ISCSI_LIB_SRCS) $(INITIATOR_SRCS) 
$(FW_BOOT_SRCS) \
+   iscsistart.o statics.o
+   $(CC) $(CFLAGS) $^ -o $@ -lcrypto -lrt $(LDFLAGS) $(ISCSI_LIB)
+ clean:
+-  rm -f *.o $(PROGRAMS) .depend $(LIBSYS)
++  $(RM) *.o $(PROGRAMS) .depend $(LIBSYS)
+ 
+ depend:
+-  gcc $(CFLAGS) -M `ls *.c` > .depend
++  $(CC) $(CFLAGS) -M `ls *.c` > .depend
+ 
+ -include .depend
+--- a/utils/Makefile
 b/utils/Makefile
+@@ -10,9 +10,9 @@ iscsi-iname: md5.o iscsi-iname.o
+   $(CC) $(CFLAGS) $(LDFLAGS) $^ $(DBM_LIB) -o $@
+ 
+ clean:
+-  rm -f *.o $(PROGRAMS) .depend
++  $(RM) *.o $(PROGRAMS) .depend
+ 
+ depend:
+-  gcc $(CFLAGS) -M `ls *.c` > .depend
++  $(CC) $(CFLAGS) -M `ls *.c` > .depend
+ 
+ -include .depend
+--- a/utils/fwparam_ibft/Makefile
 b/utils/fwparam_ibft/Makefile
+@@ -41,11 +41,11 @@ LDFLAGS += -L$(TOPDIR)/libopeniscsiusr -liscsiusr
+ all: $(OBJS)
+ 
+ clean:
+-  rm -f *.o $(CLEANFILES) .depend
++  $(RM) *.o $(CLEANFILES) .depend
+ 
+ $(OBJS): prom_parse.tab.h prom_parse.h fwparam_ibft.h
+ 
+ depend:
+-  gcc $(CFLAGS) -M `ls *.c` > .depend
++  $(CC) $(CFLAGS) -M `ls *.c` > .depend
+ 
+ -include .depend
+--- a/utils/sysdeps/Makefile
 b/utils/sysdeps/Makefile
+@@ -8,9 +8,9 @@ SYSDEPS_OBJS=sysdeps.o
+ all: $(SYSDEPS_OBJS)
+ 
+ clean:
+-  rm -f *.o .depend
++  $(RM) *.o .depend
+ 
+ depend:
+-  gcc $(CFLAGS) -M `ls *.c` > .depend
++  $(CC) $(CFLAGS) -M `ls *.c` > .depend
+ 
+ -include .depend

diff --git a/sys-block/open-iscsi/open-iscsi-2.1.1.ebuild 
b/sys-block/open-iscsi/open-iscsi-2.1.1.ebuild
index 43f3ee2b89f..d7ff6b52509 100644
--- a/sys-block/open-iscsi/open-iscsi-2.1.1.ebuild
+++ b/sys-block/open-iscsi/open-iscsi-2.1.1.ebuild
@@ -31,7 +31,7 @@ BDEPEND="virtual/pkgconfig"
 REQUIRED_USE="infiniband? ( rdma ) || ( rdma tcp )"
 
 PATCHES=(
-   "${FILESDIR}/${PN}-2.0.876-Makefiles.patch"
+   "${FILESDIR}/${PN}-2.1.1-Makefiles.patch"
 )
 
 pkg_setup() {



[gentoo-commits] repo/gentoo:master commit in: sys-block/open-iscsi/, sys-block/open-iscsi/files/

2019-05-23 Thread Lars Wendler
commit: cadef88193083edce8315d0cfd4b8c5e27e4dbc1
Author: Lars Wendler  gentoo  org>
AuthorDate: Thu May 23 08:09:44 2019 +
Commit: Lars Wendler  gentoo  org>
CommitDate: Thu May 23 08:09:44 2019 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cadef881

sys-block/open-iscsi: Bump to version 2.0.877

Closes: https://bugs.gentoo.org/685190
Package-Manager: Portage-2.3.66, Repoman-2.3.12
Signed-off-by: Lars Wendler  gentoo.org>

 sys-block/open-iscsi/Manifest  |   1 +
 .../open-iscsi-2.0.877-optional_systemd.patch  |  87 ++
 .../files/open-iscsi-2.0.877-pkgconfig.patch   |  84 ++
 sys-block/open-iscsi/open-iscsi-2.0.877.ebuild | 127 +
 4 files changed, 299 insertions(+)

diff --git a/sys-block/open-iscsi/Manifest b/sys-block/open-iscsi/Manifest
index a76fa9eec9d..15a53b3abe4 100644
--- a/sys-block/open-iscsi/Manifest
+++ b/sys-block/open-iscsi/Manifest
@@ -2,3 +2,4 @@ DIST open-iscsi-2.0-873.tar.gz 667069 BLAKE2B 
edb427f8483c31499cdde644bbf8d65895
 DIST open-iscsi-2.0.875.tar.gz 635121 BLAKE2B 
34a7083087c53ed0e59d293d26efe166b09c5ea18b6022869cc9ff3d2edb2fb8b69e2c1ce6c9011bd20fc590b02dafd6d7c13d8bfa1eae6408c4bace13992e5e
 SHA512 
1709011d7d12d3dd9278a0d775af064d5f7da37357f35d6d5c5b3aa8ec16385c28b201b1261f4581dca3d815015ed8696e1694aa19f3231132f90d1e5b36
 DIST open-iscsi-2.0.876.tar.gz 576111 BLAKE2B 
2fbe4f37e91730d15bad77feeb9a418a8bbf709582598571a5905080eb60649f3ece6a52e9cf94a28128f2b0bc30093e67f6a47624545243b10bcebe318750ac
 SHA512 
f9319016bd6abf3bf675ad050b0489095a21db58c93f9baaca6adc239129ad08f8e18ed96c91c36406e5c42d35118e67dfde6d3c37e97027467c4472db3b2422
 DIST open-iscsi-2.0.876_p20180814.tar.gz 602779 BLAKE2B 
8403d69ef43c868a009e1b7bf6e67ea0ecc0d10113b842e1f853a759398f56bb447f6c6ce5474bb2f4e9dfe59d9effc5eea58a1e7da9bbfd81c370eba1759edc
 SHA512 
d79b3025888a8b6db944c86abb13940a6c75fe10166d79ab7e242fc108603e86a81c2ea3448318a45f0e51d89d45a21bda5ab43cf75ff759007e1949030ad0bf
+DIST open-iscsi-2.0.877.tar.gz 605075 BLAKE2B 
85106a7137b2a70a56418e2c76df81d5bf464268b5030fef2560addd8a96a0b6ba767c811f7c8a181a7b30a902d3973f0f7dad7cd3cc0796979a8a1b2f9164ef
 SHA512 
1e6a6772c59dd7a809938f1ef4c9fe0310d70bf0e0f7e80643bcfa22236af8a8027122cf9ff598ce70a3ff51ccb9d5ef99fc5b9c517379bf590b8da74bfeb9a6

diff --git 
a/sys-block/open-iscsi/files/open-iscsi-2.0.877-optional_systemd.patch 
b/sys-block/open-iscsi/files/open-iscsi-2.0.877-optional_systemd.patch
new file mode 100644
index 000..b1f1a8f1d07
--- /dev/null
+++ b/sys-block/open-iscsi/files/open-iscsi-2.0.877-optional_systemd.patch
@@ -0,0 +1,87 @@
+From f66608aa9ce989c91f744bb2f3f34d2e01aedc87 Mon Sep 17 00:00:00 2001
+From: Lee Duncan 
+Date: Tue, 14 May 2019 13:11:34 -0700
+Subject: [PATCH] Make iscsid systemd usage optional
+
+You can compile without system now by using something
+like:
+
+   make OPTFLAGS="-DNO_SYSTEMD ..." NO_SYSTEMD=1
+
+This will skip systemd code for iscsid and iscsiuio.
+---
+ Makefile | 5 +
+ usr/Makefile | 2 ++
+ usr/iscsid.c | 6 ++
+ 3 files changed, 13 insertions(+)
+
+diff --git a/Makefile b/Makefile
+index c941740c..9a337741 100644
+--- a/Makefile
 b/Makefile
+@@ -40,6 +40,11 @@ ifneq (,$(CFLAGS))
+ export CFLAGS
+ endif
+ 
++# export systemd disablement if set
++ifneq ($(NO_SYSTEMD),)
++export NO_SYSTEMD
++endif
++
+ # Random comments:
+ # using '$(MAKE)' instead of just 'make' allows make to run in parallel
+ # over multiple makefile.
+diff --git a/usr/Makefile b/usr/Makefile
+index f1c35aa7..0203127c 100644
+--- a/usr/Makefile
 b/usr/Makefile
+@@ -41,7 +41,9 @@ CFLAGS += $(WARNFLAGS) -I../include -I. -D_GNU_SOURCE \
+ CFLAGS += $(shell $(PKG_CONFIG) --cflags libkmod)
+ ISCSI_LIB = -L$(TOPDIR)/libopeniscsiusr -lopeniscsiusr
+ LDFLAGS += $(shell $(PKG_CONFIG) --libs libkmod)
++ifeq ($(NO_SYSTEMD),)
+ LDFLAGS += $(shell $(PKG_CONFIG) --libs libsystemd)
++endif
+ PROGRAMS = iscsid iscsiadm iscsistart
+ 
+ # libc compat files
+diff --git a/usr/iscsid.c b/usr/iscsid.c
+index 0c984409..37c13b39 100644
+--- a/usr/iscsid.c
 b/usr/iscsid.c
+@@ -34,7 +34,9 @@
+ #include 
+ #include 
+ #include 
++#ifndef   NO_SYSTEMD
+ #include 
++#endif
+ 
+ #include "iscsid.h"
+ #include "mgmt_ipc.h"
+@@ -339,6 +341,7 @@ static void missing_iname_warn(char *initiatorname_file)
+ /* called right before we enter the event loop */
+ static void set_state_to_ready(void)
+ {
++#ifndef   NO_SYSTEMD
+   if (sessions_to_recover)
+   sd_notify(0, "READY=1\n"
+   "RELOADING=1\n"
+@@ -346,14 +349,17 @@ static void set_state_to_ready(void)
+   else
+   sd_notify(0, "READY=1\n"
+   "STATUS=Ready to process requests\n");
++#endif
+ }
+ 
+ /* called when recovery process has been reaped */
+ static void set_state_done_reloading(void)
+ {
++#ifndef   NO_SYSTEMD
+   sessions_to_recover = 0;
+   sd_notifyf(0, 

[gentoo-commits] repo/gentoo:master commit in: sys-block/open-iscsi/, sys-block/open-iscsi/files/

2019-05-06 Thread Lars Wendler
commit: 949d34bf3917ec5a5f27dc8fb297c5a8a95ce1c0
Author: Lars Wendler  gentoo  org>
AuthorDate: Mon May  6 12:50:48 2019 +
Commit: Lars Wendler  gentoo  org>
CommitDate: Mon May  6 12:54:34 2019 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=949d34bf

sys-block/open-iscsi: Revbump to fix a space issue

Bug: https://bugs.gentoo.org/685190
Package-Manager: Portage-2.3.66, Repoman-2.3.12
Signed-off-by: Lars Wendler  gentoo.org>

 .../open-iscsi-2.0.876-space_in_node-mode.patch| 28 ++
 ...uild => open-iscsi-2.0.876_p20180814-r1.ebuild} |  3 ++-
 2 files changed, 30 insertions(+), 1 deletion(-)

diff --git 
a/sys-block/open-iscsi/files/open-iscsi-2.0.876-space_in_node-mode.patch 
b/sys-block/open-iscsi/files/open-iscsi-2.0.876-space_in_node-mode.patch
new file mode 100644
index 000..1b72eec7945
--- /dev/null
+++ b/sys-block/open-iscsi/files/open-iscsi-2.0.876-space_in_node-mode.patch
@@ -0,0 +1,28 @@
+From baa0cb45cfcf10a81283c191b0b236cd1a2f66ee Mon Sep 17 00:00:00 2001
+From: Lee Duncan 
+Date: Fri, 12 Oct 2018 09:57:20 -0700
+Subject: [PATCH] Restore space in node-mode level 0 output
+
+As part of the libopeniscsiusr update, the output
+of "iscsiadm -m node" dropped a space that needs to
+be between the portal and the target, for proper
+parsing.
+
+Fixes: 87ea50a1c3a97
+---
+ usr/iscsiadm.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/usr/iscsiadm.c b/usr/iscsiadm.c
+index e3ba03c8..25c6cdc0 100644
+--- a/usr/iscsiadm.c
 b/usr/iscsiadm.c
+@@ -683,7 +683,7 @@ static int login_portals(struct node_rec *pattern_rec)
+ 
+ static void print_node_flat(struct iscsi_node *node)
+ {
+-  printf("%s,%" PRIu16 "%s\n",
++  printf("%s,%" PRIu16 " %s\n",
+  iscsi_node_portal_get(node),
+  iscsi_node_tpgt_get(node),
+  iscsi_node_target_name_get(node));

diff --git a/sys-block/open-iscsi/open-iscsi-2.0.876_p20180814.ebuild 
b/sys-block/open-iscsi/open-iscsi-2.0.876_p20180814-r1.ebuild
similarity index 97%
rename from sys-block/open-iscsi/open-iscsi-2.0.876_p20180814.ebuild
rename to sys-block/open-iscsi/open-iscsi-2.0.876_p20180814-r1.ebuild
index b111b48a68e..8d18bfc1ed4 100644
--- a/sys-block/open-iscsi/open-iscsi-2.0.876_p20180814.ebuild
+++ b/sys-block/open-iscsi/open-iscsi-2.0.876_p20180814-r1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2018 Gentoo Foundation
+# Copyright 1999-2019 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI="6"
@@ -27,6 +27,7 @@ REQUIRED_USE="infiniband? ( rdma ) || ( rdma tcp )"
 PATCHES=(
"${FILESDIR}/${PN}-2.0.876_p20180814-musl-fixes.patch"
"${FILESDIR}/${PN}-2.0.876-Makefiles.patch"
+   "${FILESDIR}/${PN}-2.0.876-space_in_node-mode.patch" #685190
 )
 
 S="${WORKDIR}/${PN}-${MY_COMMIT}"



[gentoo-commits] repo/gentoo:master commit in: sys-block/open-iscsi/, sys-block/open-iscsi/files/

2017-01-02 Thread Matt Thode
commit: 8ccdb781a9296e090b48e0ab1c18f802a4461c8b
Author: Matthew Thode  gentoo  org>
AuthorDate: Mon Jan  2 18:48:15 2017 +
Commit: Matt Thode  gentoo  org>
CommitDate: Mon Jan  2 18:49:51 2017 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8ccdb781

sys-block/open-iscsi: bup

Package-Manager: portage-2.3.0

 sys-block/open-iscsi/Manifest  |   1 +
 .../files/open-iscsi-2.0.874-Makefiles.patch   | 116 +
 .../files/open-iscsi-2.0.874-musl-fixes.patch  |  51 +
 sys-block/open-iscsi/open-iscsi-2.0.874.ebuild | 106 +++
 4 files changed, 274 insertions(+)

diff --git a/sys-block/open-iscsi/Manifest b/sys-block/open-iscsi/Manifest
index 10492fa..b9fdb58 100644
--- a/sys-block/open-iscsi/Manifest
+++ b/sys-block/open-iscsi/Manifest
@@ -1,2 +1,3 @@
 DIST open-iscsi-2.0-872.tar.gz 900081 SHA256 
37753697a170223ac02a292b3a23a315a3c747b490c42480e4057b676c9f8d4f SHA512 
d26c87772b0b1d13a8bd2eea9db86b3c61af83efbb788116c01ab6a914ff3de634a7b1bff56c1161b28965315543edbfc2735b6c7fbd3f7797471fde63b69cc0
 WHIRLPOOL 
4b04c8481c6c5f094ca6f7761828006a84eda7a22a6b3a4d65e7b3e4b39e73ef839ec710b491e7ca731b047fa8c74a9c03a17e85519a62dfbeb95222cfbdd935
 DIST open-iscsi-2.0-873.tar.gz 667069 SHA256 
7dd9f2f97da417560349a8da44ea4fcfe98bfd5ef284240a2cc4ff8e88ac7cd9 SHA512 
4e67116cb7dd49381c9279645e5a661f05596ae6be3b832772089828b3764ca2d04b5dea1bcc337071efb52c3c75a6fb943136c659ee59500f3a198ed0dcea6b
 WHIRLPOOL 
05af106f11da9f9f02c10edd5412d0f99816349e06e192059700eb1ae24a36027c3f0d7ed423aa7bb1c0b9d8b3aa1b6aa72a2aadb00f27762edf16b7f7d08c09
+DIST open-iscsi-2.0.874.tar.gz 625039 SHA256 
d0071bf00fdf6591cd6ea5caf89fa57ada03d263da1f80f17deff76acf7419e1 SHA512 
66d8a52b6401229d51873f1ee0f4e7259a8ed584800403a41741c7eeedc0ec21a2b116671cb7259f60918d083ffb46d76860236a1b10fbb94a4c1d61bddae1ae
 WHIRLPOOL 
488aea5551a299bbb15118efc52d7c228836e9cc7973a99ee4b8dfcfea4b7b14e86791e65230d25c244b6b5fe8ffaf1ae3df01f5a7b223b93c15aeb035a12852

diff --git a/sys-block/open-iscsi/files/open-iscsi-2.0.874-Makefiles.patch 
b/sys-block/open-iscsi/files/open-iscsi-2.0.874-Makefiles.patch
new file mode 100644
index ..33c5d8a
--- /dev/null
+++ b/sys-block/open-iscsi/files/open-iscsi-2.0.874-Makefiles.patch
@@ -0,0 +1,116 @@
+diff -dur a/Makefile b/Makefile
+--- a/Makefile 2016-09-29 13:33:24.0 -0500
 b/Makefile 2017-01-02 11:25:04.606549073 -0600
+@@ -14,8 +14,8 @@
+ etcdir = /etc
+ initddir = $(etcdir)/init.d
+ 
+-MANPAGES = doc/iscsid.8 doc/iscsiadm.8 doc/iscsi_discovery.8 
iscsiuio/docs/iscsiuio.8
+-PROGRAMS = usr/iscsid usr/iscsiadm utils/iscsi_discovery utils/iscsi-iname 
iscsiuio/src/unix/iscsiuio
++MANPAGES = doc/iscsid.8 doc/iscsiadm.8 doc/iscsi_discovery.8 doc/iscsistart.8 
doc/iscsi-iname.8
++PROGRAMS = usr/iscsid usr/iscsiadm utils/iscsi_discovery utils/iscsi-iname 
usr/iscsistart
+ INSTALL = install
+ ETCFILES = etc/iscsid.conf
+ IFACEFILES = etc/iface.example
+@@ -99,11 +99,11 @@
+ # ugh, auto-detection is evil
+ # Gentoo maintains their own init.d stuff
+ install_initd:
+-  if [ -f /etc/debian_version ]; then \
++  if [ -f $(DESTDIR)$(etcdir)/debian_version ]; then \
+   $(MAKE) install_initd_debian ; \
+-  elif [ -f /etc/redhat-release ]; then \
++  elif [ -f $(DESTDIR)$(etcdir)/redhat-release ]; then \
+   $(MAKE) install_initd_redhat ; \
+-  elif [ -f /etc/SuSE-release ]; then \
++  elif [ -f $(DESTDIR)$(etcdir)/SuSE-release ]; then \
+   $(MAKE) install_initd_suse ; \
+   fi
+ 
+@@ -130,7 +130,7 @@
+   $(INSTALL) -m 644 $^ $(DESTDIR)$(etcdir)/iscsi/ifaces
+ 
+ install_etc: $(ETCFILES)
+-  if [ ! -f $(DESTDIR)/etc/iscsi/iscsid.conf ]; then \
++  if [ ! -f $(DESTDIR)$(etcdir)/iscsi/iscsid.conf ]; then \
+   $(INSTALL) -d $(DESTDIR)$(etcdir)/iscsi ; \
+   $(INSTALL) -m 644 $^ $(DESTDIR)$(etcdir)/iscsi ; \
+   fi
+@@ -143,11 +143,11 @@
+   $(MAKE) -C kernel install_kernel
+ 
+ install_iname:
+-  if [ ! -f $(DESTDIR)/etc/iscsi/initiatorname.iscsi ]; then \
+-  echo "InitiatorName=`$(DESTDIR)/sbin/iscsi-iname`" > 
$(DESTDIR)/etc/iscsi/initiatorname.iscsi ; \
++  if [ ! -f $(DESTDIR)$(etcdir)/iscsi/initiatorname.iscsi ]; then \
++  echo "InitiatorName=`$(DESTDIR)$(sbindir)/iscsi-iname`" > 
$(DESTDIR)$(etcdir)/iscsi/initiatorname.iscsi ; \
+   echo "***" ; \
+-  echo "Setting InitiatorName to `cat 
$(DESTDIR)/etc/iscsi/initiatorname.iscsi`" ; \
+-  echo "To override edit 
$(DESTDIR)/etc/iscsi/initiatorname.iscsi" ; \
++  echo "Setting InitiatorName to `cat 
$(DESTDIR)$(etcdir)/iscsi/initiatorname.iscsi`" ; \
++  echo "To override edit $(etcdir)/iscsi/initiatorname.iscsi" ; \
+   echo "***" ; \
+   fi
+ 
+diff -dur 

[gentoo-commits] repo/gentoo:master commit in: sys-block/open-iscsi/, sys-block/open-iscsi/files/

2017-01-02 Thread Matt Thode
commit: 47fd69ecdf0411ae786a83ed41e4dae74f9e4af4
Author: Matthew Thode  gentoo  org>
AuthorDate: Mon Jan  2 16:53:25 2017 +
Commit: Matt Thode  gentoo  org>
CommitDate: Mon Jan  2 16:55:15 2017 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=47fd69ec

sys-block/open-iscsi: bup to fix musl breakage

Package-Manager: portage-2.3.0

 sys-block/open-iscsi/files/musl-fixes.patch   |  64 
 sys-block/open-iscsi/open-iscsi-2.0.873-r3.ebuild | 115 ++
 2 files changed, 179 insertions(+)

diff --git a/sys-block/open-iscsi/files/musl-fixes.patch 
b/sys-block/open-iscsi/files/musl-fixes.patch
new file mode 100644
index ..f101eda
--- /dev/null
+++ b/sys-block/open-iscsi/files/musl-fixes.patch
@@ -0,0 +1,64 @@
+--- ./utils/open-isns/isns.h.orig
 ./utils/open-isns/isns.h
+@@ -13,6 +13,7 @@
+ #include 
+ #include 
+ #include 
++#include 
+ 
+ #include 
+ #include "types.h"
+--- ./utils/fwparam_ibft/fwparam_ppc.c.orig
 ./utils/fwparam_ibft/fwparam_ppc.c
+@@ -356,7 +356,7 @@
+* Sort the nics into "natural" order.  The proc fs
+* device-tree has them in somewhat random, or reversed order.
+*/
+-  qsort(niclist, nic_count, sizeof(char *), (__compar_fn_t)nic_cmp);
++  qsort(niclist, nic_count, sizeof(char *), (int (*)(const void *, const 
void *))nic_cmp);
+ 
+   snprintf(prefix, sizeof(prefix), "%s/%s", devtree, "aliases");
+   dev_count = 0;
+--- ./usr/idbm.c.orig
 ./usr/idbm.c
+@@ -25,6 +25,7 @@
+ #include 
+ #include 
+ #include 
++#include 
+ #include 
+ #include 
+ #include 
+--- ./usr/iscsiadm.c.orig  2012-05-21 02:59:24.0 +0200
 ./usr/iscsiadm.c   2016-07-20 22:00:54.430451701 +0200
+@@ -2403,6 +2403,7 @@ main(int argc, char **argv)
+   int tpgt = PORTAL_GROUP_TAG_UNKNOWN, killiscsid=-1, do_show=0;
+   int packet_size=32, ping_count=1, ping_interval=0;
+   int do_discover = 0, sub_mode = -1;
++  int argerror = 0;
+   struct sigaction sa_old;
+   struct sigaction sa_new;
+   struct list_head ifaces;
+@@ -2553,7 +2554,11 @@ main(int argc, char **argv)
+   return 0;
+   case 'h':
+   usage(0);
+-  }
++
++  case '?':
++  log_error("unrecognized character '%c'", optopt);
++  argerror = 1;
++  }   
+ 
+   if (name && value) {
+   param = idbm_alloc_user_param(name, value);
+@@ -2568,8 +2573,7 @@ main(int argc, char **argv)
+   }
+   }
+ 
+-  if (optopt) {
+-  log_error("unrecognized character '%c'", optopt);
++  if (argerror) {
+   rc = ISCSI_ERR_INVAL;
+   goto free_ifaces;
+   

diff --git a/sys-block/open-iscsi/open-iscsi-2.0.873-r3.ebuild 
b/sys-block/open-iscsi/open-iscsi-2.0.873-r3.ebuild
new file mode 100644
index ..9581963
--- /dev/null
+++ b/sys-block/open-iscsi/open-iscsi-2.0.873-r3.ebuild
@@ -0,0 +1,115 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit versionator linux-info eutils flag-o-matic toolchain-funcs udev
+
+MY_P="${PN}-$(replace_version_separator 2 "-")"
+
+DESCRIPTION="Open-iSCSI is a high performance, transport independent, 
multi-platform implementation of RFC3720"
+HOMEPAGE="http://www.open-iscsi.org/;
+SRC_URI="http://www.open-iscsi.org/bits/${MY_P}.tar.gz;
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86"
+IUSE="debug slp +tcp infiniband rdma"
+
+DEPEND="slp? ( net-libs/openslp ) infiniband? ( sys-fabric/ofed )"
+RDEPEND="${DEPEND}
+   sys-fs/lsscsi
+   sys-apps/util-linux"
+REQUIRED_USE="infiniband? ( rdma ) || ( rdma tcp )"
+S="${WORKDIR}/${MY_P}"
+
+pkg_setup() {
+   linux-info_pkg_setup
+
+   if kernel_is -lt 2 6 16; then
+   die "Sorry, your kernel must be 2.6.16-rc5 or newer!"
+   fi
+
+   # Needs to be done, as iscsid currently only starts, when having the 
iSCSI
+   # support loaded as module. Kernel builtin options don't work. See this 
for
+   # more information:
+   # 
https://groups.google.com/group/open-iscsi/browse_thread/thread/cc10498655b40507/fd6a4ba0c8e91966
+   # If there's a new release, check whether this is still valid!
+   TCP_MODULES="SCSI_ISCSI_ATTRS ISCSI_TCP"
+   RDMA_MODULES="INFINIBAND_ISER"
+   INFINIBAND_MODULES="INFINIBAND_IPOIB INIBAND_USER_MAD 
INFINIBAND_USER_ACCESS"
+   CONFIG_CHECK_MODULES="tcp? ( ${TCP_MODULES} ) rdma? ( ${RDMA_MODULES} ) 
infiniband? ( ${INFINIBAND_MODULES} )"
+   if linux_config_exists; then
+   if use tcp; then
+   for module in ${TCP_MODULES}; do
+   linux_chkconfig_module ${module} || ewarn 
"${module} needs to be built as module (builtin doesn't work)"
+  

[gentoo-commits] repo/gentoo:master commit in: sys-block/open-iscsi/, sys-block/open-iscsi/files/

2015-12-17 Thread Mike Frysinger
commit: 5eafff1506f58a1e7844b806f93dd9e93f9e271e
Author: Mike Frysinger  gentoo  org>
AuthorDate: Thu Dec 17 23:55:29 2015 +
Commit: Mike Frysinger  gentoo  org>
CommitDate: Fri Dec 18 00:00:05 2015 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5eafff15

sys-block/open-iscsi: fix incorrect memset call

 .../files/open-iscsi-2.0.873-memset.patch  | 24 ++
 sys-block/open-iscsi/open-iscsi-2.0.873-r1.ebuild  | 95 ++
 2 files changed, 119 insertions(+)

diff --git a/sys-block/open-iscsi/files/open-iscsi-2.0.873-memset.patch 
b/sys-block/open-iscsi/files/open-iscsi-2.0.873-memset.patch
new file mode 100644
index 000..c566691
--- /dev/null
+++ b/sys-block/open-iscsi/files/open-iscsi-2.0.873-memset.patch
@@ -0,0 +1,24 @@
+clear the size of the storage, not the size of the pointer
+
+--- a/usr/md5.c
 b/usr/md5.c
+@@ -127,7 +127,7 @@ MD5Final(md5byte digest[16], struct MD5Context *ctx)
+ 
+   byteSwap(ctx->buf, 4);
+   memcpy(digest, ctx->buf, 16);
+-  memset(ctx, 0, sizeof(ctx));/* In case it's sensitive */
++  memset(ctx, 0, sizeof(*ctx));   /* In case it's sensitive */
+ }
+ 
+ #ifndef ASM_MD5
+--- a/utils/md5.c
 b/utils/md5.c
+@@ -133,7 +133,7 @@ MD5Final(md5byte digest[16], struct MD5Context *ctx)
+ 
+   byteSwap(ctx->buf, 4);
+   memcpy(digest, ctx->buf, 16);
+-  memset(ctx, 0, sizeof (ctx));   /* In case it's sensitive */
++  memset(ctx, 0, sizeof (*ctx));  /* In case it's sensitive */
+ }
+ 
+ #ifndef ASM_MD5

diff --git a/sys-block/open-iscsi/open-iscsi-2.0.873-r1.ebuild 
b/sys-block/open-iscsi/open-iscsi-2.0.873-r1.ebuild
new file mode 100644
index 000..4392860
--- /dev/null
+++ b/sys-block/open-iscsi/open-iscsi-2.0.873-r1.ebuild
@@ -0,0 +1,95 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit versionator linux-info eutils flag-o-matic toolchain-funcs
+
+MY_P="${PN}-$(replace_version_separator 2 "-")"
+
+DESCRIPTION="Open-iSCSI is a high performance, transport independent, 
multi-platform implementation of RFC3720"
+HOMEPAGE="http://www.open-iscsi.org/;
+SRC_URI="http://www.open-iscsi.org/bits/${MY_P}.tar.gz;
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86"
+IUSE="debug slp"
+
+DEPEND="slp? ( net-libs/openslp )"
+RDEPEND="${DEPEND}
+   sys-fs/lsscsi
+   sys-apps/util-linux"
+
+S="${WORKDIR}/${MY_P}"
+
+pkg_setup() {
+   linux-info_pkg_setup
+
+   if kernel_is -lt 2 6 16; then
+   die "Sorry, your kernel must be 2.6.16-rc5 or newer!"
+   fi
+
+   # Needs to be done, as iscsid currently only starts, when having the 
iSCSI
+   # support loaded as module. Kernel builtion options don't work. See 
this for
+   # more information:
+   # 
https://groups.google.com/group/open-iscsi/browse_thread/thread/cc10498655b40507/fd6a4ba0c8e91966
+   # If there's a new release, check whether this is still valid!
+   CONFIG_CHECK_MODULES="SCSI_ISCSI_ATTRS ISCSI_TCP"
+   if linux_config_exists; then
+   for module in ${CONFIG_CHECK_MODULES}; do
+   linux_chkconfig_module ${module} || ewarn "${module} 
needs to be built as module (builtin doesn't work)"
+   done
+   fi
+}
+
+src_prepare() {
+   epatch "${FILESDIR}"/${P}-Makefiles.patch
+   epatch "${FILESDIR}"/${P}-memset.patch
+
+   sed -i -e 's:^\(iscsid.startup\)\s*=.*:\1 = /usr/sbin/iscsid:' 
etc/iscsid.conf || die
+}
+
+src_configure() {
+   cd utils/open-isns || die
+
+   # SSL (--with-security) is broken
+   econf $(use_with slp) \
+   --without-security
+}
+
+src_compile() {
+   use debug && append-flags -DDEBUG_TCP -DDEBUG_SCSI
+
+   KSRC="${KV_DIR}" CFLAGS="" \
+   emake \
+   OPTFLAGS="${CFLAGS}" \
+   AR="$(tc-getAR)" CC="$(tc-getCC)" \
+   user
+}
+
+src_install() {
+   emake DESTDIR="${ED}" sbindir="/usr/sbin" install
+
+   dodoc README THANKS
+
+   docinto test/
+   dodoc test/*
+
+   insinto /etc/iscsi
+   newins "${FILESDIR}"/initiatorname.iscsi initiatorname.iscsi.example
+
+   # udev pieces
+   insinto /lib/udev/rules.d
+   doins "${FILESDIR}"/99-iscsi.rules
+   exeinto /etc/udev/scripts
+   doexe "${FILESDIR}"/iscsidev.sh
+
+   newconfd "${FILESDIR}"/iscsid-conf.d iscsid
+   newinitd "${FILESDIR}"/iscsid-init.d iscsid
+
+   keepdir /var/db/iscsi
+   fperms 700 /var/db/iscsi
+   fperms 600 /etc/iscsi/iscsid.conf
+}