8 Star 3 Fork 39

src-openEuler/spdk

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
spdk.spec 9.05 KB
一键复制 编辑 原始数据 按行查看 历史
swf504 提交于 2024-08-16 08:22 . adapt for HSAK
#needsrootforbuild
# Build documentation package
%bcond_with doc
Name: spdk
Version: 24.01
Release: 7
Summary: Set of libraries and utilities for high performance user-mode storage
License: BSD and MIT
URL: http://spdk.io
Source0: https://github.com/spdk/spdk/archive/refs/tags/v%{version}.tar.gz
Patch1: 0001-Add-without-ISA-L-option-and-disabled-by-default.patch
Patch2: 0002-backport-Add-ctrlr_lock-for-cuse-register-and-unregister.patch
Patch3: 0003-add-HSAK-needed-head-file-and-API-to-spdk.patch
Patch4: 0004-lib-bdev-Add-bdev-support-for-HSAK.patch
Patch5: 0005-lib-env_dpdk-Add-config-args-for-HSAK.patch
Patch6: 0006-lib-nvme-Add-nvme-support-for-HSAK.patch
Patch7: 0007-module-bdev-Add-bdev-module-support-for-HSAK.patch
Patch8: 0008-use-spdk_nvme_ns_cmd_dataset_management-and-delete-s.patch
Patch9: 0009-spdk-add-nvme-support-for-HSAK.patch
Patch10: 0010-Add-CUSE-switch-for-nvme-ctrlr.patch
Patch11: 0011-Adapt-for-ES3000-serial-vendor-special-opcode-in-CUS.patch
Patch12: 0012-adapt-for-spdk-24.01.patch
%define package_version %{version}-%{release}
%define install_datadir %{buildroot}/%{_datadir}/%{name}
%define install_sbindir %{buildroot}/%{_sbindir}
%define install_docdir %{buildroot}/%{_docdir}/%{name}
# Distros that don't support python3 will use python2
%if "%{dist}" == ".el7"
%define use_python2 1
%else
%define use_python2 0
%endif
ExclusiveArch: x86_64 aarch64 loongarch64 ppc64le riscv64
BuildRequires: gcc gcc-c++ make
BuildRequires: dpdk-devel >= 23.11, numactl-devel, ncurses-devel
BuildRequires: libiscsi-devel, libaio-devel, openssl-devel, libuuid-devel
BuildRequires: libibverbs-devel, librdmacm-devel
BuildRequires: fuse3, fuse3-devel
BuildRequires: libboundscheck
BuildRequires: patchelf
BuildRequires: CUnit, CUnit-devel, python3-pip, chrpath
%if %{with doc}
BuildRequires: doxygen mscgen graphviz
%endif
# Install dependencies
Requires: dpdk >= 23.11, numactl-libs, openssl-libs
Requires: libiscsi, libaio, libuuid
Requires: fuse3, libboundscheck
# NVMe over Fabrics
Requires: librdmacm, librdmacm
Requires(post): /sbin/ldconfig
Requires(postun): /sbin/ldconfig
%description
The Storage Performance Development Kit provides a set of tools
and libraries for writing high performance, scalable, user-mode storage
applications.
%package devel
Summary: Storage Performance Development Kit development files
Requires: %{name}%{?_isa} = %{package_version}
Provides: %{name}-static%{?_isa} = %{package_version}
%description devel
This package contains the headers and other files needed for
developing applications with the Storage Performance Development Kit.
%package tools
Summary: Storage Performance Development Kit tools files
%if "%{use_python2}" == "0"
Requires: %{name} = %{package_version} python3 python3-configshell python3-pexpect
%else
Requires: %{name} = %{package_version} python python-configshell pexpect
%endif
BuildArch: noarch
%description tools
%{summary}
%if %{with doc}
%package doc
Summary: Storage Performance Development Kit documentation
BuildArch: noarch
%description doc
%{summary}
%endif
%prep
# add -q
%autosetup -n spdk-%{version} -p1
%build
./configure --prefix=%{_usr} \
--disable-tests \
--disable-examples \
--disable-unit-tests \
--disable-apps \
--without-crypto \
--without-isal \
--with-dpdk \
--without-fio \
--with-vhost \
--without-rbd \
--with-rdma \
--with-shared \
--with-iscsi-initiator \
--without-vtune \
--enable-raw \
--with-nvme-cuse \
make -j`nproc` all
%if %{with doc}
make -C doc
%endif
%install
%make_install -j`nproc` prefix=%{_usr} libdir=%{_libdir} datadir=%{_datadir}
install -d $RPM_BUILD_ROOT%{_sysconfdir}/spdk
install -d $RPM_BUILD_ROOT/opt/spdk
install -d $RPM_BUILD_ROOT/usr/include/spdk_internal
install -m 0744 ./scripts/setup_self.sh $RPM_BUILD_ROOT/opt/spdk/setup.sh
install -m 0644 ./etc/spdk/nvme.conf.in $RPM_BUILD_ROOT%{_sysconfdir}/spdk
install -m 0644 include/spdk_internal/*.h $RPM_BUILD_ROOT/usr/include/spdk_internal
install -m 0644 lib/nvme/nvme_internal.h $RPM_BUILD_ROOT/usr/include/spdk_internal
install -m 0644 lib/env_dpdk/22.11/*.h $RPM_BUILD_ROOT/usr/include/spdk
# Install tools
mkdir -p %{install_datadir}
find scripts -type f -regextype egrep -regex '.*(spdkcli|rpc).*[.]py' \
-exec cp --parents -t %{install_datadir} {} ";"
# env is banned - replace '/usr/bin/env anything' with '/usr/bin/anything'
find %{install_datadir}/scripts -type f -regextype egrep -regex '.*([.]py|[.]sh)' \
-exec sed -i -E '1s@#!/usr/bin/env (.*)@#!/usr/bin/\1@' {} +
%if "%{use_python2}" == "1"
find %{install_datadir}/scripts -type f -regextype egrep -regex '.*([.]py)' \
-exec sed -i -E '1s@#!/usr/bin/python3@#!/usr/bin/python2@' {} +
%endif
# synlinks to tools
mkdir -p %{install_sbindir}
ln -sf -r %{install_datadir}/scripts/rpc.py %{install_sbindir}/%{name}-rpc
ln -sf -r %{install_datadir}/scripts/spdkcli.py %{install_sbindir}/%{name}-cli
%if %{with doc}
# Install doc
mkdir -p %{install_docdir}
mv doc/output/html/ %{install_docdir}
%endif
%chrpath_delete
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%files
%dir /opt/spdk
/opt/spdk/setup.sh
%dir %{_sysconfdir}/spdk
%{_sysconfdir}/spdk/nvme.conf.in
/usr/lib/python%{python3_version}/site-packages/spdk*/*
%{_bindir}/spdk_*
%{_libdir}/*.so.*
%files devel
%{_libdir}/pkgconfig/*.pc
%{_includedir}/%{name}
%{_libdir}/*.a
%{_libdir}/*.so
%dir /usr/include/spdk_internal
/usr/include/spdk_internal/*.h
%files tools
%{_datadir}/%{name}/scripts
%{_sbindir}/%{name}-rpc
%{_sbindir}/%{name}-cli
%if %{with doc}
%files doc
%{_docdir}/%{name}
%endif
%changelog
* Sat Aug 17 2024 Weifeng Su <suweifeng1@huawei.com> - 24.01-7
- Adapt for HSAK
* Thu Jun 6 2024 baiguo <baiguo@kylinos.cn> - 24.01-6
- Add ctrlr_lock for cuse register and unregister
* Mon Apr 29 2024 huangwenhua <huangwenhua@kylinos.cn> - 24.01-5
- Add BuildRequires: patchelf
* Wed Mar 13 2024 wangxiaomeng <wangxiaomeng@kylinos.cn> - 24.01-4
- Add version constraints to the dpdk-devel package to resolve building error
* Tue Mar 5 2024 shafeipaozi <sunbo.oerv@isrc.iscas.ac.cn> - 24.01-3
- Add support for riscv64
* Tue Mar 5 2024 Ren Zhijie <zhijie.ren@shingroup.cn> - 24.01-2
- Add support for ppc64le
* Tue Feb 20 2024 Hongtao Zhang <zhanghongtao22@huawei.com> - 24.01-1
- Update to 24.01 LTS version
* Thu Jan 4 2024 Hongtao Zhang <zhanghongtao22@huawei.com> - 21.01.1-19
- Fix deadlock due to lock sequence in bdev_unregister_unsafe
* Thu Dec 14 2023 Hongtao Zhang <zhanghongtao22@huawei.com> - 21.01.1-18
- Return error when failing to get resource
* Tue Sep 5 2023 Hongtao Zhang <zhanghongtao22@huawei.com> - 21.01.1-17
- Replace backport solution to fix race condition in cuse session
* Fri Sep 1 2023 Xue Liu <liuxue@loongson.cn> - 21.01.1-16
- Add support for LOONGARCH.
* Sat Aug 26 2023 Weifeng Su <suweifeng1@huawei.com> - 21.01.1-15
- backport patch to fix gcc-12 warning
* Tue May 30 2023 Jia Chao <jiac13@chinaunicom.cn> - 21.01.1-14
- Fix: tools do not need require %{?_isa} package for it's noarch.
* Wed Mar 15 2023 tongkunkun <tongkunkun_yewu@cmss.chinamobile.com>- 21.01.1-13
- backport upstream patches
* Thu Jan 19 2023 shikemeng <shikemeng@huawei.com> - 21.01.1-12
- Fix compile error that "undefined reference to spdk_backdev_submit_io"
* Thu Jan 12 2023 shikemeng <shikemeng@huawei.com> - 21.01.1-11
- enable xcache
* Thu Dec 29 2022 shikemeng <shikemeng@huawei.com> - 21.01.1-10
- Upgrade ocf lib and ocf bdev to SPDK 22.05
* Mon Dec 12 2022 Hongtao Zhang <zhanghongtao22@huawei.com> - 21.01.1-9
- Fix UAF in STAILQ_FOREACH
* Wed Dec 7 2022 Hongtao Zhang <zhanghongtao22@huawei.com> - 21.01.1-8
- Fix Segmentation fault occurs due to recursion
* Tue Nov 1 2022 Weifeng Su <suweifeng1@huawei.com> - 21.01.1-7
- Enable unittest
* Mon Oct 10 2022 Hongtao Zhang <zhanghongtao22@huawei.com> - 21.01.1-6
- configure add CONFIG_HAVE_ARC4RANDOM
* Tue May 24 2022 Weifeng Su <suweifeng1@huawei.com> - 21.01.1-5
- Add support for HSAK
* Tue Mar 15 2022 Weifeng Su <suweifeng1@huawei.com> - 21.01.1-4
- Remove rpath link option, Due to it's easy for attacher to
construct 'rpath' attacks
* Fri Feb 25 2022 Hongtao Zhang <zhanghongtao22@huawei.com> - 21.01.1-3
- Fix build error on ARM ThunderX2 and neoverse N1 platform
* Mon Jan 10 2022 Weifeng Su <suweifeng1@huawei.com> - 21.01.1-2
- Adapt for dpdk 21.11
* Tue Nov 23 2021 Weifeng Su <suweifeng1@huawei.com> - 21.01.1-1
- rebase to v21.01.1 Maintenance LTS Version
* Mon Sep 13 2021 Zhiqiang Liu <liuzhiqiang26@huawei.com> - 21.01-5
- use -fstack-protector-strong instead of -fstack-protector for
stronger security.
* Sat Jul 24 2021 Zhiqiang Liu <liuzhiqiang26@huawei.com> - 21.01-4
- backport 13 bugfix from upstream
* Tue Jul 13 2021 Xiaokeng Li <lixiaokeng@huawei.com> - 21.01-3
- backport bugfix from upstream
* Wed Mar 10 2021 Shihao Sun <sunshihao@huawei.com> - 21.01-2
- use --without-isal to avoid build failed in arm.
* Thu Feb 4 2021 Shihao Sun <sunshihao@huawei.com> - 21.01-1
- update spdk to 21.01 LTS version.
* Thu Nov 26 2020 Shihao Sun <sunshihao@huawei.com> - 20.01.1-2
- modify license
* Sat Nov 7 2020 Feilong Lin <linfeilong@huawei.com> - 20.01.1-1
- Support aarch64
* Tue Sep 18 2018 Pawel Wodkowski <pawelx.wodkowski@intel.com> - 0:18.07-3
- Initial RPM release
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/src-openeuler/spdk.git
git@gitee.com:src-openeuler/spdk.git
src-openeuler
spdk
spdk
master

搜索帮助

D67c1975 1850385 1daf7b77 1850385