From bbbf031932acaf15b4e2848c93e30cccb73c2c35 Mon Sep 17 00:00:00 2001 From: Pim van den Berg Date: Mon, 27 Jun 2016 14:07:22 +0200 Subject: [PATCH] add support for Debian 9 (stretch) --- Makefile | 2 +- README.md | 1 + common/download.sh | 3 ++- conf/debian-stretch | 1 + debian/install-extras.sh | 5 ++++- debian/vagrant-lxc-fixes.sh | 2 +- 6 files changed, 10 insertions(+), 4 deletions(-) create mode 120000 conf/debian-stretch diff --git a/Makefile b/Makefile index 9423473..d8b38cb 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ UBUNTU_BOXES= precise quantal raring saucy trusty utopic vivid wily xenial -DEBIAN_BOXES= squeeze wheezy sid jessie +DEBIAN_BOXES= squeeze wheezy jessie stretch sid CENTOS_BOXES= 6 FEDORA_BOXES= rawhide 23 22 21 20 19 TODAY=$(shell date -u +"%Y-%m-%d") diff --git a/README.md b/README.md index 35f3310..831dfd9 100644 --- a/README.md +++ b/README.md @@ -19,6 +19,7 @@ This repository contains a set of scripts for creating base boxes for usage with - Squeeze x86_64 - Wheezy x86_64 - Jessie x86_64 + - Stretch x86_64 - Sid x86_64 * Fedora - 19 x86_64 diff --git a/common/download.sh b/common/download.sh index f1ea18e..301fc4b 100755 --- a/common/download.sh +++ b/common/download.sh @@ -52,7 +52,8 @@ else fi if [ ${DISTRIBUTION} = 'fedora' ] ||\ [ ${DISTRIBUTION} = 'ubuntu' -a ${RELEASE} = 'wily' ] ||\ - [ ${DISTRIBUTION} = 'debian' -a ${RELEASE} = 'jessie' ] + [ ${DISTRIBUTION} = 'debian' -a ${RELEASE} = 'jessie' ] ||\ + [ ${DISTRIBUTION} = 'debian' -a ${RELEASE} = 'stretch' ] then # Improve systemd support: # - The fedora template does it but the fedora images from the download diff --git a/conf/debian-stretch b/conf/debian-stretch new file mode 120000 index 0000000..5c5c2ae --- /dev/null +++ b/conf/debian-stretch @@ -0,0 +1 @@ +debian-jessie \ No newline at end of file diff --git a/debian/install-extras.sh b/debian/install-extras.sh index 9f9d06e..55c7966 100755 --- a/debian/install-extras.sh +++ b/debian/install-extras.sh @@ -14,7 +14,7 @@ SECS=15 log "Sleeping for $SECS seconds..." sleep $SECS -PACKAGES=(vim curl wget man-db openssh-server bash-completion python-software-properties ca-certificates sudo) +PACKAGES=(vim curl wget man-db openssh-server bash-completion ca-certificates sudo) log "Installing additional packages: ${ADDPACKAGES}" PACKAGES+=" ${ADDPACKAGES}" @@ -25,6 +25,9 @@ fi if [ $RELEASE != 'raring' ] && [ $RELEASE != 'saucy' ] && [ $RELEASE != 'trusty' ] && [ $RELEASE != 'wily' ] ; then PACKAGES+=' nfs-common' fi +if [ $RELEASE != 'stretch' ] ; then + PACKAGES+=' python-software-properties' +fi utils.lxc.attach apt-get update utils.lxc.attach apt-get install ${PACKAGES[*]} -y --force-yes utils.lxc.attach apt-get upgrade -y --force-yes diff --git a/debian/vagrant-lxc-fixes.sh b/debian/vagrant-lxc-fixes.sh index 66204c0..1640126 100755 --- a/debian/vagrant-lxc-fixes.sh +++ b/debian/vagrant-lxc-fixes.sh @@ -30,7 +30,7 @@ if [ ${DISTRIBUTION} = 'debian' ]; then # Fixes for jessie, following the guide from # https://wiki.debian.org/LXC#Incompatibility_with_systemd - if [ "$RELEASE" = 'jessie' ]; then + if [ "$RELEASE" = 'jessie' ] || [ "$RELEASE" = 'stretch' ]; then # Reconfigure the LXC utils.lxc.attach /bin/cp \ /lib/systemd/system/getty@.service \