From 0497e158b17d25e4338d9e420d7fc3bc5ef9a4f8 Mon Sep 17 00:00:00 2001 From: Victor Hu Date: Tue, 12 Sep 2017 14:19:05 -0400 Subject: [PATCH 1/2] Resolve the issue where the rpmbuild directories are not created causing the build to fail. Pull in dependencies using the spec file --- xCAT-genesis-builder/buildrpm | 2 ++ xCAT-genesis-builder/xCAT-genesis-builder.spec | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/xCAT-genesis-builder/buildrpm b/xCAT-genesis-builder/buildrpm index ff350d901..580691050 100755 --- a/xCAT-genesis-builder/buildrpm +++ b/xCAT-genesis-builder/buildrpm @@ -13,6 +13,8 @@ DIR=`dirname $0` DIR=`readlink -f $DIR` BUILDARCH=`uname -m` +rpmdev-setuptree + #For Openpower if [ $BUILDARCH = "ppc64le" ]; then BUILDARCH="ppc64" diff --git a/xCAT-genesis-builder/xCAT-genesis-builder.spec b/xCAT-genesis-builder/xCAT-genesis-builder.spec index 4f85cde25..f8f645b41 100644 --- a/xCAT-genesis-builder/xCAT-genesis-builder.spec +++ b/xCAT-genesis-builder/xCAT-genesis-builder.spec @@ -4,7 +4,7 @@ Version: %{?version:%{version}}%{!?version:%(cat Version)} Release: %{?release:%{release}}%{!?release:%(cat Release)} Epoch: 1 AutoReq: false -Requires: ipmitool screen btrfs-progs lldpad rpm-build compat-libstdc++-33 mstflint xfsprogs nc reiserfs-utils +Requires: ipmitool screen btrfs-progs lldpad rpm-build mstflint xfsprogs nc rpmdevtools libstdc++-devel pciutils bridge-utils ntp iprutils psmisc mdadm bind-utils dosfstools usbutils libusbx Prefix: /opt/xcat AutoProv: false From fecc2298bba2b2ff7cc2b77fae2d637ba1281d5a Mon Sep 17 00:00:00 2001 From: Victor Hu Date: Wed, 13 Sep 2017 22:54:01 -0400 Subject: [PATCH 2/2] Make changes specific for Pegas --- xCAT-genesis-builder/buildrpm | 17 ++++++++++++----- xCAT-genesis-builder/xCAT-genesis-builder.spec | 2 +- 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/xCAT-genesis-builder/buildrpm b/xCAT-genesis-builder/buildrpm index 580691050..8253ce5d1 100755 --- a/xCAT-genesis-builder/buildrpm +++ b/xCAT-genesis-builder/buildrpm @@ -16,12 +16,13 @@ BUILDARCH=`uname -m` rpmdev-setuptree #For Openpower -if [ $BUILDARCH = "ppc64le" ]; then - BUILDARCH="ppc64" -fi - if [ -z $1 ]; then - HOSTOS="fedora26" + if [ $BUILDARCH = "ppc64le" ]; then + HOSTOS="Pegas1.0" + BUILDARCH="ppc64" + else + HOSTOS="fedora26" + fi fi # get the input files for dracut in the right place @@ -107,6 +108,12 @@ if [ "$HOSTOS" = "mcp" ]; then # For ppc64 platform, needs to remove some files, # # and some files are in different directories elif [ $BUILDARCH = "ppc64" ]; then + if [ "$HOSTOS" = "Pegas1.0" ]; then + sed -i 's/ mkreiserfs//' $DRACUTMODDIR/install + sed -i 's/ reiserfstune//' $DRACUTMODDIR/install + sed -i 's/ vconfig//' $DRACUTMODDIR/install + sed -i 's/ ntp-wait//' $DRACUTMODDIR/install + fi sed -i 's/ efibootmgr//' $DRACUTMODDIR/install sed -i 's/ dmidecode//' $DRACUTMODDIR/install sed -i 's/\/lib\/terminfo\/l\/linux/\/usr\/share\/terminfo\/l\/linux/g' $DRACUTMODDIR/install diff --git a/xCAT-genesis-builder/xCAT-genesis-builder.spec b/xCAT-genesis-builder/xCAT-genesis-builder.spec index f8f645b41..e1704f8fc 100644 --- a/xCAT-genesis-builder/xCAT-genesis-builder.spec +++ b/xCAT-genesis-builder/xCAT-genesis-builder.spec @@ -4,7 +4,7 @@ Version: %{?version:%{version}}%{!?version:%(cat Version)} Release: %{?release:%{release}}%{!?release:%(cat Release)} Epoch: 1 AutoReq: false -Requires: ipmitool screen btrfs-progs lldpad rpm-build mstflint xfsprogs nc rpmdevtools libstdc++-devel pciutils bridge-utils ntp iprutils psmisc mdadm bind-utils dosfstools usbutils libusbx +Requires: ipmitool screen btrfs-progs lldpad rpm-build mstflint xfsprogs nc rpmdevtools libstdc++-devel pciutils bridge-utils ntp ntp-perl iprutils psmisc mdadm bind-utils dosfstools usbutils libusbx Prefix: /opt/xcat AutoProv: false