Whamcloud - gitweb
LU-864 test: Hostname name doesn't equal NID and use facet_mntpt
[fs/lustre-release.git] / build / lbuild-rhel6
1 # vim:expandtab:shiftwidth=4:softtabstop=4:tabstop=4:
2
3 # increment this if you have made a change that should force a new kernel
4 # to be built for this release of this distribution (only -- if you want to
5 # force a kernel build on all releases of this distribution, update the BUILD_GEN
6 # variable in build/lbuild-rhel and if you want to force kernel bulid for all
7 # distributions, update the BUILD_GEN variable in build/lbuild)
8 #BUILD_GEN+=".0"
9 #BUILD_GEN+=".1"                # added --with firmware to rpmbuild for rhel6
10 #BUILD_GEN+=".0"        # TT-107: don't cache the BUILD dir (reset major to 5)
11 BUILD_GEN+=".1" # LU-50: kernel: configurable BH LRU size
12
13 source ${0%/*}/lbuild-rhel
14
15 SPEC_NAME="kernel.spec"
16 DEVEL_PATH_ARCH_DELIMETER="."
17
18 patch_spec() {
19     local buildid="$1"
20
21     # edit the SPEC with our changes
22     patch_spec_common "$buildid"
23     sed -i -e '/^# empty final patch file to facilitate testing of kernel patches/i\
24 # adds Lustre patches\
25 Patch99995: linux-%{version}-lustre.patch' \
26            -e '/^ApplyOptionalPatch linux-kernel-test.patch/i\
27 \
28 # lustre patch\
29 ApplyOptionalPatch linux-%{version}-lustre.patch\
30 ' \
31            -e '/rm -f include\/generated\/kernel.cross/i\
32   # lustre kernel config.\
33   if [ -f %{_topdir}/lustre/lustre/kernel_patches/kernel_configs/kernel-%{version}-2.6-rhel6-$Arch.config ]; then\
34     echo "# $Arch" > configs/kernel-%{version}-$Arch.config\
35     cat %{_topdir}/lustre/lustre/kernel_patches/kernel_configs/kernel-%{version}-2.6-rhel6-$Arch.config >> configs/kernel-%{version}-$Arch.config\
36   fi'\
37            -e '/^# Dynamically generate kernel/a echo "CONFIG_BH_LRU_SIZE=16" >> config-generic'\
38           SPECS/$SPEC_NAME 2>&1 || \
39         fatal 1 "Error while editing SPECS/$SPEC_NAME"
40
41
42     return 0
43
44 }
45
46 unpack_linux_devel_rpm-rhel6() {
47     local callers_rpm="$1"
48
49     unpack_linux_devel_rpm-rhel "$callers_rpm"
50
51
52     return 0
53
54 }
55
56 get_rpmbuildopts() {
57
58     if $KERNEL_LUSTRE_NAMING; then
59         echo -e "--define \"variant -lustre\" \c"
60     fi
61     echo "--with firmware"
62
63     return 0
64
65 }
66
67 find_linux_rpm-rhel6() {
68     local prefix="$1"
69     local wanted_kernel="$2"
70     local pathtorpms=${3:-"${KERNELRPMSBASE}/${lnxmaj}/${DISTRO}/${TARGET_ARCH}"}
71
72     find_linux_rpm-rhel "$prefix" "$wanted_kernel" "$pathtorpms"
73
74 }
75
76 kernel_srpm_location() {
77
78     echo "ftp://ftp.redhat.com/pub/redhat/linux/enterprise/6Server/en/os/SRPMS/"
79
80 }