6 Star 1 Fork 7

src-openEuler/zfs

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
zfs-kmod.spec 3.20 KB
一键复制 编辑 原始数据 按行查看 历史
pSong 提交于 2024-11-20 20:41 . update 2.1.10 -> 2.1.16
%bcond_with debug
%bcond_with debuginfo
Name: zfs-kmod
Version: 2.1.16
Release: 1
Summary: Kernel module(s)
Group: System Environment/Kernel
License: CDDL-1.0
URL: https://github.com/openzfs/zfs
BuildRequires: kernel-devel
BuildRequires: kernel-rpm-macros
Source0: zfs-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Patch0: 0001-compact-workaround-for-GPL-only-symbols-on-riscv-fro.patch
# Additional dependency information for the kmod sub-package must be specified
# by generating a preamble text file which kmodtool can append to the spec file.
%(/bin/echo -e "\
Requires: zfs = %{version}\n\
Conflicts: zfs-dkms\n\
Obsoletes: kmod-spl\n\
Obsoletes: spl-kmod\n\n" > %{_sourcedir}/kmod-preamble)
# LDFLAGS are not sanitized by arch/*/Makefile for these architectures.
%ifarch ppc ppc64 ppc64le aarch64
%global __global_ldflags %{nil}
%endif
%description
This package contains the ZFS kernel modules.
# Explicitly set latest kernel verion to for kernel_module_package
%global kernel_version %(ls -1 /usr/src/kernels|sort -rV |head -n 1)
%define kmod_name zfs
%kernel_module_package -n %{kmod_name} -p %{_sourcedir}/kmod-preamble
%define ksrc %{_usrsrc}/kernels/%{kverrel}
%define kobj %{ksrc}
%package -n kmod-%{kmod_name}-devel
Summary: ZFS kernel module(s) devel common
Group: System Environment/Kernel
Provides: kmod-spl-devel = %{version}
%description -n kmod-%{kmod_name}-devel
This package provides the header files and objects to build kernel modules.
%prep
%autosetup -n %{kmod_name}-%{version} -p1
if ! [ -d "%{ksrc}" ]; then
echo "Kernel build directory isn't set properly, cannot continue"
exit 1
fi
%if %{with debug}
%define debug --enable-debug
%else
%define debug --disable-debug
%endif
%if %{with debuginfo}
%define debuginfo --enable-debuginfo
%else
%define debuginfo --disable-debuginfo
%endif
%setup -n %{kmod_name}-%{version}
%build
%configure \
--with-config=kernel \
--with-linux=%{ksrc} \
--with-linux-obj=%{kobj} \
%{debug} \
%{debuginfo} \
%{?kernel_cc} \
%{?kernel_ld} \
%{?kernel_llvm}
make %{?_smp_mflags}
%install
make install \
DESTDIR=${RPM_BUILD_ROOT} \
INSTALL_MOD_DIR=extra/%{kmod_name}
%{__rm} -f %{buildroot}/lib/modules/%{kverrel}/modules.*
# find-debuginfo.sh only considers executables
%{__chmod} u+x %{buildroot}/lib/modules/%{kverrel}/extra/*/*/*
%clean
rm -rf $RPM_BUILD_ROOT
%files -n kmod-%{kmod_name}-devel
%{_usrsrc}/%{kmod_name}-%{version}
%{_usrsrc}/spl-%{version}
%changelog
* Thu Jan 02 2025 pSomng <pisong.oerv@isrc.iscas.ac.cn> - 2.1.16-1
- Update to 2.1.16
- backport openzfs/zfs@86239a5
* Wed Apr 19 2023 Xinliang Liu <xinliang.liu@linaro.org> - 2.1.10-1
- Update to 2.1.10
- Fix release number contains double %{dist}, e.g. "*.oe1.oe1.aarch64.rpm"
- Fix kmod name without kernel release number by switching to redhat spec
- Only build for latest kernel
* Wed Mar 08 2023 Xinliang Liu <xinliang.liu@linaro.org> - 2.1.9-2
- Fix Source0 url.
* Fri Feb 24 2023 Xinliang Liu <xinliang.liu@linaro.org> - 2.1.9-1
- Initial RPM release
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/src-openeuler/zfs.git
git@gitee.com:src-openeuler/zfs.git
src-openeuler
zfs
zfs
master

搜索帮助