Module: check_mk
Branch: master
Commit: 05c1bb5ee71c26d32d4f7d13ce44d9ce7306431c
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=05c1bb5ee71c26…
Author: Jukka Aro <ja(a)mathias-kettner.de>
Date: Fri Feb 2 13:46:36 2018 +0100
Use bionic (Ubuntu 18.04) for Windows agent chroot
bionic provides mingw-w64 5.0.3-1 that is based on gcc 7.2.0 which
supports C++17
---
agents/windows/chroot_version | 2 +-
agents/windows/make-chroot | 15 ++++++++++++---
2 files changed, 13 insertions(+), 4 deletions(-)
diff --git a/agents/windows/chroot_version b/agents/windows/chroot_version
index 45a4fb7..ec63514 100644
--- a/agents/windows/chroot_version
+++ b/agents/windows/chroot_version
@@ -1 +1 @@
-8
+9
diff --git a/agents/windows/make-chroot b/agents/windows/make-chroot
index 1214319..e7a5d15 100755
--- a/agents/windows/make-chroot
+++ b/agents/windows/make-chroot
@@ -4,7 +4,7 @@
set -e
-DISTRO=artful
+DISTRO=bionic
MIRROR=http://de.archive.ubuntu.com/ubuntu
export HOSTNAME=cmk-windows-agent-chroot
@@ -112,7 +112,10 @@ package_names=(
python2.7
ssh-askpass
uuid-dev
- wine-stable
+# TODO: Need to install wine separately in order to use --force-overwrite, see
+#
https://bugs.launchpad.net/ubuntu/+source/sane-backends/+bug/1725928/
+# Cannot pass --force-overwrite through debootstrap.
+# wine-stable
)
packages=$(IFS=,; echo "${package_names[*]}")
@@ -122,6 +125,12 @@ debootstrap \
--include="$packages" \
--arch amd64 $DISTRO $CHROOT_PATH $MIRROR
+# Cope with the known bug with libsane1 that wine depends on.
+#
https://bugs.launchpad.net/ubuntu/+source/sane-backends/+bug/1725928/
+# Need to use --force-overwrite with apt-get. This option cannot be passed
+# through debootstrap.
+$SCRIPT_DIR/do-chroot 'apt-get -y -o Dpkg::Options::="--force-overwrite"
install wine-stable'
+
# Need to be installed for installation.
cat <<EOF > $CHROOT_PATH/etc/fstab
# created by make-chroot
@@ -161,7 +170,7 @@ fi
sed -ri 's/^_apt:x:[0-9]+:/_apt:x:0:/g' $CHROOT_PATH/etc/passwd
# We need to enable 32bit Wine
-$SCRIPT_DIR/do-chroot "dpkg --add-architecture i386 && apt-get update
&& apt-get -y install wine32"
+$SCRIPT_DIR/do-chroot 'dpkg --add-architecture i386 && apt-get update
&& apt-get -o Dpkg::Options::="--force-overwrite" -y install
wine32'
# Build Google Test and Google Mock
$SCRIPT_DIR/do-chroot "$CHROOT_BUILD_DIR/agents/windows/test/build-googletest"