From 441d1370330332b7d78f238d2f5e13f7aed5e4e0 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Fri, 25 Dec 2020 23:06:25 +0000 Subject: gentoo christmass resync : 25.12.2020 --- sys-block/open-iscsi/Manifest | 2 + sys-block/open-iscsi/open-iscsi-2.1.3.ebuild | 140 +++++++++++++++++++++++++++ 2 files changed, 142 insertions(+) create mode 100644 sys-block/open-iscsi/open-iscsi-2.1.3.ebuild (limited to 'sys-block/open-iscsi') diff --git a/sys-block/open-iscsi/Manifest b/sys-block/open-iscsi/Manifest index 27aef6285a79..4e467b58ccf7 100644 --- a/sys-block/open-iscsi/Manifest +++ b/sys-block/open-iscsi/Manifest @@ -14,8 +14,10 @@ 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 EBUILD open-iscsi-2.0.873-r1.ebuild 2545 BLAKE2B c6b89937392718933e75616429acab05e7be548457b9aadaa1be77863dc8ed66e3acbaf482a320479b9c7f73507425615af86839209e2e956e08a12061097a41 SHA512 11de4116925ebe35a63ee19bb49a87bccff3c2648f3ea94ea05726d48cb0fe950a3aae9420b697c51f9f1387cea9075dfbffbeae7ca20af1e411769c34610339 EBUILD open-iscsi-2.0.875.ebuild 3710 BLAKE2B 19bdadc17ba56edadb5ff18eaf00e08ef71fb4baef0cfaed73355bf09b2c4311f8cb9d99f9220ddcb14bdcbce0a1dc782ef895916f19d06c0fbc1f5297115974 SHA512 dbedc69c799eb9172d7c150102a58b79bfa1a40c5841a05819339c866204503a70f3482701b2faf667f07dcda6c2d4275f4b2c5a6c0f3009755a86d5951f4bf2 EBUILD open-iscsi-2.1.1.ebuild 4033 BLAKE2B c52114f0167c8cf3ada73ce1dfe8c3c8d9db2859154a7d496ab8e11c176c809f8515fcc8ee21118ebb76e1b049f52410179de2a4f16011cb1725ffca321d9f8f SHA512 d515ce74e88cb35fa3982e45ae27fd5656fe5503c783f36ba27b7ca1d3d0b2d60aef3ecdd0b02c407b1913a87b8514a6be1ac491b7c0a3cb4866e734b561d08c EBUILD open-iscsi-2.1.2.ebuild 4033 BLAKE2B c52114f0167c8cf3ada73ce1dfe8c3c8d9db2859154a7d496ab8e11c176c809f8515fcc8ee21118ebb76e1b049f52410179de2a4f16011cb1725ffca321d9f8f SHA512 d515ce74e88cb35fa3982e45ae27fd5656fe5503c783f36ba27b7ca1d3d0b2d60aef3ecdd0b02c407b1913a87b8514a6be1ac491b7c0a3cb4866e734b561d08c +EBUILD open-iscsi-2.1.3.ebuild 4033 BLAKE2B c52114f0167c8cf3ada73ce1dfe8c3c8d9db2859154a7d496ab8e11c176c809f8515fcc8ee21118ebb76e1b049f52410179de2a4f16011cb1725ffca321d9f8f SHA512 d515ce74e88cb35fa3982e45ae27fd5656fe5503c783f36ba27b7ca1d3d0b2d60aef3ecdd0b02c407b1913a87b8514a6be1ac491b7c0a3cb4866e734b561d08c MISC metadata.xml 458 BLAKE2B 34a2a9b03797454b48ace319f383d85da5f9fe0f14afa1f1da1dc9afc535a2e1aeddaea0df27811b77fd3099b5754ee0755d49491157ed1e141fc2078c258389 SHA512 bd5e104acd3e07b8965b4eacb7b397b75448fc31b7359f17ee4e24af18fcd00ecd0c64001d42b7a542790151678b9dd02bad9513a69986c60cf91cceebfe86c3 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 +} -- cgit v1.2.3