Whamcloud - gitweb
LU-235 fix sanity test 36g to work with remote OSS
[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
11 source ${0%/*}/lbuild-rhel
12
13 SPEC_NAME="kernel.spec"
14 DEVEL_PATH_ARCH_DELIMETER="."
15
16 patch_spec() {
17     local buildid="$1"
18
19     # edit the SPEC with our changes
20     patch_spec_common "$buildid"
21     sed -i -e '/^# empty final patch file to facilitate testing of kernel patches/i\
22 # adds Lustre patches\
23 Patch99995: linux-%{version}-lustre.patch' \
24            -e '/^ApplyOptionalPatch linux-kernel-test.patch/i\
25 \
26 # lustre patch\
27 ApplyOptionalPatch linux-%{version}-lustre.patch\
28 ' \
29           SPECS/$SPEC_NAME 2>&1 || \
30         fatal 1 "Error while editing SPECS/$SPEC_NAME"
31
32
33     return 0
34
35 }
36
37 unpack_linux_devel_rpm-rhel6() {
38     local callers_rpm="$1"
39
40     unpack_linux_devel_rpm-rhel "$callers_rpm"
41
42
43     return 0
44
45 }
46
47 get_rpmbuildopts() {
48
49     if $KERNEL_LUSTRE_NAMING; then
50         echo -e "--define \"variant -lustre\" \c"
51     fi
52     echo "--with firmware"
53
54     return 0
55
56 }
57
58 find_linux_rpm-rhel6() {
59     local prefix="$1"
60     local wanted_kernel="$2"
61     local pathtorpms=${3:-"${KERNELRPMSBASE}/${lnxmaj}/${DISTRO}/${TARGET_ARCH}"}
62
63     find_linux_rpm-rhel "$prefix" "$wanted_kernel" "$pathtorpms"
64
65 }
66
67 kernel_srpm_location() {
68
69     echo "ftp://ftp.redhat.com/pub/redhat/linux/enterprise/6Server/en/os/SRPMS/"
70
71 }