From 7da485052a285952a4fe1ea2832040f5e024c03f0f73f5425f817c1c08c945b0 Mon Sep 17 00:00:00 2001 From: Marcus Meissner Date: Fri, 4 Oct 2013 12:27:54 +0000 Subject: [PATCH 1/3] Accepting request 201939 from home:lee_duncan:branches:network - add support for systemd integration (bnc#827654) - Fixed changes file: now only addition is at top OBS-URL: https://build.opensuse.org/request/show/201939 OBS-URL: https://build.opensuse.org/package/show/network/open-iscsi?expand=0&rev=17 --- Week | 1 - ...scsi-openSUSE-Factory-first-merge.diff.bz2 | 3 ++ open-iscsi.changes | 5 +++ open-iscsi.spec | 38 ++++++++++++++++++- 4 files changed, 44 insertions(+), 3 deletions(-) delete mode 100644 Week create mode 100644 open-iscsi-openSUSE-Factory-first-merge.diff.bz2 diff --git a/Week b/Week deleted file mode 100644 index 77924fa..0000000 --- a/Week +++ /dev/null @@ -1 +0,0 @@ -Date: Wed Jul 3 10:03:03 PDT 2013 = Number: 26 diff --git a/open-iscsi-openSUSE-Factory-first-merge.diff.bz2 b/open-iscsi-openSUSE-Factory-first-merge.diff.bz2 new file mode 100644 index 0000000..df9221e --- /dev/null +++ b/open-iscsi-openSUSE-Factory-first-merge.diff.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:48d088abe9f94726e96481b03811935ffc4f5ce58ee40d7a552a7feab7974293 +size 4249 diff --git a/open-iscsi.changes b/open-iscsi.changes index a586f18..7d23f0b 100644 --- a/open-iscsi.changes +++ b/open-iscsi.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Fri Sep 27 14:23:10 PDT 2013 - lduncan@suse.com + +- add support for systemd integration (bnc#827654) + ------------------------------------------------------------------- Wed Jul 3 15:01:50 UTC 2013 - meissner@suse.com diff --git a/open-iscsi.spec b/open-iscsi.spec index 1c1c4fd..c70303a 100644 --- a/open-iscsi.spec +++ b/open-iscsi.spec @@ -21,10 +21,14 @@ BuildRequires: bison BuildRequires: db-devel BuildRequires: flex BuildRequires: openssl-devel +%if 0%{?suse_version} >= 1230 +BuildRequires: systemd +%endif Url: http://www.open-iscsi.org PreReq: %fillup_prereq %insserv_prereq Version: 2.0.873 Release: 0 +%{?systemd_requires} Provides: linux-iscsi Obsoletes: linux-iscsi %define iscsi_release 873 @@ -38,6 +42,7 @@ Patch3: %{name}-sles11-sp3-iscsiuio-update.diff.bz2 Patch4: %{name}-sles11-sp3-flash-update.diff.bz2 Patch5: %{name}-sles11-sp3-general-updates-1.diff.bz2 Patch6: %{name}-openSUSE-12.3-first-merge.diff.bz2 +Patch7: %{name}-openSUSE-Factory-first-merge.diff.bz2 BuildRoot: %{_tmppath}/%{name}-%{version}-build %description @@ -73,12 +78,18 @@ Authors: %patch4 -p1 %patch5 -p1 %patch6 -p1 +%patch7 -p1 %build %{__make} OPTFLAGS="${RPM_OPT_FLAGS} -fno-strict-aliasing -DLOCK_DIR=\\\"/etc/iscsi\\\"" user %install make DESTDIR=${RPM_BUILD_ROOT} install_user +make DESTDIR=${RPM_BUILD_ROOT} install_mkinitrd_suse +# install service files +%if 0%{?suse_version} >= 1230 +make DESTDIR=${RPM_BUILD_ROOT} install_service_suse +%else make DESTDIR=${RPM_BUILD_ROOT} install_initd_suse # rename open-iscsi service to iscsid for openSUSE mv ${RPM_BUILD_ROOT}/etc/init.d/boot.open-iscsi \ @@ -88,6 +99,7 @@ mv ${RPM_BUILD_ROOT}/etc/init.d/open-iscsi \ # create rc shortcut [ -d ${RPM_BUILD_ROOT}/usr/sbin ] || mkdir -p ${RPM_BUILD_ROOT}/usr/sbin ln -sf ../../etc/init.d/iscsid ${RPM_BUILD_ROOT}/usr/sbin/rciscsid +%endif (cd ${RPM_BUILD_ROOT}/etc; ln -sf iscsi/iscsid.conf iscsid.conf) touch ${RPM_BUILD_ROOT}/etc/iscsi/initiatorname.iscsi @@ -96,17 +108,33 @@ touch ${RPM_BUILD_ROOT}/etc/iscsi/initiatorname.iscsi %post [ -x /sbin/mkinitrd_setup ] && mkinitrd_setup -%{fillup_and_insserv -y boot.iscsid-early} if [ ! -f /etc/iscsi/initiatorname.iscsi ] ; then /sbin/iscsi-gen-initiatorname fi +%if 0%{?suse_version} >= 1230 +%{service_add_post iscsid.socket iscsid.service iscsi.service} +%else +%{fillup_and_insserv -Y boot.iscsid-early} +%endif %postun [ -x /sbin/mkinitrd_setup ] && mkinitrd_setup +%if 0%{?suse_version} >= 1230 +%{service_del_postun iscsid.socket iscsid.service iscsi.service} +%else %{insserv_cleanup} +%endif + +%pre +%if 0%{?suse_version} >= 1230 +%{service_add_pre iscsid.socket iscsid.service iscsi.service} +%endif %preun %{stop_on_removal iscsid} +%if 0%{?suse_version} >= 1230 +%{service_del_preun iscsid.socket iscsid.service iscsi.service} +%endif %files %defattr(-,root,root) @@ -116,10 +144,16 @@ fi %dir /etc/iscsi/ifaces %config /etc/iscsi/ifaces/iface.example /etc/iscsid.conf +%if 0%{?suse_version} >= 1230 +%config %{_unitdir}/iscsid.service +%{_unitdir}/iscsid.socket +%config %{_unitdir}/iscsi.service +%else %config /etc/init.d/iscsid %config /etc/init.d/boot.iscsid-early -/sbin/* /usr/sbin/rciscsid +%endif +/sbin/* %dir /lib/mkinitrd %dir /lib/mkinitrd/scripts /lib/mkinitrd/scripts/setup-iscsi.sh From 30e388ec73fb10fabaa6b6f4e3406af3bc6d5853e2e7e6b069ee1ad48a054b50 Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Fri, 4 Oct 2013 16:45:58 +0000 Subject: [PATCH 2/3] Accepting request 202158 from home:olh:branches:network - Remove usage of iscsiuio from mkinitrd scripts - Add programs tags to mkinitrd scripts OBS-URL: https://build.opensuse.org/request/show/202158 OBS-URL: https://build.opensuse.org/package/show/network/open-iscsi?expand=0&rev=18 --- open-iscsi-2.0-873.patch | 49 ++++++++++++++++++++++++++++++++++++++++ open-iscsi.changes | 6 +++++ open-iscsi.spec | 2 ++ 3 files changed, 57 insertions(+) create mode 100644 open-iscsi-2.0-873.patch diff --git a/open-iscsi-2.0-873.patch b/open-iscsi-2.0-873.patch new file mode 100644 index 0000000..d2bce45 --- /dev/null +++ b/open-iscsi-2.0-873.patch @@ -0,0 +1,49 @@ +--- + etc/mkinitrd/mkinitrd-boot.sh | 6 ++++-- + etc/mkinitrd/mkinitrd-stop.sh | 4 ++-- + 2 files changed, 6 insertions(+), 4 deletions(-) + +Index: open-iscsi-2.0-873/etc/mkinitrd/mkinitrd-boot.sh +=================================================================== +--- open-iscsi-2.0-873.orig/etc/mkinitrd/mkinitrd-boot.sh ++++ open-iscsi-2.0-873/etc/mkinitrd/mkinitrd-boot.sh +@@ -1,7 +1,10 @@ + #!/bin/bash + #%stage: device + #%depends: network +-#%programs: /sbin/iscsid /sbin/iscsiadm /sbin/iscsiuio ++#%programs: mkdir ++#%programs: rm ++#%programs: /sbin/iscsid ++#%programs: /sbin/iscsiadm + #%modules: iscsi_tcp crc32c scsi_transport_iscsi iscsi_ibft bnx2i + #%if: "$root_iscsi" -o "$TargetAddress" + # +@@ -87,7 +90,6 @@ echo "InitiatorName=$InitiatorName" > /e + unset iSCSI_warning_InitiatorName + + echo "Starting iSCSI daemon" +-/sbin/iscsiuio + /sbin/iscsid -n + + if [ -d /sys/firmware/ibft/initiator ] ; then +Index: open-iscsi-2.0-873/etc/mkinitrd/mkinitrd-stop.sh +=================================================================== +--- open-iscsi-2.0-873.orig/etc/mkinitrd/mkinitrd-stop.sh ++++ open-iscsi-2.0-873/etc/mkinitrd/mkinitrd-stop.sh +@@ -2,6 +2,8 @@ + # + #%stage: setup + #%provides: killprogs ++#%programs: kill ++#%programs: pidof + # + #%if: "$root_iscsi" + #%dontshow +@@ -19,6 +21,4 @@ + # kill iscsid, will be restarted from the real root + iscsi_pid=$(pidof iscsid) + [ "$iscsi_pid" ] && kill -TERM $iscsi_pid +-# Same goes for iscsiuio +-iscsiuio_pid=$(pidof iscsiuio) + [ "$iscsiuio_pid" ] && kill -TERM $iscsiuio_pid diff --git a/open-iscsi.changes b/open-iscsi.changes index 7d23f0b..2304148 100644 --- a/open-iscsi.changes +++ b/open-iscsi.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Fri Oct 4 16:07:47 CEST 2013 - ohering@suse.de + +- Remove usage of iscsiuio from mkinitrd scripts +- Add programs tags to mkinitrd scripts + ------------------------------------------------------------------- Fri Sep 27 14:23:10 PDT 2013 - lduncan@suse.com diff --git a/open-iscsi.spec b/open-iscsi.spec index c70303a..b195c9e 100644 --- a/open-iscsi.spec +++ b/open-iscsi.spec @@ -43,6 +43,7 @@ Patch4: %{name}-sles11-sp3-flash-update.diff.bz2 Patch5: %{name}-sles11-sp3-general-updates-1.diff.bz2 Patch6: %{name}-openSUSE-12.3-first-merge.diff.bz2 Patch7: %{name}-openSUSE-Factory-first-merge.diff.bz2 +Patch10: open-iscsi-2.0-873.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build %description @@ -79,6 +80,7 @@ Authors: %patch5 -p1 %patch6 -p1 %patch7 -p1 +%patch10 -p1 %build %{__make} OPTFLAGS="${RPM_OPT_FLAGS} -fno-strict-aliasing -DLOCK_DIR=\\\"/etc/iscsi\\\"" user From 980ccf70ac9092e17dc33e5ab7489d3f546a2f2a267519a0ca984b6cb4380384 Mon Sep 17 00:00:00 2001 From: Marcus Meissner Date: Mon, 7 Oct 2013 13:31:27 +0000 Subject: [PATCH 3/3] open-iscsi-2.0-873.patch open-iscsi-openSUSE-Factory-first-merge.diff.bz2 OBS-URL: https://build.opensuse.org/package/show/network/open-iscsi?expand=0&rev=19 --- open-iscsi.changes | 2 ++ 1 file changed, 2 insertions(+) diff --git a/open-iscsi.changes b/open-iscsi.changes index 2304148..4a7ebb9 100644 --- a/open-iscsi.changes +++ b/open-iscsi.changes @@ -3,11 +3,13 @@ Fri Oct 4 16:07:47 CEST 2013 - ohering@suse.de - Remove usage of iscsiuio from mkinitrd scripts - Add programs tags to mkinitrd scripts + open-iscsi-2.0-873.patch ------------------------------------------------------------------- Fri Sep 27 14:23:10 PDT 2013 - lduncan@suse.com - add support for systemd integration (bnc#827654) + open-iscsi-openSUSE-Factory-first-merge.diff.bz2 ------------------------------------------------------------------- Wed Jul 3 15:01:50 UTC 2013 - meissner@suse.com