packages: iscsitarget/iscsitarget.spec, iscsitarget/debian-changes-1.4.20.2...
arekm
arekm at pld-linux.org
Sat Sep 10 11:04:31 CEST 2011
Author: arekm Date: Sat Sep 10 09:04:31 2011 GMT
Module: packages Tag: HEAD
---- Log message:
- rel 28; use compat patch from debian (builds also with 3.x kernels)
---- Files affected:
packages/iscsitarget:
iscsitarget.spec (1.51 -> 1.52) , debian-changes-1.4.20.2-6 (NONE -> 1.1) (NEW), iscsitarget-2.6.37.patch (1.2 -> NONE) (REMOVED), iscsitarget-2.6.38.patch (1.1 -> NONE) (REMOVED), iscsitarget-conn_c.patch (1.1 -> NONE) (REMOVED)
---- Diffs:
================================================================
Index: packages/iscsitarget/iscsitarget.spec
diff -u packages/iscsitarget/iscsitarget.spec:1.51 packages/iscsitarget/iscsitarget.spec:1.52
--- packages/iscsitarget/iscsitarget.spec:1.51 Sat Jul 23 19:41:01 2011
+++ packages/iscsitarget/iscsitarget.spec Sat Sep 10 11:04:26 2011
@@ -6,7 +6,7 @@
%bcond_without userspace # don't build userspace module
%bcond_with verbose # verbose build (V=1)
#
-%define _rel 27
+%define _rel 28
Summary: iSCSI target - SCSI over IP
Summary(pl.UTF-8): iSCSI target - SCSI po IP
Name: iscsitarget
@@ -18,8 +18,7 @@
# Source0-md5: 2f23c0bfe124d79f5c20e34ef2aaff82
Source1: %{name}.init
Source2: %{name}.sysconfig
-Patch0: iscsitarget-2.6.37.patch
-Patch1: iscsitarget-2.6.38.patch
+Patch0: debian-changes-1.4.20.2-6
URL: http://iscsitarget.sourceforge.net/
BuildRequires: rpmbuild(macros) >= 1.379
BuildRequires: openssl-devel
@@ -62,7 +61,6 @@
%prep
%setup -q
%patch0 -p1
-%patch1 -p1
%build
%if %{with kernel}
@@ -135,6 +133,9 @@
All persons listed below can be reached at <cvs_login>@pld-linux.org
$Log$
+Revision 1.52 2011/09/10 09:04:26 arekm
+- rel 28; use compat patch from debian (builds also with 3.x kernels)
+
Revision 1.51 2011/07/23 17:41:01 arekm
- release 27
================================================================
Index: packages/iscsitarget/debian-changes-1.4.20.2-6
diff -u /dev/null packages/iscsitarget/debian-changes-1.4.20.2-6:1.1
--- /dev/null Sat Sep 10 11:04:31 2011
+++ packages/iscsitarget/debian-changes-1.4.20.2-6 Sat Sep 10 11:04:26 2011
@@ -0,0 +1,1643 @@
+Description: Upstream changes introduced in version 1.4.20.2-6
+ This patch has been created by dpkg-source during the package build.
+ Here's the last changelog entry, hopefully it gives details on why
+ those changes were made:
+ .
+ iscsitarget (1.4.20.2-6) unstable; urgency=low
+ .
+ * SVN 1.4.20 at 453 - Co-ordinated with upstream on the stability of the tree
+ * [494142b] Drop double installation of upstream changelog.
+ Thanks to Christian Pernegger (Closes: #633005)
+ * [71de4f8] Add package linux-headers to Recommends.
+ Thanks to George Shuklin (Closes: 636157, 628428)
+ * [8344c44] Add support to provide daemon options.
+ Thanks to Alfredo Sola, Robbert Rijkse (Closes: 609582, 545536)
+ * [8208ade] Drop debian/30-iscsitarget.conf. (Closes: 636497)
+ We should not play with kernel sysct knobs right from the package.
+ Setting those values will depend on a per machine basis
+ * [0e96f0e] Update Standards Version to 3.9.2. No changes required
+ .
+ The person named in the Author field signed this changelog entry.
+Author: Ritesh Raj Sarraf <rrs at debian.org>
+Bug-Debian: http://bugs.debian.org/545536
+Bug-Debian: http://bugs.debian.org/609582
+Bug-Debian: http://bugs.debian.org/628428
+Bug-Debian: http://bugs.debian.org/633005
+Bug-Debian: http://bugs.debian.org/636157
+Bug-Debian: http://bugs.debian.org/636497
+
+---
+The information above should follow the Patch Tagging Guidelines, please
+checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here
+are templates for supplementary fields that you might want to add:
+
+Origin: <vendor|upstream|other>, <url of original patch>
+Bug: <url in upstream bugtracker>
+Bug-Debian: http://bugs.debian.org/<bugnumber>
+Bug-Ubuntu: https://launchpad.net/bugs/<bugnumber>
+Forwarded: <no|not-needed|url proving that it has been forwarded>
+Reviewed-By: <name and email of someone who approved the patch>
+Last-Update: <YYYY-MM-DD>
+
+--- iscsitarget-1.4.20.2.orig/Makefile
++++ iscsitarget-1.4.20.2/Makefile
+@@ -9,6 +9,8 @@
+
+ #export KSRC := /usr/src/linux
+
++DEPMOD = depmod
++
+ SUBDIRS := $(shell pwd)
+
+ ifeq ($(KSRC),)
+@@ -26,7 +28,7 @@ else
+ endif
+ endif
+
+-KVER := $(shell $(CC) $(CFLAGS) -E -dM $(VERSION_FILE) | \
++KVER := $(shell $(CC) $(CFLAGS) $(LDFLAGS) -E -dM $(VERSION_FILE) | \
+ grep UTS_RELEASE | awk '{ print $$3 }' | sed 's/\"//g')
+
+ KMOD := /lib/modules/$(KVER)/extra
+@@ -56,6 +58,19 @@ kver_lk = $(shell [ `echo $(KVER) | egre
+ # base first the earlier patch sets will not need to be modified.
+ #
+
++ifeq ($(call kver_le,2,6,38),1)
++ PATCHES := $(PATCHES) compat-2.6.38.patch
++endif
++
++ifeq ($(call kver_le,2,6,37),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)
++ PATCHES := $(PATCHES) compat-2.6.33-2.6.35.patch
++endif
++
+ # Compatibility patch for kernels <= 2.6.32
+ ifeq ($(call kver_le,2,6,32),1)
+ PATCHES := $(PATCHES) compat-2.6.32.patch
+@@ -210,9 +225,9 @@ unpatch:
+ depmod:
+ @echo "Running depmod"
+ @if [ x$(DESTDIR) != x -o x$(INSTALL_MOD_PATH) != x ]; then \
+- depmod -aq -b $(DESTDIR)$(INSTALL_MOD_PATH) $(KVER); \
++ $(DEPMOD) -aq -b $(DESTDIR)$(INSTALL_MOD_PATH) $(KVER); \
+ else \
+- depmod -aq $(KVER); \
++ $(DEPMOD) -aq $(KVER); \
+ fi
+
+ install-files: install-usr install-etc install-doc install-kernel
+@@ -231,7 +246,7 @@ install-kernel: kernel/iscsi_trgt.ko
+ -execdir mv \{\} \{\}.orig \;; \
+ fi \
+ fi
+- @install -vD kernel/iscsi_trgt.ko \
++ @install -vD -m 644 kernel/iscsi_trgt.ko \
+ $(DESTDIR)$(INSTALL_MOD_PATH)$(KMOD)/iscsi/iscsi_trgt.ko
+
+ install-usr: usr/ietd usr/ietadm
+--- iscsitarget-1.4.20.2.orig/dkms.conf
++++ iscsitarget-1.4.20.2/dkms.conf
+@@ -3,7 +3,7 @@
+ #
+
+ PACKAGE_NAME="iscsitarget"
+-PACKAGE_VERSION="1.4.20.2"
++PACKAGE_VERSION="1.4.20.3"
+ MOD_PATH=${dkms_tree}/${PACKAGE_NAME}/${PACKAGE_VERSION}
+
+ BUILT_MODULE_NAME="iscsi_trgt"
+@@ -20,42 +20,48 @@ AUTOINSTALL="yes"
+ # Patches newest - oldest, distro spec at bottom
+ #
+
+-PATCH[0]="compat-2.6.32.patch"
+-PATCH_MATCH[0]="2\.6\.(9|14|15|16|17|18|19|20|21|22|23|24|25|26|27|28|29|30|31|32)"
++PATCH[0]="compat-2.6.36-2.6.37.patch"
++PATCH_MATCH[0]="2\.6\.(9|14|15|16|17|18|19|20|21|22|23|24|25|26|27|28|29|30|31|32|33|34|35|36|37)"
+
+-PATCH[1]="compat-2.6.31.patch"
+-PATCH_MATCH[1]="2\.6\.(9|14|15|16|17|18|19|20|21|22|23|24|25|26|27|28|29|30|31)"
++PATCH[1]="compat-2.6.33-2.6.35.patch"
++PATCH_MATCH[1]="2\.6\.(9|14|15|16|17|18|19|20|21|22|23|24|25|26|27|28|29|30|31|32|33|34|35)"
+
+-PATCH[2]="compat-2.6.30.patch"
+-PATCH_MATCH[2]="2\.6\.(9|14|15|16|17|18|19|20|21|22|23|24|25|26|27|28|29|30)"
++PATCH[2]="compat-2.6.32.patch"
++PATCH_MATCH[2]="2\.6\.(9|14|15|16|17|18|19|20|21|22|23|24|25|26|27|28|29|30|31|32)"
+
+-PATCH[3]="compat-2.6.29.patch"
+-PATCH_MATCH[3]="2\.6\.(9|14|15|16|17|18|19|20|21|22|23|24|25|26|27|28|29)"
++PATCH[3]="compat-2.6.31.patch"
++PATCH_MATCH[3]="2\.6\.(9|14|15|16|17|18|19|20|21|22|23|24|25|26|27|28|29|30|31)"
+
+-PATCH[4]="compat-2.6.28.patch"
+-PATCH_MATCH[4]="2\.6\.(9|14|15|16|17|18|19|20|21|22|23|24|25|26|27|28)"
++PATCH[4]="compat-2.6.30.patch"
++PATCH_MATCH[4]="2\.6\.(9|14|15|16|17|18|19|20|21|22|23|24|25|26|27|28|29|30)"
+
+-PATCH[5]="compat-2.6.25-2.6.27.patch"
+-PATCH_MATCH[5]="2\.6\.(9|14|15|16|17|18|19|20|21|22|23|24|25|26|27)"
++PATCH[5]="compat-2.6.29.patch"
++PATCH_MATCH[5]="2\.6\.(9|14|15|16|17|18|19|20|21|22|23|24|25|26|27|28|29)"
+
+-PATCH[6]="compat-2.6.24.patch"
+-PATCH_MATCH[6]="2\.6\.(9|14|15|16|17|18|19|20|21|22|23|24)"
++PATCH[6]="compat-2.6.28.patch"
++PATCH_MATCH[6]="2\.6\.(9|14|15|16|17|18|19|20|21|22|23|24|25|26|27|28)"
+
+-PATCH[7]="compat-2.6.23.patch"
+-PATCH_MATCH[7]="2\.6\.(9|14|15|16|17|18|19|20|21|22|23)"
++PATCH[7]="compat-2.6.25-2.6.27.patch"
++PATCH_MATCH[7]="2\.6\.(9|14|15|16|17|18|19|20|21|22|23|24|25|26|27)"
+
+-PATCH[8]="compat-2.6.22.patch"
+-PATCH_MATCH[8]="2\.6\.(9|14|15|16|17|18|19|20|21|22)"
++PATCH[8]="compat-2.6.24.patch"
++PATCH_MATCH[8]="2\.6\.(9|14|15|16|17|18|19|20|21|22|23|24)"
+
+-PATCH[9]="compat-2.6.19-2.6.21.patch"
+-PATCH_MATCH[9]="2\.6\.(9|14|15|16|17|18|19|20|21)"
++PATCH[9]="compat-2.6.23.patch"
++PATCH_MATCH[9]="2\.6\.(9|14|15|16|17|18|19|20|21|22|23)"
+
+-PATCH[10]="compat-2.6.14-2.6.18.patch"
+-PATCH_MATCH[10]="2\.6\.(9|14|15|16|17|18)"
++PATCH[10]="compat-2.6.22.patch"
++PATCH_MATCH[10]="2\.6\.(9|14|15|16|17|18|19|20|21|22)"
+
+-PATCH[11]="compat-sles10sp2.patch"
+-PATCH_MATCH[11]="2\.6\.16\.60-.*"
++PATCH[11]="compat-2.6.19-2.6.21.patch"
++PATCH_MATCH[11]="2\.6\.(9|14|15|16|17|18|19|20|21)"
+
+-PATCH[12]="compat-rhel4.patch"
+-PATCH_MATCH[12]="2\.6\.9-.*\.(el|plus\.c4)"
++PATCH[12]="compat-2.6.14-2.6.18.patch"
++PATCH_MATCH[12]="2\.6\.(9|14|15|16|17|18)"
++
++PATCH[13]="compat-sles10sp2.patch"
++PATCH_MATCH[13]="2\.6\.16\.60-.*"
++
++PATCH[14]="compat-rhel4.patch"
++PATCH_MATCH[14]="2\.6\.9-.*\.(el|plus\.c4)"
+
+--- iscsitarget-1.4.20.2.orig/iscsitarget.spec
++++ iscsitarget-1.4.20.2/iscsitarget.spec
+@@ -3,7 +3,7 @@
+ ##
+
+ ## IET Release
+-%define iet_version 1.4.20.2
++%define iet_version 1.4.20.3
+
+ ## Package Revision
+ %define revision 1
+@@ -113,7 +113,7 @@ Requires: %{name}-kmod = %{version}
+
+ ## Build Requirements
+ BuildRequires: kernel >= 2.6
+-BuildRequires: gcc, make, patch, binutils, /usr/bin/install, openssl-devel
++BuildRequires: gcc, make, patch, binutils, /usr/bin/install
+ %if %is_suse
+ BuildRequires: kernel-source = %{kver}
+ %else
+@@ -408,6 +408,9 @@ fi
+
+
+ %changelog
++* Mon Jan 10 2011 Ross Walker <rswwalker at gmail dot com> - 1.4.20.3
++- removed stray RPM build dependency on openssl
++
+ * Tue May 11 2010 Ross Walker <rswwalker at gmail dot com> - 1.4.20.2
+ - fixed recursive KERNELSRC define problem on SLES
+ - updated SVN building to handle tagged builds
+--- iscsitarget-1.4.20.2.orig/RELEASE_NOTES
++++ iscsitarget-1.4.20.2/RELEASE_NOTES
+@@ -2,6 +2,34 @@
+ Release Notes for iSCSI Enterprise Target
+ =========================================
+
++ May 24th, 2011
++ Version 1.4.20.3
++ ----------------
++
++The IET development team is pleased to announce the release of version
++1.4.20.3 of the iSCSI Enterprise Target.
++
++This release is a bugfix release. The following issues were fixed:
++- multiple compatibility updates to bring kernel support up to 2.6.39
++- fixed iSNS issue that prevented IET from registering
++- fixed re-enabling listening after max connections was exceeded
++- fixed NULL-pointer dereference due to race in UA handling
++- fixed initd scripts to reflect pid file name change
++- fixed crypto API error handling
++- fixed small memory leak in volume args buffer on BSD platforms
++- fixed max_cmd_sn not being set for the session
++- fixed issue where StatSN was being updated when a command was ignored
++- fixed connection accounting in ietd for session reinstatements
++- MaxOutStandingR2T fixed at 1 for 1.4.20 branch due to broken handling
++- fixed ipv6 address handling in SendTargets
++
++Please see the ChangeLog for a full list of bugfixes.
++
++
++ =========================================
++ Release Notes for iSCSI Enterprise Target
++ =========================================
++
+ July 14th, 2010
+ Version 1.4.20.2
+ ----------------
+--- iscsitarget-1.4.20.2.orig/ChangeLog
++++ iscsitarget-1.4.20.2/ChangeLog
+@@ -1,10 +1,63 @@
++Summary of changes from v1.4.20.2 to v1.4.20.3
++=================================
++Arne Redlich
++ o Fixed iSNS initialization issue, thanks to majianpeng at gmail.com
++ o The NIPQUAD macro has been removed, instead "%pI4" is used
++ o Converted semaphores to mutexes
++ o Fixed printing IPv4 addresses in /proc/net/iet/session for kernels >= 2.6.33
++ o Fixed block device handling for kernels >= 2.6.38
++ o 2.6.39 compile fix
++ o Fixed oops after write attempts to readonly LUs
++
++Chris Siebenmann, Wido den Hollander
++ o 2.6.36 compile fix
++
++Craig
++ o Makefile respects LDFLAGS
++
++Jason Zhang
++ o Fixed re-enabling listening after max connections was exceeded
++ o Fix NULL-pointer dereference due to race in UA handling
++
++Martin Hicks
++ o Added variable for depmod
++ o Don't install kernel module executable
++ o Don't use bash for initd script
++
++Ross Walker
++ o Updated initd scripts to reflect PID file name change
++ o Removed stray RPM build dependency on openssl from spec file
++ o Fixed crypto API error handling (ERR_PTR instead of a NULL)
++ o Fixed small memory leak in volume args buffer on BSD
++ o Fixed io context handling on kernels >= 2.6.25
++ o Fixed io context handling on RHEL 5.6
++ o Fixed max_cmd_sn not being set for the session
++ o Fixed issue where StatSN was being updated when a command was ignored
++ o Fixed connection accounting in ietd for session reinstatements
++ o MaxOutStandingR2T fixed at 1 for 1.4.20 branch due to broken handling
++ o Stripped zone id off ipv6 addresses in SendTargets
++ o Time2Retain fixed at 0 since it isn't implemented
++ o Fixed Expected Data Transfer Length handling
++ o Fixed session establishment for initiators foregoing security negotiation
++ o Fixed infinite loop on digest errors
++ o Fixed session shutdown in case of initiators sending data segments thar are too large
++
+ Summary of changes from v1.4.20.1 to v1.4.20.2
+ =================================
+ Arne Redlich
++ o adapt backward compat mechanism in Makefile to kernels >= 2.6.33
+ o uninitialized data fixes pointed out by valgrind
+ o fix invalid read in iSNS code pointed out by valgrind
++ o Fixed iSNS initialization issue
++ o The NIPQUAD macro has been removed, instead "%pI4" is used
++ o Converted semaphores to mutexes
++ o Fixed printing IPv4 addresses in /proc/net/iet/session for kernels >= 2.6.33
++ o Fixed re-enabling listening after max connections was exceeded
++ o Fix NULL-pointer dereference due to race in UA handling
++ o Fixed block device handling for kernels >= 2.6.38
+
+ Ross Walker
++ o restore SCSI SN behaviour of IET < 1.4.20 (VMWare compatibility)
+ o check buffer boundaries in iSNS code (CVE-2010-2221)
+ o fix memleak in iSNS ACL code
+ o clean up iSCSI login response error handling
+@@ -12,15 +65,24 @@ Ross Walker
+ o fix soft lockup during UA allocation
+ o change DISTDIR to DESTDIR
+ o avoid deletion of targets with active sessions
+- o byte swap fix in MD5 / SHA1 code (thanks to Harshal Shete for testing on PPC)
+-
+-Summary of changes from v1.4.20 to v1.4.20.1
+-=================================
+-Arne Redlich
+- o adapt backward compat mechanism in Makefile to kernels >= 2.6.33
++ o byte swap fix in MD5 / SHA1 code
++ o Updated initd scripts to reflect PID file name change
++ o Removed stray RPM build dependency on openssl from spec file
++ o Fixed crypto API error handling (ERR_PTR instead of a NULL)
++ o Fixed small memory leak in volume args buffer on BSD
++ o Fixed io context handling on kernels >= 2.6.25
++ o Fixed max_cmd_sn not being set for the session
++ o Fixed issue where StatSN was being updated when a command was ignored
++ o Fixed connection accounting in ietd for session reinstatements
++ o Fixed MaxOutStandingR2T handling
++ o Stripped zone id off ipv6 addresses in SendTargets
++ o Time2Wait and Time2Retain fixed at 0 since these aren't implemented
+
+-Ross Walker
+- o restore SCSI SN behaviour of IET < 1.4.20 (VMWare compatibility)
++Martin Hicks
++ o Makefile respects LDFLAGS
++ o Added variable for depmod
++ o Don't install kernel module executable
++ o Don't use bash for initd script
+
+ Summary of changes from v1.4.19 to v1.4.20
+ =================================
+--- iscsitarget-1.4.20.2.orig/etc/ietd.conf
++++ iscsitarget-1.4.20.2/etc/ietd.conf
+@@ -76,10 +76,12 @@
+ #MaxXmitDataSegmentLength 8192 # Max data per PDU to transmit
+ #MaxBurstLength 262144 # Max data per sequence (R2T)
+ #FirstBurstLength 65536 # Max unsolicited data sequence
+- #DefaultTime2Wait 2 # Secs wait for ini to log out
+- # Not used
+- #DefaultTime2Retain 20 # Secs keep cmnds after log out
+- # Not used
++ #DefaultTime2Wait 2 # Secs to wait for ini to logout
++ # also secs for ini to wait
++ # before logging back in
++ # Not implemented, but settable
++ #DefaultTime2Retain 0 # Secs keep session after logout
++ # We only support 0
+ #MaxOutstandingR2T 1 # Max outstanding R2Ts per cmnd
+ #DataPDUInOrder Yes # Data in PDUs is ordered
+ # We only support ordered
+--- iscsitarget-1.4.20.2.orig/etc/initd/initd
++++ iscsitarget-1.4.20.2/etc/initd/initd
+@@ -1,4 +1,4 @@
+-#!/bin/bash
++#!/bin/sh
+ #
+ # Start the iSCSI Enterprise Target.
+ #
+--- iscsitarget-1.4.20.2.orig/etc/initd/initd.gentoo
++++ iscsitarget-1.4.20.2/etc/initd/initd.gentoo
+@@ -17,7 +17,7 @@ start()
+ ebegin "Starting iSCSI Target"
+ modprobe -q crc32c
+ modprobe iscsi_trgt
+- start-stop-daemon --start --exec /usr/sbin/ietd --pidfile /var/run/iscsi_trgt.pid -- $OPTIONS
++ start-stop-daemon --start --exec /usr/sbin/ietd --pidfile /var/run/ietd.pid -- $OPTIONS
+ eend $?
+ }
+
+@@ -25,7 +25,7 @@ stop()
+ {
+ ebegin "Stopping iSCSI Target"
+ ietadm --op delete
+- start-stop-daemon --stop --exec /usr/sbin/ietd --pidfile /var/run/iscsi_trgt.pid
++ start-stop-daemon --stop --exec /usr/sbin/ietd --pidfile /var/run/ietd.pid
+ rm -f /var/run/iscsi_trgt.pid
+ eend $?
+ }
+--- iscsitarget-1.4.20.2.orig/etc/initd/initd.debian
++++ iscsitarget-1.4.20.2/etc/initd/initd.debian
+@@ -7,7 +7,7 @@
+ PATH=/sbin:/bin:/usr/sbin:/usr/bin
+ DAEMON=/usr/sbin/ietd
+ OPTIONS=""
+-PIDFILE=/var/run/iscsi_trgt.pid
++PIDFILE=/var/run/ietd.pid
+
+ if [ -f /lib/init/vars.sh ]; then
+ . /lib/init/vars.sh
+--- iscsitarget-1.4.20.2.orig/usr/Makefile
++++ iscsitarget-1.4.20.2/usr/Makefile
+@@ -1,4 +1,4 @@
+-CFLAGS += -O2 -fno-inline -Wall -Wstrict-prototypes -g -I../include
++CFLAGS += -O2 -fno-inline -Wall -Wstrict-prototypes -I../include
+ CFLAGS += -D_GNU_SOURCE # required for glibc >= 2.8
+ PROGRAMS = ietd ietadm
+ LIBS =
+@@ -7,10 +7,10 @@ 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 md5.o sha1.o
+
+- $(CC) $^ -o $@ $(LIBS)
++ $(CC) $(LDFLAGS) $^ -o $@ $(LIBS)
+
+ ietadm: ietadm.o param.o
+- $(CC) $^ -o $@
++ $(CC) $(LDFLAGS) $^ -o $@
+
+ clean:
+ rm -f *.o $(PROGRAMS)
+--- iscsitarget-1.4.20.2.orig/usr/plain.c
++++ iscsitarget-1.4.20.2/usr/plain.c
+@@ -691,10 +691,12 @@ static int iscsi_param_partial_set(u32 t
+ return __plain_param_set(tid, sid, type, 1 << key, param, 0);
+ }
+
+-static void plain_portal_init(FILE *fp, char **isns, int *isns_ac)
++static void plain_portal_init(FILE *fp, int *timeout)
+ {
+ char buf[BUFSIZE];
+ char *p, *q;
++ char *isns = NULL;
++ int isns_ac = 0;
+
+ while (fgets(buf, BUFSIZE, fp)) {
+ q = buf;
+@@ -702,15 +704,16 @@ static void plain_portal_init(FILE *fp,
+ if (!p || *p == '#')
+ continue;
+ if (!strcasecmp(p, "iSNSServer")) {
+- *isns = strdup(target_sep_string(&q));
++ isns = strdup(target_sep_string(&q));
+ } else if (!strcasecmp(p, "iSNSAccessControl")) {
+ char *str = target_sep_string(&q);
+ if (!strcasecmp(str, "Yes"))
+- *isns_ac = 1;
++ isns_ac = 1;
+ }
+ }
+
+- return;
++ if (isns)
++ *timeout = isns_init(isns, isns_ac);
+ }
+
+ static void plain_target_init(FILE *fp)
+@@ -796,7 +799,7 @@ static void plain_account_init(FILE *fp)
+ return;
+ }
+
+-static void plain_init(char *params, char **isns, int *isns_ac)
++static void plain_init(char *params, int *timeout)
+ {
+ FILE *fp;
+ struct stat st;
+@@ -826,7 +829,7 @@ static void plain_init(char *params, cha
+ }
+ }
+
+- plain_portal_init(fp, isns, isns_ac);
++ plain_portal_init(fp, timeout);
+
+ rewind(fp);
+
+--- iscsitarget-1.4.20.2.orig/usr/event.c
++++ iscsitarget-1.4.20.2/usr/event.c
+@@ -87,10 +87,9 @@ retry:
+
+ switch (event.state) {
+ case E_CONN_CLOSE:
+- if (!(session = session_find_id(event.tid, event.sid))) {
+- log_warning("session %llu not found?", event.sid);
+- goto retry;
+- }
++ if (!(session = session_find_id(event.tid, event.sid)))
++ /* session previously closed for reinstatement? */
++ break;
+
+ if (--session->conn_cnt <= 0)
+ session_remove(session);
+--- iscsitarget-1.4.20.2.orig/usr/ietd.c
++++ iscsitarget-1.4.20.2/usr/ietd.c
+@@ -426,6 +426,8 @@ void event_loop(int timeout)
+ pollfd->fd = -1;
+ incoming[i] = NULL;
+ incoming_cnt--;
++ if ((poll_array[POLL_LISTEN].events == 0) && (incoming_cnt < INCOMING_MAX))
++ poll_array[POLL_LISTEN].events = POLLIN;
+ if (session && session->conn_cnt <= 0)
+ session_remove(session);
+ }
+@@ -439,8 +441,7 @@ int main(int argc, char **argv)
+ char *config = NULL, pid_buf[64];
+ uid_t uid = 0;
+ gid_t gid = 0;
+- char *isns = NULL;
+- int isns_ac = 0, pid_fd;
++ int pid_fd;
+
+ /* otherwise we would die in some later write() during the event_loop
+ * instead of getting EPIPE! */
+@@ -549,10 +550,6 @@ int main(int argc, char **argv)
+ exit(-1);
+ }
+
+- cops->init(config, &isns, &isns_ac);
+- if (isns)
+- timeout = isns_init(isns, isns_ac);
+-
+ if (gid && setgid(gid) < 0) {
+ log_error("unable to setgid: %m");
+ exit(-1);
+@@ -563,6 +560,8 @@ int main(int argc, char **argv)
+ exit(-1);
+ }
+
++ cops->init(config, &timeout);
++
+ event_loop(timeout);
+
+ return 0;
+--- iscsitarget-1.4.20.2.orig/usr/param.c
++++ iscsitarget-1.4.20.2/usr/param.c
+@@ -142,11 +142,15 @@ static int digest_val_to_str(unsigned in
+ {
+ int err = 0;
<<Diff was trimmed, longer than 597 lines>>
---- CVS-web:
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/iscsitarget/iscsitarget.spec?r1=1.51&r2=1.52&f=u
More information about the pld-cvs-commit
mailing list