From e9ad97b2d6bbc09ae3bdf45dd5bba42aa04a8fb2 Mon Sep 17 00:00:00 2001 From: Victor Hu Date: Fri, 22 Jul 2016 10:57:43 -0400 Subject: [PATCH] Add some error checking and also some additional dependencies to try to make it easier to build the genesis-base on newly installed build machines --- xCAT-genesis-builder/buildrpm | 11 +++++++++++ xCAT-genesis-builder/xCAT-genesis-builder.spec | 2 +- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/xCAT-genesis-builder/buildrpm b/xCAT-genesis-builder/buildrpm index 7760bc46d..6bc49ed3d 100755 --- a/xCAT-genesis-builder/buildrpm +++ b/xCAT-genesis-builder/buildrpm @@ -170,10 +170,21 @@ if [ $BUILDARCH = "ppc64" ]; then else dracut -m "xcat base" -f /tmp/xcatgenesis.$$.rfs $KERNELVERSION fi + +if [ $? -ne 0 ]; then + echo "ERROR - creating the initramfs, please correct the issues and try again" + exit 1 +fi + echo Expanding the initramfs into /tmp/xcatgenesis.$$/opt/xcat/share/xcat/netboot/genesis/$BUILDARCH/fs ... cd /tmp/xcatgenesis.$$/opt/xcat/share/xcat/netboot/genesis/$BUILDARCH/fs zcat /tmp/xcatgenesis.$$.rfs|cpio -dumi +if [ $? -ne 0 ]; then + echo "ERROR - expanding the initramfs, please correct the issues and try again" + exit 1 +fi + # add the kernel if [ "$HOSTOS" = "mcp" ]; then echo Adding kernel /boot/vmlinuz-* ... diff --git a/xCAT-genesis-builder/xCAT-genesis-builder.spec b/xCAT-genesis-builder/xCAT-genesis-builder.spec index c77235957..7e113a8b0 100644 --- a/xCAT-genesis-builder/xCAT-genesis-builder.spec +++ b/xCAT-genesis-builder/xCAT-genesis-builder.spec @@ -4,7 +4,7 @@ BuildArch: noarch Release: snap%(date +"%Y%m%d%H%M") Epoch: 1 AutoReq: false -Requires: ipmitool screen btrfs-progs lldpad rpm-build compat-libstdc++-33 +Requires: ipmitool screen btrfs-progs lldpad rpm-build compat-libstdc++-33 mstflint xfsprogs nc reiserfs-utils Prefix: /opt/xcat AutoProv: false