From a448a5c701f60a8fe600d397d6cf00caee77f738 Mon Sep 17 00:00:00 2001 From: jacob Date: Fri, 10 Oct 2003 07:03:46 +0000 Subject: [PATCH] lustre kernel spec is now in scripts/ with the non-kernel lustre spec file --- .../kernel_configs/lustre_kernel.spec.in | 391 --------------------- lustre/kernel_patches/lustre-kernel.spec.in | 113 ------ 2 files changed, 504 deletions(-) delete mode 100644 lustre/kernel_patches/kernel_configs/lustre_kernel.spec.in delete mode 100644 lustre/kernel_patches/lustre-kernel.spec.in diff --git a/lustre/kernel_patches/kernel_configs/lustre_kernel.spec.in b/lustre/kernel_patches/kernel_configs/lustre_kernel.spec.in deleted file mode 100644 index a35b7fb..0000000 --- a/lustre/kernel_patches/kernel_configs/lustre_kernel.spec.in +++ /dev/null @@ -1,391 +0,0 @@ -# Copyright (C) 2001 Cluster File Systems, Inc. -# -# This code is issued under the GNU General Public License. -# See the file COPYING in this distribution - -%define arch i586-smp -%define kernel_version 2.4.20 -%define patch_version rh -%define lustre_version 22 -%define lustre_release PQ_TEST -%define lustre_branch b_devel -%define kernel_config kernel-2.4.20 -%define with_lib_lustre 1 -%define with_debug_lustre 0 - -# disable build root strip policy -%define __spec_install_post /usr/lib/rpm/brp-compress || : -%ifarch ia64 -%define initrd_dir /boot/efi/redhat -%else -%define initrd_dir /boot -%endif - -Name: lustre-kernel -Summary: The Linux_lustre kernel -Version: %{kernel_version}%{patch_version}_lustre%{lustre_version} -Release: %{lustre_release} -License: GPL -Group: System Environment/Kernel -URL: http://www.lustre.org/pub/lustre/ -BuildRoot: %{_tmppath}/%{kernel_version}-%{patch_version}-buildroot -BuildConflicts: rhbuildsys(DiskFree) < 500Mb -BuildRequires: gcc >= 2.96-98 modutils >= 2.4.10 - -Source0: linux-%{kernel_version}-%{patch_version}-lustre%{lustre_version}.tar.gz -Source1: lustre-%{lustre_branch}.tar.gz -Patch0: lustre-patch-%{lustre_version} - -%description -The Lustre Lite Cluster File System: kernel for lustre file system - -%if %{with_debug_lustre} -%package -n lustre-kernel-debug -Summary: lustre-kernel-packages with debug info -Group: System Environment/Kernel - -%description -n lustre-kernel-debug -lustre-kernel-packages with debug info -%endif - -%package -n lustre-lite-utils -Summary: Lustre utils for Linux %{kernel_version} -Group: Development - -%description -n lustre-lite-utils -The Lustre Lite Cluster File System utilities. - -%package -n lustre-doc -Summary: Documentation and sample configuration files -Group: Documentation - -%description -n lustre-doc -Documentation and sample configuration files for Lustre - -%package -n lustre-ldap -Summary: Configures openldap server for LDAP Lustre config database -Group: Configuration -Requires: openldap-servers, openldap-clients, python-ldap, 4Suite - -%description -n lustre-ldap -Configures openldap server for LDAP Lustre config database - -%if %{with_lib_lustre} -%package -n liblustre -Summary: Liblustre package -Group: Development - -%description -n liblustre -The Lustre Lib utilities -%endif - -################################################################################################### -%prep -%setup -q -n linux-%{kernel_version}-%{patch_version} - -#patch the lustre kernel -%patch0 -p0 -mkdir -p configs -cp -fv $RPM_SOURCE_DIR/%{kernel_config} configs/ -sed -e "s/^EXTRAVERSION.*/EXTRAVERSION = -%{patch_version}_lustre%{lustre_version}/g" < Makefile > Makefile.new -mv -f Makefile.new Makefile - -#get rid of -g flags -sed -e "s/\([^$]\)*CFLAGS\([^$]\)*\+=\([^$]\)*\-g//g" < Makefile > Makefile.new -mv -f Makefile.new Makefile -# get rid of unwanted files -find . -name "*.orig" -exec rm -fv {} \; -find . -name "*~" -exec rm -fv {} \; - -#for release lustre -%setup -T -b 1 -q -n lustre-%{lustre_branch} - -#for debug kernel -%if %{with_debug_lustre} -%setup -T -b 0 -q -c -n $RPM_BUILD_DIR/linux-%{kernel_version}-%{patch_version}-debug -%setup -T -b 1 -q -c -n $RPM_BUILD_DIR/lustre-%{lustre_branch}-debug -%endif - - -#for release lib-lustre -%if %{with_lib_lustre} -%setup -T -b 1 -q -c -n $RPM_BUILD_DIR/lustre-%{lustre_branch}-lib -%endif - -################################################################################################### -%build -BuildKernel() { - cd $RPM_BUILD_DIR/linux-%{kernel_version}-%{patch_version} - make distclean - cp -fv $RPM_BUILD_DIR/lustre-%{lustre_branch}/kernel_patches/kernel_configs/%{kernel_config} .config -%ifarch ia64 - make oldconfig dep vmlinux modules -%else - make oldconfig dep bzImage modules -%endif -} -BuildLustre() { - cd $RPM_BUILD_DIR/lustre-%{lustre_branch} - sh autogen.sh - ./configure --with-linux="$RPM_BUILD_DIR/linux-%{kernel_version}-%{patch_version}" - make - #build docs - cd doc - make docs -} -BuildLibLustre(){ - cd $RPM_BUILD_DIR/lustre-%{lustre_branch}-lib/lustre-%{lustre_branch} - sh autogen.sh - ./configure --with-lib - make -} -BuildDebugKernel() { - cd $RPM_BUILD_DIR/linux-%{kernel_version}-%{patch_version}-debug/linux-%{kernel_version}-%{patch_version} - patch -p0 < $RPM_SOURCE_DIR/lustre-patch-%{lustre_version} - make distclean - cp -fv $RPM_BUILD_DIR/lustre-%{lustre_branch}/kernel_patches/kernel_configs/%{kernel_config} .config - sed -e "s/^EXTRAVERSION.*/EXTRAVERSION = -%{patch_version}_lustre%{lustre_version}-debug/g" < Makefile > Makefile.new - mv -f Makefile.new Makefile -%ifarch ia64 - make oldconfig dep vmlinux modules -%else - make oldconfig dep bzImage modules -%endif -} -BuildDebugLustre() { - cd $RPM_BUILD_DIR/lustre-%{lustre_branch}-debug/lustre-%{lustre_branch} - sh autogen.sh - ./configure --with-linux="$RPM_BUILD_DIR/linux-%{kernel_version}-%{patch_version}-debug/linux-%{kernel_version}-%{patch_version}" - make - #build docs - cd doc - make docs -} -rm -rf $RPM_BUILD_ROOT - -BuildKernel -BuildLustre - -%if %{with_lib_lustre} - BuildLibLustre -%endif - -%if %{with_debug_lustre} - BuildDebugKernel - BuildDebugLustre -%endif - -################################################################################################### -%install - -#install kernel -cd $RPM_BUILD_DIR/linux-%{kernel_version}-%{patch_version} -mkdir -p $RPM_BUILD_ROOT/boot $RPM_BUILD_ROOT/lib $RPM_BUILD_ROOT/lib/modules -INSTALL_MOD_PATH=$RPM_BUILD_ROOT/ make modules_install -%ifarch ia64 - cp vmlinux $RPM_BUILD_ROOT/boot/vmlinuz-%{kernel_version}_lustre%{lustre_version} -%else - cp arch/i386/boot/bzImage $RPM_BUILD_ROOT/boot/vmlinuz-%{kernel_version}_lustre%{lustre_version} -%endif -cp System.map $RPM_BUILD_ROOT/boot/System.map-%{kernel_version}-%{patch_version}_lustre%{lustre_version} -cp .config $RPM_BUILD_ROOT/boot/config-%{kernel_version}_lustre%{lustre_version} - -#install lustre -cd $RPM_BUILD_DIR/lustre-%{lustre_branch} -make install prefix="$RPM_BUILD_ROOT" - -#install debug kernel -%if %{with_debug_lustre} - cd $RPM_BUILD_DIR/linux-%{kernel_version}-%{patch_version}-debug/linux-%{kernel_version}-%{patch_version} - mkdir -p $RPM_BUILD_ROOT/boot $RPM_BUILD_ROOT/lib $RPM_BUILD_ROOT/lib/modules - INSTALL_MOD_PATH=$RPM_BUILD_ROOT make modules_install -%ifarch ia64 - cp vmlinux $RPM_BUILD_ROOT/boot/vmlinuz-%{kernel_version}_lustre%{lustre_version}-debug -%else - cp arch/i386/boot/bzImage $RPM_BUILD_ROOT/boot/vmlinuz-%{kernel_version}_lustre%{lustre_version}-debug -%endif - cp System.map $RPM_BUILD_ROOT/boot/System.map-%{kernel_version}-%{patch_version}_lustre%{lustre_version}-debug - cp vmlinux $RPM_BUILD_ROOT/boot/vmlinux-%{kernel_version}_lustre%{lustre_version}-debug - cp .config $RPM_BUILD_ROOT/boot/config-%{kernel_version}_lustre%{lustre_version}-debug - cd $RPM_BUILD_DIR/lustre-%{lustre_branch}-debug/lustre-%{lustre_branch} - make install prefix="$RPM_BUILD_ROOT/" -%endif - -#install lib lustre -%if %{with_lib_lustre} - cd $RPM_BUILD_DIR/lustre-%{lustre_branch}-lib/lustre-%{lustre_branch} - make install prefix="$RPM_BUILD_ROOT/" -%endif - -#install Document of lustre -mkdir -p $RPM_BUILD_ROOT/usr/share/doc/lustre -cp -pr $RPM_BUILD_DIR/lustre-%{lustre_branch}/COPYING $RPM_BUILD_ROOT/usr/share/doc/lustre -cp -pr $RPM_BUILD_DIR/lustre-%{lustre_branch}/doc/lustre.pdf $RPM_BUILD_ROOT/usr/share/doc/lustre -cp -pr $RPM_BUILD_DIR/lustre-%{lustre_branch}/doc/lustre-HOWTO.txt $RPM_BUILD_ROOT/usr/share/doc/lustre - -%ifarch alpha -# this hurts me - conf_flag= - linuxdir=$RPM_BUILD_ROOT/linux-%{kernel_version}-%{patch_version} - test -d $linuxdir && conf_flag=--with-linux=$linuxdir - make clean - ./configure --enable-rtscts-myrinet $conf_flag - make - cp linux/rtscts/rtscts.o $RPM_BUILD_ROOT/lib/modules/%{kernel_version}-%{patch_version}/kernel/net/lustre/rtscts_myrinet.o - cp user/myrinet_utils/mcpload $RPM_BUILD_ROOT/lustre/usr/sbin/mcpload -%endif - -mkdir -p $RPM_BUILD_ROOT/var/lib/ldap/lustre -################################################################################################### -%files -%defattr (-, root, root) -/boot/vmlinuz-%{kernel_version}_lustre%{lustre_version} -/boot/System.map-%{kernel_version}-%{patch_version}_lustre%{lustre_version} -/boot/config-%{kernel_version}_lustre%{lustre_version} -/lib/modules/%{kernel_version}-%{patch_version}_lustre%{lustre_version} - -%if %{with_debug_lustre} -%files -n lustre-kernel-debug -%defattr (-, root, root) -/boot/vmlinuz-%{kernel_version}_lustre%{lustre_version}-debug -/boot/vmlinux-%{kernel_version}_lustre%{lustre_version}-debug -/boot/System.map-%{kernel_version}-%{patch_version}_lustre%{lustre_version}-debug -/boot/config-%{kernel_version}_lustre%{lustre_version}-debug -/lib/modules/%{kernel_version}-%{patch_version}_lustre%{lustre_version}-debug -%endif - -%files -n lustre-lite-utils -%attr(-, root, root) /usr/sbin/lmc -%attr(-, root, root) /usr/sbin/lctl -%attr(-, root, root) /usr/sbin/lconf -%attr(-, root, root) /usr/sbin/lactive -%attr(-, root, root) /usr/sbin/llanalyze -%attr(755, root, root) /usr/bin/lfind -%attr(755, root, root) /usr/bin/lstripe -%attr(-, root, root) /usr/sbin/llstat.pl -%attr(-, root, root) /usr/sbin/llobdstat.pl -%attr(-, root, root) /usr/sbin/load_ldap.sh -%attr(755, root, root) /usr/lib/lustre/python/* -%attr(755, root, root) /usr/lib/lustre/examples/llmount.sh -%attr(755, root, root) /usr/lib/lustre/examples/llmountcleanup.sh -%attr(755, root, root) /usr/lib/lustre/examples/llecho.sh -%attr(755, root, root) /usr/lib/lustre/examples/local.sh -%attr(755, root, root) /usr/lib/lustre/examples/uml.sh -%attr(755, root, root) /usr/lib/lustre/examples/lov.sh -%attr(755, root, root) /usr/lib/lustre/examples/echo.sh -%attr(755, root, root) /usr/lib/lustre/examples/llechocleanup.sh - -%attr(-, root, root) /etc/init.d/lustre -%attr(-, root, root) /usr/sbin/acceptor -%attr(-, root, root) /usr/sbin/ptlctl -%attr(-, root, root) /usr/sbin/debugctl -%attr(-, root, root) /lib/libportals.a -%attr(-, root, root) /lib/libptlctl.a -%attr(-, root, root) /lib/libtcpnal.a -%attr(-, root, root) /usr/include/lustre/*.h -%attr(-, root, root) /usr/sbin/lload -%attr(-, root, root) /usr/sbin/obdbarrier -%attr(-, root, root) /usr/sbin/obdio -%attr(-, root, root) /usr/sbin/routerstat -%attr(-, root, root) /usr/sbin/wirecheck - -%ifarch alpha -%attr(-, root, root) /usr/sbin/mcpload -%endif - -%files -n lustre-doc -%attr(-, root, root) /usr/share/doc/lustre/COPYING -%attr(-, root, root) /usr/share/doc/lustre/lustre.pdf -%attr(-, root, root) /usr/share/doc/lustre/lustre-HOWTO.txt - -%files -n lustre-ldap -%attr(-, root, root) /etc/openldap/slapd-lustre.conf -%attr(-, root, root) /etc/openldap/schema/lustre.schema -%attr(-, root, root) /usr/lib/lustre/lustre2ldif.xsl -%attr(-, root, root) /usr/lib/lustre/top.ldif -%attr(700, ldap, ldap) /var/lib/ldap/lustre - -%if %{with_lib_lustre} -%files -n liblustre -%attr(-, root, root) /lib/lustre -%attr(-, root, root) /lib/lustre/liblov.a -%attr(-, root, root) /lib/lustre/liblustreclass.a -%attr(-, root, root) /lib/lustre/libptlrpc.a -%attr(-, root, root) /lib/lustre/libobdecho.a -%attr(-, root, root) /lib/lustre/libldlm.a -%attr(-, root, root) /lib/lustre/libosc.a -%attr(-, root, root) /lib/lustre/libost.a -%attr(-, root, root) /lib/lustre/libmdc.a -%attr(-, root, root) /lib/lustre/libportals.a -%attr(-, root, root)/lib/lustre/libtcpnal.a -%attr(-, root, root)/lib/lustre/libptlctl.a - -%attr(-, root, root) /usr/bin/lfind -%attr(-, root, root) /usr/bin/lstripe -%attr(-, root, root) /usr/bin/libecho -%attr(-, root, root) /usr/sbin/lctl -%attr(-, root, root) /usr/sbin/obdio -%attr(-, root, root) /usr/sbin/obdbarrier -%attr(-, root, root) /usr/sbin/lload -%attr(-, root, root) /usr/sbin/lconf -%attr(-, root, root) /usr/sbin/lmc -%attr(-, root, root) /usr/sbin/llanalyze -%attr(-, root, root) /usr/sbin/ptlctl -%attr(-, root, root) /usr/sbin/routerstat -%attr(-, root, root) /usr/sbin/wirecheck -%attr(-, root, root) /usr/sbin/llstat.pl -%attr(-, root, root) /usr/sbin/llobdstat.pl -%attr(-, root, root) /usr/sbin/lactive -%attr(-, root, root) /usr/sbin/load_ldap.sh - -%attr(-, root, root) /usr/include/lustre/pqtimer.h -%attr(-, root, root) /usr/include/lustre/dispatch.h -%attr(-, root, root) /usr/include/lustre/table.h -%attr(-, root, root) /usr/include/lustre/timer.h -%attr(-, root, root) /usr/include/lustre/connection.h -%attr(-, root, root) /usr/include/lustre/ipmap.h -%attr(-, root, root) /usr/include/lustre/bridge.h -%attr(-, root, root) /usr/include/lustre/procbridge.h -%attr(-, root, root) /usr/lib/lustre/python/Lustre/__init__.py -%attr(-, root, root) /usr/lib/lustre/python/Lustre/lustredb.py -%attr(-, root, root) /usr/lib/lustre/python/Lustre/error.py -%attr(-, root, root) /usr/lib/lustre/python/Lustre/cmdline.py -%endif -################################################################################################### -%clean -rm -rf $RPM_BUILD_ROOT/lustre-%{lustre_branch}-debug -rm -rf $RPM_BUILD_ROOT/lustre-%{lustre_branch} -rm -rf $RPM_BUILD_ROOT/lustre-%{lustre_branch}-lib -rm -rf $RPM_BUILD_ROOT/linux-%{kernel_version}-%{patch_version} -rm -rf $RPM_BUILD_ROOT/linux-%{kernel_version}-%{patch_version}-debug - -################################################################################################### -# post -%post -if [ ! -e /dev/obd ]; then - mknod /dev/obd c 10 241 -fi -if [ ! -e /dev/portals ]; then - mknod /dev/portals c 10 240 -fi -depmod -ae || exit 0 - -%postun -depmod -ae || exit 0 - -%post -n lustre-ldap -if ! grep -q slapd-lustre /etc/openldap/slapd.conf; then - echo "include /etc/openldap/slapd-lustre.conf" >> /etc/openldap/slapd.conf -fi - -%postun -n lustre-ldap - slapd=/etc/openldap/slapd.conf - if grep -q slapd-lustre $slapd; then - tmp=/tmp/lustre-ldap.$$ - sed "/slapd-lustre/d" $slapd >> $tmp - cp $tmp $slapd - rm $tmp - fi -# end of post -################################################################################################### - diff --git a/lustre/kernel_patches/lustre-kernel.spec.in b/lustre/kernel_patches/lustre-kernel.spec.in deleted file mode 100644 index 6eca2c9..0000000 --- a/lustre/kernel_patches/lustre-kernel.spec.in +++ /dev/null @@ -1,113 +0,0 @@ -Name: kernel -Summary: The Linux Kernel -Version: @KERNEL_VERSION@ -Release: @KERNEL_RELEASE@ -License: GPL -Group: System Environment/Kernel -Vendor: Cluster File Systems, Inc. -URL: http://www.kernel.org/ -Buildroot: /var/tmp/%{name}-%{PACKAGE_VERSION}-root - -Source0: @LUSTRE_SOURCE@ -Source1: @KERNEL_SOURCE@ - -%define __spec_install_post /usr/lib/rpm/brp-compress || : -%define debug_package %{nil} - -%description -The Linux Kernel, the operating system core itself. - -%package -n lustre-lite-utils -Summary: Lustre utils for Linux -Group: Applications/System - -%description -n lustre-lite-utils -The Lustre Lite file system utilities. - -#%package -n lustre-doc -#Summary: Sample Lustre configurations and documentation -#Group: Documentation - -#%description -n lustre-doc -#The Lustre book, sample configurations, and other documentation for -#Lustre. - -%package -n lustre-ldap -Summary: LDAP schema files for Lustre -Group: System Environment/Daemons - -%description -n lustre-ldap -LDAP schema files for Lustre. - -%prep -%setup -n lustre-kernel-%{version} -q -c -[ -d lustre ] || ln -sf lustre* lustre - -%build -# if RPM_BUILD_NCPUS unset, set it -if [ -z "$RPM_BUILD_NCPUS" ] ; then - RPM_BUILD_NCPUS=$(egrep -c "^cpu[0-9]+" /proc/stat || :) - if [ $RPM_BUILD_NCPUS -eq 0 ] ; then - RPM_BUILD_NCPUS=1 - fi - if [ $RPM_BUILD_NCPUS -gt 8 ] ; then - RPM_BUILD_NCPUS=8 - fi -fi - -pushd lustre >/dev/null -./scripts/lmake \ - --phase build \ - --target @LUSTRE_TARGET@ \ - --extraversion %{release} \ - --kerneldir $RPM_SOURCE_DIR \ - -j $RPM_BUILD_NCPUS \ - -- @CONFIGURE_FLAGS@ -popd >/dev/null - -%install -rm -rf $RPM_BUILD_ROOT -mkdir -p $RPM_BUILD_ROOT -pushd lustre >/dev/null -./scripts/lmake \ - --phase install \ - --target @LUSTRE_TARGET@ \ - --extraversion %{release} \ - --destdir $RPM_BUILD_ROOT -popd >/dev/null - -%clean -rm -rf $RPM_BUILD_ROOT - -%files -%doc lustre/linux/COPYING lustre/linux/CREDITS lustre/linux/README -%doc lustre/linux/REPORTING-BUGS -%defattr(-, root, root) -%dir /lib/modules -/lib/modules/* -/boot/* - -%files -n lustre-lite-utils -%doc lustre/COPYING lustre/BUGS lustre/ChangeLog lustre/README lustre/doc/lustre.pdf -%defattr(-, root, root) -%{_sbindir}/* -%{_bindir}/* -%{_libdir}/lustre/python -%{_sysconfdir}/init.d/lustre -/usr/include/lustre -/lib/lib*.a - -#%files -n lustre-doc -#%defattr(-, root, root) -#/usr/share/doc/lustre/COPYING -#/usr/share/doc/lustre/lustre.pdf -#/usr/share/doc/lustre/COPYING - -/usr/lib/lustre/examples - -%files -n lustre-ldap -%defattr(-, root, root) -/etc/openldap/slapd-lustre.conf -/etc/openldap/schema/lustre.schema -/usr/lib/lustre/lustre2ldif.xsl -/usr/lib/lustre/top.ldif -- 1.8.3.1