From 6ab0d6faaa4f3b4cf2ca45f4c80436ce83423b9a Mon Sep 17 00:00:00 2001 From: jsdelfino Date: Mon, 16 Jul 2012 06:48:21 +0000 Subject: Upgrade to HTTPD 2.4.2, APR 1.4.6, Memcached 1.4.13, Python 2.7.3, Ubuntu 12.04, and Mac OS X 10.7.4. git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1361918 13f79535-47bb-0310-9956-ffa450edef68 --- sca-cpp/trunk/INSTALL | 77 ++--- sca-cpp/trunk/README | 12 +- sca-cpp/trunk/components/cache/memcached-start | 8 +- sca-cpp/trunk/components/cache/memcached-stop | 8 +- sca-cpp/trunk/components/log/scribed-central-conf | 9 +- .../components/log/scribed-central-firehose-conf | 9 +- sca-cpp/trunk/components/log/scribed-client-conf | 13 +- sca-cpp/trunk/components/sqldb/pgsql-conf | 33 +- sca-cpp/trunk/components/sqldb/pgsql-standby-conf | 27 +- sca-cpp/trunk/configure.ac | 27 +- sca-cpp/trunk/macos/macos-install | 148 +++------ sca-cpp/trunk/modules/http/httpd-event-conf | 8 +- sca-cpp/trunk/modules/http/httpd-worker-conf | 8 +- sca-cpp/trunk/modules/http/proxy-ssl-conf | 8 +- sca-cpp/trunk/modules/js/Makefile.am | 29 +- sca-cpp/trunk/modules/wsgi/Makefile.am | 4 +- sca-cpp/trunk/patches/apr-1.4.x.patch | 12 - sca-cpp/trunk/patches/apr-util-1.4.1.patch | 12 + sca-cpp/trunk/patches/memcached-1.4.7.patch | 12 - sca-cpp/trunk/patches/scribe-2.2.patch | 78 +++++ sca-cpp/trunk/patches/scribe.patch | 50 --- sca-cpp/trunk/patches/thrift-0.2.0.patch | 39 +++ sca-cpp/trunk/ubuntu/Makefile.am | 2 +- sca-cpp/trunk/ubuntu/ip-redirect | 8 +- sca-cpp/trunk/ubuntu/ubuntu-backup | 8 +- sca-cpp/trunk/ubuntu/ubuntu-backup-all | 8 +- sca-cpp/trunk/ubuntu/ubuntu-bin-all-image | 38 ++- sca-cpp/trunk/ubuntu/ubuntu-bin-image | 33 +- sca-cpp/trunk/ubuntu/ubuntu-dev-all-image | 11 +- sca-cpp/trunk/ubuntu/ubuntu-dev-image | 13 +- sca-cpp/trunk/ubuntu/ubuntu-install | 162 ++++------ sca-cpp/trunk/ubuntu/ubuntu-install-all | 106 ++++--- .../trunk/ubuntu/ubuntu-install-all-dependencies | 86 ++++++ sca-cpp/trunk/ubuntu/ubuntu-install-dependencies | 68 ++++ sca-cpp/trunk/ubuntu/ubuntu-install-nothreads | 344 +++++++++++++++++++++ 35 files changed, 1029 insertions(+), 489 deletions(-) delete mode 100644 sca-cpp/trunk/patches/apr-1.4.x.patch create mode 100644 sca-cpp/trunk/patches/apr-util-1.4.1.patch delete mode 100644 sca-cpp/trunk/patches/memcached-1.4.7.patch create mode 100644 sca-cpp/trunk/patches/scribe-2.2.patch delete mode 100644 sca-cpp/trunk/patches/scribe.patch create mode 100644 sca-cpp/trunk/patches/thrift-0.2.0.patch create mode 100755 sca-cpp/trunk/ubuntu/ubuntu-install-all-dependencies create mode 100755 sca-cpp/trunk/ubuntu/ubuntu-install-dependencies create mode 100755 sca-cpp/trunk/ubuntu/ubuntu-install-nothreads (limited to 'sca-cpp') 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 <$root/scribe/conf/scribe-central.conf <$root/scribe/conf/scribe-client.conf < type=network remote_host=$central -remote_port=$cport +remote_port=1463 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 <$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 <$root/conf/mpm.conf <>$root/conf/mpm.conf <$root/conf/mpm.conf <>$root/conf/mpm.conf <>$root/conf/svhost-ssl.conf <>$root/conf/dvhost-ssl.conf <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-1.4.x.patch deleted file mode 100644 index 2b88d3575f..0000000000 --- a/sca-cpp/trunk/patches/apr-1.4.x.patch +++ /dev/null @@ -1,12 +0,0 @@ ---- memcache/apr_memcache.c -+++ memcache/apr_memcache.c -@@ -301,9 +301,6 @@ - } - - rv = apr_socket_connect(conn->sock, sa); -- if (rv != APR_SUCCESS) { -- return rv; -- } - - rv = apr_socket_timeout_set(conn->sock, -1); - if (rv != APR_SUCCESS) { diff --git a/sca-cpp/trunk/patches/apr-util-1.4.1.patch b/sca-cpp/trunk/patches/apr-util-1.4.1.patch new file mode 100644 index 0000000000..2b88d3575f --- /dev/null +++ b/sca-cpp/trunk/patches/apr-util-1.4.1.patch @@ -0,0 +1,12 @@ +--- memcache/apr_memcache.c ++++ memcache/apr_memcache.c +@@ -301,9 +301,6 @@ + } + + rv = apr_socket_connect(conn->sock, sa); +- if (rv != APR_SUCCESS) { +- return rv; +- } + + rv = apr_socket_timeout_set(conn->sock, -1); + if (rv != APR_SUCCESS) { 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-2.2.patch b/sca-cpp/trunk/patches/scribe-2.2.patch new file mode 100644 index 0000000000..16c2e3871e --- /dev/null +++ b/sca-cpp/trunk/patches/scribe-2.2.patch @@ -0,0 +1,78 @@ +--- src/common.h ++++ src/common.h +@@ -42,6 +42,8 @@ + #include + #include + #include ++#include ++#include + #include + #include + #include + +--- src/file.cpp ++++ src/file.cpp +@@ -74,9 +74,21 @@ + } + + bool StdFile::openWrite() { ++ // if file is a fifo, temporarily open it for read ++ int fd = -1; ++ struct stat st; ++ int s = stat(filename.c_str(), &st); ++ if (s != -1 && S_ISFIFO(st.st_mode)) ++ fd = ::open(filename.c_str(), O_RDONLY | O_NONBLOCK); ++ + // open file for write in append mode + ios_base::openmode mode = fstream::out | fstream::app; +- return open(mode); ++ bool r = open(mode); ++ ++ // close fifo ++ if (fd != -1) ++ ::close(fd); ++ return r; + } + + bool StdFile::openTruncate() { + +--- src/scribe_server.cpp ++++ src/scribe_server.cpp +@@ -55,6 +55,8 @@ + if (-1 == setrlimit(RLIMIT_NOFILE, &r_fd)) { + LOG_OPER("setrlimit error (setting max fd size)"); + } ++ ++ signal(SIGPIPE, SIG_IGN); + + 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/scribe.patch b/sca-cpp/trunk/patches/scribe.patch deleted file mode 100644 index 6340c4634d..0000000000 --- a/sca-cpp/trunk/patches/scribe.patch +++ /dev/null @@ -1,50 +0,0 @@ ---- src/common.h -+++ src/common.h -@@ -42,6 +42,8 @@ - #include - #include - #include -+#include -+#include - #include - #include - #include - ---- src/file.cpp -+++ src/file.cpp -@@ -74,9 +74,21 @@ bool StdFile::openRead() { - } - - bool StdFile::openWrite() { -+ // if file is a fifo, temporarily open it for read -+ int fd = -1; -+ struct stat st; -+ int s = stat(filename.c_str(), &st); -+ if (s != -1 && S_ISFIFO(st.st_mode)) -+ fd = ::open(filename.c_str(), O_RDONLY | O_NONBLOCK); -+ - // open file for write in append mode - ios_base::openmode mode = fstream::out | fstream::app; -- return open(mode); -+ bool r = open(mode); -+ -+ // close fifo -+ if (fd != -1) -+ ::close(fd); -+ return r; - } - - bool StdFile::openTruncate() { - ---- src/scribe_server.cpp -+++ src/scribe_server.cpp -@@ -55,6 +55,8 @@ int main(int argc, char **argv) { - if (-1 == setrlimit(RLIMIT_NOFILE, &r_fd)) { - LOG_OPER("setrlimit error (setting max fd size)"); - } -+ -+ signal(SIGPIPE, SIG_IGN); - - int next_option; - const char* const short_options = "hp:c:"; - 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 processor, + boost::shared_ptr protocolFactory, ++ std::string host, + int port, + boost::shared_ptr threadManager = boost::shared_ptr()) : + 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