Commit 6434bb6a authored by Natanael Copa's avatar Natanael Copa

main/iscsitarget: upgrade to 1.4.20.2

parent f12ebd87
......@@ -11,7 +11,7 @@ _kernelver=$pkgver-r$pkgrel
_abi_release=$pkgver-${_flavor}
_kpkgrel=$pkgrel
_iscsiver=1.4.19
_iscsiver=1.4.20.2
pkgname=${_realname}-${_flavor}
pkgver=$_kver
......@@ -25,13 +25,13 @@ install=
makedepends="linux-${_flavor}-dev=${_kernelver}"
subpackages=
source="http://downloads.sourceforge.net/$_realname/$_realname-$_iscsiver.tar.gz
iscsitarget-1.4.18+linux-2.6.32.patch
"
_ksrc=/usr/src/linux-headers-${_abi_release}
prepare() {
cd "$srcdir"/$_realname-$_iscsiver
for i in ../*.patch; do
[ -r "$i" ] || continue
msg "Applying $i"
patch -p1 < $i || return 1
done
......@@ -45,8 +45,7 @@ build() {
package() {
cd "$srcdir"/$_realname-$_iscsiver
make KSRC="$_ksrc" DISTDIR="$pkgdir" install-kernel || return 1
make KSRC="$_ksrc" DESTDIR="$pkgdir" install-kernel || return 1
}
md5sums="9beca214c28949cce1716b49fec57de4 iscsitarget-1.4.19.tar.gz
07f6fb7a35172b3be4c4b0101983fe86 iscsitarget-1.4.18+linux-2.6.32.patch"
md5sums="2f23c0bfe124d79f5c20e34ef2aaff82 iscsitarget-1.4.20.2.tar.gz"
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
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=iscsitarget
pkgver=1.4.19
pkgrel=2
pkgver=1.4.20.2
pkgrel=0
pkgdesc="Open Source iSCSI target with professional features - userspace utils"
url="http://iscsitarget.sourceforge.net/"
license="GPL-2"
......@@ -10,21 +10,28 @@ depends=
makedepends="openssl-dev"
subpackages="$pkgname-doc"
source="http://downloads.sourceforge.net/$pkgname/$pkgname-$pkgver.tar.gz
$pkgname-0.4.15-isns-set-scn-flag.patch
$pkgname-0.4.17-build.patch
ietd.initd
ietd.confd
"
build() {
cd "$srcdir"/$pkgname-$pkgver
_builddir="$srcdir"/$pkgname-$pkgver
prepare() {
cd "$_builddir"
for i in ../*.patch; do
[ -r "$i" ] || continue
msg "Applying $i"
patch -p1 < $i || return 1
done
}
build() {
cd "$_builddir"
make usr || return 1
make DISTDIR="$pkgdir" install-usr install-doc
}
package() {
cd "$_builddir"
make DESTDIR="$pkgdir" install-usr install-doc
for i in etc/ietd.conf etc/initiators.*; do
install -Dm640 $i "$pkgdir"/$i || return 1
......@@ -33,8 +40,6 @@ build() {
install -Dm755 ../ietd.confd "$pkgdir"/etc/conf.d/ietd
}
md5sums="9beca214c28949cce1716b49fec57de4 iscsitarget-1.4.19.tar.gz
22512c5cf4cb62127730ce53d74ff28f iscsitarget-0.4.15-isns-set-scn-flag.patch
c9a9b839b3afcdecd1601511ee48a171 iscsitarget-0.4.17-build.patch
md5sums="2f23c0bfe124d79f5c20e34ef2aaff82 iscsitarget-1.4.20.2.tar.gz
9b0ca79dc47b12024c2b67d828d6d361 ietd.initd
06ba479d3533d557b8582abe6f182410 ietd.confd"
http://bugs.gentoo.org/180619
--- a/usr/isns.c
+++ b/usr/isns.c
@@ -215,13 +215,13 @@
#if __BYTE_ORDER == __LITTLE_ENDIAN
#define set_scn_flag(x) \
-{ \
+({ \
x = (x & 0x55555555) << 1 | (x & 0xaaaaaaaa) >> 1; \
x = (x & 0x33333333) << 2 | (x & 0xcccccccc) >> 2; \
x = (x & 0x0f0f0f0f) << 4 | (x & 0xf0f0f0f0) >> 4; \
x = (x & 0x00ff00ff) << 8 | (x & 0xff00ff00) >> 8; \
x = (x & 0x0000ffff) << 16 | (x & 0xffff0000) >> 16; \
-}
+})
#else
#define set_scn_flag(x) (x)
#endif
--- a/usr/Makefile
+++ b/usr/Makefile
@@ -1,16 +1,15 @@
-CFLAGS += -O2 -fno-inline -Wall -Wstrict-prototypes -g -I../include
+CFLAGS ?= -O2 -fno-inline -g
CFLAGS += -D_GNU_SOURCE # required for glibc >= 2.8
+WARNFLAGS = -Wall -Wstrict-prototypes
+CFLAGS += $(WARNFLAGS) -I../include
PROGRAMS = ietd ietadm
-LIBS = -lcrypto
+LDLIBS = -lcrypto
all: $(PROGRAMS)
ietd: ietd.o iscsid.o conn.o session.o target.o message.o ctldev.o log.o chap.o event.o param.o plain.o isns.o
- $(CC) $^ -o $@ $(LIBS)
-
ietadm: ietadm.o param.o
- $(CC) $^ -o $@
clean:
rm -f *.o $(PROGRAMS)
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment