SHA256
1
0
forked from pool/open-iscsi
open-iscsi/open-iscsi.spec
Lee Duncan 2508bb9411 Accepting request 568777 from home:lee_duncan:branches:network
- Removed the "rpm/" source directory from both the
  open-iscsi-2.0.876-suse.tar.bz2  and open-iscsi-SUSE-latest.diff.bz2
  files, since they are not needed for building and are not part
  of the upstream sources. They are still available under the
  git repository at github.com/hreinecke/open-iscsi.git. This means
  that changes to the spec file or the changes file will no longer
  require a change to the "*SUSE-latest*" file.

- Update to latest upstream vesion 2.0.876, with very few
  SUSE-specific modifications, namely around things upstream
  does not care about, like SUSE-specific systemd files. Also,
  version number modified to add "-suse", as usual. See
  the Changelog file for more details on changes in this
  upstream version.
  This replaces open-iscsi-2.0.875-suse.tar.bz2 with
  open-iscsi-2.0.876-suse.tar.bz2, and resets
  open-iscsi-SUSE-latest.diff.bz2 to contain only changes
  since the 2.0.876-suse tag.
  These changes added a new libopeniscsiusr.so library, as
  well as include files under a new open-iscsi-dev package,
  if you want to link against this library.
  The SPEC file was also cleaned up using spec-cleaner.

OBS-URL: https://build.opensuse.org/request/show/568777
OBS-URL: https://build.opensuse.org/package/show/network/open-iscsi?expand=0&rev=95
2018-01-23 22:55:12 +00:00

203 lines
6.3 KiB
RPMSpec

#
# spec file for package open-iscsi
#
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
#
# 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.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
%define iscsi_release 876-suse
Name: open-iscsi
Version: 2.0.876
Release: 0
Summary: Linux* Open-iSCSI Software Initiator
License: GPL-2.0+
Group: Productivity/Networking/Other
Url: http://www.open-iscsi.com
Source: %{name}-2.0.%{iscsi_release}.tar.bz2
Patch1: %{name}-SUSE-latest.diff.bz2
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: bison
BuildRequires: db-devel < 5
BuildRequires: fdupes
BuildRequires: flex
BuildRequires: libmount-devel
BuildRequires: libtool
BuildRequires: make
BuildRequires: open-isns-devel
BuildRequires: openssl-devel
BuildRequires: suse-module-tools
BuildRequires: systemd
Requires(post): coreutils
%{?systemd_requires}
%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.
%package -n iscsiuio
Version: 0.7.8.2
Release: 0
Summary: Linux Broadcom NetXtremem II iscsi server
Group: Productivity/Networking/Other
Requires: logrotate
%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').
%package devel
Version: 2.0.876
Release: 0
Summary: Linux open-iscsi user-level library and include files
Group: Development/Libraries/C and C++
Requires: %{name}
%description devel
This development package contains the open-iscsi user-level library
include files and documentation. These are used to compile against
the libopeniscsiusr library.
%prep
%setup -q -n %{name}-2.0.%{iscsi_release}
%patch1 -p1
%build
make %{?_smp_mflags} OPTFLAGS="%{optflags} -fno-strict-aliasing -DOFFLOAD_BOOT_SUPPORTED -DLOCK_DIR=\\\"%{_sysconfdir}/iscsi\\\"" LDFLAGS="" user
cd iscsiuio
touch NEWS
touch AUTHORS
autoreconf --install
%configure --sbindir=/sbin
make %{?_smp_mflags} CFLAGS="%{optflags}"
%install
make DESTDIR=%{buildroot} install_user
# install service files
make DESTDIR=%{buildroot} install_service_suse
# create rc symlinks
[ -d %{buildroot}%{_sbindir} ] || mkdir -p %{buildroot}%{_sbindir}
ln -s %{_sbindir}/service %{buildroot}%{_sbindir}/rciscsi
ln -s %{_sbindir}/service %{buildroot}%{_sbindir}/rciscsid
ln -s %{_sbindir}/service %{buildroot}%{_sbindir}/rciscsiuio
(cd %{buildroot}/etc; ln -sf iscsi/iscsid.conf iscsid.conf)
touch %{buildroot}%{_sysconfdir}/iscsi/initiatorname.iscsi
install -m 0755 usr/iscsistart %{buildroot}/sbin
make DESTDIR=%{buildroot} -C iscsiuio install
%fdupes %{buildroot}
%post
%{?regenerate_initrd_post}
if [ ! -f %{_sysconfdir}/iscsi/initiatorname.iscsi ] ; then
/sbin/iscsi-gen-initiatorname
fi
%{run_ldconfig}
%{service_add_post iscsid.socket iscsid.service iscsi.service}
%posttrans
%{?regenerate_initrd_posttrans}
%postun
%{run_ldconfig}
%{service_del_postun iscsid.socket iscsid.service iscsi.service}
%pre
%{service_add_pre iscsid.socket iscsid.service iscsi.service}
%preun
%{service_del_preun iscsid.socket iscsid.service iscsi.service}
%post -n iscsiuio
%{service_add_post iscsiuio.socket iscsiuio.service}
%postun -n iscsiuio
%{service_del_postun iscsiuio.socket iscsiuio.service}
%pre -n iscsiuio
%{service_add_pre iscsiuio.socket iscsiuio.service}
%preun -n iscsiuio
%{service_del_preun iscsiuio.socket iscsiuio.service}
%files
%dir %{_sysconfdir}/iscsi
%attr(0600,root,root) %config(noreplace) %{_sysconfdir}/iscsi/iscsid.conf
%ghost %{_sysconfdir}/iscsi/initiatorname.iscsi
%dir %{_sysconfdir}/iscsi/ifaces
%config %{_sysconfdir}/iscsi/ifaces/iface.example
%{_sysconfdir}/iscsid.conf
%{_unitdir}/iscsid.service
%{_unitdir}/iscsid.socket
%{_unitdir}/iscsi.service
%{_libexecdir}/systemd/system-generators/ibft-rule-generator
%{_sbindir}/rciscsi
%{_sbindir}/rciscsid
/sbin/iscsid
/sbin/iscsiadm
/sbin/iscsi-iname
/sbin/iscsistart
/sbin/iscsi-gen-initiatorname
/sbin/iscsi_offload
/sbin/iscsi_discovery
/sbin/iscsi_fw_login
%doc COPYING README
%{_mandir}/man8/iscsiadm.8%{ext_man}
%{_mandir}/man8/iscsid.8%{ext_man}
%{_mandir}/man8/iscsi_discovery.8%{ext_man}
%{_mandir}/man8/iscsistart.8%{ext_man}
%{_mandir}/man8/iscsi-iname.8%{ext_man}
%{_mandir}/man8/iscsi_fw_login.8%{ext_man}
%{_udevrulesdir}/50-iscsi-firmware-login.rules
%{_libdir}/libopeniscsiusr.so*
%files -n iscsiuio
/sbin/iscsiuio
/sbin/brcm_iscsiuio
%{_mandir}/man8/iscsiuio.8%{ext_man}
%config %{_sysconfdir}/logrotate.d/iscsiuiolog
%{_unitdir}/iscsiuio.service
%{_unitdir}/iscsiuio.socket
%{_sbindir}/rciscsiuio
%files devel
%{_includedir}/libopeniscsiusr*.h
%{_mandir}/man3/*.3%{ext_man}
%changelog