From 991058ebf9d81d567a6f662f1c2e2e8827dcc60a Mon Sep 17 00:00:00 2001 From: Andreas Baumann Date: Sat, 13 Dec 2014 19:53:34 +0100 Subject: tryied to make an architecture switch for building the rhel6 image --- examples/build_gold_image/biruda.conf | 2 +- examples/build_gold_image/build.sh | 65 ----------------------- examples/build_gold_image/build_centos6.sh | 85 ++++++++++++++++++++++++++++++ 3 files changed, 86 insertions(+), 66 deletions(-) delete mode 100644 examples/build_gold_image/build.sh create mode 100755 examples/build_gold_image/build_centos6.sh (limited to 'examples') diff --git a/examples/build_gold_image/biruda.conf b/examples/build_gold_image/biruda.conf index f131699..1391ee7 100644 --- a/examples/build_gold_image/biruda.conf +++ b/examples/build_gold_image/biruda.conf @@ -14,7 +14,7 @@ worker example_build_gold execution = direct - command = "/bin/sh ./build.sh" + command = "/bin/sh ./build.sh x86_64" } worker example_run diff --git a/examples/build_gold_image/build.sh b/examples/build_gold_image/build.sh deleted file mode 100644 index f0e7c35..0000000 --- a/examples/build_gold_image/build.sh +++ /dev/null @@ -1,65 +0,0 @@ -#!/bin/sh - -# Centos 6 (64-bit) - -export PATH=/bin:/sbin:/usr/bin:/usr/sbin:${PATH} - -CHROOT_DIR=rhel6-x64 - -rm -rf $CHROOT_DIR - -mkdir $CHROOT_DIR - -mkdir -p $CHROOT_DIR/var/lib/rpm - -rpm -v --rebuilddb --root=`pwd`/$CHROOT_DIR - -wget http://mirror.centos.org/centos/6.5/os/x86_64/Packages/centos-release-6-5.el6.centos.11.1.x86_64.rpm - -rpm -v -i --root=`pwd`/$CHROOT_DIR --nodeps centos-release-6-5.el6.centos.11.1.x86_64.rpm - -rm -f centos-release-6-5.el6.centos.11.1.x86_64.rpm - -wget http://mirror.centos.org/centos/6.5/os/x86_64/RPM-GPG-KEY-CentOS-6 - -rpm -v --root=`pwd`/$CHROOT_DIR --import RPM-GPG-KEY-CentOS-6 - -rm RPM-GPG-KEY-CentOS-6 - -yum --installroot=`pwd`/$CHROOT_DIR install -y yum -yum --installroot=`pwd`/$CHROOT_DIR install -y coreutils procps net-tools wget - -# rebuild the RPM database with the rpm inside the chroot -chroot $CHROOT_DIR /bin/rpm -v --rebuilddb - -mknod -m 666 $CHROOT_DIR/dev/null c 1 3 -mknod -m 666 $CHROOT_DIR/dev/zero c 1 5 -mknod -m 666 $CHROOT_DIR/dev/random c 1 8 -mknod -m 666 $CHROOT_DIR/dev/urandom c 1 9 -mknod -m 666 $CHROOT_DIR/dev/tty c 5 0 - -cp /etc/resolv.conf $CHROOT_DIR/etc/ - -cp $CHROOT_DIR/etc/skel/.bashrc $CHROOT_DIR/root -cp $CHROOT_DIR/etc/skel/.bash_profile $CHROOT_DIR/root -cp $CHROOT_DIR/etc/skel/.bash_logout $CHROOT_DIR/root - -cat >> $CHROOT_DIR/root/.bash_profile <> $CHROOT_DIR/root/.bash_profile <