Yuchen Lin 2017-04-07 11:52:21 +00:00 committed by Git OBS Bridge
commit ff17797f62
6 changed files with 30 additions and 81 deletions

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:463cbb03cee3b867cb12e97487abd2366831a495e6674ae83ed4d4234560305a
size 498111

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:b9f41fe6eaf7d823f54b3addebde79a04c2e894894e5b9dceb850f2fc26ad79c
size 497737

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:824d2162328aa84c33a77be02be81d83843c7b5512e3ad4a8f9d8ee0522f428d
size 29521

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:9dcd601db0a59dc735e124a760f5b9ffff2f8989347b40752a88b1a8dddeaa1e
size 33462

View File

@ -1,3 +1,15 @@
-------------------------------------------------------------------
Tue Mar 28 15:24:33 UTC 2017 - lduncan@suse.com
- Merged in SUSE-specific changes from SLE branch, to
bring this up to date with latest upstream, including:
* qedi transport support
* README cleanup
* iscsiuio update
* shutdown cleanup
Also, refactored base tar file to pre 2.0.874-suse and
patches file to everything after that tag.
------------------------------------------------------------------- -------------------------------------------------------------------
Thu Mar 9 17:55:58 UTC 2017 - lduncan@suse.com Thu Mar 9 17:55:58 UTC 2017 - lduncan@suse.com

View File

