diff options
author | jsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68> | 2011-06-28 15:50:47 +0000 |
---|---|---|
committer | jsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68> | 2011-06-28 15:50:47 +0000 |
commit | caec161501b7157e102c7e6532084616e8dce176 (patch) | |
tree | 309db281ba8898f82b385aff3c36369bc34a9031 /sca-cpp | |
parent | 1e9176c21306dd9af9671f3599c377811f73bebc (diff) |
Port to Mac OS X 10.6.7.
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1140690 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to '')
158 files changed, 875 insertions, 353 deletions
diff --git a/sca-cpp/trunk/.gitignore b/sca-cpp/trunk/.gitignore index fc9d3bd147..792e5b6323 100644 --- a/sca-cpp/trunk/.gitignore +++ b/sca-cpp/trunk/.gitignore @@ -47,6 +47,7 @@ surefire*.properties *.o *.in *.so +*.dylib Makefile .deps/ .libs/ diff --git a/sca-cpp/trunk/INSTALL b/sca-cpp/trunk/INSTALL index 56c57c22c1..8727969b53 100644 --- a/sca-cpp/trunk/INSTALL +++ b/sca-cpp/trunk/INSTALL @@ -1,15 +1,20 @@ Apache Tuscany SCA Runtime ========================== -Automated installation on Ubuntu 10.10 64-bit +Automated installation on Ubuntu Server 10.10 ============================================= -Tuscany provides two automated install scripts for Ubuntu. You can start with -a fresh Ubuntu Server 10.10 64-bit system and these scripts will take care of -all the download, build and installation steps for you. +Tuscany provides two automated install scripts for Ubuntu Server 10.10. You can +start with a fresh Ubuntu Server 10.10 system and these scripts will take care +of all the download, build and installation steps for you. + +ubuntu/ubuntu-install: +Build and installation of the most commonly used Tuscany features with most +dependencies built from source. ubuntu/ubuntu-install-all: -Complete build and installation with most dependencies built from source. +Build and installation of all the Tuscany features with most dependencies +built from source. System dependencies are downloaded and installed using sudo apt-get. Source dependencies are downloaded and built in the current directory. @@ -17,21 +22,60 @@ dependencies are downloaded and built in the current directory. To run the automated installation: mkdir tuscany cd tuscany -wget http://svn.apache.org/repos/asf/tuscany/sca-cpp/trunk/ubuntu/ubuntu-install-all -chmod +x ./ubuntu-install-all -./ubuntu-install-all +curl -OL http://svn.apache.org/repos/asf/tuscany/sca-cpp/trunk/ubuntu/ubuntu-install +chmod +x ./ubuntu-install +./ubuntu-install 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 10.10 64-bit. +Ubuntu Server 10.10. + +Automated installation on Max OS X 10.6.7 +========================================= + +Tuscany provides an automated install script for Mac OS X 10.6.7. You can start +with a fresh Mac OS X 10.6.7 system and the script will take care of all the +download, build and installation steps for you. + +macos/macos-install: +Build and installation of the most commonly used Tuscany features with all +dependencies built from source. + +The only required system dependency is the GCC C++ compiler 4.4.5+. All other +dependencies are downloaded and built from source in the current directory. + +Before running the automated installation install GCC 4.6 from the HPC for Mac +OS X project (http://hpc.sourceforge.net/) like this: +curl -OL http://prdownloads.sourceforge.net/hpc/gcc-snwleo-intel-bin.tar.gz +sudo tar -xf $build/gcc-snwleo-intel-bin.tar.gz -C / + +or if you prefer to use GCC from Macports (http://www.macports.org/), install +GCC 4.4.5+ like this: +sudo port install gcc44 + +then adjust the following line in macos/macos-install: +./configure CC=/usr/local/bin/gcc CXX=/usr/local/bin/g++ ... +to point to the GCC binaries you've installed. + +To run the automated installation: +mkdir tuscany +cd tuscany +curl -OL http://svn.apache.org/repos/asf/tuscany/sca-cpp/trunk/macos/macos-install +chmod +x ./macos-install +./macos-install + +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 Mac +OS X 10.6.7. -For manual build and install steps on other systems or if you need to customize -your installation, read on... +Step by step build and installation +=================================== -Building -======== +For manual build and install steps on systems other than Ubuntu 10.10 and +Mac OS X 10.6.7, or if you need to customize your installation, read on... The Tuscany SCA Linux build uses the GNU Autotools tool chain. @@ -70,6 +114,10 @@ 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 + Web Services: Apache Axis2/C 1.6.0 (http://ws.apache.org/axis2/c/) @@ -154,6 +202,9 @@ To build the support for OAuth authorization: To build the support for OpenID authentication: --enable-openid +To build the support for Mod-security: +--enable-mod-security + To generate doxygen documentation, add: --enable-doxygen @@ -162,7 +213,7 @@ in the configure help: ./configure --help -Here's an example configuration tested on Ubuntu 10.10 64-bit, with the system +Here's an example configuration tested on Ubuntu 10.10, with the system dependencies installed in the standard system directories and some of the dependencies installed under $HOME: @@ -189,6 +240,7 @@ dependencies installed under $HOME: --with-scribe=$HOME/scribe-2.2-bin \ --enable-openid --with-mod-auth-openid=$HOME/mod-auth-openid-bin \ --enable-oauth --with-liboauth=$HOME/liboauth-0.9.1-bin \ +--enable-mod-security --with-mod-security=$HOME/modsecurity-apache-2.6.0-bin \ --enable-maintainer-mode @@ -207,10 +259,7 @@ make dist To build a binary distribution, do this: make bindist - -Installing -========== - To install the Tuscany SCA binaries, do this: make install + diff --git a/sca-cpp/trunk/README b/sca-cpp/trunk/README index d78c41808f..6e7b99c348 100644 --- a/sca-cpp/trunk/README +++ b/sca-cpp/trunk/README @@ -37,8 +37,9 @@ 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 -cd tuscany-sca-cpp -wget -P .git http://git.apache.org/authors.txt +cd tuscany-sca-cpp/.git +curl -OL http://git.apache.org/authors.txt +cd .. git config svn.authorsfile .git/authors.txt git config user.email <you>@apache.org git config svn.rmdir true @@ -92,7 +93,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 | | - | |-- ubuntu Automated install on Ubuntu 10.10 64-bit + | |-- macos Automated install on Mac OS X 10.1.7 + | |-- ubuntu Automated install on Ubuntu 10.10 | |-- branches Topic and release branches | diff --git a/sca-cpp/trunk/bootstrap b/sca-cpp/trunk/bootstrap index af38864985..77850981e3 100755 --- a/sca-cpp/trunk/bootstrap +++ b/sca-cpp/trunk/bootstrap @@ -17,7 +17,8 @@ # specific language governing permissions and limitations # under the License. -for i in "libtoolize --force" aclocal autoconf autoheader +libtoolize="$(type -P glibtoolize || type -P libtoolize)" +for i in "$libtoolize --force" aclocal autoconf autoheader do echo -n "Running $i..." $i || exit 1 diff --git a/sca-cpp/trunk/components/cache/Makefile.am b/sca-cpp/trunk/components/cache/Makefile.am index 2f162bf8f5..b1ad26a246 100644 --- a/sca-cpp/trunk/components/cache/Makefile.am +++ b/sca-cpp/trunk/components/cache/Makefile.am @@ -28,19 +28,19 @@ memcached.prefix: $(top_builddir)/config.status EXTRA_DIST = cache.composite memcache.componentType datacache.componentType memocache.componentType *.scm comp_LTLIBRARIES = libmemcache.la libdatacache.la libmemocache.la -noinst_DATA = libmemcache.so libdatacache.so libmemocache.so +noinst_DATA = libmemcache${libsuffix} libdatacache${libsuffix} libmemocache${libsuffix} libmemcache_la_SOURCES = memcache.cpp -libmemcache.so: - ln -s .libs/libmemcache.so +libmemcache${libsuffix}: + ln -s .libs/libmemcache${libsuffix} libdatacache_la_SOURCES = datacache.cpp -libdatacache.so: - ln -s .libs/libdatacache.so +libdatacache${libsuffix}: + ln -s .libs/libdatacache${libsuffix} libmemocache_la_SOURCES = memocache.cpp -libmemocache.so: - ln -s .libs/libmemocache.so +libmemocache${libsuffix}: + ln -s .libs/libmemocache${libsuffix} memcache_test_SOURCES = memcache-test.cpp memcache_test_LDFLAGS = -lxml2 @@ -50,4 +50,5 @@ client_test_LDFLAGS = -lxml2 -lcurl -lmozjs dist_noinst_SCRIPTS = memcached-test memcached-ssl-test server-test noinst_PROGRAMS = memcache-test client-test -TESTS = memcached-test memcached-ssl-test server-test +#TESTS = memcached-test memcached-ssl-test server-test +TESTS = memcached-test server-test diff --git a/sca-cpp/trunk/components/cache/memcached-ssl-test b/sca-cpp/trunk/components/cache/memcached-ssl-test index 88143490f8..a99a5a9144 100755 --- a/sca-cpp/trunk/components/cache/memcached-ssl-test +++ b/sca-cpp/trunk/components/cache/memcached-ssl-test @@ -51,4 +51,4 @@ rc=$? ./memcached-stop 11411 ./memcached-stop 11412 ./memcached-stop 11413 -return $rc +exit $rc diff --git a/sca-cpp/trunk/components/cache/memcached-start b/sca-cpp/trunk/components/cache/memcached-start index 75524d0dec..0946da28f5 100755 --- a/sca-cpp/trunk/components/cache/memcached-start +++ b/sca-cpp/trunk/components/cache/memcached-start @@ -18,7 +18,7 @@ # under the License. # Start memcached -here=`readlink -f $0`; here=`dirname $here` +here=`echo "import os; print os.path.realpath('$0')" | python`; here=`dirname $here` addr=$1 if [ "$addr" = "" ]; then diff --git a/sca-cpp/trunk/components/cache/memcached-stop b/sca-cpp/trunk/components/cache/memcached-stop index c414616752..b76fc28466 100755 --- a/sca-cpp/trunk/components/cache/memcached-stop +++ b/sca-cpp/trunk/components/cache/memcached-stop @@ -18,7 +18,7 @@ # under the License. # Stop memcached -here=`readlink -f $0`; here=`dirname $here` +here=`echo "import os; print os.path.realpath('$0')" | python`; here=`dirname $here` addr=$1 if [ "$addr" = "" ]; then diff --git a/sca-cpp/trunk/components/cache/memcached-test b/sca-cpp/trunk/components/cache/memcached-test index 993d63ba1b..8e034bb936 100755 --- a/sca-cpp/trunk/components/cache/memcached-test +++ b/sca-cpp/trunk/components/cache/memcached-test @@ -31,4 +31,4 @@ rc=$? ./memcached-stop 11211 ./memcached-stop 11212 ./memcached-stop 11213 -return $rc +exit $rc diff --git a/sca-cpp/trunk/components/cache/server-test b/sca-cpp/trunk/components/cache/server-test index 6d14f789f5..1fea285100 100755 --- a/sca-cpp/trunk/components/cache/server-test +++ b/sca-cpp/trunk/components/cache/server-test @@ -48,4 +48,4 @@ rc=$? ./memcached-stop 11412 ./memcached-stop 11413 sleep 2 -return $rc +exit $rc diff --git a/sca-cpp/trunk/components/chat/Makefile.am b/sca-cpp/trunk/components/chat/Makefile.am index 8856e536fd..5c995ad452 100644 --- a/sca-cpp/trunk/components/chat/Makefile.am +++ b/sca-cpp/trunk/components/chat/Makefile.am @@ -34,22 +34,22 @@ vysper.prefix: $(top_builddir)/config.status EXTRA_DIST = chat.composite chat-sendreceiver.componentType chat-sender.componentType chat-sender2.componentType *.scm comp_LTLIBRARIES = libchat-sendreceiver.la libchat-sender.la libchat-sender2.la -noinst_DATA = libchat-sendreceiver.so libchat-sender.so libchat-sender2.so +noinst_DATA = libchat-sendreceiver${libsuffix} libchat-sender${libsuffix} libchat-sender2${libsuffix} libchat_sendreceiver_la_SOURCES = chat-sendreceiver.cpp libchat_sendreceiver_la_LDFLAGS = -L${LIBSTROPHE_LIB} -R${LIBSTROPHE_LIB} -lstrophe -lssl -lresolv -libchat-sendreceiver.so: - ln -s .libs/libchat-sendreceiver.so +libchat-sendreceiver${libsuffix}: + ln -s .libs/libchat-sendreceiver${libsuffix} libchat_sender_la_SOURCES = chat-sender.cpp libchat_sender_la_LDFLAGS = -L${LIBSTROPHE_LIB} -R${LIBSTROPHE_LIB} -lstrophe -lssl -lresolv -libchat-sender.so: - ln -s .libs/libchat-sender.so +libchat-sender${libsuffix}: + ln -s .libs/libchat-sender${libsuffix} libchat_sender2_la_SOURCES = chat-sender2.cpp libchat_sender2_la_LDFLAGS = -L${LIBSTROPHE_LIB} -R${LIBSTROPHE_LIB} -lstrophe -lssl -lresolv -libchat-sender2.so: - ln -s .libs/libchat-sender2.so +libchat-sender2${libsuffix}: + ln -s .libs/libchat-sender2${libsuffix} chat_send_SOURCES = chat-send.cpp chat_send_LDFLAGS = -L${LIBSTROPHE_LIB} -R${LIBSTROPHE_LIB} -lstrophe -lssl -lresolv diff --git a/sca-cpp/trunk/components/chat/echo-test b/sca-cpp/trunk/components/chat/echo-test index 271d40d122..c155d4a9a8 100755 --- a/sca-cpp/trunk/components/chat/echo-test +++ b/sca-cpp/trunk/components/chat/echo-test @@ -28,4 +28,4 @@ rc=$? # Cleanup ./vysper-stop sleep 1 -return $rc +exit $rc diff --git a/sca-cpp/trunk/components/chat/server-test b/sca-cpp/trunk/components/chat/server-test index fcac90741c..cbece709f5 100755 --- a/sca-cpp/trunk/components/chat/server-test +++ b/sca-cpp/trunk/components/chat/server-test @@ -40,4 +40,4 @@ rc=$? sleep 1 ./vysper-stop sleep 1 -return $rc +exit $rc diff --git a/sca-cpp/trunk/components/chat/vysper-classpath b/sca-cpp/trunk/components/chat/vysper-classpath index 7cf16a5ae8..e164200ed2 100755 --- a/sca-cpp/trunk/components/chat/vysper-classpath +++ b/sca-cpp/trunk/components/chat/vysper-classpath @@ -18,7 +18,7 @@ # under the License. # Compute a classpath for running a Vysper server -here=`readlink -f $0`; here=`dirname $here` +here=`echo "import os; print os.path.realpath('$0')" | python`; here=`dirname $here` if [ "$1" = "" ]; then vysper_prefix=`cat $here/vysper.prefix` diff --git a/sca-cpp/trunk/components/chat/vysper-start b/sca-cpp/trunk/components/chat/vysper-start index af95ecadf4..b7fcad5217 100755 --- a/sca-cpp/trunk/components/chat/vysper-start +++ b/sca-cpp/trunk/components/chat/vysper-start @@ -18,7 +18,7 @@ # under the License. # Start Vysper test XMPP server -here=`readlink -f $0`; here=`dirname $here` +here=`echo "import os; print os.path.realpath('$0')" | python`; here=`dirname $here` java_prefix=`cat $here/../../modules/java/java.prefix` mkdir -p $here/tmp/logs diff --git a/sca-cpp/trunk/components/chat/vysper-stop b/sca-cpp/trunk/components/chat/vysper-stop index 3c4be4efa9..6ae9246134 100755 --- a/sca-cpp/trunk/components/chat/vysper-stop +++ b/sca-cpp/trunk/components/chat/vysper-stop @@ -18,7 +18,7 @@ # under the License. # Stop Vysper test XMPP server -here=`readlink -f $0`; here=`dirname $here` +here=`echo "import os; print os.path.realpath('$0')" | python`; here=`dirname $here` java_prefix=`cat $here/../../modules/java/java.prefix` kill `ps -ef | grep -v grep | grep "${java_prefix}/jre/bin/java" | grep "vysper" | awk '{ print $2 }'` diff --git a/sca-cpp/trunk/components/filedb/Makefile.am b/sca-cpp/trunk/components/filedb/Makefile.am index 359ad68a2f..c6589a1b7b 100644 --- a/sca-cpp/trunk/components/filedb/Makefile.am +++ b/sca-cpp/trunk/components/filedb/Makefile.am @@ -23,12 +23,12 @@ compdir=$(prefix)/components/filedb EXTRA_DIST = filedb.composite filedb.componentType comp_LTLIBRARIES = libfiledb.la -noinst_DATA = libfiledb.so +noinst_DATA = libfiledb${libsuffix} libfiledb_la_SOURCES = filedb.cpp libfiledb_la_LDFLAGS = -lxml2 -lmozjs -libfiledb.so: - ln -s .libs/libfiledb.so +libfiledb${libsuffix}: + ln -s .libs/libfiledb${libsuffix} file_test_SOURCES = file-test.cpp file_test_LDFLAGS = -lxml2 -lmozjs diff --git a/sca-cpp/trunk/components/filedb/filedb-test b/sca-cpp/trunk/components/filedb/filedb-test index 083bd1b96c..6d82936f6d 100755 --- a/sca-cpp/trunk/components/filedb/filedb-test +++ b/sca-cpp/trunk/components/filedb/filedb-test @@ -28,4 +28,4 @@ mkdir -p tmp/jsondb rc=$? # Cleanup -return $rc +exit $rc diff --git a/sca-cpp/trunk/components/filedb/server-test b/sca-cpp/trunk/components/filedb/server-test index ace8dd59e2..f49ba8e80a 100755 --- a/sca-cpp/trunk/components/filedb/server-test +++ b/sca-cpp/trunk/components/filedb/server-test @@ -37,4 +37,4 @@ rc=$? # Cleanup ../../modules/http/httpd-stop tmp sleep 2 -return $rc +exit $rc diff --git a/sca-cpp/trunk/components/http/Makefile.am b/sca-cpp/trunk/components/http/Makefile.am index 43e125682e..8b97f2e16d 100644 --- a/sca-cpp/trunk/components/http/Makefile.am +++ b/sca-cpp/trunk/components/http/Makefile.am @@ -20,32 +20,32 @@ compdir=$(prefix)/components/http EXTRA_DIST = http.composite httpget.componentType httpdelete.componentType *.scm comp_LTLIBRARIES = libhttpget.la libhttpdelete.la libhttppost.la libhttpput.la libhttppatch.la -noinst_DATA = libhttpget.so libhttpdelete.so libhttppost.so libhttpput.so libhttppatch.so +noinst_DATA = libhttpget${libsuffix} libhttpdelete${libsuffix} libhttppost${libsuffix} libhttpput${libsuffix} libhttppatch${libsuffix} libhttpget_la_SOURCES = httpget.cpp libhttpget_la_LDFLAGS = -lxml2 -lmozjs -curl -libhttpget.so: - ln -s .libs/libhttpget.so +libhttpget${libsuffix}: + ln -s .libs/libhttpget${libsuffix} libhttpdelete_la_SOURCES = httpdelete.cpp libhttpdelete_la_LDFLAGS = -lxml2 -lmozjs -curl -libhttpdelete.so: - ln -s .libs/libhttpdelete.so +libhttpdelete${libsuffix}: + ln -s .libs/libhttpdelete${libsuffix} libhttppost_la_SOURCES = httppost.cpp libhttppost_la_LDFLAGS = -lxml2 -lmozjs -curl -libhttppost.so: - ln -s .libs/libhttppost.so +libhttppost${libsuffix}: + ln -s .libs/libhttppost${libsuffix} libhttpput_la_SOURCES = httpput.cpp libhttpput_la_LDFLAGS = -lxml2 -lmozjs -curl -libhttpput.so: - ln -s .libs/libhttpput.so +libhttpput${libsuffix}: + ln -s .libs/libhttpput${libsuffix} libhttppatch_la_SOURCES = httppatch.cpp libhttppatch_la_LDFLAGS = -lxml2 -lmozjs -curl -libhttppatch.so: - ln -s .libs/libhttppatch.so +libhttppatch${libsuffix}: + ln -s .libs/libhttppatch${libsuffix} client_test_SOURCES = client-test.cpp client_test_LDFLAGS = -lxml2 -lcurl -lmozjs diff --git a/sca-cpp/trunk/components/http/server-test b/sca-cpp/trunk/components/http/server-test index edfeb5d189..1deb46aa26 100755 --- a/sca-cpp/trunk/components/http/server-test +++ b/sca-cpp/trunk/components/http/server-test @@ -36,4 +36,4 @@ rc=$? # Cleanup ../../modules/http/httpd-stop tmp sleep 2 -return $rc +exit $rc diff --git a/sca-cpp/trunk/components/log/Makefile.am b/sca-cpp/trunk/components/log/Makefile.am index 88ff7b3001..92be162101 100644 --- a/sca-cpp/trunk/components/log/Makefile.am +++ b/sca-cpp/trunk/components/log/Makefile.am @@ -36,31 +36,31 @@ EXTRA_DIST = log.composite log.componentType logger.componentType *.scm *.thrift BUILT_SOURCES=gen-cpp/fb303_constants.cpp gen-cpp/fb303_types.cpp gen-cpp/scribe_constants.cpp gen-cpp/scribe.cpp gen-cpp/scribe_types.cpp gen-cpp/FacebookService.cpp gen-cpp/scribe.h gen-cpp/fb303_constants.cpp gen-cpp/fb303_types.cpp gen-cpp/scribe_constants.cpp gen-cpp/scribe.cpp gen-cpp/scribe_types.cpp gen-cpp/FacebookService.cpp gen-cpp/scribe.h: scribe.thrift - ${THRIFT_PREFIX}/bin/thrift -r --gen cpp scribe.thrift; sed -i -e '1i#pragma GCC diagnostic ignored "-Wconversion"\n#pragma GCC diagnostic ignored "-Wunused"\n' gen-cpp/*.cpp + ${THRIFT_PREFIX}/bin/thrift -r --gen cpp scribe.thrift; (ls gen-cpp/*.cpp gen-cpp/*.h | xargs -I {} -t ./thrift-pragmas {}) CLEANFILES = gen-cpp/* comp_LTLIBRARIES = liblog.la liblogger.la -noinst_DATA = liblog.so liblogger.so +noinst_DATA = liblog${libsuffix} liblogger${libsuffix} nodist_liblog_la_SOURCES = gen-cpp/fb303_constants.cpp gen-cpp/fb303_types.cpp gen-cpp/scribe_constants.cpp gen-cpp/scribe.cpp gen-cpp/scribe_types.cpp gen-cpp/FacebookService.cpp gen-cpp/scribe.h -liblog_la_CXXFLAGS = -Wno-unused-parameter -Wno-conversion +liblog_la_CXXFLAGS = -Wno-unused-parameter -Wno-conversion -Wno-return-type liblog_la_SOURCES = log.cpp liblog_la_LDFLAGS = -L${THRIFT_LIB} -R${THRIFT_LIB} -lthrift -L${FB303_LIB} -R${FB303_LIB} -lfb303 -L${SCRIBE_LIB} -R${SCRIBE_LIB} -lscribe -liblog.so: - ln -s .libs/liblog.so +liblog${libsuffix}: + ln -s .libs/liblog${libsuffix} nodist_liblogger_la_SOURCES = gen-cpp/fb303_constants.cpp gen-cpp/fb303_types.cpp gen-cpp/scribe_constants.cpp gen-cpp/scribe.cpp gen-cpp/scribe_types.cpp gen-cpp/FacebookService.cpp gen-cpp/scribe.h -liblogger_la_CXXFLAGS = -Wno-unused-parameter -Wno-conversion +liblogger_la_CXXFLAGS = -Wno-unused-parameter -Wno-conversion -Wno-return-type liblogger_la_SOURCES = logger.cpp liblogger_la_LDFLAGS = -L${THRIFT_LIB} -R${THRIFT_LIB} -lthrift -L${FB303_LIB} -R${FB303_LIB} -lfb303 -L${SCRIBE_LIB} -R${SCRIBE_LIB} -lscribe -liblogger.so: - ln -s .libs/liblogger.so +liblogger${libsuffix}: + ln -s .libs/liblogger${libsuffix} comp_PROGRAMS = scribe-cat nodist_scribe_cat_SOURCES = gen-cpp/fb303_constants.cpp gen-cpp/fb303_types.cpp gen-cpp/scribe_constants.cpp gen-cpp/scribe.cpp gen-cpp/scribe_types.cpp gen-cpp/FacebookService.cpp gen-cpp/scribe.h -scribe_cat_CXXFLAGS = -Wno-unused-parameter -Wno-conversion +scribe_cat_CXXFLAGS = -Wno-unused-parameter -Wno-conversion -Wno-return-type scribe_cat_SOURCES = scribe-cat.cpp scribe_cat_LDFLAGS = -L${THRIFT_LIB} -R${THRIFT_LIB} -lthrift -L${FB303_LIB} -R${FB303_LIB} -lfb303 -L${SCRIBE_LIB} -R${SCRIBE_LIB} -lscribe diff --git a/sca-cpp/trunk/components/log/scribe-cat.cpp b/sca-cpp/trunk/components/log/scribe-cat.cpp index f3c5e898cd..77011e8b12 100644 --- a/sca-cpp/trunk/components/log/scribe-cat.cpp +++ b/sca-cpp/trunk/components/log/scribe-cat.cpp @@ -46,7 +46,7 @@ int cat(const string& category, const string& type) { const char* s = fgets(buf, 8192, stdin); if (s == NULL) return 0; - const int l = strlen(s); + const size_t l = strlen(s); if (l < 2) return 0; buf[l - 1] = '\0'; diff --git a/sca-cpp/trunk/components/log/scribe-tail-start b/sca-cpp/trunk/components/log/scribe-tail-start index 0044f1620d..22f5101053 100755 --- a/sca-cpp/trunk/components/log/scribe-tail-start +++ b/sca-cpp/trunk/components/log/scribe-tail-start @@ -18,7 +18,7 @@ # under the License. # Tail a file and pipe into scribe-cat -here=`readlink -f $0`; here=`dirname $here` +here=`echo "import os; print os.path.realpath('$0')" | python`; here=`dirname $here` category="" type="" @@ -38,7 +38,7 @@ fi mkdir -p `dirname $file` touch $file -file=`readlink -f $file` +file=`echo "import os; print os.path.realpath('$file')" | python` tail -f -n 0 $file | $here/scribe-cat $category $type & diff --git a/sca-cpp/trunk/components/log/scribe-tail-stop b/sca-cpp/trunk/components/log/scribe-tail-stop index e1b74fc0c6..b46c1ecca6 100755 --- a/sca-cpp/trunk/components/log/scribe-tail-stop +++ b/sca-cpp/trunk/components/log/scribe-tail-stop @@ -18,7 +18,7 @@ # under the License. # Stop tailing a file -here=`readlink -f $0`; here=`dirname $here` +here=`echo "import os; print os.path.realpath('$0')" | python`; here=`dirname $here` category="" type="" @@ -35,7 +35,7 @@ else file=$1 fi fi -file=`readlink -f $file` +file=`echo "import os; print os.path.realpath('$file')" | python` cmd="tail -f -n 0 $file" kill `ps -ef | grep -v grep | grep "${cmd}" | awk '{ print $2 }'` diff --git a/sca-cpp/trunk/components/log/scribe-test b/sca-cpp/trunk/components/log/scribe-test index a355026dd0..bc34f6f650 100755 --- a/sca-cpp/trunk/components/log/scribe-test +++ b/sca-cpp/trunk/components/log/scribe-test @@ -40,4 +40,4 @@ sleep 1 if [ "$rc" = "0" ]; then echo "OK" fi -return $rc +exit $rc diff --git a/sca-cpp/trunk/components/log/scribed-central-conf b/sca-cpp/trunk/components/log/scribed-central-conf index b23646c24f..d8d008623d 100755 --- a/sca-cpp/trunk/components/log/scribed-central-conf +++ b/sca-cpp/trunk/components/log/scribed-central-conf @@ -18,9 +18,9 @@ # under the License. # Generate a Scribe central conf -here=`readlink -f $0`; here=`dirname $here` +here=`echo "import os; print os.path.realpath('$0')" | python`; here=`dirname $here` mkdir -p $1 -root=`readlink -f $1` +root=`echo "import os; print os.path.realpath('$1')" | python` port=$2 if [ "$port" = "" ]; then diff --git a/sca-cpp/trunk/components/log/scribed-central-start b/sca-cpp/trunk/components/log/scribed-central-start index c2035037de..9aff8a1466 100755 --- a/sca-cpp/trunk/components/log/scribed-central-start +++ b/sca-cpp/trunk/components/log/scribed-central-start @@ -18,8 +18,8 @@ # under the License. # Start central scribed -here=`readlink -f $0`; here=`dirname $here` -root=`readlink -f $1` +here=`echo "import os; print os.path.realpath('$0')" | python`; here=`dirname $here` +root=`echo "import os; print os.path.realpath('$1')" | python` scribe_prefix=`cat $here/scribe.prefix` thrift_prefix=`cat $here/thrift.prefix` diff --git a/sca-cpp/trunk/components/log/scribed-central-stop b/sca-cpp/trunk/components/log/scribed-central-stop index 95a976813f..acded2a482 100755 --- a/sca-cpp/trunk/components/log/scribed-central-stop +++ b/sca-cpp/trunk/components/log/scribed-central-stop @@ -18,8 +18,8 @@ # under the License. # Stop central scribed -here=`readlink -f $0`; here=`dirname $here` -root=`readlink -f $1` +here=`echo "import os; print os.path.realpath('$0')" | python`; here=`dirname $here` +root=`echo "import os; print os.path.realpath('$1')" | python` scribe_prefix=`cat $here/scribe.prefix` thrift_prefix=`cat $here/thrift.prefix` diff --git a/sca-cpp/trunk/components/log/scribed-client-conf b/sca-cpp/trunk/components/log/scribed-client-conf index 87c8749c2e..8395b3f96e 100755 --- a/sca-cpp/trunk/components/log/scribed-client-conf +++ b/sca-cpp/trunk/components/log/scribed-client-conf @@ -18,9 +18,9 @@ # under the License. # Generate a Scribe client conf -here=`readlink -f $0`; here=`dirname $here` +here=`echo "import os; print os.path.realpath('$0')" | python`; here=`dirname $here` mkdir -p $1 -root=`readlink -f $1` +root=`echo "import os; print os.path.realpath('$1')" | python` central=$2 cport=$3 diff --git a/sca-cpp/trunk/components/log/scribed-client-start b/sca-cpp/trunk/components/log/scribed-client-start index ed8636d7f2..acf52c535f 100755 --- a/sca-cpp/trunk/components/log/scribed-client-start +++ b/sca-cpp/trunk/components/log/scribed-client-start @@ -18,8 +18,8 @@ # under the License. # Start client scribed -here=`readlink -f $0`; here=`dirname $here` -root=`readlink -f $1` +here=`echo "import os; print os.path.realpath('$0')" | python`; here=`dirname $here` +root=`echo "import os; print os.path.realpath('$1')" | python` scribe_prefix=`cat $here/scribe.prefix` thrift_prefix=`cat $here/thrift.prefix` diff --git a/sca-cpp/trunk/components/log/scribed-client-stop b/sca-cpp/trunk/components/log/scribed-client-stop index 2e8959fbfc..0f9c409183 100755 --- a/sca-cpp/trunk/components/log/scribed-client-stop +++ b/sca-cpp/trunk/components/log/scribed-client-stop @@ -18,8 +18,8 @@ # under the License. # Stop client scribed -here=`readlink -f $0`; here=`dirname $here` -root=`readlink -f $1` +here=`echo "import os; print os.path.realpath('$0')" | python`; here=`dirname $here` +root=`echo "import os; print os.path.realpath('$1')" | python` scribe_prefix=`cat $here/scribe.prefix` thrift_prefix=`cat $here/thrift.prefix` diff --git a/sca-cpp/trunk/components/log/server-test b/sca-cpp/trunk/components/log/server-test index 631487c77a..e8e13f9d31 100755 --- a/sca-cpp/trunk/components/log/server-test +++ b/sca-cpp/trunk/components/log/server-test @@ -62,4 +62,4 @@ sleep 1 if [ "$rc" = "0" ]; then echo "OK" fi -return $rc +exit $rc diff --git a/sca-cpp/trunk/components/log/thrift-pragmas b/sca-cpp/trunk/components/log/thrift-pragmas new file mode 100755 index 0000000000..3950ce9984 --- /dev/null +++ b/sca-cpp/trunk/components/log/thrift-pragmas @@ -0,0 +1,32 @@ +#!/bin/sh + +# 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. + +# Patch generated Thrift files, disable some compile warnings + +tmpfile=`mktemp -t thrift-pragmas.XXX` +cat >$tmpfile << EOF +#pragma GCC diagnostic ignored "-Wconversion" +#pragma GCC diagnostic ignored "-Wunused" +#pragma GCC diagnostic ignored "-Wreturn-type" +EOF + +cat $1 >>$tmpfile +cat $tmpfile >$1 + +rm $tmpfile diff --git a/sca-cpp/trunk/components/nosqldb/Makefile.am b/sca-cpp/trunk/components/nosqldb/Makefile.am index 6cf829fa7a..03357ccb32 100644 --- a/sca-cpp/trunk/components/nosqldb/Makefile.am +++ b/sca-cpp/trunk/components/nosqldb/Makefile.am @@ -30,12 +30,12 @@ tinycdb.prefix: $(top_builddir)/config.status EXTRA_DIST = nosqldb.composite nosqldb.componentType comp_LTLIBRARIES = libnosqldb.la -noinst_DATA = libnosqldb.so +noinst_DATA = libnosqldb${libsuffix} libnosqldb_la_SOURCES = nosqldb.cpp libnosqldb_la_LDFLAGS = -L${TINYCDB_LIB} -R${TINYCDB_LIB} -lcdb -libnosqldb.so: - ln -s .libs/libnosqldb.so +libnosqldb${libsuffix}: + ln -s .libs/libnosqldb${libsuffix} tinycdb_test_SOURCES = tinycdb-test.cpp tinycdb_test_LDFLAGS = -L${TINYCDB_LIB} -R${TINYCDB_LIB} -lcdb diff --git a/sca-cpp/trunk/components/nosqldb/nosqldb-test b/sca-cpp/trunk/components/nosqldb/nosqldb-test index 30c9f89bc9..3730ed67a4 100755 --- a/sca-cpp/trunk/components/nosqldb/nosqldb-test +++ b/sca-cpp/trunk/components/nosqldb/nosqldb-test @@ -26,4 +26,4 @@ mkdir -p tmp rc=$? # Cleanup -return $rc +exit $rc diff --git a/sca-cpp/trunk/components/nosqldb/server-test b/sca-cpp/trunk/components/nosqldb/server-test index 5a5d792a32..39b76b1fcd 100755 --- a/sca-cpp/trunk/components/nosqldb/server-test +++ b/sca-cpp/trunk/components/nosqldb/server-test @@ -31,10 +31,10 @@ EOF sleep 2 # Test -./client-test 2>/dev/null +./client-test #2>/dev/null rc=$? # Cleanup ../../modules/http/httpd-stop tmp sleep 2 -return $rc +exit $rc diff --git a/sca-cpp/trunk/components/nosqldb/tinycdb b/sca-cpp/trunk/components/nosqldb/tinycdb index 68459d7622..3e5c23957f 100755 --- a/sca-cpp/trunk/components/nosqldb/tinycdb +++ b/sca-cpp/trunk/components/nosqldb/tinycdb @@ -17,7 +17,7 @@ # specific language governing permissions and limitations # under the License. -here=`readlink -f $0`; here=`dirname $here` +here=`echo "import os; print os.path.realpath('$0')" | python`; here=`dirname $here` tinycdb_prefix=`cat $here/tinycdb.prefix` $tinycdb_prefix/bin/cdb $* diff --git a/sca-cpp/trunk/components/queue/Makefile.am b/sca-cpp/trunk/components/queue/Makefile.am index f527488a3b..c44722a523 100644 --- a/sca-cpp/trunk/components/queue/Makefile.am +++ b/sca-cpp/trunk/components/queue/Makefile.am @@ -32,17 +32,17 @@ qpidc.prefix: $(top_builddir)/config.status EXTRA_DIST = queue.composite queue-sender.componentType queue-listener.componentType *.scm comp_LTLIBRARIES = libqueue-sender.la libqueue-listener.la -noinst_DATA = libqueue-sender.so libqueue-listener.so +noinst_DATA = libqueue-sender${libsuffix} libqueue-listener${libsuffix} libqueue_sender_la_SOURCES = queue-sender.cpp libqueue_sender_la_LDFLAGS = -L${QPIDC_LIB} -R${QPIDC_LIB} -lqpidclient -lqpidcommon -libqueue-sender.so: - ln -s .libs/libqueue-sender.so +libqueue-sender${libsuffix}: + ln -s .libs/libqueue-sender${libsuffix} libqueue_listener_la_SOURCES = queue-listener.cpp libqueue_listener_la_LDFLAGS = -L${QPIDC_LIB} -R${QPIDC_LIB} -lqpidclient -lqpidcommon -libqueue-listener.so: - ln -s .libs/libqueue-listener.so +libqueue-listener${libsuffix}: + ln -s .libs/libqueue-listener${libsuffix} qpid_test_SOURCES = qpid-test.cpp qpid_test_LDFLAGS = -L${QPIDC_LIB} -R${QPIDC_LIB} -lqpidclient -lqpidcommon diff --git a/sca-cpp/trunk/components/queue/qpidd-start b/sca-cpp/trunk/components/queue/qpidd-start index 02e048c41e..a65065182c 100755 --- a/sca-cpp/trunk/components/queue/qpidd-start +++ b/sca-cpp/trunk/components/queue/qpidd-start @@ -18,7 +18,7 @@ # under the License. # Start qpidd -here=`readlink -f $0`; here=`dirname $here` +here=`echo "import os; print os.path.realpath('$0')" | python`; here=`dirname $here` qpid_prefix=`cat $here/qpidc.prefix` $qpid_prefix/sbin/qpidd & diff --git a/sca-cpp/trunk/components/queue/qpidd-stop b/sca-cpp/trunk/components/queue/qpidd-stop index 3baf2fee27..bb43d8aaba 100755 --- a/sca-cpp/trunk/components/queue/qpidd-stop +++ b/sca-cpp/trunk/components/queue/qpidd-stop @@ -18,7 +18,7 @@ # under the License. # Stop qpidd -here=`readlink -f $0`; here=`dirname $here` +here=`echo "import os; print os.path.realpath('$0')" | python`; here=`dirname $here` qpid_prefix=`cat $here/qpidc.prefix` qpidd="$qpid_prefix/sbin/qpidd" diff --git a/sca-cpp/trunk/components/queue/send-test b/sca-cpp/trunk/components/queue/send-test index ec6d9d9083..f2cc53d851 100755 --- a/sca-cpp/trunk/components/queue/send-test +++ b/sca-cpp/trunk/components/queue/send-test @@ -28,4 +28,4 @@ rc=$? # Cleanup ./qpidd-stop sleep 1 -return $rc +exit $rc diff --git a/sca-cpp/trunk/components/queue/server-test b/sca-cpp/trunk/components/queue/server-test index 571b09082c..1e575c6193 100755 --- a/sca-cpp/trunk/components/queue/server-test +++ b/sca-cpp/trunk/components/queue/server-test @@ -40,4 +40,4 @@ rc=$? sleep 1 ./qpidd-stop sleep 1 -return $rc +exit $rc diff --git a/sca-cpp/trunk/components/sqldb/Makefile.am b/sca-cpp/trunk/components/sqldb/Makefile.am index 4cd27e967c..faa10ec00b 100644 --- a/sca-cpp/trunk/components/sqldb/Makefile.am +++ b/sca-cpp/trunk/components/sqldb/Makefile.am @@ -32,12 +32,12 @@ pgsql.prefix: $(top_builddir)/config.status EXTRA_DIST = sqldb.composite sqldb.componentType comp_LTLIBRARIES = libsqldb.la -noinst_DATA = libsqldb.so +noinst_DATA = libsqldb${libsuffix} libsqldb_la_SOURCES = sqldb.cpp libsqldb_la_LDFLAGS = -L${PGSQL_LIB} -R${PGSQL_LIB} -lpq -libsqldb.so: - ln -s .libs/libsqldb.so +libsqldb${libsuffix}: + ln -s .libs/libsqldb${libsuffix} pgsql_test_SOURCES = pgsql-test.cpp pgsql_test_LDFLAGS = -L${PGSQL_LIB} -R${PGSQL_LIB} -lpq diff --git a/sca-cpp/trunk/components/sqldb/pgsql b/sca-cpp/trunk/components/sqldb/pgsql index dab30e642b..23b78b90ec 100755 --- a/sca-cpp/trunk/components/sqldb/pgsql +++ b/sca-cpp/trunk/components/sqldb/pgsql @@ -18,7 +18,7 @@ # under the License. # Run SQL command -here=`readlink -f $0`; here=`dirname $here` +here=`echo "import os; print os.path.realpath('$0')" | python`; here=`dirname $here` pgsql_prefix=`cat $here/pgsql.prefix` if [ "$2" = "" ]; then diff --git a/sca-cpp/trunk/components/sqldb/pgsql-backup b/sca-cpp/trunk/components/sqldb/pgsql-backup index fad59236bf..0c2a1289a3 100755 --- a/sca-cpp/trunk/components/sqldb/pgsql-backup +++ b/sca-cpp/trunk/components/sqldb/pgsql-backup @@ -18,8 +18,8 @@ # under the License. # Backup postgresql data directory -here=`readlink -f $0`; here=`dirname $here` -root=`readlink -f $1` +here=`echo "import os; print os.path.realpath('$0')" | python`; here=`dirname $here` +root=`echo "import os; print os.path.realpath('$1')" | python` if [ "$2" = "" ]; then host="localhost" diff --git a/sca-cpp/trunk/components/sqldb/pgsql-conf b/sca-cpp/trunk/components/sqldb/pgsql-conf index f5cc2d23e3..f0ea218b25 100755 --- a/sca-cpp/trunk/components/sqldb/pgsql-conf +++ b/sca-cpp/trunk/components/sqldb/pgsql-conf @@ -18,9 +18,9 @@ # under the License. # Configure a postgresql master server -here=`readlink -f $0`; here=`dirname $here` +here=`echo "import os; print os.path.realpath('$0')" | python`; here=`dirname $here` mkdir -p $1 -root=`readlink -f $1` +root=`echo "import os; print os.path.realpath('$1')" | python` addr=$2 if [ "$addr" = "" ]; then diff --git a/sca-cpp/trunk/components/sqldb/pgsql-standby-conf b/sca-cpp/trunk/components/sqldb/pgsql-standby-conf index cbfd90b48c..5fcb7128f2 100755 --- a/sca-cpp/trunk/components/sqldb/pgsql-standby-conf +++ b/sca-cpp/trunk/components/sqldb/pgsql-standby-conf @@ -18,9 +18,9 @@ # under the License. # Configure a postgresql hot standby server -here=`readlink -f $0`; here=`dirname $here` +here=`echo "import os; print os.path.realpath('$0')" | python`; here=`dirname $here` mkdir -p $1 -root=`readlink -f $1` +root=`echo "import os; print os.path.realpath('$1')" | python` # Server address addr=$2 diff --git a/sca-cpp/trunk/components/sqldb/pgsql-start b/sca-cpp/trunk/components/sqldb/pgsql-start index 3f03d0b4dc..ac35e80bf1 100755 --- a/sca-cpp/trunk/components/sqldb/pgsql-start +++ b/sca-cpp/trunk/components/sqldb/pgsql-start @@ -18,8 +18,8 @@ # under the License. # Start postgresql -here=`readlink -f $0`; here=`dirname $here` -root=`readlink -f $1` +here=`echo "import os; print os.path.realpath('$0')" | python`; here=`dirname $here` +root=`echo "import os; print os.path.realpath('$1')" | python` pgsql_prefix=`cat $here/pgsql.prefix` mkdir -p $root/sqldb diff --git a/sca-cpp/trunk/components/sqldb/pgsql-stop b/sca-cpp/trunk/components/sqldb/pgsql-stop index eefade47d2..e226b35d0d 100755 --- a/sca-cpp/trunk/components/sqldb/pgsql-stop +++ b/sca-cpp/trunk/components/sqldb/pgsql-stop @@ -18,8 +18,8 @@ # under the License. # Stop postgresql -here=`readlink -f $0`; here=`dirname $here` -root=`readlink -f $1` +here=`echo "import os; print os.path.realpath('$0')" | python`; here=`dirname $here` +root=`echo "import os; print os.path.realpath('$1')" | python` pgsql_prefix=`cat $here/pgsql.prefix` mkdir -p $root/logs diff --git a/sca-cpp/trunk/components/sqldb/server-test b/sca-cpp/trunk/components/sqldb/server-test index c07d3b0510..66f3eff0ed 100755 --- a/sca-cpp/trunk/components/sqldb/server-test +++ b/sca-cpp/trunk/components/sqldb/server-test @@ -41,4 +41,4 @@ rc=$? # Cleanup ../../modules/http/httpd-stop tmp ./pgsql-stop tmp -return $rc +exit $rc diff --git a/sca-cpp/trunk/components/sqldb/sqldb-test b/sca-cpp/trunk/components/sqldb/sqldb-test index e910ae0059..bbbbd4d373 100755 --- a/sca-cpp/trunk/components/sqldb/sqldb-test +++ b/sca-cpp/trunk/components/sqldb/sqldb-test @@ -29,4 +29,4 @@ rc=$? # Cleanup ./pgsql-stop tmp -return $rc +exit $rc diff --git a/sca-cpp/trunk/components/sqldb/standby-test b/sca-cpp/trunk/components/sqldb/standby-test index 9e56bfc039..89bf8242da 100755 --- a/sca-cpp/trunk/components/sqldb/standby-test +++ b/sca-cpp/trunk/components/sqldb/standby-test @@ -36,4 +36,4 @@ rc=$? ../../modules/http/httpd-stop tmp/master ./pgsql-stop tmp/standby ./pgsql-stop tmp/master -return $rc +exit $rc diff --git a/sca-cpp/trunk/components/webservice/Makefile.am b/sca-cpp/trunk/components/webservice/Makefile.am index 19156e3fdd..242b97dce8 100644 --- a/sca-cpp/trunk/components/webservice/Makefile.am +++ b/sca-cpp/trunk/components/webservice/Makefile.am @@ -33,27 +33,27 @@ axis2c.prefix: $(top_builddir)/config.status echo ${AXIS2C_PREFIX} >axis2c.prefix comp_LTLIBRARIES = libwebservice-client.la libwebservice-listener.la libaxis2-dispatcher.la libaxis2-service.la -noinst_DATA = libwebservice-client.so libwebservice-listener.so libaxis2-dispatcher.so libaxis2-service.so +noinst_DATA = libwebservice-client${libsuffix} libwebservice-listener${libsuffix} libaxis2-dispatcher${libsuffix} libaxis2-service${libsuffix} libwebservice_client_la_SOURCES = webservice-client.cpp libwebservice_client_la_LDFLAGS = -lxml2 -L${AXIS2C_LIB} -R${AXIS2C_LIB} -laxis2_engine -laxis2_axiom -laxutil -libwebservice-client.so: - ln -s .libs/libwebservice-client.so +libwebservice-client${libsuffix}: + ln -s .libs/libwebservice-client${libsuffix} libwebservice_listener_la_SOURCES = webservice-listener.cpp libwebservice_listener_la_LDFLAGS = -lxml2 -L${AXIS2C_LIB} -R${AXIS2C_LIB} -laxis2_engine -laxis2_axiom -laxutil -libwebservice-listener.so: - ln -s .libs/libwebservice-listener.so +libwebservice-listener${libsuffix}: + ln -s .libs/libwebservice-listener${libsuffix} libaxis2_dispatcher_la_SOURCES = axis2-dispatcher.cpp libaxis2_dispatcher_la_LDFLAGS = -lxml2 -L${AXIS2C_LIB} -R${AXIS2C_LIB} -laxis2_engine -laxis2_axiom -laxutil -libaxis2-dispatcher.so: - ln -s .libs/libaxis2-dispatcher.so +libaxis2-dispatcher${libsuffix}: + ln -s .libs/libaxis2-dispatcher${libsuffix} libaxis2_service_la_SOURCES = axis2-service.cpp libaxis2_service_la_LDFLAGS = -lxml2 -L${AXIS2C_LIB} -R${AXIS2C_LIB} -laxis2_engine -laxis2_axiom -laxutil -libaxis2-service.so: - ln -s .libs/libaxis2-service.so +libaxis2-service${libsuffix}: + ln -s .libs/libaxis2-service${libsuffix} axiom_test_SOURCES = axiom-test.cpp axiom_test_LDFLAGS = -lxml2 -L${AXIS2C_LIB} -R${AXIS2C_LIB} -laxis2_engine -laxis2_axiom -laxutil diff --git a/sca-cpp/trunk/components/webservice/axis2-conf b/sca-cpp/trunk/components/webservice/axis2-conf index af5d189b24..c302737ae9 100755 --- a/sca-cpp/trunk/components/webservice/axis2-conf +++ b/sca-cpp/trunk/components/webservice/axis2-conf @@ -18,9 +18,9 @@ # under the License. # Generate an Axis2 server conf -here=`readlink -f $0`; here=`dirname $here` +here=`echo "import os; print os.path.realpath('$0')" | python`; here=`dirname $here` mkdir -p $1 -root=`readlink -f $1` +root=`echo "import os; print os.path.realpath('$1')" | python` axis2_prefix=`cat axis2c.prefix` # Create an Axis2 home directory diff --git a/sca-cpp/trunk/components/webservice/echo-test b/sca-cpp/trunk/components/webservice/echo-test index e5cd1d9a9d..1056a6c668 100755 --- a/sca-cpp/trunk/components/webservice/echo-test +++ b/sca-cpp/trunk/components/webservice/echo-test @@ -34,4 +34,4 @@ rc=$? # Cleanup kill `ps -f | grep -v grep | grep "$axis2" | awk '{ print $2 }'` sleep 1 -return $rc +exit $rc diff --git a/sca-cpp/trunk/components/webservice/server-test b/sca-cpp/trunk/components/webservice/server-test index 34fdb7266a..6d3cd7f7fd 100755 --- a/sca-cpp/trunk/components/webservice/server-test +++ b/sca-cpp/trunk/components/webservice/server-test @@ -46,4 +46,4 @@ rc=$? kill `ps -f | grep -v grep | grep "${axis2}" | awk '{ print $2 }'` ../../modules/http/httpd-stop tmp sleep 2 -return $rc +exit $rc diff --git a/sca-cpp/trunk/configure.ac b/sca-cpp/trunk/configure.ac index 49c7c3e663..28f93fd8c1 100644 --- a/sca-cpp/trunk/configure.ac +++ b/sca-cpp/trunk/configure.ac @@ -49,7 +49,7 @@ AC_PROG_MAKE_SET AC_PROG_LIBTOOL # Initialize default GCC C++ and LD options. -cxxflags="" +cxxflags="${CXXFLAGS}" ldflags="${LDFLAGS}" defaultlibs="${LIBS}" @@ -105,7 +105,7 @@ AC_ARG_ENABLE(maintainer-mode, [AS_HELP_STRING([--enable-maintainer-mode], [comp esac ], [ AC_MSG_RESULT(no)]) if test "${want_maintainer_mode}" = "true"; then - cxxflags="${cxxflags} -D_DEBUG -O0 -ggdb -g3 -Werror -Wall -Wextra -Wno-ignored-qualifiers -Winit-self -Wmissing-include-dirs -Wcast-qual -Wcast-align -Wwrite-strings -Wpointer-arith -Wconversion -Waddress -Wlogical-op -Wredundant-decls -std=c++0x -fmessage-length=0" + cxxflags="${cxxflags} -D_DEBUG -O2 -ggdb -g3 -Werror -Wall -Wextra -Wno-ignored-qualifiers -Wno-strict-aliasing -Winit-self -Wmissing-include-dirs -Wcast-qual -Wcast-align -Wwrite-strings -Wpointer-arith -Wconversion -Waddress -Wlogical-op -Wredundant-decls -std=c++0x -fmessage-length=0" ldflags="${ldflags} -pg" AM_CONDITIONAL([WANT_MAINTAINER_MODE], true) AC_DEFINE([WANT_MAINTAINER_MODE], 1, [compile with debugging and compile-time warnings]) @@ -958,6 +958,7 @@ AC_CONFIG_FILES([Makefile samples/relay-gae/Makefile doc/Makefile doc/Doxyfile + macos/Makefile ubuntu/Makefile ]) AC_OUTPUT diff --git a/sca-cpp/trunk/kernel/Makefile.am b/sca-cpp/trunk/kernel/Makefile.am index a112ab5d0d..e6a7fdb2b3 100644 --- a/sca-cpp/trunk/kernel/Makefile.am +++ b/sca-cpp/trunk/kernel/Makefile.am @@ -25,9 +25,9 @@ string_test_SOURCES = string-test.cpp noinst_test_LTLIBRARIES = libdynlib-test.la noinst_testdir = `pwd`/tmp libdynlib_test_la_SOURCES = dynlib-test.cpp -noinst_DATA = libdynlib-test.so -libdynlib-test.so: - ln -s .libs/libdynlib-test.so +noinst_DATA = libdynlib-test${libsuffix} +libdynlib-test${libsuffix}: + ln -s .libs/libdynlib-test${libsuffix} kernel_test_SOURCES = kernel-test.cpp diff --git a/sca-cpp/trunk/kernel/gc.hpp b/sca-cpp/trunk/kernel/gc.hpp index d843b50ca0..2a8303f638 100644 --- a/sca-cpp/trunk/kernel/gc.hpp +++ b/sca-cpp/trunk/kernel/gc.hpp @@ -29,6 +29,7 @@ #include <stdlib.h> #include <apr_general.h> #include <apr_pools.h> +#include <apr_strings.h> #include <assert.h> #include <new> #include "config.hpp" @@ -298,6 +299,45 @@ char* gc_cnew(size_t n) { return gc_cnew(gc_current_pool(), n); } +/** + * Pool based equivalent of the standard malloc function. + */ +void* gc_malloc(size_t n) { + size_t* gc_malloc_ptr = static_cast<size_t*>(apr_palloc(gc_current_pool(), sizeof(size_t) + n)); + assertOrFail(gc_malloc_ptr != NULL); + *gc_malloc_ptr = n; + return gc_malloc_ptr + 1; +} + +/** + * Pool based equivalent of the standard realloc function. + */ +void* gc_realloc(void* ptr, size_t n) { + size_t size = *(static_cast<size_t*>(ptr) - 1); + size_t* gc_realloc_ptr = static_cast<size_t*>(apr_palloc(gc_current_pool(), sizeof(size_t) + n)); + assertOrFail(gc_realloc_ptr != NULL); + *gc_realloc_ptr = n; + memcpy(gc_realloc_ptr + 1, ptr, size < n? size : n); + return gc_realloc_ptr + 1; +} + +/** + * Pool based equivalent of the standard free function. + */ +void gc_free(unused void* ptr) { + // Memory allocated from a pool is freed when the pool is freed +} + +/** + * Pool based equivalent of the standard strdup function. + */ +char* gc_strdup(const char* str) { + char* gc_strdup_ptr = static_cast<char*>(gc_malloc(strlen(str) + 1)); + assertOrFail(gc_strdup_ptr != NULL); + strcpy(gc_strdup_ptr, str); + return gc_strdup_ptr; +} + } #endif /* tuscany_gc_hpp */ diff --git a/sca-cpp/trunk/kernel/parallel.hpp b/sca-cpp/trunk/kernel/parallel.hpp index 09829f0758..9c75b8fb91 100644 --- a/sca-cpp/trunk/kernel/parallel.hpp +++ b/sca-cpp/trunk/kernel/parallel.hpp @@ -43,7 +43,7 @@ namespace tuscany { * Returns the current thread id. */ long int threadId() { - return syscall(__NR_gettid); + return syscall(SYS_gettid); } /** diff --git a/sca-cpp/trunk/kernel/string-test.cpp b/sca-cpp/trunk/kernel/string-test.cpp index 23fa2b9457..5919eed3de 100644 --- a/sca-cpp/trunk/kernel/string-test.cpp +++ b/sca-cpp/trunk/kernel/string-test.cpp @@ -40,7 +40,7 @@ bool testCopies() { string y = string("abcd"); assert(checkStringCopyCounters(1)); resetStringCopyCounters(); - string z = y; + unused string z = y; assert(checkStringCopyCounters(0)); resetStringCopyCounters(); const list<string> pl = list<string>() + "abcd" + "efgh"; @@ -119,7 +119,7 @@ string add(string& x, string& y) { return x + y; } -char charBuffer[16384]; +char charBuffer[16385]; struct addStrings{ const size_t size; diff --git a/sca-cpp/trunk/kernel/xml.hpp b/sca-cpp/trunk/kernel/xml.hpp index 97c9effcc2..fb7c0a6cf6 100644 --- a/sca-cpp/trunk/kernel/xml.hpp +++ b/sca-cpp/trunk/kernel/xml.hpp @@ -40,13 +40,24 @@ namespace tuscany { /** + * APR-based memory management functions. + */ + + +/** * Initializes the libxml2 library. */ class XMLParser { public: XMLParser() { + debug("xml::XMLParser"); + xmlMemSetup(gc_free, gc_malloc, gc_realloc, gc_strdup); xmlInitParser(); } + + ~XMLParser() { + debug("xml::~XMLParser"); + } } xmlParser; /** @@ -58,12 +69,20 @@ public: None = 0, Element = 1, Attribute = 2, Text = 3, EndElement = 15, Identifier = 100, End = 101 }; - XMLReader(xmlTextReaderPtr xml) : xml(xml), tokenType(None), isEmptyElement(false), hasValue(false), hasAttributes(false) { + XMLReader(xmlTextReaderPtr xml) : xml(xml), owner(true), tokenType(None), isEmptyElement(false), hasValue(false), hasAttributes(false) { + debug("xml::XMLReader::xml"); xmlTextReaderSetParserProp(xml, XML_PARSER_DEFAULTATTRS, 1); xmlTextReaderSetParserProp(xml, XML_PARSER_SUBST_ENTITIES, 1); } + XMLReader(const XMLReader& r) : xml(r.xml), owner(false), tokenType(r.tokenType), isEmptyElement(r.isEmptyElement), hasValue(r.hasValue), hasAttributes(r.hasAttributes) { + debug("xml::XMLReader::copy"); + } + ~XMLReader() { + debug("xml::~XMLReader"); + if (!owner) + return; xmlTextReaderClose(xml); xmlFreeTextReader(xml); } @@ -96,6 +115,7 @@ public: private: const xmlTextReaderPtr xml; + const bool owner; int tokenType; bool isEmptyElement; bool hasValue; @@ -212,8 +232,9 @@ const bool isXML(const list<string>& ls) { * Read a list of values from a list of strings representing an XML document. */ const list<value> readXML(const list<string>& ilist) { + debug(ilist, "xml::readXML"); XMLReadContext cx(ilist); - xmlTextReaderPtr xml = xmlReaderForIO(readCallback, NULL, &cx, NULL, NULL, XML_PARSE_NONET); + xmlTextReaderPtr xml = xmlReaderForIO(readCallback, NULL, &cx, NULL, NULL, XML_PARSE_NONET | XML_PARSE_NODICT); if (xml == NULL) return list<value>(); XMLReader reader(xml); @@ -365,6 +386,7 @@ template<typename R> const failable<R> writeXML(const lambda<R(const string&, co * Convert a list of values to a list of strings representing an XML document. */ const failable<list<string> > writeXML(const list<value>& l, const bool xmlTag) { + debug(l, "xml::writeXML"); const failable<list<string> > ls = writeXML<list<string> >(rcons<string>, list<string>(), l, xmlTag); if (!hasContent(ls)) return ls; diff --git a/sca-cpp/trunk/macos/Makefile.am b/sca-cpp/trunk/macos/Makefile.am new file mode 100644 index 0000000000..5584689b80 --- /dev/null +++ b/sca-cpp/trunk/macos/Makefile.am @@ -0,0 +1,22 @@ +# 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. + +dist_macos_SCRIPTS = +macosdir=$(prefix)/macos + +dist_noinst_SCRIPTS = macos-install + diff --git a/sca-cpp/trunk/macos/macos-install b/sca-cpp/trunk/macos/macos-install new file mode 100755 index 0000000000..86d7f5238d --- /dev/null +++ b/sca-cpp/trunk/macos/macos-install @@ -0,0 +1,298 @@ +# 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 complete distribution, the required system tools and libraries, the +# runtime dependencies and the Tuscany SCA runtime on a fresh MacOS 10.6.7 +# system. + +# Display commands as they are executed +set -x + +# Build and install in the current directory +build=`pwd` + +# Install core dev tools missing on MacOS + +# Install and use GCC 4.6, required for c++0x +#curl -OL http://prdownloads.sourceforge.net/hpc/gcc-snwleo-intel-bin.tar.gz +#sudo tar -xf $build/gcc-snwleo-intel-bin.tar.gz -C / + +# Install pkg-config +curl -OL http://pkgconfig.freedesktop.org/releases/pkg-config-0.25.tar.gz +tar xzf pkg-config-0.25.tar.gz +cd pkg-config-0.25 +./configure --prefix=$build/pkg-config-0.25-bin +make +make install +if [ "$?" != "0" ]; then + exit $? +fi +cd $build + +# Install autoconf-2.13 +curl -OL http://ftp.gnu.org/gnu/autoconf/autoconf-2.13.tar.gz +tar xzf autoconf-2.13.tar.gz +cd autoconf-2.13 +./configure --prefix=$build/autoconf-2.13-bin +make +make install +if [ "$?" != "0" ]; then + exit $? +fi +cd $build + +# Build Libexpat +curl -OL http://sourceforge.net/projects/expat/files/expat/2.0.1/expat-2.0.1.tar.gz/download +mv download 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 Libprce +curl -OL http://downloads.sourceforge.net/project/pcre/pcre/8.12/pcre-8.12.zip +unzip pcre-8.12.zip +cd pcre-8.12 +./configure --prefix=$build/pcre-8.12-bin +make +make install +if [ "$?" != "0" ]; then + exit $? +fi +cd $build + +# Build Apache APR and HTTP server +svn co -r 1051230 http://svn.apache.org/repos/asf/apr/apr/trunk apr-1.4.x +cd apr-1.4.x +./buildconf +./configure -with-openssl --with-crypto --with-expat=$build/expat-2.0.1-bin --prefix=$build/apr-1.4.x-bin +make +make install +if [ "$?" != "0" ]; then + exit $? +fi +cd $build +curl -OL http://archive.apache.org/dist/httpd/httpd-2.3.10-alpha.tar.gz +tar xzf httpd-2.3.10-alpha.tar.gz +cd httpd-2.3.10 +./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.10-bin +make +make install +if [ "$?" != "0" ]; then + exit $? +fi +cd $build + +# Build libevent +curl -OL http://www.monkey.org/~provos/libevent-2.0.12-stable.tar.gz +tar xzf libevent-2.0.12-stable.tar.gz +cd libevent-2.0.12-stable +./configure --prefix=$build/libevent-2.0.12-stable-bin +make +make install +if [ "$?" != "0" ]; then + exit $? +fi +cd $build + +# Build Memcached +curl -OL http://memcached.googlecode.com/files/memcached-1.4.5.tar.gz +tar xzf memcached-1.4.5.tar.gz +cd memcached-1.4.5 +./configure --with-libevent=$build/libevent-2.0.12-stable-bin --prefix=$build/memcached-1.4.5-bin +make +make install +if [ "$?" != "0" ]; then + exit $? +fi +cd $build + +# Build Tinycdb +git clone git://github.com/jsdelfino/tinycdb.git +cd tinycdb +make all shared +make prefix=$build/tinycdb-bin install-all install-sharedlib +install_name_tool -id $build/tinycdb-bin/lib/libcdb.so.1 $build/tinycdb-bin/lib/libcdb.so.1 +if [ "$?" != "0" ]; then + exit $? +fi +cd $build + +# Build Libcurl +curl -OL http://curl.haxx.se/download/curl-7.19.5.tar.gz +tar xzf curl-7.19.5.tar.gz +cd curl-7.19.5 +./configure --prefix=$build/curl-7.19.5-bin --without-libidn +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 +make +make install +if [ "$?" != "0" ]; then + exit $? +fi +cd $build + +# Build TraceMonkey +curl -OL http://hg.mozilla.org/tracemonkey/archive/e4364736e170.tar.gz +mv e4364736e170.tar.gz tracemonkey-e4364736e170.tar.gz +tar xzf tracemonkey-e4364736e170.tar.gz +cd tracemonkey-e4364736e170/js/src +$build/autoconf-2.13-bin/bin/autoconf +./configure --prefix=$build/tracemonkey-bin +make +make install +install_name_tool -id $build/tracemonkey-bin/lib/libmozjs.dylib $build/tracemonkey-bin/lib/libmozjs.dylib +if [ "$?" != "0" ]; then + exit $? +fi +cd $build + +# Build Libstrophe +git clone git://github.com/jsdelfino/libstrophe.git +cd libstrophe +export ACLOCALFLAGS="-I $build/pkg-config-0.25-bin/share/aclocal" +./bootstrap.sh +unset ACLOCALFLAGS +./configure --prefix=$build/libstrophe-bin --with-expat=$build/expat-2.0.1-bin +make +make install +if [ "$?" != "0" ]; then + exit $? +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.19.5-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.10-bin --with-curl=$build/curl-7.19.5-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.19.5-bin/include" CURL_LIBS="-L$build/curl-7.19.5-bin/lib -R$build/curl-7.19.5-bin/lib -lcurl" +make +make install +if [ "$?" != "0" ]; then + exit $? +fi +cd $build + +# Build mod_security +curl -OL http://cdnetworks-us-1.dl.sourceforge.net/project/mod-security/modsecurity-apache/2.6.0/modsecurity-apache_2.6.0.tar.gz +tar xzf modsecurity-apache_2.6.0.tar.gz +cd modsecurity-apache_2.6.0 +./configure --prefix=$build/modsecurity-apache-2.6.0-bin --with-apxs=$build/httpd-2.3.10-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.19.5-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" +make +make install +if [ "$?" != "0" ]; then + exit $? +fi +cd $build +curl -OL http://cdnetworks-us-1.dl.sourceforge.net/project/mod-security/modsecurity-crs/0-CURRENT/modsecurity-crs_2.2.0.tar.gz +tar xzf modsecurity-crs_2.2.0.tar.gz +cp -R $build/modsecurity-crs_2.2.0/base_rules $build/modsecurity-apache-2.6.0-bin +cp -R $build/modsecurity-crs_2.2.0/optional_rules $build/modsecurity-apache-2.6.0-bin +if [ "$?" != "0" ]; then + exit $? +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 + exit $? +fi +cd $build + +# Build Tuscany SCA +git clone git://git.apache.org/tuscany-sca-cpp.git +cd tuscany-sca-cpp +./bootstrap +./configure CC=/usr/local/bin/gcc CXX=/usr/local/bin/g++ --prefix=$build/tuscany-sca-cpp-bin --with-curl=$build/curl-7.19.5-bin --with-apr=$build/apr-1.4.x-bin --with-httpd=$build/httpd-2.3.10-bin --with-memcached=$build/memcached-1.4.5-bin --with-tinycdb=$build/tinycdb-bin --with-js-include=$build/tracemonkey-bin/include/js --with-js-lib=$build/tracemonkey-bin/lib --with-libcloud=$build/libcloud-0.4.2-bin --enable-threads --enable-python --with-libxml2=$build/libxml2-2.7.7-bin --enable-chat --with-libstrophe=$build/libstrophe-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 +make +make install +if [ "$?" != "0" ]; then + exit $? +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.19.5 curl-7.19.5-bin curl-7.19.5.tar.gz expat-2.0.1 expat-2.0.1-bin expat-2.0.1.tar.gz htmltidy-bin httpd-2.3.10 httpd-2.3.10-alpha.tar.gz httpd-2.3.10-bin libcloud-0.4.2-bin libevent-2.0.12-stable libevent-2.0.12-stable-bin libevent-2.0.12-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.5 memcached-1.4.5-bin memcached-1.4.5.tar.gz mod_auth_openid mod-auth-openid-bin modsecurity-apache_2.6.0 modsecurity-apache-2.6.0-bin modsecurity-apache_2.6.0.tar.gz modsecurity-crs_2.2.0 modsecurity-crs_2.2.0.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 tidy tinycdb tinycdb-bin tracemonkey-bin tracemonkey-e4364736e170 tracemonkey-e4364736e170.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.19.5-bin expat-2.0.1-bin htmltidy-bin httpd-2.3.10-bin libcloud-0.4.2-bin libevent-2.0.12-stable-bin liboauth-0.9.1-bin libopkele-bin libstrophe-bin libxml2-2.7.7-bin memcached-1.4.5-bin mod-auth-openid-bin modsecurity-apache-2.6.0-bin nuvem/nuvem-parallel pcre-8.12-bin tinycdb-bin tracemonkey-bin tuscany-sca-cpp tuscany-sca-cpp-bin + diff --git a/sca-cpp/trunk/modules/edit/htdocs/graph/graph.js b/sca-cpp/trunk/modules/edit/htdocs/graph/graph.js index 9d38fe6c6d..2ef53fa54a 100644 --- a/sca-cpp/trunk/modules/edit/htdocs/graph/graph.js +++ b/sca-cpp/trunk/modules/edit/htdocs/graph/graph.js @@ -45,7 +45,8 @@ graph.colors.link = '#598edd'; graph.colors.orange1 = '#ffbb00'; graph.colors.green1 = '#96d333'; -graph.colors.blue1 = '#00c3c9'; +//graph.colors.blue1 = '#00c3c9'; +graph.colors.blue1 = '#0d7cc1'; graph.colors.red1 = '#d03f41'; graph.colors.yellow1 = '#fcee21'; graph.colors.magenta1 = '#c0688a'; diff --git a/sca-cpp/trunk/modules/edit/htdocs/public/notauth.html b/sca-cpp/trunk/modules/edit/htdocs/public/notauth.html index f6daa1b8be..63f9de36f4 100644 --- a/sca-cpp/trunk/modules/edit/htdocs/public/notauth.html +++ b/sca-cpp/trunk/modules/edit/htdocs/public/notauth.html @@ -37,7 +37,7 @@ <div id="menu"></div> <table style="width: 100%;"> -<tr><td><h1><span id="h1"></span></h1></td></tr> +<tr><td><h2><span id="h1"></span></h2></td></tr> </table> <div style="margin-left: auto; margin-right: auto; text-align: center;"> diff --git a/sca-cpp/trunk/modules/edit/htdocs/public/notfound.html b/sca-cpp/trunk/modules/edit/htdocs/public/notfound.html index ce9fd94e6e..0d1ce6bb6e 100644 --- a/sca-cpp/trunk/modules/edit/htdocs/public/notfound.html +++ b/sca-cpp/trunk/modules/edit/htdocs/public/notfound.html @@ -37,7 +37,7 @@ <div id="menu"></div> <table style="width: 100%;"> -<tr><td><h1><span id="h1"></span></h1></td></tr> +<tr><td><h2><span id="h1"></span></h2></td></tr> </table> <div style="margin-left: auto; margin-right: auto; text-align: center;"> diff --git a/sca-cpp/trunk/modules/edit/htdocs/public/notyet.html b/sca-cpp/trunk/modules/edit/htdocs/public/notyet.html index f6b8db1912..01413549f6 100644 --- a/sca-cpp/trunk/modules/edit/htdocs/public/notyet.html +++ b/sca-cpp/trunk/modules/edit/htdocs/public/notyet.html @@ -36,7 +36,7 @@ <div id="menu"></div> <table style="width: 100%;"> -<tr><td><h1><span id="h1"></span></h1></td></tr> +<tr><td><h2><span id="h1"></span></h2></td></tr> </table> <div style="margin-left: auto; margin-right: auto; text-align: center;"> diff --git a/sca-cpp/trunk/modules/edit/htdocs/public/oops.html b/sca-cpp/trunk/modules/edit/htdocs/public/oops.html index f8d7bb6747..5e4c638487 100644 --- a/sca-cpp/trunk/modules/edit/htdocs/public/oops.html +++ b/sca-cpp/trunk/modules/edit/htdocs/public/oops.html @@ -37,7 +37,7 @@ <div id="menu"></div> <table style="width: 100%;"> -<tr><td><h1><span id="h1"></span></h1></td></tr> +<tr><td><h2><span id="h1"></span></h2></td></tr> </table> <div style="margin-left: auto; margin-right: auto; text-align: center;"> diff --git a/sca-cpp/trunk/modules/edit/ssl-start b/sca-cpp/trunk/modules/edit/ssl-start index c400c8a54a..53803e4ba0 100755 --- a/sca-cpp/trunk/modules/edit/ssl-start +++ b/sca-cpp/trunk/modules/edit/ssl-start @@ -20,8 +20,8 @@ # For this module to work, add the app domains to your /etc/hosts as follows: # 127.0.0.1 sca-store.com abc.sca-store.com xyz.sca-store.com ... -here=`readlink -f $0`; here=`dirname $here` -jsprefix=`readlink -f $here/../js` +here=`echo "import os; print os.path.realpath('$0')" | python`; here=`dirname $here` +jsprefix=`echo "import os; print os.path.realpath('$here/../js')" | python` # Create SSL certificates ../../modules/http/ssl-ca-conf tmp sca-store.com diff --git a/sca-cpp/trunk/modules/edit/start b/sca-cpp/trunk/modules/edit/start index 554061073b..7d259314bf 100755 --- a/sca-cpp/trunk/modules/edit/start +++ b/sca-cpp/trunk/modules/edit/start @@ -20,8 +20,8 @@ # For this module to work, add the app domains to your /etc/hosts as follows: # 127.0.0.1 sca-store.com abc.sca-store.com xyz.sca-store.com ... -here=`readlink -f $0`; here=`dirname $here` -jsprefix=`readlink -f $here/../js` +here=`echo "import os; print os.path.realpath('$0')" | python`; here=`dirname $here` +jsprefix=`echo "import os; print os.path.realpath('$here/../js')" | python` # Configure server with virtual hosting ../../modules/http/httpd-conf tmp sca-store.com 8090 htdocs diff --git a/sca-cpp/trunk/modules/http/Makefile.am b/sca-cpp/trunk/modules/http/Makefile.am index f6e95b3996..07a797926a 100644 --- a/sca-cpp/trunk/modules/http/Makefile.am +++ b/sca-cpp/trunk/modules/http/Makefile.am @@ -33,17 +33,17 @@ curl_connect_SOURCES = curl-connect.cpp curl_connect_LDFLAGS = -lxml2 -lcurl -lmozjs mod_LTLIBRARIES = libmod_tuscany_ssltunnel.la libmod_tuscany_openauth.la -noinst_DATA = libmod_tuscany_ssltunnel.so libmod_tuscany_openauth.so +noinst_DATA = libmod_tuscany_ssltunnel${libsuffix} libmod_tuscany_openauth${libsuffix} libmod_tuscany_ssltunnel_la_SOURCES = mod-ssltunnel.cpp libmod_tuscany_ssltunnel_la_LDFLAGS = -lxml2 -lcurl -lmozjs -libmod_tuscany_ssltunnel.so: - ln -s .libs/libmod_tuscany_ssltunnel.so +libmod_tuscany_ssltunnel${libsuffix}: + ln -s .libs/libmod_tuscany_ssltunnel${libsuffix} libmod_tuscany_openauth_la_SOURCES = mod-openauth.cpp libmod_tuscany_openauth_la_LDFLAGS = -lxml2 -lcurl -lmozjs -libmod_tuscany_openauth.so: - ln -s .libs/libmod_tuscany_openauth.so +libmod_tuscany_openauth${libsuffix}: + ln -s .libs/libmod_tuscany_openauth${libsuffix} mod_DATA = httpd.prefix httpd-apachectl.prefix httpd-modules.prefix curl.prefix nobase_dist_mod_DATA = conf/* diff --git a/sca-cpp/trunk/modules/http/basic-auth-conf b/sca-cpp/trunk/modules/http/basic-auth-conf index c3018e1174..d8c013d853 100755 --- a/sca-cpp/trunk/modules/http/basic-auth-conf +++ b/sca-cpp/trunk/modules/http/basic-auth-conf @@ -18,9 +18,9 @@ # under the License. # Generate a minimal HTTPD basic authentication configuration -here=`readlink -f $0`; here=`dirname $here` +here=`echo "import os; print os.path.realpath('$0')" | python`; here=`dirname $here` mkdir -p $1 -root=`readlink -f $1` +root=`echo "import os; print os.path.realpath('$1')" | python` conf=`cat $root/conf/httpd.conf | grep "# Generated by: httpd-conf"` host=`echo $conf | awk '{ print $6 }'` diff --git a/sca-cpp/trunk/modules/http/cert-auth-conf b/sca-cpp/trunk/modules/http/cert-auth-conf index c6720c7ae4..38e396b60d 100755 --- a/sca-cpp/trunk/modules/http/cert-auth-conf +++ b/sca-cpp/trunk/modules/http/cert-auth-conf @@ -18,9 +18,9 @@ # under the License. # Generate a minimal HTTPD certificate-based authentication configuration -here=`readlink -f $0`; here=`dirname $here` +here=`echo "import os; print os.path.realpath('$0')" | python`; here=`dirname $here` mkdir -p $1 -root=`readlink -f $1` +root=`echo "import os; print os.path.realpath('$1')" | python` conf=`cat $root/conf/httpd.conf | grep "# Generated by: httpd-conf"` host=`echo $conf | awk '{ print $6 }'` diff --git a/sca-cpp/trunk/modules/http/form-auth-conf b/sca-cpp/trunk/modules/http/form-auth-conf index 42b1a656f3..910f906078 100755 --- a/sca-cpp/trunk/modules/http/form-auth-conf +++ b/sca-cpp/trunk/modules/http/form-auth-conf @@ -18,9 +18,9 @@ # under the License. # Generate a minimal HTTPD form authentication configuration -here=`readlink -f $0`; here=`dirname $here` +here=`echo "import os; print os.path.realpath('$0')" | python`; here=`dirname $here` mkdir -p $1 -root=`readlink -f $1` +root=`echo "import os; print os.path.realpath('$1')" | python` conf=`cat $root/conf/httpd.conf | grep "# Generated by: httpd-conf"` host=`echo $conf | awk '{ print $6 }'` diff --git a/sca-cpp/trunk/modules/http/group-auth-conf b/sca-cpp/trunk/modules/http/group-auth-conf index dc8dad8641..c9cd7f6e2e 100755 --- a/sca-cpp/trunk/modules/http/group-auth-conf +++ b/sca-cpp/trunk/modules/http/group-auth-conf @@ -17,9 +17,9 @@ # specific language governing permissions and limitations # under the License. -here=`readlink -f $0`; here=`dirname $here` +here=`echo "import os; print os.path.realpath('$0')" | python`; here=`dirname $here` mkdir -p $1 -root=`readlink -f $1` +root=`echo "import os; print os.path.realpath('$1')" | python` user=$2 group="members" diff --git a/sca-cpp/trunk/modules/http/http-test b/sca-cpp/trunk/modules/http/http-test index 0db47fe189..e9ce572994 100755 --- a/sca-cpp/trunk/modules/http/http-test +++ b/sca-cpp/trunk/modules/http/http-test @@ -29,4 +29,4 @@ rc=$? # Cleanup ./httpd-stop tmp sleep 2 -return $rc +exit $rc diff --git a/sca-cpp/trunk/modules/http/httpd-addr b/sca-cpp/trunk/modules/http/httpd-addr index 62fc775ea7..735c152f43 100755 --- a/sca-cpp/trunk/modules/http/httpd-addr +++ b/sca-cpp/trunk/modules/http/httpd-addr @@ -51,4 +51,3 @@ fi if [ "$1" = "vhost" ]; then echo $vhost fi -return 0 diff --git a/sca-cpp/trunk/modules/http/httpd-conf b/sca-cpp/trunk/modules/http/httpd-conf index 769211a125..1fac0d56e2 100755 --- a/sca-cpp/trunk/modules/http/httpd-conf +++ b/sca-cpp/trunk/modules/http/httpd-conf @@ -18,11 +18,11 @@ # under the License. # Generate a minimal HTTPD configuration -here=`readlink -f $0`; here=`dirname $here` +here=`echo "import os; print os.path.realpath('$0')" | python`; here=`dirname $here` mkdir -p $1 -root=`readlink -f $1` +root=`echo "import os; print os.path.realpath('$1')" | python` -jsprefix=`readlink -f $here/../js` +jsprefix=`echo "import os; print os.path.realpath('$here/../js')" | python` host=$2 port=`$here/httpd-addr port $3` @@ -31,11 +31,18 @@ listen=`$here/httpd-addr listen $3` vhost=`$here/httpd-addr vhost $3` mkdir -p $4 -htdocs=`readlink -f $4` +htdocs=`echo "import os; print os.path.realpath('$4')" | python` user=`id -un` group=`id -gn` +uname=`uname -s` +if [ $uname = "Darwin" ]; then + libsuffix=".dylib" +else + libsuffix=".so" +fi + modules_prefix=`cat $here/httpd-modules.prefix` mkdir -p $root @@ -225,8 +232,8 @@ LoadModule slotmem_shm_module ${modules_prefix}/modules/mod_slotmem_shm.so LoadModule ratelimit_module ${modules_prefix}/modules/mod_ratelimit.so LoadModule reqtimeout_module ${modules_prefix}/modules/mod_reqtimeout.so -LoadModule mod_tuscany_ssltunnel $here/libmod_tuscany_ssltunnel.so -LoadModule mod_tuscany_openauth $here/libmod_tuscany_openauth.so +LoadModule mod_tuscany_ssltunnel $here/libmod_tuscany_ssltunnel$libsuffix +LoadModule mod_tuscany_openauth $here/libmod_tuscany_openauth$libsuffix EOF diff --git a/sca-cpp/trunk/modules/http/httpd-debug b/sca-cpp/trunk/modules/http/httpd-debug index 93a6bf81d4..df0d21fbe5 100755 --- a/sca-cpp/trunk/modules/http/httpd-debug +++ b/sca-cpp/trunk/modules/http/httpd-debug @@ -18,8 +18,8 @@ # under the License. # Start httpd server -here=`readlink -f $0`; here=`dirname $here` -root=`readlink -f $1` +here=`echo "import os; print os.path.realpath('$0')" | python`; here=`dirname $here` +root=`echo "import os; print os.path.realpath('$1')" | python` httpd=`cat $here/httpd.prefix` $httpd/bin/httpd -X -E $root/logs/error_log -d $root -f $root/conf/httpd.conf diff --git a/sca-cpp/trunk/modules/http/httpd-event-conf b/sca-cpp/trunk/modules/http/httpd-event-conf index 58923d9dd9..7bef30600b 100755 --- a/sca-cpp/trunk/modules/http/httpd-event-conf +++ b/sca-cpp/trunk/modules/http/httpd-event-conf @@ -18,9 +18,9 @@ # under the License. # Configure HTTPD to run with the event MPM -here=`readlink -f $0`; here=`dirname $here` +here=`echo "import os; print os.path.realpath('$0')" | python`; here=`dirname $here` mkdir -p $1 -root=`readlink -f $1` +root=`echo "import os; print os.path.realpath('$1')" | python` modules_prefix=`cat $here/httpd-modules.prefix` diff --git a/sca-cpp/trunk/modules/http/httpd-memgrind b/sca-cpp/trunk/modules/http/httpd-memgrind index 3219046c22..55e113bbd3 100755 --- a/sca-cpp/trunk/modules/http/httpd-memgrind +++ b/sca-cpp/trunk/modules/http/httpd-memgrind @@ -18,8 +18,8 @@ # under the License. # Start httpd server -here=`readlink -f $0`; here=`dirname $here` -root=`readlink -f $1` +here=`echo "import os; print os.path.realpath('$0')" | python`; here=`dirname $here` +root=`echo "import os; print os.path.realpath('$1')" | python` httpd=`cat $here/httpd.prefix` $here/../../etc/memgrind $httpd/bin/httpd -X -E $root/logs/error_log -d $root -f $root/conf/httpd.conf diff --git a/sca-cpp/trunk/modules/http/httpd-restart b/sca-cpp/trunk/modules/http/httpd-restart index 3e3b687f98..81b098d85d 100755 --- a/sca-cpp/trunk/modules/http/httpd-restart +++ b/sca-cpp/trunk/modules/http/httpd-restart @@ -18,8 +18,8 @@ # under the License. # Restart httpd server -here=`readlink -f $0`; here=`dirname $here` -root=`readlink -f $1` +here=`echo "import os; print os.path.realpath('$0')" | python`; here=`dirname $here` +root=`echo "import os; print os.path.realpath('$1')" | python` apachectl=`cat $here/httpd-apachectl.prefix` $apachectl -k graceful -d $root -f $root/conf/httpd.conf diff --git a/sca-cpp/trunk/modules/http/httpd-ssl-conf b/sca-cpp/trunk/modules/http/httpd-ssl-conf index 9933d1c7d9..77a4898e74 100755 --- a/sca-cpp/trunk/modules/http/httpd-ssl-conf +++ b/sca-cpp/trunk/modules/http/httpd-ssl-conf @@ -18,9 +18,9 @@ # under the License. # Generate a minimal HTTPD SSL configuration -here=`readlink -f $0`; here=`dirname $here` +here=`echo "import os; print os.path.realpath('$0')" | python`; here=`dirname $here` mkdir -p $1 -root=`readlink -f $1` +root=`echo "import os; print os.path.realpath('$1')" | python` conf=`cat $root/conf/httpd.conf | grep "# Generated by: httpd-conf"` host=`echo $conf | awk '{ print $6 }'` @@ -34,7 +34,7 @@ sslvhost=`$here/httpd-addr vhost $2` htdocs=`echo $conf | awk '{ print $8 }'` mkdir -p $htdocs -htdocs=`readlink -f $htdocs` +htdocs=`echo "import os; print os.path.realpath('$htdocs')" | python` # Extract organization name from our CA certificate org=`openssl x509 -noout -subject -nameopt multiline -in $root/cert/ca.crt | grep organizationName | awk -F "= " '{ print $2 }'` diff --git a/sca-cpp/trunk/modules/http/httpd-start b/sca-cpp/trunk/modules/http/httpd-start index 5c006d1b54..e38c2f9a94 100755 --- a/sca-cpp/trunk/modules/http/httpd-start +++ b/sca-cpp/trunk/modules/http/httpd-start @@ -18,8 +18,8 @@ # under the License. # Start httpd server -here=`readlink -f $0`; here=`dirname $here` -root=`readlink -f $1` +here=`echo "import os; print os.path.realpath('$0')" | python`; here=`dirname $here` +root=`echo "import os; print os.path.realpath('$1')" | python` apachectl=`cat $here/httpd-apachectl.prefix` $apachectl -E $root/logs/error_log -k start -d $root -f $root/conf/httpd.conf diff --git a/sca-cpp/trunk/modules/http/httpd-stop b/sca-cpp/trunk/modules/http/httpd-stop index cadec1e6a0..9010e4dd17 100755 --- a/sca-cpp/trunk/modules/http/httpd-stop +++ b/sca-cpp/trunk/modules/http/httpd-stop @@ -18,8 +18,8 @@ # under the License. # Stop httpd server -here=`readlink -f $0`; here=`dirname $here` -root=`readlink -f $1` +here=`echo "import os; print os.path.realpath('$0')" | python`; here=`dirname $here` +root=`echo "import os; print os.path.realpath('$1')" | python` apachectl=`cat $here/httpd-apachectl.prefix` $apachectl -k graceful-stop -d $root -f $root/conf/httpd.conf 2>/dev/null diff --git a/sca-cpp/trunk/modules/http/httpd-test b/sca-cpp/trunk/modules/http/httpd-test index a3b9145871..909bfa29f1 100755 --- a/sca-cpp/trunk/modules/http/httpd-test +++ b/sca-cpp/trunk/modules/http/httpd-test @@ -18,7 +18,7 @@ # under the License. echo "Testing..." -here=`readlink -f $0`; here=`dirname $here` +here=`echo "import os; print os.path.realpath('$0')" | python`; here=`dirname $here` curl_prefix=`cat $here/../http/curl.prefix` # Setup @@ -37,4 +37,4 @@ sleep 2 if [ "$rc" = "0" ]; then echo "OK" fi -return $rc +exit $rc diff --git a/sca-cpp/trunk/modules/http/httpd-worker-conf b/sca-cpp/trunk/modules/http/httpd-worker-conf index bb6bca4562..0d0c866688 100755 --- a/sca-cpp/trunk/modules/http/httpd-worker-conf +++ b/sca-cpp/trunk/modules/http/httpd-worker-conf @@ -18,9 +18,9 @@ # under the License. # Configure HTTPD to run with the worker MPM -here=`readlink -f $0`; here=`dirname $here` +here=`echo "import os; print os.path.realpath('$0')" | python`; here=`dirname $here` mkdir -p $1 -root=`readlink -f $1` +root=`echo "import os; print os.path.realpath('$1')" | python` modules_prefix=`cat $here/httpd-modules.prefix` diff --git a/sca-cpp/trunk/modules/http/mod-security-conf b/sca-cpp/trunk/modules/http/mod-security-conf index f988163cf4..c9f0728f88 100755 --- a/sca-cpp/trunk/modules/http/mod-security-conf +++ b/sca-cpp/trunk/modules/http/mod-security-conf @@ -18,9 +18,9 @@ # under the License. # Generate a minimal mod-security configuration. -here=`readlink -f $0`; here=`dirname $here` +here=`echo "import os; print os.path.realpath('$0')" | python`; here=`dirname $here` mkdir -p $1 -root=`readlink -f $1` +root=`echo "import os; print os.path.realpath('$1')" | python` modules_prefix=`cat $here/httpd-modules.prefix` modsecurity_prefix=`cat $here/modsecurity.prefix` diff --git a/sca-cpp/trunk/modules/http/open-auth-conf b/sca-cpp/trunk/modules/http/open-auth-conf index 1c4d18b1e9..cde0c6b05f 100755 --- a/sca-cpp/trunk/modules/http/open-auth-conf +++ b/sca-cpp/trunk/modules/http/open-auth-conf @@ -18,9 +18,9 @@ # under the License. # Generate a minimal HTTPD form authentication configuration -here=`readlink -f $0`; here=`dirname $here` +here=`echo "import os; print os.path.realpath('$0')" | python`; here=`dirname $here` mkdir -p $1 -root=`readlink -f $1` +root=`echo "import os; print os.path.realpath('$1')" | python` conf=`cat $root/conf/httpd.conf | grep "# Generated by: httpd-conf"` host=`echo $conf | awk '{ print $6 }'` diff --git a/sca-cpp/trunk/modules/http/passwd-auth-conf b/sca-cpp/trunk/modules/http/passwd-auth-conf index 89a3f19e4b..119b0fbb3b 100755 --- a/sca-cpp/trunk/modules/http/passwd-auth-conf +++ b/sca-cpp/trunk/modules/http/passwd-auth-conf @@ -17,9 +17,9 @@ # specific language governing permissions and limitations # under the License. -here=`readlink -f $0`; here=`dirname $here` +here=`echo "import os; print os.path.realpath('$0')" | python`; here=`dirname $here` mkdir -p $1 -root=`readlink -f $1` +root=`echo "import os; print os.path.realpath('$1')" | python` user=$2 pass=$3 diff --git a/sca-cpp/trunk/modules/http/proxy-conf b/sca-cpp/trunk/modules/http/proxy-conf index e9abe8435f..8bca7cd2de 100755 --- a/sca-cpp/trunk/modules/http/proxy-conf +++ b/sca-cpp/trunk/modules/http/proxy-conf @@ -18,9 +18,9 @@ # under the License. # Generate a minimal HTTPD proxy balancer configuration -here=`readlink -f $0`; here=`dirname $here` +here=`echo "import os; print os.path.realpath('$0')" | python`; here=`dirname $here` mkdir -p $1 -root=`readlink -f $1` +root=`echo "import os; print os.path.realpath('$1')" | python` cat >>$root/conf/vhost.conf <<EOF # Generated by: proxy-conf $* diff --git a/sca-cpp/trunk/modules/http/proxy-member-conf b/sca-cpp/trunk/modules/http/proxy-member-conf index ef9cb35e8a..2e279e87c7 100755 --- a/sca-cpp/trunk/modules/http/proxy-member-conf +++ b/sca-cpp/trunk/modules/http/proxy-member-conf @@ -18,9 +18,9 @@ # under the License. # Add a proxy balancer member -here=`readlink -f $0`; here=`dirname $here` +here=`echo "import os; print os.path.realpath('$0')" | python`; here=`dirname $here` mkdir -p $1 -root=`readlink -f $1` +root=`echo "import os; print os.path.realpath('$1')" | python` host=$2 port=`$here/httpd-addr port $3` diff --git a/sca-cpp/trunk/modules/http/proxy-ssl-conf b/sca-cpp/trunk/modules/http/proxy-ssl-conf index f5e2bfc4a4..af8fce8179 100755 --- a/sca-cpp/trunk/modules/http/proxy-ssl-conf +++ b/sca-cpp/trunk/modules/http/proxy-ssl-conf @@ -18,9 +18,9 @@ # under the License. # Generate a minimal HTTPD proxy balancer configuration -here=`readlink -f $0`; here=`dirname $here` +here=`echo "import os; print os.path.realpath('$0')" | python`; here=`dirname $here` mkdir -p $1 -root=`readlink -f $1` +root=`echo "import os; print os.path.realpath('$1')" | python` cat >>$root/conf/vhost-ssl.conf <<EOF # Generated by: proxy-ssl-conf $* diff --git a/sca-cpp/trunk/modules/http/proxy-ssl-member-conf b/sca-cpp/trunk/modules/http/proxy-ssl-member-conf index b6bf055ad8..0ae98af482 100755 --- a/sca-cpp/trunk/modules/http/proxy-ssl-member-conf +++ b/sca-cpp/trunk/modules/http/proxy-ssl-member-conf @@ -18,9 +18,9 @@ # under the License. # Add a proxy balancer member -here=`readlink -f $0`; here=`dirname $here` +here=`echo "import os; print os.path.realpath('$0')" | python`; here=`dirname $here` mkdir -p $1 -root=`readlink -f $1` +root=`echo "import os; print os.path.realpath('$1')" | python` host=$2 sslport=`$here/httpd-addr port $3` diff --git a/sca-cpp/trunk/modules/http/proxy-test b/sca-cpp/trunk/modules/http/proxy-test index b6c9a6a0d9..d67d39aa1f 100755 --- a/sca-cpp/trunk/modules/http/proxy-test +++ b/sca-cpp/trunk/modules/http/proxy-test @@ -34,4 +34,4 @@ rc=$? ./httpd-stop tmp/proxy ./httpd-stop tmp sleep 2 -return $rc +exit $rc diff --git a/sca-cpp/trunk/modules/http/ssl-ca-conf b/sca-cpp/trunk/modules/http/ssl-ca-conf index e7b9f96ee2..bceca8f300 100755 --- a/sca-cpp/trunk/modules/http/ssl-ca-conf +++ b/sca-cpp/trunk/modules/http/ssl-ca-conf @@ -18,15 +18,15 @@ # under the License. # Generate a test certification authority certificate -here=`readlink -f $0`; here=`dirname $here` +here=`echo "import os; print os.path.realpath('$0')" | python`; here=`dirname $here` mkdir -p $1 -root=`readlink -f $1` +root=`echo "import os; print os.path.realpath('$1')" | python` host=$2 # Don't override existing certificate if [ -f $root/cert/ca.crt ]; then - return 0 + exit 0 fi # Generate openssl configuration @@ -92,5 +92,5 @@ openssl req -new -x509 -config $root/cert/openssl-ca.conf -out $root/cert/ca.crt # Add to the hash directory and rehash mkdir -p $root/cert/hash cp $root/cert/ca.crt $root/cert/hash -c_rehash $root/cert/hash +perl /usr/bin/c_rehash $root/cert/hash diff --git a/sca-cpp/trunk/modules/http/ssl-cert-conf b/sca-cpp/trunk/modules/http/ssl-cert-conf index 57c4522535..9e785ec86e 100755 --- a/sca-cpp/trunk/modules/http/ssl-cert-conf +++ b/sca-cpp/trunk/modules/http/ssl-cert-conf @@ -18,9 +18,9 @@ # under the License. # Generate a test certificate -here=`readlink -f $0`; here=`dirname $here` +here=`echo "import os; print os.path.realpath('$0')" | python`; here=`dirname $here` mkdir -p $1 -root=`readlink -f $1` +root=`echo "import os; print os.path.realpath('$1')" | python` host=$2 if [ "$3" != "" ]; then @@ -31,7 +31,7 @@ fi # Don't regenerate the certificate if it already exists if [ -f $root/cert/$certname.crt ]; then - return 0 + exit 0 fi # Generate openssl configuration @@ -72,5 +72,5 @@ cat $root/cert/$certname.key >> $root/cert/$certname.pem mkdir -p $root/cert/hash cp $root/cert/$certname.crt $root/cert/hash cp $root/cert/$certname.pem $root/cert/hash -c_rehash $root/cert/hash +perl /usr/bin/c_rehash $root/cert/hash diff --git a/sca-cpp/trunk/modules/http/ssl-cert-find b/sca-cpp/trunk/modules/http/ssl-cert-find index b5aefb8e38..7a4b4f0220 100755 --- a/sca-cpp/trunk/modules/http/ssl-cert-find +++ b/sca-cpp/trunk/modules/http/ssl-cert-find @@ -18,9 +18,13 @@ # under the License. # List certificate files, useful to distribute them to another host -here=`readlink -f $0`; here=`dirname $here` -root=`readlink -f $1` +here=`echo "import os; print os.path.realpath('$0')" | python`; here=`dirname $here` +root=`echo "import os; print os.path.realpath('$1')" | python` cd $root -find -regex '.*\.\(\(crt\)\|\(pem\)\|\(p12\)\|\(key\)\|\(0\)\)' 2>/dev/null +find . -name "*.crt" +find . -name "*.pem" +find . -name "*.p12" +find . -name "*.key" +find . -name "*.0" diff --git a/sca-cpp/trunk/modules/http/tunnel-ssl-conf b/sca-cpp/trunk/modules/http/tunnel-ssl-conf index 8cf4ada20a..021d205ed9 100755 --- a/sca-cpp/trunk/modules/http/tunnel-ssl-conf +++ b/sca-cpp/trunk/modules/http/tunnel-ssl-conf @@ -18,9 +18,9 @@ # under the License. # Generate an SSL tunnel configuration -here=`readlink -f $0`; here=`dirname $here` +here=`echo "import os; print os.path.realpath('$0')" | python`; here=`dirname $here` mkdir -p $1 -root=`readlink -f $1` +root=`echo "import os; print os.path.realpath('$1')" | python` conf=`cat $root/conf/httpd.conf | grep "# Generated by: httpd-conf"` host=`echo $conf | awk '{ print $6 }'` diff --git a/sca-cpp/trunk/modules/http/vhost-conf b/sca-cpp/trunk/modules/http/vhost-conf index a36b195844..150d57f115 100755 --- a/sca-cpp/trunk/modules/http/vhost-conf +++ b/sca-cpp/trunk/modules/http/vhost-conf @@ -18,11 +18,11 @@ # under the License. # Generate mass dynamic virtual hosting configuration -here=`readlink -f $0`; here=`dirname $here` +here=`echo "import os; print os.path.realpath('$0')" | python`; here=`dirname $here` mkdir -p $1 -root=`readlink -f $1` +root=`echo "import os; print os.path.realpath('$1')" | python` -vroot=`readlink -f $2` +vroot=`echo "import os; print os.path.realpath('$2')" | python` vhtdocs=$3 conf=`cat $root/conf/httpd.conf | grep "# Generated by: httpd-conf"` @@ -34,7 +34,7 @@ vhost=`$here/httpd-addr vhost $addr` htdocs=`echo $conf | awk '{ print $8 }'` mkdir -p $htdocs -htdocs=`readlink -f $htdocs` +htdocs=`echo "import os; print os.path.realpath('$htdocs')" | python` cat >>$root/conf/httpd.conf <<EOF # Generated by: vhost-conf $* diff --git a/sca-cpp/trunk/modules/http/vhost-ssl-conf b/sca-cpp/trunk/modules/http/vhost-ssl-conf index 314773a338..7ddbee08e0 100755 --- a/sca-cpp/trunk/modules/http/vhost-ssl-conf +++ b/sca-cpp/trunk/modules/http/vhost-ssl-conf @@ -18,9 +18,9 @@ # under the License. # Generate mass dynamic virtual hosting configuration -here=`readlink -f $0`; here=`dirname $here` +here=`echo "import os; print os.path.realpath('$0')" | python`; here=`dirname $here` mkdir -p $1 -root=`readlink -f $1` +root=`echo "import os; print os.path.realpath('$1')" | python` conf=`cat $root/conf/httpd.conf | grep "# Generated by: httpd-conf"` host=`echo $conf | awk '{ print $6 }'` @@ -32,12 +32,12 @@ sslpport=`$here/httpd-addr pport $ssladdr` sslvhost=`$here/httpd-addr vhost $ssladdr` vhostconf=`cat $root/conf/httpd.conf | grep "# Generated by: vhost-conf"` -vroot=`echo $vhostconf | awk '{ print $6 }'`; vroot=`readlink -f $vroot` +vroot=`echo $vhostconf | awk '{ print $6 }'`; vroot=`echo "import os; print os.path.realpath('$vroot')" | python` vhtdocs=`echo $vhostconf | awk '{ print $7 }'` htdocs=`echo $conf | awk '{ print $8 }'` mkdir -p $htdocs -htdocs=`readlink -f $htdocs` +htdocs=`echo "import os; print os.path.realpath('$htdocs')" | python` cat >>$root/conf/httpd.conf <<EOF # Generated by: vhost-ssl-conf $* diff --git a/sca-cpp/trunk/modules/java/Makefile.am b/sca-cpp/trunk/modules/java/Makefile.am index 39b7ad550a..5242349319 100644 --- a/sca-cpp/trunk/modules/java/Makefile.am +++ b/sca-cpp/trunk/modules/java/Makefile.am @@ -37,9 +37,9 @@ EXTRA_DIST = domain-test.composite mod_LTLIBRARIES = libmod_tuscany_java.la libmod_tuscany_java_la_SOURCES = mod-java.cpp libmod_tuscany_java_la_LDFLAGS = -lxml2 -lcurl -lmozjs ${JAVA_LDFLAGS} -noinst_DATA = libmod_tuscany_java.so -libmod_tuscany_java.so: - ln -s .libs/libmod_tuscany_java.so +noinst_DATA = libmod_tuscany_java${libsuffix} +libmod_tuscany_java${libsuffix}: + ln -s .libs/libmod_tuscany_java${libsuffix} jni_test_SOURCES = jni-test.cpp jni_test_LDFLAGS = ${JAVA_LDFLAGS} diff --git a/sca-cpp/trunk/modules/java/java-conf b/sca-cpp/trunk/modules/java/java-conf index cf5faddb84..baa5c059c2 100755 --- a/sca-cpp/trunk/modules/java/java-conf +++ b/sca-cpp/trunk/modules/java/java-conf @@ -18,14 +18,21 @@ # under the License. # Generate a Java server conf -here=`readlink -f $0`; here=`dirname $here` +here=`echo "import os; print os.path.realpath('$0')" | python`; here=`dirname $here` mkdir -p $1 -root=`readlink -f $1` +root=`echo "import os; print os.path.realpath('$1')" | python` + +uname=`uname -s` +if [ $uname = "Darwin" ]; then + libsuffix=".dylib" +else + libsuffix=".so" +fi cat >>$root/conf/modules.conf <<EOF # Generated by: java-conf $* # Support for Java SCA components -LoadModule mod_tuscany_eval $here/libmod_tuscany_java.so +LoadModule mod_tuscany_eval $here/libmod_tuscany_java${libsuffix} EOF diff --git a/sca-cpp/trunk/modules/java/server-test b/sca-cpp/trunk/modules/java/server-test index dba63a9525..40e52d7153 100755 --- a/sca-cpp/trunk/modules/java/server-test +++ b/sca-cpp/trunk/modules/java/server-test @@ -38,4 +38,4 @@ rc=$? # Cleanup ../http/httpd-stop tmp sleep 2 -return $rc +exit $rc diff --git a/sca-cpp/trunk/modules/java/wiring-test b/sca-cpp/trunk/modules/java/wiring-test index fb2ad48efc..941a75bc32 100755 --- a/sca-cpp/trunk/modules/java/wiring-test +++ b/sca-cpp/trunk/modules/java/wiring-test @@ -18,7 +18,7 @@ # under the License. echo "Testing..." -here=`readlink -f $0`; here=`dirname $here` +here=`echo "import os; print os.path.realpath('$0')" | python`; here=`dirname $here` curl_prefix=`cat $here/../http/curl.prefix` # Setup @@ -77,4 +77,4 @@ sleep 2 if [ "$rc" = "0" ]; then echo "OK" fi -return $rc +exit $rc diff --git a/sca-cpp/trunk/modules/js/util-test b/sca-cpp/trunk/modules/js/util-test index ccfb377bd1..08407ea2d1 100755 --- a/sca-cpp/trunk/modules/js/util-test +++ b/sca-cpp/trunk/modules/js/util-test @@ -18,7 +18,7 @@ # under the License. # Run Javascript util test cases -here=`readlink -f $0`; here=`dirname $here` +here=`echo "import os; print os.path.realpath('$0')" | python`; here=`dirname $here` echo "Testing..." cat htdocs/util.js htdocs/elemutil.js htdocs/jsonutil.js json-test.js | ./js-eval 2>/dev/null 1>&2 @@ -27,4 +27,4 @@ if [ "$rc" = "0" ]; then echo "OK" fi -return $rc +exit $rc diff --git a/sca-cpp/trunk/modules/oauth/Makefile.am b/sca-cpp/trunk/modules/oauth/Makefile.am index 6c0cd2bc57..a5a5916a84 100644 --- a/sca-cpp/trunk/modules/oauth/Makefile.am +++ b/sca-cpp/trunk/modules/oauth/Makefile.am @@ -23,17 +23,17 @@ dist_mod_SCRIPTS = oauth-conf oauth-memcached-conf oauth1-appkey-conf oauth2-app moddir=$(prefix)/modules/oauth mod_LTLIBRARIES = libmod_tuscany_oauth1.la libmod_tuscany_oauth2.la -noinst_DATA = libmod_tuscany_oauth1.so libmod_tuscany_oauth2.so +noinst_DATA = libmod_tuscany_oauth1${libsuffix} libmod_tuscany_oauth2${libsuffix} libmod_tuscany_oauth1_la_SOURCES = mod-oauth1.cpp libmod_tuscany_oauth1_la_LDFLAGS = -L${LIBOAUTH_LIB} -R${LIBOAUTH_LIB} -loauth -lxml2 -lcurl -lmozjs -libmod_tuscany_oauth1.so: - ln -s .libs/libmod_tuscany_oauth1.so +libmod_tuscany_oauth1${libsuffix}: + ln -s .libs/libmod_tuscany_oauth1${libsuffix} libmod_tuscany_oauth2_la_SOURCES = mod-oauth2.cpp libmod_tuscany_oauth2_la_LDFLAGS = -lxml2 -lcurl -lmozjs -libmod_tuscany_oauth2.so: - ln -s .libs/libmod_tuscany_oauth2.so +libmod_tuscany_oauth2${libsuffix}: + ln -s .libs/libmod_tuscany_oauth2${libsuffix} EXTRA_DIST = oauth.composite user-info.scm htdocs/index.html htdocs/login/index.html htdocs/logout/index.html htdocs/public/index.html diff --git a/sca-cpp/trunk/modules/oauth/oauth-conf b/sca-cpp/trunk/modules/oauth/oauth-conf index dc3a6ebc9d..02f81a240b 100755 --- a/sca-cpp/trunk/modules/oauth/oauth-conf +++ b/sca-cpp/trunk/modules/oauth/oauth-conf @@ -18,9 +18,16 @@ # under the License. # Generate an OAuth server conf -here=`readlink -f $0`; here=`dirname $here` +here=`echo "import os; print os.path.realpath('$0')" | python`; here=`dirname $here` mkdir -p $1 -root=`readlink -f $1` +root=`echo "import os; print os.path.realpath('$1')" | python` + +uname=`uname -s` +if [ $uname = "Darwin" ]; then + libsuffix=".dylib" +else + libsuffix=".so" +fi conf=`cat $root/conf/httpd.conf | grep "# Generated by: httpd-conf"` host=`echo $conf | awk '{ print $6 }'` @@ -29,8 +36,8 @@ host=`echo $conf | awk '{ print $6 }'` cat >>$root/conf/modules.conf <<EOF # Generated by: oauth-conf $* # Load support for OAuth authentication -LoadModule mod_tuscany_oauth1 $here/libmod_tuscany_oauth1.so -LoadModule mod_tuscany_oauth2 $here/libmod_tuscany_oauth2.so +LoadModule mod_tuscany_oauth1 $here/libmod_tuscany_oauth1$libsuffix +LoadModule mod_tuscany_oauth2 $here/libmod_tuscany_oauth2$libsuffix EOF diff --git a/sca-cpp/trunk/modules/oauth/oauth-memcached-conf b/sca-cpp/trunk/modules/oauth/oauth-memcached-conf index 23a82a0486..83477562f8 100755 --- a/sca-cpp/trunk/modules/oauth/oauth-memcached-conf +++ b/sca-cpp/trunk/modules/oauth/oauth-memcached-conf @@ -17,9 +17,9 @@ # specific language governing permissions and limitations # under the License. -here=`readlink -f $0`; here=`dirname $here` +here=`echo "import os; print os.path.realpath('$0')" | python`; here=`dirname $here` mkdir -p $1 -root=`readlink -f $1` +root=`echo "import os; print os.path.realpath('$1')" | python` host=$2 port=$3 diff --git a/sca-cpp/trunk/modules/oauth/oauth1-appkey-conf b/sca-cpp/trunk/modules/oauth/oauth1-appkey-conf index fca7d4e8f3..67b02ad639 100755 --- a/sca-cpp/trunk/modules/oauth/oauth1-appkey-conf +++ b/sca-cpp/trunk/modules/oauth/oauth1-appkey-conf @@ -17,9 +17,9 @@ # specific language governing permissions and limitations # under the License. -here=`readlink -f $0`; here=`dirname $here` +here=`echo "import os; print os.path.realpath('$0')" | python`; here=`dirname $here` mkdir -p $1 -root=`readlink -f $1` +root=`echo "import os; print os.path.realpath('$1')" | python` name=$2 id=$3 secret=$4 diff --git a/sca-cpp/trunk/modules/oauth/oauth2-appkey-conf b/sca-cpp/trunk/modules/oauth/oauth2-appkey-conf index 0a7986f07e..0d67e6ffbe 100755 --- a/sca-cpp/trunk/modules/oauth/oauth2-appkey-conf +++ b/sca-cpp/trunk/modules/oauth/oauth2-appkey-conf @@ -17,9 +17,9 @@ # specific language governing permissions and limitations # under the License. -here=`readlink -f $0`; here=`dirname $here` +here=`echo "import os; print os.path.realpath('$0')" | python`; here=`dirname $here` mkdir -p $1 -root=`readlink -f $1` +root=`echo "import os; print os.path.realpath('$1')" | python` name=$2 id=$3 secret=$4 diff --git a/sca-cpp/trunk/modules/oauth/start-mixed-test b/sca-cpp/trunk/modules/oauth/start-mixed-test index bfd7667ce4..29ddb6d647 100755 --- a/sca-cpp/trunk/modules/oauth/start-mixed-test +++ b/sca-cpp/trunk/modules/oauth/start-mixed-test @@ -18,7 +18,7 @@ # under the License. # Test supporting both OpenID and OAuth in the same app -here=`readlink -f $0`; here=`dirname $here` +here=`echo "import os; print os.path.realpath('$0')" | python`; here=`dirname $here` # Setup ../../components/cache/memcached-start 11212 diff --git a/sca-cpp/trunk/modules/openid/openid-conf b/sca-cpp/trunk/modules/openid/openid-conf index 797f8b0607..4cc8bcdd40 100755 --- a/sca-cpp/trunk/modules/openid/openid-conf +++ b/sca-cpp/trunk/modules/openid/openid-conf @@ -18,9 +18,9 @@ # under the License. # Generate an OpenID server conf -here=`readlink -f $0`; here=`dirname $here` +here=`echo "import os; print os.path.realpath('$0')" | python`; here=`dirname $here` mkdir -p $1 -root=`readlink -f $1` +root=`echo "import os; print os.path.realpath('$1')" | python` conf=`cat $root/conf/httpd.conf | grep "# Generated by: httpd-conf"` host=`echo $conf | awk '{ print $6 }'` diff --git a/sca-cpp/trunk/modules/openid/openid-memcached-conf b/sca-cpp/trunk/modules/openid/openid-memcached-conf index 1717b3ce92..fc56ee7639 100755 --- a/sca-cpp/trunk/modules/openid/openid-memcached-conf +++ b/sca-cpp/trunk/modules/openid/openid-memcached-conf @@ -17,9 +17,9 @@ # specific language governing permissions and limitations # under the License. -here=`readlink -f $0`; here=`dirname $here` +here=`echo "import os; print os.path.realpath('$0')" | python`; here=`dirname $here` mkdir -p $1 -root=`readlink -f $1` +root=`echo "import os; print os.path.realpath('$1')" | python` host=$2 port=$3 diff --git a/sca-cpp/trunk/modules/openid/openid-step2-conf b/sca-cpp/trunk/modules/openid/openid-step2-conf index 559a62d20b..9a32da498e 100755 --- a/sca-cpp/trunk/modules/openid/openid-step2-conf +++ b/sca-cpp/trunk/modules/openid/openid-step2-conf @@ -18,9 +18,9 @@ # under the License. # Generate an OpenID Step2 server conf -here=`readlink -f $0`; here=`dirname $here` +here=`echo "import os; print os.path.realpath('$0')" | python`; here=`dirname $here` mkdir -p $1 -root=`readlink -f $1` +root=`echo "import os; print os.path.realpath('$1')" | python` conf=`cat $root/conf/httpd.conf | grep "# Generated by: httpd-conf"` host=`echo $conf | awk '{ print $6 }'` diff --git a/sca-cpp/trunk/modules/python/Makefile.am b/sca-cpp/trunk/modules/python/Makefile.am index 2f56b9a1db..9d0a399dde 100644 --- a/sca-cpp/trunk/modules/python/Makefile.am +++ b/sca-cpp/trunk/modules/python/Makefile.am @@ -36,9 +36,9 @@ EXTRA_DIST = domain-test.composite client-test.py server-test.py mod_LTLIBRARIES = libmod_tuscany_python.la libmod_tuscany_python_la_SOURCES = mod-python.cpp libmod_tuscany_python_la_LDFLAGS = -lxml2 -lcurl -lmozjs -L${PYTHON_LIB} -R${PYTHON_LIB} -lpython2.6 -noinst_DATA = libmod_tuscany_python.so -libmod_tuscany_python.so: - ln -s .libs/libmod_tuscany_python.so +noinst_DATA = libmod_tuscany_python${libsuffix} +libmod_tuscany_python${libsuffix}: + ln -s .libs/libmod_tuscany_python${libsuffix} python_test_SOURCES = python-test.cpp python_test_LDFLAGS = -L${PYTHON_LIB} -R${PYTHON_LIB} -lpython2.6 diff --git a/sca-cpp/trunk/modules/python/python-conf b/sca-cpp/trunk/modules/python/python-conf index a5b45357fc..359d596b05 100755 --- a/sca-cpp/trunk/modules/python/python-conf +++ b/sca-cpp/trunk/modules/python/python-conf @@ -18,13 +18,20 @@ # under the License. # Generate a Python server conf -here=`readlink -f $0`; here=`dirname $here` +here=`echo "import os; print os.path.realpath('$0')" | python`; here=`dirname $here` mkdir -p $1 -root=`readlink -f $1` +root=`echo "import os; print os.path.realpath('$1')" | python` + +uname=`uname -s` +if [ $uname = "Darwin" ]; then + libsuffix=".dylib" +else + libsuffix=".so" +fi cat >>$root/conf/modules.conf <<EOF # Generated by: python-conf $* # Support for Python SCA components -LoadModule mod_tuscany_eval $here/libmod_tuscany_python.so +LoadModule mod_tuscany_eval $here/libmod_tuscany_python$libsuffix EOF diff --git a/sca-cpp/trunk/modules/python/server-test b/sca-cpp/trunk/modules/python/server-test index b01f5f501d..0932413ffd 100755 --- a/sca-cpp/trunk/modules/python/server-test +++ b/sca-cpp/trunk/modules/python/server-test @@ -36,4 +36,4 @@ rc=$? # Cleanup ../http/httpd-stop tmp sleep 2 -return $rc +exit $rc diff --git a/sca-cpp/trunk/modules/python/wiring-test b/sca-cpp/trunk/modules/python/wiring-test index c571981bbd..22666c3925 100755 --- a/sca-cpp/trunk/modules/python/wiring-test +++ b/sca-cpp/trunk/modules/python/wiring-test @@ -18,7 +18,7 @@ # under the License. echo "Testing..." -here=`readlink -f $0`; here=`dirname $here` +here=`echo "import os; print os.path.realpath('$0')" | python`; here=`dirname $here` curl_prefix=`cat $here/../http/curl.prefix` # Setup @@ -75,4 +75,4 @@ sleep 2 if [ "$rc" = "0" ]; then echo "OK" fi -return $rc +exit $rc diff --git a/sca-cpp/trunk/modules/scdl/validate-test b/sca-cpp/trunk/modules/scdl/validate-test index e70fe67aa0..9f277cf15a 100755 --- a/sca-cpp/trunk/modules/scdl/validate-test +++ b/sca-cpp/trunk/modules/scdl/validate-test @@ -20,4 +20,4 @@ # Validate test composite ../../kernel/xsd-test ../../xsd/tuscany-sca-1.1.xsd test.composite 2>/dev/null rc=$? -return $rc +exit $rc diff --git a/sca-cpp/trunk/modules/server/Makefile.am b/sca-cpp/trunk/modules/server/Makefile.am index 74674fa9a6..edc0dfb251 100644 --- a/sca-cpp/trunk/modules/server/Makefile.am +++ b/sca-cpp/trunk/modules/server/Makefile.am @@ -26,25 +26,25 @@ moddir = $(prefix)/modules/server EXTRA_DIST = domain-test.composite client-test.scm server-test.scm htdocs/*.html htdocs/test/*.xml htdocs/test/*.txt mod_LTLIBRARIES = libmod_tuscany_eval.la libmod_tuscany_wiring.la -noinst_DATA = libmod_tuscany_eval.so libmod_tuscany_wiring.so +noinst_DATA = libmod_tuscany_eval${libsuffix} libmod_tuscany_wiring${libsuffix} libmod_tuscany_eval_la_SOURCES = mod-eval.cpp libmod_tuscany_eval_la_LDFLAGS = -lxml2 -lcurl -lmozjs -libmod_tuscany_eval.so: - ln -s .libs/libmod_tuscany_eval.so +libmod_tuscany_eval${libsuffix}: + ln -s .libs/libmod_tuscany_eval${libsuffix} libmod_tuscany_wiring_la_SOURCES = mod-wiring.cpp libmod_tuscany_wiring_la_LDFLAGS = -lxml2 -lcurl -lmozjs -libmod_tuscany_wiring.so: - ln -s .libs/libmod_tuscany_wiring.so +libmod_tuscany_wiring${libsuffix}: + ln -s .libs/libmod_tuscany_wiring${libsuffix} noinst_test_LTLIBRARIES = libimpl-test.la noinst_testdir = `pwd`/tmp -noinst_DATA += libimpl-test.so +noinst_DATA += libimpl-test${libsuffix} libimpl_test_la_SOURCES = impl-test.cpp -libimpl-test.so: - ln -s .libs/libimpl-test.so +libimpl-test${libsuffix}: + ln -s .libs/libimpl-test${libsuffix} client_test_SOURCES = client-test.cpp client_test_LDFLAGS = -lxml2 -lcurl -lmozjs diff --git a/sca-cpp/trunk/modules/server/cpp-conf b/sca-cpp/trunk/modules/server/cpp-conf index 086bb49d38..6b74f60ec5 100755 --- a/sca-cpp/trunk/modules/server/cpp-conf +++ b/sca-cpp/trunk/modules/server/cpp-conf @@ -18,13 +18,20 @@ # under the License. # Generate a C++ server conf -here=`readlink -f $0`; here=`dirname $here` +here=`echo "import os; print os.path.realpath('$0')" | python`; here=`dirname $here` mkdir -p $1 -root=`readlink -f $1` +root=`echo "import os; print os.path.realpath('$1')" | python` + +uname=`uname -s` +if [ $uname = "Darwin" ]; then + libsuffix=".dylib" +else + libsuffix=".so" +fi cat >>$root/conf/modules.conf <<EOF # Generated by: cpp-conf $* # Support for C++ SCA components -LoadModule mod_tuscany_eval $here/libmod_tuscany_eval.so +LoadModule mod_tuscany_eval $here/libmod_tuscany_eval$libsuffix EOF diff --git a/sca-cpp/trunk/modules/server/httpd-test b/sca-cpp/trunk/modules/server/httpd-test index e39412fe11..c56f0e0981 100755 --- a/sca-cpp/trunk/modules/server/httpd-test +++ b/sca-cpp/trunk/modules/server/httpd-test @@ -18,7 +18,7 @@ # under the License. echo "Testing..." -here=`readlink -f $0`; here=`dirname $here` +here=`echo "import os; print os.path.realpath('$0')" | python`; here=`dirname $here` curl_prefix=`cat $here/../http/curl.prefix` # Setup @@ -82,4 +82,4 @@ sleep 2 if [ "$rc" = "0" ]; then echo "OK" fi -return $rc +exit $rc diff --git a/sca-cpp/trunk/modules/server/scheme-conf b/sca-cpp/trunk/modules/server/scheme-conf index cd3c82b280..bc4074c8be 100755 --- a/sca-cpp/trunk/modules/server/scheme-conf +++ b/sca-cpp/trunk/modules/server/scheme-conf @@ -18,13 +18,20 @@ # under the License. # Generate a Scheme server conf -here=`readlink -f $0`; here=`dirname $here` +here=`echo "import os; print os.path.realpath('$0')" | python`; here=`dirname $here` mkdir -p $1 -root=`readlink -f $1` +root=`echo "import os; print os.path.realpath('$1')" | python` + +uname=`uname -s` +if [ $uname = "Darwin" ]; then + libsuffix=".dylib" +else + libsuffix=".so" +fi cat >>$root/conf/modules.conf <<EOF # Generated by: scheme-conf $* # Support for Scheme SCA components -LoadModule mod_tuscany_eval $here/libmod_tuscany_eval.so +LoadModule mod_tuscany_eval $here/libmod_tuscany_eval$libsuffix EOF diff --git a/sca-cpp/trunk/modules/server/server-conf b/sca-cpp/trunk/modules/server/server-conf index d80f8a09e9..a8e57cf289 100755 --- a/sca-cpp/trunk/modules/server/server-conf +++ b/sca-cpp/trunk/modules/server/server-conf @@ -18,11 +18,18 @@ # under the License. # Generate a server conf -here=`readlink -f $0`; here=`dirname $here` +here=`echo "import os; print os.path.realpath('$0')" | python`; here=`dirname $here` mkdir -p $1 -root=`readlink -f $1` +root=`echo "import os; print os.path.realpath('$1')" | python` -jsprefix=`readlink -f $here/../js` +jsprefix=`echo "import os; print os.path.realpath('$here/../js')" | python` + +uname=`uname -s` +if [ $uname = "Darwin" ]; then + libsuffix=".dylib" +else + libsuffix=".so" +fi conf=`cat $root/conf/httpd.conf | grep "# Generated by: httpd-conf"` host=`echo $conf | awk '{ print $6 }'` @@ -46,7 +53,7 @@ fi cat >>$root/conf/modules.conf <<EOF # Generated by: server-conf $* # Support for SCA component wiring -LoadModule mod_tuscany_wiring $here/libmod_tuscany_wiring.so +LoadModule mod_tuscany_wiring $here/libmod_tuscany_wiring$libsuffix EOF diff --git a/sca-cpp/trunk/modules/server/server-test b/sca-cpp/trunk/modules/server/server-test index e53c7f5ef1..55e6f10926 100755 --- a/sca-cpp/trunk/modules/server/server-test +++ b/sca-cpp/trunk/modules/server/server-test @@ -36,4 +36,4 @@ rc=$? # Cleanup ../http/httpd-stop tmp sleep 2 -return $rc +exit $rc diff --git a/sca-cpp/trunk/modules/server/wiring-test b/sca-cpp/trunk/modules/server/wiring-test index e791ec555b..4278e5e30d 100755 --- a/sca-cpp/trunk/modules/server/wiring-test +++ b/sca-cpp/trunk/modules/server/wiring-test @@ -18,7 +18,7 @@ # under the License. echo "Testing..." -here=`readlink -f $0`; here=`dirname $here` +here=`echo "import os; print os.path.realpath('$0')" | python`; here=`dirname $here` curl_prefix=`cat $here/../http/curl.prefix` # Setup @@ -75,4 +75,4 @@ sleep 2 if [ "$rc" = "0" ]; then echo "OK" fi -return $rc +exit $rc diff --git a/sca-cpp/trunk/modules/wsgi/gae-start b/sca-cpp/trunk/modules/wsgi/gae-start index a3ee8765cb..44008d10e2 100755 --- a/sca-cpp/trunk/modules/wsgi/gae-start +++ b/sca-cpp/trunk/modules/wsgi/gae-start @@ -18,8 +18,8 @@ # under the License. # Start Google AppEngine server -here=`readlink -f $0`; here=`dirname $here` -root=`readlink -f $1` +here=`echo "import os; print os.path.realpath('$0')" | python`; here=`dirname $here` +root=`echo "import os; print os.path.realpath('$1')" | python` port=$2 python_prefix=`cat $here/../python/python.prefix` diff --git a/sca-cpp/trunk/modules/wsgi/gae-stop b/sca-cpp/trunk/modules/wsgi/gae-stop index 69de7f0c2b..c0ff29cfaa 100755 --- a/sca-cpp/trunk/modules/wsgi/gae-stop +++ b/sca-cpp/trunk/modules/wsgi/gae-stop @@ -18,8 +18,8 @@ # under the License. # Stop Google AppEngine server -here=`readlink -f $0`; here=`dirname $here` -root=`readlink -f $1` +here=`echo "import os; print os.path.realpath('$0')" | python`; here=`dirname $here` +root=`echo "import os; print os.path.realpath('$1')" | python` port=$2 python_prefix=`cat $here/../python/python.prefix` diff --git a/sca-cpp/trunk/modules/wsgi/gae-test b/sca-cpp/trunk/modules/wsgi/gae-test index 1791a830ca..5cdbbe323d 100755 --- a/sca-cpp/trunk/modules/wsgi/gae-test +++ b/sca-cpp/trunk/modules/wsgi/gae-test @@ -27,4 +27,4 @@ rc=$? # Cleanup ./gae-stop target 8090 -return $rc +exit $rc diff --git a/sca-cpp/trunk/modules/wsgi/http-test b/sca-cpp/trunk/modules/wsgi/http-test index 5499399b31..aef76d47c4 100755 --- a/sca-cpp/trunk/modules/wsgi/http-test +++ b/sca-cpp/trunk/modules/wsgi/http-test @@ -23,7 +23,7 @@ mkdir -p tmp sleep 2 # Test JSON-RPC -here=`readlink -f $0`; here=`dirname $here` +here=`echo "import os; print os.path.realpath('$0')" | python`; here=`dirname $here` python_prefix=`cat $here/../python/python.prefix` $python_prefix/bin/python http-test.py rc=$? @@ -31,4 +31,4 @@ rc=$? # Cleanup ./wsgi-stop target 8090 sleep 2 -return $rc +exit $rc diff --git a/sca-cpp/trunk/modules/wsgi/server-test b/sca-cpp/trunk/modules/wsgi/server-test index 9bd862c53a..20b0287874 100755 --- a/sca-cpp/trunk/modules/wsgi/server-test +++ b/sca-cpp/trunk/modules/wsgi/server-test @@ -27,4 +27,4 @@ rc=$? # Cleanup ./wsgi-stop target 8090 -return $rc +exit $rc diff --git a/sca-cpp/trunk/modules/wsgi/util-test b/sca-cpp/trunk/modules/wsgi/util-test index aa8725a200..184eb1c788 100755 --- a/sca-cpp/trunk/modules/wsgi/util-test +++ b/sca-cpp/trunk/modules/wsgi/util-test @@ -18,7 +18,7 @@ # under the License. # Run Python util test cases -here=`readlink -f $0`; here=`dirname $here` +here=`echo "import os; print os.path.realpath('$0')" | python`; here=`dirname $here` python_prefix=`cat $here/../python/python.prefix` $python_prefix/bin/python stream-test.py @@ -40,4 +40,4 @@ if [ "$rc" = "0" ]; then rc=$? fi -return $rc +exit $rc diff --git a/sca-cpp/trunk/modules/wsgi/wiring-test b/sca-cpp/trunk/modules/wsgi/wiring-test index f3c1bbb840..35d96a3889 100755 --- a/sca-cpp/trunk/modules/wsgi/wiring-test +++ b/sca-cpp/trunk/modules/wsgi/wiring-test @@ -18,7 +18,7 @@ # under the License. echo "Testing..." -here=`readlink -f $0`; here=`dirname $here` +here=`echo "import os; print os.path.realpath('$0')" | python`; here=`dirname $here` curl_prefix=`cat $here/../http/curl.prefix` uri=$1 if [ "$uri" = "" ]; then @@ -72,4 +72,4 @@ sleep 2 if [ "$rc" = "0" ]; then echo "OK" fi -return $rc +exit $rc diff --git a/sca-cpp/trunk/modules/wsgi/wsgi-start b/sca-cpp/trunk/modules/wsgi/wsgi-start index d020f3da14..685dab3c82 100755 --- a/sca-cpp/trunk/modules/wsgi/wsgi-start +++ b/sca-cpp/trunk/modules/wsgi/wsgi-start @@ -18,8 +18,8 @@ # under the License. # Start WSGI server -here=`readlink -f $0`; here=`dirname $here` -root=`readlink -f $1` +here=`echo "import os; print os.path.realpath('$0')" | python`; here=`dirname $here` +root=`echo "import os; print os.path.realpath('$1')" | python` port=$2 python_prefix=`cat $here/../python/python.prefix` diff --git a/sca-cpp/trunk/modules/wsgi/wsgi-stop b/sca-cpp/trunk/modules/wsgi/wsgi-stop index 7e12967adb..e47967e528 100755 --- a/sca-cpp/trunk/modules/wsgi/wsgi-stop +++ b/sca-cpp/trunk/modules/wsgi/wsgi-stop @@ -18,8 +18,8 @@ # under the License. # Stop WSGI server -here=`readlink -f $0`; here=`dirname $here` -root=`readlink -f $1` +here=`echo "import os; print os.path.realpath('$0')" | python`; here=`dirname $here` +root=`echo "import os; print os.path.realpath('$1')" | python` port=$2 python_prefix=`cat $here/../python/python.prefix` diff --git a/sca-cpp/trunk/modules/wsgi/wsgi-test b/sca-cpp/trunk/modules/wsgi/wsgi-test index 369ca5a677..c17e29047d 100755 --- a/sca-cpp/trunk/modules/wsgi/wsgi-test +++ b/sca-cpp/trunk/modules/wsgi/wsgi-test @@ -18,7 +18,7 @@ # under the License. echo "Testing..." -here=`readlink -f $0`; here=`dirname $here` +here=`echo "import os; print os.path.realpath('$0')" | python`; here=`dirname $here` curl_prefix=`cat $here/../http/curl.prefix` # Setup @@ -68,4 +68,4 @@ sleep 2 if [ "$rc" = "0" ]; then echo "OK" fi -return $rc +exit $rc diff --git a/sca-cpp/trunk/samples/loan-python/server-test b/sca-cpp/trunk/samples/loan-python/server-test index 1612bc59e2..fb629a6814 100755 --- a/sca-cpp/trunk/samples/loan-python/server-test +++ b/sca-cpp/trunk/samples/loan-python/server-test @@ -18,7 +18,7 @@ # under the License. echo "Testing..." -here=`readlink -f $0`; here=`dirname $here` +here=`echo "import os; print os.path.realpath('$0')" | python`; here=`dirname $here` curl_prefix=`cat $here/../../modules/http/curl.prefix` # Setup @@ -55,4 +55,4 @@ sleep 2 if [ "$rc" = "0" ]; then echo "OK" fi -return $rc +exit $rc diff --git a/sca-cpp/trunk/samples/store-cluster/server-test b/sca-cpp/trunk/samples/store-cluster/server-test index 68856f530e..0a3a5ea73b 100755 --- a/sca-cpp/trunk/samples/store-cluster/server-test +++ b/sca-cpp/trunk/samples/store-cluster/server-test @@ -21,7 +21,7 @@ # 127.0.0.1 sca-store.com joe.sca-store.com joe.sca-store.com echo "Testing..." -here=`readlink -f $0`; here=`dirname $here` +here=`echo "import os; print os.path.realpath('$0')" | python`; here=`dirname $here` curl_prefix=`cat $here/../../modules/http/curl.prefix` # Setup @@ -58,4 +58,4 @@ sleep 2 if [ "$rc" = "0" ]; then echo "OK" fi -return $rc +exit $rc diff --git a/sca-cpp/trunk/samples/store-cpp/Makefile.am b/sca-cpp/trunk/samples/store-cpp/Makefile.am index 1a642e583c..3f9d8e87eb 100644 --- a/sca-cpp/trunk/samples/store-cpp/Makefile.am +++ b/sca-cpp/trunk/samples/store-cpp/Makefile.am @@ -22,19 +22,19 @@ sampledir = $(prefix)/samples/store-cpp nobase_dist_sample_DATA = currency-converter.cpp fruits-catalog.cpp shopping-cart.cpp store.composite htdocs/*.html sample_LTLIBRARIES = libcurrency-converter.la libfruits-catalog.la libshopping-cart.la -noinst_DATA = libcurrency-converter.so libfruits-catalog.so libshopping-cart.so +noinst_DATA = libcurrency-converter${libsuffix} libfruits-catalog${libsuffix} libshopping-cart${libsuffix} libcurrency_converter_la_SOURCES = currency-converter.cpp -libcurrency-converter.so: - ln -s .libs/libcurrency-converter.so +libcurrency-converter${libsuffix}: + ln -s .libs/libcurrency-converter${libsuffix} libfruits_catalog_la_SOURCES = fruits-catalog.cpp -libfruits-catalog.so: - ln -s .libs/libfruits-catalog.so +libfruits-catalog${libsuffix}: + ln -s .libs/libfruits-catalog${libsuffix} libshopping_cart_la_SOURCES = shopping-cart.cpp -libshopping-cart.so: - ln -s .libs/libshopping-cart.so +libshopping-cart${libsuffix}: + ln -s .libs/libshopping-cart${libsuffix} dist_noinst_SCRIPTS = server-test TESTS = server-test diff --git a/sca-cpp/trunk/samples/store-cpp/server-test b/sca-cpp/trunk/samples/store-cpp/server-test index e0d8716449..e621803f8d 100755 --- a/sca-cpp/trunk/samples/store-cpp/server-test +++ b/sca-cpp/trunk/samples/store-cpp/server-test @@ -18,7 +18,7 @@ # under the License. echo "Testing..." -here=`readlink -f $0`; here=`dirname $here` +here=`echo "import os; print os.path.realpath('$0')" | python`; here=`dirname $here` curl_prefix=`cat $here/../../modules/http/curl.prefix` # Setup @@ -55,4 +55,4 @@ sleep 2 if [ "$rc" = "0" ]; then echo "OK" fi -return $rc +exit $rc diff --git a/sca-cpp/trunk/samples/store-gae/server-test b/sca-cpp/trunk/samples/store-gae/server-test index 4d42e9a5f5..8dcb444418 100755 --- a/sca-cpp/trunk/samples/store-gae/server-test +++ b/sca-cpp/trunk/samples/store-gae/server-test @@ -18,7 +18,7 @@ # under the License. echo "Testing..." -here=`readlink -f $0`; here=`dirname $here` +here=`echo "import os; print os.path.realpath('$0')" | python`; here=`dirname $here` curl_prefix=`cat $here/../../modules/http/curl.prefix` # Setup @@ -56,4 +56,4 @@ sleep 2 if [ "$rc" = "0" ]; then echo "OK" fi -return $rc +exit $rc diff --git a/sca-cpp/trunk/samples/store-java/server-test b/sca-cpp/trunk/samples/store-java/server-test index 1612bc59e2..fb629a6814 100755 --- a/sca-cpp/trunk/samples/store-java/server-test +++ b/sca-cpp/trunk/samples/store-java/server-test @@ -18,7 +18,7 @@ # under the License. echo "Testing..." -here=`readlink -f $0`; here=`dirname $here` +here=`echo "import os; print os.path.realpath('$0')" | python`; here=`dirname $here` curl_prefix=`cat $here/../../modules/http/curl.prefix` # Setup @@ -55,4 +55,4 @@ sleep 2 if [ "$rc" = "0" ]; then echo "OK" fi -return $rc +exit $rc diff --git a/sca-cpp/trunk/samples/store-nosql/server-test b/sca-cpp/trunk/samples/store-nosql/server-test index 1612bc59e2..fb629a6814 100755 --- a/sca-cpp/trunk/samples/store-nosql/server-test +++ b/sca-cpp/trunk/samples/store-nosql/server-test @@ -18,7 +18,7 @@ # under the License. echo "Testing..." -here=`readlink -f $0`; here=`dirname $here` +here=`echo "import os; print os.path.realpath('$0')" | python`; here=`dirname $here` curl_prefix=`cat $here/../../modules/http/curl.prefix` # Setup @@ -55,4 +55,4 @@ sleep 2 if [ "$rc" = "0" ]; then echo "OK" fi -return $rc +exit $rc diff --git a/sca-cpp/trunk/samples/store-python/server-test b/sca-cpp/trunk/samples/store-python/server-test index 27490c580b..8f52543c71 100755 --- a/sca-cpp/trunk/samples/store-python/server-test +++ b/sca-cpp/trunk/samples/store-python/server-test @@ -18,7 +18,7 @@ # under the License. echo "Testing..." -here=`readlink -f $0`; here=`dirname $here` +here=`echo "import os; print os.path.realpath('$0')" | python`; here=`dirname $here` curl_prefix=`cat $here/../../modules/http/curl.prefix` # Setup @@ -55,4 +55,4 @@ sleep 2 if [ "$rc" = "0" ]; then echo "OK" fi -return $rc +exit $rc diff --git a/sca-cpp/trunk/samples/store-scheme/server-test b/sca-cpp/trunk/samples/store-scheme/server-test index 1612bc59e2..fb629a6814 100755 --- a/sca-cpp/trunk/samples/store-scheme/server-test +++ b/sca-cpp/trunk/samples/store-scheme/server-test @@ -18,7 +18,7 @@ # under the License. echo "Testing..." -here=`readlink -f $0`; here=`dirname $here` +here=`echo "import os; print os.path.realpath('$0')" | python`; here=`dirname $here` curl_prefix=`cat $here/../../modules/http/curl.prefix` # Setup @@ -55,4 +55,4 @@ sleep 2 if [ "$rc" = "0" ]; then echo "OK" fi -return $rc +exit $rc diff --git a/sca-cpp/trunk/samples/store-sql/server-test b/sca-cpp/trunk/samples/store-sql/server-test index 1612bc59e2..fb629a6814 100755 --- a/sca-cpp/trunk/samples/store-sql/server-test +++ b/sca-cpp/trunk/samples/store-sql/server-test @@ -18,7 +18,7 @@ # under the License. echo "Testing..." -here=`readlink -f $0`; here=`dirname $here` +here=`echo "import os; print os.path.realpath('$0')" | python`; here=`dirname $here` curl_prefix=`cat $here/../../modules/http/curl.prefix` # Setup @@ -55,4 +55,4 @@ sleep 2 if [ "$rc" = "0" ]; then echo "OK" fi -return $rc +exit $rc diff --git a/sca-cpp/trunk/samples/store-vhost/server-test b/sca-cpp/trunk/samples/store-vhost/server-test index 405da2165d..dd3893948e 100755 --- a/sca-cpp/trunk/samples/store-vhost/server-test +++ b/sca-cpp/trunk/samples/store-vhost/server-test @@ -18,7 +18,7 @@ # under the License. echo "Testing..." -here=`readlink -f $0`; here=`dirname $here` +here=`echo "import os; print os.path.realpath('$0')" | python`; here=`dirname $here` curl_prefix=`cat $here/../../modules/http/curl.prefix` # Setup @@ -58,4 +58,4 @@ sleep 2 if [ "$rc" = "0" ]; then echo "OK" fi -return $rc +exit $rc diff --git a/sca-cpp/trunk/ubuntu/Makefile.am b/sca-cpp/trunk/ubuntu/Makefile.am index 21e045d4b5..4ce02cfc74 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-all-image ubuntu-dev-all-image ubuntu-install-all uec2-bin-all-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-all uec2-bin-image uec2-bin-all-image uec2-dev-image uec2-dev-all-image diff --git a/sca-cpp/trunk/ubuntu/ip-redirect-all b/sca-cpp/trunk/ubuntu/ip-redirect-all index f796b0589e..b5876c9850 100755 --- a/sca-cpp/trunk/ubuntu/ip-redirect-all +++ b/sca-cpp/trunk/ubuntu/ip-redirect-all @@ -18,7 +18,7 @@ # Redirect TCP/IP traffic to all local addresses from one port to another # Example: ip-redirect 80 8090 -here=`readlink -f $0`; here=`dirname $here` +here=`echo "import os; print os.path.realpath('$0')" | python`; here=`dirname $here` sport=$1 tport=$2 diff --git a/sca-cpp/trunk/ubuntu/ubuntu-install b/sca-cpp/trunk/ubuntu/ubuntu-install index a9c48a9353..65955401ee 100755 --- a/sca-cpp/trunk/ubuntu/ubuntu-install +++ b/sca-cpp/trunk/ubuntu/ubuntu-install @@ -268,7 +268,7 @@ cp src/lib/libscribe.so $build/scribe-2.2-bin/lib cd $build # Build Apache Libcloud -wget http://www.apache.org/dist/incubator/libcloud/apache-libcloud-incubating-0.4.2.tar.bz2 +wget 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 diff --git a/sca-cpp/trunk/ubuntu/ubuntu-install-all b/sca-cpp/trunk/ubuntu/ubuntu-install-all index 861d21f538..df55fec8d0 100755 --- a/sca-cpp/trunk/ubuntu/ubuntu-install-all +++ b/sca-cpp/trunk/ubuntu/ubuntu-install-all @@ -149,7 +149,7 @@ fi wget 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-libxml2 LIBXML2_CFLAGS="-I$build/libxml2-2.7.7-bin/include/libxml2" LIBXML2_LIBS="-L$build/libxml2-2.7.7-bin/lib -lxml2" --enable-openssl --with-apache2=$build/httpd-2.3.10-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.3.10-bin/include --with-apr=$build/apr-1.4.x-bin/include/apr-2 --prefix=$build/axis2c-1.6.0-bin make make install if [ "$?" != "0" ]; then @@ -338,7 +338,7 @@ cp src/lib/libscribe.so $build/scribe-2.2-bin/lib cd $build # Build Apache Libcloud -wget http://www.apache.org/dist/incubator/libcloud/apache-libcloud-incubating-0.4.2.tar.bz2 +wget 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 diff --git a/sca-cpp/trunk/ubuntu/uec2-conf b/sca-cpp/trunk/ubuntu/uec2-conf index 7bfb4dfdcb..37d786896e 100755 --- a/sca-cpp/trunk/ubuntu/uec2-conf +++ b/sca-cpp/trunk/ubuntu/uec2-conf @@ -16,7 +16,7 @@ # under the License. # Configure EC2 for use with Tuscany SCA -here=`readlink -f $0`; here=`dirname $here` +here=`echo "import os; print os.path.realpath('$0')" | python`; here=`dirname $here` . $here/uec2-setenv # Display commands as they are executed diff --git a/sca-cpp/trunk/ubuntu/uec2-start b/sca-cpp/trunk/ubuntu/uec2-start index 8ab66cd803..ef3dc4efdb 100755 --- a/sca-cpp/trunk/ubuntu/uec2-start +++ b/sca-cpp/trunk/ubuntu/uec2-start @@ -17,7 +17,7 @@ # Start an Ubuntu 10.10 64-bit EC2 instance for use with Tuscany -here=`readlink -f $0`; here=`dirname $here` +here=`echo "import os; print os.path.realpath('$0')" | python`; here=`dirname $here` . $here/uec2-setenv # Here are the AMI IDs you can use in the different EC2 regions: diff --git a/sca-cpp/trunk/ubuntu/uec2-status b/sca-cpp/trunk/ubuntu/uec2-status index 4f425b39d4..f7a0722fe9 100755 --- a/sca-cpp/trunk/ubuntu/uec2-status +++ b/sca-cpp/trunk/ubuntu/uec2-status @@ -16,7 +16,7 @@ # under the License. # Display the status of EC2 instances -here=`readlink -f $0`; here=`dirname $here` +here=`echo "import os; print os.path.realpath('$0')" | python`; here=`dirname $here` . $here/uec2-setenv ec2-describe-instances --region us-west-1 diff --git a/sca-cpp/trunk/ubuntu/uec2-stop b/sca-cpp/trunk/ubuntu/uec2-stop index aa3b2e8081..575fb4e3cd 100755 --- a/sca-cpp/trunk/ubuntu/uec2-stop +++ b/sca-cpp/trunk/ubuntu/uec2-stop @@ -17,7 +17,7 @@ # Terminate an EC2 instance instance=$1 -here=`readlink -f $0`; here=`dirname $here` +here=`echo "import os; print os.path.realpath('$0')" | python`; here=`dirname $here` . $here/uec2-setenv ec2-terminate-instances $instance --region us-west-1 |