From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 5E1E9138359 for ; Thu, 30 Jul 2020 21:41:49 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 85E1FE0B1D; Thu, 30 Jul 2020 21:41:48 +0000 (UTC) Received: from smtp.gentoo.org (mail.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 5C3DBE0B1D for ; Thu, 30 Jul 2020 21:41:48 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 1823834EFE0 for ; Thu, 30 Jul 2020 21:41:47 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 896032E7 for ; Thu, 30 Jul 2020 21:41:45 +0000 (UTC) From: "Lars Wendler" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Lars Wendler" Message-ID: <1596145301.4f93f813166df157a0a6674d68ada00b0a72a14f.polynomial-c@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: sys-block/open-iscsi/ X-VCS-Repository: repo/gentoo X-VCS-Files: sys-block/open-iscsi/Manifest sys-block/open-iscsi/open-iscsi-2.1.2.ebuild X-VCS-Directories: sys-block/open-iscsi/ X-VCS-Committer: polynomial-c X-VCS-Committer-Name: Lars Wendler X-VCS-Revision: 4f93f813166df157a0a6674d68ada00b0a72a14f X-VCS-Branch: master Date: Thu, 30 Jul 2020 21:41:45 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 4a8da616-2672-465a-ac9e-321398c1391b X-Archives-Hash: 335e66d3d099867fc1e975886fcf9097 commit: 4f93f813166df157a0a6674d68ada00b0a72a14f Author: Lars Wendler gentoo org> AuthorDate: Thu Jul 30 21:22:49 2020 +0000 Commit: Lars Wendler gentoo org> CommitDate: Thu Jul 30 21:41:41 2020 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4f93f813 sys-block/open-iscsi: Bump to version 2.1.2 Package-Manager: Portage-3.0.1, Repoman-2.3.23 Signed-off-by: Lars Wendler gentoo.org> sys-block/open-iscsi/Manifest | 1 + sys-block/open-iscsi/open-iscsi-2.1.2.ebuild | 140 +++++++++++++++++++++++++++ 2 files changed, 141 insertions(+) diff --git a/sys-block/open-iscsi/Manifest b/sys-block/open-iscsi/Manifest index 8d0851454c3..96afd5717d8 100644 --- a/sys-block/open-iscsi/Manifest +++ b/sys-block/open-iscsi/Manifest @@ -3,3 +3,4 @@ DIST open-iscsi-2.0.875.tar.gz 635121 BLAKE2B 34a7083087c53ed0e59d293d26efe166b0 DIST open-iscsi-2.0.878.tar.gz 607489 BLAKE2B f08f7a49dee6a377aed1d5efba100c4c357e95683e841e3c7960a49a40601cf8047dd28403866d963ef6850eb23c03ac39e0861575e21c452190a20534cbec48 SHA512 2eb26e5e69b88614d9b6262fffce94b93f9afc0742415ad6c2505daacd3014cd9d73bd89c36f452d004e2c4f312f372aab1ddc55e1bdec73c58de60181d73b33 DIST open-iscsi-2.1.0.tar.gz 604689 BLAKE2B 1741f4ac5072e3e952ba8268b1f52c6d296156b4c2696efad9fd0ccfe54870f74ac54b21144e4e71eed03cf8674a6aff96eee4f72f8a608fde40dc463f962b6f SHA512 bb1a4ff2bab0562bfd4281d757dd888e8f5d2d1ae16561cabf5598073c343e8c2dc9b35992c2bc51398faffceb9b70ea2eae214ab205a586bcb971d741d5f59d 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 diff --git a/sys-block/open-iscsi/open-iscsi-2.1.2.ebuild b/sys-block/open-iscsi/open-iscsi-2.1.2.ebuild new file mode 100644 index 00000000000..d7ff6b52509 --- /dev/null +++ b/sys-block/open-iscsi/open-iscsi-2.1.2.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 +}