summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2016-03-21 19:12:55 +0000
committerGerrit Code Review <review@openstack.org>2016-03-21 19:12:55 +0000
commit218f6291836c78ac9baa8fbc6833927fc6acd0e3 (patch)
treee04a9d4971143b139c8ab6b881193707bf3f58b7
parent6b8ef9a85481dffa67807c7f7d9594e6ac9f990d (diff)
parent7a24ba85a9b3204485245030ff92f787a2e87a4e (diff)
downloadironic-python-agent-218f6291836c78ac9baa8fbc6833927fc6acd0e3.tar.gz
Merge "Fix tinyipa build uname, picking up hosts kernel"
-rwxr-xr-ximagebuild/tinyipa/build-tinyipa.sh5
-rwxr-xr-ximagebuild/tinyipa/build_files/fakeuname104
-rw-r--r--imagebuild/tinyipa/build_files/finalreqs.lst1
-rwxr-xr-ximagebuild/tinyipa/finalise-tinyipa.sh5
4 files changed, 113 insertions, 2 deletions
diff --git a/imagebuild/tinyipa/build-tinyipa.sh b/imagebuild/tinyipa/build-tinyipa.sh
index ebbf9a5f..6bd04e43 100755
--- a/imagebuild/tinyipa/build-tinyipa.sh
+++ b/imagebuild/tinyipa/build-tinyipa.sh
@@ -5,7 +5,7 @@ WORKDIR=$(readlink -f $0 | xargs dirname)
BUILDDIR="$WORKDIR/tinyipabuild"
BUILD_AND_INSTALL_TINYIPA=${BUILD_AND_INSTALL_TINYIPA:-false}
-CHROOT_PATH="/usr/local/sbin:/usr/local/bin:/apps/bin:/usr/sbin:/usr/bin:/sbin:/bin"
+CHROOT_PATH="/tmp/overides:/usr/local/sbin:/usr/local/bin:/apps/bin:/usr/sbin:/usr/bin:/sbin:/bin"
CHROOT_CMD="sudo chroot $BUILDDIR /usr/bin/env -i PATH=$CHROOT_PATH http_proxy=$http_proxy https_proxy=$https_proxy no_proxy=$no_proxy"
TC=1001
@@ -62,6 +62,9 @@ $CHROOT_CMD chmod a+rwx /etc/sysconfig/tcedir
$CHROOT_CMD touch /etc/sysconfig/tcuser
$CHROOT_CMD chmod a+rwx /etc/sysconfig/tcuser
+mkdir $BUILDDIR/tmp/overides
+cp $WORKDIR/build_files/fakeuname $BUILDDIR/tmp/overides/uname
+
while read line; do
sudo chroot --userspec=$TC:$STAFF $BUILDDIR /usr/bin/env -i PATH=$CHROOT_PATH http_proxy=$http_proxy https_proxy=$https_proxy no_proxy=$no_proxy tce-load -wci $line
done < $WORKDIR/build_files/buildreqs.lst
diff --git a/imagebuild/tinyipa/build_files/fakeuname b/imagebuild/tinyipa/build_files/fakeuname
new file mode 100755
index 00000000..a6e31fdd
--- /dev/null
+++ b/imagebuild/tinyipa/build_files/fakeuname
@@ -0,0 +1,104 @@
+#!/bin/sh
+S="Linux"
+N="box"
+R="3.16.6-tinycore64"
+P="unknown"
+V="#777 SMP (2016-02-29)"
+M="x86_64"
+I="unknown"
+O="GNU/Linux"
+
+OPT_A=false
+OPT_S=false
+OPT_N=false
+OPT_R=false
+OPT_P=false
+OPT_V=false
+OPT_M=false
+OPT_I=false
+OPT_O=false
+
+if [ -z "$1" ]; then
+ echo "-ASNRPVMIO"
+ exit 1
+fi
+
+while :; do
+ case $1 in
+ -a)
+ OPT_A=true
+ shift
+ ;;
+ -s)
+ OPT_S=true
+ shift
+ ;;
+ -n)
+ OPT_N=true
+ shift
+ ;;
+ -r)
+ OPT_R=true
+ shift
+ ;;
+ -p)
+ OPT_P=true
+ shift
+ ;;
+ -v)
+ OPT_V=true
+ shift
+ ;;
+ -m)
+ OPT_M=true
+ shift
+ ;;
+ -i)
+ OPT_I=true
+ shift
+ ;;
+ -o)
+ OPT_O=true
+ shift
+ ;;
+ *)
+ if [ ! -z "$1" ]; then
+ echo "uname -asnrpvmio"
+ exit 1
+ fi
+ break
+ ;;
+ esac
+done
+
+if $OPT_A; then
+ echo "$S $N $R $V $M $O"
+ exit 0
+fi
+
+string=''
+if $OPT_S; then
+ string="$string $S"
+fi
+if $OPT_N; then
+ string="$string $N"
+fi
+if $OPT_R; then
+ string="$string $R"
+fi
+if $OPT_P; then
+ string="$string $P"
+fi
+if $OPT_V; then
+ string="$string $V"
+fi
+if $OPT_M; then
+ string="$string $M"
+fi
+if $OPT_I; then
+ string="$string $I"
+fi
+if $OPT_O; then
+ string="$string $O"
+fi
+echo $string
diff --git a/imagebuild/tinyipa/build_files/finalreqs.lst b/imagebuild/tinyipa/build_files/finalreqs.lst
index 20aec000..e9356cb7 100644
--- a/imagebuild/tinyipa/build_files/finalreqs.lst
+++ b/imagebuild/tinyipa/build_files/finalreqs.lst
@@ -10,3 +10,4 @@ scsi-3.16.6-tinycore64.tcz
udev-lib.tcz
util-linux.tcz
glib2.tcz
+iproute2.tcz
diff --git a/imagebuild/tinyipa/finalise-tinyipa.sh b/imagebuild/tinyipa/finalise-tinyipa.sh
index 5958b78f..d789d191 100755
--- a/imagebuild/tinyipa/finalise-tinyipa.sh
+++ b/imagebuild/tinyipa/finalise-tinyipa.sh
@@ -9,7 +9,7 @@ BUILD_AND_INSTALL_TINYIPA=${BUILD_AND_INSTALL_TINYIPA:-false}
TC=1001
STAFF=50
-CHROOT_PATH="/usr/local/sbin:/usr/local/bin:/apps/bin:/usr/sbin:/usr/bin:/sbin:/bin"
+CHROOT_PATH="/tmp/overides:/usr/local/sbin:/usr/local/bin:/apps/bin:/usr/sbin:/usr/bin:/sbin:/bin"
CHROOT_CMD="sudo chroot $FINALDIR /usr/bin/env -i PATH=$CHROOT_PATH http_proxy=$http_proxy https_proxy=$https_proxy no_proxy=$no_proxy"
TC_CHROOT_CMD="sudo chroot --userspec=$TC:$STAFF $FINALDIR /usr/bin/env -i PATH=$CHROOT_PATH http_proxy=$http_proxy https_proxy=$https_proxy no_proxy=$no_proxy"
@@ -55,6 +55,9 @@ cp $WORKDIR/build_files/qemu-utils.* $FINALDIR/tmp/builtin/optional
# Mount /proc for chroot commands
sudo mount --bind /proc $FINALDIR/proc
+mkdir $FINALDIR/tmp/overides
+cp $WORKDIR/build_files/fakeuname $FINALDIR/tmp/overides/uname
+
while read line; do
$TC_CHROOT_CMD tce-load -wi $line
done < $WORKDIR/build_files/finalreqs.lst