From 3edb71445a9f578b7fb7d2d68f86bd67fa726cb2 Mon Sep 17 00:00:00 2001 From: Nikolaus Krismer <niko@krismer.de> Date: Mon, 17 Feb 2014 16:52:22 +0100 Subject: [PATCH] changes to work with 32bit OS --- etc/vagrant/bootstrap.sh | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/etc/vagrant/bootstrap.sh b/etc/vagrant/bootstrap.sh index 21c550a7..59d63006 100644 --- a/etc/vagrant/bootstrap.sh +++ b/etc/vagrant/bootstrap.sh @@ -86,11 +86,14 @@ POSTGIS_VERSION=2.1.1 POSTGRESQL_DATA_DIR=/var/lib/pgsql/9.3/data POSTGRESQL_HBA_CONF=$POSTGRESQL_DATA_DIR/pg_hba.conf POSTGRESQL_PKG_NAME=postgresql93 -POSTGRESQL_REPO_RPM=http://yum.postgresql.org/9.3/fedora/fedora-19-x86_64/pgdg-fedora93-9.3-1.noarch.rpm +POSTGRESQL_REPO_RPM_32=http://yum.postgresql.org/9.3/fedora/fedora-20-i386/pgdg-fedora93-9.3-1.noarch.rpm +POSTGRESQL_REPO_RPM_64=http://yum.postgresql.org/9.3/fedora/fedora-20-x86_64/pgdg-fedora93-9.3-1.noarch.rpm POSTGRESQL_SERVICE_NAME=postgresql-9.3 PGROUTING_VERSION=2.0.0 REPO_BASE_CONFIG=/etc/yum.repos.d/fedora-updates.repo REPO_RPMFORGE_CONFIG=/etc/yum.repos.d/rpmforge.repo +REPO_RPMFORGE_URL_32=http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.3-1.el6.rf.i686.rpm +REPO_RPMFORGE_URL_64=http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.3-1.el6.rf.x86_64.rpm TABLE_PREFIX_BZ=bz_ TABLE_PREFIX_IBK=ibk_ TEMPLATE_PROJECT_FILE=$NEXUS_PATH/de/krismer/CanIGet2/0.1/CanIGet2-0.1.war @@ -125,13 +128,27 @@ fi DISTRI=$(cat /etc/issue | head -n 1 | cut -d " " -f 1) if [ $DISTRI == "CentOS" ]; then - POSTGRESQL_REPO_RPM=http://yum.postgresql.org/9.3/redhat/rhel-6-x86_64/pgdg-centos93-9.3-1.noarch.rpm + POSTGRESQL_REPO_RPM_32=http://yum.postgresql.org/9.3/redhat/rhel-6-i386/pgdg-centos93-9.3-1.noarch.rpm + POSTGRESQL_REPO_RPM_64=http://yum.postgresql.org/9.3/redhat/rhel-6-x86_64/pgdg-centos93-9.3-1.noarch.rpm REPO_BASE_CONFIG=/etc/yum.repos.d/CentOS-Base.repo elif [ $DISTRI != "Fedora" ]; then echo "Unsupported OS. Only CentOS and Fedora are supported!" exit 1; fi +IS_64_BIT=false +if [ "x86_64" == $(uname -m) ]; then + IS_64_BIT=true +fi + +if $IS_64_BIT; then + POSTGRESQL_REPO_RPM=$POSTGRESQL_REPO_RPM_64 + REPO_RPMFORGE_URL=$REPO_RPMFORGE_URL_64 +else + POSTGRESQL_REPO_RPM=$POSTGRESQL_REPO_RPM_32 + REPO_RPMFORGE_URL=$REPO_RPMFORGE_URL_32 +fi + START=$(date +%s) TOMCAT_WEBAPP_DIR=$DEPLOY_DIR/$TOMCAT_NAME/webapps WORKING_DIR=`pwd` @@ -329,7 +346,7 @@ if $INSTALL_PGROUTING; then # cd $WORKSPACE_DIR echo "Installing rpmForge repository" - fn_download_newer $DOWNLOAD_DIR/rpmforge-repo.rpm http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.3-1.el6.rf.x86_64.rpm + fn_download_newer $DOWNLOAD_DIR/rpmforge-repo.rpm $REPO_RPMFORGE_URL yum -y localinstall $DOWNLOAD_DIR/rpmforge-repo.rpm > install_rpmforge_repo.log 2>&1 sed -i 's/enabled = 1/enabled = 0/' $REPO_RPMFORGE_CONFIG -- GitLab