2008-01-17 16:18:10 +00:00
|
|
|
%ifarch i386 i586 i686 x86
|
2008-06-26 18:02:09 +00:00
|
|
|
Source1: kernel-2.6.18-92.el5.i686.rpm
|
|
|
|
Source2: modlist-2.6.18-92.el5.x86
|
|
|
|
%define kver 2.6.18-92.el5
|
|
|
|
%define version 2.6.18_92
|
2008-01-17 16:18:10 +00:00
|
|
|
%define tarch x86
|
|
|
|
%endif
|
|
|
|
%ifarch x86_64
|
2008-06-26 18:02:09 +00:00
|
|
|
Source1: kernel-2.6.18-92.el5.x86_64.rpm
|
|
|
|
Source2: modlist-2.6.18-92.el5.x86_64
|
|
|
|
%define version 2.6.18_92
|
|
|
|
%define kver 2.6.18-92.el5
|
2008-01-17 16:18:10 +00:00
|
|
|
%define tarch x86_64
|
|
|
|
%endif
|
|
|
|
%ifarch ppc ppc64
|
2008-06-25 21:05:37 +00:00
|
|
|
Source1: kernel-2.6.18-92.el5.ppc64.rpm
|
|
|
|
Source2: modlist-2.6.18-92.el5.ppc64
|
|
|
|
%define kver 2.6.18-92.el5
|
2008-01-17 16:18:10 +00:00
|
|
|
%define tarch ppc64
|
2008-06-25 21:05:37 +00:00
|
|
|
%define version 2.6.18_92
|
2008-01-17 16:18:10 +00:00
|
|
|
%endif
|
|
|
|
BuildArch: noarch
|
|
|
|
%define name xCAT-nbkernel-%{tarch}
|
2008-09-09 15:51:11 +00:00
|
|
|
Release: 6
|
2008-04-04 18:07:25 +00:00
|
|
|
Epoch: 1
|
2008-01-17 16:18:10 +00:00
|
|
|
AutoReq: false
|
|
|
|
AutoProv: false
|
|
|
|
Requires: xCAT-server xCAT-nbroot-oss-%{tarch} xCAT-nbroot-core-%{tarch}
|
|
|
|
|
|
|
|
Name: %{name}
|
|
|
|
Version: %{version}
|
|
|
|
Group: System/Utilities
|
|
|
|
License: GPL
|
|
|
|
Summary: xcat-nbroot-oss provides opensource components of the netboot image
|
|
|
|
URL: http://xcat.org
|
|
|
|
Buildroot: %{_localstatedir}/tmp/xcat-nbk
|
2008-01-29 21:17:29 +00:00
|
|
|
Prefix: /opt/xcat
|
2008-01-17 16:18:10 +00:00
|
|
|
|
|
|
|
%Description
|
|
|
|
xcat-nbroot-oss is a particular packaging of buildroot from the uclibc.org site.
|
|
|
|
All files included are as they were downloadable on 4/7/2007
|
|
|
|
%Prep
|
|
|
|
rm -rf %{name}
|
2008-01-29 21:17:29 +00:00
|
|
|
mkdir -p %{name}/%{prefix}/share/xcat/netboot/%{tarch}/nbroot
|
2008-01-17 16:18:10 +00:00
|
|
|
cd %{name}
|
2008-01-29 21:17:29 +00:00
|
|
|
mkdir -p ./%{prefix}/share/xcat/netboot/%{tarch}/nbroot
|
|
|
|
cd ./%{prefix}/share/xcat/netboot/%{tarch}/nbroot
|
2008-01-17 16:18:10 +00:00
|
|
|
rpm2cpio %{SOURCE1} | cpio -ivdum
|
2008-01-29 21:17:29 +00:00
|
|
|
mkdir -p ../../../../../../../tftpboot/xcat/
|
|
|
|
cp boot/vmlinuz* ../../../../../../../tftpboot/xcat/nbk.%{tarch}
|
2008-01-17 16:18:10 +00:00
|
|
|
mv boot/* ../
|
|
|
|
rmdir boot
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%Build
|
|
|
|
cd %{name}
|
2008-01-29 21:17:29 +00:00
|
|
|
cd ./%{prefix}/share/xcat/netboot/%{tarch}/nbroot/lib/modules/*
|
|
|
|
pwd;
|
2008-01-17 16:18:10 +00:00
|
|
|
find kernel -type f -exec grep -q {} %{SOURCE2} \; -o -type f -a -exec rm {} \;
|
|
|
|
find kernel -type d -a -empty | xargs rmdir
|
|
|
|
find kernel -type d -a -empty | xargs rmdir
|
|
|
|
find kernel -type d -a -empty | xargs rmdir
|
|
|
|
cd -
|
2008-01-29 21:17:29 +00:00
|
|
|
cd ./%{prefix}/share/xcat/netboot/%{tarch}/nbroot
|
2008-01-17 16:18:10 +00:00
|
|
|
depmod -b . %{kver}
|
|
|
|
|
|
|
|
%Install
|
|
|
|
rm -rf $RPM_BUILD_ROOT
|
|
|
|
mkdir -p $RPM_BUILD_ROOT
|
|
|
|
cd %{name}
|
|
|
|
cp -a * $RPM_BUILD_ROOT
|
|
|
|
|
2008-07-02 15:44:32 +00:00
|
|
|
%post
|
|
|
|
if [ "$1" == "2" ]; then #only on upgrade, as on install it's probably not going to work...
|
|
|
|
if [ -f "/proc/cmdline" ]; then # prevent running it during install into chroot image
|
|
|
|
. /etc/profile.d/xcat.sh
|
|
|
|
mknb %{tarch}
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
2008-01-17 16:18:10 +00:00
|
|
|
%Files
|
|
|
|
%defattr(-,root,root)
|
|
|
|
/
|