Compare commits

...

10 Commits

Author SHA1 Message Date
openeuler-ci-bot
1185dd7803
!18 [sync] PR-17: 重命名条件编译控制变量名称,并使之可以在编译系统中控制
From: @openeuler-sync-bot 
Reviewed-by: @wang--ge 
Signed-off-by: @wang--ge
2023-03-30 02:45:59 +00:00
Qiang Wei
535c716da4 Rename controll compile variable name
Signed-off-by: Qiang Wei <qiang.wei@suse.com>
(cherry picked from commit cfe7581a76ede901297678734c85df59a805da9a)
2023-03-30 10:37:02 +08:00
openeuler-ci-bot
6727e447b0
!16 [sync] PR-9: remove rpath
From: @openeuler-sync-bot 
Reviewed-by: @gitee-cmd 
Signed-off-by: @gitee-cmd
2022-12-08 08:59:13 +00:00
xigaoxinyan
c16f470408 spec
(cherry picked from commit 1c84e97a000d3c7e9f57d639537362a5c7aee7e3)
2022-12-08 16:09:16 +08:00
openeuler-ci-bot
b89559bc82
!8 Add BuildRequires libgfapi0 to fix /usr/bin/ld: cannot find -lgfapi
Merge pull request !8 from xu_ping/openEuler-22.03-LTS-Next
2022-01-24 08:24:54 +00:00
cherry530
870d248581 Add BuildRequires libgfapi0 to fix /usr/bin/ld: cannot find -lgfapi
Signed-off-by: cherry530 <xuping33@huawei.com>
2022-01-24 15:54:54 +08:00
openeuler-ci-bot
244dcaba73 !7 解除git依赖,避免冗余依赖缺失导致的error
From: @wu-leilei
Reviewed-by: @small_leek
Signed-off-by: @small_leek
2021-07-05 03:04:00 +00:00
wu-leilei
ed920fe427 Remove redundant dependencies, Git is only for patching, user patcher instead. 2021-07-05 10:35:36 +08:00
openeuler-ci-bot
ad2ed2242a !3 add yaml file
Merge pull request !3 from sigui/master
2020-05-12 19:46:19 +08:00
si-gui
869a995c64 add yaml file 2020-05-12 18:06:39 +08:00
2 changed files with 50 additions and 13 deletions

View File

@ -1,12 +1,13 @@
%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: 1
Release: 5
License: GPLv2
URL: http://stgt.sourceforge.net/
Source0: https://github.com/fujita/tgt/archive/v%{version}/tgt-v%{version}.tar.gz
@ -20,7 +21,9 @@ 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
%if 0%{?with_rdma}
BuildRequires: libgfapi0
BuildRequires: chrpath
%if %{with rdma}
BuildRequires: libibverbs-devel librdmacm-devel
Requires: libibverbs librdmacm
%endif
@ -31,7 +34,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 0%{?with_rbd}
%if %{with rbd}
%package rbd
Summary: Support for the Ceph rbd backstore to scsi-target-utils
BuildRequires: librbd-devel
@ -41,7 +44,7 @@ Requires: %{name}%{?_isa} = %{version}-%{release}
Adds support for the Ceph rbd backstore to scsi-target-utils.
%endif
%if 0%{?with_glfs}
%if %{with gluster}
%package gluster
Summary: Support for the Gluster backstore to scsi-target-utils
BuildRequires: glusterfs-api-devel
@ -54,11 +57,16 @@ Adds support for the Gluster glfs backstore to scsi-target-utils.
%package_help
%prep
%autosetup -n %{oname}-%{version} -Sgit -p1
%autosetup -n %{oname}-%{version} -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_glfs:GLFS_BD=1} SD_NOTIFY=1 libdir=%{_libdir}/tgt
%{__make} %{?_smp_mflags} \
%{?with_rdma:ISCSI_RDMA=1} \
%{?with_rbd:CEPH_RBD=1} \
%{?with_gluster:GLFS_BD=1} \
SD_NOTIFY=1 \
libdir=%{_libdir}/tgt
%install
install -D -p -m 0755 scripts/tgt-setup-lun %{buildroot}%{_sbindir}/tgt-setup-lun
@ -74,17 +82,29 @@ 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_glfs:GLFS_BD=1} SD_NOTIFY=1 DESTDIR=%{buildroot} sbindir=%{_sbindir} libdir=%{_libdir}/tgt
%{__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
%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
@ -95,18 +115,19 @@ pushd usr
%{_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 0%{?with_rbd}
%if %{with rbd}
%files rbd
%{_libdir}/tgt/backing-store/bs_rbd.so
%doc doc/README.rbd
%endif
%if 0%{?with_glfs}
%if %{with gluster}
%files gluster
%{_libdir}/tgt/backing-store/bs_glfs.so
%doc doc/README.glfs
@ -117,5 +138,17 @@ pushd usr
%{_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

4
scsi-target-utils.yaml Normal file
View File

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