diff options
author | Richard Yao <ryao@gentoo.org> | 2013-01-03 11:09:58 +0000 |
---|---|---|
committer | Richard Yao <ryao@gentoo.org> | 2013-01-03 11:09:58 +0000 |
commit | df313e458ce2fe3d1b719014b350460a20e7959a (patch) | |
tree | c47a3951698c85246b9eeb0a1c8d55f290af0512 /sys-block | |
parent | Stable for amd64, wrt bug #449912 (diff) | |
download | gentoo-2-df313e458ce2fe3d1b719014b350460a20e7959a.tar.gz gentoo-2-df313e458ce2fe3d1b719014b350460a20e7959a.tar.bz2 gentoo-2-df313e458ce2fe3d1b719014b350460a20e7959a.zip |
Change primary maintainer to ryao (as per Chainsaw) and import snapshot of upstream SVN to add support for Linux 2.6.38 to Linux 3.6
(Portage version: 2.1.11.31/cvs/Linux x86_64, unsigned Manifest commit)
Diffstat (limited to 'sys-block')
6 files changed, 432 insertions, 4 deletions
diff --git a/sys-block/iscsitarget/ChangeLog b/sys-block/iscsitarget/ChangeLog index e84791341390..4936d1ff5e83 100644 --- a/sys-block/iscsitarget/ChangeLog +++ b/sys-block/iscsitarget/ChangeLog @@ -1,6 +1,17 @@ # ChangeLog for sys-block/iscsitarget -# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-block/iscsitarget/ChangeLog,v 1.40 2011/02/16 22:16:27 hwoarang Exp $ +# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/sys-block/iscsitarget/ChangeLog,v 1.41 2013/01/03 11:09:58 ryao Exp $ + +*iscsitarget-9999 (03 Jan 2013) +*iscsitarget-1.4.20.2_p20130103 (03 Jan 2013) + + 03 Jan 2013; Richard Yao <ryao@gentoo.org> + +files/iscsitarget-1.4.20.2_p20130103-fix-3.2-support.patch, + +files/iscsitarget-1.4.20.2_p20130103-restore-linux-2.6.32-support.patch, + +iscsitarget-1.4.20.2_p20130103.ebuild, +iscsitarget-9999.ebuild, + metadata.xml: + Change primary maintainer to ryao (as per Chainsaw) and import snapshot of + upstream SVN to add support for Linux 2.6.38 to Linux 3.6 16 Feb 2011; Markos Chandras <hwoarang@gentoo.org> iscsitarget-1.4.20.2.ebuild, +files/iscsitarget-1.4.20.2-respect-flags.patch: @@ -204,4 +215,3 @@ +iscsitarget-0.4.12.ebuild: Initial commit - bug #98781, based on ebuild submitted by Dick Marinus <dm@chello.nl>. - diff --git a/sys-block/iscsitarget/files/iscsitarget-1.4.20.2_p20130103-fix-3.2-support.patch b/sys-block/iscsitarget/files/iscsitarget-1.4.20.2_p20130103-fix-3.2-support.patch new file mode 100644 index 000000000000..d41751535d31 --- /dev/null +++ b/sys-block/iscsitarget/files/iscsitarget-1.4.20.2_p20130103-fix-3.2-support.patch @@ -0,0 +1,135 @@ +diff --git a/Makefile b/Makefile +index df41642..f2f17c8 100644 +--- a/Makefile ++++ b/Makefile +@@ -46,18 +46,10 @@ kver_lt = $(shell [ $(KMAJ) -lt $(1) -o \ + $(KMAJ) -eq $(1) -a $(KMIN) -lt $(2) -o \ + $(KMAJ) -eq $(1) -a $(KMIN) -eq $(2) -a $(KREV) -lt $(3) ] && \ + echo 1 || echo 0) +-kver_le = $(shell [ $(KMAJ) -lt $(1) -o \ +- $(KMAJ) -eq $(1) -a $(KMIN) -lt $(2) -o \ +- $(KMAJ) -eq $(1) -a $(KMIN) -eq $(2) -a $(KREV) -le $(3) ] && \ +- echo 1 || echo 0) +-kver_gt = $(shell [ ( $(KMAJ) -gt $(1) ) -o \ ++kver_gt = $(shell [ $(KMAJ) -gt $(1) -o \ + $(KMAJ) -eq $(1) -a $(KMIN) -gt $(2) -o \ + $(KMAJ) -eq $(1) -a $(KMIN) -eq $(2) -a $(KREV) -gt $(3) ] && \ + echo 1 || echo 0) +-kver_ge = $(shell [ ( $(KMAJ) -gt $(1) ) -o \ +- $(KMAJ) -eq $(1) -a $(KMIN) -gt $(2) -o \ +- $(KMAJ) -eq $(1) -a $(KMIN) -eq $(2) -a $(KREV) -ge $(3) ] && \ +- echo 1 || echo 0) + kver_lk = $(shell [ `echo $(KVER) | egrep $(1)` ] && echo 1 || echo 0) + + # +@@ -66,85 +58,93 @@ kver_lk = $(shell [ `echo $(KVER) | egrep $(1)` ] && echo 1 || echo 0) + # base first the earlier patch sets will not need to be modified. + # + +-ifeq ($(call kver_le,3,5,0),1) ++ifeq ($(call kver_lt,3,6,0),1) + PATCHES := $(PATCHES) compat-3.5.patch + endif + +-ifeq ($(call kver_le,3,4,0),1) ++ifeq ($(call kver_lt,3,5,0),1) + PATCHES := $(PATCHES) compat-3.2-3.4.patch + endif + +-ifeq ($(call kver_le,3,2,0),1) ++ifeq ($(call kver_lt,3,3,0),1) + PATCHES := $(PATCHES) compat-2.6.39-3.2.patch + endif + +-ifeq ($(call kver_le,2,6,38),1) ++ifeq ($(call kver_lt,2,6,39),1) + PATCHES := $(PATCHES) compat-2.6.38.patch + endif + +-ifeq ($(call kver_le,2,6,37),1) ++ifeq ($(call kver_lt,2,6,38),1) + PATCHES := $(PATCHES) compat-2.6.36-2.6.37.patch + endif + + # Compatibility patch for kernels > 2.6.32 <= 2.6.35 +-ifeq ($(call kver_le,2,6,35),1) ++ifeq ($(call kver_lt,2,6,36),1) ++ifeq ($(call kver_gt,2,6,32),1) + PATCHES := $(PATCHES) compat-2.6.33-2.6.35.patch + endif ++endif + + # Compatibility patch for kernels <= 2.6.32 +-ifeq ($(call kver_le,2,6,32),1) ++ifeq ($(call kver_lt,2,6,33),1) + PATCHES := $(PATCHES) compat-2.6.32.patch + endif + + # Compatibility patch for kernels <= 2.6.31 +-ifeq ($(call kver_le,2,6,31),1) ++ifeq ($(call kver_lt,2,6,32),1) + PATCHES := $(PATCHES) compat-2.6.31.patch + endif + + # Compatibility patch for kernels <= 2.6.30 +-ifeq ($(call kver_le,2,6,30),1) ++ifeq ($(call kver_lt,2,6,31),1) + PATCHES := $(PATCHES) compat-2.6.30.patch + endif + + # Compatibility patch for kernels <= 2.6.29 +-ifeq ($(call kver_le,2,6,29),1) ++ifeq ($(call kver_lt,2,6,30),1) + PATCHES := $(PATCHES) compat-2.6.29.patch + endif + + # Compatibility patch for kernels <= 2.6.28 +-ifeq ($(call kver_le,2,6,28),1) ++ifeq ($(call kver_lt,2,6,29),1) + PATCHES := $(PATCHES) compat-2.6.28.patch + endif + + # Compatibility patch for kernels >= 2.6.25 and <= 2.6.27 +-ifeq ($(call kver_le,2,6,27),1) ++ifeq ($(call kver_lt,2,6,28),1) ++ifeq ($(call kver_gt,2,6,24),1) + PATCHES := $(PATCHES) compat-2.6.25-2.6.27.patch + endif ++endif + + # Compatibility patch for kernels <= 2.6.24 +-ifeq ($(call kver_le,2,6,24),1) ++ifeq ($(call kver_lt,2,6,25),1) + PATCHES := $(PATCHES) compat-2.6.24.patch + endif + + # Compatibility patch for kernels <= 2.6.23 +-ifeq ($(call kver_le,2,6,23),1) ++ifeq ($(call kver_lt,2,6,24),1) + PATCHES := $(PATCHES) compat-2.6.23.patch + endif + + # Compatibility patch for kernels <= 2.6.22 +-ifeq ($(call kver_le,2,6,22),1) ++ifeq ($(call kver_lt,2,6,23),1) + PATCHES := $(PATCHES) compat-2.6.22.patch + endif + + # Compatibility patch for kernels >= 2.6.19 and <= 2.6.21 +-ifeq ($(call kver_le,2,6,21),1) ++ifeq ($(call kver_lt,2,6,22),1) ++ifeq ($(call kver_gt,2,6,18),1) + PATCHES := $(PATCHES) compat-2.6.19-2.6.21.patch + endif ++endif + + # Compatibility patch for kernels >= 2.6.14 and <= 2.6.18 +-ifeq ($(call kver_le,2,6,18),1) ++ifeq ($(call kver_lt,2,6,19),1) ++ifeq ($(call kver_gt,2,6,13),1) + PATCHES := $(PATCHES) compat-2.6.14-2.6.18.patch + endif ++endif + + # We don't support kernels < 2.6.14 except for explicit distros + ifeq ($(call kver_lt,2,6,14),1) diff --git a/sys-block/iscsitarget/files/iscsitarget-1.4.20.2_p20130103-restore-linux-2.6.32-support.patch b/sys-block/iscsitarget/files/iscsitarget-1.4.20.2_p20130103-restore-linux-2.6.32-support.patch new file mode 100644 index 000000000000..cc6a0b8c7e3c --- /dev/null +++ b/sys-block/iscsitarget/files/iscsitarget-1.4.20.2_p20130103-restore-linux-2.6.32-support.patch @@ -0,0 +1,96 @@ +diff --git a/kernel/iscsi.c b/kernel/iscsi.c +index 9ad3047..37d7753 100644 +--- a/kernel/iscsi.c ++++ b/kernel/iscsi.c +@@ -773,6 +773,7 @@ static void set_offset_and_length(const struct iet_volume *lu, + break; + case READ_16: + case WRITE_16: ++#ifdef WRITE_SAME_16 + case WRITE_SAME_16: + *off = (u64)cmd[2] << 56 | (u64)cmd[3] << 48 | + (u64)cmd[4] << 40 | (u64)cmd[5] << 32 | +@@ -781,6 +782,7 @@ static void set_offset_and_length(const struct iet_volume *lu, + *len = (u32)cmd[10] << 24 | (u32)cmd[11] << 16 | + (u32)cmd[12] << 8 | (u32)cmd[13]; + break; ++#endif + case PERSISTENT_RESERVE_OUT: + { + const struct persistent_reserve_out *pr_out = +@@ -1036,6 +1038,7 @@ static void scsi_cmnd_start(struct iscsi_conn *conn, struct iscsi_cmnd *req) + case WRITE_10: + case WRITE_16: + case WRITE_VERIFY: ++#ifdef WRITE_SAME_16 + case WRITE_SAME_16: + { + struct iscsi_sess_param *param = &conn->session->param; +@@ -1104,6 +1107,7 @@ static void scsi_cmnd_start(struct iscsi_conn *conn, struct iscsi_cmnd *req) + } + break; + } ++#endif + error: + default: + eprintk("Unsupported %x\n", req_hdr->scb[0]); +diff --git a/kernel/iscsi_dbg.h b/kernel/iscsi_dbg.h +index 8c9b928..ad5c6d4 100644 +--- a/kernel/iscsi_dbg.h ++++ b/kernel/iscsi_dbg.h +@@ -12,7 +12,9 @@ + #define D_IOMODE (1UL << 8) + #define D_UAC (1UL << 9) + #define D_PR (1UL << 10) ++#ifdef WRITE_SAME_16 + #define D_VAAI (1UL << 11) ++#endif + + #define D_DATA (D_READ | D_WRITE) + +diff --git a/kernel/target_disk.c b/kernel/target_disk.c +index 6b1de2c..ca28e4e 100644 +--- a/kernel/target_disk.c ++++ b/kernel/target_disk.c +@@ -408,6 +408,7 @@ static void build_write_response(struct iscsi_cmnd *cmnd) + iscsi_cmnd_set_sense(cmnd, MEDIUM_ERROR, 0x03, 0x0); + } + ++#ifdef WRITE_SAME_16 + static void build_write_same_response(struct iscsi_cmnd *cmnd) { + int err; + struct tio *target_tio; +@@ -475,6 +476,7 @@ static void build_write_same_response(struct iscsi_cmnd *cmnd) { + + tio_put(target_tio); + } ++#endif + + static void build_sync_cache_response(struct iscsi_cmnd *cmnd) + { +@@ -618,9 +620,11 @@ static int disk_execute_cmnd(struct iscsi_cmnd *cmnd) + case WRITE_VERIFY: + send_scsi_rsp(cmnd, build_write_response); + break; ++#ifdef WRITE_SAME_16 + case WRITE_SAME_16: + send_scsi_rsp(cmnd, build_write_same_response); + break; ++#endif + case SYNCHRONIZE_CACHE: + send_scsi_rsp(cmnd, build_sync_cache_response); + break; +diff --git a/kernel/volume.c b/kernel/volume.c +index 8beeb1e..6ad2a3d 100644 +--- a/kernel/volume.c ++++ b/kernel/volume.c +@@ -446,7 +446,9 @@ int is_volume_reserved(struct iet_volume *volume, u64 sid, u8 *scb) + case WRITE_10: + case WRITE_12: + case WRITE_16: ++#ifdef WRITE_SAME_16 + case WRITE_SAME_16: ++#endif + case WRITE_VERIFY: + case SYNCHRONIZE_CACHE: + if (write_excl || excl_access) diff --git a/sys-block/iscsitarget/iscsitarget-1.4.20.2_p20130103.ebuild b/sys-block/iscsitarget/iscsitarget-1.4.20.2_p20130103.ebuild new file mode 100644 index 000000000000..7cd97fc35cdc --- /dev/null +++ b/sys-block/iscsitarget/iscsitarget-1.4.20.2_p20130103.ebuild @@ -0,0 +1,91 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-block/iscsitarget/iscsitarget-1.4.20.2_p20130103.ebuild,v 1.1 2013/01/03 11:09:58 ryao Exp $ + +EAPI="4" + +inherit linux-mod eutils flag-o-matic + +if [ ${PV} == "9999" ] ; then + inherit subversion + ESVN_REPO_URI="http://iscsitarget.svn.sourceforge.net/svnroot/iscsitarget/trunk" +else + SRC_URI="http://dev.gentoo.org/~ryao/dist/${P}.tar.gz" + KEYWORDS="~amd64 ~ppc ~x86" +fi + +DESCRIPTION="Open Source iSCSI target with professional features" +HOMEPAGE="http://iscsitarget.sourceforge.net/" + +LICENSE="GPL-2" +SLOT="0" +IUSE="" + +DEPEND="dev-libs/openssl" +RDEPEND="${DEPEND}" + +MODULE_NAMES="iscsi_trgt(misc:${S}/kernel)" + +pkg_setup() { + CONFIG_CHECK="CRYPTO_CRC32C" + ERROR_CFG="iscsitarget needs support for CRC32C in your kernel." + + kernel_is ge 2 6 14 || die "Linux 2.6.14 or newer required" + + [ ${PV} != "9999" ] && \ + { kernel_is le 3 6 || die "Linux 3.6 is the latest supported version."; } + + linux-mod_pkg_setup +} +src_prepare() { + if [ ${PV} != "9999" ] + then + # Fix build system to apply proper patches + epatch "${FILESDIR}/${PN}-1.4.20.2_p20130103-fix-3.2-support.patch" + + # Apply kernel-specific patches + emake KSRC="${KERNEL_DIR}" patch || die + + # Respect LDFLAGS. Bug #365735 + epatch "${FILESDIR}/${PN}-1.4.20.2-respect-flags-v2.patch" + + # Avoid use of WRITE_SAME_16 in Linux 2.6.32 and earlier + epatch "${FILESDIR}/${PN}-1.4.20.2_p20130103-restore-linux-2.6.32-support.patch" + fi +} + +src_compile() { + emake KSRC="${KERNEL_DIR}" usr || die + + unset ARCH + emake KSRC="${KERNEL_DIR}" kernel || die +} + +src_install() { + einfo "Installing userspace" + + # Install ietd into libexec; we don't need ietd to be in the path + # for ROOT, since it's just a service. + exeinto /usr/libexec + doexe usr/ietd || die + + dosbin usr/ietadm || die + + insinto /etc + doins etc/ietd.conf etc/initiators.allow || die + + # We moved ietd in /usr/libexec, so update the init script accordingly. + sed -e 's:/usr/sbin/ietd:/usr/libexec/ietd:' "${FILESDIR}"/ietd-init.d-2 > "${T}"/ietd-init.d + newinitd "${T}"/ietd-init.d ietd || die + newconfd "${FILESDIR}"/ietd-conf.d ietd || die + + # Lock down perms, per bug 198209 + fperms 0640 /etc/ietd.conf /etc/initiators.allow + + doman doc/manpages/*.[1-9] || die + dodoc ChangeLog README RELEASE_NOTES README.initiators README.mcs README.vmware || die + + einfo "Installing kernel module" + unset ARCH + linux-mod_src_install || die +} diff --git a/sys-block/iscsitarget/iscsitarget-9999.ebuild b/sys-block/iscsitarget/iscsitarget-9999.ebuild new file mode 100644 index 000000000000..4b15ff0d35b5 --- /dev/null +++ b/sys-block/iscsitarget/iscsitarget-9999.ebuild @@ -0,0 +1,91 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-block/iscsitarget/iscsitarget-9999.ebuild,v 1.1 2013/01/03 11:09:58 ryao Exp $ + +EAPI="4" + +inherit linux-mod eutils flag-o-matic + +if [ ${PV} == "9999" ] ; then + inherit subversion + ESVN_REPO_URI="http://iscsitarget.svn.sourceforge.net/svnroot/iscsitarget/trunk" +else + SRC_URI="http://dev.gentoo.org/~ryao/dist/${P}.tar.gz" + KEYWORDS="~amd64 ~ppc ~x86" +fi + +DESCRIPTION="Open Source iSCSI target with professional features" +HOMEPAGE="http://iscsitarget.sourceforge.net/" + +LICENSE="GPL-2" +SLOT="0" +IUSE="" + +DEPEND="dev-libs/openssl" +RDEPEND="${DEPEND}" + +MODULE_NAMES="iscsi_trgt(misc:${S}/kernel)" + +pkg_setup() { + CONFIG_CHECK="CRYPTO_CRC32C" + ERROR_CFG="iscsitarget needs support for CRC32C in your kernel." + + kernel_is ge 2 6 14 || die "Linux 2.6.14 or newer required" + + [ ${PV} != "9999" ] && \ + { kernel_is le 3 6 || die "Linux 3.6 is the latest supported version."; } + + linux-mod_pkg_setup +} +src_prepare() { + if [ ${PV} != "9999" ] + then + # Fix build system to apply proper patches + epatch "${FILESDIR}/${PN}-1.4.20.2_p20130103-fix-3.2-support.patch" + + # Apply kernel-specific patches + emake KSRC="${KERNEL_DIR}" patch || die + + # Respect LDFLAGS. Bug #365735 + epatch "${FILESDIR}/${PN}-1.4.20.2-respect-flags-v2.patch" + + # Avoid use of WRITE_SAME_16 in Linux 2.6.32 and earlier + epatch "${FILESDIR}/${PN}-1.4.20.2_p20130103-restore-linux-2.6.32-support.patch" + fi +} + +src_compile() { + emake KSRC="${KERNEL_DIR}" usr || die + + unset ARCH + emake KSRC="${KERNEL_DIR}" kernel || die +} + +src_install() { + einfo "Installing userspace" + + # Install ietd into libexec; we don't need ietd to be in the path + # for ROOT, since it's just a service. + exeinto /usr/libexec + doexe usr/ietd || die + + dosbin usr/ietadm || die + + insinto /etc + doins etc/ietd.conf etc/initiators.allow || die + + # We moved ietd in /usr/libexec, so update the init script accordingly. + sed -e 's:/usr/sbin/ietd:/usr/libexec/ietd:' "${FILESDIR}"/ietd-init.d-2 > "${T}"/ietd-init.d + newinitd "${T}"/ietd-init.d ietd || die + newconfd "${FILESDIR}"/ietd-conf.d ietd || die + + # Lock down perms, per bug 198209 + fperms 0640 /etc/ietd.conf /etc/initiators.allow + + doman doc/manpages/*.[1-9] || die + dodoc ChangeLog README RELEASE_NOTES README.initiators README.mcs README.vmware || die + + einfo "Installing kernel module" + unset ARCH + linux-mod_src_install || die +} diff --git a/sys-block/iscsitarget/metadata.xml b/sys-block/iscsitarget/metadata.xml index 96a2d586367d..630808c221b3 100644 --- a/sys-block/iscsitarget/metadata.xml +++ b/sys-block/iscsitarget/metadata.xml @@ -1,5 +1,10 @@ <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> <pkgmetadata> -<herd>base-system</herd> + <herd>base-system</herd> + <maintainer> + <email>ryao@gentoo.org</email> + <name>Richard Yao</name> + <description>Primary maintainer</description> + </maintainer> </pkgmetadata> |