2007-01-16 00:27:31 +01:00
|
|
|
#
|
2011-10-27 12:08:18 +02:00
|
|
|
# spec file for package open-iscsi
|
2007-01-16 00:27:31 +01:00
|
|
|
#
|
2015-03-10 18:42:29 +01:00
|
|
|
# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
|
2007-01-16 00:27:31 +01:00
|
|
|
#
|
2008-08-29 02:59:20 +02:00
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
2007-01-16 00:27:31 +01:00
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
|
|
#
|
|
|
|
|
2008-04-15 15:27:22 +02:00
|
|
|
|
2007-01-16 00:27:31 +01:00
|
|
|
Name: open-iscsi
|
2014-04-30 19:04:50 +02:00
|
|
|
BuildRequires: autoconf
|
|
|
|
BuildRequires: automake
|
2013-03-16 09:19:24 +01:00
|
|
|
BuildRequires: bison
|
2014-11-25 23:47:06 +01:00
|
|
|
BuildRequires: db-devel < 5
|
2013-03-16 09:19:24 +01:00
|
|
|
BuildRequires: flex
|
2014-04-30 19:04:50 +02:00
|
|
|
BuildRequires: libtool
|
|
|
|
BuildRequires: make
|
2013-07-17 10:53:52 +02:00
|
|
|
BuildRequires: openssl-devel
|
2013-10-04 14:27:54 +02:00
|
|
|
%if 0%{?suse_version} >= 1230
|
|
|
|
BuildRequires: systemd
|
2015-03-10 14:18:30 +01:00
|
|
|
%else
|
|
|
|
PreReq: %fillup_prereq %insserv_prereq
|
2013-10-04 14:27:54 +02:00
|
|
|
%endif
|
2014-12-06 00:33:19 +01:00
|
|
|
%if 0%{?suse_version} >= 1320
|
|
|
|
BuildRequires: suse-module-tools
|
|
|
|
%endif
|
2015-03-23 11:30:43 +01:00
|
|
|
BuildRequires: libmount-devel
|
2008-04-15 15:27:22 +02:00
|
|
|
Url: http://www.open-iscsi.org
|
2013-07-17 10:53:52 +02:00
|
|
|
Version: 2.0.873
|
2013-03-16 09:19:24 +01:00
|
|
|
Release: 0
|
2013-10-04 14:27:54 +02:00
|
|
|
%{?systemd_requires}
|
2013-07-17 10:53:52 +02:00
|
|
|
%define iscsi_release 873
|
2007-01-16 00:27:31 +01:00
|
|
|
Summary: Linux* Open-iSCSI Software Initiator
|
2013-03-16 09:19:24 +01:00
|
|
|
License: GPL-2.0+
|
|
|
|
Group: Productivity/Networking/Other
|
2013-07-17 10:53:52 +02:00
|
|
|
Source: %{name}-2.0-%{iscsi_release}.tar.bz2
|
2014-06-11 19:38:42 +02:00
|
|
|
Source1: %{name}-firewall.service
|
2014-01-28 21:04:44 +01:00
|
|
|
Patch1: %{name}-Factory-latest.diff.bz2
|
2007-01-16 00:27:31 +01:00
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
|
|
|
|
|
|
%description
|
|
|
|
Open-iSCSI is a high-performance, transport independent, multi-platform
|
|
|
|
implementation of RFC3720 iSCSI.
|
|
|
|
|
|
|
|
Open-iSCSI is partitioned into user and kernel parts.
|
|
|
|
|
|
|
|
The kernel portion of Open-iSCSI is a from-scratch code licensed under
|
|
|
|
GPL. The kernel part implements iSCSI data path (that is, iSCSI Read
|
|
|
|
and iSCSI Write), and consists of two loadable modules: iscsi_if.ko and
|
|
|
|
iscsi_tcp.ko.
|
|
|
|
|
|
|
|
User space contains the entire control plane: configuration manager,
|
|
|
|
iSCSI Discovery, Login and Logout processing, connection-level error
|
|
|
|
processing, Nop-In and Nop-Out handling, and (in the future:) Text
|
|
|
|
processing, iSNS, SLP, Radius, etc.
|
|
|
|
|
|
|
|
The user space Open-iSCSI consists of a daemon process called iscsid,
|
|
|
|
and a management utility iscsiadm.
|
|
|
|
|
2014-04-30 19:04:50 +02:00
|
|
|
%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.
|
|
|
|
|
|
|
|
%package -n iscsiuio
|
|
|
|
Summary: Linux Broadcom NetXtremem II iscsi server
|
|
|
|
Group: Productivity/Networking/Other
|
|
|
|
Version: 0.7.8.2
|
|
|
|
Release: 0
|
2015-06-18 19:56:02 +02:00
|
|
|
Requires: logrotate
|
2014-04-30 19:04:50 +02:00
|
|
|
|
|
|
|
%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').
|
|
|
|
|
2007-01-16 00:27:31 +01:00
|
|
|
%prep
|
2013-07-17 10:53:52 +02:00
|
|
|
%setup -n %{name}-2.0-%{iscsi_release}
|
2008-07-25 16:58:50 +02:00
|
|
|
%patch1 -p1
|
2007-01-16 00:27:31 +01:00
|
|
|
|
|
|
|
%build
|
2014-04-30 19:04:50 +02:00
|
|
|
%{__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}"
|
2007-01-16 00:27:31 +01:00
|
|
|
|
|
|
|
%install
|
2013-07-17 10:53:52 +02:00
|
|
|
make DESTDIR=${RPM_BUILD_ROOT} install_user
|
2014-12-06 00:33:19 +01:00
|
|
|
%if 0%{?suse_version} < 1320
|
2013-10-04 14:27:54 +02:00
|
|
|
make DESTDIR=${RPM_BUILD_ROOT} install_mkinitrd_suse
|
2014-12-06 00:33:19 +01:00
|
|
|
%endif
|
2013-10-04 14:27:54 +02:00
|
|
|
# install service files
|
|
|
|
%if 0%{?suse_version} >= 1230
|
|
|
|
make DESTDIR=${RPM_BUILD_ROOT} install_service_suse
|
2015-06-18 19:56:02 +02:00
|
|
|
# create rc symlinks
|
|
|
|
[ -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}/rciscsid
|
|
|
|
ln -s %{_sbindir}/service %{buildroot}%{_sbindir}/rciscsiuio
|
|
|
|
ln -s %{_sbindir}/service %{buildroot}%{_sbindir}/rcisnsd
|
2013-10-04 14:27:54 +02:00
|
|
|
%else
|
2007-01-16 00:27:31 +01:00
|
|
|
make DESTDIR=${RPM_BUILD_ROOT} install_initd_suse
|
2013-07-17 10:53:52 +02:00
|
|
|
# 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
|
2013-10-04 14:27:54 +02:00
|
|
|
%endif
|
2007-04-04 20:32:14 +02:00
|
|
|
(cd ${RPM_BUILD_ROOT}/etc; ln -sf iscsi/iscsid.conf iscsid.conf)
|
2013-07-17 10:53:52 +02:00
|
|
|
touch ${RPM_BUILD_ROOT}/etc/iscsi/initiatorname.iscsi
|
2013-11-15 16:40:31 +01:00
|
|
|
install -m 0755 usr/iscsistart %{buildroot}/sbin
|
2014-04-30 19:04:50 +02:00
|
|
|
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
|
2014-06-11 19:38:42 +02:00
|
|
|
# install firewall file for isns server
|
|
|
|
install -vD %{S:1} %{buildroot}/etc/sysconfig/SuSEfirewall2.d/services/isns
|
2007-01-16 00:27:31 +01:00
|
|
|
|
|
|
|
%post
|
2014-12-06 00:33:19 +01:00
|
|
|
%if 0%{?suse_version} < 1320
|
2008-09-06 01:11:16 +02:00
|
|
|
[ -x /sbin/mkinitrd_setup ] && mkinitrd_setup
|
2014-12-06 00:33:19 +01:00
|
|
|
%else
|
|
|
|
%{?regenerate_initrd_post}
|
|
|
|
%endif
|
2007-04-04 20:32:14 +02:00
|
|
|
if [ ! -f /etc/iscsi/initiatorname.iscsi ] ; then
|
|
|
|
/sbin/iscsi-gen-initiatorname
|
2007-01-16 00:27:31 +01:00
|
|
|
fi
|
2013-10-04 14:27:54 +02:00
|
|
|
%if 0%{?suse_version} >= 1230
|
|
|
|
%{service_add_post iscsid.socket iscsid.service iscsi.service}
|
|
|
|
%else
|
|
|
|
%{fillup_and_insserv -Y boot.iscsid-early}
|
|
|
|
%endif
|
2007-01-16 00:27:31 +01:00
|
|
|
|
2014-12-06 00:33:19 +01:00
|
|
|
%posttrans
|
|
|
|
%if 0%{?suse_version} >= 1320
|
|
|
|
%{?regenerate_initrd_posttrans}
|
|
|
|
%endif
|
|
|
|
|
2007-01-16 00:27:31 +01:00
|
|
|
%postun
|
2014-12-06 00:33:19 +01:00
|
|
|
%if 0%{?suse_version} < 1320
|
2008-09-06 01:11:16 +02:00
|
|
|
[ -x /sbin/mkinitrd_setup ] && mkinitrd_setup
|
2014-12-06 00:33:19 +01:00
|
|
|
%endif
|
2013-10-04 14:27:54 +02:00
|
|
|
%if 0%{?suse_version} >= 1230
|
|
|
|
%{service_del_postun iscsid.socket iscsid.service iscsi.service}
|
|
|
|
%else
|
2007-01-16 00:27:31 +01:00
|
|
|
%{insserv_cleanup}
|
2013-10-04 14:27:54 +02:00
|
|
|
%endif
|
|
|
|
|
|
|
|
%pre
|
|
|
|
%if 0%{?suse_version} >= 1230
|
|
|
|
%{service_add_pre iscsid.socket iscsid.service iscsi.service}
|
|
|
|
%endif
|
2007-01-16 00:27:31 +01:00
|
|
|
|
2007-07-10 19:04:15 +02:00
|
|
|
%preun
|
2013-10-04 14:27:54 +02:00
|
|
|
%if 0%{?suse_version} >= 1230
|
|
|
|
%{service_del_preun iscsid.socket iscsid.service iscsi.service}
|
2015-03-10 14:18:30 +01:00
|
|
|
%else
|
|
|
|
%{stop_on_removal iscsid}
|
2013-10-04 14:27:54 +02:00
|
|
|
%endif
|
2007-07-10 19:04:15 +02:00
|
|
|
|
2014-04-30 19:04:50 +02:00
|
|
|
%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
|
2014-12-06 00:33:19 +01:00
|
|
|
%{service_del_postun isnsd.socket isnsd.service}
|
2014-04-30 19:04:50 +02:00
|
|
|
%endif
|
|
|
|
|
|
|
|
%pre -n open-isns
|
|
|
|
%if 0%{?suse_version} >= 1230
|
|
|
|
%{service_add_pre isnsd.socket isnsd.service}
|
|
|
|
%endif
|
|
|
|
|
|
|
|
%preun -n open-isns
|
|
|
|
%if 0%{?suse_version} >= 1230
|
|
|
|
%{service_del_preun isnsd.socket isnsd.service}
|
2015-03-10 14:18:30 +01:00
|
|
|
%else
|
|
|
|
%{stop_on_removal isnsd isnsdd}
|
2014-04-30 19:04:50 +02:00
|
|
|
%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
|
2014-12-06 00:33:19 +01:00
|
|
|
%{service_del_postun iscsiuio.socket iscsiuio.service}
|
2014-04-30 19:04:50 +02:00
|
|
|
%endif
|
|
|
|
|
|
|
|
%pre -n iscsiuio
|
|
|
|
%if 0%{?suse_version} >= 1230
|
|
|
|
%{service_add_pre iscsiuio.socket iscsiuio.service}
|
|
|
|
%endif
|
|
|
|
|
|
|
|
%preun -n iscsiuio
|
|
|
|
%if 0%{?suse_version} >= 1230
|
|
|
|
%{service_del_preun iscsiuio.socket iscsiuio.service}
|
2015-03-10 14:18:30 +01:00
|
|
|
%else
|
|
|
|
%{stop_on_removal iscsiuio}
|
2014-04-30 19:04:50 +02:00
|
|
|
%endif
|
|
|
|
|
2007-01-16 00:27:31 +01:00
|
|
|
%files
|
|
|
|
%defattr(-,root,root)
|
2008-07-25 16:58:50 +02:00
|
|
|
%dir /etc/iscsi
|
2007-01-16 00:27:31 +01:00
|
|
|
%attr(0600,root,root) %config(noreplace) /etc/iscsi/iscsid.conf
|
2013-07-17 10:53:52 +02:00
|
|
|
%ghost /etc/iscsi/initiatorname.iscsi
|
2008-07-25 16:58:50 +02:00
|
|
|
%dir /etc/iscsi/ifaces
|
2008-09-06 01:11:16 +02:00
|
|
|
%config /etc/iscsi/ifaces/iface.example
|
2007-04-04 20:32:14 +02:00
|
|
|
/etc/iscsid.conf
|
2013-10-04 14:27:54 +02:00
|
|
|
%if 0%{?suse_version} >= 1230
|
2014-03-10 19:05:31 +01:00
|
|
|
%{_unitdir}/iscsid.service
|
2013-10-04 14:27:54 +02:00
|
|
|
%{_unitdir}/iscsid.socket
|
2014-03-10 19:05:31 +01:00
|
|
|
%{_unitdir}/iscsi.service
|
2015-03-10 14:18:30 +01:00
|
|
|
%{_libexecdir}/systemd/system-generators/ibft-rule-generator
|
2015-06-18 19:56:02 +02:00
|
|
|
%{_sbindir}/rciscsi
|
2013-10-04 14:27:54 +02:00
|
|
|
%else
|
2011-10-27 12:08:18 +02:00
|
|
|
%config /etc/init.d/iscsid
|
|
|
|
%config /etc/init.d/boot.iscsid-early
|
2013-10-04 14:27:54 +02:00
|
|
|
%endif
|
2015-06-18 19:56:02 +02:00
|
|
|
%{_sbindir}/rciscsid
|
2014-04-30 19:04:50 +02:00
|
|
|
/sbin/iscsid
|
|
|
|
/sbin/iscsiadm
|
|
|
|
/sbin/iscsi-iname
|
|
|
|
/sbin/iscsistart
|
|
|
|
/sbin/iscsi-gen-initiatorname
|
|
|
|
/sbin/iscsi_offload
|
|
|
|
/sbin/iscsi_discovery
|
2014-12-06 00:33:19 +01:00
|
|
|
%if 0%{?suse_version} < 1320
|
2008-07-25 16:58:50 +02:00
|
|
|
%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
|
2014-12-06 00:33:19 +01:00
|
|
|
%endif
|
2007-01-16 00:27:31 +01:00
|
|
|
%doc COPYING README
|
2014-04-30 19:04:50 +02:00
|
|
|
%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
|
2014-06-11 19:38:42 +02:00
|
|
|
%attr(0644,root,root) %config /etc/sysconfig/SuSEfirewall2.d/services/isns
|
2014-04-30 19:04:50 +02:00
|
|
|
%if 0%{?suse_version} >= 1230
|
|
|
|
%{_unitdir}/isnsd.service
|
|
|
|
%{_unitdir}/isnsd.socket
|
2015-06-18 19:56:02 +02:00
|
|
|
%{_sbindir}/rcisnsd
|
2014-04-30 19:04:50 +02:00
|
|
|
%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
|
2015-06-18 19:56:02 +02:00
|
|
|
%{_sbindir}/rciscsiuio
|
2014-04-30 19:04:50 +02:00
|
|
|
%endif
|
2007-01-16 00:27:31 +01:00
|
|
|
|
2007-04-04 20:32:14 +02:00
|
|
|
%changelog
|