From 2720b71583eef9733f6a132bcddf78c8a6b7f4c5138d31b45b0abef40b3b9252 Mon Sep 17 00:00:00 2001 From: Lee Duncan Date: Wed, 30 Apr 2014 17:04:50 +0000 Subject: [PATCH] Accepting request 232234 from home:lee_duncan:branches:network - Updated Factory to match latest upstream code base, including changse to open-iscsi and iscsiuio. These changes include bug fixes as well as systemd integration for open-iscsi. - Added two not-yet-upstream patches for iscsiuio/systemd activation from Chris Leech (bnc#869567): iscsiuio-systemd-socket-activation-support.patch iscsiuio-systemd-unit-files.patch Updated spec file to handle install/package of new files. - Added an upstream patch from Mike Christie (bnc#869356): iscsi-tools-set-non-negotiated-params-early iscsid: Fix handling of iscsi async events. When iscsi targets send 32 or more iscsi async event pdus the initiator will run out of memory for events and this message: BUG: iscsid: Can not allocate memory for receive context. will be logged non stop. iscsid will then not be able to complate any more requests because it is stuck in a endless loop printing that message. This fixes the problem by having iscsid handle an event after it has read it in from netlink or the mgmt ipc. Previously we would queue all events then handle them. - Updated systemd unit files (bnc#847953) - Split iscsiuio out as separate package (part of bnc#858972) - Ported Hannes' open-isns changes fro SLE12, setting up open-isns as a separate sub-package and integrating it with open-iscsi OBS-URL: https://build.opensuse.org/request/show/232234 OBS-URL: https://build.opensuse.org/package/show/network/open-iscsi?expand=0&rev=34 --- open-iscsi-Factory-latest.diff.bz2 | 4 +- open-iscsi.changes | 51 ++++++++++ open-iscsi.spec | 147 ++++++++++++++++++++++++++++- 3 files changed, 195 insertions(+), 7 deletions(-) diff --git a/open-iscsi-Factory-latest.diff.bz2 b/open-iscsi-Factory-latest.diff.bz2 index 910fd08..5498df3 100644 --- a/open-iscsi-Factory-latest.diff.bz2 +++ b/open-iscsi-Factory-latest.diff.bz2 @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:51bbc83c04937d7876f19102168db56175cc875c3f95ecc9ecb22dedbb77402f -size 126962 +oid sha256:63999067a03c822f2b31d0f936e6d346ca3c01f0686cc982448cfde6555a4659 +size 179523 diff --git a/open-iscsi.changes b/open-iscsi.changes index 22b8982..4b8c2ce 100644 --- a/open-iscsi.changes +++ b/open-iscsi.changes @@ -1,3 +1,54 @@ +------------------------------------------------------------------- +Mon Apr 28 11:00:03 PDT 2014 - lduncan@suse.com + +- Added two not-yet-upstream patches for iscsiuio/systemd activation + from Chris Leech (bnc#869567): + iscsiuio-systemd-socket-activation-support.patch + iscsiuio-systemd-unit-files.patch + Updated spec file to handle install/package of new files. + +------------------------------------------------------------------- +Mon Apr 28 10:59:09 PDT 2014 - lduncan@suse.com + +- Added an upstream patch from Mike Christie (bnc#869356): + iscsi-tools-set-non-negotiated-params-early + +------------------------------------------------------------------- +Mon Apr 28 10:52:58 PDT 2014 - + + iscsid: Fix handling of iscsi async events. + + When iscsi targets send 32 or more iscsi async event pdus the + initiator will run out of memory for events and this message: + + BUG: iscsid: Can not allocate memory for receive context. + + will be logged non stop. iscsid will then not be able to + complate any more requests because it is stuck in a endless loop + printing that message. + + This fixes the problem by having iscsid handle an event after it + has read it in from netlink or the mgmt ipc. Previously we would + queue all events then handle them. + +------------------------------------------------------------------- +Mon Apr 28 10:51:35 PDT 2014 - lduncan@suse.com + +- Updated systemd unit files (bnc#847953) +- Split iscsiuio out as separate package + (part of bnc#858972) + +------------------------------------------------------------------- +Mon Apr 28 10:29:26 PDT 2014 - lduncan@suse.com + +- Ported Hannes' open-isns changes fro SLE12, setting up + open-isns as a separate sub-package and integrating it + with open-iscsi +- Updated Factory to match latest upstream code base, + including changse to open-iscsi and iscsiuio. These changes + include bug fixes as well as systemd integration for + open-iscsi. + ------------------------------------------------------------------- Mon Mar 10 10:45:43 PDT 2014 - lduncan@suse.com diff --git a/open-iscsi.spec b/open-iscsi.spec index 445719c..41260f2 100644 --- a/open-iscsi.spec +++ b/open-iscsi.spec @@ -17,9 +17,13 @@ Name: open-iscsi +BuildRequires: autoconf +BuildRequires: automake BuildRequires: bison BuildRequires: db-devel BuildRequires: flex +BuildRequires: libtool +BuildRequires: make BuildRequires: openssl-devel %if 0%{?suse_version} >= 1230 BuildRequires: systemd @@ -29,8 +33,7 @@ PreReq: %fillup_prereq %insserv_prereq Version: 2.0.873 Release: 0 %{?systemd_requires} -Provides: linux-iscsi -Obsoletes: linux-iscsi +Recommends: logrotate %define iscsi_release 873 Summary: Linux* Open-iSCSI Software Initiator License: GPL-2.0+ @@ -64,12 +67,61 @@ Authors: -------- open-iscsi@googlegroups.com +%package -n open-isns +Summary: Linux iSNS server +Group: Productivity/Networking/Other +Version: 0.90 +Release: 0 +Obsoletes: isns <= 2.1.02 +Provides: isns = 2.1.03 + +%description -n open-isns +This is a partial implementation of iSNS, according to RFC4171. +The implementation is still somewhat incomplete, but I am releasing +it for your reading pleasure. + +Authors: +-------- + Olaf Kirch + +%package -n iscsiuio +Summary: Linux Broadcom NetXtremem II iscsi server +Group: Productivity/Networking/Other +Version: 0.7.8.2 +Release: 0 + +%description -n iscsiuio +This tool is to be used in conjunction with the Broadcom NetXtreme II Linux +driver (Kernel module name: 'bnx2' and 'bnx2x'), Broadcom CNIC driver, +and the Broadcom iSCSI driver (Kernel module name: 'bnx2i'). +This user space tool is used in conjunction with the following +Broadcom Network Controllers: + bnx2: BCM5706, BCM5708, BCM5709 devices + bnx2x: BCM57710, BCM57711, BCM57711E, BCM57712, BCM57712E, + BCM57800, BCM57810, BCM57840 devices + +This utility will provide the ARP and DHCP functionality for the iSCSI offload. +The communication to the driver is done via Userspace I/O (Kernel module name +'uio'). + +Authors: +-------- + Eddie Wai + Benjamin Li + %prep %setup -n %{name}-2.0-%{iscsi_release} %patch1 -p1 %build -%{__make} OPTFLAGS="${RPM_OPT_FLAGS} -fno-strict-aliasing -DLOCK_DIR=\\\"/etc/iscsi\\\"" user +%{__make} OPTFLAGS="${RPM_OPT_FLAGS} -fno-strict-aliasing -DOFFLOAD_BOOT_SUPPORTED -DLOCK_DIR=\\\"/etc/iscsi\\\"" LDFLAGS="" user +%{__make} OPTFLAGS="${RPM_OPT_FLAGS}" -C utils/open-isns programs +cd iscsiuio +touch NEWS +touch AUTHORS +autoreconf --install +%configure --sbindir=/sbin +make CFLAGS="${RPM_OPT_FLAGS}" %install make DESTDIR=${RPM_BUILD_ROOT} install_user @@ -91,6 +143,11 @@ ln -sf ../../etc/init.d/iscsid ${RPM_BUILD_ROOT}/usr/sbin/rciscsid (cd ${RPM_BUILD_ROOT}/etc; ln -sf iscsi/iscsid.conf iscsid.conf) touch ${RPM_BUILD_ROOT}/etc/iscsi/initiatorname.iscsi install -m 0755 usr/iscsistart %{buildroot}/sbin +make DESTDIR=${RPM_BUILD_ROOT} -C utils/open-isns install +%if 0%{?suse_version} >= 1230 +make DESTDIR=${RPM_BUILD_ROOT} -C utils/open-isns install_service +%endif +make DESTDIR=${RPM_BUILD_ROOT} -C iscsiuio install %clean [ "${RPM_BUILD_ROOT}" != "/" -a -d ${RPM_BUILD_ROOT} ] && rm -rf ${RPM_BUILD_ROOT} @@ -125,6 +182,48 @@ fi %{service_del_preun iscsid.socket iscsid.service iscsi.service} %endif +%post -n open-isns +%if 0%{?suse_version} >= 1230 +%{service_add_post isnsd.socket isnsd.service} +%endif + +%postun -n open-isns +%if 0%{?suse_version} >= 1230 +%{service_add_post isnsd.socket isnsd.service} +%endif + +%pre -n open-isns +%if 0%{?suse_version} >= 1230 +%{service_add_pre isnsd.socket isnsd.service} +%endif + +%preun -n open-isns +%{stop_on_removal isnsd isnsdd} +%if 0%{?suse_version} >= 1230 +%{service_del_preun isnsd.socket isnsd.service} +%endif + +%post -n iscsiuio +%if 0%{?suse_version} >= 1230 +%{service_add_post iscsiuio.socket iscsiuio.service} +%endif + +%postun -n iscsiuio +%if 0%{?suse_version} >= 1230 +%{service_add_post iscsiuio.socket iscsiuio.service} +%endif + +%pre -n iscsiuio +%if 0%{?suse_version} >= 1230 +%{service_add_pre iscsiuio.socket iscsiuio.service} +%endif + +%preun -n iscsiuio +%{stop_on_removal isnsd isnsdd} +%if 0%{?suse_version} >= 1230 +%{service_del_preun iscsiuio.socket iscsiuio.service} +%endif + %files %defattr(-,root,root) %dir /etc/iscsi @@ -142,13 +241,51 @@ fi %config /etc/init.d/boot.iscsid-early /usr/sbin/rciscsid %endif -/sbin/* +/sbin/iscsid +/sbin/iscsiadm +/sbin/iscsi-iname +/sbin/iscsistart +/sbin/iscsi-gen-initiatorname +/sbin/iscsi_offload +/sbin/iscsi_discovery %dir /lib/mkinitrd %dir /lib/mkinitrd/scripts /lib/mkinitrd/scripts/setup-iscsi.sh /lib/mkinitrd/scripts/boot-iscsi.sh /lib/mkinitrd/scripts/boot-killiscsi.sh %doc COPYING README -%doc %{_mandir}/man8/* +%doc %{_mandir}/man8/iscsiadm.8.gz +%doc %{_mandir}/man8/iscsid.8.gz +%doc %{_mandir}/man8/iscsi_discovery.8.gz +%doc %{_mandir}/man8/iscsistart.8.gz +%doc %{_mandir}/man8/iscsi-iname.8.gz + +%files -n open-isns +%defattr(-,root,root) +%dir /etc/isns +%attr(0600,root,root) %config(noreplace) /etc/isns/isnsd.conf +%attr(0600,root,root) %config(noreplace) /etc/isns/isnsdd.conf +%if 0%{?suse_version} >= 1230 +%{_unitdir}/isnsd.service +%{_unitdir}/isnsd.socket +%endif +/usr/sbin/isnsd +/usr/sbin/isnsdd +/usr/sbin/isnsadm +%doc %{_mandir}/man8/isnsadm.8.gz +%doc %{_mandir}/man8/isnsd.8.gz +%doc %{_mandir}/man8/isnsdd.8.gz +%doc %{_mandir}/man5/isns_config.5.gz + +%files -n iscsiuio +%defattr(-,root,root) +/sbin/iscsiuio +/sbin/brcm_iscsiuio +%doc %{_mandir}/man8/iscsiuio.8.gz +%config /etc/logrotate.d/iscsiuiolog +%if 0%{?suse_version} >= 1230 +%{_unitdir}/iscsiuio.service +%{_unitdir}/iscsiuio.socket +%endif %changelog