From 7037df1168ecf52122aa3a205f9786bb48644acd Mon Sep 17 00:00:00 2001 From: Martin Dahse Date: Sun, 27 Dec 2015 16:34:32 +0100 Subject: [PATCH] add additional package installation --- .gitignore | 1 + README.md | 9 +++++++++ debian/install-extras.sh | 5 ++++- mk-debian.sh | 1 + 4 files changed, 15 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 517a3eb..c4400fa 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ /log /output +*_packages diff --git a/README.md b/README.md index e5186e8..81c9cb4 100644 --- a/README.md +++ b/README.md @@ -56,6 +56,15 @@ Babushka pre-installed. When using ANSIBLE=1, an optional ANSIBLE_VERSION parameter may be passed that will specify which version of ansible to install. By default it will install the latest Ansible. +```sh +ADDPACKAGES="aptitude htop" \ +make trusty +``` + +Will build a Ubuntu Trusty x86_64 box with aptitude and htop as additional +packages pre-installed. You can also specify the packages in a file +trusty_packages. + ## Pre built base boxes _**NOTE:** None of the base boxes below have a provisioner pre-installed_ diff --git a/debian/install-extras.sh b/debian/install-extras.sh index 2f36c1c..d48ebb6 100755 --- a/debian/install-extras.sh +++ b/debian/install-extras.sh @@ -14,8 +14,11 @@ SECS=15 log "Sleeping for $SECS seconds..." sleep $SECS -# TODO: Support for appending to this list from outside PACKAGES=(vim curl wget man-db openssh-server bash-completion python-software-properties ca-certificates sudo) + +log "Installing additional packages: ${ADDPACKAGES}" +PACKAGES+=" ${ADDPACKAGES}" + if [ $DISTRIBUTION = 'ubuntu' ]; then PACKAGES+=' software-properties-common' fi diff --git a/mk-debian.sh b/mk-debian.sh index 75f6323..0a8c189 100755 --- a/mk-debian.sh +++ b/mk-debian.sh @@ -13,6 +13,7 @@ export RELEASE=$2 export ARCH=$3 export CONTAINER=$4 export PACKAGE=$5 +export ADDPACKAGES=${ADDPACKAGES-$(cat ${RELEASE}_packages | tr "\n" " ")} export ROOTFS="/var/lib/lxc/${CONTAINER}/rootfs" export WORKING_DIR="/tmp/${CONTAINER}" export NOW=$(date -u)