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