mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2024-12-26 19:19:32 +03:00
rpm: add support for openEuler
OpenEuler uses the same package manager DNF as RHEL/Fedora. And it is similar to RHEL/Fedora. OpenEuler Linux is becoming the mainstream Linux distro in China. So adding support for it makes sense for the users. For more details about it see: https://www.openeuler.org/en/. Reviewed-by: Richard Yao <richard.yao@alumni.stonybrook.edu> Reviewed-by: George Melikov <mail@gmelikov.ru> Reviewed-by: Damian Szuberski <szuberskidamian@gmail.com> Signed-off-by: Xinliang Liu <xinliang.liu@linaro.org> Closes #14222
This commit is contained in:
parent
f0a76fbec1
commit
6712c77140
@ -1,6 +1,6 @@
|
|||||||
%{?!packager: %define packager Brian Behlendorf <behlendorf1@llnl.gov>}
|
%{?!packager: %define packager Brian Behlendorf <behlendorf1@llnl.gov>}
|
||||||
|
|
||||||
%if ! 0%{?rhel}%{?fedora}%{?mageia}%{?suse_version}
|
%if ! 0%{?rhel}%{?fedora}%{?mageia}%{?suse_version}%{?openEuler}
|
||||||
%define not_rpm 1
|
%define not_rpm 1
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
@ -28,7 +28,7 @@ Requires(post): dkms >= 2.2.0.3
|
|||||||
Requires(preun): dkms >= 2.2.0.3
|
Requires(preun): dkms >= 2.2.0.3
|
||||||
Requires: gcc, make, perl, diffutils
|
Requires: gcc, make, perl, diffutils
|
||||||
Requires(post): gcc, make, perl, diffutils
|
Requires(post): gcc, make, perl, diffutils
|
||||||
%if 0%{?rhel}%{?fedora}%{?mageia}%{?suse_version}
|
%if 0%{?rhel}%{?fedora}%{?mageia}%{?suse_version}%{?openEuler}
|
||||||
Requires: kernel-devel >= @ZFS_META_KVER_MIN@, kernel-devel <= @ZFS_META_KVER_MAX@.999
|
Requires: kernel-devel >= @ZFS_META_KVER_MIN@, kernel-devel <= @ZFS_META_KVER_MAX@.999
|
||||||
Requires(post): kernel-devel >= @ZFS_META_KVER_MIN@, kernel-devel <= @ZFS_META_KVER_MAX@.999
|
Requires(post): kernel-devel >= @ZFS_META_KVER_MIN@, kernel-devel <= @ZFS_META_KVER_MAX@.999
|
||||||
Obsoletes: spl-dkms <= %{version}
|
Obsoletes: spl-dkms <= %{version}
|
||||||
@ -36,7 +36,7 @@ Obsoletes: spl-dkms <= %{version}
|
|||||||
Provides: %{module}-kmod = %{version}
|
Provides: %{module}-kmod = %{version}
|
||||||
AutoReqProv: no
|
AutoReqProv: no
|
||||||
|
|
||||||
%if (0%{?fedora}%{?suse_version}) || (0%{?rhel} && 0%{?rhel} < 9)
|
%if (0%{?fedora}%{?suse_version}%{?openEuler}) || (0%{?rhel} && 0%{?rhel} < 9)
|
||||||
# We don't directly use it, but if this isn't installed, rpmbuild as root can
|
# We don't directly use it, but if this isn't installed, rpmbuild as root can
|
||||||
# crash+corrupt rpmdb
|
# crash+corrupt rpmdb
|
||||||
# See issue #12071
|
# See issue #12071
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
%define module @PACKAGE@
|
%define module @PACKAGE@
|
||||||
|
|
||||||
%if !%{defined ksrc}
|
%if !%{defined ksrc}
|
||||||
%if 0%{?rhel}%{?fedora}
|
%if 0%{?rhel}%{?fedora}%{?openEuler}
|
||||||
%define ksrc ${kernel_version##*___}
|
%define ksrc ${kernel_version##*___}
|
||||||
%else
|
%else
|
||||||
%define ksrc "$( \
|
%define ksrc "$( \
|
||||||
@ -16,7 +16,7 @@
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
%if !%{defined kobj}
|
%if !%{defined kobj}
|
||||||
%if 0%{?rhel}%{?fedora}
|
%if 0%{?rhel}%{?fedora}%{?openEuler}
|
||||||
%define kobj ${kernel_version##*___}
|
%define kobj ${kernel_version##*___}
|
||||||
%else
|
%else
|
||||||
%define kobj "$( \
|
%define kobj "$( \
|
||||||
@ -52,12 +52,12 @@ URL: https://github.com/openzfs/zfs
|
|||||||
Source0: %{module}-%{version}.tar.gz
|
Source0: %{module}-%{version}.tar.gz
|
||||||
Source10: kmodtool
|
Source10: kmodtool
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id} -u -n)
|
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id} -u -n)
|
||||||
%if 0%{?rhel}%{?fedora}
|
%if 0%{?rhel}%{?fedora}%{?openEuler}
|
||||||
BuildRequires: gcc, make
|
BuildRequires: gcc, make
|
||||||
BuildRequires: elfutils-libelf-devel
|
BuildRequires: elfutils-libelf-devel
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%if (0%{?fedora}%{?suse_version}) || (0%{?rhel} && 0%{?rhel} < 9)
|
%if (0%{?fedora}%{?suse_version}%{?openEuler}) || (0%{?rhel} && 0%{?rhel} < 9)
|
||||||
# We don't directly use it, but if this isn't installed, rpmbuild as root can
|
# We don't directly use it, but if this isn't installed, rpmbuild as root can
|
||||||
# crash+corrupt rpmdb
|
# crash+corrupt rpmdb
|
||||||
# See issue #12071
|
# See issue #12071
|
||||||
@ -79,10 +79,11 @@ BuildRequires: %{_bindir}/kmodtool
|
|||||||
# Building local packages attempt to to use the installed kernel.
|
# Building local packages attempt to to use the installed kernel.
|
||||||
%{?rhel:BuildRequires: kernel-devel}
|
%{?rhel:BuildRequires: kernel-devel}
|
||||||
%{?fedora:BuildRequires: kernel-devel}
|
%{?fedora:BuildRequires: kernel-devel}
|
||||||
|
%{?openEuler:BuildRequires: kernel-devel}
|
||||||
%{?suse_version:BuildRequires: kernel-source}
|
%{?suse_version:BuildRequires: kernel-source}
|
||||||
|
|
||||||
%if !%{defined kernels} && !%{defined build_src_rpm}
|
%if !%{defined kernels} && !%{defined build_src_rpm}
|
||||||
%if 0%{?rhel}%{?fedora}%{?suse_version}
|
%if 0%{?rhel}%{?fedora}%{?suse_version}%{?openEuler}
|
||||||
%define kernels %(ls -1 /usr/src/kernels)
|
%define kernels %(ls -1 /usr/src/kernels)
|
||||||
%else
|
%else
|
||||||
%define kernels %(ls -1 /lib/modules)
|
%define kernels %(ls -1 /lib/modules)
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
# Set the default udev directory based on distribution.
|
# Set the default udev directory based on distribution.
|
||||||
%if %{undefined _udevdir}
|
%if %{undefined _udevdir}
|
||||||
%if 0%{?fedora}%{?rhel}%{?centos}
|
%if 0%{?fedora}%{?rhel}%{?centos}%{?openEuler}
|
||||||
%global _udevdir %{_prefix}/lib/udev
|
%global _udevdir %{_prefix}/lib/udev
|
||||||
%else
|
%else
|
||||||
%global _udevdir /lib/udev
|
%global _udevdir /lib/udev
|
||||||
@ -12,7 +12,7 @@
|
|||||||
|
|
||||||
# Set the default udevrule directory based on distribution.
|
# Set the default udevrule directory based on distribution.
|
||||||
%if %{undefined _udevruledir}
|
%if %{undefined _udevruledir}
|
||||||
%if 0%{?fedora}%{?rhel}%{?centos}
|
%if 0%{?fedora}%{?rhel}%{?centos}%{?openEuler}
|
||||||
%global _udevruledir %{_prefix}/lib/udev/rules.d
|
%global _udevruledir %{_prefix}/lib/udev/rules.d
|
||||||
%else
|
%else
|
||||||
%global _udevruledir /lib/udev/rules.d
|
%global _udevruledir /lib/udev/rules.d
|
||||||
@ -21,7 +21,7 @@
|
|||||||
|
|
||||||
# Set the default dracut directory based on distribution.
|
# Set the default dracut directory based on distribution.
|
||||||
%if %{undefined _dracutdir}
|
%if %{undefined _dracutdir}
|
||||||
%if 0%{?fedora}%{?rhel}%{?centos}
|
%if 0%{?fedora}%{?rhel}%{?centos}%{?openEuler}
|
||||||
%global _dracutdir %{_prefix}/lib/dracut
|
%global _dracutdir %{_prefix}/lib/dracut
|
||||||
%else
|
%else
|
||||||
%global _dracutdir %{_prefix}/share/dracut
|
%global _dracutdir %{_prefix}/share/dracut
|
||||||
@ -66,7 +66,7 @@
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
# Distros below support systemd
|
# Distros below support systemd
|
||||||
%if 0%{?rhel}%{?fedora}%{?centos}%{?suse_version}
|
%if 0%{?rhel}%{?fedora}%{?centos}%{?suse_version}%{?openEuler}
|
||||||
%define _systemd 1
|
%define _systemd 1
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
@ -102,7 +102,7 @@ Obsoletes: spl <= %{version}
|
|||||||
# Renaming those on either side would conflict with all available documentation.
|
# Renaming those on either side would conflict with all available documentation.
|
||||||
Conflicts: zfs-fuse
|
Conflicts: zfs-fuse
|
||||||
|
|
||||||
%if 0%{?rhel}%{?centos}%{?fedora}%{?suse_version}
|
%if 0%{?rhel}%{?centos}%{?fedora}%{?suse_version}%{?openEuler}
|
||||||
BuildRequires: gcc, make
|
BuildRequires: gcc, make
|
||||||
BuildRequires: zlib-devel
|
BuildRequires: zlib-devel
|
||||||
BuildRequires: libuuid-devel
|
BuildRequires: libuuid-devel
|
||||||
@ -110,11 +110,11 @@ BuildRequires: libblkid-devel
|
|||||||
BuildRequires: libudev-devel
|
BuildRequires: libudev-devel
|
||||||
BuildRequires: libattr-devel
|
BuildRequires: libattr-devel
|
||||||
BuildRequires: openssl-devel
|
BuildRequires: openssl-devel
|
||||||
%if 0%{?fedora} || 0%{?rhel} >= 8 || 0%{?centos} >= 8
|
%if 0%{?fedora}%{?openEuler} || 0%{?rhel} >= 8 || 0%{?centos} >= 8
|
||||||
BuildRequires: libtirpc-devel
|
BuildRequires: libtirpc-devel
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%if (0%{?fedora}%{?suse_version}) || (0%{?rhel} && 0%{?rhel} < 9)
|
%if (0%{?fedora}%{?suse_version}%{?openEuler}) || (0%{?rhel} && 0%{?rhel} < 9)
|
||||||
# We don't directly use it, but if this isn't installed, rpmbuild as root can
|
# We don't directly use it, but if this isn't installed, rpmbuild as root can
|
||||||
# crash+corrupt rpmdb
|
# crash+corrupt rpmdb
|
||||||
# See issue #12071
|
# See issue #12071
|
||||||
@ -251,7 +251,7 @@ Requires: sudo
|
|||||||
Requires: sysstat
|
Requires: sysstat
|
||||||
Requires: libaio
|
Requires: libaio
|
||||||
Requires: python%{__python_pkg_version}
|
Requires: python%{__python_pkg_version}
|
||||||
%if 0%{?rhel}%{?centos}%{?fedora}%{?suse_version}
|
%if 0%{?rhel}%{?centos}%{?fedora}%{?suse_version}%{?openEuler}
|
||||||
BuildRequires: libaio-devel
|
BuildRequires: libaio-devel
|
||||||
%endif
|
%endif
|
||||||
AutoReqProv: no
|
AutoReqProv: no
|
||||||
@ -292,7 +292,7 @@ Requires: python36-cffi
|
|||||||
Requires: python%{__python_pkg_version}-cffi
|
Requires: python%{__python_pkg_version}-cffi
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%if 0%{?rhel}%{?centos}%{?fedora}%{?suse_version}
|
%if 0%{?rhel}%{?centos}%{?fedora}%{?suse_version}%{?openEuler}
|
||||||
%if 0%{?centos} == 7
|
%if 0%{?centos} == 7
|
||||||
BuildRequires: python36-packaging
|
BuildRequires: python36-packaging
|
||||||
BuildRequires: python36-devel
|
BuildRequires: python36-devel
|
||||||
@ -328,7 +328,7 @@ image which is ZFS aware.
|
|||||||
%package -n pam_zfs_key
|
%package -n pam_zfs_key
|
||||||
Summary: PAM module for encrypted ZFS datasets
|
Summary: PAM module for encrypted ZFS datasets
|
||||||
|
|
||||||
%if 0%{?rhel}%{?centos}%{?fedora}%{?suse_version}
|
%if 0%{?rhel}%{?centos}%{?fedora}%{?suse_version}%{?openEuler}
|
||||||
BuildRequires: pam-devel
|
BuildRequires: pam-devel
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user