Add script to install missing tinyipa dependencies

Squashfs-tools is missing when building the tinyipa image during the
post job, this patch adds a new script to the tinyipa build process that
ensures that missing dependencies get installed as part of the build
process. It also replaces a use of realpath it build-iso.sh where it
should be readlink to ensure that we don't need that dependency.

Change-Id: I9a60dcf42f6a9ba624aa347f0f375bb40432ef77
Closes-Bug: #1567981
This commit is contained in:
Sam Betts 2016-04-08 15:45:35 +01:00
parent 2d8e139f03
commit 4230a3ba6e
5 changed files with 29 additions and 3 deletions

View File

@ -1,6 +1,10 @@
default: build finalise
.PHONY: default all dependencies build finalise iso clean clean_build clean_iso
default: dependencies build finalise
all: build finalise iso
all: dependencies build finalise iso
dependencies:
./install-deps.sh
build:
./build-tinyipa.sh

View File

@ -1,7 +1,7 @@
#!/bin/sh
set -ex
WORKDIR=$(realpath $0 | xargs dirname)
WORKDIR=$(readlink -f $0 | xargs dirname)
cd $WORKDIR/build_files
wget -N https://www.kernel.org/pub/linux/utils/boot/syslinux/syslinux-4.06.tar.gz && tar zxf syslinux-4.06.tar.gz

View File

@ -10,6 +10,9 @@ CHROOT_CMD="sudo chroot $BUILDDIR /usr/bin/env -i PATH=$CHROOT_PATH http_proxy=$
TC=1001
STAFF=50
echo "Building tinyipa:"
# Ensure we have an extended sudo to prevent the need to enter a password over
# and over again.
sudo -v

View File

@ -13,6 +13,8 @@ CHROOT_PATH="/tmp/overides:/usr/local/sbin:/usr/local/bin:/apps/bin:/usr/sbin:/u
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"
echo "Finalising tinyipa:"
sudo -v
if [ -d "$FINALDIR" ]; then

View File

@ -0,0 +1,17 @@
#!/bin/bash
PACKAGES="wget python-pip unzip sudo gawk squashfs-tools"
echo "Installing dependencies:"
if [ -x "/usr/bin/apt-get" ]; then
sudo -E apt-get update
sudo -E apt-get install -y $PACKAGES
elif [ -x "/usr/bin/dnf" ]; then
sudo -E dnf install -y $PACKAGES
elif [ -x "/usr/bin/yum" ]; then
sudo -E yum install -y $PACKAGES
else
echo "No supported package manager installed on system. Supported: apt, yum, dnf"
exit 1
fi