[mapguide-commits] r8038 - in trunk/Tools/Vagrant: . centos centos/x64 centos/x86 scripts support ubuntu ubuntu/x64 ubuntu/x86
svn_mapguide at osgeo.org
svn_mapguide at osgeo.org
Sun Apr 13 18:00:57 PDT 2014
Author: jng
Date: 2014-04-13 18:00:57 -0700 (Sun, 13 Apr 2014)
New Revision: 8038
Added:
trunk/Tools/Vagrant/centos/x64/
trunk/Tools/Vagrant/clean.bat
trunk/Tools/Vagrant/support/
trunk/Tools/Vagrant/support/apt_list.txt
trunk/Tools/Vagrant/support/vagrant_base_box_prep.sh
trunk/Tools/Vagrant/support/yum_list.txt
trunk/Tools/Vagrant/ubuntu/x64/
Removed:
trunk/Tools/Vagrant/ubuntu/x64/readme.txt
trunk/Tools/Vagrant/ubuntu/x86/readme.txt
Modified:
trunk/Tools/Vagrant/build.bat
trunk/Tools/Vagrant/centos/x64/Vagrantfile
trunk/Tools/Vagrant/centos/x86/Vagrantfile
trunk/Tools/Vagrant/scripts/build.sh
trunk/Tools/Vagrant/scripts/build_fdo.sh
trunk/Tools/Vagrant/scripts/build_oem_ubuntu.sh
trunk/Tools/Vagrant/ubuntu/x64/Vagrantfile
trunk/Tools/Vagrant/ubuntu/x86/Vagrantfile
Log:
Vagrant build updates:
- Document required libs to be installed for Ubuntu and CentOS VMs
- Add CPU switches to main build scripts
- Let build.bat selectively build MapGuide for certain VMs and to also selectively tear down certain VMs after completion.
- Add configurable unit test build step for x86 VMs
Modified: trunk/Tools/Vagrant/build.bat
===================================================================
--- trunk/Tools/Vagrant/build.bat 2014-04-12 18:11:40 UTC (rev 8037)
+++ trunk/Tools/Vagrant/build.bat 2014-04-14 01:00:57 UTC (rev 8038)
@@ -1,30 +1,113 @@
@echo off
+SET BUILD_UBUNTU_32=1
+SET BUILD_UBUNTU_64=0
+SET BUILD_CENTOS_32=1
+SET BUILD_CENTOS_64=0
+SET TEARDOWN_UBUNTU_32=1
+SET TEARDOWN_UBUNTU_64=0
+SET TEARDOWN_CENTOS_32=1
+SET TEARDOWN_CENTOS_64=0
SET ROOT=%CD%
SET COMPONENT=
+:prepare
echo [build]: Prepare scripts for provisioning
-pushd scripts
-copy /Y *.* %ROOT%\centos\x86
-copy /Y *.* %ROOT%\ubuntu\x86
-popd
+if %BUILD_CENTOS_32% == 1 copy /Y scripts\*.* %ROOT%\centos\x86
+if %BUILD_UBUNTU_32% == 1 copy /Y scripts\*.* %ROOT%\ubuntu\x86
+if %BUILD_CENTOS_64% == 1 copy /Y scripts\*.* %ROOT%\centos\x64
+if %BUILD_UBUNTU_64% == 1 copy /Y scripts\*.* %ROOT%\ubuntu\x64
+:check_ubuntu_32
+echo [build]: Checking if we're building for Ubuntu 32-bit
+if %BUILD_UBUNTU_32% == 1 goto build_ubuntu_32
+goto check_centos_32
+:build_ubuntu_32
pushd ubuntu\x86
-SET COMPONENT=Ubuntu Build
-echo [build]: MapGuide Ubuntu build
+SET COMPONENT=Ubuntu Build 32-bit
+echo [build]: MapGuide Ubuntu build 32-bit
if exist build rd /S /Q build
call vagrant up
echo [build]: vagrant returned %errorlevel%
if "%errorlevel%"=="1" goto error
+if %TEARDOWN_UBUNTU_32% == 1 (
+ echo [build]: Tearing down Ubuntu 32 VM
+ goto destroy_ubuntu_32
+) else (
+ echo [build]: Not tearing down Ubuntu 32 VM
+ goto ubuntu_32_done
+)
+:destroy_ubuntu_32
call vagrant destroy -f
+:ubuntu_32_done
popd
+:check_centos_32
+echo [build]: Checking if we're building for CentOS 32-bit
+if %BUILD_CENTOS_32% == 1 goto build_centos_32
+goto check_ubuntu_64
+:build_centos_32
pushd centos\x86
-SET COMPONENT=CentOS Build
-echo [build]: MapGuide CentOS build
+SET COMPONENT=CentOS Build 32-bit
+echo [build]: MapGuide CentOS build 32-bit
if exist build rd /S /Q build
call vagrant up
echo [build]: vagrant returned %errorlevel%
if "%errorlevel%"=="1" goto error
+if %TEARDOWN_CENTOS_32% == 1 (
+ echo [build]: Tearing down CentOS 32 VM
+ goto destroy_centos_32
+) else (
+ echo [build]: Not tearing down CentOS 32 VM
+ goto centos_32_done
+)
+:destroy_centos_32
call vagrant destroy -f
+:centos_32_done
popd
+:check_ubuntu_64
+echo [build]: Checking if we're building for Ubuntu 64-bit
+if %BUILD_UBUNTU_64% == 1 goto build_ubuntu_64
+goto check_centos_64
+:build_ubuntu_64
+pushd ubuntu\x64
+SET COMPONENT=Ubuntu Build 64-bit
+echo [build]: MapGuide Ubuntu build 64-bit
+if exist build rd /S /Q build
+call vagrant up
+echo [build]: vagrant returned %errorlevel%
+if "%errorlevel%"=="1" goto error
+if %TEARDOWN_UBUNTU_64% == 1 (
+ echo [build]: Tearing down Ubuntu 64 VM
+ goto destroy_ubuntu_64
+) else (
+ echo [build]: Not tearing down Ubuntu 64 VM
+ goto ubuntu_64_done
+)
+:destroy_ubuntu_64
+call vagrant destroy -f
+:ubuntu_64_done
+popd
+:check_centos_64
+echo [build]: Checking if we're building for CentOS 64-bit
+if %BUILD_CENTOS_64% == 1 goto build_centos_64
goto quit
+:build_centos_64
+pushd centos\x64
+SET COMPONENT=CentOS Build 64-bit
+echo [build]: MapGuide CentOS build 64-bit
+if exist build rd /S /Q build
+call vagrant up
+echo [build]: vagrant returned %errorlevel%
+if "%errorlevel%"=="1" goto error
+if %TEARDOWN_CENTOS_64% == 1 (
+ echo [build]: Tearing down CentOS 64 VM
+ goto destroy_centos_64
+) else (
+ echo [build]: Not tearing down CentOS 64 VM
+ goto centos_64_done
+)
+:destroy_centos_64
+call vagrant destroy -f
+:centos_64_done
+popd
+goto quit
:error
echo [ERROR]: There was an error building the component %COMPONENT%
exit /B 1
Modified: trunk/Tools/Vagrant/centos/x64/Vagrantfile
===================================================================
--- trunk/Tools/Vagrant/centos/x86/Vagrantfile 2014-03-02 15:54:45 UTC (rev 7985)
+++ trunk/Tools/Vagrant/centos/x64/Vagrantfile 2014-04-14 01:00:57 UTC (rev 8038)
@@ -10,7 +10,7 @@
# please see the online documentation at vagrantup.com.
# Every Vagrant virtual environment requires a box to build off of.
- config.vm.box = "vagrant-centos64-x86"
+ config.vm.box = "vagrant-centos64-x64"
# The url from where the 'config.vm.box' box will be fetched if it
# doesn't already exist on the user's system.
@@ -127,11 +127,11 @@
fi
}
if hash scons 2>/dev/null; then
-echo [provision]: We have scons
+ echo [provision]: We have scons
else
-echo [provision]: We do not have scons. Installing it
-sudo rpm -Uvh /mapguide_sources/scons-2.3.0-1.noarch.rpm
-check_build
+ echo [provision]: We do not have scons. Installing it
+ sudo rpm -Uvh /mapguide_sources/scons-2.3.0-1.noarch.rpm
+ check_build
fi
cd ~
echo [provision]: Home directory is `pwd`
@@ -157,6 +157,8 @@
then
HAVE_MAPGUIDE=1
fi
+echo [provision]: Checking all tools and libs are in place
+yum install -y gcc-* gd-* automake bison byacc flex doxygen expat expat-devel libtool libjpeg-devel libpng libpng-devel libxml2 libxml2-devel openssl curl curl-devel libxslt libxslt-devel subversion java-1.7.0-openjdk java-1.7.0-openjdk-devel ant dos2unix openssh-server openldap-devel alsa-lib-devel pcre-devel unixODBC-devel libcom_err-devel krb5-devel openssl-devel mysql-devel postgresql-devel unixODBC
echo [provision]: Copying shell scripts
mkdir -p $SCRIPT_ROOT
cp -f /vagrant/*.sh $SCRIPT_ROOT
@@ -165,6 +167,9 @@
cd $SCRIPT_ROOT
sed -i 's/UBUNTU=1/UBUNTU=0/g' build.sh
sed -i 's/UBUNTU=1/UBUNTU=0/g' build_fdo.sh
+sed -i 's/FDO_PLATFORM=32/FDO_PLATFORM=64/g' build_fdo.sh
+sed -i 's/FDO_CPU=x86/FDO_CPU=x64/g' build_fdo.sh
+sed -i 's/FDO_BUILD_CPU=i386/FDO_BUILD_CPU=amd64/g' build_fdo.sh
if [ $HAVE_FDO_LIBS -eq 0 ];
then
echo [provision]: Extracting FDO thirdparty libs
@@ -192,14 +197,17 @@
check_build
cd ~/scripts
BUILD_COMPONENT="FDO"
-sudo -E ./build_fdo.sh
+sudo -E ./build_fdo.sh 2>&1 | tee ~/fdo_build.log
check_build
BUILD_COMPONENT="MapGuide"
-sudo -E ./build.sh
+sudo -E ./build.sh 2>&1 | tee ~/mapguide_build.log
check_build
-MG_REV=`svn info $MG_SRC | perl revnum.pl`
+echo [provision]: Unit test MapGuide
+cd $SCRIPT_ROOT/mgdev
+sudo make check 2>&1 | tee ~/mapguide_unit_test.log
cd $SCRIPT_ROOT
sudo mkdir -p /vagrant/build
+sudo mv -f ~/*.log /vagrant/build
sudo cp bin/*.tar.gz /vagrant/build
sudo cp fdosdk*.tar.gz /vagrant/build
if [ ! -d /mapguide_sources/updated ]; then
Modified: trunk/Tools/Vagrant/centos/x86/Vagrantfile
===================================================================
--- trunk/Tools/Vagrant/centos/x86/Vagrantfile 2014-04-12 18:11:40 UTC (rev 8037)
+++ trunk/Tools/Vagrant/centos/x86/Vagrantfile 2014-04-14 01:00:57 UTC (rev 8038)
@@ -127,11 +127,11 @@
fi
}
if hash scons 2>/dev/null; then
-echo [provision]: We have scons
+ echo [provision]: We have scons
else
-echo [provision]: We do not have scons. Installing it
-sudo rpm -Uvh /mapguide_sources/scons-2.3.0-1.noarch.rpm
-check_build
+ echo [provision]: We do not have scons. Installing it
+ sudo rpm -Uvh /mapguide_sources/scons-2.3.0-1.noarch.rpm
+ check_build
fi
cd ~
echo [provision]: Home directory is `pwd`
@@ -139,6 +139,7 @@
HAVE_FDO=0
HAVE_FDO_LIBS=0
HAVE_MAPGUIDE=0
+MG_UNIT_TEST=0
SCRIPT_ROOT=~/scripts
FDO_SRC_ROOT=~/fdo
FDO_SRC=$FDO_SRC_ROOT/trunk
@@ -157,6 +158,8 @@
then
HAVE_MAPGUIDE=1
fi
+echo [provision]: Checking all tools and libs are in place
+yum install -y gcc-* gd-* automake bison byacc flex doxygen expat expat-devel libtool libjpeg-devel libpng libpng-devel libxml2 libxml2-devel openssl curl curl-devel libxslt libxslt-devel subversion java-1.7.0-openjdk java-1.7.0-openjdk-devel ant dos2unix openssh-server openldap-devel alsa-lib-devel pcre-devel unixODBC-devel libcom_err-devel krb5-devel openssl-devel mysql-devel postgresql-devel unixODBC
echo [provision]: Copying shell scripts
mkdir -p $SCRIPT_ROOT
cp -f /vagrant/*.sh $SCRIPT_ROOT
@@ -165,6 +168,9 @@
cd $SCRIPT_ROOT
sed -i 's/UBUNTU=1/UBUNTU=0/g' build.sh
sed -i 's/UBUNTU=1/UBUNTU=0/g' build_fdo.sh
+sed -i 's/FDO_PLATFORM=64/FDO_PLATFORM=32/g' build_fdo.sh
+sed -i 's/FDO_CPU=x64/FDO_CPU=x86/g' build_fdo.sh
+sed -i 's/FDO_BUILD_CPU=amd64/FDO_BUILD_CPU=i386/g' build_fdo.sh
if [ $HAVE_FDO_LIBS -eq 0 ];
then
echo [provision]: Extracting FDO thirdparty libs
@@ -192,14 +198,20 @@
check_build
cd ~/scripts
BUILD_COMPONENT="FDO"
-sudo -E ./build_fdo.sh
+sudo -E ./build_fdo.sh 2>&1 | tee ~/fdo_build.log
check_build
BUILD_COMPONENT="MapGuide"
-sudo -E ./build.sh
+sudo -E ./build.sh 2>&1 | tee ~/mapguide_build.log
check_build
-MG_REV=`svn info $MG_SRC | perl revnum.pl`
+if [ $MG_UNIT_TEST -eq 1 ];
+then
+ echo [provision]: Unit test MapGuide
+ cd $SCRIPT_ROOT/mgdev
+ sudo make check 2>&1 | tee ~/mapguide_unit_test.log
+fi
cd $SCRIPT_ROOT
sudo mkdir -p /vagrant/build
+sudo mv -f ~/*.log /vagrant/build
sudo cp bin/*.tar.gz /vagrant/build
sudo cp fdosdk*.tar.gz /vagrant/build
if [ ! -d /mapguide_sources/updated ]; then
Added: trunk/Tools/Vagrant/clean.bat
===================================================================
--- trunk/Tools/Vagrant/clean.bat (rev 0)
+++ trunk/Tools/Vagrant/clean.bat 2014-04-14 01:00:57 UTC (rev 8038)
@@ -0,0 +1,40 @@
+ at echo off
+SET ROOT=%CD%
+SET COMPONENT=
+pushd ubuntu\x86
+SET COMPONENT=Ubuntu Build 32-bit
+echo [clean]: MapGuide Ubuntu build 32-bit
+if exist build rd /S /Q build
+if exist *.sh del *.sh
+if exist *.pl del *.pl
+call vagrant destroy -f
+popd
+pushd centos\x86
+SET COMPONENT=CentOS Build 32-bit
+echo [clean]: MapGuide CentOS build 32-bit
+if exist build rd /S /Q build
+if exist *.sh del *.sh
+if exist *.pl del *.pl
+call vagrant destroy -f
+popd
+pushd ubuntu\x64
+SET COMPONENT=Ubuntu Build 64-bit
+echo [clean]: MapGuide Ubuntu build 64-bit
+if exist build rd /S /Q build
+if exist *.sh del *.sh
+if exist *.pl del *.pl
+call vagrant destroy -f
+popd
+pushd centos\x64
+SET COMPONENT=CentOS Build 64-bit
+echo [clean]: MapGuide CentOS build 64-bit
+if exist build rd /S /Q build
+if exist *.sh del *.sh
+if exist *.pl del *.pl
+call vagrant destroy -f
+popd
+goto quit
+:error
+echo [ERROR]: There was an error cleaning the component %COMPONENT%
+exit /B 1
+:quit
\ No newline at end of file
Modified: trunk/Tools/Vagrant/scripts/build.sh
===================================================================
--- trunk/Tools/Vagrant/scripts/build.sh 2014-04-12 18:11:40 UTC (rev 8037)
+++ trunk/Tools/Vagrant/scripts/build.sh 2014-04-14 01:00:57 UTC (rev 8038)
@@ -4,6 +4,7 @@
APIVERSION=2.6
BUILDNUM=${APIVERSION}.0
BUILDROOT=`pwd`
+MGCPUPLATFORM=i386
INSTALLROOT=/usr/local/mapguideopensource-${BUILDNUM}
#INSTALLROOT=/usr/local/mapguideopensource-trunk
LOCKFILEDIR=/var/lock/mgserver
@@ -16,7 +17,7 @@
#SVNROOT="svn://svn.bld.mgproto.net"
#SVNROOT="http://svn.osgeo.org"
SVNRELPATH=/mapguide/trunk/MgDev
-MY_MAKE_OPTS=
+MY_MAKE_OPTS="-j 2"
UBUNTU=0
PRESERVE_BUILD_ROOT=1
@@ -126,9 +127,11 @@
automake --add-missing --copy
autoconf
if [ $(uname -m) = "x86_64" ]; then
- ./configure --enable-optimized --enable-64bit --prefix=${INSTALLROOT}
+ MGCPUPLATFORM=amd64
+ ./configure --enable-optimized --enable-silent-rules --enable-64bit --prefix=${INSTALLROOT}
else
- ./configure --enable-optimized --prefix=${INSTALLROOT}
+ MGCPUPLATFORM=i386
+ ./configure --enable-optimized --enable-silent-rules --prefix=${INSTALLROOT}
fi
make $MY_MAKE_OPTS
check_build
@@ -169,7 +172,7 @@
mkdir -p bin
fi
- tar -zcf bin/mapguideopensource-${BUILDNUM}.${REVISION}.tar.gz ${INSTALLROOT} ${LOCKFILEDIR}
+ tar -zcf bin/mapguideopensource-${BUILDNUM}.${REVISION}.${MGCPUPLATFORM}.tar.gz ${INSTALLROOT} ${LOCKFILEDIR}
fi
echo "Build complete!"
echo Main build execution: `expr $end_time - $start_time` s
Modified: trunk/Tools/Vagrant/scripts/build_fdo.sh
===================================================================
--- trunk/Tools/Vagrant/scripts/build_fdo.sh 2014-04-12 18:11:40 UTC (rev 8037)
+++ trunk/Tools/Vagrant/scripts/build_fdo.sh 2014-04-14 01:00:57 UTC (rev 8038)
@@ -15,6 +15,8 @@
FDO_VER_REV=0
UBUNTU=0
+FDO_CPU=x86
+FDO_PLATFORM=32
FDO_BUILD_CPU=i386
# FDO install directory
@@ -99,9 +101,9 @@
{
echo "[info]: Updating setenvironment.sh"
# Note: Change your paths here if they're different
- sed -i 's/export FDOMYSQL=$FDOTHIRDPARTY\/mysql\/rhlinux/export FDOMYSQL=\/home\/vagrant\/fdo_rdbms_thirdparty\/mysql\/x86/g' ${FDO_BUILD_AREA}/setenvironment.sh
+ sed -i 's/export FDOMYSQL=$FDOTHIRDPARTY\/mysql\/rhlinux/export FDOMYSQL=\/home\/vagrant\/fdo_rdbms_thirdparty\/mysql\/'"$FDO_CPU"'/g' ${FDO_BUILD_AREA}/setenvironment.sh
sed -i 's/export FDOPOSTGRESQL=$FDOTHIRDPARTY\/pgsql/export FDOPOSTGRESQL=\/home\/vagrant\/fdo_rdbms_thirdparty\/pgsql/g' ${FDO_BUILD_AREA}/setenvironment.sh
- echo "export FDOORACLE=/home/vagrant/fdo_rdbms_thirdparty/oracle/x86/instantclient_11_2/sdk" >> ${FDO_BUILD_AREA}/setenvironment.sh
+ echo "export FDOORACLE=/home/vagrant/fdo_rdbms_thirdparty/oracle/${FDO_CPU}/instantclient_11_2/sdk" >> ${FDO_BUILD_AREA}/setenvironment.sh
}
# Must have root
@@ -114,6 +116,7 @@
echo " FDO Source: ${FDO_SRC}"
echo " FDO Build Area: ${FDO_BUILD_AREA}"
echo " FDO Install dir: ${FDO_INST}"
+echo " FDO CPU Target: ${FDO_BUILD_CPU}"
echo " CMake build: ${CMAKE}"
echo " Is Ubuntu?: ${UBUNTU}"
echo " Export from local SVN checkout: ${LOCALSVN}"
@@ -141,6 +144,7 @@
if [ ${PRESERVE_BUILD_ROOT} -eq 1 ];
then
echo "[info]: FDO build area ${FDO_BUILD_AREA} exists. Going straight to build"
+ modify_sdk_paths
else
echo "[info]: Removing old FDO build area at ${FDO_BUILD_AREA}"
rm -rf ${FDO_BUILD_AREA}
@@ -178,7 +182,7 @@
exit 1;
fi
FDO_BUILD_COMPONENT="FDO Thirdparty"
-./build_thirdparty.sh
+./build_thirdparty.sh -b ${FDO_PLATFORM}
check_build
if [ ${CMAKE} -eq 1 ];
@@ -191,7 +195,7 @@
for comp in fdocore fdo utilities
do
FDO_BUILD_COMPONENT="$comp (automake)"
- ./build_linux.sh --w $comp --p ${FDO_INST}
+ ./build_linux.sh --w $comp --p ${FDO_INST} --b ${FDO_PLATFORM}
update_fdocore_file_list
check_build
done
@@ -199,7 +203,7 @@
do
save_current_file_list
FDO_BUILD_COMPONENT="$comp (automake)"
- ./build_linux.sh --w $comp --p ${FDO_INST}
+ ./build_linux.sh --w $comp --p ${FDO_INST} --b ${FDO_PLATFORM}
update_provider_file_list $comp
check_build
done
@@ -246,7 +250,7 @@
cd $BUILDROOT
FDO_BUILD_COMPONENT="Make tarball"
# Create a binary tar ball for FDO
-tar -zcf fdosdk-centos6-${FDO_VER_FULL}_${REVISION}.tar.gz ${FDO_INST}
+tar -zcf fdosdk-centos6-${FDO_BUILD_CPU}-${FDO_VER_FULL}_${REVISION}.tar.gz ${FDO_INST}
check_build
if [ ${UBUNTU} -eq 1 ];
Modified: trunk/Tools/Vagrant/scripts/build_oem_ubuntu.sh
===================================================================
--- trunk/Tools/Vagrant/scripts/build_oem_ubuntu.sh 2014-04-12 18:11:40 UTC (rev 8037)
+++ trunk/Tools/Vagrant/scripts/build_oem_ubuntu.sh 2014-04-14 01:00:57 UTC (rev 8038)
@@ -223,25 +223,25 @@
}
#**********************************************************
-# Build PHP 5.3.1
+# Build PHP 5.5.11
# Notes: Configure PHP source tree for building PHP extension
#**********************************************************
init_php()
{
- LIB_NAME="PHP 5.5.3"
+ LIB_NAME="PHP 5.5.11"
}
build_php()
{
# Nothing to do here. build_apt.sh builds PHP
- pushd LinuxApt/php-5.5.3
+ pushd LinuxApt/php-5.5.11
popd
}
clean_php()
{
- pushd LinuxApt/php-5.5.3
+ pushd LinuxApt/php-5.5.11
make distclean
check_clean
popd
Property changes on: trunk/Tools/Vagrant/support
___________________________________________________________________
Added: bugtraq:number
+ true
Added: trunk/Tools/Vagrant/support/apt_list.txt
===================================================================
--- trunk/Tools/Vagrant/support/apt_list.txt (rev 0)
+++ trunk/Tools/Vagrant/support/apt_list.txt 2014-04-14 01:00:57 UTC (rev 8038)
@@ -0,0 +1,3 @@
+build-essential bison automake libtool libpng-dev libjpeg62-dev libxslt-dev libfreetype6-dev libpcre3-dev openjdk-7-jdk subversion lintian ant scons dos2unix liboss4-salsa-dev libldap-dev libssl-dev libcurl4-openssl-dev libexpat-dev libmysqlclient-dev unixODBC-dev python-dev libpq-dev libcppunit-dev
+libboost-thread1.46-dev (for non-internal boost for cmake)
+libboost-date-time-dev
\ No newline at end of file
Added: trunk/Tools/Vagrant/support/vagrant_base_box_prep.sh
===================================================================
--- trunk/Tools/Vagrant/support/vagrant_base_box_prep.sh (rev 0)
+++ trunk/Tools/Vagrant/support/vagrant_base_box_prep.sh 2014-04-14 01:00:57 UTC (rev 8038)
@@ -0,0 +1,24 @@
+#!/usr/bin/env bash
+apt-get -y update
+apt-get -y install build-essential zlib1g-dev libssl-dev libreadline6-dev libyaml-dev
+cd /tmp
+wget ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p125.tar.gz
+tar -xvzf ruby-1.9.3-p125.tar.gz
+cd ruby-1.9.3-p125/
+./configure --prefix=/usr/local
+make
+make install
+gem install chef ruby-shadow --no-ri --no-rdoc
+apt-get install -y puppet puppetmaster openssh-server
+mkdir ~/.ssh/
+cd ~/.ssh
+wget http://github.com/mitchellh/vagrant/raw/master/keys/vagrant
+wget http://github.com/mitchellh/vagrant/raw/master/keys/vagrant.pub
+mv vagrant.pub authorized_keys
+apt-get install linux-headers-$(uname -r) build-essential
+mkdir /media/cdrom
+mount /dev/cdrom /media/cdrom
+sh /media/cdrom/VBoxLinuxAdditions.run
+apt-get clean
+groupadd admin
+usermod -G admin vagrant
\ No newline at end of file
Added: trunk/Tools/Vagrant/support/yum_list.txt
===================================================================
--- trunk/Tools/Vagrant/support/yum_list.txt (rev 0)
+++ trunk/Tools/Vagrant/support/yum_list.txt 2014-04-14 01:00:57 UTC (rev 8038)
@@ -0,0 +1 @@
+yum install -y gcc-* gd-* automake bison byacc flex doxygen expat expat-devel libtool libjpeg-devel libpng libpng-devel libxml2 libxml2-devel openssl curl curl-devel libxslt libxslt-devel subversion java-1.7.0-openjdk java-1.7.0-openjdk-devel ant dos2unix openssh-server openldap-devel alsa-lib-devel pcre-devel unixODBC-devel libcom_err-devel krb5-devel openssl-devel mysql-devel postgresql-devel unixODBC scons
\ No newline at end of file
Modified: trunk/Tools/Vagrant/ubuntu/x64/Vagrantfile
===================================================================
--- trunk/Tools/Vagrant/ubuntu/x86/Vagrantfile 2014-03-02 15:54:45 UTC (rev 7985)
+++ trunk/Tools/Vagrant/ubuntu/x64/Vagrantfile 2014-04-14 01:00:57 UTC (rev 8038)
@@ -10,7 +10,7 @@
# please see the online documentation at vagrantup.com.
# Every Vagrant virtual environment requires a box to build off of.
- config.vm.box = "vagrant-mapguide-ubuntu-precise32"
+ config.vm.box = "vagrant-mapguide-ubuntu-precise64"
# The url from where the 'config.vm.box' box will be fetched if it
# doesn't already exist on the user's system.
@@ -150,6 +150,8 @@
then
HAVE_MAPGUIDE=1
fi
+echo [provision]: Checking all tools and libs are in place
+sudo apt-get -y install build-essential bison automake libtool libpng-dev libjpeg62-dev libxslt-dev libfreetype6-dev libpcre3-dev openjdk-7-jdk subversion lintian ant scons dos2unix liboss4-salsa-dev libldap-dev libssl-dev libcurl4-openssl-dev libexpat-dev libmysqlclient-dev unixODBC-dev python-dev libpq-dev libcppunit-dev
echo [provision]: Copying shell scripts
mkdir -p $SCRIPT_ROOT
cp -f /vagrant/*.sh $SCRIPT_ROOT
@@ -158,7 +160,9 @@
cd $SCRIPT_ROOT
sed -i 's/UBUNTU=0/UBUNTU=1/g' build.sh
sed -i 's/UBUNTU=0/UBUNTU=1/g' build_fdo.sh
-check_build
+sed -i 's/FDO_PLATFORM=32/FDO_PLATFORM=64/g' build_fdo.sh
+sed -i 's/FDO_CPU=x86/FDO_CPU=x64/g' build_fdo.sh
+sed -i 's/FDO_BUILD_CPU=i386/FDO_BUILD_CPU=amd64/g' build_fdo.sh
if [ $HAVE_FDO_LIBS -eq 0 ];
then
echo [provision]: Extracting FDO thirdparty libs
@@ -186,17 +190,21 @@
check_build
cd ~/scripts
BUILD_COMPONENT="FDO"
-sudo -E ./build_fdo.sh
+sudo -E ./build_fdo.sh 2>&1 | tee ~/fdo_build.log
check_build
BUILD_COMPONENT="MapGuide"
-sudo -E ./build.sh
+sudo -E ./build.sh 2>&1 | tee ~/mapguide_build.log
check_build
MG_REV=`svn info $MG_SRC | perl revnum.pl`
BUILD_COMPONENT="MapGuide deb packages"
-sudo ./dpkgmapguide.sh i386 $MG_REV
+sudo ./dpkgmapguide.sh amd64 $MG_REV
check_build
+echo [provision]: Unit test MapGuide
+cd $SCRIPT_ROOT/mgdev
+sudo make check 2>&1 | tee ~/mapguide_unit_test.log
cd $SCRIPT_ROOT
sudo mkdir -p /vagrant/build
+sudo mv -f ~/*.log /vagrant/build
sudo cp fdo_build_area/install/bin/*.deb /vagrant/build
sudo cp bin/*.deb /vagrant/build
if [ ! -d /mapguide_sources/updated ]; then
Deleted: trunk/Tools/Vagrant/ubuntu/x64/readme.txt
===================================================================
Modified: trunk/Tools/Vagrant/ubuntu/x86/Vagrantfile
===================================================================
--- trunk/Tools/Vagrant/ubuntu/x86/Vagrantfile 2014-04-12 18:11:40 UTC (rev 8037)
+++ trunk/Tools/Vagrant/ubuntu/x86/Vagrantfile 2014-04-14 01:00:57 UTC (rev 8038)
@@ -132,6 +132,7 @@
HAVE_FDO=0
HAVE_FDO_LIBS=0
HAVE_MAPGUIDE=0
+MG_UNIT_TEST=0
SCRIPT_ROOT=~/scripts
FDO_SRC_ROOT=~/fdo
FDO_SRC=$FDO_SRC_ROOT/trunk
@@ -150,6 +151,8 @@
then
HAVE_MAPGUIDE=1
fi
+echo [provision]: Checking all tools and libs are in place
+sudo apt-get -y install build-essential bison automake libtool libpng-dev libjpeg62-dev libxslt-dev libfreetype6-dev libpcre3-dev openjdk-7-jdk subversion lintian ant scons dos2unix liboss4-salsa-dev libldap-dev libssl-dev libcurl4-openssl-dev libexpat-dev libmysqlclient-dev unixODBC-dev python-dev libpq-dev libcppunit-dev
echo [provision]: Copying shell scripts
mkdir -p $SCRIPT_ROOT
cp -f /vagrant/*.sh $SCRIPT_ROOT
@@ -158,7 +161,9 @@
cd $SCRIPT_ROOT
sed -i 's/UBUNTU=0/UBUNTU=1/g' build.sh
sed -i 's/UBUNTU=0/UBUNTU=1/g' build_fdo.sh
-check_build
+sed -i 's/FDO_PLATFORM=64/FDO_PLATFORM=32/g' build_fdo.sh
+sed -i 's/FDO_CPU=x64/FDO_CPU=x86/g' build_fdo.sh
+sed -i 's/FDO_BUILD_CPU=amd64/FDO_BUILD_CPU=i386/g' build_fdo.sh
if [ $HAVE_FDO_LIBS -eq 0 ];
then
echo [provision]: Extracting FDO thirdparty libs
@@ -186,17 +191,24 @@
check_build
cd ~/scripts
BUILD_COMPONENT="FDO"
-sudo -E ./build_fdo.sh
+sudo -E ./build_fdo.sh 2>&1 | tee ~/fdo_build.log
check_build
BUILD_COMPONENT="MapGuide"
-sudo -E ./build.sh
+sudo -E ./build.sh 2>&1 | tee ~/mapguide_build.log
check_build
MG_REV=`svn info $MG_SRC | perl revnum.pl`
BUILD_COMPONENT="MapGuide deb packages"
sudo ./dpkgmapguide.sh i386 $MG_REV
check_build
+if [ $MG_UNIT_TEST -eq 1 ];
+then
+ echo [provision]: Unit test MapGuide
+ cd $SCRIPT_ROOT/mgdev
+ sudo make check 2>&1 | tee ~/mapguide_unit_test.log
+fi
cd $SCRIPT_ROOT
sudo mkdir -p /vagrant/build
+sudo mv -f ~/*.log /vagrant/build
sudo cp fdo_build_area/install/bin/*.deb /vagrant/build
sudo cp bin/*.deb /vagrant/build
if [ ! -d /mapguide_sources/updated ]; then
Deleted: trunk/Tools/Vagrant/ubuntu/x86/readme.txt
===================================================================
More information about the mapguide-commits
mailing list