aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CHANGELOG.md1
-rw-r--r--Vagrantfile2
-rwxr-xr-xbin/install_packages13
-rwxr-xr-xscript/bootstrap10
4 files changed, 25 insertions, 1 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 8d7a5714b..437f48656 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -84,6 +84,7 @@
- Add configuration for setting Content-Security-Policy header.
- Add banner on staging website/emails, and STAGING_FLAGS option to hide it.
- Do not hard code site name in database fixture.
+ - Ensure OS dependencies are kept updated in development environments.
- Open311 improvements:
- Support use of 'private' service definition <keywords> to mark
reports made in that category private. #2488
diff --git a/Vagrantfile b/Vagrantfile
index 6ac85c163..17eebe4b5 100644
--- a/Vagrantfile
+++ b/Vagrantfile
@@ -105,7 +105,7 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
# When using the mySociety box, just mount the local perl modules and run `script/update`
# For any other box, just run the full setup process.
- if "#{baseBox}" == "mysociety/fixmystreet"
+ if "#{baseBox}" == "mysociety/fixmystreet" || "#{baseBox}" == "fms-local"
config.vm.provision "shell", run: "always", inline: $mount_modules
config.vm.provision "shell", run: "always", inline: $update
else
diff --git a/bin/install_packages b/bin/install_packages
new file mode 100755
index 000000000..7b4bfd8e1
--- /dev/null
+++ b/bin/install_packages
@@ -0,0 +1,13 @@
+#!/bin/bash
+set -e
+
+cd "$(dirname "${BASH_SOURCE[0]}")/.."
+
+PACKAGE_FILE=conf/packages
+
+[ -n "$1" ] && PACKAGE_FILE="conf/packages.${1}"
+
+apt-get update
+
+grep -v ^# $PACKAGE_FILE | grep -v ^$ | xargs apt-get install -qq -y
+
diff --git a/script/bootstrap b/script/bootstrap
index dfebd7449..5345b163e 100755
--- a/script/bootstrap
+++ b/script/bootstrap
@@ -4,4 +4,14 @@ set -e
cd "$(dirname "$0")/.."
git submodule --quiet update --init --recursive --rebase
+
+# Let's see if we can't work out where we might be running.
+if cut -d/ -f2 /proc/self/cgroup | sort -u | grep -q docker ; then
+ # Docker
+ sudo bin/install_packages docker
+else
+ # Fallback
+ sudo bin/install_packages generic
+fi
+
bin/install_perl_modules