@ -22,29 +22,23 @@ BuildRequires: automake
BuildRequires: bison BuildRequires: bison
BuildRequires: db-devel < 5 BuildRequires: db-devel < 5
BuildRequires: flex BuildRequires: flex
BuildRequires: libmount-devel
BuildRequires: libtool BuildRequires: libtool
BuildRequires: make BuildRequires: make
BuildRequires: open-isns-devel BuildRequires: open-isns-devel
BuildRequires: openssl-devel BuildRequires: openssl-devel
%if 0%{?suse_version} >= 1230
BuildRequires: systemd
%else
PreReq: %fillup_prereq %insserv_prereq
%endif
%if 0%{?suse_version} >= 1320
BuildRequires: suse-module-tools BuildRequires: suse-module-tools
%endif BuildRequires: systemd
BuildRequires: libmount-devel Url: http://www.open-iscsi.com
Url: http://www.open-iscsi.org
Version: 2.0.874 Version: 2.0.874
Release: 0 Release: 0
%{?systemd_requires} %{?systemd_requires}
%define iscsi_release 874 %define iscsi_release 874-suse
Summary: Linux* Open-iSCSI Software Initiator Summary: Linux* Open-iSCSI Software Initiator
License: GPL-2.0+ License: GPL-2.0+
Group: Productivity/Networking/Other Group: Productivity/Networking/Other
Source: %{name}-2.0-%{iscsi_release}.tar.bz2 Source: %{name}-2.0.%{iscsi_release}.tar.bz2
Patch1: %{name}-Factory-latest.diff.bz2 Patch1: %{name}-SUSE-latest.diff.bz2
BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description %description
@ -88,7 +82,7 @@ The communication to the driver is done via Userspace I/O (Kernel module name
'uio'). 'uio').
%prep %prep
%setup -n %{name}-2.0-%{iscsi_release} %setup -n %{name}-2.0.%{iscsi_release}
%patch1 -p1 %patch1 -p1
%build %build
@ -102,96 +96,48 @@ make CFLAGS="${RPM_OPT_FLAGS}"
%install %install
make DESTDIR=${RPM_BUILD_ROOT} install_user make DESTDIR=${RPM_BUILD_ROOT} install_user
%if 0%{?suse_version} < 1320
make DESTDIR=${RPM_BUILD_ROOT} install_mkinitrd_suse
%endif
# install service files # install service files
%if 0%{?suse_version} >= 1230
make DESTDIR=${RPM_BUILD_ROOT} install_service_suse make DESTDIR=${RPM_BUILD_ROOT} install_service_suse
# create rc symlinks # create rc symlinks
[ -d ${RPM_BUILD_ROOT}/usr/sbin ] || mkdir -p ${RPM_BUILD_ROOT}/usr/sbin [ -d ${RPM_BUILD_ROOT}/usr/sbin ] || mkdir -p ${RPM_BUILD_ROOT}/usr/sbin
ln -s %{_sbindir}/service %{buildroot}%{_sbindir}/rciscsi ln -s %{_sbindir}/service %{buildroot}%{_sbindir}/rciscsi
ln -s %{_sbindir}/service %{buildroot}%{_sbindir}/rciscsid ln -s %{_sbindir}/service %{buildroot}%{_sbindir}/rciscsid
ln -s %{_sbindir}/service %{buildroot}%{_sbindir}/rciscsiuio ln -s %{_sbindir}/service %{buildroot}%{_sbindir}/rciscsiuio
%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 \
${RPM_BUILD_ROOT}/etc/init.d/boot.iscsid-early
mv ${RPM_BUILD_ROOT}/etc/init.d/open-iscsi \
${RPM_BUILD_ROOT}/etc/init.d/iscsid
# 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) (cd ${RPM_BUILD_ROOT}/etc; ln -sf iscsi/iscsid.conf iscsid.conf)
touch ${RPM_BUILD_ROOT}/etc/iscsi/initiatorname.iscsi touch ${RPM_BUILD_ROOT}/etc/iscsi/initiatorname.iscsi
install -m 0755 usr/iscsistart %{buildroot}/sbin install -m 0755 usr/iscsistart %{buildroot}/sbin
make DESTDIR=${RPM_BUILD_ROOT} -C iscsiuio install make DESTDIR=${RPM_BUILD_ROOT} -C iscsiuio install
%post %post
%if 0%{?suse_version} < 1320
[ -x /sbin/mkinitrd_setup ] && mkinitrd_setup
%else
%{?regenerate_initrd_post} %{?regenerate_initrd_post}
%endif
if [ ! -f /etc/iscsi/initiatorname.iscsi ] ; then if [ ! -f /etc/iscsi/initiatorname.iscsi ] ; then
/sbin/iscsi-gen-initiatorname /sbin/iscsi-gen-initiatorname
fi fi
%if 0%{?suse_version} >= 1230
%{service_add_post iscsid.socket iscsid.service iscsi.service} %{service_add_post iscsid.socket iscsid.service iscsi.service}
%else
%{fillup_and_insserv -Y boot.iscsid-early}
%endif
%posttrans %posttrans
%if 0%{?suse_version} >= 1320
%{?regenerate_initrd_posttrans} %{?regenerate_initrd_posttrans}
%endif
%postun %postun
%if 0%{?suse_version} < 1320
[ -x /sbin/mkinitrd_setup ] && mkinitrd_setup
%endif
%if 0%{?suse_version} >= 1230
%{service_del_postun iscsid.socket iscsid.service iscsi.service} %{service_del_postun iscsid.socket iscsid.service iscsi.service}
%else
%{insserv_cleanup}
%endif
%pre %pre
%if 0%{?suse_version} >= 1230
%{service_add_pre iscsid.socket iscsid.service iscsi.service} %{service_add_pre iscsid.socket iscsid.service iscsi.service}
%endif
%preun %preun
%if 0%{?suse_version} >= 1230
%{service_del_preun iscsid.socket iscsid.service iscsi.service} %{service_del_preun iscsid.socket iscsid.service iscsi.service}
%else
%{stop_on_removal iscsid}
%endif
%post -n iscsiuio %post -n iscsiuio
%if 0%{?suse_version} >= 1230
%{service_add_post iscsiuio.socket iscsiuio.service} %{service_add_post iscsiuio.socket iscsiuio.service}
%endif
%postun -n iscsiuio %postun -n iscsiuio
%if 0%{?suse_version} >= 1230
%{service_del_postun iscsiuio.socket iscsiuio.service} %{service_del_postun iscsiuio.socket iscsiuio.service}
%endif
%pre -n iscsiuio %pre -n iscsiuio
%if 0%{?suse_version} >= 1230
%{service_add_pre iscsiuio.socket iscsiuio.service} %{service_add_pre iscsiuio.socket iscsiuio.service}
%endif
%preun -n iscsiuio %preun -n iscsiuio
%if 0%{?suse_version} >= 1230
%{service_del_preun iscsiuio.socket iscsiuio.service} %{service_del_preun iscsiuio.socket iscsiuio.service}
%else
%{stop_on_removal iscsiuio}
%endif
%files %files
%defattr(-,root,root) %defattr(-,root,root)
@ -201,16 +147,11 @@ fi
%dir /etc/iscsi/ifaces %dir /etc/iscsi/ifaces
%config /etc/iscsi/ifaces/iface.example %config /etc/iscsi/ifaces/iface.example
/etc/iscsid.conf /etc/iscsid.conf
%if 0%{?suse_version} >= 1230
%{_unitdir}/iscsid.service %{_unitdir}/iscsid.service
%{_unitdir}/iscsid.socket %{_unitdir}/iscsid.socket
%{_unitdir}/iscsi.service %{_unitdir}/iscsi.service
%{_libexecdir}/systemd/system-generators/ibft-rule-generator %{_libexecdir}/systemd/system-generators/ibft-rule-generator
%{_sbindir}/rciscsi %{_sbindir}/rciscsi
%else
%config /etc/init.d/iscsid
%config /etc/init.d/boot.iscsid-early
%endif
%{_sbindir}/rciscsid %{_sbindir}/rciscsid
/sbin/iscsid /sbin/iscsid
/sbin/iscsiadm /sbin/iscsiadm
@ -219,19 +160,17 @@ fi
/sbin/iscsi-gen-initiatorname /sbin/iscsi-gen-initiatorname
/sbin/iscsi_offload /sbin/iscsi_offload
/sbin/iscsi_discovery /sbin/iscsi_discovery
%if 0%{?suse_version} < 1320 /sbin/iscsi_fw_login
%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
%endif
%doc COPYING README %doc COPYING README
%doc %{_mandir}/man8/iscsiadm.8.gz %doc %{_mandir}/man8/iscsiadm.8.gz
%doc %{_mandir}/man8/iscsid.8.gz %doc %{_mandir}/man8/iscsid.8.gz
%doc %{_mandir}/man8/iscsi_discovery.8.gz %doc %{_mandir}/man8/iscsi_discovery.8.gz
%doc %{_mandir}/man8/iscsistart.8.gz %doc %{_mandir}/man8/iscsistart.8.gz
%doc %{_mandir}/man8/iscsi-iname.8.gz %doc %{_mandir}/man8/iscsi-iname.8.gz
%doc %{_mandir}/man8/iscsi_fw_login.8.gz
%dir %{_sysconfdir}/udev
%dir %{_sysconfdir}/udev/rules.d
%config %{_sysconfdir}/udev/rules.d/50-iscsi-firmware-login.rules
%files -n iscsiuio %files -n iscsiuio
%defattr(-,root,root) %defattr(-,root,root)
@ -239,10 +178,8 @@ fi
/sbin/brcm_iscsiuio /sbin/brcm_iscsiuio
%doc %{_mandir}/man8/iscsiuio.8.gz %doc %{_mandir}/man8/iscsiuio.8.gz
%config /etc/logrotate.d/iscsiuiolog %config /etc/logrotate.d/iscsiuiolog
%if 0%{?suse_version} >= 1230
%{_unitdir}/iscsiuio.service %{_unitdir}/iscsiuio.service
%{_unitdir}/iscsiuio.socket %{_unitdir}/iscsiuio.socket
%{_sbindir}/rciscsiuio %{_sbindir}/rciscsiuio
%endif
%changelog %changelog