From f3cbfbcfef26dca956fa5ca4fad986c415e1352e Mon Sep 17 00:00:00 2001 From: jbjohnso Date: Thu, 15 Dec 2011 16:56:57 +0000 Subject: [PATCH] Remove aspirations of virtualizing with genesis for now, not enough time to test Spruce up spec file to make it more likely to work git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@11251 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-nbroot2/install | 5 ++- xCAT-nbroot2/xCAT-genesis-builder.spec | 1 + xCAT-nbroot2/xCAT-genesis.spec | 61 ++++++++++++++++++++++++++ 3 files changed, 65 insertions(+), 2 deletions(-) create mode 100644 xCAT-nbroot2/xCAT-genesis.spec diff --git a/xCAT-nbroot2/install b/xCAT-nbroot2/install index 3d312a265..da127d42e 100755 --- a/xCAT-nbroot2/install +++ b/xCAT-nbroot2/install @@ -2,8 +2,9 @@ echo $drivers dracut_install wget openssl tar ipmitool cpio gzip modprobe touch echo cut wc dracut_install grep ip hostname awk egrep grep dirname expr -dracut_install mount.nfs sshd vi reboot lspci parted screen libvirtd /usr/share/libvirt/cpu_map.xml mkfs mkfs.ext4 mkfs.btrfs -dracut_install mkswap df brctl vconfig ifenslave ssh-keygen /usr/bin/qemu-img /usr/libexec/qemu-kvm scp clear dhclient lldpad +dracut_install mount.nfs sshd vi reboot lspci parted screen mkfs mkfs.ext4 mkfs.btrfs +#dracut_install libvirtd /usr/share/libvirt/cpu_map.xml /usr/bin/qemu-img /usr/libexec/qemu-kvm +dracut_install mkswap df brctl vconfig ifenslave ssh-keygen scp clear dhclient lldpad dracut_install lldptool /lib64/libnss_dns-2.12.so /lib64/libnss_dns.so.2 dracut_install poweroff ntpq ntpd hwclock date /usr/share/terminfo/x/xterm /etc/nsswitch.conf /etc/services dracut_install /sbin/rsyslogd /etc/protocols umount /bin/rpm /usr/lib/rpm/rpmrc diff --git a/xCAT-nbroot2/xCAT-genesis-builder.spec b/xCAT-nbroot2/xCAT-genesis-builder.spec index 5f2897c6d..5c3303c52 100644 --- a/xCAT-nbroot2/xCAT-genesis-builder.spec +++ b/xCAT-nbroot2/xCAT-genesis-builder.spec @@ -4,6 +4,7 @@ BuildArch: noarch Release: snap%(date +"%Y%m%d%H%M") Epoch: 1 AutoReq: false +Requires: ipmitool screen btrfs-progs lldpad rpm-build Prefix: /opt/xcat AutoProv: false diff --git a/xCAT-nbroot2/xCAT-genesis.spec b/xCAT-nbroot2/xCAT-genesis.spec new file mode 100644 index 000000000..c652de320 --- /dev/null +++ b/xCAT-nbroot2/xCAT-genesis.spec @@ -0,0 +1,61 @@ +%define version 2.7 +%ifarch i386 i586 i686 x86 +%define tarch x86 +%endif +%ifarch x86_64 +%define tarch x86_64 +%endif +%ifarch ppc ppc64 +%define tarch ppc64 +%endif +BuildArch: noarch +%define name xCAT-genesis-%{tarch} +%define __spec_install_post : +%define debug_package %{nil} +%define __prelink_undo_cmd %{nil} +Release: snap%(date +"%Y%m%d%H%M") +Epoch: 1 +AutoReq: false +Prefix: /opt/xcat +AutoProv: false + + + +Name: %{name} +Version: %{version} +Group: System/Utilities +License: Various (see individual packages for details) +Vendor: IBM Corp. +Summary: xCAT Genesis netboot image +URL: http://xcat.org +Source1: xCAT-genesis-%{tarch}.tar.bz2 + +Buildroot: %{_localstatedir}/tmp/xCAT-genesis +Packager: IBM Corp. + +%Description +xCAT genesis (Genesis Enhanced Netboot Environment for System Information and Servicing) is a small, embedded-like environment for xCAT's use in discovery and management actions when interaction with an OS is infeasible. +%Prep + + +%Build + +%Install +rm -rf $RPM_BUILD_ROOT +mkdir -p $RPM_BUILD_ROOT +cd $RPM_BUILD_ROOT +tar jxf %{SOURCE1} +cd - + + +%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 + +%Files +%defattr(-,root,root) +/