Compare commits

..

No commits in common. "1185dd78032f0e211cd6a0544be1d1f739d59413" and "5c6b162ae75bb204864292f986e688b63214a53e" have entirely different histories.

2 changed files with 13 additions and 50 deletions

View File

@ -1,13 +1,12 @@
%bcond_without rbd
%bcond_without rdma
%bcond_without gluster
%global oname tgt
%global with_rdma 1
%global with_rbd 1
%global with_glfs 1
Summary: The SCSI target daemon and utility programs
Name: scsi-target-utils
Version: 1.0.79
Release: 5
Release: 1
License: GPLv2
URL: http://stgt.sourceforge.net/
Source0: https://github.com/fujita/tgt/archive/v%{version}/tgt-v%{version}.tar.gz
@ -21,9 +20,7 @@ Patch2: 0003-default-config.patch
Patch3: tgt-1.0.79-Adapt-to-glusterfs-api-7.6.3.patch
BuildRequires: docbook-style-xsl gcc libaio-devel libxslt perl-generators pkgconfig systemd-devel systemd-units
BuildRequires: libgfapi0
BuildRequires: chrpath
%if %{with rdma}
%if 0%{?with_rdma}
BuildRequires: libibverbs-devel librdmacm-devel
Requires: libibverbs librdmacm
%endif
@ -34,7 +31,7 @@ Requires(post): systemd-units
The SCSI target package contains the daemon and tools to setup a SCSI targets.
Currently, software iSCSI targets are supported.
%if %{with rbd}
%if 0%{?with_rbd}
%package rbd
Summary: Support for the Ceph rbd backstore to scsi-target-utils
BuildRequires: librbd-devel
@ -44,7 +41,7 @@ Requires: %{name}%{?_isa} = %{version}-%{release}
Adds support for the Ceph rbd backstore to scsi-target-utils.
%endif
%if %{with gluster}
%if 0%{?with_glfs}
%package gluster
Summary: Support for the Gluster backstore to scsi-target-utils
BuildRequires: glusterfs-api-devel
@ -57,16 +54,11 @@ Adds support for the Gluster glfs backstore to scsi-target-utils.
%package_help
%prep
%autosetup -n %{oname}-%{version} -p1
%autosetup -n %{oname}-%{version} -Sgit -p1
%build
%{__sed} -i -e 's|-g -O2 -fno-strict-aliasing|%{optflags} -fcommon|' -e 's| -Werror | |' usr/Makefile
%{__make} %{?_smp_mflags} \
%{?with_rdma:ISCSI_RDMA=1} \
%{?with_rbd:CEPH_RBD=1} \
%{?with_gluster:GLFS_BD=1} \
SD_NOTIFY=1 \
libdir=%{_libdir}/tgt
%{__make} %{?_smp_mflags} %{?with_rdma:ISCSI_RDMA=1} %{?with_rbd:CEPH_RBD=1} %{?with_glfs:GLFS_BD=1} SD_NOTIFY=1 libdir=%{_libdir}/tgt
%install
install -D -p -m 0755 scripts/tgt-setup-lun %{buildroot}%{_sbindir}/tgt-setup-lun
@ -82,29 +74,17 @@ install -D -p -m 0600 %{SOURCE4} %{buildroot}%{_sysconfdir}/tgt/conf.d/sample.co
install -p -m 0600 %{SOURCE5} %{buildroot}%{_sysconfdir}/tgt/tgtd.conf
pushd usr
%{__make} install \
%{?with_rdma:ISCSI_RDMA=1} \
%{?with_rbd:CEPH_RBD=1} \
%{?with_gluster:GLFS_BD=1} \
SD_NOTIFY=1 \
DESTDIR=%{buildroot} \
sbindir=%{_sbindir} \
libdir=%{_libdir}/tgt
chrpath -d %{buildroot}/%{_sbindir}/tgtd
mkdir -p %{buildroot}/etc/ld.so.conf.d
echo "%{_sbindir}/tgtd" > %{buildroot}/etc/ld.so.conf.d/%{name}-%{_arch}.conf
%{__make} install %{?with_rdma:ISCSI_RDMA=1} %{?with_rbd:CEPH_RBD=1} %{?with_glfs:GLFS_BD=1} SD_NOTIFY=1 DESTDIR=%{buildroot} sbindir=%{_sbindir} libdir=%{_libdir}/tgt
%post
%systemd_post tgtd.service
/sbin/ldconfig
%preun
%systemd_preun tgtd.service
%postun
%systemd_postun tgtd.service
/sbin/ldconfig
%files
%doc README doc/README.iscsi doc/README.iser doc/README.lu_configuration doc/README.mmc doc/README.ssc
%{_sbindir}/tgtd
@ -115,19 +95,18 @@ echo "%{_sbindir}/tgtd" > %{buildroot}/etc/ld.so.conf.d/%{name}-%{_arch}.conf
%{_unitdir}/tgtd.service
%{_sysconfdir}/tgt
%{_sysconfdir}/tgt/conf.d
%config /etc/ld.so.conf.d/*
%attr(0600,root,root) %config(noreplace) %{_sysconfdir}/sysconfig/tgtd
%attr(0600,root,root) %config(noreplace) %{_sysconfdir}/tgt/targets.conf
%attr(0600,root,root) %config(noreplace) %{_sysconfdir}/tgt/tgtd.conf
%attr(0600,root,root) %config(noreplace) %{_sysconfdir}/tgt/conf.d/sample.conf
%if %{with rbd}
%if 0%{?with_rbd}
%files rbd
%{_libdir}/tgt/backing-store/bs_rbd.so
%doc doc/README.rbd
%endif
%if %{with gluster}
%if 0%{?with_glfs}
%files gluster
%{_libdir}/tgt/backing-store/bs_glfs.so
%doc doc/README.glfs
@ -138,17 +117,5 @@ echo "%{_sbindir}/tgtd" > %{buildroot}/etc/ld.so.conf.d/%{name}-%{_arch}.conf
%{_mandir}/man8/*
%changelog
* Fri Dec 9 2022 Qiang Wei <qiang.wei@suse.com> - 1.0.79-5
- Make Ceph rbd, rdma, glusterfs support optional
* Fri Mar 4 2022 xigaoxinyan <xigaoxinyan@huawei.com> - 1.0.79-4
- Remove rpath
* Mon Jan 24 2022 xu_ping <xuping33@huawei.com> - 1.0.79-3
- Add BuildRequires libgfapi0 to fix /usr/bin/ld: cannot find -lgfapi
* Mon Jul 05 2021 wulei <wulei80@huawei.com> - 1.0.79-2
- Remove redundant dependencies, Git is only for patching, user patcher instead.
* Fri Dec 13 2019 openEuler Buildteam <buildteam@openeuler.org> - 1.0.79-1
- Package init

View File

@ -1,4 +0,0 @@
version_control: github
src_repo: fujita/tgt
tag_prefix: ^v
seperator: .