From eb25928674cedd8616ac0e5fce4e5299487b084e Mon Sep 17 00:00:00 2001 From: Greg Price Date: Mon, 22 Jan 2018 16:28:50 -0800 Subject: [PATCH] test-install: Allow the installer to move the install tree aside. When the install script is successful, one of the final things it wants to do is to move the tree that Zulip was installed from into the deployments directory. It can't do that, at least not in a naive way with `mv`, if the tree is actually a mount point. So, stick the tree inside some other directory that we create just for the purpose of being the mount point and containing the install tree. --- tools/test-install/install | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/test-install/install b/tools/test-install/install index 93ae541e18..15530b9ba7 100755 --- a/tools/test-install/install +++ b/tools/test-install/install @@ -44,13 +44,13 @@ if [ -d "$INSTALLER" ]; then installer_dir="$(readlink -f $INSTALLER)" else installer_dir="$(mktemp -d --tmpdir zulip-server-XXXXX)" - tar -xf "$INSTALLER" -C "$installer_dir" --strip-components=1 + tar -xf "$INSTALLER" -C "$installer_dir" --transform='s,^[^/]*,zulip-server,' fi mkdir -p /srv/zulip/test-install/pip-cache lxc-copy --ephemeral --keepdata -n "$BASE_CONTAINER_NAME" -N "$CONTAINER_NAME" \ - -m bind="$installer_dir":/tmp/zulip-server:ro,bind=/srv/zulip/test-install/pip-cache:/root/.cache/pip + -m overlay="$installer_dir":/tmp/src/,bind=/srv/zulip/test-install/pip-cache:/root/.cache/pip run() { lxc-attach -n "$CONTAINER_NAME" -- "$@" @@ -71,7 +71,7 @@ if [ -z "ok" ]; then exit 1 fi -run /tmp/zulip-server/scripts/setup/install --snakeoil-cert "${INSTALLER_ARGS[@]}" +run /tmp/src/zulip-server/scripts/setup/install --snakeoil-cert "${INSTALLER_ARGS[@]}" # TODO install ends as a zombie (workaround: `sudo ps aux | grep lxc-attach`, kill that) # TODO settings.py, initialize-database, create realm