summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys-block/open-iscsi/Manifest1
-rw-r--r--sys-block/open-iscsi/files/99-iscsi.rules1
-rw-r--r--sys-block/open-iscsi/files/iscsidev.sh78
-rw-r--r--sys-block/open-iscsi/files/open-iscsi-2.0.874-Makefiles.patch116
-rw-r--r--sys-block/open-iscsi/files/open-iscsi-2.0.874-musl-ethtool-compat.patch69
-rw-r--r--sys-block/open-iscsi/files/open-iscsi-2.0.874-musl-fixes.patch51
-rw-r--r--sys-block/open-iscsi/files/open-iscsi-2.0.875-include-sysmacros.patch21
-rw-r--r--sys-block/open-iscsi/open-iscsi-2.0.875.ebuild127
8 files changed, 0 insertions, 464 deletions
diff --git a/sys-block/open-iscsi/Manifest b/sys-block/open-iscsi/Manifest
index 9d4de0cdd17d..b7cd9738e2eb 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 1709011d7d12d3dd9278a0d775af064d5f7da37357f35d6d5c5b3aa8ec16385c28b201b1261f4581dbbbbca3d815015ed8696e1694aa19f3231132f90d1e5b36
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 3816126264c7..000000000000
--- 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 d045fae570fc..000000000000
--- 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 file mode 100644
index 33c5d8a960d0..000000000000
--- a/sys-block/open-iscsi/files/open-iscsi-2.0.874-Makefiles.patch
+++ /dev/null
@@ -1,116 +0,0 @@
-diff -dur a/Makefile b/Makefile
---- a/Makefile 2016-09-29 13:33:24.000000000 -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 a/usr/Makefile b/usr/Makefile
---- a/usr/Makefile 2016-09-29 13:33:24.000000000 -0500
-+++ b/usr/Makefile 2017-01-02 11:27:55.417297639 -0600
-@@ -63,9 +63,9 @@
- iscsistart.o statics.o
- $(CC) $(CFLAGS) $(LDFLAGS) $^ -o $@ -lrt
- 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
-diff -dur a/utils/fwparam_ibft/Makefile b/utils/fwparam_ibft/Makefile
---- a/utils/fwparam_ibft/Makefile 2016-09-29 13:33:24.000000000 -0500
-+++ b/utils/fwparam_ibft/Makefile 2017-01-02 11:30:42.358440507 -0600
-@@ -33,11 +33,11 @@
- 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
-diff -dur a/utils/Makefile b/utils/Makefile
---- a/utils/Makefile 2016-09-29 13:33:24.000000000 -0500
-+++ b/utils/Makefile 2017-01-02 11:29:24.193611039 -0600
-@@ -10,9 +10,9 @@
- $(CC) $(CFLAGS) $(LDFLAGS) $^ $(DBM_LIB) -o $@
-
- clean:
-- rm -f *.o $(PROGRAMS) .depend
-+ $(RM) *.o $(PROGRAMS) .depend
-
- depend:
-- gcc $(CFLAGS) -M `ls *.c` > .depend
-+ $(GCC) $(CFLAGS) -M `ls *.c` > .depend
-
- -include .depend
-diff -dur a/utils/sysdeps/Makefile b/utils/sysdeps/Makefile
---- a/utils/sysdeps/Makefile 2016-09-29 13:33:24.000000000 -0500
-+++ b/utils/sysdeps/Makefile 2017-01-02 11:31:24.219926338 -0600
-@@ -8,9 +8,9 @@
- 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/files/open-iscsi-2.0.874-musl-ethtool-compat.patch b/sys-block/open-iscsi/files/open-iscsi-2.0.874-musl-ethtool-compat.patch
deleted file mode 100644
index 12b82c71405c..000000000000
--- a/sys-block/open-iscsi/files/open-iscsi-2.0.874-musl-ethtool-compat.patch
+++ /dev/null
@@ -1,69 +0,0 @@
-From: Anthony G. Basiel <blueness@gentoo.org>
-
-diff -Naur open-iscsi-2.0.874.orig/iscsiuio/src/unix/libs/bnx2x.c open-iscsi-2.0.874/iscsiuio/src/unix/libs/bnx2x.c
---- open-iscsi-2.0.874.orig/iscsiuio/src/unix/libs/bnx2x.c 2016-09-29 18:33:24.000000000 +0000
-+++ open-iscsi-2.0.874/iscsiuio/src/unix/libs/bnx2x.c 2017-01-03 21:45:47.504035833 +0000
-@@ -42,7 +42,7 @@
- #include <arpa/inet.h>
- #include <linux/types.h> /* Needed for linux/ethtool.h on RHEL 5.x */
- #include <linux/sockios.h>
--#include <linux/ethtool.h>
-+#include "ethtool-compat.h"
- #include <sys/mman.h>
- #include <sys/ioctl.h>
- #include <sys/types.h>
-diff -Naur open-iscsi-2.0.874.orig/iscsiuio/src/unix/libs/ethtool-compat.h open-iscsi-2.0.874/iscsiuio/src/unix/libs/ethtool-compat.h
---- open-iscsi-2.0.874.orig/iscsiuio/src/unix/libs/ethtool-compat.h 1970-01-01 00:00:00.000000000 +0000
-+++ open-iscsi-2.0.874/iscsiuio/src/unix/libs/ethtool-compat.h 2017-01-03 21:45:23.016034980 +0000
-@@ -0,0 +1,51 @@
-+/*
-+ * ethtool-compat.h: adopted from
-+ # ethtool.h: Defines for Linux ethtool.
-+ *
-+ * Copyright (C) 1998 David S. Miller (davem@redhat.com)
-+ * Copyright 2001 Jeff Garzik <jgarzik@pobox.com>
-+ * Portions Copyright 2001 Sun Microsystems (thockin@sun.com)
-+ * Portions Copyright 2002 Intel (eli.kupermann@intel.com,
-+ * christopher.leech@intel.com,
-+ * scott.feldman@intel.com)
-+ * Portions Copyright (C) Sun Microsystems 2008
-+ */
-+
-+#include <linux/types.h>
-+#include <netinet/if_ether.h>
-+
-+#define ETHTOOL_FWVERS_LEN 32
-+#define ETHTOOL_BUSINFO_LEN 32
-+#define ETHTOOL_EROMVERS_LEN 32
-+
-+struct ethtool_drvinfo {
-+ __u32 cmd;
-+ char driver[32];
-+ char version[32];
-+ char fw_version[ETHTOOL_FWVERS_LEN];
-+ char bus_info[ETHTOOL_BUSINFO_LEN];
-+ char erom_version[ETHTOOL_EROMVERS_LEN];
-+ char reserved2[12];
-+ __u32 n_priv_flags;
-+ __u32 n_stats;
-+ __u32 testinfo_len;
-+ __u32 eedump_len;
-+ __u32 regdump_len;
-+};
-+
-+struct ethtool_tcpip4_spec {
-+ __be32 ip4src;
-+ __be32 ip4dst;
-+ __be16 psrc;
-+ __be16 pdst;
-+ __u8 tos;
-+};
-+
-+struct ethtool_ah_espip4_spec {
-+ __be32 ip4src;
-+ __be32 ip4dst;
-+ __be32 spi;
-+ __u8 tos;
-+};
-+
-+#define ETHTOOL_GDRVINFO 0x00000003 /* Get driver info. */
diff --git a/sys-block/open-iscsi/files/open-iscsi-2.0.874-musl-fixes.patch b/sys-block/open-iscsi/files/open-iscsi-2.0.874-musl-fixes.patch
deleted file mode 100644
index cf8b76210b99..000000000000
--- a/sys-block/open-iscsi/files/open-iscsi-2.0.874-musl-fixes.patch
+++ /dev/null
@@ -1,51 +0,0 @@
---- ./utils/fwparam_ibft/fwparam_ppc.c 2016-09-29 13:33:24.000000000 -0500
-+++ ./utils/fwparam_ibft/fwparam_ppc.c 2017-01-02 11:37:32.738351217 -0600
-@@ -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 <stdlib.h>
- #include <string.h>
- #include <errno.h>
-+#include <fcntl.h>
- #include <dirent.h>
- #include <limits.h>
- #include <sys/stat.h>
---- a/usr/iscsiadm.c 2016-09-29 13:33:24.000000000 -0500
-+++ b/usr/iscsiadm.c 2017-01-02 11:46:37.643506953 -0600
-@@ -3262,6 +3262,7 @@
- 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;
- int portal_type = -1;
- struct sigaction sa_old;
- struct sigaction sa_new;
-@@ -3426,6 +3427,9 @@
- break;
- case 'h':
- usage(0);
-+ case '?':
-+ log_error("unrecognized character '%c'", optopt);
-+ argerror = 1;
- }
-
- if (name && value) {
-@@ -3441,8 +3445,7 @@
- }
- }
-
-- if (optopt) {
-- log_error("unrecognized character '%c'", optopt);
-+ if (argerror) {
- rc = ISCSI_ERR_INVAL;
- goto free_ifaces;
- }
diff --git a/sys-block/open-iscsi/files/open-iscsi-2.0.875-include-sysmacros.patch b/sys-block/open-iscsi/files/open-iscsi-2.0.875-include-sysmacros.patch
deleted file mode 100644
index 7c19a1e6ba23..000000000000
--- a/sys-block/open-iscsi/files/open-iscsi-2.0.875-include-sysmacros.patch
+++ /dev/null
@@ -1,21 +0,0 @@
-From 6d68ef5871c94c6ebbbe6e6b1fe0bc2dce711052 Mon Sep 17 00:00:00 2001
-From: Lee Duncan <lduncan@suse.com>
-Date: Sat, 2 Dec 2017 14:19:26 -0800
-Subject: [PATCH] Include <sys/sysmacros.h> to properly define minor()
-
----
- iscsiuio/src/unix/libs/qedi.c | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/iscsiuio/src/unix/libs/qedi.c b/iscsiuio/src/unix/libs/qedi.c
-index c6ff6e77..b81fecdf 100644
---- a/iscsiuio/src/unix/libs/qedi.c
-+++ b/iscsiuio/src/unix/libs/qedi.c
-@@ -58,6 +58,7 @@
- #include <sys/user.h>
- #include <fcntl.h>
- #include <unistd.h>
-+#include <sys/sysmacros.h>
-
- #include "config.h"
-
diff --git a/sys-block/open-iscsi/open-iscsi-2.0.875.ebuild b/sys-block/open-iscsi/open-iscsi-2.0.875.ebuild
deleted file mode 100644
index d92237185ef9..000000000000
--- a/sys-block/open-iscsi/open-iscsi-2.0.875.ebuild
+++ /dev/null
@@ -1,127 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-inherit autotools versionator 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"
-KEYWORDS="~alpha amd64 arm arm64 ~ia64 ~mips ppc ppc64 sparc x86"
-IUSE="debug infiniband +tcp rdma"
-
-DEPEND="sys-block/open-isns:=
- infiniband? ( sys-fabric/ofed )
- sys-kernel/linux-headers"
-RDEPEND="${DEPEND}
- sys-fs/lsscsi
- sys-apps/util-linux"
-REQUIRED_USE="infiniband? ( rdma ) || ( rdma tcp )"
-
-PATCHES=(
- "${FILESDIR}/${PN}-2.0.874-Makefiles.patch"
- "${FILESDIR}/${PN}-2.0.874-musl-fixes.patch"
- "${FILESDIR}/${PN}-2.0.874-musl-ethtool-compat.patch"
- "${FILESDIR}/${P}-include-sysmacros.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 -i -e 's:^\(iscsid.startup\)\s*=.*:\1 = /usr/sbin/iscsid:' etc/iscsid.conf || die
- default
-
- pushd iscsiuio >/dev/null || die
- eautoreconf
- popd >/dev/null || die
-}
-
-src_configure() {
- use debug && append-cppflags -DDEBUG_TCP -DDEBUG_SCSI
-
- # bug #643122
- append-flags -fcommon
-
- 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}" \
- AR="$(tc-getAR)" CC="$(tc-getCC)" \
- 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 test/*
-
- insinto /etc/iscsi
- newins "${FILESDIR}"/initiatorname.iscsi initiatorname.iscsi.example
-
- newconfd "${FILESDIR}"/iscsid-conf.d iscsid
- newinitd "${FILESDIR}"/iscsid-init.d iscsid
-
- systemd_dounit "${S%/}"/etc/systemd/iscsid.service
-
- 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}" -a -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
-}