Whamcloud - gitweb
LU-16481 build: add server support for openEuler
[fs/lustre-release.git] / contrib / lbuild / lbuild-oe2203
1 source ${LBUILD_DIR}/lbuild-rhel
2
3 # increment this if you have made a change that should force a new kernel
4 # to build built
5 BUILD_GEN+=".0"
6
7 SPEC_NAME="kernel.spec"
8 DEVEL_PATH_ARCH_DELIMETER="."
9 USE_KABI=false
10 RPM_HELPERS_DIR="/usr/lib/rpm/openEuler"
11 # Pkg which contains ext4 source code
12 KERNEL_DEBUGINFO="kernel-debugsource-${lnxmaj}-${lnxrel}.${TARGET_ARCH}.rpm"
13
14 # force local definition of %dist into ~/.rpmmacros
15 # to avoid verbose extended strings like ".el9.centos"
16 # in kernel version and rpm names
17 #
18 RMAC=$HOME/.rpmmacros
19 grep '^%dist' $RMAC &> /dev/null || echo '%dist .oe2203' >> $RMAC
20
21 unpack_linux_devel_rpm-oe2203() {
22         local callers_rpm="$1"
23
24         unpack_linux_devel_rpm-rhel "$callers_rpm"
25 }
26
27 find_linux_rpm-oe2203() {
28         local prefix="$1"
29         local wanted_kernel="$2"
30         local pathtorpms=${3:-"$KERNELRPMSBASE/$lnxmaj/$DISTROMAJ/$TARGET_ARCH"}
31
32         find_linux_rpm-rhel "$prefix" "$wanted_kernel" "$pathtorpms"
33 }
34
35 kernel_debuginfo_location() {
36         local base_os="https://repo.openeuler.org/openEuler-22.03-LTS"
37
38         echo "$base_os/update/$TARGET_ARCH/Packages/"
39 }
40
41 cleanup_rpmmacros() {
42         sed -i "/^%kernel_module_package/,/^)}$/d" $RMAC
43 }
44
45 apply_kmod_requires_conflicts() {
46         if $PATCHLESS; then
47                 # don't allow the patched kernel to be considered as
48                 # a valid kernel for the patchless client
49                 echo "Conflicts:      kernel-lustre" >> rpm/kmp-lustre.preamble
50         fi
51 }