RHEL_KERNEL="no"
SUSE_KERNEL="no"
UBUNTU_KERNEL="no"
+ OPENEULER_KERNEL="no"
# And if any of the above kernels has been detected yet
KERNEL_FOUND="no"
])
])
+ # Check for openEuler
+ AS_IF([test "x$KERNEL_FOUND" = "xno"], [
+ AC_CACHE_CHECK([for openEuler kernel signature], lb_cv_openeuler_kernel_sig, [
+ lb_cv_openeuler_kernel_sig="no"
+ AS_IF([fgrep -q 'openEuler' $LINUX_OBJ/include/linux/kabi.h], [
+ lb_cv_openeuler_kernel_sig="yes"
+ ])
+ ])
+ AS_IF([test "x$lb_cv_openeuler_kernel_sig" = "xyes"], [
+ OPENEULER_KERNEL="yes"
+ KERNEL_FOUND="yes"
+ ])
+ ])
+
# If still no kernel was found, a warning is issued
AS_IF([test "x$KERNEL_FOUND" = "xno"], [
- AC_MSG_WARN([Kernel Distro seems to be neither RedHat, SuSE nor Ubuntu])
+ AC_MSG_WARN([Kernel Distro seems to be neither RedHat, SuSE, openEuler nor Ubuntu])
])
AC_MSG_CHECKING([for Linux kernel module package directory])
[KMP_MODDIR=$withval
IN_KERNEL=''],[
AS_IF([test x$RHEL_KERNEL = xyes], [KMP_MODDIR="extra/kernel"],
+ [test x$OPENEULER_KERNEL = xyes], [KMP_MODDIR="extra/kernel"],
[test x$SUSE_KERNEL = xyes], [KMP_MODDIR="updates/kernel"],
[test x$UBUNTU_KERNEL = xyes], [KMP_MODDIR="updates/kernel"],
- [AC_MSG_WARN([Kernel Distro seems to be neither RedHat, SuSE nor Ubuntu])]
+ [AC_MSG_WARN([Kernel Distro seems to be neither RedHat, SuSE, openEuler nor Ubuntu])]
)
IN_KERNEL="${PACKAGE}"])
AC_MSG_RESULT($KMP_MODDIR)
"Fedora")
name="fc"
;;
+ "openEuler")
+ name="oe"
+ # Change from YY.MM to YYMM, let DISTROMAJ contain MM part
+ version=${version/./}
+ ;;
*)
fatal 1 "I don't know what distro name $name and version $version is.\nEither update autodetect_distro() or use the --distro argument."
;;
sles15.3) target="$(uname -r | cut -d . -f 1,2)-sles15sp3";;
sles15.4) target="$(uname -r | cut -d . -f 1,2)-sles15sp4";;
fc18) target="3.x-fc18";;
+ oe2203) target="5.10-oe2203";;
*) fatal 1 "I don't know what distro $distro is.\nEither update autodetect_target() or use the --target argument.";;
esac
3.0-sles11)
CANONICAL_TARGET="sles11"
;;
+ 5.10-oe2203)
+ CANONICAL_TARGET="oe2203"
+ ;;
esac
local timestampnodig=$(echo $TIMESTAMP | sed -e s/[0-9]*//g)
--- /dev/null
+source ${LBUILD_DIR}/lbuild-rhel
+
+# increment this if you have made a change that should force a new kernel
+# to build built
+BUILD_GEN+=".0"
+
+SPEC_NAME="kernel.spec"
+DEVEL_PATH_ARCH_DELIMETER="."
+USE_KABI=false
+RPM_HELPERS_DIR="/usr/lib/rpm/openEuler"
+
+# force local definition of %dist into ~/.rpmmacros
+# to avoid verbose extended strings like ".el9.centos"
+# in kernel version and rpm names
+#
+RMAC=$HOME/.rpmmacros
+grep '^%dist' $RMAC &> /dev/null || echo '%dist .oe2203' >> $RMAC
+
+unpack_linux_devel_rpm-oe2203() {
+ local callers_rpm="$1"
+
+ unpack_linux_devel_rpm-rhel "$callers_rpm"
+}
+
+find_linux_rpm-oe2203() {
+ local prefix="$1"
+ local wanted_kernel="$2"
+ local pathtorpms=${3:-"$KERNELRPMSBASE/$lnxmaj/$DISTROMAJ/$TARGET_ARCH"}
+
+ find_linux_rpm-rhel "$prefix" "$wanted_kernel" "$pathtorpms"
+}
+
+apply_kmod_requires_conflicts() {
+ if $PATCHLESS; then
+ # don't allow the patched kernel to be considered as
+ # a valid kernel for the patchless client
+ echo "Conflicts: kernel-lustre" >> rpm/kmp-lustre.preamble
+ fi
+}
# requires want to set a version including epoch
%global krequires %(echo %{kver} | sed -e 's/\.x86_64$//' -e 's/\.i[3456]86$//' -e 's/-smp$//' -e 's/-bigsmp$//' -e 's/[-.]ppc64$//' -e 's/\.aarch64$//' -e 's/-default$//' -e 's/-%{_flavor}//')
-%if "%{_vendor}" == "redhat" || "%{_vendor}" == "fedora"
+%if "%{_vendor}" == "redhat" || "%{_vendor}" == "fedora" || "%{_vendor}" == "openEuler"
%global requires_kmod_name kmod-%{lustre_name}
%global requires_kmod_osd_zfs_name kmod-%{lustre_name}-osd-zfs
%if %{with lustre_tests}
%define with_systemd 1
%endif
+# openEuler comes with systemd
+%if "%{_vendor}" == "openEuler"
+%define with_systemd 1
+%endif
+
%{!?mpi_name: %global mpi_name openmpi}
Summary: Lustre File System
BuildRequires: redhat-rpm-config
BuildRequires: pkgconfig
%else
+%if "%{_vendor}" == "openEuler"
+BuildRequires: openEuler-rpm-config
+%endif
BuildRequires: pkg-config
%endif
%if %{with gss}
%endif
Obsoletes: lustre-client < %{version}
Provides: lustre-client = %{version}-%{release}
-%if "%{_vendor}" == "redhat" || "%{_vendor}" == "fedora"
+%if "%{_vendor}" == "redhat" || "%{_vendor}" == "fedora" || "%{_vendor}" == "openEuler"
#suse don't support selinux
BuildRequires: libselinux-devel
%endif
%if %{with lustre_modules}
%if %{with mofed}
BuildRequires: mlnx-ofa_kernel-devel
-%if "%{_vendor}" == "redhat"
+%if "%{_vendor}" == "redhat" || "%{_vendor}" == "openEuler"
Requires: kmod-mlnx-ofa_kernel
%else
Requires: mlnx-ofa_kernel-kmp
%endif
%endif
-%if 0%{?rhel} >= 8
+%if 0%{?rhel} >= 8 || "%{_vendor}" == "openEuler"
BuildRequires: kernel-rpm-macros
%endif
%if 0%{?suse_version} >= 1530
BuildRequires: mpich-devel
%endif
%if "%{mpi_name}" == "openmpi"
-%if "%{_vendor}" == "redhat" || 0%{?suse_version} < 1500
+%if "%{_vendor}" == "redhat" || "%{_vendor}" == "openEuler" || 0%{?suse_version} < 1500
BuildRequires: openmpi-devel
%else
BuildRequires: openmpi2-devel
echo '%{_unitdir}/lnet.service' >>lustre.files
%endif
-%if "%{_vendor}" == "redhat"
+%if "%{_vendor}" == "redhat" || "%{_vendor}" == "openEuler"
# The following scripts are Red Hat specific
%if %{with servers}
echo '%{_sysconfdir}/init.d/lustre' >>lustre.files
5.8.0-53 (Ubuntu 20.04.2 HWE)
5.11.0-31 (Ubuntu 20.04.3 HWE)
5.11.0 (vanilla kernel.org)
+ 5.10.0-60.56.0.84.oe2203 (openEuler 22.03 LTS)
* Recommended e2fsprogs version: 1.46.5.wc1 or newer
* Recommended ZFS version: 2.1.5
* NFS export disabled when stack size < 8192 (32-bit Lustre clients),
lustre/kernel_patches/targets/5.3-sles15sp3.target
lustre/kernel_patches/targets/5.14-sles15sp4.target
lustre/kernel_patches/targets/3.x-fc18.target
+lustre/kernel_patches/targets/5.10-oe2203.target
lustre/ldlm/Makefile
lustre/ldlm/autoMakefile
lustre/ec/autoMakefile
--- /dev/null
+lnxmaj="5.10.0"
+lnxrel="60.56.0.84.oe2203"
+
+KERNEL_SRPM=kernel-${lnxmaj}-${lnxrel}.src.rpm
+SERIES=""
+EXTRA_VERSION=${lnxrel}_lustre.@VERSION@
+LUSTRE_VERSION=@VERSION@
+
+DEVEL_PATH_ARCH_DELIMETER="."
+OFED_VERSION=inkernel
+
+#SMP_ARCHS="i686 x86_64 ia64 ppc64"
+# openEuler doesn't use smp specific kernels
+SMP_ARCHS=""
+
+for cc in gcc ; do
+ if which $cc >/dev/null 2>/dev/null ; then
+ export CC=$cc
+ break
+ fi
+done