From caec161501b7157e102c7e6532084616e8dce176 Mon Sep 17 00:00:00 2001 From: jsdelfino Date: Tue, 28 Jun 2011 15:50:47 +0000 Subject: 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 --- sca-cpp/trunk/modules/edit/htdocs/graph/graph.js | 3 ++- sca-cpp/trunk/modules/edit/htdocs/public/notauth.html | 2 +- .../trunk/modules/edit/htdocs/public/notfound.html | 2 +- sca-cpp/trunk/modules/edit/htdocs/public/notyet.html | 2 +- sca-cpp/trunk/modules/edit/htdocs/public/oops.html | 2 +- sca-cpp/trunk/modules/edit/ssl-start | 4 ++-- sca-cpp/trunk/modules/edit/start | 4 ++-- sca-cpp/trunk/modules/http/Makefile.am | 10 +++++----- sca-cpp/trunk/modules/http/basic-auth-conf | 4 ++-- sca-cpp/trunk/modules/http/cert-auth-conf | 4 ++-- sca-cpp/trunk/modules/http/form-auth-conf | 4 ++-- sca-cpp/trunk/modules/http/group-auth-conf | 4 ++-- sca-cpp/trunk/modules/http/http-test | 2 +- sca-cpp/trunk/modules/http/httpd-addr | 1 - sca-cpp/trunk/modules/http/httpd-conf | 19 +++++++++++++------ sca-cpp/trunk/modules/http/httpd-debug | 4 ++-- sca-cpp/trunk/modules/http/httpd-event-conf | 4 ++-- sca-cpp/trunk/modules/http/httpd-memgrind | 4 ++-- sca-cpp/trunk/modules/http/httpd-restart | 4 ++-- sca-cpp/trunk/modules/http/httpd-ssl-conf | 6 +++--- sca-cpp/trunk/modules/http/httpd-start | 4 ++-- sca-cpp/trunk/modules/http/httpd-stop | 4 ++-- sca-cpp/trunk/modules/http/httpd-test | 4 ++-- sca-cpp/trunk/modules/http/httpd-worker-conf | 4 ++-- sca-cpp/trunk/modules/http/mod-security-conf | 4 ++-- sca-cpp/trunk/modules/http/open-auth-conf | 4 ++-- sca-cpp/trunk/modules/http/passwd-auth-conf | 4 ++-- sca-cpp/trunk/modules/http/proxy-conf | 4 ++-- sca-cpp/trunk/modules/http/proxy-member-conf | 4 ++-- sca-cpp/trunk/modules/http/proxy-ssl-conf | 4 ++-- sca-cpp/trunk/modules/http/proxy-ssl-member-conf | 4 ++-- sca-cpp/trunk/modules/http/proxy-test | 2 +- sca-cpp/trunk/modules/http/ssl-ca-conf | 8 ++++---- sca-cpp/trunk/modules/http/ssl-cert-conf | 8 ++++---- sca-cpp/trunk/modules/http/ssl-cert-find | 10 +++++++--- sca-cpp/trunk/modules/http/tunnel-ssl-conf | 4 ++-- sca-cpp/trunk/modules/http/vhost-conf | 8 ++++---- sca-cpp/trunk/modules/http/vhost-ssl-conf | 8 ++++---- sca-cpp/trunk/modules/java/Makefile.am | 6 +++--- sca-cpp/trunk/modules/java/java-conf | 13 ++++++++++--- sca-cpp/trunk/modules/java/server-test | 2 +- sca-cpp/trunk/modules/java/wiring-test | 4 ++-- sca-cpp/trunk/modules/js/util-test | 4 ++-- sca-cpp/trunk/modules/oauth/Makefile.am | 10 +++++----- sca-cpp/trunk/modules/oauth/oauth-conf | 15 +++++++++++---- sca-cpp/trunk/modules/oauth/oauth-memcached-conf | 4 ++-- sca-cpp/trunk/modules/oauth/oauth1-appkey-conf | 4 ++-- sca-cpp/trunk/modules/oauth/oauth2-appkey-conf | 4 ++-- sca-cpp/trunk/modules/oauth/start-mixed-test | 2 +- sca-cpp/trunk/modules/openid/openid-conf | 4 ++-- sca-cpp/trunk/modules/openid/openid-memcached-conf | 4 ++-- sca-cpp/trunk/modules/openid/openid-step2-conf | 4 ++-- sca-cpp/trunk/modules/python/Makefile.am | 6 +++--- sca-cpp/trunk/modules/python/python-conf | 13 ++++++++++--- sca-cpp/trunk/modules/python/server-test | 2 +- sca-cpp/trunk/modules/python/wiring-test | 4 ++-- sca-cpp/trunk/modules/scdl/validate-test | 2 +- sca-cpp/trunk/modules/server/Makefile.am | 16 ++++++++-------- sca-cpp/trunk/modules/server/cpp-conf | 13 ++++++++++--- sca-cpp/trunk/modules/server/httpd-test | 4 ++-- sca-cpp/trunk/modules/server/scheme-conf | 13 ++++++++++--- sca-cpp/trunk/modules/server/server-conf | 15 +++++++++++---- sca-cpp/trunk/modules/server/server-test | 2 +- sca-cpp/trunk/modules/server/wiring-test | 4 ++-- sca-cpp/trunk/modules/wsgi/gae-start | 4 ++-- sca-cpp/trunk/modules/wsgi/gae-stop | 4 ++-- sca-cpp/trunk/modules/wsgi/gae-test | 2 +- sca-cpp/trunk/modules/wsgi/http-test | 4 ++-- sca-cpp/trunk/modules/wsgi/server-test | 2 +- sca-cpp/trunk/modules/wsgi/util-test | 4 ++-- sca-cpp/trunk/modules/wsgi/wiring-test | 4 ++-- sca-cpp/trunk/modules/wsgi/wsgi-start | 4 ++-- sca-cpp/trunk/modules/wsgi/wsgi-stop | 4 ++-- sca-cpp/trunk/modules/wsgi/wsgi-test | 4 ++-- 74 files changed, 222 insertions(+), 169 deletions(-) (limited to 'sca-cpp/trunk/modules') 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 @@ - +

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 @@ - +

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 @@ - +

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 @@ - +

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 <>$root/conf/vhost-ssl.conf <> $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 <>$root/conf/httpd.conf <>$root/conf/modules.conf </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 <>$root/conf/modules.conf </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 <>$root/conf/modules.conf <>$root/conf/modules.conf <