!12 [sync] PR-9: remove rpath

From: @openeuler-sync-bot 
Reviewed-by: @gitee-cmd 
Signed-off-by: @gitee-cmd
This commit is contained in:
openeuler-ci-bot 2022-07-30 07:10:48 +00:00 committed by Gitee
commit 4b75b69491
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -6,7 +6,7 @@
Summary: The SCSI target daemon and utility programs
Name: scsi-target-utils
Version: 1.0.79
Release: 3
Release: 4
License: GPLv2
URL: http://stgt.sourceforge.net/
Source0: https://github.com/fujita/tgt/archive/v%{version}/tgt-v%{version}.tar.gz
@ -21,6 +21,7 @@ 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 0%{?with_rdma}
BuildRequires: libibverbs-devel librdmacm-devel
Requires: libibverbs librdmacm
@ -76,16 +77,20 @@ 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
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
@ -96,6 +101,7 @@ 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
@ -118,6 +124,9 @@ pushd usr
%{_mandir}/man8/*
%changelog
* 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