X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=build%2Flustre-kernel-2.4.spec.in;h=8460b08dcd33a2e15bab23431658c49cf4e81f86;hb=4198da9d8f2298742f22455d23799eec2dcb4fbb;hp=41efbb3520370886a7d98518e0981108df306394;hpb=8e32ec6b2cf34dd91e49d361d416c849b88b2337;p=fs%2Flustre-release.git diff --git a/build/lustre-kernel-2.4.spec.in b/build/lustre-kernel-2.4.spec.in index 41efbb3..8460b08 100644 --- a/build/lustre-kernel-2.4.spec.in +++ b/build/lustre-kernel-2.4.spec.in @@ -25,6 +25,7 @@ Summary: The Linux kernel (the core of the Linux operating system) %define rhbuild @RHBUILD@ %define susebuild @SUSEBUILD@ %define linux26 @LINUX26@ +%define lmakeopts @LMAKEOPTS@ # disable build root strip policy %define __spec_install_post /usr/lib/rpm/brp-compress || : @@ -42,7 +43,7 @@ Summary: The Linux kernel (the core of the Linux operating system) %define dashtargetboard %{?targetboard:-%{targetboard}} %define withtargetboard 0 %{?targetboard: %{expand: %%define withtargetboard 1}} - + # Override generic defaults with per-arch defaults (which can # themselves be overridden with --with/--without). These must # ONLY be "0", never "1" @@ -154,7 +155,7 @@ Release: %{release}%{?targetboard:%{targetboard}}%{?debuglevel_1:.dbg} %define KVERREL %{PACKAGE_VERSION}%{kextraverdelim}%{kextraver}%{?targetboard:%{targetboard}}%{?debuglevel_1:.dbg} License: GPL Group: System Environment/Kernel -ExclusiveArch: %{all_x86} x86_64 ia64 ppc +ExclusiveArch: %{all_x86} x86_64 ia64 ppc ppc64 ExclusiveOS: Linux Obsoletes: kernel-modules, kernel-sparc Provides: kernel = %{version} @@ -171,7 +172,7 @@ BuildPreReq: patch >= 2.5.4, bash >= 2.03, sh-utils, gnupg, tar BuildPreReq: bzip2, findutils, dev, gzip, m4 %endif -Vendor: Cluster File Systems, Inc. +Vendor: Sun Microsystems, Inc. URL: http://www.kernel.org/ Buildroot: %{_tmppath}/%{name}-%{version}-root @@ -380,11 +381,11 @@ pushd lustre >/dev/null if [ -s "%{SOURCE2}" ] ; then tar zxf "%{SOURCE2}" -C lustre/kernel_patches fi -sh -x ./build/lmake \ +bash -x ./build/lmake \ --unpack-kernel \ --target @LUSTRE_TARGET@ \ --target-arch %{_target_cpu} \ - --kerneldir $RPM_SOURCE_DIR + --kerneldir $RPM_SOURCE_DIR %{lmakeopts} popd >/dev/null # handle both SuSE and Red Hat's new-kernel-pkg bits @@ -406,7 +407,7 @@ for flavor in "" smp bigmem bigsmp pseries64 BOOT jensen ; do # than installed, so force modules.dep to be recreated echo "rm -f /lib/modules/%{KVERREL}${delim_flavor}/modules.dep" >> ${script} echo "if [ -f /etc/modprobe.conf ] ; then" >> ${script} - sed -e "s^%ver_str^%{KVERREL}${delim_flavor}^g" %{SOURCE26} >> ${script} + sed -e "s^%ver_str^%{KVERREL}${delim_flavor}^g" -e "s^%flavor^${flavor}^" %{SOURCE26} >> ${script} echo "else" >> ${script} sed -e "s^%ver_str^%{KVERREL}${delim_flavor}^g" -e "s^%%{cfg_name}^${delim_flavor}^g" %{SOURCE29} >> ${script} @@ -515,19 +516,19 @@ mkdir -p $RPM_BUILD_ROOT DependKernel() { target_config=${1:+--target-config $1} - sh -x ./build/lmake \ + bash -x ./build/lmake \ --depend-kernel \ --target @LUSTRE_TARGET@ \ --target-arch %{_target_cpu} \ ${target_config} \ --extraversion %{kextraver} \ - -j $RPM_BUILD_NCPUS + -j $RPM_BUILD_NCPUS %{lmakeopts} } BuildKernel() { target_config=${1:+--target-config $1} - sh -x ./build/lmake \ + bash -x ./build/lmake \ --build-kernel --build-lustre \ --install \ --save-headers \ @@ -537,7 +538,7 @@ BuildKernel() --extraversion %{kextraver} \ --kerneldir $RPM_SOURCE_DIR \ -j $RPM_BUILD_NCPUS \ - --destdir $RPM_BUILD_ROOT \ + --destdir $RPM_BUILD_ROOT %{lmakeopts} \ -- --enable-tests \ @CONFIGURE_FLAGS@ } @@ -545,7 +546,7 @@ BuildKernel() BuildLustre() { target_config=${1:+--target-config $1} - sh -x ./build/lmake \ + bash -x ./build/lmake \ --build-lustre \ --install-lustre \ --target @LUSTRE_TARGET@ \ @@ -554,7 +555,7 @@ BuildLustre() --extraversion %{kextraver} \ --kerneldir $RPM_SOURCE_DIR \ -j $RPM_BUILD_NCPUS \ - --destdir $RPM_BUILD_ROOT \ + --destdir $RPM_BUILD_ROOT %{lmakeopts} \ -- --enable-utils \ --disable-doc --disable-tests \ --disable-modules --disable-liblustre \ @@ -565,12 +566,12 @@ BuildLustre() SaveHeaders() { - sh -x ./build/lmake \ + bash -x ./build/lmake \ --save-headers \ --target @LUSTRE_TARGET@ \ --target-arch %{_target_cpu} \ --extraversion %{kextraver} \ - --destdir $RPM_BUILD_ROOT + --destdir $RPM_BUILD_ROOT %{lmakeopts} } pushd lustre >/dev/null @@ -645,7 +646,7 @@ BuildObj () if grep -q "$oc" Makefile ; then OLDCONFIG="$oc" break - fi + fi done MAKE="make -s O=$o -C ${c}" if [ "$CC" ] ; then @@ -661,7 +662,7 @@ BuildObj () $(set -- 2.6.5 ; echo ${*//./ }) EOF rm -f $o/Makefile - ARCH=%{_target_cpu} /bin/sh scripts/mkmakefile ../../../linux-%{KVERREL} $o \ + ARCH=%{_target_cpu} /bin/bash scripts/mkmakefile ../../../linux-%{KVERREL} $o \ $VERSION $PATCHLEVEL > $o/Makefile.in if [ -f $o/Makefile ] ; then # will exist only for 2.6.17 and newer because mkmakefile @@ -691,7 +692,7 @@ if [ "%{buildbase}" -ne 0 ] ; then mkdir -p $RPM_BUILD_ROOT/usr/src/linux-%{KVERREL}/configs cp ../lustre/kernel_patches/kernel_configs/kernel-%{kversion}-@LUSTRE_TARGET@*.config $RPM_BUILD_ROOT/usr/src/linux-%{KVERREL}/configs if [ "%{linux26}" -ne 0 ] ; then - # this only works because CFS only builds one kernel per target/arch per kernel-source rpm + # this only works because Sun only builds one kernel per target/arch per kernel-source rpm objdir=$RPM_BUILD_ROOT/usr/src/linux-%{KVERREL}-obj mkdir -p $objdir if [ "%{buildbigmem}" -ne 0 ] ; then @@ -732,7 +733,7 @@ if [ "%{buildbase}" -ne 0 ] ; then if grep -q "$oc" $RPM_BUILD_ROOT/usr/src/linux-%{KVERREL}/Makefile ; then OLDCONFIG="$oc" break - fi + fi done if [ "$CC" ] ; then MAKE_CC="CC=$CC"