From 68b84702007460e1296e3b137560193f96bfecc1 Mon Sep 17 00:00:00 2001 From: Oliver Grawert Date: Tue, 7 Jul 2015 11:51:03 +0200 Subject: [PATCH] snappy: install libc6:i386 on amd64 images for multiarch support out of the box. (LP: #1444049) --- debian/changelog | 7 +++++++ .../hooks/12-add-foreign-libc6.chroot | 21 +++++++++++++++++++ 2 files changed, 28 insertions(+) create mode 100644 live-build/ubuntu-core/hooks/12-add-foreign-libc6.chroot diff --git a/debian/changelog b/debian/changelog index 388d4fae..6b0c6da6 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +livecd-rootfs (2.326) UNRELEASED; urgency=medium + + * snappy: install libc6:i386 on amd64 images for multiarch support out of + the box. (LP: #1444049) + + -- Oliver Grawert Tue, 07 Jul 2015 11:49:46 +0200 + livecd-rootfs (2.325) wily; urgency=medium * live-build/ubuntu-touch/includes.chroot/etc/lightdm/lightdm.conf.d/ diff --git a/live-build/ubuntu-core/hooks/12-add-foreign-libc6.chroot b/live-build/ubuntu-core/hooks/12-add-foreign-libc6.chroot new file mode 100644 index 00000000..5f86911d --- /dev/null +++ b/live-build/ubuntu-core/hooks/12-add-foreign-libc6.chroot @@ -0,0 +1,21 @@ +#!/bin/sh + +set -ex + +echo "I: Checking if we are amd64 and libc6:i386 should be installed" + +if [ "$(dpkg --print-architecture)" = "amd64" ]; then + echo "I: Enabling i386 multiarch support on amd64" + dpkg --add-architecture i386 + + apt-get -y update + + echo "I: Installing libc6:i386 in amd64 image" + apt-get -y install libc6:i386 + + echo "I: Removing /var/lib/apt/lists/*" + find /var/lib/apt/lists/ -type f | xargs rm -f + + echo "I: Removing /var/cache/apt/*.bin" + rm -f /var/cache/apt/*.bin +fi