Browse Source

Merge pull request #103 from josephbisch/fix-debian-i386

Fix debian i386
pull/104/head
Dev Random 5 years ago
parent
commit
ad77800219
1 changed files with 24 additions and 6 deletions
  1. 24
    6
      bin/make-base-vm

+ 24
- 6
bin/make-base-vm View File

@@ -94,8 +94,10 @@ fi

if [ $DISTRO = "debian" -a $ARCH = "amd64" ]; then
FLAVOUR=amd64
elif [ $DISTRO = "debian" -a $ARCH = "i386" ]; then
FLAVOUR=i686-pae
elif [ $DISTRO = "debian" -a $ARCH = "i386" -a \($SUITE = "squeeze" -o $SUITE = "lenny" -o $SUITE = "etch" -o $SUITE = "sarge" -o $SUITE = "woody" -o $SUITE = "potato" -o $SUITE = "slink" -o $SUITE = "hamm" -o $SUITE = "bo" -o $SUITE = "rex" -o $SUITE = "buzz"\) ]; then
FLAVOUR=686
elif [ $DISTRO = "debian" ]; then
FLAVOUR=686-pae
fi

LOCALE_PKG=language-pack-en
@@ -105,15 +107,31 @@ fi

addpkg=pciutils,build-essential,git-core,subversion,$LOCALE_PKG,wget,lsb-release

KERNEL_PKG=linux-image-generic
if [ $DISTRO = "debian" ]; then
KERNEL_PKG=
if [ $DISTRO = "ubuntu" ]; then
# Need comma at end to work around an issue with apt for Debian <= Wheezy regarding empty strings
#
# If we left the comma down below when adding KERNEL_PKG to addpkg, the fact that KERNEL_PKG is undefined
# if DISTRO is debian would result in two commas in a row (,,), which is interpreted by apt-get as the
# package with the name empty string (""). This triggers a bug with apt versions < 1.0.3. So by adding the
# comma to the end of KERNEL_PKG, we are including that comma if the distro is ubuntu (and therefore we do
# have a kernel package that needs to be installed). If KERNEL_PKG is not set (i.e. we have Debian as the
# distro), then we don't add that extra comma and therefore, we don't end up with two commas in a row.
#
# https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=744940
# http://anonscm.debian.org/cgit/apt/apt.git/commit/?h=1.0.3&id=d99854cac4065bc7b337815fb2116269d58dab73
KERNEL_PKG=linux-image-generic,
fi

GRUB_PKG=grub
if [ $DISTRO = "ubuntu" ]; then
GRUB_PKG=grub-pc
fi

if [ $LXC = "1" ]; then
addpkg=$addpkg,lxc
else
addpkg=$addpkg,$KERNEL_PKG,grub-pc,openssh-server
# Lack of comma after KERNEL_PKG is not a typo
addpkg=$addpkg,${KERNEL_PKG}${GRUB_PKG},openssh-server
fi

# Remove cron to work around vmbuilder issue when umounting /dev on target

Loading…
Cancel
Save