summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'sys-block/open-iscsi')
-rw-r--r--sys-block/open-iscsi/ChangeLog13
-rw-r--r--sys-block/open-iscsi/Manifest6
-rw-r--r--sys-block/open-iscsi/files/digest-open-iscsi-0.4.4131
-rw-r--r--sys-block/open-iscsi/files/initiatorname.iscsi8
-rw-r--r--sys-block/open-iscsi/files/iscsid-init.d80
-rw-r--r--sys-block/open-iscsi/metadata.xml8
-rw-r--r--sys-block/open-iscsi/open-iscsi-0.4.413.ebuild73
7 files changed, 189 insertions, 0 deletions
diff --git a/sys-block/open-iscsi/ChangeLog b/sys-block/open-iscsi/ChangeLog
new file mode 100644
index 000000000000..c11da8000356
--- /dev/null
+++ b/sys-block/open-iscsi/ChangeLog
@@ -0,0 +1,13 @@
+# ChangeLog for sys-block/open-iscsi
+# Copyright 1999-2005 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/sys-block/open-iscsi/ChangeLog,v 1.1 2005/09/20 04:33:34 robbat2 Exp $
+
+*open-iscsi-0.4.413 (20 Sep 2005)
+
+ 20 Sep 2005; Robin H. Johnson <robbat2@gentoo.org>
+ +files/initiatorname.iscsi, +files/iscsid-init.d, +metadata.xml,
+ +open-iscsi-0.4.413.ebuild:
+ Initial commit. Ebuild by Robin H. Johnson <robbat2@gentoo.org>. A special
+ thanks to The Gallery Group (www.thegallerygroup.com) for helping to support
+ iSCSI on Gentoo.
+
diff --git a/sys-block/open-iscsi/Manifest b/sys-block/open-iscsi/Manifest
new file mode 100644
index 000000000000..5c6d76e97913
--- /dev/null
+++ b/sys-block/open-iscsi/Manifest
@@ -0,0 +1,6 @@
+MD5 f3c0735d64f0ee90e74ef767e116af44 open-iscsi-0.4.413.ebuild 2100
+MD5 7c96acb098ff760945c04e20b47d6a07 ChangeLog 575
+MD5 21cd68602737d7c996bceabf6e62c468 metadata.xml 223
+MD5 ec58849ae9c14ba36b99b28f204bd9be files/initiatorname.iscsi 422
+MD5 46455650192b84fe9800a574256ec67e files/digest-open-iscsi-0.4.413 70
+MD5 61c07f96dcbe59e3cb43ab7fb7de55c2 files/iscsid-init.d 1893
diff --git a/sys-block/open-iscsi/files/digest-open-iscsi-0.4.413 b/sys-block/open-iscsi/files/digest-open-iscsi-0.4.413
new file mode 100644
index 000000000000..0e856bb97d9b
--- /dev/null
+++ b/sys-block/open-iscsi/files/digest-open-iscsi-0.4.413
@@ -0,0 +1 @@
+MD5 a116b7a1d1971f910524e86953e213d2 open-iscsi-0.4-413.tar.gz 312638
diff --git a/sys-block/open-iscsi/files/initiatorname.iscsi b/sys-block/open-iscsi/files/initiatorname.iscsi
new file mode 100644
index 000000000000..8e6ea13f14a5
--- /dev/null
+++ b/sys-block/open-iscsi/files/initiatorname.iscsi
@@ -0,0 +1,8 @@
+# Copyright 1999-2005 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License, v2 or later
+# $Header: /var/cvsroot/gentoo-x86/sys-block/open-iscsi/files/initiatorname.iscsi,v 1.1 2005/09/20 04:33:34 robbat2 Exp $
+#
+# This file must contain a InitiatorName entry!
+# white space is significent here!
+#InitiatorName=iqn.2005-09.tld.domain.hostname:openiscsi-initiator
+#InitiatorAlias=foobar
diff --git a/sys-block/open-iscsi/files/iscsid-init.d b/sys-block/open-iscsi/files/iscsid-init.d
new file mode 100644
index 000000000000..060a311d3106
--- /dev/null
+++ b/sys-block/open-iscsi/files/iscsid-init.d
@@ -0,0 +1,80 @@
+#!/sbin/runscript
+# Copyright 1999-2005 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License, v2 or later
+# $Header: /var/cvsroot/gentoo-x86/sys-block/open-iscsi/files/iscsid-init.d,v 1.1 2005/09/20 04:33:34 robbat2 Exp $
+
+PID_FILE=/var/run/iscsid.pid
+CONFIG_FILE=/etc/iscsid.conf
+INITIATORNAME=/etc/initiatorname.iscsi
+DAEMON=/usr/sbin/iscsid
+
+depend() {
+ after modules
+}
+
+checkconfig() {
+ [ ! -f $CONFIG_FILE ] && die "Config file $CONFIG_FILE does not exist!"
+ if [ ! -f $INITIATORNAME ]; then
+ eerror "$INITIATORNAME should contain a string with your initiatior name, eg:"
+ errror "InitiatorName=iqn.2005-09.tld.domainname.hostname:initiator-name"
+ die "Initiator name file does not exist!"
+ fi
+}
+
+start() {
+ checkconfig
+ echo -n "Starting iSCSI initiator service: "
+ modprobe scsi_transport_iscsi
+ modprobe iscsi_tcp
+ start-stop-daemon --start --exec $DAEMON --quiet
+ RETVAL=$?
+ if [ $RETVAL == "0" ]; then
+ echo "succeeded."
+ else
+ echo "failed."
+ fi
+
+ echo -n "Removing iSCSI modules: "
+ modprobe -r iscsi_tcp
+ modprobe -r scsi_transport_iscsi
+ RETVAL=$?
+ if [ $RETVAL == "0" ]; then
+ echo "succeeded."
+ else
+ echo "failed."
+ return 1
+ fi
+}
+
+stop() {
+ echo -n "Stopping iSCSI initiator service: "
+ start-stop-daemon --stop --quiet --exec $DAEMON --pidfile $PID_FILE
+ RETVAL=$?
+ if [ $RETVAL == "0" ]; then
+ echo "succeeded."
+ else
+ echo "failed."
+ fi
+ # ugly, but pid file is not removed by iscsid
+ rm -f $PID_FILE
+}
+
+opts="${opts} dump"
+
+dump() {
+ DUMP=`tempfile -p iscsid`
+ RETVAL=$?
+ if [ $RETVAL != "0" ]; then
+ echo "Failed to create dump file $DUMP"
+ return 1
+ fi
+ /usr/sbin/iscsiadm -m node --record 0a45f8 >$DUMP
+ RETVAL=$?
+ if [ $RETVAL != "0" ]; then
+ echo "Error dumping config from daemon"
+ rm $DUMP
+ return 1
+ fi
+ mv -u $DUMP $CONFIG_FILE
+ echo "Config dumped to $CONFIG_FILE"
+}
diff --git a/sys-block/open-iscsi/metadata.xml b/sys-block/open-iscsi/metadata.xml
new file mode 100644
index 000000000000..5d9f5be9d49d
--- /dev/null
+++ b/sys-block/open-iscsi/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>no-herd</herd>
+<maintainer>
+ <email>robbat2@gentoo.org</email>
+</maintainer>
+</pkgmetadata>
diff --git a/sys-block/open-iscsi/open-iscsi-0.4.413.ebuild b/sys-block/open-iscsi/open-iscsi-0.4.413.ebuild
new file mode 100644
index 000000000000..2c2a90e9e3ed
--- /dev/null
+++ b/sys-block/open-iscsi/open-iscsi-0.4.413.ebuild
@@ -0,0 +1,73 @@
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-block/open-iscsi/open-iscsi-0.4.413.ebuild,v 1.1 2005/09/20 04:33:34 robbat2 Exp $
+
+inherit versionator linux-mod eutils
+
+DESCRIPTION="Open-iSCSI project is a high performance, transport independent, multi-platform implementation of RFC3720."
+HOMEPAGE="http://www.open-iscsi.org/"
+MY_PV="$(replace_version_separator 2 '-')"
+MY_P="${PN}-${MY_PV}"
+SRC_URI="http://dev.gentoo.org/~robbat2/distfiles/${MY_P}.tar.gz"
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~x86 ~amd64"
+IUSE=""
+DEPEND="virtual/libc
+ virtual/linux-sources"
+RDEPEND="${DEPEND}
+ virtual/modutils
+ sys-apps/util-linux"
+S="${WORKDIR}/${MY_P}"
+
+MODULE_NAMES_ARG="drivers/scsi:${S}/kernel"
+MODULE_NAMES="iscsi_tcp(${MODULE_NAMES_ARG}) scsi_transport_iscsi(${MODULE_NAMES_ARG})"
+BUILD_TARGETS="all"
+CONFIG_CHECK="CRYPTO_MD5 CRYPTO_CRC32C"
+ERROR_CFG="open-iscsi needs both MD5 and CRC32C support in your kernel."
+
+src_unpack() {
+ unpack ${A}
+ convert_to_m ${S}/kernel/Makefile
+ export EPATCH_OPTS="-d${S}/kernel -p0"
+ if [ $KV_PATCH -lt 11 ]; then
+ die "Sorry, your kernel must be 2.6.11 or newer!"
+ elif [ $KV_PATCH -eq 11 ]; then
+ epatch ${S}/kernel/backward-compile-2.6.11.patch
+ elif [ $KV_PATCH -eq 12 ]; then
+ epatch ${S}/kernel/backward-compile-2.6.12.patch
+ fi
+ sed -i.orig \
+ -e '/^CFLAGS/s,-O2,,g' \
+ -e '/^CFLAGS/s,-g,,g' \
+ ${S}/usr/Makefile || die "Failed to clean up CFLAGS"
+}
+
+src_compile() {
+ einfo "Building kernel modules"
+ export KSRC="${KERNEL_DIR}"
+ #S=${S}/kernel
+ linux-mod_src_compile || die "failed to build modules"
+ einfo "Building userspace"
+ cd ${S}/usr && emake || die "emake failed"
+}
+
+src_install() {
+ einfo "Installing kernel modules"
+ export KSRC="${KERNEL_DIR}"
+ #S=${S}/kernel
+ linux-mod_src_install
+
+ einfo "Installing userspace"
+ dosbin usr/iscsid usr/iscsiadm
+
+ doman doc/*[1-8]
+ dodoc README THANKS TODO
+ docinto test
+ dodoc test/*
+
+ insinto /etc
+ doins etc/iscsid.conf
+ doins ${FILESDIR}/initiatorname.iscsi
+ newinitd ${FILESDIR}/iscsid-init.d iscsid
+}