diff options
author | Diego Elio Pettenò <flameeyes@gentoo.org> | 2009-10-18 11:36:48 +0000 |
---|---|---|
committer | Diego Elio Pettenò <flameeyes@gentoo.org> | 2009-10-18 11:36:48 +0000 |
commit | 8beab659605403fa4968f6ab9c8e3fef14095dc2 (patch) | |
tree | 31cc3934bc5b5bc540569579d201b6131857da70 /sys-block | |
parent | Stabilizing for ppc. (diff) | |
download | gentoo-2-8beab659605403fa4968f6ab9c8e3fef14095dc2.tar.gz gentoo-2-8beab659605403fa4968f6ab9c8e3fef14095dc2.tar.bz2 gentoo-2-8beab659605403fa4968f6ab9c8e3fef14095dc2.zip |
Version bump and add patch to build with 2.6.32. Move the ietd binary to /usr/libexec since it should never be executed directly.
(Portage version: 2.2_rc46/cvs/Linux x86_64)
Diffstat (limited to 'sys-block')
-rw-r--r-- | sys-block/iscsitarget/ChangeLog | 9 | ||||
-rw-r--r-- | sys-block/iscsitarget/files/iscsitarget-1.4.18+linux-2.6.32.patch | 42 | ||||
-rw-r--r-- | sys-block/iscsitarget/iscsitarget-1.4.18.ebuild | 66 |
3 files changed, 116 insertions, 1 deletions
diff --git a/sys-block/iscsitarget/ChangeLog b/sys-block/iscsitarget/ChangeLog index 8a7d539a48fa..4bdc36a90f3c 100644 --- a/sys-block/iscsitarget/ChangeLog +++ b/sys-block/iscsitarget/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for sys-block/iscsitarget # Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-block/iscsitarget/ChangeLog,v 1.28 2009/07/15 18:52:23 flameeyes Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-block/iscsitarget/ChangeLog,v 1.29 2009/10/18 11:36:47 flameeyes Exp $ + +*iscsitarget-1.4.18 (18 Oct 2009) + + 18 Oct 2009; Diego E. Pettenò <flameeyes@gentoo.org> + +iscsitarget-1.4.18.ebuild, +files/iscsitarget-1.4.18+linux-2.6.32.patch: + Version bump and add patch to build with 2.6.32. Move the ietd binary to + /usr/libexec since it should never be executed directly. 15 Jul 2009; Diego E. Pettenò <flameeyes@gentoo.org> -iscsitarget-0.4.16_p162.ebuild: diff --git a/sys-block/iscsitarget/files/iscsitarget-1.4.18+linux-2.6.32.patch b/sys-block/iscsitarget/files/iscsitarget-1.4.18+linux-2.6.32.patch new file mode 100644 index 000000000000..f139e732e7de --- /dev/null +++ b/sys-block/iscsitarget/files/iscsitarget-1.4.18+linux-2.6.32.patch @@ -0,0 +1,42 @@ +From 43227c1624e919efcd0cd035516c1776be55ac08 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Diego=20Elio=20'Flameeyes'=20Petten=C3=B2?= <flameeyes@gmail.com> +Date: Sun, 18 Oct 2009 12:41:28 +0200 +Subject: [PATCH] Fix building with Linux kernel 2.6.32 and later. + +With commit 18f2ee705d98034b0f229a3202d827468d4bffd9 of the Linux kernel, +the sync_page_range() function has been removed. + +This patch changes it to filemap_write_and_wait_range() as done for the XFS +driver in the kernel (commit af0f4414f343429971d33b0dd8dccc85c1f3dcd2). +--- + kernel/file-io.c | 6 ++++++ + 1 files changed, 6 insertions(+), 0 deletions(-) + +diff --git a/kernel/file-io.c b/kernel/file-io.c +index dbf7b1c..e4c3fea 100644 +--- a/kernel/file-io.c ++++ b/kernel/file-io.c +@@ -8,6 +8,7 @@ + #include <linux/blkdev.h> + #include <linux/parser.h> + #include <linux/writeback.h> ++#include <linux/version.h> + + #include "iscsi.h" + #include "iscsi_dbg.h" +@@ -88,7 +89,12 @@ static int fileio_sync(struct iet_volume *lu, struct tio *tio) + count = lu->blk_cnt << lu->blk_shift; + } + ++#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 32) + res = sync_page_range(inode, mapping, ppos, count); ++#else ++ res = filemap_write_and_wait_range(mapping, ppos, ++ ppos + count -1); ++#endif + if (res) { + eprintk("I/O error: syncing pages failed: %d\n", res); + return -EIO; +-- +1.6.5 + diff --git a/sys-block/iscsitarget/iscsitarget-1.4.18.ebuild b/sys-block/iscsitarget/iscsitarget-1.4.18.ebuild new file mode 100644 index 000000000000..3686ccbf5489 --- /dev/null +++ b/sys-block/iscsitarget/iscsitarget-1.4.18.ebuild @@ -0,0 +1,66 @@ +# Copyright 1999-2009 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-block/iscsitarget/iscsitarget-1.4.18.ebuild,v 1.1 2009/10/18 11:36:47 flameeyes Exp $ + +inherit linux-mod eutils flag-o-matic + +DESCRIPTION="Open Source iSCSI target with professional features" +HOMEPAGE="http://iscsitarget.sourceforge.net/" +SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~x86" +IUSE="" + +DEPEND="dev-libs/openssl" +RDEPEND="${DEPEND}" + +MODULE_NAMES="iscsi_trgt(misc:${S}/kernel)" +CONFIG_CHECK="CRYPTO_CRC32C" +ERROR_CFG="iscsitarget needs support for CRC32C in your kernel." + +src_unpack() { + unpack ${A} + cd "${S}" + epatch "${FILESDIR}"/${PN}-0.4.15-isns-set-scn-flag.patch #180619 + epatch "${FILESDIR}"/${PN}-0.4.17-build.patch + epatch "${FILESDIR}"/${PN}-1.4.18+linux-2.6.32.patch + convert_to_m "${S}"/Makefile +} + +src_compile() { + emake usr || die "failed to build userspace" + + unset ARCH + emake KSRC="${KERNEL_DIR}" kernel || die "failed to build module" +} + +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 "doexe ietd failed" + + dosbin usr/ietadm || die "dosbin failed" + + insinto /etc + doins etc/ietd.conf etc/initiators.{allow,deny} || die "doins failed" + + # 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 "newinitd failed" + newconfd "${FILESDIR}"/ietd-conf.d ietd || die "newconfd failed" + + # Lock down perms, per bug 198209 + fperms 0640 /etc/ietd.conf /etc/initiators.{allow,deny} + + doman doc/manpages/*.[1-9] || die "manpages failed" + dodoc ChangeLog README || die "docs failed" + + einfo "Installing kernel module" + unset ARCH + linux-mod_src_install || die "modules failed" +} |