summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2015-08-08 13:49:04 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2015-08-08 17:38:18 -0700
commit56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch)
tree3f91093cdb475e565ae857f1c5a7fd339e2d781e /sys-block/tgt
downloadgentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip
proj/gentoo: Initial commit
This commit represents a new era for Gentoo: Storing the gentoo-x86 tree in Git, as converted from CVS. This commit is the start of the NEW history. Any historical data is intended to be grafted onto this point. Creation process: 1. Take final CVS checkout snapshot 2. Remove ALL ChangeLog* files 3. Transform all Manifests to thin 4. Remove empty Manifests 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ 5.1. Do not touch files with -kb/-ko keyword flags. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'sys-block/tgt')
-rw-r--r--sys-block/tgt/Manifest4
-rw-r--r--sys-block/tgt/files/tgtd125
-rw-r--r--sys-block/tgt/files/tgtd-1.0.24.confd4
-rw-r--r--sys-block/tgt/files/tgtd-1.0.24.initd126
-rw-r--r--sys-block/tgt/files/tgtd.confd4
-rw-r--r--sys-block/tgt/files/tgtd.initd125
-rw-r--r--sys-block/tgt/metadata.xml21
-rw-r--r--sys-block/tgt/tgt-1.0.19.ebuild51
-rw-r--r--sys-block/tgt/tgt-1.0.22.ebuild60
-rw-r--r--sys-block/tgt/tgt-1.0.24-r1.ebuild65
-rw-r--r--sys-block/tgt/tgt-1.0.60.ebuild64
11 files changed, 649 insertions, 0 deletions
diff --git a/sys-block/tgt/Manifest b/sys-block/tgt/Manifest
new file mode 100644
index 000000000000..9720de35c5e2
--- /dev/null
+++ b/sys-block/tgt/Manifest
@@ -0,0 +1,4 @@
+DIST tgt-1.0.19.tar.gz 241676 SHA256 69fd9e9528a70c272bcc3cd00ad6754edd819a0a1ce0fad21587d33c457c6f68
+DIST tgt-1.0.22.tar.gz 227522 SHA256 a23e97d9e1bd2b5f0be06c7f441f70b8fcc98ebf1ce61b57d0e81f60c1cbcc06
+DIST tgt-1.0.24.tar.gz 231583 SHA256 43758d81345c176774c9ec3b823295c6b090ab60406cd47c7a636d77af4362bc
+DIST tgt-1.0.60.tar.gz 295304 SHA256 619b5250e4bc63971a26c05a3eea353beb4009ed0ffa06aab5f8ee25346cfb0a SHA512 4abca297e89dd92d1d1480f26af39a80f1cb7cd67e54911f4bdf29db8531b1df51fe214af05e685270e439bf702d4805542773c29baecc7a94ef271b2a0b97fb WHIRLPOOL 26119b14f741f6094fc816f48a58f1694b47505e7a0963e10e2efdffd49782886735c9b2463850d7ad03c149293f4b31512ee1b994607a5bbd30f0cee56f68fd
diff --git a/sys-block/tgt/files/tgtd b/sys-block/tgt/files/tgtd
new file mode 100644
index 000000000000..bec70b821bf7
--- /dev/null
+++ b/sys-block/tgt/files/tgtd
@@ -0,0 +1,125 @@
+#!/sbin/runscript
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+TGTD_CONFIG=/etc/tgt/targets.conf
+
+TASK=$1
+
+depend() {
+ need net
+}
+
+start() {
+ ebegin "Starting target framework daemon"
+ ebegin "Starting ${SVCNAME}"
+ # Start tgtd first.
+ start-stop-daemon --start --quiet \
+ --name tgtd \
+ --exec /usr/sbin/tgtd
+ RETVAL=$?
+ if [ "$RETVAL" -ne 0 ] ; then
+ echo "Could not start tgtd (is tgtd already running?)"
+ exit 1
+ fi
+ # We need to wait for 1 second before do anything with tgtd
+ sleep 1
+ # Put tgtd into "offline" state until all the targets are configured.
+ # We don't want initiators to (re)connect and fail the connection
+ # if it's not ready
+ tgtadm --op update --mode sys --name State -v offline
+ # Configure the targets.
+ tgt-admin --update ALL -c $TGTD_CONFIG
+ # Put tgtd into "ready" state.
+ tgtadm --op update --mode sys --name State -v ready
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping ${SVCNAME}"
+ ebegin "Stopping target framework daemon"
+ # start-stop-daemon --stop --exec /usr/sbin/tgtd --quiet
+ if [ "$RUNLEVEL" == 0 -o "$RUNLEVEL" == 6 ] ; then
+ forcedstop
+ fi
+ # Remove all targets. It only removes targets which are not in use.
+ tgt-admin --update ALL -c /dev/null &>/dev/null
+ # tgtd will exit if all targets were removed
+ tgtadm --op delete --mode system &>/dev/null
+ RETVAL=$?
+ if [ "$RETVAL" -eq 107 ] ; then
+ echo "tgtd is not running"
+ if [ "$TASK" != "restart" ] ; then
+ exit 1
+ fi
+ elif [ "$RETVAL" -ne 0 ] ; then
+ echo "Some initiators are still connected - could not stop tgtd"
+ exit 2
+ fi
+ # echo -n
+ eend $?
+}
+
+forcedstop() {
+ # NOTE: Forced shutdown of the iscsi target may cause data corruption
+ # for initiators that are connected.
+ echo "Force-stopping target framework daemon"
+ # Offline everything first. May be needed if we're rebooting, but
+ # expect the initiators to reconnect cleanly when we boot again
+ # (i.e. we don't want them to reconnect to a tgtd which is still
+ # working, but the target is gone).
+ tgtadm --op update --mode sys --name State -v offline &>/dev/null
+ RETVAL=$?
+ if [ "$RETVAL" -eq 107 ] ; then
+ echo "tgtd is not running"
+ if [ "$TASK" != "restart" ] ; then
+ exit 1
+ fi
+ else
+ tgt-admin --offline ALL
+ # Remove all targets, even if they are still in use.
+ tgt-admin --update ALL -c /dev/null -f
+ # It will shut down tgtd only after all targets were removed.
+ tgtadm --op delete --mode system
+ RETVAL=$?
+ if [ "$RETVAL" -ne 0 ] ; then
+ echo "Failed to shutdown tgtd"
+ exit 1
+ fi
+ fi
+ echo -n
+}
+
+reload() {
+ echo "Updating target framework daemon configuration"
+ # Update configuration for targets. Only targets which
+ # are not in use will be updated.
+ tgt-admin --update ALL -c $TGTD_CONFIG &>/dev/null
+ RETVAL=$?
+ if [ "$RETVAL" -eq 107 ] ; then
+ echo "tgtd is not running"
+ exit 1
+ fi
+}
+
+forcedreload() {
+ echo "Force-updating target framework daemon configuration"
+ # Update configuration for targets, even those in use.
+ tgt-admin --update ALL -f -c $TGTD_CONFIG &>/dev/null
+ RETVAL=$?
+ if [ "$RETVAL" -eq 107 ] ; then
+ echo "tgtd is not running"
+ exit 1
+ fi
+}
+
+status() {
+ # Don't name this script "tgtd"...
+ TGTD_PROC=$(ps -C tgtd | grep -c tgtd)
+ if [ "$TGTD_PROC" -eq 2 ] ; then
+ echo "tgtd is running. Run 'tgt-admin -s' to see detailed target info."
+ else
+ echo "tgtd is NOT running."
+ fi
+}
diff --git a/sys-block/tgt/files/tgtd-1.0.24.confd b/sys-block/tgt/files/tgtd-1.0.24.confd
new file mode 100644
index 000000000000..fd4c098eaef2
--- /dev/null
+++ b/sys-block/tgt/files/tgtd-1.0.24.confd
@@ -0,0 +1,4 @@
+# Here you can specify options that are passed directly to tgt daemon
+TGTD_OPTS=""
+
+# vim: ft=gentoo-conf-d
diff --git a/sys-block/tgt/files/tgtd-1.0.24.initd b/sys-block/tgt/files/tgtd-1.0.24.initd
new file mode 100644
index 000000000000..f5e903516034
--- /dev/null
+++ b/sys-block/tgt/files/tgtd-1.0.24.initd
@@ -0,0 +1,126 @@
+#!/sbin/runscript
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+TGTD_CONFIG=/etc/tgt/targets.conf
+
+TASK=$1
+
+depend() {
+ need net
+}
+
+start() {
+ ebegin "Starting target framework daemon"
+ ebegin "Starting ${SVCNAME}"
+ # Start tgtd first.
+ start-stop-daemon --start --quiet \
+ --name tgtd \
+ --exec /usr/sbin/tgtd -- \
+ ${TGTD_OPTS}
+ RETVAL=$?
+ if [ "$RETVAL" -ne 0 ] ; then
+ echo "Could not start tgtd (is tgtd already running?)"
+ exit 1
+ fi
+ # We need to wait for 1 second before do anything with tgtd
+ sleep 1
+ # Put tgtd into "offline" state until all the targets are configured.
+ # We don't want initiators to (re)connect and fail the connection
+ # if it's not ready
+ tgtadm --op update --mode sys --name State -v offline
+ # Configure the targets.
+ tgt-admin --update ALL -c $TGTD_CONFIG
+ # Put tgtd into "ready" state.
+ tgtadm --op update --mode sys --name State -v ready
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping ${SVCNAME}"
+ ebegin "Stopping target framework daemon"
+ # start-stop-daemon --stop --exec /usr/sbin/tgtd --quiet
+ if [ "$RUNLEVEL" == 0 -o "$RUNLEVEL" == 6 ] ; then
+ forcedstop
+ fi
+ # Remove all targets. It only removes targets which are not in use.
+ tgt-admin --update ALL -c /dev/null &>/dev/null
+ # tgtd will exit if all targets were removed
+ tgtadm --op delete --mode system &>/dev/null
+ RETVAL=$?
+ if [ "$RETVAL" -eq 107 ] ; then
+ echo "tgtd is not running"
+ if [ "$TASK" != "restart" ] ; then
+ exit 1
+ fi
+ elif [ "$RETVAL" -ne 0 ] ; then
+ echo "Some initiators are still connected - could not stop tgtd"
+ exit 2
+ fi
+ # echo -n
+ eend $?
+}
+
+forcedstop() {
+ # NOTE: Forced shutdown of the iscsi target may cause data corruption
+ # for initiators that are connected.
+ echo "Force-stopping target framework daemon"
+ # Offline everything first. May be needed if we're rebooting, but
+ # expect the initiators to reconnect cleanly when we boot again
+ # (i.e. we don't want them to reconnect to a tgtd which is still
+ # working, but the target is gone).
+ tgtadm --op update --mode sys --name State -v offline &>/dev/null
+ RETVAL=$?
+ if [ "$RETVAL" -eq 107 ] ; then
+ echo "tgtd is not running"
+ if [ "$TASK" != "restart" ] ; then
+ exit 1
+ fi
+ else
+ tgt-admin --offline ALL
+ # Remove all targets, even if they are still in use.
+ tgt-admin --update ALL -c /dev/null -f
+ # It will shut down tgtd only after all targets were removed.
+ tgtadm --op delete --mode system
+ RETVAL=$?
+ if [ "$RETVAL" -ne 0 ] ; then
+ echo "Failed to shutdown tgtd"
+ exit 1
+ fi
+ fi
+ echo -n
+}
+
+reload() {
+ echo "Updating target framework daemon configuration"
+ # Update configuration for targets. Only targets which
+ # are not in use will be updated.
+ tgt-admin --update ALL -c $TGTD_CONFIG &>/dev/null
+ RETVAL=$?
+ if [ "$RETVAL" -eq 107 ] ; then
+ echo "tgtd is not running"
+ exit 1
+ fi
+}
+
+forcedreload() {
+ echo "Force-updating target framework daemon configuration"
+ # Update configuration for targets, even those in use.
+ tgt-admin --update ALL -f -c $TGTD_CONFIG &>/dev/null
+ RETVAL=$?
+ if [ "$RETVAL" -eq 107 ] ; then
+ echo "tgtd is not running"
+ exit 1
+ fi
+}
+
+status() {
+ # Don't name this script "tgtd"...
+ TGTD_PROC=$(ps -C tgtd | grep -c tgtd)
+ if [ "$TGTD_PROC" -eq 2 ] ; then
+ echo "tgtd is running. Run 'tgt-admin -s' to see detailed target info."
+ else
+ echo "tgtd is NOT running."
+ fi
+}
diff --git a/sys-block/tgt/files/tgtd.confd b/sys-block/tgt/files/tgtd.confd
new file mode 100644
index 000000000000..fd4c098eaef2
--- /dev/null
+++ b/sys-block/tgt/files/tgtd.confd
@@ -0,0 +1,4 @@
+# Here you can specify options that are passed directly to tgt daemon
+TGTD_OPTS=""
+
+# vim: ft=gentoo-conf-d
diff --git a/sys-block/tgt/files/tgtd.initd b/sys-block/tgt/files/tgtd.initd
new file mode 100644
index 000000000000..f8b5a1d4e43d
--- /dev/null
+++ b/sys-block/tgt/files/tgtd.initd
@@ -0,0 +1,125 @@
+#!/sbin/runscript
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+TGTD_CONFIG=/etc/tgt/targets.conf
+
+TASK=$1
+
+depend() {
+ need net
+}
+
+start() {
+ ebegin "Starting target framework daemon"
+ ebegin "Starting ${SVCNAME}"
+ # Start tgtd first.
+ start-stop-daemon --start --quiet \
+ --name tgtd \
+ --exec /usr/sbin/tgtd -- \
+ ${TGTD_OPTS}
+ RETVAL=$?
+ if [ "$RETVAL" -ne 0 ] ; then
+ echo "Could not start tgtd (is tgtd already running?)"
+ exit 1
+ fi
+ # We need to wait for 1 second before do anything with tgtd
+ sleep 1
+ # Put tgtd into "offline" state until all the targets are configured.
+ # We don't want initiators to (re)connect and fail the connection
+ # if it's not ready
+ tgtadm --op update --mode sys --name State -v offline
+ # Configure the targets.
+ tgt-admin --update ALL -c $TGTD_CONFIG
+ # Put tgtd into "ready" state.
+ tgtadm --op update --mode sys --name State -v ready
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping ${SVCNAME}"
+ ebegin "Stopping target framework daemon"
+ # start-stop-daemon --stop --exec /usr/sbin/tgtd --quiet
+ if [ "$RUNLEVEL" == 0 -o "$RUNLEVEL" == 6 ] ; then
+ forcedstop
+ fi
+ # Remove all targets. It only removes targets which are not in use.
+ tgt-admin --update ALL -c /dev/null &>/dev/null
+ # tgtd will exit if all targets were removed
+ tgtadm --op delete --mode system &>/dev/null
+ RETVAL=$?
+ if [ "$RETVAL" -eq 107 ] ; then
+ echo "tgtd is not running"
+ if [ "$TASK" != "restart" ] ; then
+ exit 1
+ fi
+ elif [ "$RETVAL" -ne 0 ] ; then
+ echo "Some initiators are still connected - could not stop tgtd"
+ exit 2
+ fi
+ # echo -n
+ eend $?
+}
+
+forcedstop() {
+ # NOTE: Forced shutdown of the iscsi target may cause data corruption
+ # for initiators that are connected.
+ echo "Force-stopping target framework daemon"
+ # Offline everything first. May be needed if we're rebooting, but
+ # expect the initiators to reconnect cleanly when we boot again
+ # (i.e. we don't want them to reconnect to a tgtd which is still
+ # working, but the target is gone).
+ tgtadm --op update --mode sys --name State -v offline &>/dev/null
+ RETVAL=$?
+ if [ "$RETVAL" -eq 107 ] ; then
+ echo "tgtd is not running"
+ if [ "$TASK" != "restart" ] ; then
+ exit 1
+ fi
+ else
+ tgt-admin --offline ALL
+ # Remove all targets, even if they are still in use.
+ tgt-admin --update ALL -c /dev/null -f
+ # It will shut down tgtd only after all targets were removed.
+ tgtadm --op delete --mode system
+ RETVAL=$?
+ if [ "$RETVAL" -ne 0 ] ; then
+ echo "Failed to shutdown tgtd"
+ exit 1
+ fi
+ fi
+ echo -n
+}
+
+reload() {
+ echo "Updating target framework daemon configuration"
+ # Update configuration for targets. Only targets which
+ # are not in use will be updated.
+ tgt-admin --update ALL -c $TGTD_CONFIG &>/dev/null
+ RETVAL=$?
+ if [ "$RETVAL" -eq 107 ] ; then
+ echo "tgtd is not running"
+ exit 1
+ fi
+}
+
+forcedreload() {
+ echo "Force-updating target framework daemon configuration"
+ # Update configuration for targets, even those in use.
+ tgt-admin --update ALL -f -c $TGTD_CONFIG &>/dev/null
+ RETVAL=$?
+ if [ "$RETVAL" -eq 107 ] ; then
+ echo "tgtd is not running"
+ exit 1
+ fi
+}
+
+status() {
+ TGTD_PROC=$(pidof -c -o $$ -o %PPID tgtd)
+ if [ -n "$TGTD_PROC" ] ; then
+ echo "tgtd is running. Run 'tgt-admin -s' to see detailed target info."
+ else
+ echo "tgtd is NOT running."
+ fi
+}
diff --git a/sys-block/tgt/metadata.xml b/sys-block/tgt/metadata.xml
new file mode 100644
index 000000000000..a8b121f2ed61
--- /dev/null
+++ b/sys-block/tgt/metadata.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>cluster</herd>
+ <maintainer>
+ <email>prometheanfire@gentoo.org</email>
+ <name>Matthew Thode</name>
+ </maintainer>
+ <longdescription>
+iSCSI Target daemon with rdma support
+</longdescription>
+ <use>
+ <flag name="ibmvio">Add support for IBM Virtual I/O</flag>
+ <flag name="fcp">Add support for new FC protocol</flag>
+ <flag name="fcoe">Add support for FCoE protocol</flag>
+ <flag name="rbd">Add support for ceph block devices</flag>
+ </use>
+ <upstream>
+ <remote-id type="github">fujita/tgt</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/sys-block/tgt/tgt-1.0.19.ebuild b/sys-block/tgt/tgt-1.0.19.ebuild
new file mode 100644
index 000000000000..d7c0173183df
--- /dev/null
+++ b/sys-block/tgt/tgt-1.0.19.ebuild
@@ -0,0 +1,51 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit flag-o-matic linux-info
+
+DESCRIPTION="Linux SCSI target framework (tgt)"
+HOMEPAGE="http://stgt.sourceforge.net"
+SRC_URI="http://stgt.sourceforge.net/releases/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="ibmvio infiniband fcp fcoe"
+
+DEPEND="dev-perl/Config-General
+ infiniband? (
+ sys-infiniband/libibverbs
+ sys-infiniband/librdmacm
+ )"
+RDEPEND="${DEPEND}
+ sys-apps/sg3_utils"
+
+pkg_setup() {
+ CONFIG_CHECK="~SCSI_TGT"
+ WARNING_SCSI_TGT="Your kernel needs CONFIG_SCSI_TGT"
+ linux-info_pkg_setup
+}
+
+src_configure() {
+ use ibmvio && myconf="${myconf} IBMVIO=1"
+ use infiniband && myconf="${myconf} ISCSI_RDMA=1"
+ use fcp && myconf="${myconf} FCP=1"
+ use fcoe && myconf="${myconf} FCOE=1"
+
+ sed -e 's:\($(CC)\):\1 $(LDFLAGS):' -i usr/Makefile || die "sed failed"
+}
+
+src_compile() {
+ emake -C usr/ KERNELSRC="${KERNEL_DIR}" ISCSI=1 ${myconf}
+}
+
+src_install() {
+ emake install-programs install-scripts install-doc DESTDIR="${D}" \
+ docdir=/usr/share/doc/${PF}
+ doinitd "${FILESDIR}/tgtd"
+ dodir /etc/tgt
+ keepdir /etc/tgt
+}
diff --git a/sys-block/tgt/tgt-1.0.22.ebuild b/sys-block/tgt/tgt-1.0.22.ebuild
new file mode 100644
index 000000000000..b7517dac4834
--- /dev/null
+++ b/sys-block/tgt/tgt-1.0.22.ebuild
@@ -0,0 +1,60 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit flag-o-matic linux-info
+
+MY_TREE="3e216c9"
+
+DESCRIPTION="Linux SCSI target framework (tgt)"
+HOMEPAGE="http://stgt.sourceforge.net"
+SRC_URI="https://github.com/fujita/tgt/tarball/v${PV} -> ${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="ibmvio infiniband fcp fcoe"
+
+DEPEND="dev-perl/Config-General
+ dev-libs/libxslt
+ infiniband? (
+ sys-infiniband/libibverbs
+ sys-infiniband/librdmacm
+ )"
+RDEPEND="${DEPEND}
+ sys-apps/sg3_utils"
+
+S="${WORKDIR}"/fujita-tgt-"${MY_TREE}"
+
+pkg_setup() {
+ CONFIG_CHECK="~SCSI_TGT"
+ WARNING_SCSI_TGT="Your kernel needs CONFIG_SCSI_TGT"
+ linux-info_pkg_setup
+}
+
+src_prepare() {
+ sed -i -e 's:\($(CC)\):\1 $(LDFLAGS):' usr/Makefile || die "sed failed"
+
+ # make sure xml docs are generated before trying to install them
+ sed -i -e "s@install: @install: all @g" doc/Makefile || die
+}
+
+src_compile() {
+ local myconf
+ use ibmvio && myconf="${myconf} IBMVIO=1"
+ use infiniband && myconf="${myconf} ISCSI_RDMA=1"
+ use fcp && myconf="${myconf} FCP=1"
+ use fcoe && myconf="${myconf} FCOE=1"
+
+ emake -C usr/ KERNELSRC="${KERNEL_DIR}" ISCSI=1 ${myconf}
+}
+
+src_install() {
+ emake install-programs install-scripts install-doc DESTDIR="${D}" \
+ docdir=/usr/share/doc/${PF}
+ doinitd "${FILESDIR}/tgtd"
+ dodir /etc/tgt
+ keepdir /etc/tgt
+}
diff --git a/sys-block/tgt/tgt-1.0.24-r1.ebuild b/sys-block/tgt/tgt-1.0.24-r1.ebuild
new file mode 100644
index 000000000000..cccaeb8cad23
--- /dev/null
+++ b/sys-block/tgt/tgt-1.0.24-r1.ebuild
@@ -0,0 +1,65 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit flag-o-matic linux-info toolchain-funcs
+
+MY_TREE="e039354"
+
+DESCRIPTION="Linux SCSI target framework (tgt)"
+HOMEPAGE="http://stgt.sourceforge.net"
+SRC_URI="https://github.com/fujita/tgt/tarball/v${PV} -> ${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="ibmvio infiniband fcp fcoe"
+
+CDEPEND="dev-perl/Config-General
+ dev-libs/libxslt
+ infiniband? (
+ sys-infiniband/libibverbs
+ sys-infiniband/librdmacm
+ )"
+DEPEND="${CDEPEND}
+ app-text/docbook-xsl-stylesheets"
+RDEPEND="${DEPEND}
+ sys-apps/sg3_utils"
+
+S=${WORKDIR}/fujita-tgt-${MY_TREE}
+
+pkg_setup() {
+ CONFIG_CHECK="~SCSI_TGT"
+ WARNING_SCSI_TGT="Your kernel needs CONFIG_SCSI_TGT"
+ linux-info_pkg_setup
+ tc-export CC
+}
+
+src_prepare() {
+ sed -i -e 's:\($(CC)\) $^:\1 $(LDFLAGS) $^:' usr/Makefile || die
+
+ # make sure xml docs are generated before trying to install them
+ sed -i -e "s@install: @& all @g" doc/Makefile || die
+}
+
+src_compile() {
+ local myconf
+ use ibmvio && myconf="${myconf} IBMVIO=1"
+ use infiniband && myconf="${myconf} ISCSI_RDMA=1"
+ use fcp && myconf="${myconf} FCP=1"
+ use fcoe && myconf="${myconf} FCOE=1"
+
+ emake -C usr/ KERNELSRC="${KERNEL_DIR}" ISCSI=1 ${myconf}
+ emake -C doc
+}
+
+src_install() {
+ emake install-programs install-scripts install-doc DESTDIR="${D}" \
+ docdir=/usr/share/doc/${PF}
+ newinitd "${FILESDIR}"/tgtd-${PV}.initd tgtd
+ newconfd "${FILESDIR}"/tgtd-${PV}.confd tgtd
+ dodir /etc/tgt
+ keepdir /etc/tgt
+}
diff --git a/sys-block/tgt/tgt-1.0.60.ebuild b/sys-block/tgt/tgt-1.0.60.ebuild
new file mode 100644
index 000000000000..bb1d7a6fc9cc
--- /dev/null
+++ b/sys-block/tgt/tgt-1.0.60.ebuild
@@ -0,0 +1,64 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit flag-o-matic toolchain-funcs
+
+MY_TREE="ab51727"
+
+DESCRIPTION="Linux SCSI target framework (tgt)"
+HOMEPAGE="http://stgt.sourceforge.net"
+SRC_URI="https://github.com/fujita/tgt/tarball/v${PV} -> ${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="fcoe fcp ibmvio infiniband rbd"
+
+CDEPEND="dev-perl/Config-General
+ dev-libs/libxslt
+ rbd? ( sys-cluster/ceph )
+ infiniband? (
+ sys-infiniband/libibverbs:=
+ sys-infiniband/librdmacm:=
+ )"
+DEPEND="${CDEPEND}
+ app-text/docbook-xsl-stylesheets"
+RDEPEND="${DEPEND}
+ dev-libs/libaio
+ sys-apps/sg3_utils"
+
+S=${WORKDIR}/fujita-tgt-${MY_TREE}
+
+pkg_setup() {
+ tc-export CC
+}
+
+src_prepare() {
+ sed -i -e 's:\($(CC)\) $^:\1 $(LDFLAGS) $^:' usr/Makefile || die
+
+ # make sure xml docs are generated before trying to install them
+ sed -i -e "s@install: @& all @g" doc/Makefile || die
+}
+
+src_compile() {
+ local myconf
+ use ibmvio && myconf="${myconf} IBMVIO=1"
+ use infiniband && myconf="${myconf} ISCSI_RDMA=1"
+ use fcp && myconf="${myconf} FCP=1"
+ use fcoe && myconf="${myconf} FCOE=1"
+ use rbd && myconf="${myconf} CEPH_RBD=1"
+
+ emake -C usr/ KERNELSRC="${KERNEL_DIR}" ISCSI=1 ${myconf}
+ emake -C doc
+}
+
+src_install() {
+ emake install-programs install-scripts install-doc DESTDIR="${D}" docdir=/usr/share/doc/${PF}
+ newinitd "${FILESDIR}"/tgtd.initd tgtd
+ newconfd "${FILESDIR}"/tgtd.confd tgtd
+ dodir /etc/tgt
+ keepdir /etc/tgt
+}