diff options
Diffstat (limited to 'sca-cpp')
33 files changed, 969 insertions, 429 deletions
diff --git a/sca-cpp/trunk/INSTALL b/sca-cpp/trunk/INSTALL index f4f3d3d577..c66c88bce5 100644 --- a/sca-cpp/trunk/INSTALL +++ b/sca-cpp/trunk/INSTALL @@ -1,10 +1,10 @@ Apache Tuscany SCA Runtime ========================== -Automated installation on Ubuntu Server 10.10 and 11.04 -======================================================= +Automated installation on Ubuntu Server 12.04 +============================================= -Tuscany provides automated install scripts for Ubuntu Server 10.10 and 11.04. +Tuscany provides automated install scripts for Ubuntu Server 12.04. You can start with a fresh Ubuntu Server system and these scripts will take care of all the download, build and installation steps for you. @@ -31,11 +31,11 @@ The installation script will display each command as it's executed. That's all you need to do to build and install the Tuscany SCA runtime on Ubuntu Server. -Automated installation on Max OS X 10.6.7 +Automated installation on Max OS X 10.7.4 ========================================= -Tuscany provides an automated install script for Mac OS X 10.6.7 and Xcode 4.1. -You can start with a fresh Mac OS X 10.6.7 + Xcode 4.1 system and the script +Tuscany provides an automated install script for Mac OS X 10.7.4 and Xcode 4.1. +You can start with a fresh Mac OS X 10.7.4 + Xcode 4.1 system and the script will take care of all the download, build and installation steps for you. macos/macos-install: @@ -67,30 +67,29 @@ OS X, or if you need to customize your installation, read on... The Tuscany SCA Linux build uses the GNU Autotools tool chain. First install the following development tools: -autoconf-2.67 +autoconf-2.68 automake-1.11 -libtool-2.2.6 +libtool-2.4.2 doxygen-1.7.1 -gcc-g++-4.4.5 +gcc-g++-4.6.1 Then install the following development dependencies: Apache HTTP server and APR: -httpd-2.3.15 (http://httpd.apache.org/) -apr-1.4.x (http://apr.apache.org/) -built with OpenSSL libssl-0.9.8, libpcre3-8.02, +httpd-2.4.2 (http://httpd.apache.org/) +apr-1.4.6 and apr-util-1.4.1 (http://apr.apache.org/) +built with OpenSSL libssl-0.9.8, libpcre3-8.12, and expat 2.0.1 Memcached: memcached-1.4.7 (http://memcached.org/) -built with libevent-1.4.13 +built with libevent-1.4.14 XML: libxml2-2.7.7 (http://xmlsoft.org/) CURL: curl-7-24.0 -libcurl4-openssl-7.24.0 JSON: Mozilla SpiderMonkey libmozjs 1.8.5 and @@ -103,8 +102,8 @@ tinycdb-0.77 (http://www.corpit.ru/mjt/tinycdb.html) Optional dependencies: Web application firewall: -Mod-security 2.6.0 (http://www.modsecurity.org/) -with the Mod-security core rule set 2.2.0 +Mod-security 2.6.6 (http://www.modsecurity.org/) +with the Mod-security core rule set 2.2.5 Web page optimizations: Page Speed SDK 1.9 (http://code.google.com/p/page-speed/) @@ -114,11 +113,11 @@ Apache Axis2/C 1.6.0 (http://ws.apache.org/axis2/c/) Queueing: Apache Qpid/C++ 0.6 (http://qpid.apache.org/) -built with libuuid-2.17.2, libboost-1.42.0, libboost-program-options-1.42.0 and -libboost-filesystem-1.42.0 +built with libuuid1-2.19.1, libboost-1.46.1, libboost-program-options-1.46.1 and +libboost-filesystem-1.46.1 Python: -Python 2.6.6 (http://www.python.org/) +Python 2.7.3 (http://www.python.org/) Google AppEngine 1.4.0 (http://code.google.com/appengine/) OpenCL: @@ -224,39 +223,26 @@ in the configure help: ./configure --help -Here's an example configuration tested on Ubuntu Server, with the system -dependencies installed in the standard system directories and some of the -dependencies installed under $build: +Here's an example configuration tested on Ubuntu Server 12.04 with some of the +most useful options and the corresponding dependencies installed under $build: ./configure --prefix=$build/tuscany-sca-cpp-bin \ ---with-apr=$build/apr-1.4.x-bin --with-httpd=$build/httpd-2.3.15-bin \ +--enable-threads --enable-maintainer-mode \ +--with-curl=$build/curl-7.24.0-bin --with-libxml2=$build/libxml2-2.7.7-bin \ +--with-apr=$build/apr-1.4.6-bin --with-apr-util=$build/apr-util-1.4.1-bin \ +--with-httpd=$build/httpd-2.4.2-bin \ --with-memcached=$build/memcached-1.4.7-bin \ --with-tinycdb=$build/tinycdb-0.77-bin \ ---with-curl=$build/curl-7.24.0-bin --with-libxml2=/usr \ ---with-js-include=$build/js-1.8.5-bin/include \ +--with-js-include=$build/js-1.8.5-bin/include/js \ --with-js-lib=$build/js-1.8.5-bin/lib \ ---enable-libcloud \ ---with-libcloud=$build/libcloud-0.3.1-bin \ ---enable-threads \ ---enable-python --with-python=$build/python-2.6.6-bin \ ---enable-opencl --with-opencl-include=/usr/include --with-opencl-lib=/usr/lib \ ---enable-gae --with-gae=$build/google_appengine \ ---enable-java --with-java=/usr/lib/jvm/default-java \ ---enable-webservice --with-axis2c=$build/axis2c-1.6.0-bin \ ---with-libxml2=$build/libxml2-2.7.7-bin \ ---enable-queue --with-qpidc=$build/qpidc-0.6-bin \ ---enable-chat --with-libstrophe=$build/libstrophe-bin \ ---with-vysper=$build/vysper-0.5 \ +--enable-python --with-python=$build/python-2.7.3-bin \ --enable-sqldb --with-pgsql=$build/postgresql-9.1.2-bin \ --with-pgbouncer=$build/pgbouncer-1.5-bin \ --enable-log --with-thrift=$build/thrift-0.2.0-bin \ --with-scribe=$build/scribe-2.2-bin \ ---enable-openid --with-mod-auth-openid=$build/mod-auth-openid-bin \ --enable-oauth --with-liboauth=$build/liboauth-0.9.1-bin \ ---enable-mod-security --with-mod-security=$build/modsecurity-apache-2.6.0-bin \ ---enable-pagespeed --with-pagespeed=$build/page-speed-1.9-bin \ ---enable-maintainer-mode - +--enable-mod-security --with-mod-security=$build/modsecurity-apache-2.6.6-bin \ +--enable-pagespeed --with-pagespeed=$build/page-speed-1.9-bin To build the Tuscany SCA runtime, do this: make @@ -264,6 +250,9 @@ make To run the tests, do this: make check +To install the Tuscany SCA binaries, do this: +make install + To build ctags for the source, do this: make ctags @@ -273,7 +262,3 @@ make dist To build a binary distribution, do this: make bindist -To install the Tuscany SCA binaries, do this: -make install - - diff --git a/sca-cpp/trunk/README b/sca-cpp/trunk/README index c5139fd679..1d81008041 100644 --- a/sca-cpp/trunk/README +++ b/sca-cpp/trunk/README @@ -24,9 +24,9 @@ Queue: AMQP queuing, using Apache Qpid/C; Sqldb: SQL database, using PostgreSQL and PgBouncer; Webservice: Web service gateway, using Apache Axis2/C. -These components present a simple ATOMPub REST interface, allowing you to send -a message to a queue, a chat connection, or add an entry to a cache or a -database for example, using a simple HTTP POST. +These components present a simple ATOMPub REST interface, allowing you to work +with a data cache, a database, a message queue or a chat connection for example +very simply using HTTP GET, POST, PUT and DELETE methods. Getting the source code @@ -34,8 +34,6 @@ Getting the source code To checkout the source code, do this: git clone git://git.apache.org/tuscany-sca-cpp -or -svn checkout http://svn.apache.org/repos/asf/tuscany/sca-cpp tuscany-sca-cpp To checkout the source code with commit access, do this: git clone git://git.apache.org/tuscany-sca-cpp @@ -98,8 +96,8 @@ Here's a rough guide to the Tuscany SCA source tree: | | |-- store-sql Online store using an SQL database | | |-- store-vhost Online store on virtual hosts | | - | |-- macos Automated install on Mac OS X 10.1.7 - | |-- ubuntu Automated install on Ubuntu 10.10 + | |-- macos Automated install on Mac OS X 10.7.4 + | |-- ubuntu Automated install on Ubuntu 12.04 | |-- patches Temporary patches to some of the dependencies | |-- branches Topic and release branches diff --git a/sca-cpp/trunk/components/cache/memcached-start b/sca-cpp/trunk/components/cache/memcached-start index 5a71e7189f..ca6c4ac721 100755 --- a/sca-cpp/trunk/components/cache/memcached-start +++ b/sca-cpp/trunk/components/cache/memcached-start @@ -23,10 +23,10 @@ root=`echo "import os; print os.path.realpath('$1')" | python` addr=$2 if [ "$addr" = "" ]; then - ip="" + host="" port="11211" else - ip=`$here/../../modules/http/httpd-addr ip $addr` + host=`$here/../../modules/http/httpd-addr ip $addr` port=`$here/../../modules/http/httpd-addr port $addr` fi @@ -43,9 +43,9 @@ fi mkdir -p $root/memcached echo $log > $root/memcached/logger -if [ "$ip" = "" ]; then +if [ "$host" = "" ]; then nohup /bin/sh -c "($memcached_prefix/bin/memcached -d -m 4 -p $port $v 2>&1 | sh $root/memcached/logger)" 1>/dev/null 2>/dev/null & else - nohup /bin/sh -c "($memcached_prefix/bin/memcached -d -l $ip -m 4 -p $port $v 2>&1 | sh $root/memcached/logger)" 1>/dev/null 2>/dev/null & + nohup /bin/sh -c "($memcached_prefix/bin/memcached -d -l $host -m 4 -p $port $v 2>&1 | sh $root/memcached/logger)" 1>/dev/null 2>/dev/null & fi diff --git a/sca-cpp/trunk/components/cache/memcached-stop b/sca-cpp/trunk/components/cache/memcached-stop index 50d094b9c7..a36c03c06a 100755 --- a/sca-cpp/trunk/components/cache/memcached-stop +++ b/sca-cpp/trunk/components/cache/memcached-stop @@ -23,18 +23,18 @@ root=`echo "import os; print os.path.realpath('$1')" | python` addr=$2 if [ "$addr" = "" ]; then - ip="" + host="" port="11211" else - ip=`$here/../../modules/http/httpd-addr ip $addr` + host=`$here/../../modules/http/httpd-addr ip $addr` port=`$here/../../modules/http/httpd-addr port $addr` fi memcached_prefix=`cat $here/memcached.prefix` -if [ "$ip" = "" ]; then +if [ "$host" = "" ]; then mc="$memcached_prefix/bin/memcached -d -m 4 -p $port" else - mc="$memcached_prefix/bin/memcached -d -l $ip -m 4 -p $port" + mc="$memcached_prefix/bin/memcached -d -l $host -m 4 -p $port" fi k=`ps -ef | grep -v grep | grep "${mc}" | awk '{ print $2 }'` diff --git a/sca-cpp/trunk/components/log/scribed-central-conf b/sca-cpp/trunk/components/log/scribed-central-conf index 066dad4add..3c62107da5 100755 --- a/sca-cpp/trunk/components/log/scribed-central-conf +++ b/sca-cpp/trunk/components/log/scribed-central-conf @@ -22,9 +22,9 @@ here=`echo "import os; print os.path.realpath('$0')" | python`; here=`dirname $h mkdir -p $1 root=`echo "import os; print os.path.realpath('$1')" | python` -port=$2 -if [ "$port" = "" ]; then - port="1463" +host=$2 +if [ "$host" = "" ]; then + host="*" fi mkdir -p $root/scribe/conf @@ -34,7 +34,8 @@ mkdir -p $root/scribe/logs/central-secondary cat >$root/scribe/conf/scribe-central.conf <<EOF # Generated by: scribed-central-conf $* # Scribe central configuration -port=$port +host=$host +port=1463 max_msg_per_second=2000000 check_interval=3 diff --git a/sca-cpp/trunk/components/log/scribed-central-firehose-conf b/sca-cpp/trunk/components/log/scribed-central-firehose-conf index 660cf7820a..f76aed58c9 100755 --- a/sca-cpp/trunk/components/log/scribed-central-firehose-conf +++ b/sca-cpp/trunk/components/log/scribed-central-firehose-conf @@ -22,9 +22,9 @@ here=`echo "import os; print os.path.realpath('$0')" | python`; here=`dirname $h mkdir -p $1 root=`echo "import os; print os.path.realpath('$1')" | python` -port=$2 -if [ "$port" = "" ]; then - port="1463" +host=$2 +if [ "$host" = "" ]; then + host="*" fi mkdir -p $root/scribe/conf @@ -36,7 +36,8 @@ mkdir -p $root/scribe/logs/firehose-secondary cat >$root/scribe/conf/scribe-central.conf <<EOF # Generated by: scribed-central-conf $* # Scribe central configuration -port=$port +host=$host +port=1463 max_msg_per_second=2000000 check_interval=3 diff --git a/sca-cpp/trunk/components/log/scribed-client-conf b/sca-cpp/trunk/components/log/scribed-client-conf index 8395b3f96e..e0a35581c7 100755 --- a/sca-cpp/trunk/components/log/scribed-client-conf +++ b/sca-cpp/trunk/components/log/scribed-client-conf @@ -22,10 +22,12 @@ here=`echo "import os; print os.path.realpath('$0')" | python`; here=`dirname $h mkdir -p $1 root=`echo "import os; print os.path.realpath('$1')" | python` -central=$2 -cport=$3 -if [ "$cport" = "" ]; then - cport="1463" +if [ "$3" = "" ]; then + host="*" + central=$2 +else + host=$2 + central=$3 fi mkdir -p $root/scribe/conf @@ -34,6 +36,7 @@ mkdir -p $root/scribe/logs/client-secondary cat >$root/scribe/conf/scribe-client.conf <<EOF # Generated by: scribed-client-conf $* # Scribe client configuration +host=$host port=1464 max_msg_per_second=2000000 check_interval=3 @@ -53,7 +56,7 @@ retry_interval_range=10 <primary> type=network remote_host=$central -remote_port=$cport +remote_port=1463 </primary> <secondary> diff --git a/sca-cpp/trunk/components/sqldb/pgsql-conf b/sca-cpp/trunk/components/sqldb/pgsql-conf index 482048a295..8adbb902c9 100755 --- a/sca-cpp/trunk/components/sqldb/pgsql-conf +++ b/sca-cpp/trunk/components/sqldb/pgsql-conf @@ -24,12 +24,16 @@ root=`echo "import os; print os.path.realpath('$1')" | python` addr=$2 if [ "$addr" = "" ]; then - ip="*" + host="localhost" + listen="*" port="5432" else - ip=`$here/../../modules/http/httpd-addr ip $addr` - if [ "$ip" = "" ]; then - ip="*" + host=`$here/../../modules/http/httpd-addr ip $addr` + if [ "$host" = "" ]; then + host="localhost" + listen="*" + else + listen=$host fi port=`$here/../../modules/http/httpd-addr port $addr` fi @@ -38,6 +42,8 @@ bport=`expr $port + 1000` pgsql_prefix=`cat $here/pgsql.prefix` pgbouncer_prefix=`cat $here/pgbouncer.prefix` +user=`id -un` + mkdir -p $root/sqldb/data chmod 700 $root/sqldb/data mkdir -p $root/sqldb/archive @@ -50,6 +56,7 @@ else pgsql_log="cat >>$root/logs/postgresql" fi mkdir -p $root/sqldb +mkdir -p $root/sqldb/tmp echo $pgsql_log >$root/sqldb/logger # Initialize PostgreSQL @@ -77,12 +84,13 @@ log_lock_waits = on log_statement = none # Listen -listen_addresses = '$ip' +listen_addresses = '$listen' port = $port +unix_socket_directory = '$root/sqldb/tmp' # Setup archival archive_mode = on -archive_command = '$here/pgsql-archive $root localhost $bport %p %f' +archive_command = '$here/pgsql-archive $root $host $bport %p %f' # Setup hot standby with streaming replication wal_level = hot_standby @@ -114,12 +122,16 @@ while [ $sti -ne 30 ]; do sti=$((sti+1)) done -$pgsql_prefix/bin/createdb -h localhost -p $port db 2>&1 | sh $root/sqldb/logger +$pgsql_prefix/bin/createdb -h $host -p $port db 2>&1 | sh $root/sqldb/logger + +# Create default user roles +$pgsql_prefix/bin/psql -h $host -p $port -c "create role standby with login replication" db 2>&1 | sh $root/sqldb/logger +$pgsql_prefix/bin/psql -h $host -p $port -c "create role bouncer with login" db 2>&1 | sh $root/sqldb/logger # Backup the db if there's no backup for it yet baks=`ls $root/sqldb/archive | sort -r | grep "\.backup\.tar\.gz$"` if [ "$baks" = "" ]; then - $here/pgsql-backup $root localhost $port + $here/pgsql-backup $root $host $port fi $pgsql_prefix/bin/pg_ctl stop -w -D $root/sqldb/data 2>&1 | sh $root/sqldb/logger @@ -151,12 +163,13 @@ id=`id -un` cat >$root/sqldb/data/pgbouncer.conf <<EOF [databases] -db = host=localhost dbname=db +db = host=$host port=$port dbname=db user=bouncer [pgbouncer] pool_mode = session +listen_addr = $listen listen_port = $bport -listen_addr = $ip +unix_socket_dir = auth_type = trust auth_file=$root/sqldb/data/pgbouncer-auth.conf logfile = $root/logs/pgbouncer diff --git a/sca-cpp/trunk/components/sqldb/pgsql-standby-conf b/sca-cpp/trunk/components/sqldb/pgsql-standby-conf index 77d1dfa8e2..5f76b5b332 100755 --- a/sca-cpp/trunk/components/sqldb/pgsql-standby-conf +++ b/sca-cpp/trunk/components/sqldb/pgsql-standby-conf @@ -25,12 +25,16 @@ root=`echo "import os; print os.path.realpath('$1')" | python` # Server address addr=$2 if [ "$addr" = "" ]; then - ip="*" + host="localhost" + listen="*" port="5432" else - ip=`$here/../../modules/http/httpd-addr ip $addr` - if [ "$ip" = "" ]; then - ip="*" + host=`$here/../../modules/http/httpd-addr ip $addr` + if [ "$host" = "" ]; then + host="localhost" + listen="*" + else + listen=$host fi port=`$here/../../modules/http/httpd-addr port $addr` fi @@ -50,6 +54,8 @@ fi pgsql_prefix=`cat $here/pgsql.prefix` pgbouncer_prefix=`cat $here/pgbouncer.prefix` +user=`id -un` + mkdir -p $root/sqldb/data chmod 700 $root/sqldb/data mkdir -p $root/sqldb/archive @@ -62,6 +68,7 @@ else pgsql_log="cat >>$root/logs/postgresql" fi mkdir -p $root/sqldb +mkdir -p $root/sqldb/tmp echo $pgsql_log >$root/sqldb/logger # Initialize from a backup of the master @@ -95,12 +102,13 @@ log_lock_waits = on log_statement = none # Listen -listen_addresses = '$ip' +listen_addresses = '$listen' port = $port +unix_socket_directory = '$root/sqldb/tmp' # Setup archival archive_mode = on -archive_command = '$here/pgsql-archive $root localhost $bport %p %f' +archive_command = '$here/pgsql-archive $root $host $bport %p %f' # Setup hot standby with streaming replication wal_level = hot_standby @@ -118,7 +126,7 @@ cat >$root/sqldb/data/recovery.conf << EOF # Start in standby mode standby_mode = 'on' -primary_conninfo = 'host=$mhost port=$mport' +primary_conninfo = 'host=$mhost port=$mport user=standby' # Failover trigger_file = '$root/sqldb/failover' @@ -154,12 +162,13 @@ id=`id -un` cat >$root/sqldb/data/pgbouncer.conf <<EOF [databases] -db = host=localhost dbname=db +db = host=$host port=$port dbname=db user=bouncer [pgbouncer] pool_mode = session +listen_addr = $listen listen_port = $bport -listen_addr = $ip +unix_socket_dir = auth_type = trust auth_file=$root/sqldb/data/pgbouncer-auth.conf logfile = $root/logs/pgbouncer diff --git a/sca-cpp/trunk/configure.ac b/sca-cpp/trunk/configure.ac index c40bd3bade..e3f3de7e61 100644 --- a/sca-cpp/trunk/configure.ac +++ b/sca-cpp/trunk/configure.ac @@ -312,18 +312,33 @@ AC_CHECK_LIB([mozjs], [JS_NewContext], [], [AC_MSG_ERROR([couldn't find a suitab # Configure path to Apache APR and HTTPD includes and libs. AC_MSG_CHECKING([for apr]) AC_ARG_WITH([apr], [AC_HELP_STRING([--with-apr=PATH], [path to installed Apache APR [default=/usr]])], [ - APR_INCLUDE="${withval}/include/apr-2" + APR_INCLUDE="${withval}/include/apr-1" APR_LIB="${withval}/lib" AC_MSG_RESULT("${withval}") ], [ - APR_INCLUDE="/usr/include/apr-2" + APR_INCLUDE="/usr/include/apr-1" APR_LIB="/usr/lib" AC_MSG_RESULT(/usr) ]) AC_SUBST(APR_INCLUDE) AC_SUBST(APR_LIB) LIBS="-L${APR_LIB} ${defaultlibs}" -AC_CHECK_LIB([apr-2], [apr_pool_initialize], [], [AC_MSG_ERROR([couldn't find a suitable libapr-2, use --with-apr=PATH])]) +AC_CHECK_LIB([apr-1], [apr_pool_initialize], [], [AC_MSG_ERROR([couldn't find a suitable libapr-1, use --with-apr=PATH])]) + +AC_MSG_CHECKING([for apr-util]) +AC_ARG_WITH([apr-util], [AC_HELP_STRING([--with-apr-util=PATH], [path to installed Apache APR util [default=/usr]])], [ + APRUTIL_INCLUDE="${withval}/include/apr-1" + APRUTIL_LIB="${withval}/lib" + AC_MSG_RESULT("${withval}") +], [ + APRUTIL_INCLUDE="/usr/include/apr-1" + APRUTIL_LIB="/usr/lib" + AC_MSG_RESULT(/usr) +]) +AC_SUBST(APRUTIL_INCLUDE) +AC_SUBST(APRUTIL_LIB) +LIBS="-L${APRUTIL_LIB} ${defaultlibs}" +AC_CHECK_LIB([aprutil-1], [apr_memcache_server_create], [], [AC_MSG_ERROR([couldn't find a suitable libaprutil-1, use --with-apr-util=PATH])]) AC_MSG_CHECKING([for httpd]) AC_ARG_WITH([httpd], [AC_HELP_STRING([--with-httpd=PATH], [path to installed Apache HTTPD [default=/usr]])], [ @@ -396,8 +411,8 @@ LIBS="-L${TINYCDB_LIB} ${defaultlibs}" AC_CHECK_LIB([cdb], [cdb_make_start], [], [AC_MSG_ERROR([couldn't find a suitable libcdb, use --with-tinycdb=PATH])]) # Configure default includes and ldflags -cxxflags="${cxxflags} ${INCLUDES} -I. -I${TUSCANY_SCACPP}/kernel -I${APR_INCLUDE} -I${HTTPD_INCLUDE} -I${LIBXML2_INCLUDE} -I${JS_INCLUDE} -I${LIBCURL_INCLUDE}" -ldflags="${ldflags} -ldl -L${APR_LIB} -R${APR_LIB} -lapr-2" +cxxflags="${cxxflags} ${INCLUDES} -I. -I${TUSCANY_SCACPP}/kernel -I${APR_INCLUDE} -I${APRUTIL_INCLUDE} -I${HTTPD_INCLUDE} -I${LIBXML2_INCLUDE} -I${JS_INCLUDE} -I${LIBCURL_INCLUDE}" +ldflags="${ldflags} -ldl -L${APR_LIB} -R${APR_LIB} -lapr-1 -L${APRUTIL_LIB} -R${APRUTIL_LIB} -laprutil-1" ldflags="${ldflags} -L${LIBCURL_LIB} -R${LIBCURL_LIB} -L${JS_LIB} -R${JS_LIB} -L${LIBXML2_LIB} -R${LIBXML2_LIB}" # Enable Python support. @@ -438,8 +453,10 @@ if test "${want_python}" = "true"; then LIBS="-L${PYTHON_LIB} ${defaultlibs}" if test -f "${PYTHON_LIB}/libpython2.7${libsuffix}"; then PYTHON_VERSION="2.7" + AC_DEFINE([PYTHON_VERSION], 27, [Python version]) else PYTHON_VERSION="2.6" + AC_DEFINE([PYTHON_VERSION], 26, [Python version]) fi AC_SUBST(PYTHON_VERSION) AC_CHECK_LIB([python${PYTHON_VERSION}], [Py_Initialize], [], [AC_MSG_ERROR([couldn't find a suitable libpython, use --with-python=PATH])]) diff --git a/sca-cpp/trunk/macos/macos-install b/sca-cpp/trunk/macos/macos-install index 82c802a901..40eb21c35d 100755 --- a/sca-cpp/trunk/macos/macos-install +++ b/sca-cpp/trunk/macos/macos-install @@ -16,8 +16,7 @@ # under the License. # Install a complete distribution, the required system tools and libraries, the -# runtime dependencies and the Tuscany SCA runtime on a fresh Mac OS X 10.6.7 -# system. +# runtime dependencies and the Tuscany SCA runtime on Mac OS X 10.6.7. # Display commands as they are executed set -x @@ -62,23 +61,38 @@ if [ "$?" != "0" ]; then fi cd $build -# Build Apache APR and HTTP server -svn co -r 1201086 http://svn.apache.org/repos/asf/apr/apr/trunk apr-1.4.x -cd apr-1.4.x -curl -OL http://svn.apache.org/repos/asf/tuscany/sca-cpp/trunk/patches/apr-1.4.x.patch -patch -p0 <apr-1.4.x.patch +# Build Apache APR and APR util +curl -OL http://archive.apache.org/dist/apr/apr-1.4.6.tar.gz +tar xzf apr-1.4.6.tar.gz +cd apr-1.4.6 ./buildconf -./configure -with-openssl --with-crypto --with-expat=$build/expat-2.0.1-bin --prefix=$build/apr-1.4.x-bin +./configure --prefix=$build/apr-1.4.6-bin make make install if [ "$?" != "0" ]; then exit $? fi cd $build -curl -OL http://archive.apache.org/dist/httpd/httpd-2.3.15-beta.tar.gz -tar xzf httpd-2.3.15-beta.tar.gz -cd httpd-2.3.15-beta -./configure --enable-ssl --enable-proxy --enable-usertrack --enable-cgi --enable-session-crypto --enable-mods-shared=most --enable-mpms-shared="prefork worker event" --with-mpm=prefork --with-apr=$build/apr-1.4.x-bin --with-expat=$build/expat-2.0.1-bin --with-pcre=$build/pcre-8.12-bin --prefix=$build/httpd-2.3.15-bin + +curl -OL http://archive.apache.org/dist/apr/apr-util-1.4.1.tar.gz +tar xzf apr-util-1.4.1.tar.gz +cd apr-util-1.4.1 +curl -OL http://svn.apache.org/repos/asf/tuscany/sca-cpp/trunk/patches/apr-util-1.4.1.patch +patch -p0 <apr-util-1.4.1.patch +./buildconf --with-apr=$build/apr-1.4.6 +./configure --with-apr=$build/apr-1.4.6-bin --with-openssl --with-crypto --with-expat=$build/expat-2.0.1-bin --prefix=$build/apr-util-1.4.1-bin +make +make install +if [ "$?" != "0" ]; then + exit $? +fi +cd $build + +# Build HTTP server +curl -OL http://archive.apache.org/dist/httpd/httpd-2.4.2.tar.gz +tar xzf httpd-2.4.2.tar.gz +cd httpd-2.4.2 +./configure --enable-ssl --enable-proxy --enable-usertrack --enable-cgi --enable-session-crypto --enable-mods-shared=most --enable-mpms-shared="prefork worker event" --with-mpm=prefork --with-apr=$build/apr-1.4.6-bin --with-apr-util=$build/apr-util-1.4.1-bin --with-pcre=$build/pcre-8.12-bin --with-expat=$build/expat-2.0.1-bin --prefix=$build/httpd-2.4.2-bin make make install if [ "$?" != "0" ]; then @@ -99,14 +113,11 @@ fi cd $build # Build Memcached -curl -OL http://memcached.googlecode.com/files/memcached-1.4.7.tar.gz -tar xzf memcached-1.4.7.tar.gz -cd memcached-1.4.7 -# http://code.google.com/p/memcached/issues/detail?id=218 -curl -OL http://svn.apache.org/repos/asf/tuscany/sca-cpp/trunk/patches/memcached-1.4.7.patch -patch -p0 <memcached-1.4.7.patch +curl -OL http://memcached.googlecode.com/files/memcached-1.4.13.tar.gz +tar xzf memcached-1.4.13.tar.gz +cd memcached-1.4.13 autoreconf --install -./configure --with-libevent=$build/libevent-2.0.13-stable-bin --prefix=$build/memcached-1.4.7-bin +./configure --with-libevent=$build/libevent-2.0.13-stable-bin --prefix=$build/memcached-1.4.13-bin make make install if [ "$?" != "0" ]; then @@ -125,21 +136,11 @@ if [ "$?" != "0" ]; then fi cd $build -# Build LevelDB -git clone https://code.google.com/p/leveldb/ -cd leveldb -make all -if [ "$?" != "0" ]; then - exit $? -fi -cd $build - - # Build Libcurl curl -OL http://curl.haxx.se/download/curl-7.24.0.tar.gz tar xzf curl-7.24.0.tar.gz cd curl-7.24.0 -./configure --prefix=$build/curl-7.24.0-bin --without-libidn +./configure --enable-threaded-resolver --prefix=$build/curl-7.24.0-bin --without-libidn make make install if [ "$?" != "0" ]; then @@ -203,49 +204,11 @@ if [ "$?" != "0" ]; then fi cd $build -# Build HTML Tidy -cvs -z3 -d:pserver:anonymous@tidy.cvs.sourceforge.net:/cvsroot/tidy co -P tidy -cd tidy -sh build/gnuauto/setup.sh -./configure --prefix=$build/htmltidy-bin -make -make install -if [ "$?" != "0" ]; then - exit $? -fi -cd $build - -# Build Libopkele -git clone git://github.com/jsdelfino/libopkele.git -cd libopkele -mkdir aclocal.d -cp $build/pkg-config-0.25-bin/share/aclocal/pkg.m4 aclocal.d -./autogen.bash -./configure --prefix=$build/libopkele-bin OPENSSL_CFLAGS=-I/usr/include OPENSSL_LIBS=-lssl --with-curl=$build/curl-7.24.0-bin --with-expat=$build/expat-2.0.1-bin --with-htmltidy=$build/htmltidy-bin -make -make install -if [ "$?" != "0" ]; then - exit $? -fi -cd $build - -# Build Mod_auth_openid -git clone git://github.com/jsdelfino/mod_auth_openid.git -cd mod_auth_openid -./autogen.sh -./configure --prefix=$build/mod-auth-openid-bin CXXFLAGS="-I$build/pcre-8.12-bin/include" --with-apr=$build/apr-1.4.x-bin --with-httpd=$build/httpd-2.3.15-bin --with-curl=$build/curl-7.24.0-bin --with-pcre=$build/pcre-8.12-bin --with-libopkele=$build/libopkele-bin -make -make install -if [ "$?" != "0" ]; then - exit $? -fi -cd $build - # Build Liboauth curl -OL http://liboauth.sourceforge.net/pool/liboauth-0.9.1.tar.gz tar xzf liboauth-0.9.1.tar.gz cd liboauth-0.9.1 -./configure PKG_CONFIG="$build/pkg-config-0.25-bin/bin/pkg-config" --prefix=$build/liboauth-0.9.1-bin CURL_CFLAGS="-I$build/curl-7.24.0-bin/include" CURL_LIBS="-L$build/curl-7.24.0-bin/lib -R$build/curl-7.24.0-bin/lib -lcurl" +./configure PKG_CONFIG="$build/pkg-config-0.25-bin/bin/pkg-config" --prefix=$build/liboauth-0.9.1-bin CURL_CFLAGS="-I$build/curl-7.24.0-bin/include" CURL_LIBS="-L$build/curl-7.24.0-bin/lib -lcurl" make make install if [ "$?" != "0" ]; then @@ -254,23 +217,23 @@ fi cd $build # Build mod_security -curl -L http://sourceforge.net/projects/mod-security/files/modsecurity-apache/2.6.1/modsecurity-apache_2.6.1.tar.gz/download -o modsecurity-apache_2.6.1.tar.gz -tar xzf modsecurity-apache_2.6.1.tar.gz -cd modsecurity-apache_2.6.1 -./configure --prefix=$build/modsecurity-apache-2.6.1-bin --with-apxs=$build/httpd-2.3.15-bin/bin/apxs --with-apr=$build/apr-1.4.x-bin/bin/apr-2-config --with-apu=$build/apr-1.4.x-bin/bin/apr-2-config --with-libxml=$build/libxml2-2.7.7-bin --with-curl=$build/curl-7.24.0-bin --with-pcre=$build/pcre-8.12-bin LIBS="-L$build/expat-2.0.1-bin/lib -R$build/expat-2.0.1-bin/lib" CFLAGS="-I$build/pcre-8.12-bin/include" +curl -OL http://people.apache.org/~jsdelfino/tuscany/cpp/dependencies/modsecurity-apache_2.6.6.tar.gz +tar xzf modsecurity-apache_2.6.6.tar.gz +cd modsecurity-apache_2.6.6 +./configure --prefix=$build/modsecurity-apache-2.6.6-bin --with-apxs=$build/httpd-2.4.2-bin/bin/apxs --with-apr=$build/apr-1.4.6-bin/bin/apr-1-config --with-apu=$build/apr-util-1.4.1-bin/bin/apu-1-config --with-libxml=$build/libxml2-2.7.7-bin --with-curl=$build/curl-7.24.0-bin --with-pcre=$build/pcre-8.12-bin LIBS="-L$build/expat-2.0.1-bin/lib" CFLAGS="-I$build/pcre-8.12-bin/include" make make install if [ "$?" != "0" ]; then exit $? fi cd $build -curl -L http://sourceforge.net/projects/mod-security/files/modsecurity-crs/0-CURRENT/modsecurity-crs_2.2.2.tar.gz/download -o modsecurity-crs_2.2.2.tar.gz -tar xzf modsecurity-crs_2.2.2.tar.gz -cd modsecurity-crs_2.2.2 -curl -OL http://svn.apache.org/repos/asf/tuscany/sca-cpp/trunk/patches/modsecurity-crs_2.2.2.patch -patch -p0 <modsecurity-crs_2.2.2.patch -cp -R base_rules $build/modsecurity-apache-2.6.1-bin -cp -R optional_rules $build/modsecurity-apache-2.6.1-bin +curl -OL http://people.apache.org/~jsdelfino/tuscany/cpp/dependencies/modsecurity-crs_2.2.5.tar.gz +tar xzf modsecurity-crs_2.2.5.tar.gz +cd modsecurity-crs_2.2.5 +#curl -OL http://svn.apache.org/repos/asf/tuscany/sca-cpp/trunk/patches/modsecurity-crs_2.2.2.patch +#patch -p0 <modsecurity-crs_2.2.2.patch +cp -R base_rules $build/modsecurity-apache-2.6.6-bin +cp -R optional_rules $build/modsecurity-apache-2.6.6-bin if [ "$?" != "0" ]; then exit $? fi @@ -300,10 +263,10 @@ fi cd $build # Build Python -curl -OL http://www.python.org/ftp/python/2.6.6/Python-2.6.6.tgz -tar xzf Python-2.6.6.tgz -cd Python-2.6.6 -./configure --prefix=$build/python-2.6.6-bin --enable-shared +curl -OL http://www.python.org/ftp/python/2.7.3/Python-2.7.3.tgz +tar xzf Python-2.7.3.tgz +cd Python-2.7.3 +./configure --prefix=$build/python-2.7.3-bin --enable-shared --with-system-expat=$build/expat-2.0.1-bin make make install if [ "$?" != "0" ]; then @@ -311,17 +274,6 @@ if [ "$?" != "0" ]; then fi cd $build -# Build Apache Libcloud -curl -OL http://archive.apache.org/dist/incubator/libcloud/apache-libcloud-incubating-0.4.2.tar.bz2 -tar xjf apache-libcloud-incubating-0.4.2.tar.bz2 -cd apache-libcloud-incubating-0.4.2 -python setup.py build -python setup.py install --home $build/libcloud-0.4.2-bin -if [ "$?" != "0" ]; then - exit $? -fi -cd $build - # Build Apache Nuvem git clone git://git.apache.org/nuvem.git if [ "$?" != "0" ]; then @@ -333,7 +285,7 @@ cd $build git clone git://git.apache.org/tuscany-sca-cpp.git cd tuscany-sca-cpp ./bootstrap -./configure --prefix=$build/tuscany-sca-cpp-bin --with-curl=$build/curl-7.24.0-bin --with-apr=$build/apr-1.4.x-bin --with-httpd=$build/httpd-2.3.15-bin --with-memcached=$build/memcached-1.4.7-bin --with-tinycdb=$build/tinycdb-bin --with-leveldb=$build/leveldb --with-js-include=$build/js-1.8.5-bin/include/js --with-js-lib=$build/js-1.8.5-bin/lib --enable-libcloud --with-libcloud=$build/libcloud-0.4.2-bin --enable-threads --enable-python --with-python=$build/python-2.6.6-bin --enable-opencl --with-libxml2=$build/libxml2-2.7.7-bin --enable-chat --with-libstrophe=$build/libstrophe-bin --enable-sqldb --with-pgsql=$build/postgresql-9.1.2-bin --with-pgbouncer=$build/pgbouncer-1.5-bin --enable-openid --with-mod-auth-openid=$build/mod-auth-openid-bin --enable-oauth --with-liboauth=$build/liboauth-0.9.1-bin --enable-mod-security --with-mod-security=$build/modsecurity-apache-2.6.1-bin +./configure --prefix=$build/tuscany-sca-cpp-bin --with-curl=$build/curl-7.24.0-bin --with-apr=$build/apr-1.4.6-bin --with-apr-util=$build/apr-util-1.4.1-bin --with-httpd=$build/httpd-2.4.2-bin --with-memcached=$build/memcached-1.4.13-bin --with-tinycdb=$build/tinycdb-bin --with-js-include=$build/js-1.8.5-bin/include/js --with-js-lib=$build/js-1.8.5-bin/lib --enable-threads --enable-python --with-python=$build/python-2.7.3-bin --enable-opencl --with-libxml2=$build/libxml2-2.7.7-bin --enable-chat --with-libstrophe=$build/libstrophe-bin --enable-sqldb --with-pgsql=$build/postgresql-9.1.2-bin --with-pgbouncer=$build/pgbouncer-1.5-bin --enable-oauth --with-liboauth=$build/liboauth-0.9.1-bin --enable-mod-security --with-mod-security=$build/modsecurity-apache-2.6.6-bin make make install if [ "$?" != "0" ]; then @@ -342,8 +294,8 @@ fi cd $build # Create src archive -tar czf tuscany-sca-cpp-1.0-src.tar.gz apache-libcloud-incubating-0.4.2 apache-libcloud-incubating-0.4.2.tar.bz2 apr-1.4.x apr-1.4.x-bin autoconf-2.13 autoconf-2.13-bin autoconf-2.13.tar.gz curl-7.24.0 curl-7.24.0-bin curl-7.24.0.tar.gz expat-2.0.1 expat-2.0.1-bin expat-2.0.1.tar.gz htmltidy-bin httpd-2.3.15-beta httpd-2.3.15-beta.tar.gz httpd-2.3.15-bin js-1.8.5-bin js-1.8.5 js185-1.0.0.tar.gz libcloud-0.4.2-bin libevent-2.0.13-stable libevent-2.0.13-stable-bin libevent-2.0.13-stable.tar.gz liboauth-0.9.1 liboauth-0.9.1-bin liboauth-0.9.1.tar.gz libopkele libopkele-bin libstrophe libstrophe-bin libxml2-2.7.7 libxml2-2.7.7-bin libxml2-sources-2.7.7.tar.gz memcached-1.4.7 memcached-1.4.7-bin memcached-1.4.7.tar.gz mod_auth_openid mod-auth-openid-bin modsecurity-apache_2.6.1 modsecurity-apache-2.6.0-bin modsecurity-apache_2.6.0.tar.gz modsecurity-crs_2.2.2 modsecurity-crs_2.2.2.tar.gz nspr-4.8.8-bin nspr-4.8.8 nspr-4.8.8.tar.gz nuvem pcre-8.12 pcre-8.12-bin pcre-8.12.zip pkg-config-0.25 pkg-config-0.25-bin pkg-config-0.25.tar.gz pgbouncer-1.5 pgbouncer-1.5-bin pgbouncer-1.5.tar.gz postgresql-9.1.2 postgresql-9.1.2-bin postgresql-9.1.2.tar.gz Python-2.6.6 python-2.6.6-bin Python-2.6.6.tgz tidy tinycdb tinycdb-bin leveldb tuscany-sca-cpp tuscany-sca-cpp-bin +tar czf tuscany-sca-cpp-1.0-src.tar.gz apr-1.4.6 apr-1.4.6.tar.gz apr-1.4.6-bin apr-util-1.4.1 apr-util-1.4.1.tar.gz apr-util-1.4.1-bin autoconf-2.13 autoconf-2.13-bin autoconf-2.13.tar.gz curl-7.24.0 curl-7.24.0-bin curl-7.24.0.tar.gz expat-2.0.1 expat-2.0.1-bin expat-2.0.1.tar.gz httpd-2.4.2 httpd-2.4.2.tar.gz httpd-2.4.2-bin js-1.8.5-bin js-1.8.5 js185-1.0.0.tar.gz libevent-2.0.13-stable libevent-2.0.13-stable-bin libevent-2.0.13-stable.tar.gz liboauth-0.9.1 liboauth-0.9.1-bin liboauth-0.9.1.tar.gz libstrophe libstrophe-bin libxml2-2.7.7 libxml2-2.7.7-bin libxml2-sources-2.7.7.tar.gz memcached-1.4.13 memcached-1.4.13-bin memcached-1.4.13.tar.gz modsecurity-apache_2.6.6 modsecurity-apache-2.6.0-bin modsecurity-apache_2.6.0.tar.gz modsecurity-crs_2.2.5 modsecurity-crs_2.2.5.tar.gz nspr-4.8.8-bin nspr-4.8.8 nspr-4.8.8.tar.gz nuvem pcre-8.12 pcre-8.12-bin pcre-8.12.zip pkg-config-0.25 pkg-config-0.25-bin pkg-config-0.25.tar.gz pgbouncer-1.5 pgbouncer-1.5-bin pgbouncer-1.5.tar.gz postgresql-9.1.2 postgresql-9.1.2-bin postgresql-9.1.2.tar.gz Python-2.7.3 python-2.7.3-bin Python-2.7.3.tgz tinycdb tinycdb-bin tuscany-sca-cpp tuscany-sca-cpp-bin # Create bin archive -tar czf tuscany-sca-cpp-1.0.tar.gz apr-1.4.x-bin curl-7.24.0-bin expat-2.0.1-bin htmltidy-bin httpd-2.3.15-bin js-1.8.5-bin libcloud-0.4.2-bin libevent-2.0.13-stable-bin liboauth-0.9.1-bin libopkele-bin libstrophe-bin libxml2-2.7.7-bin memcached-1.4.7-bin mod-auth-openid-bin modsecurity-apache-2.6.1-bin nspr-4.8.8-bin nuvem/nuvem-parallel pcre-8.12-bin pgbouncer-1.5-bin postgresql-9.1.2-bin python-2.6.6-bin tinycdb-bin leveldb tuscany-sca-cpp tuscany-sca-cpp-bin +tar czf tuscany-sca-cpp-1.0.tar.gz apr-1.4.6-bin apr-util-1.4.1-bin curl-7.24.0-bin expat-2.0.1-bin httpd-2.4.2-bin js-1.8.5-bin libevent-2.0.13-stable-bin liboauth-0.9.1-bin libstrophe-bin libxml2-2.7.7-bin memcached-1.4.13-bin modsecurity-apache-2.6.6-bin nspr-4.8.8-bin nuvem/nuvem-parallel pcre-8.12-bin pgbouncer-1.5-bin postgresql-9.1.2-bin python-2.7.3-bin tinycdb-bin tuscany-sca-cpp tuscany-sca-cpp-bin diff --git a/sca-cpp/trunk/modules/http/httpd-event-conf b/sca-cpp/trunk/modules/http/httpd-event-conf index a7cab03bc6..093bbe78d9 100755 --- a/sca-cpp/trunk/modules/http/httpd-event-conf +++ b/sca-cpp/trunk/modules/http/httpd-event-conf @@ -31,9 +31,15 @@ cat >$root/conf/mpm.conf <<EOF # Use HTTPD event MPM LoadModule mpm_event_module ${modules_prefix}/modules/mod_mpm_event.so -# Generated by: httpd-event-conf $* +EOF + +uname=`uname -s` +if [ $uname = "Darwin" ]; then + cat >>$root/conf/mpm.conf <<EOF +# Generated by: httpd-conf $* # Set thread stack size ThreadStackSize 2097152 EOF +fi diff --git a/sca-cpp/trunk/modules/http/httpd-worker-conf b/sca-cpp/trunk/modules/http/httpd-worker-conf index 84fe6b4a54..0a061dbffa 100755 --- a/sca-cpp/trunk/modules/http/httpd-worker-conf +++ b/sca-cpp/trunk/modules/http/httpd-worker-conf @@ -31,9 +31,15 @@ cat >$root/conf/mpm.conf <<EOF # Use HTTPD worker MPM LoadModule mpm_worker_module ${modules_prefix}/modules/mod_mpm_worker.so -# Generated by: httpd-event-conf $* +EOF + +uname=`uname -s` +if [ $uname = "Darwin" ]; then + cat >>$root/conf/mpm.conf <<EOF +# Generated by: httpd-conf $* # Set thread stack size ThreadStackSize 2097152 EOF +fi diff --git a/sca-cpp/trunk/modules/http/proxy-ssl-conf b/sca-cpp/trunk/modules/http/proxy-ssl-conf index 1d6ed9693a..ad7f26d83a 100755 --- a/sca-cpp/trunk/modules/http/proxy-ssl-conf +++ b/sca-cpp/trunk/modules/http/proxy-ssl-conf @@ -52,16 +52,16 @@ EOF cat >>$root/conf/svhost-ssl.conf <<EOF # Generated by: proxy-ssl-conf $* # Declare proxy SSL client certificates -SSLProxyCACertificateFile "$root/cert/ca.crt" -SSLProxyMachineCertificateFile "$root/cert/proxy.pem" +#SSLProxyCACertificateFile "$root/cert/ca.crt" +#SSLProxyMachineCertificateFile "$root/cert/proxy.pem" EOF cat >>$root/conf/dvhost-ssl.conf <<EOF # Generated by: proxy-ssl-conf $* # Declare proxy SSL client certificates -SSLProxyCACertificateFile "$root/cert/ca.crt" -SSLProxyMachineCertificateFile "$root/cert/proxy.pem" +#SSLProxyCACertificateFile "$root/cert/ca.crt" +#SSLProxyMachineCertificateFile "$root/cert/proxy.pem" EOF diff --git a/sca-cpp/trunk/modules/js/Makefile.am b/sca-cpp/trunk/modules/js/Makefile.am index 03cf04685f..38627678a1 100644 --- a/sca-cpp/trunk/modules/js/Makefile.am +++ b/sca-cpp/trunk/modules/js/Makefile.am @@ -18,22 +18,30 @@ incl_HEADERS = *.hpp incldir = $(prefix)/include/modules/js -BUILT_SOURCES = htdocs/all.js htdocs/all-min.js htdocs/ui-min.css -htdocs/all.js: htdocs/util.js htdocs/elemutil.js htdocs/xmlutil.js htdocs/atomutil.js htdocs/jsonutil.js htdocs/scdl.js htdocs/ui.js htdocs/component.js - cat htdocs/util.js htdocs/elemutil.js htdocs/xmlutil.js htdocs/atomutil.js htdocs/jsonutil.js htdocs/scdl.js htdocs/ui.js htdocs/component.js >htdocs/all.js +jsfiles = htdocs/util.js htdocs/elemutil.js htdocs/xmlutil.js htdocs/atomutil.js htdocs/jsonutil.js htdocs/scdl.js htdocs/ui.js htdocs/component.js -htdocs/all-min.js: htdocs/all.js - ../http/minify-js htdocs/all.js htdocs/all-min.js +BUILT_SOURCES = htdocs/all.js +htdocs/all.js: ${jsfiles} + cat $^ >htdocs/all.js -htdocs/ui-min.css: htdocs/ui.css - ../http/minify-css htdocs/ui.css htdocs/ui-min.css +minified = htdocs/all-min.js htdocs/ui-min.css -CLEANFILES = htdocs/all.js htdocs/all-min.js htdocs/ui-min.css +SUFFIXES = -min.html -min.js -min.css +.html-min.html: + ../../modules/http/minify-html $< $@ + +.js-min.js: + ../../modules/http/minify-js $< $@ + +.css-min.css: + ../../modules/http/minify-css $< $@ + +CLEANFILES = htdocs/all.js ${minified} dist_mod_SCRIPTS = js-conf moddir = $(prefix)/modules/js -nobase_dist_mod_DATA = htdocs/*.js htdocs/*.css -EXTRA_DIST = htdocs/*.js htdocs/*.css htdocs/all.js +nobase_dist_mod_DATA = ${minified} +EXTRA_DIST = ${jsfiles} htdocs/ui.css js_test_SOURCES = js-test.cpp js_test_LDFLAGS = -lmozjs @@ -45,3 +53,4 @@ noinst_PROGRAMS = js-test mod_PROGRAMS = js-shell dist_noinst_SCRIPTS = util-test TESTS = js-test util-test + diff --git a/sca-cpp/trunk/modules/wsgi/Makefile.am b/sca-cpp/trunk/modules/wsgi/Makefile.am index c41e2bc118..43cffb2254 100644 --- a/sca-cpp/trunk/modules/wsgi/Makefile.am +++ b/sca-cpp/trunk/modules/wsgi/Makefile.am @@ -48,11 +48,11 @@ client_test_LDFLAGS = -lxml2 -lcurl -lmozjs noinst_PROGRAMS = client-test dist_noinst_SCRIPTS = util-test wsgi-test wiring-test http-test server-test -TESTS = util-test wsgi-test wiring-test http-test server-test +TESTS = util-test if WANT_GAE dist_noinst_SCRIPTS += gae-test -TESTS += gae-test +TESTS += wsgi-test wiring-test http-test server-test gae-test endif endif diff --git a/sca-cpp/trunk/patches/apr-1.4.x.patch b/sca-cpp/trunk/patches/apr-util-1.4.1.patch index 2b88d3575f..2b88d3575f 100644 --- a/sca-cpp/trunk/patches/apr-1.4.x.patch +++ b/sca-cpp/trunk/patches/apr-util-1.4.1.patch diff --git a/sca-cpp/trunk/patches/memcached-1.4.7.patch b/sca-cpp/trunk/patches/memcached-1.4.7.patch deleted file mode 100644 index f34d75753e..0000000000 --- a/sca-cpp/trunk/patches/memcached-1.4.7.patch +++ /dev/null @@ -1,12 +0,0 @@ ---- configure.ac -+++ configure.ac -@@ -247,7 +247,7 @@ AC_CACHE_CHECK([for libevent directory], ac_cv_libevent_dir, [ - AS_IF(test "$SUNCC" = "yes" -o "x$_myos" = "xsolaris2", - [saved_LDFLAGS="$saved_LDFLAGS -Wl,-R$ledir/lib"], - [AS_IF(test "$GCC" = "yes", -- [saved_LDFLAGS="$saved_LDFLAGS -Wl,-rpath=$ledir/lib"])]) -+ [saved_LDFLAGS="$saved_LDFLAGS -Wl,-rpath,$ledir/lib"])]) - else - ac_cv_libevent_dir="(system)" - fi - diff --git a/sca-cpp/trunk/patches/scribe.patch b/sca-cpp/trunk/patches/scribe-2.2.patch index 6340c4634d..16c2e3871e 100644 --- a/sca-cpp/trunk/patches/scribe.patch +++ b/sca-cpp/trunk/patches/scribe-2.2.patch @@ -12,7 +12,7 @@ --- src/file.cpp +++ src/file.cpp -@@ -74,9 +74,21 @@ bool StdFile::openRead() { +@@ -74,9 +74,21 @@ } bool StdFile::openWrite() { @@ -38,7 +38,7 @@ --- src/scribe_server.cpp +++ src/scribe_server.cpp -@@ -55,6 +55,8 @@ int main(int argc, char **argv) { +@@ -55,6 +55,8 @@ if (-1 == setrlimit(RLIMIT_NOFILE, &r_fd)) { LOG_OPER("setrlimit error (setting max fd size)"); } @@ -47,4 +47,32 @@ int next_option; const char* const short_options = "hp:c:"; +@@ -110,7 +112,7 @@ + } + + TNonblockingServer server(processor, binaryProtocolFactory, +- g_Handler->port, thread_manager); ++ g_Handler->host, g_Handler->port, thread_manager); + + LOG_OPER("Starting scribe server on port %lu", g_Handler->port); + fflush(stderr); +@@ -583,6 +585,8 @@ + throw runtime_error("No port number configured"); + } + ++ config.getString("host", host); ++ + // check if config sets the size to use for the ThreadManager + unsigned long int num_threads; + if (config.getUnsigned("num_thrift_server_threads", num_threads)) { +--- src/scribe_server.h ++++ src/scribe_server.h +@@ -51,6 +51,7 @@ + void setStatusDetails(const std::string& new_status_details); + + unsigned long int port; // it's long because that's all I implemented in the conf class ++ std::string host; + + // number of threads processing new Thrift connections + size_t numThriftServerThreads; diff --git a/sca-cpp/trunk/patches/thrift-0.2.0.patch b/sca-cpp/trunk/patches/thrift-0.2.0.patch new file mode 100644 index 0000000000..a834faca02 --- /dev/null +++ b/sca-cpp/trunk/patches/thrift-0.2.0.patch @@ -0,0 +1,39 @@ +--- lib/cpp/src/server/TNonblockingServer.cpp ++++ lib/cpp/src/server/TNonblockingServer.cpp +@@ -622,8 +622,8 @@ + hints.ai_flags = AI_PASSIVE | AI_ADDRCONFIG; + sprintf(port, "%d", port_); + +- // Wildcard address +- error = getaddrinfo(NULL, port, &hints, &res0); ++ // Wildcard or specified address ++ error = getaddrinfo(host_ == "" || host_ =="*"? NULL : host_.c_str(), port, &hints, &res0); + if (error) { + string errStr = "TNonblockingServer::serve() getaddrinfo " + string(gai_strerror(error)); + GlobalOutput(errStr.c_str()); + +--- lib/cpp/src/server/TNonblockingServer.h ++++ lib/cpp/src/server/TNonblockingServer.h +@@ -65,6 +65,9 @@ + // Server socket file descriptor + int serverSocket_; + ++ // Host server runs on ++ std::string host_; ++ + // Port server runs on + int port_; + +@@ -117,10 +120,12 @@ + + TNonblockingServer(boost::shared_ptr<TProcessor> processor, + boost::shared_ptr<TProtocolFactory> protocolFactory, ++ std::string host, + int port, + boost::shared_ptr<ThreadManager> threadManager = boost::shared_ptr<ThreadManager>()) : + TServer(processor), + serverSocket_(-1), ++ host_(host), + port_(port), + threadManager_(threadManager), + eventBase_(NULL), diff --git a/sca-cpp/trunk/ubuntu/Makefile.am b/sca-cpp/trunk/ubuntu/Makefile.am index 629e65be46..a1e092944c 100644 --- a/sca-cpp/trunk/ubuntu/Makefile.am +++ b/sca-cpp/trunk/ubuntu/Makefile.am @@ -18,5 +18,5 @@ dist_ubuntu_SCRIPTS = ip-redirect ip-redirect-all uec2-conf uec2-setenv uec2-ssh uec2-start uec2-status uec2-stop ubuntudir=$(prefix)/ubuntu -dist_noinst_SCRIPTS = ubuntu-bin-image ubuntu-bin-all-image ubuntu-dev-image ubuntu-dev-all-image ubuntu-install ubuntu-backup ubuntu-install-all ubuntu-backup-all uec2-bin-image uec2-bin-all-image uec2-dev-image uec2-dev-all-image +dist_noinst_SCRIPTS = ubuntu-bin-image ubuntu-bin-all-image ubuntu-dev-image ubuntu-dev-all-image ubuntu-install ubuntu-install-dependencies ubuntu-backup ubuntu-install-all ubuntu-install-all-dependencies ubuntu-backup-all uec2-bin-image uec2-bin-all-image uec2-dev-image uec2-dev-all-image diff --git a/sca-cpp/trunk/ubuntu/ip-redirect b/sca-cpp/trunk/ubuntu/ip-redirect index e78c63935b..f2f33e27ff 100755 --- a/sca-cpp/trunk/ubuntu/ip-redirect +++ b/sca-cpp/trunk/ubuntu/ip-redirect @@ -26,10 +26,10 @@ tport=$2 dest=$3 # Redirect external incoming traffic -sudo /sbin/iptables -t nat -S PREROUTING | grep "\-d $dest/" | grep "\-p tcp" | grep "\-\-dport $sport" | grep "\-j REDIRECT" | sed "s/^-A/-D/" | awk -F "\t" '{ printf "sudo /sbin/iptables -t nat %s\n", $1 }' | /bin/sh -sudo /sbin/iptables -t nat -A PREROUTING --destination $dest -p tcp --dport $sport -j REDIRECT --to-ports $tport +sudo /sbin/iptables -t nat -S PREROUTING | grep "\-d $dest/" | grep "\-p tcp" | grep "\-\-dport $sport" | grep "\-j DNAT" | sed "s/^-A/-D/" | awk -F "\t" '{ printf "sudo /sbin/iptables -t nat %s\n", $1 }' | /bin/sh +sudo /sbin/iptables -t nat -A PREROUTING --destination $dest -p tcp --dport $sport -j DNAT --to $dest:$tport # Redirect local traffic as well -sudo /sbin/iptables -t nat -S OUTPUT | grep "\-d $dest/" | grep "\-p tcp" | grep "\-\-dport $sport" | grep "\-j REDIRECT" | sed "s/^-A/-D/" | awk -F "\t" '{ printf "sudo /sbin/iptables -t nat %s\n", $1 }' | /bin/sh -sudo /sbin/iptables -t nat -A OUTPUT --destination $dest -p tcp --dport $sport -j REDIRECT --to-ports $tport +sudo /sbin/iptables -t nat -S OUTPUT | grep "\-d $dest/" | grep "\-p tcp" | grep "\-\-dport $sport" | grep "\-j DNAT" | sed "s/^-A/-D/" | awk -F "\t" '{ printf "sudo /sbin/iptables -t nat %s\n", $1 }' | /bin/sh +sudo /sbin/iptables -t nat -A OUTPUT --destination $dest -p tcp --dport $sport -j DNAT --to $dest:$tport diff --git a/sca-cpp/trunk/ubuntu/ubuntu-backup b/sca-cpp/trunk/ubuntu/ubuntu-backup index ac20e6cc1e..55c5f7e61b 100755 --- a/sca-cpp/trunk/ubuntu/ubuntu-backup +++ b/sca-cpp/trunk/ubuntu/ubuntu-backup @@ -15,16 +15,14 @@ # specific language governing permissions and limitations # under the License. -# Install a complete distribution, the required system tools and libraries, the -# runtime dependencies and the Tuscany SCA runtime on a fresh Ubuntu Server -# 10.10 system. +# Create backup archives of a minimal Tuscany SCA runtime distribution. # Display commands as they are executed set -x # Create src archive -tar czf tuscany-sca-cpp-1.0-src.tar.gz apache-libcloud-incubating-0.4.2 apache-libcloud-incubating-0.4.2.tar.bz2 apr-1.4.x apr-1.4.x-bin curl-7.24.0 curl-7.24.0-bin curl-7.24.0.tar.gz expat-2.0.1 expat-2.0.1-bin expat-2.0.1.tar.gz htmltidy-bin httpd-2.3.15-beta httpd-2.3.15-beta.tar.gz httpd-2.3.15-bin js-1.8.5-bin js-1.8.5 js185-1.0.0.tar.gz libcloud-0.4.2-bin liboauth-0.9.1 liboauth-0.9.1-bin liboauth-0.9.1.tar.gz libopkele libopkele-bin libstrophe libstrophe-bin libxml2-2.7.7 libxml2-2.7.7-bin libxml2-sources-2.7.7.tar.gz memcached-1.4.7 memcached-1.4.7-bin memcached-1.4.7.tar.gz mod_auth_openid mod-auth-openid-bin modsecurity-apache_2.6.1 modsecurity-apache-2.6.1-bin modsecurity-apache_2.6.1.tar.gz modsecurity-crs_2.2.2 modsecurity-crs_2.2.2.tar.gz nspr-4.8.8-bin nspr-4.8.8 nspr-4.8.8.tar.gz nuvem page-speed-1.9 page-speed-1.9-bin page-speed-sdk.zip pgbouncer-1.5 pgbouncer-1.5-bin pgbouncer-1.5.tar.gz postgresql-9.1.2 postgresql-9.1.2-bin postgresql-9.1.2.tar.gz Python-2.6.6 python-2.6.6-bin Python-2.6.6.tgz scribe scribe-2.2-bin scribe-2.2.tar.gz thrift-0.2.0 thrift-0.2.0-bin thrift-0.2.0-incubating.tar.gz tidy tinycdb-0.77 tinycdb-0.77-bin tinycdb_0.77.tar.gz tuscany-sca-cpp tuscany-sca-cpp-bin +tar czf tuscany-sca-cpp-1.0-src.tar.gz apr-1.4.6.tar.gz apr-1.4.6 apr-1.4.6-bin apr-util-1.4.1.tar.gz apr-util-1.4.1 apr-util-1.4.1-bin curl-7.24.0 curl-7.24.0-bin curl-7.24.0.tar.gz expat-2.0.1 expat-2.0.1-bin expat-2.0.1.tar.gz httpd-2.4.2 httpd-2.4.2.tar.gz httpd-2.4.2-bin js-1.8.5-bin js-1.8.5 js185-1.0.0.tar.gz liboauth-0.9.1 liboauth-0.9.1-bin liboauth-0.9.1.tar.gz libstrophe libstrophe-bin libxml2-2.7.7 libxml2-2.7.7-bin libxml2-sources-2.7.7.tar.gz memcached-1.4.13 memcached-1.4.13-bin memcached-1.4.13.tar.gz modsecurity-apache_2.6.6 modsecurity-apache-2.6.6-bin modsecurity-apache_2.6.6.tar.gz modsecurity-crs_2.2.5 modsecurity-crs_2.2.5.tar.gz nspr-4.8.8-bin nspr-4.8.8 nspr-4.8.8.tar.gz nuvem page-speed-1.9 page-speed-1.9-bin page-speed-sdk.zip pgbouncer-1.5 pgbouncer-1.5-bin pgbouncer-1.5.tar.gz postgresql-9.1.2 postgresql-9.1.2-bin postgresql-9.1.2.tar.gz Python-2.7.3 python-2.7.3-bin Python-2.7.3.tgz scribe scribe-2.2-bin scribe-2.2.tar.gz thrift-0.2.0 thrift-0.2.0-bin thrift-0.2.0-incubating.tar.gz tinycdb-0.77 tinycdb-0.77-bin tinycdb_0.77.tar.gz tuscany-sca-cpp tuscany-sca-cpp-bin # Create bin archive -tar czf tuscany-sca-cpp-1.0.tar.gz apr-1.4.x-bin curl-7.24.0-bin expat-2.0.1-bin htmltidy-bin httpd-2.3.15-bin js-1.8.5-bin libcloud-0.4.2-bin liboauth-0.9.1-bin libopkele-bin libstrophe-bin libxml2-2.7.7-bin memcached-1.4.7-bin mod-auth-openid-bin modsecurity-apache-2.6.1-bin nspr-4.8.8-bin nuvem/nuvem-parallel page-speed-1.9-bin pgbouncer-1.5-bin postgresql-9.1.2-bin python-2.6.6-bin scribe-2.2-bin thrift-0.2.0-bin tinycdb-0.77-bin tuscany-sca-cpp tuscany-sca-cpp-bin +tar czf tuscany-sca-cpp-1.0.tar.gz apr-1.4.6-bin apr-util-1.4.1-bin curl-7.24.0-bin expat-2.0.1-bin httpd-2.4.2-bin js-1.8.5-bin liboauth-0.9.1-bin libstrophe-bin libxml2-2.7.7-bin memcached-1.4.13-bin modsecurity-apache-2.6.6-bin nspr-4.8.8-bin nuvem/nuvem-parallel page-speed-1.9-bin pgbouncer-1.5-bin postgresql-9.1.2-bin python-2.7.3-bin scribe-2.2-bin thrift-0.2.0-bin tinycdb-0.77-bin tuscany-sca-cpp tuscany-sca-cpp-bin diff --git a/sca-cpp/trunk/ubuntu/ubuntu-backup-all b/sca-cpp/trunk/ubuntu/ubuntu-backup-all index 80dccdaf81..9a740c46de 100755 --- a/sca-cpp/trunk/ubuntu/ubuntu-backup-all +++ b/sca-cpp/trunk/ubuntu/ubuntu-backup-all @@ -15,16 +15,14 @@ # specific language governing permissions and limitations # under the License. -# Install a complete distribution, the required system tools and libraries, the -# runtime dependencies and the Tuscany SCA runtime on a fresh Ubuntu Server -# 10.10 system. +# Create backup archives of a complete Tuscany SCA runtime distribution. # Display commands as they are executed set -x # Create src archive -tar czf tuscany-sca-cpp-all-1.0-src.tar.gz apache-libcloud-incubating-0.4.2 apache-libcloud-incubating-0.4.2.tar.bz2 apr-1.4.x apr-1.4.x-bin axis2c-1.6.0-bin axis2c-src-1.6.0 axis2c-src-1.6.0.tar.gz curl-7.24.0 curl-7.24.0-bin curl-7.24.0.tar.gz expat-2.0.1 expat-2.0.1-bin expat-2.0.1.tar.gz google_appengine google_appengine_1.4.0.zip htmltidy-bin httpd-2.3.15-beta httpd-2.3.15-beta.tar.gz httpd-2.3.15-bin js-1.8.5-bin js-1.8.5 js185-1.0.0.tar.gz libcloud-0.4.2-bin liboauth-0.9.1 liboauth-0.9.1-bin liboauth-0.9.1.tar.gz libopkele libopkele-bin libstrophe libstrophe-bin libxml2-2.7.7 libxml2-2.7.7-bin libxml2-sources-2.7.7.tar.gz memcached-1.4.7 memcached-1.4.7-bin memcached-1.4.7.tar.gz mod_auth_openid mod-auth-openid-bin modsecurity-apache_2.6.1 modsecurity-apache-2.6.1-bin modsecurity-apache_2.6.1.tar.gz modsecurity-crs_2.2.2 modsecurity-crs_2.2.2.tar.gz nspr-4.8.8-bin nspr-4.8.8 nspr-4.8.8.tar.gz nuvem page-speed-1.9 page-speed-1.9-bin page-speed-sdk.zip pgbouncer-1.5 pgbouncer-1.5-bin pgbouncer-1.5.tar.gz postgresql-9.1.2 postgresql-9.1.2-bin postgresql-9.1.2.tar.gz Python-2.6.6 python-2.6.6-bin Python-2.6.6.tgz qpidc-0.6 qpidc-0.6-bin qpid-cpp-0.6.tar.gz scribe scribe-2.2-bin scribe-2.2.tar.gz thrift-0.2.0 thrift-0.2.0-bin thrift-0.2.0-incubating.tar.gz tidy tinycdb-0.77 tinycdb-0.77-bin tinycdb_0.77.tar.gz tuscany-sca-cpp tuscany-sca-cpp-bin vysper-0.6 vysper-0.6-bin.tar.gz +tar czf tuscany-sca-cpp-all-1.0-src.tar.gz apache-libcloud-incubating-0.4.2 apache-libcloud-incubating-0.4.2.tar.bz2 apr-1.4.6 apr-1.4.6.tar.gz apr-1.4.6-bin apr-util-1.4.1 apr-util-1.4.1.tar.gz apr-util-1.4.1-bin axis2c-1.6.0-bin axis2c-src-1.6.0 axis2c-src-1.6.0.tar.gz curl-7.24.0 curl-7.24.0-bin curl-7.24.0.tar.gz expat-2.0.1 expat-2.0.1-bin expat-2.0.1.tar.gz google_appengine google_appengine_1.4.0.zip htmltidy-bin httpd-2.3.15-beta httpd-2.3.15-beta.tar.gz httpd-2.3.15-bin js-1.8.5-bin js-1.8.5 js185-1.0.0.tar.gz libcloud-0.4.2-bin liboauth-0.9.1 liboauth-0.9.1-bin liboauth-0.9.1.tar.gz libopkele libopkele-bin libstrophe libstrophe-bin libxml2-2.7.7 libxml2-2.7.7-bin libxml2-sources-2.7.7.tar.gz memcached-1.4.13 memcached-1.4.13-bin memcached-1.4.13.tar.gz mod_auth_openid mod-auth-openid-bin modsecurity-apache_2.6.6 modsecurity-apache-2.6.6-bin modsecurity-apache_2.6.6.tar.gz modsecurity-crs_2.2.5 modsecurity-crs_2.2.5.tar.gz nspr-4.8.8-bin nspr-4.8.8 nspr-4.8.8.tar.gz nuvem page-speed-1.9 page-speed-1.9-bin page-speed-sdk.zip pgbouncer-1.5 pgbouncer-1.5-bin pgbouncer-1.5.tar.gz postgresql-9.1.2 postgresql-9.1.2-bin postgresql-9.1.2.tar.gz Python-2.7.3 python-2.7.3-bin Python-2.7.3.tgz qpidc-0.6 qpidc-0.6-bin qpid-cpp-0.6.tar.gz scribe scribe-2.2-bin scribe-2.2.tar.gz thrift-0.2.0 thrift-0.2.0-bin thrift-0.2.0-incubating.tar.gz tidy tinycdb-0.77 tinycdb-0.77-bin tinycdb_0.77.tar.gz tuscany-sca-cpp tuscany-sca-cpp-bin vysper-0.6 vysper-0.6-bin.tar.gz # Create bin archive -tar czf tuscany-sca-cpp-all-1.0.tar.gz apr-1.4.x-bin axis2c-1.6.0-bin curl-7.24.0-bin expat-2.0.1-bin google_appengine htmltidy-bin httpd-2.3.15-bin js-1.8.5-bin libcloud-0.4.2-bin liboauth-0.9.1-bin libopkele-bin libstrophe-bin libxml2-2.7.7-bin memcached-1.4.7-bin mod-auth-openid-bin modsecurity-apache-2.6.1-bin nspr-4.8.8-bin nuvem/nuvem-parallel page-speed-1.9-bin pgbouncer-1.5-bin postgresql-9.1.2-bin python-2.6.6-bin qpidc-0.6-bin scribe-2.2-bin thrift-0.2.0-bin tinycdb-0.77-bin tuscany-sca-cpp tuscany-sca-cpp-bin vysper-0.6 +tar czf tuscany-sca-cpp-all-1.0.tar.gz apr-1.4.6-bin apr-util-1.4.1-bin axis2c-1.6.0-bin curl-7.24.0-bin expat-2.0.1-bin google_appengine htmltidy-bin httpd-2.3.15-bin js-1.8.5-bin libcloud-0.4.2-bin liboauth-0.9.1-bin libopkele-bin libstrophe-bin libxml2-2.7.7-bin memcached-1.4.13-bin mod-auth-openid-bin modsecurity-apache-2.6.6-bin nspr-4.8.8-bin nuvem/nuvem-parallel page-speed-1.9-bin pgbouncer-1.5-bin postgresql-9.1.2-bin python-2.7.3-bin qpidc-0.6-bin scribe-2.2-bin thrift-0.2.0-bin tinycdb-0.77-bin tuscany-sca-cpp tuscany-sca-cpp-bin vysper-0.6 diff --git a/sca-cpp/trunk/ubuntu/ubuntu-bin-all-image b/sca-cpp/trunk/ubuntu/ubuntu-bin-all-image index b230d75728..ff1b75298c 100755 --- a/sca-cpp/trunk/ubuntu/ubuntu-bin-all-image +++ b/sca-cpp/trunk/ubuntu/ubuntu-bin-all-image @@ -16,8 +16,7 @@ # under the License. # Install a complete distribution, the required system tools and libraries, -# the runtime dependencies and the Tuscany SCA runtime on a fresh Ubuntu Server -# 10.10 image. +# runtime dependencies and the Tuscany SCA runtime on Ubuntu Server 12.04. # Display commands as they are executed set -x @@ -28,57 +27,66 @@ sudo apt-get update # Create install directory u=`id -un` g=`id -gn` -sudo mkdir -p /mnt/tuscany -sudo chown $u /mnt/tuscany -sudo chgrp $g /mnt/tuscany -cd /mnt/tuscany +sudo mkdir -p /opt/tuscany +sudo chown $u /opt/tuscany +sudo chgrp $g /opt/tuscany +cd /opt/tuscany # Install core dev tools sudo apt-get -y install curl git-core subversion autoconf pkg-config automake libtool g++ make gdb vim if [ "$?" != "0" ]; then exit $? fi -# Required by Apache HTTP server + +# Install the Apache HTTP server dependencies sudo apt-get -y install libssl-dev libpcre3-dev if [ "$?" != "0" ]; then exit $? fi -# Required by Memcached + +# Install the Memcached dependencies sudo apt-get -y install libevent-dev if [ "$?" != "0" ]; then exit $? fi -# Required by SpiderMonkey + +# Install the SpiderMonkey dependencies sudo apt-get -y install zip unzip if [ "$?" != "0" ]; then exit $? fi -# Required by Apache Qpid/C++ + +# Install the Apache Qpid/C++ dependencies sudo apt-get -y install libboost-dev libboost-program-options-dev libboost-filesystem-dev uuid-dev if [ "$?" != "0" ]; then exit $? fi -# Required by Apache Vysper + +# Install the Apache Vysper dependencies sudo apt-get -y install openjdk-6-jdk if [ "$?" != "0" ]; then exit $? fi -# Required by HTML Tidy + +# Install the HTML Tidy dependencies sudo apt-get -y install cvs if [ "$?" != "0" ]; then exit $? fi -# Required by PostgreSQL + +# Install the PostgreSQL dependencies sudo apt-get -y install libreadline-dev if [ "$?" != "0" ]; then exit $? fi -# Required by Apache Thrift + +# Install the Apache Thrift dependencies sudo apt-get -y install bison flex if [ "$?" != "0" ]; then exit $? fi -# Required by Facebook Scribe + +# Install the Facebook Scribe dependencies sudo apt-get -y install gawk if [ "$?" != "0" ]; then exit $? diff --git a/sca-cpp/trunk/ubuntu/ubuntu-bin-image b/sca-cpp/trunk/ubuntu/ubuntu-bin-image index 6c1082ac3a..d9bd4a919c 100755 --- a/sca-cpp/trunk/ubuntu/ubuntu-bin-image +++ b/sca-cpp/trunk/ubuntu/ubuntu-bin-image @@ -15,9 +15,8 @@ # specific language governing permissions and limitations # under the License. -# Install a complete distribution, the required system tools and libraries, -# the runtime dependencies and the Tuscany SCA runtime on a fresh Ubuntu Server -# 10.10 image. +# Install a minimal distribution, the required system tools and libraries, +# runtime dependencies and the Tuscany SCA runtime on Ubuntu Server 12.04. # Display commands as they are executed set -x @@ -28,42 +27,48 @@ sudo apt-get update # Create install directory u=`id -un` g=`id -gn` -sudo mkdir -p /mnt/tuscany -sudo chown $u /mnt/tuscany -sudo chgrp $g /mnt/tuscany -cd /mnt/tuscany +sudo mkdir -p /opt/tuscany +sudo chown $u /opt/tuscany +sudo chgrp $g /opt/tuscany +cd /opt/tuscany # Install core dev tools sudo apt-get -y install curl git-core subversion autoconf pkg-config automake libtool g++ make gdb vim if [ "$?" != "0" ]; then exit $? fi -# Required by Apache HTTP server + +# Install the Apache HTTP server dependencies sudo apt-get -y install libssl-dev libpcre3-dev if [ "$?" != "0" ]; then exit $? fi -# Required by Memcached + +# Install the Memcached dependencies sudo apt-get -y install libevent-dev if [ "$?" != "0" ]; then exit $? fi -# Required by SpiderMonkey + +# Install the SpiderMonkey dependencies sudo apt-get -y install zip unzip if [ "$?" != "0" ]; then exit $? fi -# Required by HTML Tidy -sudo apt-get -y install cvs + +# Install the PostgreSQL dependencies +sudo apt-get -y install libreadline-dev if [ "$?" != "0" ]; then exit $? fi -# Required by Apache Thrift + +# Install the Apache Thrift dependencies sudo apt-get -y install bison flex libboost-dev libboost-filesystem-dev if [ "$?" != "0" ]; then exit $? fi -# Required by Facebook Scribe + +# Install the Facebook Scribe dependencies sudo apt-get -y install gawk if [ "$?" != "0" ]; then exit $? diff --git a/sca-cpp/trunk/ubuntu/ubuntu-dev-all-image b/sca-cpp/trunk/ubuntu/ubuntu-dev-all-image index 9f812f61a1..4015550662 100755 --- a/sca-cpp/trunk/ubuntu/ubuntu-dev-all-image +++ b/sca-cpp/trunk/ubuntu/ubuntu-dev-all-image @@ -16,8 +16,7 @@ # under the License. # Install a complete distribution, the required system tools and libraries, -# the runtime dependencies and the Tuscany SCA runtime on a fresh Ubuntu -# Server 10.10 image. +# runtime dependencies and the Tuscany SCA runtime on Ubuntu Server 12.04. # Display commands as they are executed set -x @@ -28,10 +27,10 @@ sudo apt-get update # Create install directory u=`id -un` g=`id -gn` -sudo mkdir -p /mnt/tuscany -sudo chown $u /mnt/tuscany -sudo chgrp $g /mnt/tuscany -cd /mnt/tuscany +sudo mkdir -p /opt/tuscany +sudo chown $u /opt/tuscany +sudo chgrp $g /opt/tuscany +cd /opt/tuscany # Download and run install script sudo apt-get -y install curl diff --git a/sca-cpp/trunk/ubuntu/ubuntu-dev-image b/sca-cpp/trunk/ubuntu/ubuntu-dev-image index 647e5a2e76..10f821a39b 100755 --- a/sca-cpp/trunk/ubuntu/ubuntu-dev-image +++ b/sca-cpp/trunk/ubuntu/ubuntu-dev-image @@ -15,9 +15,8 @@ # specific language governing permissions and limitations # under the License. -# Install a complete distribution, the required system tools and libraries, -# the runtime dependencies and the Tuscany SCA runtime on a fresh Ubuntu -# Server 10.10 image. +# Install a minimal distribution, the required system tools and libraries, +# runtime dependencies and the Tuscany SCA runtime on a Ubuntu Server 12.04. # Display commands as they are executed set -x @@ -28,10 +27,10 @@ sudo apt-get update # Create install directory u=`id -un` g=`id -gn` -sudo mkdir -p /mnt/tuscany -sudo chown $u /mnt/tuscany -sudo chgrp $g /mnt/tuscany -cd /mnt/tuscany +sudo mkdir -p /opt/tuscany +sudo chown $u /opt/tuscany +sudo chgrp $g /opt/tuscany +cd /opt/tuscany # Download and run install script sudo apt-get -y install curl diff --git a/sca-cpp/trunk/ubuntu/ubuntu-install b/sca-cpp/trunk/ubuntu/ubuntu-install index ef2209122b..fbd2587e13 100755 --- a/sca-cpp/trunk/ubuntu/ubuntu-install +++ b/sca-cpp/trunk/ubuntu/ubuntu-install @@ -15,9 +15,8 @@ # specific language governing permissions and limitations # under the License. -# Install a complete distribution, the required system tools and libraries, the -# runtime dependencies and the Tuscany SCA runtime on a fresh Ubuntu Server -# 10.10 system. +# Install a minimal distribution, the required system tools and libraries, +# runtime dependencies and the Tuscany SCA runtime on Ubuntu Server 12.04. # Display commands as they are executed set -x @@ -25,6 +24,9 @@ set -x # Build and install in the current directory build=`pwd` +# First update the system +sudo apt-get update + # Install core dev tools sudo apt-get -y install curl git-core subversion autoconf pkg-config automake libtool g++ make gdb vim if [ "$?" != "0" ]; then @@ -43,27 +45,42 @@ if [ "$?" != "0" ]; then fi cd $build -# Build Apache APR and HTTP server +# Build Apache APR and APR util sudo apt-get -y install libssl-dev libpcre3-dev if [ "$?" != "0" ]; then exit $? fi -svn co -r 1201086 http://svn.apache.org/repos/asf/apr/apr/trunk apr-1.4.x -cd apr-1.4.x -curl -OL http://svn.apache.org/repos/asf/tuscany/sca-cpp/trunk/patches/apr-1.4.x.patch -patch -p0 <apr-1.4.x.patch +curl -OL http://archive.apache.org/dist/apr/apr-1.4.6.tar.gz +tar xzf apr-1.4.6.tar.gz +cd apr-1.4.6 ./buildconf -./configure -with-openssl --with-crypto --with-expat=$build/expat-2.0.1-bin --prefix=$build/apr-1.4.x-bin +./configure --prefix=$build/apr-1.4.6-bin make make install if [ "$?" != "0" ]; then exit $? fi cd $build -curl -OL http://archive.apache.org/dist/httpd/httpd-2.3.15-beta.tar.gz -tar xzf httpd-2.3.15-beta.tar.gz -cd httpd-2.3.15-beta -./configure --enable-ssl --enable-proxy --enable-usertrack --enable-cgi --enable-session-crypto --enable-mods-shared=most --enable-mpms-shared="prefork worker event" --with-mpm=prefork --with-apr=$build/apr-1.4.x-bin --with-expat=$build/expat-2.0.1-bin --prefix=$build/httpd-2.3.15-bin + +curl -OL http://archive.apache.org/dist/apr/apr-util-1.4.1.tar.gz +tar xzf apr-util-1.4.1.tar.gz +cd apr-util-1.4.1 +curl -OL http://svn.apache.org/repos/asf/tuscany/sca-cpp/trunk/patches/apr-util-1.4.1.patch +patch -p0 <apr-util-1.4.1.patch +./buildconf --with-apr=$build/apr-1.4.6 +./configure --with-apr=$build/apr-1.4.6-bin --with-openssl --with-crypto --with-expat=$build/expat-2.0.1-bin --prefix=$build/apr-util-1.4.1-bin +make +make install +if [ "$?" != "0" ]; then + exit $? +fi +cd $build + +# Build HTTP server +curl -OL http://archive.apache.org/dist/httpd/httpd-2.4.2.tar.gz +tar xzf httpd-2.4.2.tar.gz +cd httpd-2.4.2 +./configure --enable-ssl --enable-proxy --enable-usertrack --enable-cgi --enable-session-crypto --enable-mods-shared=most --enable-mpms-shared="prefork worker event" --with-mpm=prefork --with-apr=$build/apr-1.4.6-bin --with-apr-util=$build/apr-util-1.4.1-bin --with-expat=$build/expat-2.0.1-bin --prefix=$build/httpd-2.4.2-bin make make install if [ "$?" != "0" ]; then @@ -76,10 +93,10 @@ sudo apt-get -y install libevent-dev if [ "$?" != "0" ]; then exit $? fi -curl -OL http://memcached.googlecode.com/files/memcached-1.4.7.tar.gz -tar xzf memcached-1.4.7.tar.gz -cd memcached-1.4.7 -./configure --prefix=$build/memcached-1.4.7-bin +curl -OL http://memcached.googlecode.com/files/memcached-1.4.13.tar.gz +tar xzf memcached-1.4.13.tar.gz +cd memcached-1.4.13 +./configure --prefix=$build/memcached-1.4.13-bin make make install if [ "$?" != "0" ]; then @@ -98,20 +115,11 @@ if [ "$?" != "0" ]; then fi cd $build -# Build LevelDB -git clone https://code.google.com/p/leveldb/ -cd leveldb -make all -if [ "$?" != "0" ]; then - exit $? -fi -cd $build - # Build Libcurl curl -OL http://curl.haxx.se/download/curl-7.24.0.tar.gz tar xzf curl-7.24.0.tar.gz cd curl-7.24.0 -./configure --prefix=$build/curl-7.24.0-bin +./configure --enable-threaded-resolver --prefix=$build/curl-7.24.0-bin make make install if [ "$?" != "0" ]; then @@ -174,51 +182,11 @@ if [ "$?" != "0" ]; then fi cd $build -# Build HTML Tidy -sudo apt-get -y install cvs -if [ "$?" != "0" ]; then - exit $? -fi -cvs -z3 -d:pserver:anonymous@tidy.cvs.sourceforge.net:/cvsroot/tidy co -P tidy -cd tidy -sh build/gnuauto/setup.sh -./configure --prefix=$build/htmltidy-bin -make -make install -if [ "$?" != "0" ]; then - exit $? -fi -cd $build - -# Build Libopkele -git clone git://github.com/jsdelfino/libopkele.git -cd libopkele -./autogen.bash -./configure --prefix=$build/libopkele-bin --with-curl=$build/curl-7.24.0-bin --with-expat=$build/expat-2.0.1-bin --with-htmltidy=$build/htmltidy-bin -make -make install -if [ "$?" != "0" ]; then - exit $? -fi -cd $build - -# Build Mod_auth_openid -git clone git://github.com/jsdelfino/mod_auth_openid.git -cd mod_auth_openid -./autogen.sh -./configure --prefix=$build/mod-auth-openid-bin --with-apr=$build/apr-1.4.x-bin --with-httpd=$build/httpd-2.3.15-bin --with-curl=$build/curl-7.24.0-bin --with-libopkele=$build/libopkele-bin -make -make install -if [ "$?" != "0" ]; then - exit $? -fi -cd $build - # Build Liboauth curl -OL http://liboauth.sourceforge.net/pool/liboauth-0.9.1.tar.gz tar xzf liboauth-0.9.1.tar.gz cd liboauth-0.9.1 -./configure --prefix=$build/liboauth-0.9.1-bin CURL_CFLAGS="-I$build/curl-7.24.0-bin/include" CURL_LIBS="-L$build/curl-7.24.0-bin/lib -R$build/curl-7.24.0-bin/lib -lcurl" +./configure --prefix=$build/liboauth-0.9.1-bin CURL_CFLAGS="-I$build/curl-7.24.0-bin/include" CURL_LIBS="-L$build/curl-7.24.0-bin/lib -lcurl" make make install if [ "$?" != "0" ]; then @@ -227,23 +195,23 @@ fi cd $build # Build mod_security -curl -OL http://downloads.sourceforge.net/project/mod-security/modsecurity-apache/2.6.1/modsecurity-apache_2.6.1.tar.gz -tar xzf modsecurity-apache_2.6.1.tar.gz -cd modsecurity-apache_2.6.1 -./configure --prefix=$build/modsecurity-apache-2.6.1-bin --with-apxs=$build/httpd-2.3.15-bin/bin/apxs --with-apr=$build/apr-1.4.x-bin/bin/apr-2-config --with-apu=$build/apr-1.4.x-bin/bin/apr-2-config --with-libxml=$build/libxml2-2.7.7-bin --with-curl=$build/curl-7.24.0-bin LIBS="-L$build/expat-2.0.1-bin/lib -R$build/expat-2.0.1-bin/lib" +curl -OL http://people.apache.org/~jsdelfino/tuscany/cpp/dependencies/modsecurity-apache_2.6.6.tar.gz +tar xzf modsecurity-apache_2.6.6.tar.gz +cd modsecurity-apache_2.6.6 +./configure --prefix=$build/modsecurity-apache-2.6.6-bin --with-apxs=$build/httpd-2.4.2-bin/bin/apxs --with-apr=$build/apr-1.4.6-bin/bin/apr-1-config --with-apu=$build/apr-util-1.4.1-bin/bin/apu-1-config --with-libxml=$build/libxml2-2.7.7-bin --with-curl=$build/curl-7.24.0-bin LIBS="-L$build/expat-2.0.1-bin/lib" make make install if [ "$?" != "0" ]; then exit $? fi cd $build -curl -OL http://downloads.sourceforge.net/project/mod-security/modsecurity-crs/0-CURRENT/modsecurity-crs_2.2.2.tar.gz -tar xzf modsecurity-crs_2.2.2.tar.gz -cd modsecurity-crs_2.2.2 -curl -OL http://svn.apache.org/repos/asf/tuscany/sca-cpp/trunk/patches/modsecurity-crs_2.2.2.patch -patch -p0 <modsecurity-crs_2.2.2.patch -cp -R base_rules $build/modsecurity-apache-2.6.1-bin -cp -R optional_rules $build/modsecurity-apache-2.6.1-bin +curl -OL http://people.apache.org/~jsdelfino/tuscany/cpp/dependencies/modsecurity-crs_2.2.5.tar.gz +tar xzf modsecurity-crs_2.2.5.tar.gz +cd modsecurity-crs_2.2.5 +#curl -OL http://svn.apache.org/repos/asf/tuscany/sca-cpp/trunk/patches/modsecurity-crs_2.2.5.patch +#patch -p0 <modsecurity-crs_2.2.2.patch +cp -R base_rules $build/modsecurity-apache-2.6.6-bin +cp -R optional_rules $build/modsecurity-apache-2.6.6-bin if [ "$?" != "0" ]; then exit $? fi @@ -284,6 +252,8 @@ fi curl -OL http://archive.apache.org/dist/incubator/thrift/0.2.0-incubating/thrift-0.2.0-incubating.tar.gz tar xzf thrift-0.2.0-incubating.tar.gz cd thrift-0.2.0 +curl -OL http://svn.apache.org/repos/asf/tuscany/sca-cpp/trunk/patches/thrift-0.2.0.patch +patch -p0 <thrift-0.2.0.patch ./bootstrap.sh ./configure --prefix=$build/thrift-0.2.0-bin --with-java=no --with-erlang=no --with-py=no --with-perl=no --with-ruby=no --with-csharp=no --disable-static make @@ -313,9 +283,10 @@ fi curl -OL http://github.com/downloads/facebook/scribe/scribe-2.2.tar.gz tar xzf scribe-2.2.tar.gz cd scribe -curl -OL http://svn.apache.org/repos/asf/tuscany/sca-cpp/trunk/patches/scribe.patch -patch -p0 <scribe.patch -./bootstrap.sh --prefix=$build/scribe-2.2-bin PY_PREFIX=$build/scribe-2.2-bin --with-thriftpath=$build/thrift-0.2.0-bin --with-fb303path=$build/thrift-0.2.0-bin/contrib/fb303 --disable-static +curl -OL http://svn.apache.org/repos/asf/tuscany/sca-cpp/trunk/patches/scribe-2.2.patch +patch -p0 <scribe-2.2.patch +autoreconf --force --verbose --install +./configure --prefix=$build/scribe-2.2-bin PY_PREFIX=$build/scribe-2.2-bin --with-thriftpath=$build/thrift-0.2.0-bin --with-fb303path=$build/thrift-0.2.0-bin/contrib/fb303 --disable-static CPPFLAGS="-DBOOST_FILESYSTEM_VERSION=2" LIBS="-lboost_system -lboost_filesystem" make make install if [ "$?" != "0" ]; then @@ -325,10 +296,10 @@ cp src/lib/libscribe.so $build/scribe-2.2-bin/lib cd $build # Build Python -curl -OL http://www.python.org/ftp/python/2.6.6/Python-2.6.6.tgz -tar xzf Python-2.6.6.tgz -cd Python-2.6.6 -./configure --prefix=$build/python-2.6.6-bin --enable-shared +curl -OL http://www.python.org/ftp/python/2.7.3/Python-2.7.3.tgz +tar xzf Python-2.7.3.tgz +cd Python-2.7.3 +./configure --prefix=$build/python-2.7.3-bin --enable-shared --with-system-expat=$build/expat-2.0.1-bin make make install if [ "$?" != "0" ]; then @@ -336,22 +307,11 @@ if [ "$?" != "0" ]; then fi cd $build -# Build Apache Libcloud -curl -OL http://archive.apache.org/dist/incubator/libcloud/apache-libcloud-incubating-0.4.2.tar.bz2 -tar xjf apache-libcloud-incubating-0.4.2.tar.bz2 -cd apache-libcloud-incubating-0.4.2 -python setup.py build -python setup.py install --home $build/libcloud-0.4.2-bin -if [ "$?" != "0" ]; then - exit $? -fi -cd $build - # Build Google Page Speed curl -OL https://dl-ssl.google.com/page-speed/sdk/current/page-speed-sdk.zip unzip page-speed-sdk.zip cd page-speed-1.9 -make builddir=$build/page-speed-1.9-bin +make builddir=$build/page-speed-1.9-bin CXXFLAGS="-Wno-unused-but-set-variable" if [ "$?" != "0" ]; then exit $? fi @@ -368,7 +328,7 @@ cd $build git clone git://git.apache.org/tuscany-sca-cpp.git cd tuscany-sca-cpp ./bootstrap -./configure --prefix=$build/tuscany-sca-cpp-bin --with-curl=$build/curl-7.24.0-bin --with-apr=$build/apr-1.4.x-bin --with-httpd=$build/httpd-2.3.15-bin --with-memcached=$build/memcached-1.4.7-bin --with-tinycdb=$build/tinycdb-0.77-bin --with-js-include=$build/js-1.8.5-bin/include/js --with-js-lib=$build/js-1.8.5-bin/lib --enable-pagespeed --with-pagespeed=$build/page-speed-1.9-bin --enable-libcloud --with-libcloud=$build/libcloud-0.4.2-bin --enable-threads --enable-python --with-python=$build/python-2.6.6-bin --with-libxml2=$build/libxml2-2.7.7-bin --enable-chat --with-libstrophe=$build/libstrophe-bin --enable-sqldb --with-pgsql=$build/postgresql-9.1.2-bin --with-pgbouncer=$build/pgbouncer-1.5-bin --enable-log --with-thrift=$build/thrift-0.2.0-bin --with-scribe=$build/scribe-2.2-bin --enable-openid --with-mod-auth-openid=$build/mod-auth-openid-bin --enable-oauth --with-liboauth=$build/liboauth-0.9.1-bin --enable-mod-security --with-mod-security=$build/modsecurity-apache-2.6.1-bin +./configure --prefix=$build/tuscany-sca-cpp-bin --with-curl=$build/curl-7.24.0-bin --with-apr=$build/apr-1.4.6-bin --with-apr-util=$build/apr-util-1.4.1-bin --with-httpd=$build/httpd-2.4.2-bin --with-memcached=$build/memcached-1.4.13-bin --with-tinycdb=$build/tinycdb-0.77-bin --with-js-include=$build/js-1.8.5-bin/include/js --with-js-lib=$build/js-1.8.5-bin/lib --enable-pagespeed --with-pagespeed=$build/page-speed-1.9-bin --enable-threads --enable-python --with-python=$build/python-2.7.3-bin --with-libxml2=$build/libxml2-2.7.7-bin --enable-chat --with-libstrophe=$build/libstrophe-bin --enable-sqldb --with-pgsql=$build/postgresql-9.1.2-bin --with-pgbouncer=$build/pgbouncer-1.5-bin --enable-log --with-thrift=$build/thrift-0.2.0-bin --with-scribe=$build/scribe-2.2-bin --enable-oauth --with-liboauth=$build/liboauth-0.9.1-bin --enable-mod-security --with-mod-security=$build/modsecurity-apache-2.6.6-bin make make install if [ "$?" != "0" ]; then @@ -377,8 +337,8 @@ fi cd $build # Create src archive -tar czf tuscany-sca-cpp-1.0-src.tar.gz apache-libcloud-incubating-0.4.2 apache-libcloud-incubating-0.4.2.tar.bz2 apr-1.4.x apr-1.4.x-bin curl-7.24.0 curl-7.24.0-bin curl-7.24.0.tar.gz expat-2.0.1 expat-2.0.1-bin expat-2.0.1.tar.gz htmltidy-bin httpd-2.3.15-beta httpd-2.3.15-beta.tar.gz httpd-2.3.15-bin js-1.8.5-bin js-1.8.5 js185-1.0.0.tar.gz libcloud-0.4.2-bin liboauth-0.9.1 liboauth-0.9.1-bin liboauth-0.9.1.tar.gz libopkele libopkele-bin libstrophe libstrophe-bin libxml2-2.7.7 libxml2-2.7.7-bin libxml2-sources-2.7.7.tar.gz memcached-1.4.7 memcached-1.4.7-bin memcached-1.4.7.tar.gz mod_auth_openid mod-auth-openid-bin modsecurity-apache_2.6.1 modsecurity-apache-2.6.1-bin modsecurity-apache_2.6.1.tar.gz modsecurity-crs_2.2.2 modsecurity-crs_2.2.2.tar.gz nspr-4.8.8-bin nspr-4.8.8 nspr-4.8.8.tar.gz nuvem page-speed-1.9 page-speed-1.9-bin page-speed-sdk.zip pgbouncer-1.5 pgbouncer-1.5-bin pgbouncer-1.5.tar.gz postgresql-9.1.2 postgresql-9.1.2-bin postgresql-9.1.2.tar.gz Python-2.6.6 python-2.6.6-bin Python-2.6.6.tgz scribe scribe-2.2-bin scribe-2.2.tar.gz thrift-0.2.0 thrift-0.2.0-bin thrift-0.2.0-incubating.tar.gz tidy tinycdb-0.77 tinycdb-0.77-bin tinycdb_0.77.tar.gz tuscany-sca-cpp tuscany-sca-cpp-bin +tar czf tuscany-sca-cpp-1.0-src.tar.gz apr-1.4.6 apr-1.4.6.tar.gz apr-1.4.6-bin apr-util-1.4.1 apr-util-1.4.1.tar.gz apr-util-1.4.1-bin curl-7.24.0 curl-7.24.0-bin curl-7.24.0.tar.gz expat-2.0.1 expat-2.0.1-bin expat-2.0.1.tar.gz httpd-2.4.2 httpd-2.4.2.tar.gz httpd-2.4.2-bin js-1.8.5-bin js-1.8.5 js185-1.0.0.tar.gz liboauth-0.9.1 liboauth-0.9.1-bin liboauth-0.9.1.tar.gz libstrophe libstrophe-bin libxml2-2.7.7 libxml2-2.7.7-bin libxml2-sources-2.7.7.tar.gz memcached-1.4.13 memcached-1.4.13-bin memcached-1.4.13.tar.gz modsecurity-apache_2.6.6 modsecurity-apache-2.6.6-bin modsecurity-apache_2.6.6.tar.gz modsecurity-crs_2.2.5 modsecurity-crs_2.2.5.tar.gz nspr-4.8.8-bin nspr-4.8.8 nspr-4.8.8.tar.gz nuvem page-speed-1.9 page-speed-1.9-bin page-speed-sdk.zip pgbouncer-1.5 pgbouncer-1.5-bin pgbouncer-1.5.tar.gz postgresql-9.1.2 postgresql-9.1.2-bin postgresql-9.1.2.tar.gz Python-2.7.3 python-2.7.3-bin Python-2.7.3.tgz scribe scribe-2.2-bin scribe-2.2.tar.gz thrift-0.2.0 thrift-0.2.0-bin thrift-0.2.0-incubating.tar.gz tinycdb-0.77 tinycdb-0.77-bin tinycdb_0.77.tar.gz tuscany-sca-cpp tuscany-sca-cpp-bin # Create bin archive -tar czf tuscany-sca-cpp-1.0.tar.gz apr-1.4.x-bin curl-7.24.0-bin expat-2.0.1-bin htmltidy-bin httpd-2.3.15-bin js-1.8.5-bin libcloud-0.4.2-bin liboauth-0.9.1-bin libopkele-bin libstrophe-bin libxml2-2.7.7-bin memcached-1.4.7-bin mod-auth-openid-bin modsecurity-apache-2.6.1-bin nspr-4.8.8-bin nuvem/nuvem-parallel page-speed-1.9-bin pgbouncer-1.5-bin postgresql-9.1.2-bin python-2.6.6-bin scribe-2.2-bin thrift-0.2.0-bin tinycdb-0.77-bin tuscany-sca-cpp tuscany-sca-cpp-bin +tar czf tuscany-sca-cpp-1.0.tar.gz apr-1.4.6-bin apr-util-1.4.1-bin curl-7.24.0-bin expat-2.0.1-bin httpd-2.4.2-bin js-1.8.5-bin liboauth-0.9.1-bin libstrophe-bin libxml2-2.7.7-bin memcached-1.4.13-bin modsecurity-apache-2.6.6-bin nspr-4.8.8-bin nuvem/nuvem-parallel page-speed-1.9-bin pgbouncer-1.5-bin postgresql-9.1.2-bin python-2.7.3-bin scribe-2.2-bin thrift-0.2.0-bin tinycdb-0.77-bin tuscany-sca-cpp tuscany-sca-cpp-bin diff --git a/sca-cpp/trunk/ubuntu/ubuntu-install-all b/sca-cpp/trunk/ubuntu/ubuntu-install-all index 4aaa117f2a..00d3c54abc 100755 --- a/sca-cpp/trunk/ubuntu/ubuntu-install-all +++ b/sca-cpp/trunk/ubuntu/ubuntu-install-all @@ -15,9 +15,8 @@ # specific language governing permissions and limitations # under the License. -# Install a complete distribution, the required system tools and libraries, the -# runtime dependencies and the Tuscany SCA runtime on a fresh Ubuntu Server -# 10.10 system. +# Install a complete distribution, the required system tools and libraries, +# runtime dependencies and the Tuscany SCA runtime on Ubuntu Server 12.04. # Display commands as they are executed set -x @@ -25,6 +24,9 @@ set -x # Build and install in the current directory build=`pwd` +# First update the system +sudo apt-get update + # Install core dev tools sudo apt-get -y install curl git-core subversion autoconf pkg-config automake libtool g++ make gdb vim if [ "$?" != "0" ]; then @@ -43,27 +45,42 @@ if [ "$?" != "0" ]; then fi cd $build -# Build Apache APR and HTTP server +# Build Apache APR and APR util sudo apt-get -y install libssl-dev libpcre3-dev if [ "$?" != "0" ]; then exit $? fi -svn co -r 1201086 http://svn.apache.org/repos/asf/apr/apr/trunk apr-1.4.x -cd apr-1.4.x -curl -OL http://svn.apache.org/repos/asf/tuscany/sca-cpp/trunk/patches/apr-1.4.x.patch -patch -p0 <apr-1.4.x.patch +curl -OL http://archive.apache.org/dist/apr/apr-1.4.6.tar.gz +tar xzf apr-1.4.6.tar.gz +cd apr-1.4.6 ./buildconf -./configure -with-openssl --with-crypto --with-expat=$build/expat-2.0.1-bin --prefix=$build/apr-1.4.x-bin +./configure --prefix=$build/apr-1.4.6-bin +make +make install +if [ "$?" != "0" ]; then + exit $? +fi +cd $build + +curl -OL http://archive.apache.org/dist/apr/apr-util-1.4.1.tar.gz +tar xzf apr-1.4.1.tar.gz +cd apr-util-1.4.1 +curl -OL http://svn.apache.org/repos/asf/tuscany/sca-cpp/trunk/patches/apr-util-1.4.1.patch +patch -p0 <apr-util-1.4.1.patch +./buildconf --with-apr=$build/apr-1.4.6 +./configure --with-apr=$build/apr-1.4.6-bin --with-openssl --with-crypto --with-expat=$build/expat-2.0.1-bin --prefix=$build/apr-util-1.4.1-bin make make install if [ "$?" != "0" ]; then exit $? fi cd $build -curl -OL http://archive.apache.org/dist/httpd/httpd-2.3.15-beta.tar.gz -tar xzf httpd-2.3.15-beta.tar.gz -cd httpd-2.3.15-beta -./configure --enable-ssl --enable-proxy --enable-usertrack --enable-cgi --enable-session-crypto --enable-mods-shared=most --enable-mpms-shared="prefork worker event" --with-mpm=prefork --with-apr=$build/apr-1.4.x-bin --with-expat=$build/expat-2.0.1-bin --prefix=$build/httpd-2.3.15-bin + +# Build HTTP server +curl -OL http://archive.apache.org/dist/httpd/httpd-2.4.2.tar.gz +tar xzf httpd-2.4.2.tar.gz +cd httpd-2.4.2 +./configure --enable-ssl --enable-proxy --enable-usertrack --enable-cgi --enable-session-crypto --enable-mods-shared=most --enable-mpms-shared="prefork worker event" --with-mpm=prefork --with-apr=$build/apr-1.4.6-bin --with-apr-util=$build/apr-util-1.4.1-bin --with-expat=$build/expat-2.0.1-bin --prefix=$build/httpd-2.4.2-bin make make install if [ "$?" != "0" ]; then @@ -76,10 +93,10 @@ sudo apt-get -y install libevent-dev if [ "$?" != "0" ]; then exit $? fi -curl -OL http://memcached.googlecode.com/files/memcached-1.4.7.tar.gz -tar xzf memcached-1.4.7.tar.gz -cd memcached-1.4.7 -./configure --prefix=$build/memcached-1.4.7-bin +curl -OL http://memcached.googlecode.com/files/memcached-1.4.13.tar.gz +tar xzf memcached-1.4.13.tar.gz +cd memcached-1.4.13 +./configure --prefix=$build/memcached-1.4.13-bin make make install if [ "$?" != "0" ]; then @@ -111,7 +128,7 @@ cd $build curl -OL http://curl.haxx.se/download/curl-7.24.0.tar.gz tar xzf curl-7.24.0.tar.gz cd curl-7.24.0 -./configure --prefix=$build/curl-7.24.0-bin +./configure --enable-threaded-resolver --prefix=$build/curl-7.24.0-bin make make install if [ "$?" != "0" ]; then @@ -173,7 +190,7 @@ fi curl -OL http://www.apache.org/dist/ws/axis2-c/1_6_0/axis2c-src-1.6.0.tar.gz tar xzf axis2c-src-1.6.0.tar.gz cd axis2c-src-1.6.0 -./configure --enable-openssl --with-apache2=$build/httpd-2.3.15-bin/include --with-apr=$build/apr-1.4.x-bin/include/apr-2 --prefix=$build/axis2c-1.6.0-bin +./configure --enable-openssl --with-apache2=$build/httpd-2.4.2-bin/include --with-apr=$build/apr-1.4.6-bin/include/apr-1 --prefix=$build/axis2c-1.6.0-bin make make install if [ "$?" != "0" ]; then @@ -260,7 +277,7 @@ cd $build git clone git://github.com/jsdelfino/mod_auth_openid.git cd mod_auth_openid ./autogen.sh -./configure --prefix=$build/mod-auth-openid-bin --with-apr=$build/apr-1.4.x-bin --with-httpd=$build/httpd-2.3.15-bin --with-curl=$build/curl-7.24.0-bin --with-libopkele=$build/libopkele-bin +./configure --prefix=$build/mod-auth-openid-bin --with-apr=$build/apr-1.4.6-bin --with-httpd=$build/httpd-2.4.2-bin --with-curl=$build/curl-7.24.0-bin --with-libopkele=$build/libopkele-bin make make install if [ "$?" != "0" ]; then @@ -272,7 +289,7 @@ cd $build curl -OL http://liboauth.sourceforge.net/pool/liboauth-0.9.1.tar.gz tar xzf liboauth-0.9.1.tar.gz cd liboauth-0.9.1 -./configure --prefix=$build/liboauth-0.9.1-bin CURL_CFLAGS="-I$build/curl-7.24.0-bin/include" CURL_LIBS="-L$build/curl-7.24.0-bin/lib -R$build/curl-7.24.0-bin/lib -lcurl" +./configure --prefix=$build/liboauth-0.9.1-bin CURL_CFLAGS="-I$build/curl-7.24.0-bin/include" CURL_LIBS="-L$build/curl-7.24.0-bin/lib -lcurl" make make install if [ "$?" != "0" ]; then @@ -281,23 +298,23 @@ fi cd $build # Build mod_security -curl -OL http://downloads.sourceforge.net/project/mod-security/modsecurity-apache/2.6.1/modsecurity-apache_2.6.1.tar.gz -tar xzf modsecurity-apache_2.6.1.tar.gz -cd modsecurity-apache_2.6.1 -./configure --prefix=$build/modsecurity-apache-2.6.1-bin --with-apxs=$build/httpd-2.3.15-bin/bin/apxs --with-apr=$build/apr-1.4.x-bin/bin/apr-2-config --with-apu=$build/apr-1.4.x-bin/bin/apr-2-config --with-libxml=$build/libxml2-2.7.7-bin --with-curl=$build/curl-7.24.0-bin LIBS="-L$build/expat-2.0.1-bin/lib -R$build/expat-2.0.1-bin/lib" +curl -OL http://people.apache.org/~jsdelfino/tuscany/cpp/dependencies/modsecurity-apache_2.6.6.tar.gz +tar xzf modsecurity-apache_2.6.6.tar.gz +cd modsecurity-apache_2.6.6 +./configure --prefix=$build/modsecurity-apache-2.6.6-bin --with-apxs=$build/httpd-2.4.2-bin/bin/apxs --with-apr=$build/apr-1.4.6-bin/bin/apr-1-config --with-apu=$build/apr-util-1.4.1-bin/bin/apu-1-config --with-libxml=$build/libxml2-2.7.7-bin --with-curl=$build/curl-7.24.0-bin LIBS="-L$build/expat-2.0.1-bin/lib" make make install if [ "$?" != "0" ]; then exit $? fi cd $build -curl -OL http://downloads.sourceforge.net/project/mod-security/modsecurity-crs/0-CURRENT/modsecurity-crs_2.2.2.tar.gz -tar xzf modsecurity-crs_2.2.2.tar.gz -cd modsecurity-crs_2.2.2 -curl -OL http://svn.apache.org/repos/asf/tuscany/sca-cpp/trunk/patches/modsecurity-crs_2.2.2.patch -patch -p0 <modsecurity-crs_2.2.2.patch -cp -R base_rules $build/modsecurity-apache-2.6.1-bin -cp -R optional_rules $build/modsecurity-apache-2.6.1-bin +curl -OL http://people.apache.org/~jsdelfino/tuscany/cpp/dependencies/modsecurity-crs_2.2.5.tar.gz +tar xzf modsecurity-crs_2.2.5.tar.gz +cd modsecurity-crs_2.2.5 +#curl -OL http://svn.apache.org/repos/asf/tuscany/sca-cpp/trunk/patches/modsecurity-crs_2.2.2.patch +#patch -p0 <modsecurity-crs_2.2.2.patch +cp -R base_rules $build/modsecurity-apache-2.6.6-bin +cp -R optional_rules $build/modsecurity-apache-2.6.6-bin if [ "$?" != "0" ]; then exit $? fi @@ -338,6 +355,8 @@ fi curl -OL http://archive.apache.org/dist/incubator/thrift/0.2.0-incubating/thrift-0.2.0-incubating.tar.gz tar xzf thrift-0.2.0-incubating.tar.gz cd thrift-0.2.0 +curl -OL http://svn.apache.org/repos/asf/tuscany/sca-cpp/trunk/patches/thrift-0.2.0.patch +patch -p0 <thrift-0.2.0.patch ./bootstrap.sh ./configure --prefix=$build/thrift-0.2.0-bin --with-java=no --with-erlang=no --with-py=no --with-perl=no --with-ruby=no --with-csharp=no --disable-static make @@ -367,9 +386,10 @@ fi curl -OL http://github.com/downloads/facebook/scribe/scribe-2.2.tar.gz tar xzf scribe-2.2.tar.gz cd scribe -curl -OL http://svn.apache.org/repos/asf/tuscany/sca-cpp/trunk/patches/scribe.patch -patch -p0 <scribe.patch -./bootstrap.sh --prefix=$build/scribe-2.2-bin PY_PREFIX=$build/scribe-2.2-bin --with-thriftpath=$build/thrift-0.2.0-bin --with-fb303path=$build/thrift-0.2.0-bin/contrib/fb303 --disable-static +curl -OL http://svn.apache.org/repos/asf/tuscany/sca-cpp/trunk/patches/scribe-2.2.patch +patch -p0 <scribe-2.2.patch +autoreconf --force --verbose --install +./configure --prefix=$build/scribe-2.2-bin PY_PREFIX=$build/scribe-2.2-bin --with-thriftpath=$build/thrift-0.2.0-bin --with-fb303path=$build/thrift-0.2.0-bin/contrib/fb303 --disable-static CPPFLAGS="-DBOOST_FILESYSTEM_VERSION=2" LIBS="-lboost_system -lboost_filesystem" make make install if [ "$?" != "0" ]; then @@ -379,10 +399,10 @@ cp src/lib/libscribe.so $build/scribe-2.2-bin/lib cd $build # Build Python -curl -OL http://www.python.org/ftp/python/2.6.6/Python-2.6.6.tgz -tar xzf Python-2.6.6.tgz -cd Python-2.6.6 -./configure --prefix=$build/python-2.6.6-bin --enable-shared +curl -OL http://www.python.org/ftp/python/2.6.6/Python-2.7.3.tgz +tar xzf Python-2.7.3.tgz +cd Python-2.7.3 +./configure --prefix=$build/python-2.7.3-bin --enable-shared --with-system-expat=$build/expat-2.0.1-bin make make install if [ "$?" != "0" ]; then @@ -405,7 +425,7 @@ cd $build curl -OL https://dl-ssl.google.com/page-speed/sdk/current/page-speed-sdk.zip unzip page-speed-sdk.zip cd page-speed-1.9 -make +make builddir=$build/page-speed-1.9-bin CXXFLAGS="-Wno-unused-but-set-variable" if [ "$?" != "0" ]; then exit $? fi @@ -422,7 +442,7 @@ cd $build git clone git://git.apache.org/tuscany-sca-cpp.git cd tuscany-sca-cpp ./bootstrap -./configure --prefix=$build/tuscany-sca-cpp-bin --with-curl=$build/curl-7.24.0-bin --with-apr=$build/apr-1.4.x-bin --with-httpd=$build/httpd-2.3.15-bin --with-memcached=$build/memcached-1.4.7-bin --with-tinycdb=$build/tinycdb-0.77-bin --with-js-include=$build/js-1.8.5-bin/include/js --with-js-lib=$build/js-1.8.5-bin/lib --enable-pagespeed --with-pagespeed=$build/page-speed-1.9-bin --enable-libcloud --with-libcloud=$build/libcloud-0.4.2-bin --enable-threads --enable-python --with-python=$build/python-2.6.6-bin --enable-gae --with-gae=$build/google_appengine --enable-java --with-java=/usr/lib/jvm/java-6-openjdk --enable-webservice --with-libxml2=$build/libxml2-2.7.7-bin --with-axis2c=$build/axis2c-1.6.0-bin --enable-queue --with-qpidc=$build/qpidc-0.6-bin --enable-chat --with-libstrophe=$build/libstrophe-bin --with-vysper=$build/vysper-0.6 --enable-sqldb --with-pgsql=$build/postgresql-9.1.2-bin --with-pgbouncer=$build/pgbouncer-1.5-bin --enable-log --with-thrift=$build/thrift-0.2.0-bin --with-scribe=$build/scribe-2.2-bin --enable-openid --with-mod-auth-openid=$build/mod-auth-openid-bin --enable-oauth --with-liboauth=$build/liboauth-0.9.1-bin --enable-mod-security --with-mod-security=$build/modsecurity-apache-2.6.1-bin +./configure --prefix=$build/tuscany-sca-cpp-bin --with-curl=$build/curl-7.24.0-bin --with-apr=$build/apr-1.4.6-bin --with-apr-util=$build/apr-util-1.4.1-bin --with-httpd=$build/httpd-2.4.2-bin --with-memcached=$build/memcached-1.4.13-bin --with-tinycdb=$build/tinycdb-0.77-bin --with-js-include=$build/js-1.8.5-bin/include/js --with-js-lib=$build/js-1.8.5-bin/lib --enable-pagespeed --with-pagespeed=$build/page-speed-1.9-bin --enable-libcloud --with-libcloud=$build/libcloud-0.4.2-bin --enable-threads --enable-python --with-python=$build/python-2.7.3-bin --enable-gae --with-gae=$build/google_appengine --enable-java --with-java=/usr/lib/jvm/java-6-openjdk --enable-webservice --with-libxml2=$build/libxml2-2.7.7-bin --with-axis2c=$build/axis2c-1.6.0-bin --enable-queue --with-qpidc=$build/qpidc-0.6-bin --enable-chat --with-libstrophe=$build/libstrophe-bin --with-vysper=$build/vysper-0.6 --enable-sqldb --with-pgsql=$build/postgresql-9.1.2-bin --with-pgbouncer=$build/pgbouncer-1.5-bin --enable-log --with-thrift=$build/thrift-0.2.0-bin --with-scribe=$build/scribe-2.2-bin --enable-openid --with-mod-auth-openid=$build/mod-auth-openid-bin --enable-oauth --with-liboauth=$build/liboauth-0.9.1-bin --enable-mod-security --with-mod-security=$build/modsecurity-apache-2.6.6-bin make make install if [ "$?" != "0" ]; then @@ -431,8 +451,8 @@ fi cd $build # Create src archive -tar czf tuscany-sca-cpp-all-1.0-src.tar.gz apache-libcloud-incubating-0.4.2 apache-libcloud-incubating-0.4.2.tar.bz2 apr-1.4.x apr-1.4.x-bin axis2c-1.6.0-bin axis2c-src-1.6.0 axis2c-src-1.6.0.tar.gz curl-7.24.0 curl-7.24.0-bin curl-7.24.0.tar.gz expat-2.0.1 expat-2.0.1-bin expat-2.0.1.tar.gz google_appengine google_appengine_1.4.0.zip htmltidy-bin httpd-2.3.15-beta httpd-2.3.15-beta.tar.gz httpd-2.3.15-bin js-1.8.5-bin js-1.8.5 js185-1.0.0.tar.gz libcloud-0.4.2-bin liboauth-0.9.1 liboauth-0.9.1-bin liboauth-0.9.1.tar.gz libopkele libopkele-bin libstrophe libstrophe-bin libxml2-2.7.7 libxml2-2.7.7-bin libxml2-sources-2.7.7.tar.gz memcached-1.4.7 memcached-1.4.7-bin memcached-1.4.7.tar.gz mod_auth_openid mod-auth-openid-bin modsecurity-apache_2.6.1 modsecurity-apache-2.6.1-bin modsecurity-apache_2.6.1.tar.gz modsecurity-crs_2.2.2 modsecurity-crs_2.2.2.tar.gz nspr-4.8.8-bin nspr-4.8.8 nspr-4.8.8.tar.gz nuvem page-speed-1.9 page-speed-1.9-bin page-speed-sdk.zip pgbouncer-1.5 pgbouncer-1.5-bin pgbouncer-1.5.tar.gz postgresql-9.1.2 postgresql-9.1.2-bin postgresql-9.1.2.tar.gz qpidc-0.6 qpidc-0.6-bin qpid-cpp-0.6.tar.gz Python-2.6.6 python-2.6.6-bin Python-2.6.6.tgz scribe scribe-2.2-bin scribe-2.2.tar.gz thrift-0.2.0 thrift-0.2.0-bin thrift-0.2.0-incubating.tar.gz tidy tinycdb-0.77 tinycdb-0.77-bin tinycdb_0.77.tar.gz tuscany-sca-cpp tuscany-sca-cpp-bin vysper-0.6 vysper-0.6-bin.tar.gz +tar czf tuscany-sca-cpp-all-1.0-src.tar.gz apache-libcloud-incubating-0.4.2 apache-libcloud-incubating-0.4.2.tar.bz2 apr-1.4.6 apr-1.4.6.tar.gz apr-1.4.6-bin apr-util-1.4.1 apr-util-1.4.1.tar.gz apr-util-1.4.1-bin axis2c-1.6.0-bin axis2c-src-1.6.0 axis2c-src-1.6.0.tar.gz curl-7.24.0 curl-7.24.0-bin curl-7.24.0.tar.gz expat-2.0.1 expat-2.0.1-bin expat-2.0.1.tar.gz google_appengine google_appengine_1.4.0.zip htmltidy-bin httpd-2.4.2 httpd-2.4.2.tar.gz httpd-2.4.2-bin js-1.8.5-bin js-1.8.5 js185-1.0.0.tar.gz libcloud-0.4.2-bin liboauth-0.9.1 liboauth-0.9.1-bin liboauth-0.9.1.tar.gz libopkele libopkele-bin libstrophe libstrophe-bin libxml2-2.7.7 libxml2-2.7.7-bin libxml2-sources-2.7.7.tar.gz memcached-1.4.13 memcached-1.4.13-bin memcached-1.4.13.tar.gz mod_auth_openid mod-auth-openid-bin modsecurity-apache_2.6.6 modsecurity-apache-2.6.6-bin modsecurity-apache_2.6.6.tar.gz modsecurity-crs_2.2.5 modsecurity-crs_2.2.5.tar.gz nspr-4.8.8-bin nspr-4.8.8 nspr-4.8.8.tar.gz nuvem page-speed-1.9 page-speed-1.9-bin page-speed-sdk.zip pgbouncer-1.5 pgbouncer-1.5-bin pgbouncer-1.5.tar.gz postgresql-9.1.2 postgresql-9.1.2-bin postgresql-9.1.2.tar.gz qpidc-0.6 qpidc-0.6-bin qpid-cpp-0.6.tar.gz Python-2.7.3 python-2.7.3-bin Python-2.7.3.tgz scribe scribe-2.2-bin scribe-2.2.tar.gz thrift-0.2.0 thrift-0.2.0-bin thrift-0.2.0-incubating.tar.gz tidy tinycdb-0.77 tinycdb-0.77-bin tinycdb_0.77.tar.gz tuscany-sca-cpp tuscany-sca-cpp-bin vysper-0.6 vysper-0.6-bin.tar.gz # Create bin archive -tar czf tuscany-sca-cpp-all-1.0.tar.gz apr-1.4.x-bin axis2c-1.6.0-bin curl-7.24.0-bin expat-2.0.1-bin google_appengine htmltidy-bin httpd-2.3.15-bin js-1.8.5-bin libcloud-0.4.2-bin liboauth-0.9.1-bin libopkele-bin libstrophe-bin libxml2-2.7.7-bin memcached-1.4.7-bin mod-auth-openid-bin modsecurity-apache-2.6.1-bin nspr-4.8.8-bin nuvem/nuvem-parallel page-speed-1.9-bin postgresql-9.1.2-bin python-2.6.6-bin qpidc-0.6-bin scribe-2.2-bin thrift-0.2.0-bin tinycdb-0.77-bin tuscany-sca-cpp tuscany-sca-cpp-bin vysper-0.6 +tar czf tuscany-sca-cpp-all-1.0.tar.gz apr-1.4.6-bin apr-util-1.4.1-bin axis2c-1.6.0-bin curl-7.24.0-bin expat-2.0.1-bin google_appengine htmltidy-bin httpd-2.4.2-bin js-1.8.5-bin libcloud-0.4.2-bin liboauth-0.9.1-bin libopkele-bin libstrophe-bin libxml2-2.7.7-bin memcached-1.4.13-bin mod-auth-openid-bin modsecurity-apache-2.6.6-bin nspr-4.8.8-bin nuvem/nuvem-parallel page-speed-1.9-bin postgresql-9.1.2-bin python-2.7.3-bin qpidc-0.6-bin scribe-2.2-bin thrift-0.2.0-bin tinycdb-0.77-bin tuscany-sca-cpp tuscany-sca-cpp-bin vysper-0.6 diff --git a/sca-cpp/trunk/ubuntu/ubuntu-install-all-dependencies b/sca-cpp/trunk/ubuntu/ubuntu-install-all-dependencies new file mode 100755 index 0000000000..87710309df --- /dev/null +++ b/sca-cpp/trunk/ubuntu/ubuntu-install-all-dependencies @@ -0,0 +1,86 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +# Install the required system tools and libraries and runtime dependencies +# for a complete Tuscany SCA runtime distribution on Ubuntu Server 12.04. + +# Display commands as they are executed +set -x + +# First update the system +sudo apt-get update + +# Install core dev tools +sudo apt-get -y install curl git-core subversion autoconf pkg-config automake libtool g++ make gdb vim +if [ "$?" != "0" ]; then + exit $? +fi + +# Install the Apache HTTP server dependencies +sudo apt-get -y install libssl-dev libpcre3-dev +if [ "$?" != "0" ]; then + exit $? +fi + +# Install the Memcached dependencies +sudo apt-get -y install libevent-dev +if [ "$?" != "0" ]; then + exit $? +fi + +# Install the SpiderMonkey dependencies +sudo apt-get -y install zip unzip +if [ "$?" != "0" ]; then + exit $? +fi + +# Install the Apache Qpid/C++ dependencies +sudo apt-get -y install libboost-dev libboost-program-options-dev libboost-filesystem-dev uuid-dev +if [ "$?" != "0" ]; then + exit $? +fi + +# Install the Apache Vysper dependencies +sudo apt-get -y install openjdk-6-jdk +if [ "$?" != "0" ]; then + exit $? +fi + +# Install the HTML Tidy dependencies +sudo apt-get -y install cvs +if [ "$?" != "0" ]; then + exit $? +fi + +# Install the PostgreSQL dependencies +sudo apt-get -y install libreadline-dev +if [ "$?" != "0" ]; then + exit $? +fi + +# Install the Apache Thrift dependencies +sudo apt-get -y install bison flex +if [ "$?" != "0" ]; then + exit $? +fi + +# Install the Facebook Scribe dependencies +sudo apt-get -y install gawk +if [ "$?" != "0" ]; then + exit $? +fi + diff --git a/sca-cpp/trunk/ubuntu/ubuntu-install-dependencies b/sca-cpp/trunk/ubuntu/ubuntu-install-dependencies new file mode 100755 index 0000000000..c9c140564d --- /dev/null +++ b/sca-cpp/trunk/ubuntu/ubuntu-install-dependencies @@ -0,0 +1,68 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +# Install the required system tools and libraries and runtime dependencies +# for a minimal Tuscany SCA runtime distribution on Ubuntu Server 12.04. + +# Display commands as they are executed +set -x + +# First update the system +sudo apt-get update + +# Install core dev tools +sudo apt-get -y install curl git-core subversion autoconf pkg-config automake libtool g++ make gdb vim +if [ "$?" != "0" ]; then + exit $? +fi + +# Install the Apache HTTP server dependencies +sudo apt-get -y install libssl-dev libpcre3-dev +if [ "$?" != "0" ]; then + exit $? +fi + +# Install the Memcached dependencies +sudo apt-get -y install libevent-dev +if [ "$?" != "0" ]; then + exit $? +fi + +# Install the SpiderMonkey dependencies +sudo apt-get -y install zip unzip +if [ "$?" != "0" ]; then + exit $? +fi + +# Install the PostgreSQL dependencies +sudo apt-get -y install libreadline-dev +if [ "$?" != "0" ]; then + exit $? +fi + +# Install the Apache Thrift dependencies +sudo apt-get -y install bison flex libboost-dev libboost-filesystem-dev +if [ "$?" != "0" ]; then + exit $? +fi + +# Install the Facebook Scribe dependencies +sudo apt-get -y install gawk +if [ "$?" != "0" ]; then + exit $? +fi + diff --git a/sca-cpp/trunk/ubuntu/ubuntu-install-nothreads b/sca-cpp/trunk/ubuntu/ubuntu-install-nothreads new file mode 100755 index 0000000000..9c17fbb3ef --- /dev/null +++ b/sca-cpp/trunk/ubuntu/ubuntu-install-nothreads @@ -0,0 +1,344 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +# Install a minimal distribution, the required system tools and libraries, +# runtime dependencies and the Tuscany SCA runtime on Ubuntu Server 12.04. + +# Display commands as they are executed +set -x + +# Build and install in the current directory +build=`pwd` + +# First update the system +sudo apt-get update + +# Install core dev tools +sudo apt-get -y install curl git-core subversion autoconf pkg-config automake libtool g++ make gdb vim +if [ "$?" != "0" ]; then + exit $? +fi + +# Build Libexpat +curl -L http://sourceforge.net/projects/expat/files/expat/2.0.1/expat-2.0.1.tar.gz/download -o expat-2.0.1.tar.gz +tar xzf expat-2.0.1.tar.gz +cd expat-2.0.1 +./configure --prefix=$build/expat-2.0.1-bin +make +make install +if [ "$?" != "0" ]; then + exit $? +fi +cd $build + +# Build Apache APR and APR util +sudo apt-get -y install libssl-dev libpcre3-dev +if [ "$?" != "0" ]; then + exit $? +fi +curl -OL http://archive.apache.org/dist/apr/apr-1.4.6.tar.gz +tar xzf apr-1.4.6.tar.gz +cd apr-1.4.6 +./buildconf +./configure --prefix=$build/apr-1.4.6-bin --disable-threads +make +make install +if [ "$?" != "0" ]; then + exit $? +fi +cd $build + +curl -OL http://archive.apache.org/dist/apr/apr-util-1.4.1.tar.gz +tar xzf apr-1.4.1.tar.gz +cd apr-util-1.4.1 +curl -OL http://svn.apache.org/repos/asf/tuscany/sca-cpp/trunk/patches/apr-util-1.4.1.patch +patch -p0 <apr-util-1.4.1.patch +./buildconf --with-apr=$build/apr-1.4.6 +./configure --with-apr=$build/apr-1.4.6-bin --with-openssl --with-crypto --with-expat=$build/expat-2.0.1-bin --prefix=$build/apr-util-1.4.1-bin +make +make install +if [ "$?" != "0" ]; then + exit $? +fi +cd $build + +# Build HTTP server +curl -OL http://archive.apache.org/dist/httpd/httpd-2.4.2.tar.gz +tar xzf httpd-2.4.2.tar.gz +cd httpd-2.4.2 +./configure --enable-ssl --enable-proxy --enable-usertrack --enable-cgi --enable-session-crypto --enable-mods-shared=most --enable-mpms-shared="prefork worker event" --with-mpm=prefork --with-apr=$build/apr-1.4.6-bin --with-apr-util=$build/apr-util-1.4.1-bin --with-expat=$build/expat-2.0.1-bin --prefix=$build/httpd-2.4.2-bin +make +make install +if [ "$?" != "0" ]; then + exit $? +fi +cd $build + +# Build Memcached +sudo apt-get -y install libevent-dev +if [ "$?" != "0" ]; then + exit $? +fi +curl -OL http://memcached.googlecode.com/files/memcached-1.4.13.tar.gz +tar xzf memcached-1.4.13.tar.gz +cd memcached-1.4.13 +./configure --prefix=$build/memcached-1.4.13-bin +make +make install +if [ "$?" != "0" ]; then + exit $? +fi +cd $build + +# Build Tinycdb +curl -OL http://www.corpit.ru/mjt/tinycdb/tinycdb_0.77.tar.gz +tar xzf tinycdb_0.77.tar.gz +cd tinycdb-0.77 +make all shared +make prefix=$build/tinycdb-0.77-bin install-all install-sharedlib +if [ "$?" != "0" ]; then + exit $? +fi +cd $build + +# Build Libcurl +curl -OL http://curl.haxx.se/download/curl-7.24.0.tar.gz +tar xzf curl-7.24.0.tar.gz +cd curl-7.24.0 +./configure --prefix=$build/curl-7.24.0-bin +make +make install +if [ "$?" != "0" ]; then + exit $? +fi +cd $build + +# Build Libxml2 +curl -OL ftp://xmlsoft.org/libxml2/libxml2-sources-2.7.7.tar.gz +tar xzf libxml2-sources-2.7.7.tar.gz +cd libxml2-2.7.7 +./configure --prefix=$build/libxml2-2.7.7-bin --without-threads +make +make install +if [ "$?" != "0" ]; then + exit $? +fi +cd $build + +# Build Mozilla Portable Runtime +curl -OL http://ftp.mozilla.org/pub/mozilla.org/nspr/releases/v4.8.8/src/nspr-4.8.8.tar.gz +tar xzf nspr-4.8.8.tar.gz +cd nspr-4.8.8/mozilla/nsprpub +./configure --prefix=$build/nspr-4.8.8-bin --enable-64bit +make +make install +if [ "$?" != "0" ]; then + exit $? +fi +cd $build + +# Build SpiderMonkey +sudo apt-get -y install zip unzip +if [ "$?" != "0" ]; then + exit $? +fi +curl -OL http://ftp.mozilla.org/pub/mozilla.org/js/js185-1.0.0.tar.gz +tar xzf js185-1.0.0.tar.gz +cd js-1.8.5/js/src +export LD_RUN_PATH=$build/nspr-4.8.8-bin/lib +./configure --prefix=$build/js-1.8.5-bin --with-system-nspr --enable-gczeal --with-nspr-prefix=$build/nspr-4.8.8-bin +make +make install +unset LD_RUN_PATH +ln -s $build/js-1.8.5-bin/lib/libmozjs185.so $build/js-1.8.5-bin/lib/libmozjs.so +if [ "$?" != "0" ]; then + exit $? +fi +cd $build + +# Build Libstrophe +git clone git://github.com/jsdelfino/libstrophe.git +cd libstrophe +./bootstrap.sh +./configure --prefix=$build/libstrophe-bin --with-expat=$build/expat-2.0.1-bin +make +make install +if [ "$?" != "0" ]; then + exit $? +fi +cd $build + +# Build Liboauth +curl -OL http://liboauth.sourceforge.net/pool/liboauth-0.9.1.tar.gz +tar xzf liboauth-0.9.1.tar.gz +cd liboauth-0.9.1 +./configure --prefix=$build/liboauth-0.9.1-bin CURL_CFLAGS="-I$build/curl-7.24.0-bin/include" CURL_LIBS="-L$build/curl-7.24.0-bin/lib -lcurl" +make +make install +if [ "$?" != "0" ]; then + exit $? +fi +cd $build + +# Build mod_security +curl -OL http://people.apache.org/~jsdelfino/tuscany/cpp/dependencies/modsecurity-apache_2.6.6.tar.gz +tar xzf modsecurity-apache_2.6.6.tar.gz +cd modsecurity-apache_2.6.6 +./configure --prefix=$build/modsecurity-apache-2.6.6-bin --with-apxs=$build/httpd-2.4.2-bin/bin/apxs --with-apr=$build/apr-1.4.6-bin/bin/apr-1-config --with-apu=$build/apr-util-1.4.1-bin/bin/apu-1-config --with-libxml=$build/libxml2-2.7.7-bin --with-curl=$build/curl-7.24.0-bin LIBS="-L$build/expat-2.0.1-bin/lib" +make +make install +if [ "$?" != "0" ]; then + exit $? +fi +cd $build +curl -OL http://people.apache.org/~jsdelfino/tuscany/cpp/dependencies/modsecurity-crs_2.2.5.tar.gz +tar xzf modsecurity-crs_2.2.5.tar.gz +cd modsecurity-crs_2.2.5 +#curl -OL http://svn.apache.org/repos/asf/tuscany/sca-cpp/trunk/patches/modsecurity-crs_2.2.5.patch +#patch -p0 <modsecurity-crs_2.2.2.patch +cp -R base_rules $build/modsecurity-apache-2.6.6-bin +cp -R optional_rules $build/modsecurity-apache-2.6.6-bin +if [ "$?" != "0" ]; then + exit $? +fi +cd $build + +# Build PostgreSQL and PgBouncer +sudo apt-get -y install libreadline-dev +if [ "$?" != "0" ]; then + exit $? +fi +curl -OL http://ftp.postgresql.org/pub/source/v9.1.2/postgresql-9.1.2.tar.gz +tar xzf postgresql-9.1.2.tar.gz +cd postgresql-9.1.2 +./configure --prefix=$build/postgresql-9.1.2-bin --disable-thread-safety +make +make install +if [ "$?" != "0" ]; then + exit $? +fi +cd $build +curl -OL http://pgfoundry.org/frs/download.php/3197/pgbouncer-1.5.tar.gz +tar xzf pgbouncer-1.5.tar.gz +cd pgbouncer-1.5 +./configure --prefix=$build/pgbouncer-1.5-bin +make +cp install-sh doc +make install +if [ "$?" != "0" ]; then + exit $? +fi +cd $build + +# Build Apache Thrift +sudo apt-get -y install bison flex libboost-dev libboost-filesystem-dev +if [ "$?" != "0" ]; then + exit $? +fi +curl -OL http://archive.apache.org/dist/incubator/thrift/0.2.0-incubating/thrift-0.2.0-incubating.tar.gz +tar xzf thrift-0.2.0-incubating.tar.gz +cd thrift-0.2.0 +curl -OL http://svn.apache.org/repos/asf/tuscany/sca-cpp/trunk/patches/thrift-0.2.0.patch +patch -p0 <thrift-0.2.0.patch +./bootstrap.sh +./configure --prefix=$build/thrift-0.2.0-bin --with-java=no --with-erlang=no --with-py=no --with-perl=no --with-ruby=no --with-csharp=no --disable-static +make +make install +if [ "$?" != "0" ]; then + exit $? +fi +cd $build + +# Build Facebook fb303 +cd thrift-0.2.0/contrib/fb303 +./bootstrap.sh +./configure --prefix=$build/thrift-0.2.0-bin/contrib/fb303 PY_PREFIX=$build/thrift-0.2.0-bin/contrib/fb303 --with-thriftpath=$build/thrift-0.2.0-bin --disable-static +make +make install +if [ "$?" != "0" ]; then + exit $? +fi +cp cpp/lib/libfb303.so $build/thrift-0.2.0-bin/contrib/fb303/lib +cd $build + +# Build Facebook Scribe +sudo apt-get -y install gawk +if [ "$?" != "0" ]; then + exit $? +fi +curl -OL http://github.com/downloads/facebook/scribe/scribe-2.2.tar.gz +tar xzf scribe-2.2.tar.gz +cd scribe +curl -OL http://svn.apache.org/repos/asf/tuscany/sca-cpp/trunk/patches/scribe-2.2.patch +patch -p0 <scribe-2.2.patch +autoreconf --force --verbose --install +./configure --prefix=$build/scribe-2.2-bin PY_PREFIX=$build/scribe-2.2-bin --with-thriftpath=$build/thrift-0.2.0-bin --with-fb303path=$build/thrift-0.2.0-bin/contrib/fb303 --disable-static CPPFLAGS="-DBOOST_FILESYSTEM_VERSION=2" LIBS="-lboost_system -lboost_filesystem" +make +make install +if [ "$?" != "0" ]; then + exit $? +fi +cp src/lib/libscribe.so $build/scribe-2.2-bin/lib +cd $build + +# Build Python +curl -OL http://www.python.org/ftp/python/2.6.6/Python-2.7.3.tgz +tar xzf Python-2.7.3.tgz +cd Python-2.7.3 +./configure --prefix=$build/python-2.7.3-bin --enable-shared --without-threads --with-system-expat=$build/expat-2.0.1-bin +make +make install +if [ "$?" != "0" ]; then + exit $? +fi +cd $build + +# Build Google Page Speed +curl -OL https://dl-ssl.google.com/page-speed/sdk/current/page-speed-sdk.zip +unzip page-speed-sdk.zip +cd page-speed-1.9 +make builddir=$build/page-speed-1.9-bin CXXFLAGS="-Wno-unused-but-set-variable" +if [ "$?" != "0" ]; then + exit $? +fi +cd $build + +# Build Apache Nuvem +git clone git://git.apache.org/nuvem.git +if [ "$?" != "0" ]; then + exit $? +fi +cd $build + +# Build Tuscany SCA +git clone git://git.apache.org/tuscany-sca-cpp.git +cd tuscany-sca-cpp +./bootstrap +./configure --prefix=$build/tuscany-sca-cpp-bin --with-curl=$build/curl-7.24.0-bin --with-apr=$build/apr-1.4.6-bin --with-apr-util=$build/apr-util-1.4.1-bin --with-httpd=$build/httpd-2.4.2-bin --with-memcached=$build/memcached-1.4.13-bin --with-tinycdb=$build/tinycdb-0.77-bin --with-js-include=$build/js-1.8.5-bin/include/js --with-js-lib=$build/js-1.8.5-bin/lib --enable-pagespeed --with-pagespeed=$build/page-speed-1.9-bin --disable-threads --enable-python --with-python=$build/python-2.7.3-bin --with-libxml2=$build/libxml2-2.7.7-bin --enable-chat --with-libstrophe=$build/libstrophe-bin --enable-sqldb --with-pgsql=$build/postgresql-9.1.2-bin --with-pgbouncer=$build/pgbouncer-1.5-bin --enable-log --with-thrift=$build/thrift-0.2.0-bin --with-scribe=$build/scribe-2.2-bin --enable-oauth --with-liboauth=$build/liboauth-0.9.1-bin --enable-mod-security --with-mod-security=$build/modsecurity-apache-2.6.6-bin +make +make install +if [ "$?" != "0" ]; then + exit $? +fi +cd $build + +# Create src archive +tar czf tuscany-sca-cpp-1.0-src.tar.gz apr-1.4.6 apr-1.4.6.tar.gz apr-1.4.6-bin apr-util-1.4.1 apr-util-1.4.1.tar.gz apr-util-1.4.1-bin curl-7.24.0 curl-7.24.0-bin curl-7.24.0.tar.gz expat-2.0.1 expat-2.0.1-bin expat-2.0.1.tar.gz httpd-2.4.2 httpd-2.4.2.tar.gz httpd-2.4.2-bin js-1.8.5-bin js-1.8.5 js185-1.0.0.tar.gz liboauth-0.9.1 liboauth-0.9.1-bin liboauth-0.9.1.tar.gz libstrophe libstrophe-bin libxml2-2.7.7 libxml2-2.7.7-bin libxml2-sources-2.7.7.tar.gz memcached-1.4.13 memcached-1.4.13-bin memcached-1.4.13.tar.gz modsecurity-apache_2.6.6 modsecurity-apache-2.6.6-bin modsecurity-apache_2.6.6.tar.gz modsecurity-crs_2.2.5 modsecurity-crs_2.2.5.tar.gz nspr-4.8.8-bin nspr-4.8.8 nspr-4.8.8.tar.gz nuvem page-speed-1.9 page-speed-1.9-bin page-speed-sdk.zip pgbouncer-1.5 pgbouncer-1.5-bin pgbouncer-1.5.tar.gz postgresql-9.1.2 postgresql-9.1.2-bin postgresql-9.1.2.tar.gz Python-2.7.3 python-2.7.3-bin Python-2.7.3.tgz scribe scribe-2.2-bin scribe-2.2.tar.gz thrift-0.2.0 thrift-0.2.0-bin thrift-0.2.0-incubating.tar.gz tinycdb-0.77 tinycdb-0.77-bin tinycdb_0.77.tar.gz tuscany-sca-cpp tuscany-sca-cpp-bin + +# Create bin archive +tar czf tuscany-sca-cpp-1.0.tar.gz apr-1.4.6-bin apr-util-1.4.1-bin curl-7.24.0-bin expat-2.0.1-bin httpd-2.4.2-bin js-1.8.5-bin liboauth-0.9.1-bin libstrophe-bin libxml2-2.7.7-bin memcached-1.4.13-bin modsecurity-apache-2.6.6-bin nspr-4.8.8-bin nuvem/nuvem-parallel page-speed-1.9-bin pgbouncer-1.5-bin postgresql-9.1.2-bin python-2.7.3-bin scribe-2.2-bin thrift-0.2.0-bin tinycdb-0.77-bin tuscany-sca-cpp tuscany-sca-cpp-bin + |