From: Bruno Faccini Date: Sat, 9 Mar 2013 16:39:01 +0000 (+0100) Subject: LU-2882 build: build broken with no zfs libraries installed X-Git-Tag: 2.3.63~45 X-Git-Url: https://git.whamcloud.com/gitweb?a=commitdiff_plain;h=517ead56f1b99e986627bfa03a282047ee6bd395;p=fs%2Flustre-release.git LU-2882 build: build broken with no zfs libraries installed Reverting default values (originaly set in LU-2391 patch) for ldiskfs/zfs OSD RPMs builds, to comply for more ways ("rpmbuild -tb ") used to build Lustre. Signed-off-by: Bruno Faccini Change-Id: I07eca22d03f597942284bbbc0bfd1b680ecb199b Reviewed-on: http://review.whamcloud.com/5661 Tested-by: Hudson Reviewed-by: Nathaniel Clark Reviewed-by: Alexey Lyashkov Tested-by: Maloo Reviewed-by: Oleg Drokin --- diff --git a/autoMakefile.am b/autoMakefile.am index 883d13c..8a259bc 100644 --- a/autoMakefile.am +++ b/autoMakefile.am @@ -136,11 +136,11 @@ rpms-real: @PACKAGE_TARNAME@.spec dist Makefile if [[ "X$(BUILD_SERVER)" = Xfalse ]]; then \ RPMARGS="$$RPMARGS --define \"lustre_name lustre-client\""; \ fi; \ - if [[ "X$(BUILD_OSD_LDISKFS)" = Xfalse ]]; then \ - RPMARGS="$$RPMARGS --define \"build_lustre_osd_ldiskfs 0\""; \ + if [[ "X$(BUILD_OSD_LDISKFS)" = Xtrue ]]; then \ + RPMARGS="$$RPMARGS --define \"build_lustre_osd_ldiskfs 1\""; \ fi; \ - if [[ "X$(BUILD_OSD_ZFS)" = Xfalse ]]; then \ - RPMARGS="$$RPMARGS --define \"build_lustre_osd_zfs 0\""; \ + if [[ "X$(BUILD_OSD_ZFS)" = Xtrue ]]; then \ + RPMARGS="$$RPMARGS --define \"build_lustre_osd_zfs 1\""; \ fi; \ echo "Building Lustre RPM with $$RPMARGS"; \ eval rpmbuild $$RPMARGS -ta $(distdir).tar.gz diff --git a/build/lbuild b/build/lbuild index bd5182e..faf56bc 100755 --- a/build/lbuild +++ b/build/lbuild @@ -68,6 +68,8 @@ USE_BUILD_CACHE=true NORPM=false IOKITRPM=true LDISKFSRPM=true +OSDLDISKFSRPM=true +OSDZFSRPM=false SKIPLDISKFSRPM="v1_4_* b1_4" SMPTYPES="smp bigsmp default ''" PATCHLESS=false @@ -942,9 +944,21 @@ build_lustre() { lustre_tests="no" fi + local osd_zfs="" + if $OSDZFSRPM; then + osd_zfs="yes" + fi + + local osd_ldiskfs="" + if $OSDLDISKFSRPM; then + osd_ldiskfs="yes" + 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"} \ ${FIND_REQUIRES:+--define "__find_requires $FIND_REQUIRES"} \ --define "configure_args $confoptions ${CONFIGURE_FLAGS}" \ --define "kdir $linux" \ @@ -1080,6 +1094,8 @@ build_spl_zfs() { CONFIGURE_FLAGS="--with-$pkg=$(ls -d $TOPDIR/usr/src/$pkg-*/*) ${CONFIGURE_FLAGS}" done + OSDZFSRPM=true + return 0 } diff --git a/lustre.spec.in b/lustre.spec.in index 5d02349..edd02f5 100644 --- a/lustre.spec.in +++ b/lustre.spec.in @@ -20,8 +20,8 @@ %{!?lustre_name: %global lustre_name lustre} %{!?build_lustre_tests: %global build_lustre_tests 1} -%{!?build_lustre_osd_ldiskfs: %global build_lustre_osd_ldiskfs 1} -%{!?build_lustre_osd_zfs: %global build_lustre_osd_zfs 1} +%{!?build_lustre_osd_ldiskfs: %global build_lustre_osd_ldiskfs 0} +%{!?build_lustre_osd_zfs: %global build_lustre_osd_zfs 0} # in order to get kernel symset and/or kernel module dependencies into # the RPM, in order to support weak-modules, the internal dependency gen-