X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/103ba7977f2cae8feb805225d3331d96b124e3ad..0546ebb7b0ad3cd9ee904fa988908dde676d9596:/script/vagrant/setup/provision.sh diff --git a/script/vagrant/setup/provision.sh b/script/vagrant/setup/provision.sh index 47534b84d..912a62958 100644 --- a/script/vagrant/setup/provision.sh +++ b/script/vagrant/setup/provision.sh @@ -9,16 +9,6 @@ export LC_ALL=en_GB.utf8 # make sure we have up-to-date packages apt-get update -## vagrant grub-pc fix from: https://gist.github.com/jrnickell/6289943 -# parameters -echo "grub-pc grub-pc/kopt_extracted boolean true" | debconf-set-selections -echo "grub-pc grub2/linux_cmdline string" | debconf-set-selections -echo "grub-pc grub-pc/install_devices multiselect /dev/sda" | debconf-set-selections -echo "grub-pc grub-pc/install_devices_failed_upgrade boolean true" | debconf-set-selections -echo "grub-pc grub-pc/install_devices_disks_changed multiselect /dev/sda" | debconf-set-selections -# vagrant grub fix -dpkg-reconfigure -f noninteractive grub-pc - # upgrade all packages apt-get upgrade -y @@ -47,8 +37,9 @@ fi # build and set up postgres extensions pushd db/functions sudo -u vagrant make -sudo -u vagrant psql openstreetmap -c "drop function if exists maptile_for_point(int8, int8, int4)" -sudo -u vagrant psql openstreetmap -c "CREATE FUNCTION maptile_for_point(int8, int8, int4) RETURNS int4 AS '/srv/openstreetmap-website/db/functions/libpgosm.so', 'maptile_for_point' LANGUAGE C STRICT" +sudo -u vagrant psql openstreetmap -c "CREATE OR REPLACE FUNCTION maptile_for_point(int8, int8, int4) RETURNS int4 AS '/srv/openstreetmap-website/db/functions/libpgosm.so', 'maptile_for_point' LANGUAGE C STRICT" +sudo -u vagrant psql openstreetmap -c "CREATE OR REPLACE FUNCTION tile_for_point(int4, int4) RETURNS int8 AS '/srv/openstreetmap-website/db/functions/libpgosm.so', 'tile_for_point' LANGUAGE C STRICT" +sudo -u vagrant psql openstreetmap -c "CREATE OR REPLACE FUNCTION xid_to_int4(xid) RETURNS int4 AS '/srv/openstreetmap-website/db/functions/libpgosm.so', 'xid_to_int4' LANGUAGE C STRICT" popd # set up sample configs if [ ! -f config/database.yml ]; then