180 lines
6.3 KiB
RPMSpec
180 lines
6.3 KiB
RPMSpec
Name: libiscsi
|
|
Version: 1.19.0
|
|
Release: 11
|
|
Summary: Client-side library to implement the iSCSI protocol
|
|
Recommends: %{name}-utils
|
|
License: LGPLv2+ and GPLv2+
|
|
URL: https://github.com/sahlberg/%{name}
|
|
|
|
Patch1: 0001-iscsi-ls-Fix-iser-url-scheme-parsing.patch
|
|
Patch2: 0002-test-tool-Compare-Write-skip-InvalidDataOutSize-unle.patch
|
|
Patch3: 0003-test-tool-Compare-Write-override-driver-queue_pdu-ca.patch
|
|
Patch4: 0004-test-tool-iSCSICmdSnTooLow-override-driver-queue_pdu.patch
|
|
Patch5: 0005-test-tool-iSCSICmdSnTooHigh-override-driver-queue_pd.patch
|
|
Patch6: 0006-test-tool-iSCSIDataSnInvalid-override-driver-queue_p.patch
|
|
Patch7: 0007-test-tool-BlockEraseReserved-skip-unless-iSCSI.patch
|
|
Patch8: 0008-test-tool-BlockEraseReserved-override-driver-queue_p.patch
|
|
Patch9: 0009-test-tool-CryptoEraseReserved-skip-unless-iSCSI.patch
|
|
Patch10: 0010-test-tool-CryptoEraseReserved-override-driver-queue_.patch
|
|
Patch11: 0011-test-tool-OverwriteReserved-skip-unless-iSCSI.patch
|
|
Patch12: 0012-test-tool-OverwriteReserved-override-driver-queue_pd.patch
|
|
Patch13: 0013-test-tool-remove-unused-iscsi_queue_pdu-symbol-overl.patch
|
|
Patch14: 0014-iser-remove-__packed-from-struct-iser_cm_hdr-declaration.patch
|
|
Patch15: 0015-test-tools-use-extern-init-in-headers.patch
|
|
Patch16: 0016-iscsi-inq-handle-setting-of-debug_level-correctly.patch
|
|
Patch17: 0017-Updata-iscsi-dd.c.patch
|
|
Patch18: 0018-iscsi-swp-handle-setting-of-debug_level-correctly.patch
|
|
Patch19: 0019-fix-iscsi-ls-parameter-parse.patch
|
|
Patch20: 0020-Check-return-value-of-scsi_malloc-in-order-to.patch
|
|
Patch21: 0021-Fix-segmentation-fault-problem.patch
|
|
Patch22: 0022-init-fix-memory-leak-in-iscsi_create_context.patch
|
|
Patch23: 0023-iscsi-command-Fix-leak-in-iscsi_send_data_out.patch
|
|
Patch24: 0024-fix-segmentation-fault.patch
|
|
|
|
Source: https://github.com/sahlberg/%{name}/archive/%{version}.tar.gz
|
|
|
|
BuildRequires: gcc
|
|
BuildRequires: autoconf automake libtool popt-devel CUnit-devel libgcrypt-devel rdma-core-devel chrpath
|
|
|
|
%description
|
|
Libiscsi is a client-side library to implement the iSCSI protocol that can be used
|
|
to access the resources of an iSCSI target.
|
|
|
|
|
|
#######################################################################
|
|
|
|
# Conflict with iscsi-initiator-utils.
|
|
|
|
%prep
|
|
%autosetup -n %{name}-%{version} -p1
|
|
|
|
%build
|
|
sh autogen.sh
|
|
%configure --libdir=%{_libdir}/iscsi --disable-werror
|
|
make %{?_smp_mflags}
|
|
|
|
%check
|
|
make check
|
|
|
|
%install
|
|
make DESTDIR=$RPM_BUILD_ROOT install pkgconfigdir=%{_libdir}/pkgconfig %{?_smp_mflags}
|
|
mkdir -p $RPM_BUILD_ROOT/etc/ld.so.conf.d
|
|
echo %{_libdir}/iscsi > $RPM_BUILD_ROOT/etc/ld.so.conf.d/%{name}-%{_arch}.conf
|
|
rm $RPM_BUILD_ROOT/%{_libdir}/iscsi/libiscsi.a
|
|
rm $RPM_BUILD_ROOT/%{_libdir}/iscsi/libiscsi.la
|
|
|
|
# Remove rpath
|
|
chrpath --delete $RPM_BUILD_ROOT%{_bindir}/iscsi-perf
|
|
chrpath --delete $RPM_BUILD_ROOT%{_bindir}/iscsi-test-cu
|
|
chrpath --delete $RPM_BUILD_ROOT%{_bindir}/iscsi-swp
|
|
chrpath --delete $RPM_BUILD_ROOT%{_bindir}/iscsi-ls
|
|
chrpath --delete $RPM_BUILD_ROOT%{_bindir}/iscsi-inq
|
|
chrpath --delete $RPM_BUILD_ROOT%{_bindir}/iscsi-readcapacity16
|
|
|
|
# Remove "*.old" files
|
|
find $RPM_BUILD_ROOT -name "*.old" -exec rm -f {} \;
|
|
|
|
# Remove library put in /usr/bin
|
|
rm $RPM_BUILD_ROOT/%{_bindir}/ld_iscsi.so
|
|
|
|
%post -p /sbin/ldconfig
|
|
|
|
%postun -p /sbin/ldconfig
|
|
|
|
%package devel
|
|
Summary: Development libraries for iSCSI client
|
|
Requires: %{name}%{?_isa} = %{version}-%{release}
|
|
|
|
%description devel
|
|
This package contains the header files for %{name}.
|
|
|
|
%package help
|
|
Summary: Help info for %{name}
|
|
Requires: %{name}%{?_isa} = %{version}-%{release}
|
|
|
|
%description help
|
|
This package contains the help info for %{name}.
|
|
|
|
%package utils
|
|
Summary: Client utilities for %{name}
|
|
Requires: %{name}%{?_isa} = %{version}-%{release}
|
|
|
|
%description utils
|
|
This package contains utilities of %{name} to connect to iSCSI targets
|
|
|
|
%files
|
|
%license COPYING LICENCE-GPL-2.txt LICENCE-LGPL-2.1.txt
|
|
%doc README TODO
|
|
%dir %{_libdir}/iscsi
|
|
%{_libdir}/iscsi/libiscsi.so.*
|
|
%config /etc/ld.so.conf.d/*
|
|
|
|
%files devel
|
|
%dir %{_includedir}/iscsi
|
|
%{_includedir}/iscsi/iscsi.h
|
|
%{_includedir}/iscsi/scsi-lowlevel.h
|
|
%{_libdir}/iscsi/libiscsi.so
|
|
%{_libdir}/pkgconfig/libiscsi.pc
|
|
|
|
%files help
|
|
%{_mandir}/man1/iscsi-ls.1.gz
|
|
%{_mandir}/man1/iscsi-inq.1.gz
|
|
%{_mandir}/man1/iscsi-swp.1.gz
|
|
%{_mandir}/man1/iscsi-test-cu.1.gz
|
|
|
|
%files utils
|
|
%{_bindir}/iscsi-ls
|
|
%{_bindir}/iscsi-inq
|
|
%{_bindir}/iscsi-readcapacity16
|
|
%{_bindir}/iscsi-swp
|
|
%{_bindir}/iscsi-perf
|
|
%{_bindir}/iscsi-test-cu
|
|
|
|
%changelog
|
|
* Thu Aug 8 2024 yanshuai <yanshuai01@kylinos.cn> - 1.19.0-11
|
|
- DESC: fix segmentation fault
|
|
|
|
* Wed Mar 22 2023 Wenchao Hao <haowenchao2@huawei.com> - 1.19.0-10
|
|
- DESC: backport patch to fix some memory leak issues
|
|
|
|
* Wed Jun 15 2022 Ruijun Ge <geruijun@huawei.com> - 1.19.0-9
|
|
- DESC: backport patch to solve segmentation fault problem
|
|
|
|
* Fri Jun 10 2022 Ruijun Ge <geruijun@huawei.com> - 1.19.0-8
|
|
- DESC: backport patches to solve command parameter parse problem
|
|
and dereference null pointer problem
|
|
|
|
* Tue Apr 12 2022 haowenchao <haowenchao@huawei.com> - 1.19.0-7
|
|
- DESC: iscsi-inq: handle setting of debug_level correctly
|
|
|
|
* Fri Jul 30 2021 chenyanpanHW <chenyanpan@huawei.com> - 1.19.0-6
|
|
- DESC: delete -Sgit from %autosetup, and delete BuildRequires git
|
|
|
|
* Fri Jul 30 2021 yanglongkang <yanglongkang@huawei.com> - 1.19.0-5
|
|
- fix multiple define for gcc10
|
|
|
|
* Fri Nov 20 2020 haowenchao <haowenchao@huawei.com> - 1.19.0-4
|
|
- Split rpm package to avoid main rpm package CUnit dependency
|
|
Previous implement place executable files in main package which leading
|
|
to dependency of CUnit. This change add a package utils and move
|
|
these executable files to utils package to avoid main package's CUnit
|
|
dependency, making main package weak depend on libiscsi-utils
|
|
|
|
* Wed Nov 4 2020 lixiaokeng <lixiaokeng@huawei.com> - 1.19.0-3
|
|
- add make check
|
|
|
|
* Thu Oct 29 2020 Zhiqiang Liu <lzhq28@mail.ustc.edu.cn> - 1.19.0-2
|
|
- backport one patch to fix iser url scheme parsing
|
|
|
|
* Wed Jul 15 2020 Zhiqiang Liu <lzhq28@mail.ustc.edu.cn> - 1.19.0-1
|
|
- update to v1.19.0 version
|
|
|
|
* Tue Jun 30 2020 volcanodragon <linfeilong@huawei.com> - 1.18.0-7
|
|
- Type:enhancement
|
|
- ID:NA
|
|
- SUG:NA
|
|
- DESC: renumber patches
|
|
|
|
* Sat Aug 31 2019 mingfangsen <mingfangsen@huawei.com> - 1.18.0-6
|
|
- Package init
|