X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=build%2Flustre-kernel-2.4.spec.in;h=d7fe38d7eebcb60608c6c0e644a1a41fecc6983b;hb=74ae00e1477d2572696f563db86454402468e61c;hp=d03e614edb403c187ac6aa290d1cee6d3d80f2ba;hpb=3fa8545b77fec1ffe89d7f7bbc5ce600020b282b;p=fs%2Flustre-release.git diff --git a/build/lustre-kernel-2.4.spec.in b/build/lustre-kernel-2.4.spec.in index d03e614..d7fe38d 100644 --- a/build/lustre-kernel-2.4.spec.in +++ b/build/lustre-kernel-2.4.spec.in @@ -171,7 +171,7 @@ BuildPreReq: bzip2, findutils, dev, gzip, m4 Vendor: Cluster File Systems, Inc. URL: http://www.kernel.org/ -Buildroot: /var/tmp/%{name}-%{PACKAGE_VERSION}-root +Buildroot: %{_tmppath}/%{name}-%{version}-root Source0: @LUSTRE_SOURCE@ Source1: @KERNEL_SOURCE@ @@ -402,6 +402,9 @@ for flavor in "" smp bigmem bigsmp pseries64 BOOT jensen ; do echo "fi" >> ${script} ;; post) + # /sbin/update-modules.dep compares when the modules were built, rather + # than installed, so force modules.dep to be recreated + echo "rm -f /lib/modules/%{KVERREL}${flavor}/modules.dep" >> ${script} echo "if [ -f /etc/modprobe.conf ] ; then" >> ${script} sed -e "s^%ver_str^%{KVERREL}${flavor}^g" %{SOURCE26} >> ${script} @@ -435,7 +438,11 @@ EOF [ -x /usr/sbin/module_upgrade ] && /usr/sbin/module_upgrade [ -x /sbin/mkkerneldoth ] && /sbin/mkkerneldoth if [ -x /sbin/new-kernel-pkg ] ; then - /sbin/new-kernel-pkg --mkinitrd --depmod --install %{KVERREL}${flavor} + if /sbin/new-kernel-pkg 2>&1 | grep package >/dev/null ; then + PACKAGE_ARG="--package kernel-${flavor}" + fi + /sbin/new-kernel-pkg $PACKAGE_ARG --mkinitrd --depmod \ + --install %{KVERREL}${flavor} fi EOF ;; @@ -531,11 +538,7 @@ BuildKernel() --kerneldir $RPM_SOURCE_DIR \ -j $RPM_BUILD_NCPUS \ --destdir $RPM_BUILD_ROOT \ - -- --enable-modules \ - --disable-doc --disable-tests \ - --disable-utils --disable-liblustre \ - --sysconfdir=%{_sysconfdir} \ - --mandir=%{_mandir} \ + -- --disable-tests \ @CONFIGURE_FLAGS@ } @@ -601,7 +604,7 @@ BuildKernel %endif %if %{buildbase} -BuildLustre +# BuildLustre %endif popd >/dev/null @@ -612,8 +615,6 @@ pushd lustre >/dev/null # specific for i in $RPM_BUILD_ROOT/lib/modules/* ; do rm -f $i/modules.* - rm -f $i/build - ln -sf ../../../usr/src/linux-%{KVERREL} $i/build %ifarch %{ntplarchs} # remove legacy pcmcia symlink that's no longer useful rm -rf $i/pcmcia @@ -637,8 +638,9 @@ BuildObj () c="$RPM_BUILD_ROOT/usr/src/linux-%{KVERREL}" o="${c}-obj/%{_target_cpu}/$flavor" mkdir -p $o - cp ../lustre/kernel_patches/kernel_configs/kernel-%{kversion}-@LUSTRE_TARGET@-%{_target_cpu}%{dashtargetboard}${flavext}.config \ - $o/.config + # use the one we just built + #cp ../lustre/kernel_patches/kernel_configs/kernel-%{kversion}-@LUSTRE_TARGET@-%{_target_cpu}%{dashtargetboard}${flavext}.config \ + cp .config $o/.config for oc in oldconfig_nonint silentoldconfig oldconfig ; do if grep -q "$oc" Makefile ; then OLDCONFIG="$oc" @@ -718,7 +720,10 @@ if [ "%{buildbase}" -ne 0 ] ; then done else # 2.4 rh-style perl -p -i -e "s/^EXTRAVERSION.*/EXTRAVERSION = -%{kextraver}custom/" $RPM_BUILD_ROOT/usr/src/linux-%{KVERREL}/Makefile - cp ../lustre/kernel_patches/kernel_configs/kernel-%{kversion}-@LUSTRE_TARGET@-%{_target_cpu}%{dashtargetboard}.config $RPM_BUILD_ROOT/usr/src/linux-%{KVERREL}/.config + # get the one from the build we just completed as it might have picked + # up new options + #cp ../lustre/kernel_patches/kernel_configs/kernel-%{kversion}-@LUSTRE_TARGET@-%{_target_cpu}%{dashtargetboard}.config $RPM_BUILD_ROOT/usr/src/linux-%{KVERREL}/.config + cp .config $RPM_BUILD_ROOT/usr/src/linux-%{KVERREL}/.config for oc in oldconfig_nonint silentoldconfig oldconfig ; do if grep -q "$oc" $RPM_BUILD_ROOT/usr/src/linux-%{KVERREL}/Makefile ; then OLDCONFIG="$oc" @@ -848,12 +853,6 @@ rm -rf $RPM_BUILD_ROOT %endif %post -n lustre-lite-utils -if [ ! -e /dev/obd ]; then - mknod /dev/obd c 10 241 -fi -if [ ! -e /dev/portals ]; then - mknod /dev/portals c 10 240 -fi if [ -f /etc/init.d/lustre ] ; then /sbin/chkconfig --add lustre /sbin/chkconfig --add lustrefs @@ -971,40 +970,5 @@ fi %endif %if %{buildbase} - %files source -f kernel-source.files - -%files doc -%defattr(-,root,root) -%doc lustre/linux/Documentation/* - -%files -n lustre-lite-utils -%defattr(-, root, root) -%doc lustre/COPYING lustre/lustre/BUGS lustre/ChangeLog lustre/README -/sbin/* -/usr/sbin/* -/usr/bin/* -/usr/lib/lustre/python -@ENABLE_INIT_SCRIPTS@/etc/init.d/lustre -@ENABLE_INIT_SCRIPTS@/etc/init.d/lustrefs -/usr/include/lustre/* -/usr/include/linux/* -/usr/lib/lib*.a -/usr/share/man/man?/* - -#%files -n lustre-doc -#%defattr(-, root, root) -#/usr/share/doc/lustre/COPYING -#/usr/share/doc/lustre/lustre.pdf -#/usr/share/doc/lustre/COPYING - -/usr/share/lustre/examples - -%files -n lustre-ldap -%defattr(-, root, root) -/etc/openldap/slapd-lustre.conf -/etc/openldap/schema/lustre.schema -/usr/share/lustre/lustre2ldif.xsl -/usr/share/lustre/top.ldif - -%endif # %{buildbase} +%endif