summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Deutschmann <whissi@gentoo.org>2020-12-25 13:53:20 +0100
committerThomas Deutschmann <whissi@gentoo.org>2020-12-25 14:28:40 +0100
commitb32418e5124f5cb7bc28a3d947e48b1095c1534e (patch)
treebfefb547a52685ab93b9c24eb46abd5e652af1b7 /sys-block/open-iscsi
parentsys-block/open-isns: respect AR (diff)
downloadgentoo-b32418e5124f5cb7bc28a3d947e48b1095c1534e.tar.gz
gentoo-b32418e5124f5cb7bc28a3d947e48b1095c1534e.tar.bz2
gentoo-b32418e5124f5cb7bc28a3d947e48b1095c1534e.zip
sys-block/open-iscsi: bump to v2.1.3
Package-Manager: Portage-3.0.12, Repoman-3.0.2 Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
Diffstat (limited to 'sys-block/open-iscsi')
-rw-r--r--sys-block/open-iscsi/Manifest1
-rw-r--r--sys-block/open-iscsi/open-iscsi-2.1.3.ebuild140
2 files changed, 141 insertions, 0 deletions
diff --git a/sys-block/open-iscsi/Manifest b/sys-block/open-iscsi/Manifest
index c19643f48134..db79f4c65f3a 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 1709011d7d12d3dd9278a0d775af064d5f7da37357f35d6d5c5b3aa8ec16385c28b201b1261f4581dbbbbca3d815015ed8696e1694aa19f3231132f90d1e5b36
DIST open-iscsi-2.1.1.tar.gz 616859 BLAKE2B 7004b0866e55837f06cfe9e45f49f6a482932fda8a2c21c55819d658fb96113f1913290d490f28baccea86ceb755c63b73bd010b201f974c9803d39fbf5d0672 SHA512 88dbea433fe5266714c5c73ce4b60dfb8ddeffcaad4ff77abbdda2a865d29d4307ca51b8f45376f54542b19baed30d5f2f1836a8c136eb0af840f489f47e4fb3
DIST open-iscsi-2.1.2.tar.gz 617407 BLAKE2B 13a8c70d8a4618262c746cce3f2c66c04b577b35918d993c29fff041d292ef9e60b4d39c6d6a308d306b8303d08e7aac81b9927157361eaf47e694e9ae1e365a SHA512 a0b1fc4aa2acadbf3a69fa636a47fec527fff75748fccfa83c9540f3ac05c71835a406503b15480ed25fe4fb780e58e0dd21760cccc7f7ef07128d1aef8ee2e3
+DIST open-iscsi-2.1.3.tar.gz 619746 BLAKE2B 884e24ae6e16578f3cbd8ccea2557e820d4bf4d20c7f88890100ca93f48df88dc7284cc4eca19d93187516fd21a2c5b71eb53f0d8fe395d2ce42fd202dc355d6 SHA512 0de417dc45b765458c5a1f09029b5df9b5c18d45d7a8fb6b38d539b7013f512a3c8731d5046f554611eccc77b93fea0df30fe4932d79cea44776ac944c398a52
diff --git a/sys-block/open-iscsi/open-iscsi-2.1.3.ebuild b/sys-block/open-iscsi/open-iscsi-2.1.3.ebuild
new file mode 100644
index 000000000000..d7ff6b52509f
--- /dev/null
+++ b/sys-block/open-iscsi/open-iscsi-2.1.3.ebuild
@@ -0,0 +1,140 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit autotools linux-info flag-o-matic toolchain-funcs udev systemd
+
+DESCRIPTION="A performant, transport independent, multi-platform implementation of RFC3720"
+HOMEPAGE="http://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 ~sparc ~x86"
+IUSE="debug infiniband libressl +tcp rdma systemd"
+
+DEPEND="
+ sys-apps/kmod
+ sys-block/open-isns:=
+ sys-kernel/linux-headers
+ infiniband? ( sys-fabric/ofed )
+ !libressl? ( dev-libs/openssl:0= )
+ libressl? ( dev-libs/libressl:0= )
+ systemd? ( sys-apps/systemd )
+"
+RDEPEND="${DEPEND}
+ sys-fs/lsscsi
+ sys-apps/util-linux"
+BDEPEND="virtual/pkgconfig"
+
+REQUIRED_USE="infiniband? ( rdma ) || ( rdma tcp )"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-2.1.1-Makefiles.patch"
+)
+
+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)"
+ done
+ fi
+ if use infiniband; then
+ for module in ${INFINIBAND_MODULES}; do
+ linux_chkconfig_module ${module} || ewarn "${module} needs to be built as module (builtin doesn't work)"
+ done
+ fi
+ if use rdma; then
+ for module in ${RDMA_MODULES}; do
+ linux_chkconfig_module ${module} || ewarn "${module} needs to be built as module (builtin doesn't work)"$
+ done
+ fi
+ fi
+}
+
+src_prepare() {
+ sed -e 's:^\(iscsid.startup\)\s*=.*:\1 = /usr/sbin/iscsid:' \
+ -i etc/iscsid.conf || die
+ sed -e 's@\(/sbin/\)@/usr\1@' \
+ -i etc/systemd/iscsi* || die
+ default
+
+ pushd iscsiuio >/dev/null || die
+ eautoreconf
+ popd >/dev/null || die
+}
+
+src_configure() {
+ use debug && append-cppflags -DDEBUG_TCP -DDEBUG_SCSI
+ append-lfs-flags
+}
+
+src_compile() {
+ # Stuffing CPPFLAGS into CFLAGS isn't entirely correct, but the build
+ # is messed up already here, so it's not making it that much worse.
+ KSRC="${KV_DIR}" CFLAGS="" \
+ emake \
+ OPTFLAGS="${CFLAGS} ${CPPFLAGS} $(usex systemd '' -DNO_SYSTEMD)" \
+ AR="$(tc-getAR)" CC="$(tc-getCC)" \
+ $(usex systemd '' NO_SYSTEMD=1) \
+ user
+}
+
+src_install() {
+ emake DESTDIR="${ED}" sbindir="/usr/sbin" install
+ # Upstream make is not deterministic, per bug #601514
+ rm -f "${ED}"/etc/initiatorname.iscsi
+
+ dodoc README THANKS
+
+ docinto test/
+ dodoc $(find test -maxdepth 1 -type f ! -name ".*")
+
+ insinto /etc/iscsi
+ newins "${FILESDIR}"/initiatorname.iscsi initiatorname.iscsi.example
+
+ newconfd "${FILESDIR}"/iscsid-conf.d iscsid
+ newinitd "${FILESDIR}"/iscsid-init.d iscsid
+
+ local unit
+ local units=(
+ iscsi.service
+ iscsid.{service,socket}
+ iscsiuio.{service,socket}
+ )
+ for unit in ${units[@]} ; do
+ systemd_dounit etc/systemd/${unit}
+ done
+
+ keepdir /var/db/iscsi
+ fperms 700 /var/db/iscsi
+ fperms 600 /etc/iscsi/iscsid.conf
+}
+
+pkg_postinst() {
+ in='/etc/iscsi/initiatorname.iscsi'
+ if [[ ! -f "${EROOT}${in}" ]] && [[ -f "${EROOT}${in}.example" ]] ; then
+ {
+ cat "${EROOT}${in}.example"
+ echo "# InitiatorName generated by ${CATEGORY}/${PF} at $(date -uR)"
+ echo "InitiatorName=$(${ROOT}/usr/sbin/iscsi-iname)"
+ } >> "${EROOT}${in}.tmp" && mv -f "${EROOT}${in}.tmp" "${EROOT}${in}"
+ fi
+}