X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=contrib%2Flbuild%2Flbuild;h=575bd37c2272493a00f7d83e7828d8a8afd20b41;hb=813a6595c97813a33408d2e11656249d3c02cb49;hp=8af01e0f52049cc1c9dc1f659fd34d959e268cba;hpb=5a0c4438e5baadb5308648f8d4d1c9890399a991;p=fs%2Flustre-release.git diff --git a/contrib/lbuild/lbuild b/contrib/lbuild/lbuild index 8af01e0..575bd37 100755 --- a/contrib/lbuild/lbuild +++ b/contrib/lbuild/lbuild @@ -70,7 +70,6 @@ USE_BUILD_CACHE=true # what does this do exactly? does it imply no kernel build? NORPM=false IOKITRPM=true -LDISKFSRPM=true OSDLDISKFSRPM=true OSDZFSRPM=false SMPTYPES="smp bigsmp default ''" @@ -182,7 +181,7 @@ Usage: ${0##*/} [OPTION]... [-- ] tarball. --ldiskfs - Do ldiskfs RPM. Now true by default + Build with ldiskfs support. (Deprecated, always true) --noiokit Do not build lustre-iokit RPM. Now true by default @@ -262,7 +261,7 @@ canon_path() { check_options() { - if [ -z "$LUSTRE" -o ! -r "$LUSTRE"]; then + if [ -z "$LUSTRE" -o ! -r "$LUSTRE" ]; then usage 1 "Could not find Lustre source tarball '$LUSTRE'." fi @@ -539,9 +538,9 @@ download_ofed() { local location="http://www.openfabrics.org/downloads/OFED/ofed-${OFED_BASE_VERSION}/" - if [[ $OFED_VERSION = *-rc[0-9] ]]; then + if [[ $OFED_VERSION = *-[rR][cC][0-9] ]]; then local Mmv - Mmv=${OFED_VERSION%%-*} + Mmv=${OFED_VERSION%%-[rR][cC][0-9]} location="http://www.openfabrics.org/downloads/OFED/ofed-${Mmv}/" fi @@ -621,7 +620,7 @@ load_target() { fi if [ -f $TOPDIR/lustre/lustre/kernel_patches/kernel_configs/kernel-$lnxmaj-$TARGET-$TARGET_ARCH.config ]; then - CONFIG_FILE="$TOPDIR/lustre/lustre/kernel_patches/kernel_configs/kernel-$lnxmaj-$TARGET$XENPOSTFIX-$TARGET_ARCH${RPMSMPTYPE:+-}${RPMSMPTYPE}.config" + CONFIG_FILE="$TOPDIR/lustre/lustre/kernel_patches/kernel_configs/kernel-$lnxmaj-$TARGET$XENPOSTFIX-$TARGET_ARCH.config" fi local lnxrelnew=${lnxrel//-/_} @@ -749,39 +748,6 @@ do_patch_linux() { } -build_iokit() { - local rpmbuildopt="$1" - - pushd lustre-iokit > /dev/null || return 255 - - if ! ./configure; then - echo "failed to configure in lustre-iokit" - popd >/dev/null # pushd lustre-iokit - return 255 - fi - - if ! make dist; then - echo "failed to make dist in lustre-iokit" - popd >/dev/null # pushd lustre-iokit - return 255 - fi - - if ! $RPMBUILD $rpmbuildopt lustre-iokit*.tar.gz \ - --define "_tmppath /var/tmp" \ - --define "_topdir $TOPDIR" 2>&1; then - popd >/dev/null # pushd lustre-iokit - return 255 - fi - - if $DO_SRC && ! $RPMBUILD -ts lustre-iokit*.tar.gz \ - --define "_tmppath /var/tmp" \ - --define "_topdir $TOPDIR" 2>&1; then - popd >/dev/null # pushd lustre-iokit - return 255 - fi - popd >/dev/null # pushd lustre-iokit -} - build_lustre() { local linux="$1" local linuxobj="$2" @@ -819,67 +785,6 @@ build_lustre() { fi fi - ( $(skeep_ldiskfs_rpm) ) || { - - pushd ldiskfs > /dev/null || return 255 - - if ! ./configure --enable-dist; then - echo "failed to configure in ldiskfs" - popd >/dev/null # pushd ldiskfs - popd >/dev/null # pushd lustre - return 255 - fi - - if ! make dist 2>&1; then - popd >/dev/null # pushd ldiskfs - popd >/dev/null # pushd lustre - return 255 - fi - - #cp lustre-ldiskfs*.tar.gz $TOPDIR/SOURCES || \ - # fatal 1 "Could not copy lustre-ldiskfs*.tar.gz to $TOPDIR/SOURCES" - - if ! $RPMBUILD $targets $rpmbuildopt lustre-ldiskfs*.tar.gz \ - --define "configure_args $confoptions ${CONFIGURE_FLAGS}" \ - --define "kdir $linux" \ - ${linuxobj:+--define "kobjdir $linuxobj"} \ - --define "_tmppath /var/tmp" \ - --define "_topdir $TOPDIR" 2>&1; then - popd >/dev/null # pushd ldiskfs - popd >/dev/null # pushd lustre - return 255 - fi - - if $DO_SRC; then - if ! $RPMBUILD -ts lustre-ldiskfs*.tar.gz \ - --define "configure_args $confoptions ${CONFIGURE_FLAGS}" \ - --define "kdir $linux" \ - ${linuxobj:+--define "kobjdir $linuxobj"} \ - --define "_tmppath /var/tmp" \ - --define "_topdir $TOPDIR" 2>&1; then - popd >/dev/null # pushd ldiskfs - popd >/dev/null # pushd lustre - return 255 - fi - fi - popd >/dev/null # pushd ldiskfs - - # tell lustre where ldiskfs is - # XXX - pointing to the RPM BUILD dir is a hack. we need to flesh - # out the ldiskfs RPM build so that it builds a - # lustre-ldiskfs-devel RPM and install that and point lustre - # to that instead - confoptions="$confoptions --with-ldiskfs=$(ls -d $TOPDIR/BUILD/lustre-ldiskfs-*)" - } - - if $IOKITRPM; then - if ! build_iokit $rpmbuildopt; then - echo "failed to build lustre-iokit" - popd >/dev/null # pushd lustre - return 255 - fi - fi - # convert the $PATCHLESS boolean to an empty/not-empty boolean # as silly as this seems, it makes the syntax of the rpmbuild command # simpler and not need an eval to deal with the quotes in the quotes @@ -894,6 +799,11 @@ build_lustre() { lustre_tests="no" fi + local lustre_iokit="" + if ! $IOKITRPM; then + lustre_iokit="no" + fi + local osd_zfs="" if $OSDZFSRPM; then osd_zfs="yes" @@ -905,10 +815,11 @@ build_lustre() { fi $RPMBUILD $targets $rpmbuildopt "$LUSTRE" \ - ${is_patchless:+--define "lustre_name lustre-client"} \ - ${lustre_tests:+--define "build_lustre_tests 0"} \ - ${osd_zfs:+--define "build_lustre_osd_zfs 1"} \ - ${osd_ldiskfs:+--define "build_lustre_osd_ldiskfs 1"} \ + ${is_patchless:+--without servers} \ + ${lustre_tests:+--without lustre_tests} \ + ${lustre_iokit:+--without lustre_iokit} \ + ${osd_zfs:+--with zfs} \ + ${osd_ldiskfs:+--with ldiskfs} \ ${FIND_REQUIRES:+--define "__find_requires $FIND_REQUIRES"} \ --define "configure_args $confoptions ${CONFIGURE_FLAGS}" \ --define "kdir $linux" \ @@ -919,8 +830,9 @@ build_lustre() { if $DO_SRC; then if ! $RPMBUILD -ts "$LUSTRE" \ - ${is_patchless:+--define "lustre_name lustre-client"} \ - ${lustre_tests:+--define "build_lustre_tests 0"} \ + ${is_patchless:+--without servers} \ + ${lustre_tests:+--without lustre_tests} \ + ${lustre_iokit:+--without lustre_iokit} \ ${FIND_REQUIRES:+--define "__find_requires $FIND_REQUIRES"} \ --define "configure_args $confoptions ${CONFIGURE_FLAGS}" \ --define "kdir $linux" \ @@ -955,8 +867,8 @@ build_spl_zfs() { # The spl/zfs spec files expect RPM_BUILD_ROOT to point to the root of the # destination for the rpms export RPM_BUILD_ROOT=$TOPDIR - SPLZFSVER=${SPLZFSVER:-0.6.1} - SPLZFSTAG=${SPLZFSTAG:-lustre-zfs} + SPLZFSVER=${SPLZFSVER:-0.6.2} + SPLZFSTAG=${SPLZFSTAG:-upstream-master} # The files expect a kver to be set to the kernel version . local kver=$(find_linux_release) @@ -1048,6 +960,16 @@ build_spl_zfs() { for rpm in $rpms; do rpm2cpio $rpm | cpio -id done + + if [ "$pkg" == "zfs" ]; then + mkdir -p $TOPDIR/zfsdevel + pushd $TOPDIR/zfsdevel + # We also need to extract zfs-devel rpm + local devel_rpm=$(ls -1 $TOPDIR/RPMS/*/$pkg-devel-*.rpm) + rpm2cpio $devel_rpm | cpio -id + popd + CONFIGURE_FLAGS="--with-$pkg-devel=$TOPDIR/zfsdevel ${CONFIGURE_FLAGS}" + fi popd CONFIGURE_FLAGS="--with-$pkg=$(ls -d $TOPDIR/usr/src/$pkg-*/|tail -1) ${CONFIGURE_FLAGS}" @@ -1077,20 +999,6 @@ stage() { } -#check if we need to build separate ldiskfs RPM -skeep_ldiskfs_rpm() { - local skip=false - - if ! $LDISKFSRPM; then - skip=true - elif $PATCHLESS; then - skip=true - fi - - echo $skip - -} - set_rpm_smp_type() { local infact_arch="${TARGET_ARCH}" @@ -1595,6 +1503,13 @@ build_ofed() { local linuxrelease=$(find_linux_release) ofed_version=$(echo $ofed_version | sed -re 's/-(20[0-9]{6,6}-[0-9]{4,4}|rc[0-9]*)$//') + # FIXME + # OFED version will have 'hyphen' for minor release. (e.g. 3.5-1, instead + # of 3.5.1) compat-rdma and compat-rdma-devel could have same version + # number, but currectly not. Once OFED fix this in the future release, we + # can remove following filter. + ofed_version=$(echo $ofed_version | + sed -re 's/-([0-9]*-[rR][cC][0-9]*)$//') local rpm=$(ls $TOPDIR/RPMS/*/${kib_rpm}-devel-${ofed_version}-${linuxrelease//-/_}.*.rpm) if ! rpm2cpio < $rpm | cpio -id; then fatal 1 "could not unpack the ${kib_rpm}-devel rpm." @@ -1896,7 +1811,7 @@ while [ "$1" ]; do shift ;; --ldiskfs) - LDISKFSRPM=true + echo "WARNING: \"--ldiskfs\" is deprecated" > 2 shift ;; --noiokit)