[eucalyptus] Initial commit
Andy Grimm
arg at fedoraproject.org
Tue Oct 9 15:24:58 UTC 2012
commit b06b0559db547f8d739ad732756fe06ab7213be5
Author: Andy Grimm <agrimm at gmail.com>
Date: Tue Oct 9 11:24:51 2012 -0400
Initial commit
.gitignore | 2 +
axis2.xml | 128 +++++
euca-WSDL2C.sh | 4 +
eucalyptus-axis2-services.patch | 164 ++++++
eucalyptus-cc.init | 325 +++++++++++
eucalyptus-cc.service | 14 +
eucalyptus-clean-cc | 111 ++++
eucalyptus-cloud.service | 14 +
eucalyptus-configurable-paths.patch | 517 ++++++++++++++++++
eucalyptus-disable-gwt-in-buildxml.patch | 28 +
eucalyptus-disable-gwt-in-makefile.patch | 28 +
eucalyptus-disable-gwt.patch | 118 ++++
eucalyptus-groovy18.patch | 79 +++
eucalyptus-jarlinks.txt | 140 +++++
eucalyptus-jdk7.patch | 48 ++
eucalyptus-jetty8.patch | 218 ++++++++
eucalyptus-jni-abspath.patch | 19 +
eucalyptus-move-version-file.patch | 11 +
eucalyptus-nc-libvirt.rules | 11 +
eucalyptus-nc.init | 371 +++++++++++++
eucalyptus-nc.service | 14 +
eucalyptus-respect-ldflags.patch | 15 +
eucalyptus-rootwrap-python.patch | 24 +
eucalyptus-wso2-axis2-configure.patch | 28 +
eucalyptus.spec | 879 ++++++++++++++++++++++++++++++
eucalyptus.tmpfiles | 1 +
httpd-cc.conf | 23 +
httpd-common.conf | 32 ++
httpd-nc.conf | 23 +
sources | 2 +
30 files changed, 3391 insertions(+), 0 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index e69de29..76e8b73 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1,2 @@
+/eucalyptus-3.1.2gitb8c109b4-generated.tgz
+/eucalyptus-3.1.2gitb8c109b4.tar.gz
diff --git a/axis2.xml b/axis2.xml
new file mode 100644
index 0000000..4776efc
--- /dev/null
+++ b/axis2.xml
@@ -0,0 +1,128 @@
+<axisconfig name="Axis2/C">
+ <!-- ================================================= -->
+ <!-- Parameters -->
+ <!-- ================================================= -->
+ <!-- Uncomment following to enable MTOM support globally -->
+ <!--parameter name="enableMTOM" locked="false">true</parameter-->
+
+ <!-- Set the suitable size for optimum memory usage when sending large attachments -->
+ <!--parameter name="MTOMBufferSize" locked="false">10</parameter-->
+ <!--parameter name="MTOMMaxBuffers" locked="false">1000</parameter-->
+ <!--parameter name="EnableMTOMServiceCallback" locked="false">true</parameter-->
+ <!--parameter name="attachmentDIR" locked="false">/path/to/the/attachment/caching/dir/</parameter-->
+ <!--parameter name="MTOMCachingCallback" locked="false">/path/to/the/caching_callback</parameter-->
+ <!--parameter name="MTOMSendingCallback" locked="false">/path/to/the/sending_callback</parameter-->
+
+ <!-- Enable REST -->
+ <parameter name="enableREST" locked="false">true</parameter>
+
+ <!-- Uncomment following to persist op_ctx, useful with RM -->
+ <!--parameter name="persistOperationContext" locked="false">true</parameter-->
+
+ <!--if you want to extract the service archive file and work with that please uncomment this-->
+ <!--else , it wont extract archive file or does not take into consideration if someone drop-->
+ <!--exploded directory into /service directory-->
+ <!--<parameter name="extractServiceArchive" locked="false">true</parameter>-->
+
+
+ <!-- ================================================= -->
+ <!-- Message Receivers -->
+ <!-- ================================================= -->
+ <!-- This is the Deafult Message Receiver for the Request Response style Operations -->
+ <!--messageReceiver mep="INOUT" class="axis2_receivers"/-->
+
+
+ <!-- ================================================= -->
+ <!-- Transport Ins -->
+ <!-- ================================================= -->
+
+ <transportReceiver name="http" class="axis2_http_receiver">
+ <parameter name="port" locked="false">6060</parameter>
+ <parameter name="exposeHeaders" locked="true">false</parameter>
+ </transportReceiver>
+
+ <!--transportReceiver name="https" class="axis2_http_receiver">
+ <parameter name="port" locked="false">6060</parameter>
+ <parameter name="exposeHeaders" locked="true">false</parameter>
+ </transportReceiver-->
+
+ <!--transportReceiver name="tcp" class="axis2_tcp_receiver">
+ <parameter name="port" locked="false">6060</parameter>
+ </transportReceiver-->
+
+
+ <!-- ================================================= -->
+ <!-- Transport Outs -->
+ <!-- ================================================= -->
+
+ <transportSender name="http" class="axis2_http_sender">
+ <parameter name="PROTOCOL" locked="false">HTTP/1.1</parameter>
+ <parameter name="xml-declaration" insert="false"/>
+ <!--parameter name="Transfer-Encoding">chunked</parameter-->
+ <!--parameter name="HTTP-Authentication" username="" password="" locked="true"/-->
+ <!--parameter name="PROXY" proxy_host="127.0.0.1" proxy_port="8080" proxy_username="" proxy_password="" locked="true"/-->
+ </transportSender>
+
+ <!-- Uncomment the following with appropriate parameters to enable the SSL transport sender.
+ Also make sure that the appropriate transport receiver is enabled above.-->
+ <!--transportSender name="https" class="axis2_http_sender">
+ <parameter name="PROTOCOL" locked="false">HTTP/1.1</parameter>
+ <parameter name="xml-declaration" insert="false"/>
+ </transportSender>
+ <parameter name="SERVER_CERT">/path/to/ca/certificate</parameter>
+ <parameter name="KEY_FILE">/path/to/client/certificate/chain/file</parameter>
+ <parameter name="SSL_PASSPHRASE">passphrase</parameter>
+ -->
+
+ <!-- Uncomment this one with the appropriate papameters to enable the TCP transport Sender-->
+ <!--transportSender name="tcp" class="axis2_tcp_sender">
+ <parameter name="PROTOCOL" locked="false">TCP</parameter>
+ <parameter name="xml-declaration" insert="false"/>
+ </transportSender-->
+
+
+ <!-- ================================================= -->
+ <!-- Global Modules -->
+ <!-- ================================================= -->
+ <!-- Comment this to disable Addressing -->
+ <module ref="addressing"/>
+
+
+ <!--Configuring module , providing paramters for modules whether they refer or not-->
+ <!--<moduleConfig name="addressing">-->
+ <!--<parameter name="addressingPara" locked="false">N/A</parameter>-->
+ <!--</moduleConfig>-->
+
+ <!-- ================================================= -->
+ <!-- Phases -->
+ <!-- ================================================= -->
+ <phaseOrder type="inflow">
+ <!-- System pre defined phases -->
+ <phase name="Transport"/>
+ <phase name="PreDispatch"/>
+ <phase name="Dispatch"/>
+ <phase name="PostDispatch"/>
+ <phase name="Security"/>
+ <!-- End system pre defined phases -->
+ <!-- After PostDispatch phase, module or service author can add any phase as required -->
+ <!-- User defined phases could be added here -->
+ <!--phase name="userphase1"/-->
+ </phaseOrder>
+ <phaseOrder type="outflow">
+ <!-- User defined phases could be added here -->
+ <!--phase name="userphase1"/-->
+ <!--system predefined phase-->
+ <phase name="MessageOut"/>
+ <phase name="Security"/>
+ </phaseOrder>
+ <phaseOrder type="INfaultflow">
+ <!-- User defined phases could be added here -->
+ <!--phase name="userphase1"/-->
+ </phaseOrder>
+ <phaseOrder type="Outfaultflow">
+ <!-- User defined phases could be added here -->
+ <!--phase name="userphase1"/-->
+ <phase name="MessageOut"/>
+ </phaseOrder>
+</axisconfig>
+
diff --git a/euca-WSDL2C.sh b/euca-WSDL2C.sh
new file mode 100644
index 0000000..3fffcdf
--- /dev/null
+++ b/euca-WSDL2C.sh
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+CLASSPATH=$( build-classpath axis2v14/codegen axis2v14/adb axis2v14/adb-codegen axis2v14/kernel neethi wsdl4j commons-logging axiom/axiom-api axiom/axiom-dom axiom/axiom-impl XmlSchema backport-util-concurrent xalan-j2-serializer xalan-j2 ):${CLASSPATH} java org.apache.axis2.wsdl.WSDL2C $*
+
diff --git a/eucalyptus-axis2-services.patch b/eucalyptus-axis2-services.patch
new file mode 100644
index 0000000..5e14979
--- /dev/null
+++ b/eucalyptus-axis2-services.patch
@@ -0,0 +1,164 @@
+
+diff -ur eucalyptus-3.1.0.orig/cluster/Makefile eucalyptus-3.1.0/cluster/Makefile
+--- eucalyptus-3.1.0.orig/cluster/Makefile 2012-08-21 14:50:00.321348865 -0400
++++ eucalyptus-3.1.0/cluster/Makefile 2012-08-21 14:56:05.743315133 -0400
+@@ -87,25 +87,25 @@
+ $(CC) -o $(CLIENTKILLALL) $(CFLAGS) $(INCLUDES) $(CLIENT).c cc-client-marshal-adb.c -DMODE=0 generated/adb_*.o generated/axis2_stub_*.o ../util/misc.o ../storage/diskutil.o ../util/ipc.o $(WSSECLIBS) $(CC_LIBS)
+
+ fakedeploy:
+- $(INSTALL) $(SERVICE_SO_FAKE) $(DESTDIR)$(AXIS2C_SERVICES)/$(SERVICE_NAME)/$(SERVICE_SO)
++ $(INSTALL) $(SERVICE_SO_FAKE) $(DESTDIR)$(AXIS2_CC_SERVICES)/$(SERVICE_NAME)/$(SERVICE_SO)
+
+ deploy:
+- $(INSTALL) -d $(DESTDIR)$(AXIS2C_SERVICES)/$(SERVICE_NAME)/
+- $(INSTALL) $(SERVICE_SO) $(DESTDIR)$(AXIS2C_SERVICES)/$(SERVICE_NAME)/
+- $(INSTALL) $(CCWSDL) $(DESTDIR)$(AXIS2C_SERVICES)/$(SERVICE_NAME)/
++ $(INSTALL) -d $(DESTDIR)$(AXIS2_CC_SERVICES)/$(SERVICE_NAME)/
++ $(INSTALL) $(SERVICE_SO) $(DESTDIR)$(AXIS2_CC_SERVICES)/$(SERVICE_NAME)/
++ $(INSTALL) $(CCWSDL) $(DESTDIR)$(AXIS2_CC_SERVICES)/$(SERVICE_NAME)/
+ #no ws-sec
+- cat generated/services.xml | ../tools/add_wsdllocation.pl $(AXIS2C_SERVICES)/$(SERVICE_NAME)/$(CCWSDLNAME) > $(DESTDIR)$(AXIS2C_SERVICES)/$(SERVICE_NAME)/services_noWS.xml
++ cat generated/services.xml | ../tools/add_wsdllocation.pl $(AXIS2_CC_SERVICES)/$(SERVICE_NAME)/$(CCWSDLNAME) > $(DESTDIR)$(AXIS2_CC_SERVICES)/$(SERVICE_NAME)/services_noWS.xml
+
+ #ws-sec
+- cat generated/services.xml | ../tools/add_wsdllocation.pl $(AXIS2C_SERVICES)/$(SERVICE_NAME)/$(CCWSDLNAME) | ../tools/add_service_policy.pl ../tools/service-policy-template.xml | sed "s:CLIENT-CERT:cloud-cert.pem:g" | sed "s:CLIENT-KEY:cloud-pk.pem:g" | sed "s:SERVER-CERT:cluster-cert.pem:g" | sed "s:SERVER-KEY:cluster-pk.pem:g" | sed "s:CLIENT-USERNAME:eucalyptus:g" > $(DESTDIR)$(AXIS2C_SERVICES)/$(SERVICE_NAME)/services_WS.xml
++ cat generated/services.xml | ../tools/add_wsdllocation.pl $(AXIS2_CC_SERVICES)/$(SERVICE_NAME)/$(CCWSDLNAME) | ../tools/add_service_policy.pl ../tools/service-policy-template.xml | sed "s:CLIENT-CERT:cloud-cert.pem:g" | sed "s:CLIENT-KEY:cloud-pk.pem:g" | sed "s:SERVER-CERT:cluster-cert.pem:g" | sed "s:SERVER-KEY:cluster-pk.pem:g" | sed "s:CLIENT-USERNAME:eucalyptus:g" > $(DESTDIR)$(AXIS2_CC_SERVICES)/$(SERVICE_NAME)/services_WS.xml
+ cat ../tools/client-policy-template.xml | sed "s:EUCALYPTUS_HOME:$(EUCALYPTUS):g" | sed "s:AXIS2C_HOME:$(AXIS2C_HOME):g" | sed "s:CLIENT-CERT:cloud-cert.pem:g" | sed "s:SERVER-CERT:cluster-cert.pem:g" | sed "s:SERVER-KEY:cluster-pk.pem:g" | sed "s:CLIENT-KEY:cloud-pk.pem:g" | sed "s:CLIENT-USERNAME:eucalyptus:g" > cc-client-policy.xml
+ ## cp ../tools/*.pem $(EUCALYPTUS)/var/lib/eucalyptus/keys/
+ # cp cc-client-policy.xml $(EUCALYPTUS)/var/lib/eucalyptus/keys/
+ # chmod -R 0600 $(EUCALYPTUS)/var/lib/eucalyptus/keys/*
+ # ws
+- $(INSTALL) $(DESTDIR)$(AXIS2C_SERVICES)/$(SERVICE_NAME)/services_WS.xml $(DESTDIR)$(AXIS2C_SERVICES)/$(SERVICE_NAME)/services.xml
++ $(INSTALL) $(DESTDIR)$(AXIS2_CC_SERVICES)/$(SERVICE_NAME)/services_WS.xml $(DESTDIR)$(AXIS2_CC_SERVICES)/$(SERVICE_NAME)/services.xml
+ # no ws
+-# cp $(AXIS2C_SERVICES)/$(SERVICE_NAME)/services_noWS.xml $(AXIS2C_SERVICES)/$(SERVICE_NAME)/services.xml
++# cp $(AXIS2_CC_SERVICES)/$(SERVICE_NAME)/services_noWS.xml $(AXIS2_CC_SERVICES)/$(SERVICE_NAME)/services.xml
+
+ clean:
+ rm -f $(SERVICE_SO) $(SERVICE_SO_FAKE) *.o $(CLIENTKILLALL) $(CLIENT)_full $(SHUTDOWNCC) *~* *#*
+@@ -120,4 +120,4 @@
+ uninstall:
+ # @$(RM) -f $(DESTDIR)$(sbindir)/$(SHUTDOWNCC)
+ @$(RM) -f $(DESTDIR)$(eucastatedir)/keys/cc-client-policy.xml
+- @$(RM) -rf $(DESTDIR)$(AXIS2C_SERVICES)/$(SERVICE_NAME)
++ @$(RM) -rf $(DESTDIR)$(AXIS2_CC_SERVICES)/$(SERVICE_NAME)
+diff -ur eucalyptus-3.1.0.orig/gatherlog/GLclient.c eucalyptus-3.1.0/gatherlog/GLclient.c
+--- eucalyptus-3.1.0.orig/gatherlog/GLclient.c 2012-06-19 14:41:48.000000000 -0400
++++ eucalyptus-3.1.0/gatherlog/GLclient.c 2012-08-15 17:21:54.686519604 -0400
+@@ -70,7 +70,7 @@
+ int rc, i;
+ char *euca_home;
+
+- snprintf(endpoint_uri, 256," http://%s/axis2/services/EucalyptusGL", argv[1]);
++ snprintf(endpoint_uri, 256,"http://%s/axis2/services/EucalyptusGL", argv[1]);
+ // env = axutil_env_create_all("/tmp/GLclient.log", AXIS2_LOG_LEVEL_TRACE);
+ env = axutil_env_create_all("/tmp/fooh", AXIS2_LOG_LEVEL_TRACE);
+ client_home = AXIS2_GETENV("AXIS2C_HOME");
+diff -ur eucalyptus-3.1.0.orig/gatherlog/Makefile eucalyptus-3.1.0/gatherlog/Makefile
+--- eucalyptus-3.1.0.orig/gatherlog/Makefile 2012-08-21 14:50:00.322348865 -0400
++++ eucalyptus-3.1.0/gatherlog/Makefile 2012-08-21 14:57:30.990307309 -0400
+@@ -47,22 +47,22 @@
+ $(CC) -o $(CLIENT) $(CFLAGS) $(INCLUDES) $(CLIENT).c gl-client-marshal-adb.c generated/adb_*.o generated/axis2_stub_*.o ../util/misc.o ../storage/diskutil.o ../util/ipc.o ../util/euca_auth.o -DMODE=1 $(LIBS) $(LDFLAGS) -lssl -lcrypto
+
+ deploy:
+- $(INSTALL) -d $(DESTDIR)$(AXIS2C_SERVICES)/$(SERVICE_NAME)/
+- $(INSTALL) $(SERVICE_SO) $(DESTDIR)$(AXIS2C_SERVICES)/$(SERVICE_NAME)/
+- $(INSTALL) $(GLWSDL) $(DESTDIR)$(AXIS2C_SERVICES)/$(SERVICE_NAME)/
++ $(INSTALL) -d $(DESTDIR)$(AXIS2_GL_SERVICES)/$(SERVICE_NAME)/
++ $(INSTALL) $(SERVICE_SO) $(DESTDIR)$(AXIS2_GL_SERVICES)/$(SERVICE_NAME)/
++ $(INSTALL) $(GLWSDL) $(DESTDIR)$(AXIS2_GL_SERVICES)/$(SERVICE_NAME)/
+ #no ws-sec
+- cat generated/services.xml | ../tools/add_wsdllocation.pl $(AXIS2C_SERVICES)/$(SERVICE_NAME)/$(GLWSDLNAME) > $(DESTDIR)$(AXIS2C_SERVICES)/$(SERVICE_NAME)/services_noWS.xml
++ cat generated/services.xml | ../tools/add_wsdllocation.pl $(AXIS2_GL_SERVICES)/$(SERVICE_NAME)/$(GLWSDLNAME) > $(DESTDIR)$(AXIS2_GL_SERVICES)/$(SERVICE_NAME)/services_noWS.xml
+
+ #ws-sec
+-# cat generated/services.xml | ../tools/add_wsdllocation.pl $(AXIS2C_SERVICES)/$(SERVICE_NAME)/$(GLWSDLNAME) | ../tools/add_service_policy.pl ../tools/service-policy-template.xml | sed "s:CLIENT-CERT:cloud-cert.pem:g" | sed "s:CLIENT-KEY:cloud-pk.pem:g" | sed "s:SERVER-CERT:cluster-cert.pem:g" | sed "s:SERVER-KEY:cluster-pk.pem:g" | sed "s:CLIENT-USERNAME:eucalyptus:g" > $(AXIS2C_SERVICES)/$(SERVICE_NAME)/services_WS.xml
++# cat generated/services.xml | ../tools/add_wsdllocation.pl $(AXIS2_GL_SERVICES)/$(SERVICE_NAME)/$(GLWSDLNAME) | ../tools/add_service_policy.pl ../tools/service-policy-template.xml | sed "s:CLIENT-CERT:cloud-cert.pem:g" | sed "s:CLIENT-KEY:cloud-pk.pem:g" | sed "s:SERVER-CERT:cluster-cert.pem:g" | sed "s:SERVER-KEY:cluster-pk.pem:g" | sed "s:CLIENT-USERNAME:eucalyptus:g" > $(AXIS2_GL_SERVICES)/$(SERVICE_NAME)/services_WS.xml
+ # cat ../tools/client-policy-template.xml | sed "s:EUCALYPTUS_HOME:$(EUCALYPTUS):g" | sed "s:AXIS2C_HOME:$(AXIS2C_HOME):g" | sed "s:CLIENT-CERT:cloud-cert.pem:g" | sed "s:SERVER-CERT:cluster-cert.pem:g" | sed "s:SERVER-KEY:cluster-pk.pem:g" | sed "s:CLIENT-KEY:cloud-pk.pem:g" | sed "s:CLIENT-USERNAME:eucalyptus:g" > cc-client-policy.xml
+ # cp ../tools/*.pem $(EUCALYPTUS)/var/lib/eucalyptus/keys/
+ # cp cc-client-policy.xml $(EUCALYPTUS)/var/lib/eucalyptus/keys/
+ # chmod -R 0600 $(EUCALYPTUS)/var/lib/eucalyptus/keys/*
+ # ws
+-# cp $(AXIS2C_SERVICES)/$(SERVICE_NAME)/services_WS.xml $(AXIS2C_SERVICES)/$(SERVICE_NAME)/services.xml
++# cp $(AXIS2_GL_SERVICES)/$(SERVICE_NAME)/services_WS.xml $(AXIS2_GL_SERVICES)/$(SERVICE_NAME)/services.xml
+ # no ws
+- $(INSTALL) $(DESTDIR)$(AXIS2C_SERVICES)/$(SERVICE_NAME)/services_noWS.xml $(DESTDIR)$(AXIS2C_SERVICES)/$(SERVICE_NAME)/services.xml
++ $(INSTALL) $(DESTDIR)$(AXIS2_GL_SERVICES)/$(SERVICE_NAME)/services_noWS.xml $(DESTDIR)$(AXIS2_GL_SERVICES)/$(SERVICE_NAME)/services.xml
+
+ clean:
+ rm -f $(SERVICE_SO) *.o $(CLIENT) *~* *#*
+@@ -73,4 +73,4 @@
+ install:
+
+ uninstall:
+- @$(RM) -rf $(DESTDIR)$(AXIS2C_SERVICES)/$(SERVICE_NAME)
++ @$(RM) -rf $(DESTDIR)$(AXIS2_GL_SERVICES)/$(SERVICE_NAME)
+diff -ur eucalyptus-3.1.0.orig/Makedefs.in eucalyptus-3.1.0/Makedefs.in
+--- eucalyptus-3.1.0.orig/Makedefs.in 2012-08-14 22:26:39.114376469 -0400
++++ eucalyptus-3.1.0/Makedefs.in 2012-08-15 17:34:39.099320533 -0400
+@@ -8,9 +8,16 @@
+
+ # packages we depend upon
+ export APACHE2_MODULE_DIR = @APACHE2_MODULE_DIR@
++export WSFCPP_HOME = @AXIS2C_HOME@
+ export AXIS2C_HOME = @AXIS2C_HOME@
+ export AXIS2C_SERVICES = @AXIS2C_SERVICES@
+ export AXIS2_HOME = @AXIS2_HOME@
++export AXIS2_NC_REPO = ${AXIS2C_SERVICES}/nc
++export AXIS2_NC_SERVICES = ${AXIS2_NC_REPO}/services
++export AXIS2_CC_REPO = ${AXIS2C_SERVICES}/cc
++export AXIS2_CC_SERVICES = ${AXIS2_CC_REPO}/services
++export AXIS2_GL_REPO = ${AXIS2C_SERVICES}/gl
++export AXIS2_GL_SERVICES = ${AXIS2_GL_REPO}/services
+ export LIBVIRT_HOME = @LIBVIRT_HOME@
+ export VDDK_HOME = @VDDK_HOME@
+
+@@ -72,7 +78,8 @@
+ -DLIBDIR=\"$(libdir)\" \
+ -DLIBEXECDIR=\"$(libexecdir)\" \
+ -DLOCALSTATEDIR=\"$(localstatedir)\" \
+- -DHELPERDIR=\"$(datarootdir)\"
++ -DHELPERDIR=\"$(datarootdir)\" \
++ -DWSFCPP_HOME=\"$(WSFCPP_HOME)\"
+
+ CPPFLAGS = @CPPFLAGS@ $(PATHS)
+
+diff -ur eucalyptus-3.1.0.orig/node/Makefile eucalyptus-3.1.0/node/Makefile
+--- eucalyptus-3.1.0.orig/node/Makefile 2012-08-14 22:26:39.127376598 -0400
++++ eucalyptus-3.1.0/node/Makefile 2012-08-15 17:36:15.814312663 -0400
+@@ -118,21 +118,21 @@
+ $(CC) $(CFLAGS) $(CPPFLAGS) $(INCLUDES) $(NC_LIBS) `xslt-config --cflags` -o test_xml -D__STANDALONE xml.c ../util/misc.o ../storage/diskutil.o ../util/euca_auth.o $(OPENSSL_LIBS) ../util/ipc.o
+
+ deploy:
+- $(INSTALL) -d $(DESTDIR)$(AXIS2C_SERVICES)/$(SERVICE_NAME)/
+- $(INSTALL) $(SERVICE_SO) $(DESTDIR)$(AXIS2C_SERVICES)/$(SERVICE_NAME)/
++ $(INSTALL) -d $(DESTDIR)$(AXIS2_NC_SERVICES)/$(SERVICE_NAME)/
++ $(INSTALL) $(SERVICE_SO) $(DESTDIR)$(AXIS2_NC_SERVICES)/$(SERVICE_NAME)/
+
+ # no ws-sec
+- cat generated/services.xml | ../tools/add_wsdllocation.pl $(AXIS2C_SERVICES)/$(SERVICE_NAME)/$(NCWSDLNAME) > $(DESTDIR)$(AXIS2C_SERVICES)/$(SERVICE_NAME)/services_noWS.xml
++ cat generated/services.xml | ../tools/add_wsdllocation.pl $(AXIS2_NC_SERVICES)/$(SERVICE_NAME)/$(NCWSDLNAME) > $(DESTDIR)$(AXIS2_NC_SERVICES)/$(SERVICE_NAME)/services_noWS.xml
+ # ws-sec
+- cat generated/services.xml | ../tools/add_wsdllocation.pl $(AXIS2C_SERVICES)/$(SERVICE_NAME)/$(NCWSDLNAME) | ../tools/add_service_policy.pl ../tools/service-policy-template.xml | sed "s:CLIENT-CERT:cluster-cert.pem:g" | sed "s:CLIENT-KEY:cluster-pk.pem:g" | sed "s:SERVER-CERT:node-cert.pem:g" | sed "s:SERVER-KEY:node-pk.pem:g" | sed "s:CLIENT-USERNAME:eucalyptus:g" > $(DESTDIR)$(AXIS2C_SERVICES)/$(SERVICE_NAME)/services_WS.xml
+- cat ../tools/client-policy-template.xml | sed "s:EUCALYPTUS_HOME:$(EUCALYPTUS):g" | sed "s:AXIS2C_HOME:$(AXIS2C_HOME):g" | sed "s:CLIENT-CERT:cluster-cert.pem:g" | sed "s:CLIENT-KEY:cluster-pk.pem:g" | sed "s:SERVER-CERT:node-cert.pem:g" | sed "s:SERVER-KEY:node-pk.pem:g" | sed "s:CLIENT-USERNAME:eucalyptus:g" > nc-client-policy.xml
++ cat generated/services.xml | ../tools/add_wsdllocation.pl $(AXIS2_NC_SERVICES)/$(SERVICE_NAME)/$(NCWSDLNAME) | ../tools/add_service_policy.pl ../tools/service-policy-template.xml | sed "s:CLIENT-CERT:cluster-cert.pem:g" | sed "s:CLIENT-KEY:cluster-pk.pem:g" | sed "s:SERVER-CERT:node-cert.pem:g" | sed "s:SERVER-KEY:node-pk.pem:g" | sed "s:CLIENT-USERNAME:eucalyptus:g" > $(DESTDIR)$(AXIS2_NC_SERVICES)/$(SERVICE_NAME)/services_WS.xml
++ cat ../tools/client-policy-template.xml | sed "s:EUCALYPTUS_HOME:$(EUCALYPTUS):g" | sed "s:AXIS2C_HOME:$(AXIS2_NC_REPO):g" | sed "s:CLIENT-CERT:cluster-cert.pem:g" | sed "s:CLIENT-KEY:cluster-pk.pem:g" | sed "s:SERVER-CERT:node-cert.pem:g" | sed "s:SERVER-KEY:node-pk.pem:g" | sed "s:CLIENT-USERNAME:eucalyptus:g" > nc-client-policy.xml
+ # cp nc-client-policy.xml $(EUCALYPTUS)/var/lib/eucalyptus/keys/
+ ## cp ../tools/*.pem $(EUCALYPTUS)/var/lib/eucalyptus/keys/
+ # chmod -R 0600 $(EUCALYPTUS)/var/lib/eucalyptus/keys/*
+ # ws
+- $(INSTALL) $(DESTDIR)$(AXIS2C_SERVICES)/$(SERVICE_NAME)/services_WS.xml $(DESTDIR)$(AXIS2C_SERVICES)/$(SERVICE_NAME)/services.xml
++ $(INSTALL) $(DESTDIR)$(AXIS2_NC_SERVICES)/$(SERVICE_NAME)/services_WS.xml $(DESTDIR)$(AXIS2_NC_SERVICES)/$(SERVICE_NAME)/services.xml
+ # no ws
+-# cp $(AXIS2C_SERVICES)/$(SERVICE_NAME)/services_noWS.xml $(AXIS2C_SERVICES)/$(SERVICE_NAME)/services.xml
++# cp $(AXIS2_NC_SERVICES)/$(SERVICE_NAME)/services_noWS.xml $(AXIS2_NC_SERVICES)/$(SERVICE_NAME)/services.xml
+
+ clean:
+ rm -rf $(SERVICE_SO) *.o $(CLIENT) $(CLIENT)_local *~* *#* test_xml
+@@ -147,5 +147,5 @@
+ uninstall:
+ $(RM) -f $(DESTDIR)$(eucastatedir)/keys/nc-client-policy.xml
+ $(RM) -f $(DESTDIR)$(eucasbindir)/euca_test_nc
+- $(RM) -rf $(DESTDIR)$(AXIS2C_SERVICES)/$(SERVICE_NAME)
++ $(RM) -rf $(DESTDIR)$(AXIS2_NC_SERVICES)/$(SERVICE_NAME)
+
diff --git a/eucalyptus-cc.init b/eucalyptus-cc.init
new file mode 100755
index 0000000..4d4a2f3
--- /dev/null
+++ b/eucalyptus-cc.init
@@ -0,0 +1,325 @@
+#!/bin/bash
+#Copyright (c) 2009 Eucalyptus Systems, Inc.
+#
+#This program is free software: you can redistribute it and/or modify
+#it under the terms of the GNU General Public License as published by
+#the Free Software Foundation, only version 3 of the License.
+#
+#This file is distributed in the hope that it will be useful, but WITHOUT
+#ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+#FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+#for more details.
+#
+#You should have received a copy of the GNU General Public License along
+#with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+#Please contact Eucalyptus Systems, Inc., 130 Castilian
+#Dr., Goleta, CA 93101 USA or visit <http://www.eucalyptus.com/licenses/>
+#if you need additional information or have any questions.
+#
+#This file may incorporate work covered under the following copyright and
+#permission notice:
+#
+# Software License Agreement (BSD License)
+#
+# Copyright (c) 2008, Regents of the University of California
+#
+#
+# Redistribution and use of this software in source and binary forms, with
+# or without modification, are permitted provided that the following
+# conditions are met:
+#
+# Redistributions of source code must retain the above copyright notice,
+# this list of conditions and the following disclaimer.
+#
+# Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
+# IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+# TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
+# PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
+# OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. USERS OF
+# THIS SOFTWARE ACKNOWLEDGE THE POSSIBLE PRESENCE OF OTHER OPEN SOURCE
+# LICENSED MATERIAL, COPYRIGHTED MATERIAL OR PATENTED MATERIAL IN THIS
+# SOFTWARE, AND IF ANY SUCH MATERIAL IS DISCOVERED THE PARTY DISCOVERING
+# IT MAY INFORM DR. RICH WOLSKI AT THE UNIVERSITY OF CALIFORNIA, SANTA
+# BARBARA WHO WILL THEN ASCERTAIN THE MOST APPROPRIATE REMEDY, WHICH IN
+# THE REGENTS' DISCRETION MAY INCLUDE, WITHOUT LIMITATION, REPLACEMENT
+# OF THE CODE SO IDENTIFIED, LICENSING OF THE CODE SO IDENTIFIED, OR
+# WITHDRAWAL OF THE CODE CAPABILITY TO THE EXTENT NEEDED TO COMPLY WITH
+# ANY SUCH LICENSES OR RIGHTS.
+#
+#
+# Init script for the Eucalyptus cluster controller
+#
+# chkconfig: 2345 99 05
+# description: script for starting and stopping eucalyptus cluster controller
+#
+### BEGIN INIT INFO
+# Provides: eucalyptus-cc
+# Required-Start: $remote_fs $syslog
+# Required-Stop: $remote_fs $syslog
+# Default-Start: 2 3 4 5
+# Default-Stop: 0 1 6
+# Short-Description: Start Eucalyptus cluster controller
+# Description: Start the Eucalyptus cluster controller
+### END INIT INFO
+#
+
+# Do NOT "set -e"
+
+# if we have lsb functions let's source them
+WE_HAVE_LSB="N"
+if [ -e /lib/lsb/init-functions ]; then
+ . /lib/lsb/init-functions
+ # very old lsb don't have the functions we need
+ if type log_daemon_msg > /dev/null 2> /dev/null ; then
+ WE_HAVE_LSB="Y"
+ fi
+fi
+
+if [ "$EUID" != "0" ]; then
+ echo "Eucalyptus init scripts must be run as root."
+ exit 1
+fi
+
+# I just wanted to set PATH to be the system PATH, but if a user install
+# eucalyptus manually, it may have binaries in a non-standard position:
+# hence we need to keep the PATH we receive.
+export PATH=/sbin:/usr/sbin:/bin:/usr/bin:$PATH
+DESC="Eucalyptus cluster controller"
+NAME=eucalyptus-cc
+EUCA_USER="eucalyptus"
+
+export EUCALYPTUS="/"
+EUCAHELPERDIR=$EUCALYPTUS/usr/share/eucalyptus
+EUCASBINDIR=$EUCALYPTUS/usr/sbin
+EUCACONFDIR=$EUCALYPTUS/etc/eucalyptus
+EUCADATADIR=$EUCALYPTUS/usr/share/eucalyptus
+EUCARUNDIR=$EUCALYPTUS/var/run/eucalyptus
+EUCALOGDIR=$EUCALYPTUS/var/log/eucalyptus
+EUCALIBEXECDIR=$EUCALYPTUS/usr/libexec/eucalyptus/
+LIBDIR=@LIBDIR@
+
+# crude way to start the axis2c services
+do_start() {
+ # fixes #469984 (was against NC but CC may have similar issue)
+ IPTABLES="`which iptables 2> /dev/null`"
+ if [ -n "$IPTABLES" ]; then
+ [ -x $IPTABLES ] && $IPTABLES -L -n > /dev/null 2> /dev/null
+ fi
+
+ if ! $EUCASBINDIR/euca_conf --check cc ; then
+ exit 1
+ fi
+
+ # we need IP forwarding and we need to use iptable over the bridge
+ if [ -w /proc/sys/net/ipv4/ip_forward ]; then
+ VAL=`cat /proc/sys/net/ipv4/ip_forward`
+ if [ "$VAL" = "0" ]; then
+ echo
+ echo -n "Enabling IP forwarding"
+ echo -n 1 > /proc/sys/net/ipv4/ip_forward
+ fi
+ fi
+
+ # if in MANAGED or STATIC mode, we need to use
+ # dhcpd, so better check we know how to use it
+ if [ "$VNET_MODE" = "MANAGED" -o "$VNET_MODE" = "STATIC" ]; then
+ if [ -z "$VNET_DHCPDAEMON" -o ! -x $VNET_DHCPDAEMON ]; then
+ echo
+ echo "Cannot find dhcp server!"
+ exit 1
+ fi
+ if ! $VNET_DHCPDAEMON --help 2>&1 |grep -- -tf > /dev/null ; then
+ echo
+ echo "dhcp server doesn't accept -tf option!"
+ fi
+ fi
+
+ ulimit -u 100000
+ ulimit -n 10000
+ # now we start the services
+ if ! httpd -f $EUCACONFDIR/httpd/conf/httpd-cc.conf ; then
+ echo
+ echo "Failed to start the CC!"
+ exit 1
+ fi
+}
+
+do_status() {
+ pidfile=$EUCARUNDIR/eucalyptus-cc.pid
+ if [ -s $pidfile ]; then
+ pid=`cat $pidfile 2> /dev/null`
+ if ps axww|grep $pid|grep httpd-cc.conf > /dev/null ; then
+ # we are good
+ return 0
+ fi
+ fi
+ return 1
+}
+
+do_stop() {
+ pidfile="$EUCARUNDIR/eucalyptus-cc.pid"
+
+ # let's be sure we are killing the right process
+ if ! do_status ; then
+ rm -f $pidfile
+ return
+ fi
+ # now kill the services
+ pidfiles="$EUCARUNDIR/net/euca-dhcp.pid $EUCARUNDIR/eucalyptus-cc.pid $EUCARUNDIR/httpd-dynserv.pid"
+ pids=""
+ sids=""
+ for pidfile in $pidfiles ; do
+ if [ -s $pidfile ]; then
+ pid=`cat $pidfile 2> /dev/null`
+ sids="$pid $sids"
+ morepids="$pid"
+ for i in `pgrep -P $pid`; do
+ morepids="$morepids `echo $i`"
+ morepids="$morepids `pgrep -P $i`"
+ done
+ pids="$pids $morepids"
+ rm -f $pidfile
+ fi
+ done
+ if [ -n "$pids" ]; then
+ kill -15 $pids >/dev/null 2>&1
+ pkill -9 -s $sids >/dev/null 2>&1
+ fi
+
+ dopkill=0
+ for pid in $pids ; do
+ timeout=5
+ while [ $timeout -gt 0 ]; do
+ if ps $pid > /dev/null 2>&1 ; then
+ sleep 1
+ timeout=$(($timeout - 1))
+ dopkill=1
+ else
+ break
+ fi
+ done
+ if [ $timeout -eq 0 ]; then
+ kill -9 ${pid} >/dev/null 2>&1
+ fi
+ done
+ if [ $dopkill -gt 0 ]; then
+ pkill -9 -s $sids >/dev/null 2>&1
+ fi
+}
+
+# set the library path correctly
+export LD_LIBRARY_PATH=$LIBDIR/wso2-axis2/modules/rampart
+export AXIS2C_HOME=$LIBDIR/eucalyptus/axis2/cc
+export WSFCPP_HOME=$LIBDIR/eucalyptus/axis2/cc
+
+case "$1" in
+ start)
+ if [ "$VERBOSE" != no ]; then
+ if [ "$WE_HAVE_LSB" = "Y" ]; then
+ log_daemon_msg "Starting $DESC" "$NAME"
+ else
+ echo -n "Starting $DESC: "
+ fi
+ fi
+
+ # let's check there is no previous CC running
+ if do_status ; then
+ echo
+ echo "another CC is already running!"
+ if [ "$VERBOSE" != no ]; then
+ if [ "$WE_HAVE_LSB" = "Y" ]; then
+ log_end_msg 1
+ fi
+ fi
+ exit 1
+ fi
+
+ # start and stop are hard: clear the semaphores
+ rm -f /dev/shm/*eucalyptusCC*
+ do_start
+ case "$?" in
+ 0|1)
+ if [ "$VERBOSE" != no ]; then
+ if [ "$WE_HAVE_LSB" = "Y" ]; then
+ log_end_msg 0
+ else
+ echo "done."
+ fi
+ fi
+ ;;
+ *)
+ if [ "$VERBOSE" != no ]; then
+ if [ "$WE_HAVE_LSB" = "Y" ]; then
+ log_end_msg 1
+ else
+ echo "failed!"
+ fi
+ fi
+ ;;
+ esac
+ ;;
+ stop)
+ if [ "$VERBOSE" != no ]; then
+ if [ "$WE_HAVE_LSB" = "Y" ]; then
+ log_begin_msg "Stopping $DESC"
+ else
+ echo -n "Stopping $DESC: "
+ fi
+ fi
+ # start and stop are hard: we loose the CC state
+ do_stop
+ rm -f /dev/shm/*eucalyptusCC*
+ if [ "$VERBOSE" != no ]; then
+ if [ "$WE_HAVE_LSB" = "Y" ]; then
+ log_end_msg 0
+ else
+ echo "done."
+ fi
+ fi
+ ;;
+ restart)
+ if [ "$VERBOSE" != no ]; then
+ if [ "$WE_HAVE_LSB" = "Y" ]; then
+ log_begin_msg "Restarting $DESC"
+ else
+ echo -n "Restarting $DESC: "
+ fi
+ fi
+ # restart allow the CC to mantain the state across restart
+ do_stop
+ rm -f /dev/shm/*eucalyptusCC*
+ do_start
+ if [ "$VERBOSE" != no ]; then
+ if [ "$WE_HAVE_LSB" = "Y" ]; then
+ log_end_msg 0
+ else
+ echo "done."
+ fi
+ fi
+ ;;
+ status)
+ if do_status ; then
+ echo "CC is running"
+ else
+ exit 3
+ fi
+ ;;
+
+ *)
+ echo "Usage: $NAME {start|stop|restart}" >&2
+ exit 3
+ ;;
+esac
+
+:
diff --git a/eucalyptus-cc.service b/eucalyptus-cc.service
new file mode 100644
index 0000000..8b5420e
--- /dev/null
+++ b/eucalyptus-cc.service
@@ -0,0 +1,14 @@
+[Unit]
+Description=The Eucalyptus Cluster Controller service
+After=syslog.target network.target remote-fs.target nss-lookup.target
+
+[Service]
+Type=forking
+PIDFile=/var/run/eucalyptus/eucalyptus-cc.pid
+# EnvironmentFile=/etc/sysconfig/eucalyptus
+ExecStart=/usr/libexec/eucalyptus/eucalyptus-cc.init start
+ExecStop=/usr/libexec/eucalyptus/eucalyptus-cc.init stop
+PrivateTmp=true
+
+[Install]
+WantedBy=multi-user.target
diff --git a/eucalyptus-clean-cc b/eucalyptus-clean-cc
new file mode 100755
index 0000000..d5388c7
--- /dev/null
+++ b/eucalyptus-clean-cc
@@ -0,0 +1,111 @@
+#!/bin/bash
+#Copyright (c) 2009 Eucalyptus Systems, Inc.
+#
+#This program is free software: you can redistribute it and/or modify
+#it under the terms of the GNU General Public License as published by
+#the Free Software Foundation, only version 3 of the License.
+#
+#This file is distributed in the hope that it will be useful, but WITHOUT
+#ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+#FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+#for more details.
+#
+#You should have received a copy of the GNU General Public License along
+#with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+#Please contact Eucalyptus Systems, Inc., 130 Castilian
+#Dr., Goleta, CA 93101 USA or visit <http://www.eucalyptus.com/licenses/>
+#if you need additional information or have any questions.
+#
+#This file may incorporate work covered under the following copyright and
+#permission notice:
+#
+# Software License Agreement (BSD License)
+#
+# Copyright (c) 2008, Regents of the University of California
+#
+#
+# Redistribution and use of this software in source and binary forms, with
+# or without modification, are permitted provided that the following
+# conditions are met:
+#
+# Redistributions of source code must retain the above copyright notice,
+# this list of conditions and the following disclaimer.
+#
+# Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
+# IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+# TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
+# PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
+# OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. USERS OF
+# THIS SOFTWARE ACKNOWLEDGE THE POSSIBLE PRESENCE OF OTHER OPEN SOURCE
+# LICENSED MATERIAL, COPYRIGHTED MATERIAL OR PATENTED MATERIAL IN THIS
+# SOFTWARE, AND IF ANY SUCH MATERIAL IS DISCOVERED THE PARTY DISCOVERING
+# IT MAY INFORM DR. RICH WOLSKI AT THE UNIVERSITY OF CALIFORNIA, SANTA
+# BARBARA WHO WILL THEN ASCERTAIN THE MOST APPROPRIATE REMEDY, WHICH IN
+# THE REGENTS' DISCRETION MAY INCLUDE, WITHOUT LIMITATION, REPLACEMENT
+# OF THE CODE SO IDENTIFIED, LICENSING OF THE CODE SO IDENTIFIED, OR
+# WITHDRAWAL OF THE CODE CAPABILITY TO THE EXTENT NEEDED TO COMPLY WITH
+# ANY SUCH LICENSES OR RIGHTS.
+#
+
+systemctl status eucalyptus-cc || \
+ echo "You must stop eucalyptus-cc prior to running $0"
+
+# fully clean up all local CC state
+do_fullclean() {
+ pidfiles="`ls -1 $EUCARUNDIR/vtund*.pid 2>/dev/null`"
+ pids=""
+ sids=""
+ for pidfile in $pidfiles ; do
+ if [ -s $pidfile ]; then
+ pid=`cat $pidfile 2> /dev/null`
+ sids="$pid $sids"
+ morepids="$pid"
+ for i in `pgrep -P $pid`; do
+ morepids="$morepids `echo $i`"
+ morepids="$morepids `pgrep -P $i`"
+ done
+ pids="$pids $morepids"
+ rm -f $pidfile
+ fi
+ done
+ if [ -n "$pids" ]; then
+ kill -15 $pids >/dev/null 2>&1
+ pkill -15 -s $sids >/dev/null 2>&1
+ fi
+
+ dopkill=0
+ for pid in $pids ; do
+ timeout=5
+ while [ $timeout -gt 0 ]; do
+ if ps $pid > /dev/null 2>&1 ; then
+ sleep 1
+ timeout=$(($timeout - 1))
+ dopkill=1
+ else
+ break
+ fi
+ done
+ if [ $timeout -eq 0 ]; then
+ kill -9 ${pid} >/dev/null 2>&1
+ fi
+ done
+ if [ $dopkill -gt 0 ]; then
+ pkill -9 -s $sids >/dev/null 2>&1
+ fi
+
+ rm -f $EUCARUNDIR/CC/*
+ rm -f /dev/shm/*eucalyptusCC*
+}
+
+do_fullclean
diff --git a/eucalyptus-cloud.service b/eucalyptus-cloud.service
new file mode 100644
index 0000000..c4b7932
--- /dev/null
+++ b/eucalyptus-cloud.service
@@ -0,0 +1,14 @@
+[Unit]
+Description=The Eucalyptus Cloud web services stack
+After=syslog.target network.target remote-fs.target nss-lookup.target
+Wants=tgtd.service
+
+[Service]
+Type=forking
+PIDFile=/var/run/eucalyptus/eucalyptus-cloud.pid
+ExecStart=/usr/libexec/eucalyptus/eucalyptus-cloud.init start
+ExecStop=/usr/libexec/eucalyptus/eucalyptus-cloud.init stop
+PrivateTmp=true
+
+[Install]
+WantedBy=multi-user.target
diff --git a/eucalyptus-configurable-paths.patch b/eucalyptus-configurable-paths.patch
new file mode 100644
index 0000000..c83f2e4
--- /dev/null
+++ b/eucalyptus-configurable-paths.patch
@@ -0,0 +1,517 @@
+diff --git a/Makedefs.in b/Makedefs.in
+index fe5fa3c..1427fd2 100644
+--- a/Makedefs.in
++++ b/Makedefs.in
+@@ -18,19 +18,35 @@ export VDDK_HOME = @VDDK_HOME@
+ # comply to the GNU standard
+ prefix = @prefix@
+ #exec_prefix = @exec_prefix@
+-#bindir = @bindir@
+-#sbindir = @sbindir@
+-#libdir = @libdir@
++bindir = @bindir@
++docdir = @docdir@
++sbindir = @sbindir@
++libdir = @libdir@
++libexecdir = @libexecdir@
++localstatedir = @localstatedir@
+ #mandir = @mandir@
+-#incdir = @includedir@
+-#etcdir = @sysconfdir@
+-#datarootdir = @datarootdir@
+-etcdir = ${prefix}/etc
+-vardir = ${prefix}/var
+-usrdir = ${prefix}/usr
+-bindir = ${prefix}/usr/bin
+-sbindir = ${prefix}/usr/sbin
+-datarootdir = ${usrdir}/share
++incdir = @includedir@
++etcdir = @sysconfdir@
++initddir = $(etcdir)/init.d
++datarootdir = @datarootdir@
++# etcdir = ${prefix}/etc
++# vardir = ${prefix}/var
++# usrdir = ${prefix}/usr
++# bindir = ${prefix}/usr/bin
++# sbindir = ${prefix}/usr/sbin
++# datarootdir = ${usrdir}/share
++
++# Trying to centralize the use of "prefix" and $EUCALYPTUS
++eucaconfdir = ${prefix}${etcdir}/eucalyptus
++eucadatadir = ${prefix}${datarootdir}/eucalyptus
++eucadocdir = ${prefix}${docdir}/eucalyptus
++eucalibdir = ${libdir}/eucalyptus
++eucastatedir = ${prefix}${localstatedir}/lib/eucalyptus
++eucarundir = ${prefix}${vardir}/run/eucalyptus
++eucalibexecdir = ${prefix}${libexecdir}/eucalyptus
++eucasbindir = ${prefix}/usr/sbin
++# This _could_ be eucalibexecdir instead
++eucahelperdir = ${eucadatadir}
+
+ # where we are going to install eucalyptus and where are the sources
+ export EUCALYPTUS = ${prefix}
+@@ -49,6 +65,17 @@ JAVA_HOME = @JAVA_HOME@
+ RM = @RM@
+ PYTHON = @PYTHON@
+
++# various directory paths
++PATHS= -DSYSCONFDIR=\"$(etcdir)\" \
++ -DSBINDIR=\"$(sbindir)\" \
++ -DDATADIR=\"$(datarootdir)\" \
++ -DLIBDIR=\"$(libdir)\" \
++ -DLIBEXECDIR=\"$(libexecdir)\" \
++ -DLOCALSTATEDIR=\"$(localstatedir)\" \
++ -DHELPERDIR=\"$(datarootdir)\"
++
++CPPFLAGS = @CPPFLAGS@ $(PATHS)
++
+ # compile time configurations
+ euca_theme = @INTERFACE_THEME@
+ extensions = @EXTENSIONS@
+diff --git a/Makefile b/Makefile
+index 6fab713..583390b 100644
+--- a/Makefile
++++ b/Makefile
+@@ -42,24 +42,24 @@ deploy: build
+
+ install: deploy
+ @$(INSTALL) -d $(DESTDIR)$(prefix)
+- @$(INSTALL) -d $(DESTDIR)$(etcdir)/eucalyptus/cloud.d
+- @$(INSTALL) -d $(DESTDIR)$(etcdir)/eucalyptus/nc-hooks
+- @$(INSTALL) -m 0644 VERSION $(DESTDIR)$(etcdir)/eucalyptus/eucalyptus-version
++ @$(INSTALL) -d $(DESTDIR)$(eucaconfdir)/cloud.d
++ @$(INSTALL) -d $(DESTDIR)$(eucaconfdir)/nc-hooks
++ @$(INSTALL) -m 0644 VERSION $(DESTDIR)$(eucadatadir)/eucalyptus-version
+ @$(INSTALL) -d $(DESTDIR)$(etcdir)/init.d
+- @$(INSTALL) -d $(DESTDIR)$(vardir)/run/eucalyptus/net
+- @$(INSTALL) -d $(DESTDIR)$(vardir)/lib/eucalyptus/keys
+- @$(INSTALL) -d $(DESTDIR)$(vardir)/lib/eucalyptus/CC
+- @$(INSTALL) -d $(DESTDIR)$(vardir)/log/eucalyptus
+- @$(INSTALL) -d $(DESTDIR)$(datarootdir)/eucalyptus
+- @$(INSTALL) -d $(DESTDIR)$(datarootdir)/eucalyptus/doc
+- @$(INSTALL) -d $(DESTDIR)$(usrdir)/sbin
+- @$(INSTALL) -d $(DESTDIR)$(usrdir)/lib/eucalyptus
++ @$(INSTALL) -d $(DESTDIR)$(eucarundir)/net
++ @$(INSTALL) -d $(DESTDIR)$(eucastatedir)/keys
++ @$(INSTALL) -d $(DESTDIR)$(eucastatedir)/CC
++ @$(INSTALL) -d $(DESTDIR)$(eucalogdir)
++ @$(INSTALL) -d $(DESTDIR)$(eucadatadir)
++ @$(INSTALL) -d $(DESTDIR)$(eucadocdir)
++ @$(INSTALL) -d $(DESTDIR)$(eucasbindir)
++ @$(INSTALL) -d $(DESTDIR)$(eucalibdir)
+ @$(INSTALL) -d $(DESTDIR)$(etcdir)/bash_completion.d
+ @for subdir in $(SUBDIRS); do \
+ (cd $$subdir && $(MAKE) $@) || exit $$? ; done
+
+ uninstall:
+- @$(RM) -f $(DESTDIR)$(etcdir)/eucalyptus/eucalyptus-version
++ @$(RM) -f $(DESTDIR)$(eucadatadir)/eucalyptus-version
+ @for subdir in $(SUBDIRS); do \
+ (cd $$subdir && $(MAKE) $@) || exit $$? ; done
+
+diff --git a/clc/Makefile b/clc/Makefile
+index ffa9c7c..1e7e887 100644
+--- a/clc/Makefile
++++ b/clc/Makefile
+@@ -82,8 +82,8 @@ deploy: install
+
+ uninstall:
+ make -C eucadmin uninstall
+- $(RM) -rf $(DESTDIR)$(etcdir)/eucalyptus/cloud.d
+- $(RM) -rf $(DESTDIR)$(datarootdir)/eucalyptus/*jar
++ $(RM) -rf $(DESTDIR)$(eucaconfdir)/cloud.d
++ $(RM) -rf $(DESTDIR)$(eucadatadir)/*jar
+ $(RM) -rf $(DESTDIR)$(vardir)/eucalyptus/webapps
+
+ # cleaning up after run-test currently requires a few iterations of:
+diff --git a/clc/modules/bootstrap/src/main/native/Makefile b/clc/modules/bootstrap/src/main/native/Makefile
+index 83e2880..fb504e8 100644
+--- a/clc/modules/bootstrap/src/main/native/Makefile
++++ b/clc/modules/bootstrap/src/main/native/Makefile
+@@ -37,7 +37,7 @@ OBJS = eucalyptus-bootstrap.o eucalyptus-opts.o
+ all: eucalyptus-cloud
+ build: eucalyptus-cloud
+ .c.o:
+- $(CC) $(CFLAGS) -c $< -o $@
++ $(CC) $(CFLAGS) $(CPPFLAGS) -c $< -o $@
+
+ eucalyptus-cloud: eucalyptus-opts.h $(OBJS)
+ $(LDCMD) $(OBJS) -o eucalyptus-cloud $(LDFLAGS)
+@@ -48,8 +48,8 @@ eucalyptus-opts.h:
+ gengetopt --input=arguments.ggo --file-name=eucalyptus-opts --func-name=arguments --arg-struct-name=eucalyptus_opts
+
+ install: eucalyptus-cloud
+- $(INSTALL) -d $(DESTDIR)$(sbindir)
+- $(INSTALL) -m 0755 eucalyptus-cloud $(DESTDIR)$(sbindir)/eucalyptus-cloud
++ $(INSTALL) -d $(DESTDIR)$(eucasbindir)
++ $(INSTALL) -m 0755 eucalyptus-cloud $(DESTDIR)$(eucasbindir)/eucalyptus-cloud
+
+ clean:
+ @$(RM) -f $(OBJS) eucalyptus-cloud
+@@ -58,4 +58,4 @@ distclean: clean
+ @$(RM) -f $(OBJS) eucalyptus-cloud arguments.ggo
+
+ uninstall:
+- @$(RM) -f $(DESTDIR)$(sbindir)/eucalyptus-cloud
++ @$(RM) -f $(DESTDIR)$(eucasbindir)/eucalyptus-cloud
+diff --git a/clc/modules/storage-controller/native/Makefile b/clc/modules/storage-controller/native/Makefile
+index 78bd451..8e18b14 100644
+--- a/clc/modules/storage-controller/native/Makefile
++++ b/clc/modules/storage-controller/native/Makefile
+@@ -11,11 +11,11 @@ WARN=-Wall -Wno-unused-variable
+ all: $(LIBDIR)/$(LVM2_SO)
+
+ .c.o:
+- gcc -c $(WARN) $(CFLAGS) $<
++ gcc -c $(WARN) $(CFLAGS) $(CPPFLAGS) $<
+
+ $(LIBDIR)/$(LVM2_SO):
+ mkdir -p $(LIBDIR)
+- gcc -shared $(CFLAGS) -o $(LIBDIR)/$(LVM2_SO) *.c
++ gcc -shared $(CFLAGS) $(CPPFLAGS) -o $(LIBDIR)/$(LVM2_SO) *.c
+
+ clean:
+ rm -rf $(LIBDIR)
+@@ -24,8 +24,8 @@ clean:
+ distclean: clean
+
+ install:
+- mkdir -p $(DESTDIR)$(EUCALYPTUS)/usr/lib/eucalyptus/
+- cp $(LIBDIR)/$(LVM2_SO) $(DESTDIR)$(EUCALYPTUS)/usr/lib/eucalyptus/
++ mkdir -p $(DESTDIR)$(eucalibdir)
++ cp $(LIBDIR)/$(LVM2_SO) $(DESTDIR)$(eucalibdir)
+
+ uninstall:
+- rm -r $(DESTDIR)$(EUCALYPTUS)/usr/lib/eucalyptus/$(LVM2_SO)
++ rm -r $(DESTDIR)$(eucalibdir)/$(LVM2_SO)
+diff --git a/cluster/Makefile b/cluster/Makefile
+index b6a68aa..c8694df 100644
+--- a/cluster/Makefile
++++ b/cluster/Makefile
+@@ -52,7 +52,7 @@ generated/stubs: $(CCWSDL) $(NCWSDL)
+ @echo Stubs generated.
+
+ .c.o:
+- $(CC) -c $(CFLAGS) $(INCLUDES) $<
++ $(CC) -c $(CFLAGS) $(CPPFLAGS) $(INCLUDES) $<
+
+ ../node/client-marshal-fake.o:
+ make -C ../node fake
+@@ -114,10 +114,10 @@ distclean: clean
+ rm -rf generated cc-client-policy.xml
+
+ install: deploy
+- @$(INSTALL) -m 0555 $(SHUTDOWNCC) $(DESTDIR)$(usrdir)/lib/eucalyptus
+- @$(INSTALL) cc-client-policy.xml $(DESTDIR)$(vardir)/lib/eucalyptus/keys/
++ @$(INSTALL) -m 0555 $(SHUTDOWNCC) $(DESTDIR)$(eucalibexecdir)
++ @$(INSTALL) cc-client-policy.xml $(DESTDIR)$(eucastatedir)/keys/
+
+ uninstall:
+ # @$(RM) -f $(DESTDIR)$(sbindir)/$(SHUTDOWNCC)
+- @$(RM) -f $(DESTDIR)$(vardir)/lib/eucalyptus/keys/cc-client-policy.xml
++ @$(RM) -f $(DESTDIR)$(eucastatedir)/keys/cc-client-policy.xml
+ @$(RM) -rf $(DESTDIR)$(AXIS2C_SERVICES)/$(SERVICE_NAME)
+diff --git a/gatherlog/Makefile b/gatherlog/Makefile
+index e479095..bc4145e 100644
+--- a/gatherlog/Makefile
++++ b/gatherlog/Makefile
+@@ -34,7 +34,7 @@ generated/stubs: $(GLWSDL)
+ @echo Stubs generated.
+
+ .c.o:
+- $(CC) -c $(CFLAGS) $(INCLUDES) $<
++ $(CC) -c $(CFLAGS) $(CPPFLAGS) $(INCLUDES) $<
+
+ server: $(SERVICE_SO)
+
+diff --git a/net/Makefile b/net/Makefile
+index b68d722..985dfc4 100644
+--- a/net/Makefile
++++ b/net/Makefile
+@@ -9,7 +9,7 @@ all: vnetwork.o
+ build: all
+
+ .c.o:
+- $(CC) -c $(CFLAGS) $(INCLUDES) $<
++ $(CC) -c $(CFLAGS) $(CPPFLAGS) $(INCLUDES) $<
+
+ clean:
+ rm -rf *~ *.o
+diff --git a/node/Makefile b/node/Makefile
+index 8eb5146..a94b011 100644
+--- a/node/Makefile
++++ b/node/Makefile
+@@ -48,7 +48,7 @@ generated/stubs: $(NCWSDL)
+ @echo Stubs generated.
+
+ .c.o:
+- $(CC) $(BUILD_ID) -c $(CFLAGS) `xslt-config --cflags` $(INCLUDES) $<
++ $(CC) $(BUILD_ID) -c $(CFLAGS) $(CPPFLAGS) `xslt-config --cflags` $(INCLUDES) $<
+
+ server: $(SERVICE_SO)
+
+@@ -98,24 +98,24 @@ client: $(CLIENT) $(CLIENT)_local
+ fake: $(CLIENT)_fake
+
+ $(CLIENT): generated/stubs $(STORAGE_OBJS) ../util/misc.o ../util/data.o client-marshal-adb.o client-marshal-local.o $(CLIENT).c ../storage/vbr.o
+- $(CC) -o $(CLIENT) $(CFLAGS) $(INCLUDES) $(NC_LIBS) generated/adb_*.o generated/axis2_stub_*.o $(AXIOM_LIBS) client-marshal-adb.o ../util/*.o $(AXIOM_LIBS) $(OPENSSL_LIBS) ../storage/diskutil.o ../net/*.o -lm $(CLIENT).c ../storage/http.o -lcurl ../storage/storage-windows.o
++ $(CC) -o $(CLIENT) $(CFLAGS) $(CPPFLAGS) $(INCLUDES) $(NC_LIBS) generated/adb_*.o generated/axis2_stub_*.o $(AXIOM_LIBS) client-marshal-adb.o ../util/*.o $(AXIOM_LIBS) $(OPENSSL_LIBS) ../storage/diskutil.o ../net/*.o -lm $(CLIENT).c ../storage/http.o -lcurl ../storage/storage-windows.o
+
+ $(CLIENT)_fake: generated/stubs $(STORAGE_OBJS) ../util/misc.o ../util/data.o client-marshal-adb.o client-marshal-local.o client-marshal-fake.o $(CLIENT).c ../storage/vbr.o
+
+ $(CLIENT)_local: generated/stubs $(STORAGE_OBJS) ../util/misc.o ../util/data.o client-marshal-adb.o client-marshal-local.o handlers.o $(NC_HANDLERS) $(CLIENT).c ../util/euca_auth.o ../storage/vbr.o
+- $(CC) -o $(CLIENT)_local $(INCLUDES) $(CFLAGS) client-marshal-local.o ../util/*.o $(STORAGE_OBJS) ../net/*.o handlers.o $(NC_HANDLERS) $(CLIENT).c $(NC_LIBS) ../storage/http.o ../storage/storage-windows.o
++ $(CC) -o $(CLIENT)_local $(INCLUDES) $(CFLAGS) $(CPPFLAGS) client-marshal-local.o ../util/*.o $(STORAGE_OBJS) ../net/*.o handlers.o $(NC_HANDLERS) $(CLIENT).c $(NC_LIBS) ../storage/http.o ../storage/storage-windows.o
+
+ test: test.c ../util/misc.o ../util/data.o
+- $(CC) $(CFLAGS) $(INCLUDES) $(NC_LIBS) -o test test.c ../util/misc.o ../storage/diskutil.o ../util/data.o ../util/euca_auth.o $(OPENSSL_LIBS) ../util/ipc.o
++ $(CC) $(CFLAGS) $(CPPFLAGS) $(INCLUDES) $(NC_LIBS) -o test test.c ../util/misc.o ../storage/diskutil.o ../util/data.o ../util/euca_auth.o $(OPENSSL_LIBS) ../util/ipc.o
+
+ test_nc: test_nc.c ../util/misc.o ../storage/diskutil.o
+- $(CC) $(CFLAGS) $(INCLUDES) $(NC_LIBS) -o test_nc -lvirt test_nc.c -lvirt ../util/misc.o ../storage/diskutil.o ../util/euca_auth.o $(OPENSSL_LIBS) ../util/ipc.o
++ $(CC) $(CFLAGS) $(CPPFLAGS) $(INCLUDES) $(NC_LIBS) -o test_nc -lvirt test_nc.c -lvirt ../util/misc.o ../storage/diskutil.o ../util/euca_auth.o $(OPENSSL_LIBS) ../util/ipc.o
+
+ test_hooks: hooks.c ../util/misc.o ../storage/diskutil.o
+- $(CC) $(CFLAGS) $(INCLUDES) $(NC_LIBS) -o test_hooks -D__STANDALONE hooks.c ../util/misc.o ../storage/diskutil.o ../util/euca_auth.o $(OPENSSL_LIBS) ../util/ipc.o
++ $(CC) $(CFLAGS) $(CPPFLAGS) $(INCLUDES) $(NC_LIBS) -o test_hooks -D__STANDALONE hooks.c ../util/misc.o ../storage/diskutil.o ../util/euca_auth.o $(OPENSSL_LIBS) ../util/ipc.o
+
+ test_xml: xml.c
+- $(CC) $(CFLAGS) $(INCLUDES) $(NC_LIBS) `xslt-config --cflags` -o test_xml -D__STANDALONE xml.c ../util/misc.o ../storage/diskutil.o ../util/euca_auth.o $(OPENSSL_LIBS) ../util/ipc.o
++ $(CC) $(CFLAGS) $(CPPFLAGS) $(INCLUDES) $(NC_LIBS) `xslt-config --cflags` -o test_xml -D__STANDALONE xml.c ../util/misc.o ../storage/diskutil.o ../util/euca_auth.o $(OPENSSL_LIBS) ../util/ipc.o
+
+ deploy:
+ $(INSTALL) -d $(DESTDIR)$(AXIS2C_SERVICES)/$(SERVICE_NAME)/
+@@ -141,11 +141,11 @@ distclean:
+ rm -rf generated $(SERVICE_SO) *.o $(CLIENT) $(CLIENT)_local nc-client-policy.xml test test_nc test_hooks *~* *#*
+
+ install: deploy
+- $(INSTALL) nc-client-policy.xml $(DESTDIR)$(vardir)/lib/eucalyptus/keys/
+- $(INSTALL) -m 0755 test_nc $(DESTDIR)$(sbindir)/euca_test_nc
++ $(INSTALL) nc-client-policy.xml $(DESTDIR)$(eucastatedir)/keys/
++ $(INSTALL) -m 0755 test_nc $(DESTDIR)$(eucasbindir)/euca_test_nc
+
+ uninstall:
+- $(RM) -f $(DESTDIR)$(vardir)/lib/eucalyptus/keys/nc-client-policy.xml
+- $(RM) -f $(DESTDIR)$(sbindir)/euca_test_nc
++ $(RM) -f $(DESTDIR)$(eucastatedir)/keys/nc-client-policy.xml
++ $(RM) -f $(DESTDIR)$(eucasbindir)/euca_test_nc
+ $(RM) -rf $(DESTDIR)$(AXIS2C_SERVICES)/$(SERVICE_NAME)
+
+diff --git a/storage/Makefile b/storage/Makefile
+index b177a8e..b7485c2 100644
+--- a/storage/Makefile
++++ b/storage/Makefile
+@@ -18,22 +18,22 @@ all: vbr.o backing.o storage-windows.o walrus.o diskutil.o map.o Wclient euca-bl
+ build: all
+
+ euca-blobs: Makefile blobstore.c blobstore.h $(EUCA_BLOBS_OBJS)
+- $(CC) $(CFLAGS) $(INCLUDES) -D_EUCA_BLOBS blobstore.c -o euca-blobs $(EUCA_BLOBS_OBJS) $(STORAGE_LIBS) $(EFENCE)
++ $(CC) $(CFLAGS) $(CPPFLAGS) $(INCLUDES) -D_EUCA_BLOBS blobstore.c -o euca-blobs $(EUCA_BLOBS_OBJS) $(STORAGE_LIBS) $(EFENCE)
+
+ Wclient: Makefile Wclient.c $(WCLIENT_OBJS)
+- $(CC) $(CFLAGS) $(INCLUDES) Wclient.c -o Wclient $(WCLIENT_OBJS) $(STORAGE_LIBS) $(EFENCE)
++ $(CC) $(CFLAGS) $(CPPFLAGS) $(INCLUDES) Wclient.c -o Wclient $(WCLIENT_OBJS) $(STORAGE_LIBS) $(EFENCE)
+
+ test_blobstore: blobstore.o $(TEST_BLOB_OBJS)
+- $(CC) -g -rdynamic $(CFLAGS) $(INCLUDES) -D_UNIT_TEST blobstore.c -o test_blobstore $(TEST_BLOB_OBJS) $(STORAGE_LIBS) $(EFENCE)
++ $(CC) -g -rdynamic $(CFLAGS) $(CPPFLAGS) $(INCLUDES) -D_UNIT_TEST blobstore.c -o test_blobstore $(TEST_BLOB_OBJS) $(STORAGE_LIBS) $(EFENCE)
+
+ test_vbr: vbr.o $(TEST_VBR_OBJS)
+- $(CC) -g -rdynamic $(CFLAGS) $(INCLUDES) -D_UNIT_TEST vbr.c -o test_vbr $(TEST_VBR_OBJS) $(STORAGE_LIBS) $(EFENCE)
++ $(CC) -g -rdynamic $(CFLAGS) $(CPPFLAGS) $(INCLUDES) -D_UNIT_TEST vbr.c -o test_vbr $(TEST_VBR_OBJS) $(STORAGE_LIBS) $(EFENCE)
+
+ test_url: http.c
+ $(CC) -D_UNIT_TEST -o test_url http.c
+
+ %.o: %.c %.h
+- $(CC) -c $(CFLAGS) $(INCLUDES) $<
++ $(CC) -c $(CFLAGS) $(CPPFLAGS) $(INCLUDES) $<
+
+ ../util/ipc.o: ../util/ipc.c ../util/ipc.h ../util/eucalyptus.h
+ make -C ../util
+diff --git a/tools/Makefile b/tools/Makefile
+index 859706c..882e8e7 100644
+--- a/tools/Makefile
++++ b/tools/Makefile
+@@ -18,71 +18,54 @@ distclean:
+ @rm -rf eucalyptus eucalyptus-cloud eucalyptus-walrus eucalyptus-sc
+
+ install: build
+- @if test -e /etc/init.d/eucalyptus ; then \
+- mv /etc/init.d/eucalyptus /etc/init.d/eucalyptus.old ; \
++ @if test -e $(initddir)/eucalyptus ; then \
++ mv $(initddir)/eucalyptus $(initddir)/eucalyptus.old ; \
+ echo "Moving away old init.d script"; fi
+- @if test -e $(DESTDIR)$(etcdir)/init.d/eucalyptus ; then \
+- mv $(DESTDIR)$(etcdir)/init.d/eucalyptus $(DESTDIR)$(etcdir)/init.d/eucalyptus.old ; fi
+- @$(INSTALL) -m 755 eucalyptus-cloud $(DESTDIR)$(etcdir)/init.d
+- @$(INSTALL) -m 755 eucalyptus-nc $(DESTDIR)$(etcdir)/init.d
+- @$(INSTALL) -m 755 eucalyptus-cc $(DESTDIR)$(etcdir)/init.d
+- @$(INSTALL) -m 644 httpd.conf $(DESTDIR)$(etcdir)/eucalyptus
+- @if test -e $(DESTDIR)$(etcdir)/eucalyptus/eucalyptus.conf ; then \
+- cp $(DESTDIR)$(etcdir)/eucalyptus/eucalyptus.conf $(DESTDIR)$(etcdir)/eucalyptus/eucalyptus.conf.old ; fi
+- @$(INSTALL) -m 644 eucalyptus.conf $(DESTDIR)$(etcdir)/eucalyptus
+- @$(INSTALL) -m 644 vtunall.conf.template $(DESTDIR)$(etcdir)/eucalyptus
+- @$(INSTALL) -m 755 add_key.pl $(DESTDIR)$(datarootdir)/eucalyptus
+- @$(INSTALL) -m 755 gen_libvirt_xml $(DESTDIR)$(datarootdir)/eucalyptus
+- @$(INSTALL) -m 755 gen_kvm_libvirt_xml $(DESTDIR)$(datarootdir)/eucalyptus
+- @$(INSTALL) -m 755 detach.pl $(DESTDIR)$(datarootdir)/eucalyptus
+- @$(INSTALL) -m 755 partition2disk $(DESTDIR)$(datarootdir)/eucalyptus
+- @$(INSTALL) -m 755 get_xen_info $(DESTDIR)$(datarootdir)/eucalyptus/get_xen_info
+- @$(INSTALL) -m 755 get_sys_info $(DESTDIR)$(datarootdir)/eucalyptus/get_sys_info
+- @$(INSTALL) -m 755 euca_ipt $(DESTDIR)$(datarootdir)/eucalyptus
+- @$(INSTALL) -m 755 euca_upgrade $(DESTDIR)$(datarootdir)/eucalyptus
+- @$(INSTALL) -m 755 populate_arp.pl $(DESTDIR)$(datarootdir)/eucalyptus
+-# @$(INSTALL) -m 755 euca_conf $(DESTDIR)$(sbindir)
++ @if test -e $(DESTDIR)$(initddir)/eucalyptus ; then \
++ mv $(DESTDIR)$(initddir)/eucalyptus $(DESTDIR)$(initddir)/eucalyptus.old ; fi
++ @$(INSTALL) -m 755 eucalyptus-cloud $(DESTDIR)$(initddir)
++ @$(INSTALL) -m 755 eucalyptus-nc $(DESTDIR)$(initddir)
++ @$(INSTALL) -m 755 eucalyptus-cc $(DESTDIR)$(initddir)
++ @$(INSTALL) -m 644 httpd.conf $(DESTDIR)$(eucaconfdir)
++ @if test -e $(DESTDIR)$(eucaconfdir)/eucalyptus.conf ; then \
++ cp $(DESTDIR)$(eucaconfdir)/eucalyptus.conf $(DESTDIR)$(eucaconfdir)/eucalyptus.conf.old ; fi
++ @$(INSTALL) -m 644 eucalyptus.conf $(DESTDIR)$(eucaconfdir)
++ @$(INSTALL) -m 644 vtunall.conf.template $(DESTDIR)$(eucadatadir)
++ @$(INSTALL) -d 755 $(DESTDIR)$(eucahelperdir)
++ @for x in add_key.pl gen_libvirt_xml gen_kvm_libvirt_xml detach.pl partition2disk \
++ get_xen_info get_sys_info euca_ipt euca_upgrade populate_arp.pl \
++ connect_iscsitarget.pl connect_iscsitarget_sc.pl disconnect_iscsitarget.pl \
++ disconnect_iscsitarget_sc.pl get_iscsitarget.pl floppy dynserv.pl \
++ getstats.pl create-loop-devices; \
++ do $(INSTALL) -m 755 $$x $(DESTDIR)$(eucahelperdir); done
++# @$(INSTALL) -m 755 euca_conf $(DESTDIR)$(eucasbindir)
+ # -$(INSTALL) -m 755 euca_conf.complete $(DESTDIR)$(etcdir)/bash_completion.d/euca_conf
+-# @$(INSTALL) -m 755 eucanetd $(DESTDIR)$(sbindir)
+- @$(INSTALL) -m 755 euca_sync_key $(DESTDIR)$(sbindir)
+- @$(INSTALL) -m 755 connect_iscsitarget.pl $(DESTDIR)$(datarootdir)/eucalyptus
+- @$(INSTALL) -m 755 connect_iscsitarget_sc.pl $(DESTDIR)$(datarootdir)/eucalyptus
+- @$(INSTALL) -m 755 disconnect_iscsitarget.pl $(DESTDIR)$(datarootdir)/eucalyptus
+- @$(INSTALL) -m 755 disconnect_iscsitarget_sc.pl $(DESTDIR)$(datarootdir)/eucalyptus
+- @$(INSTALL) -m 755 get_iscsitarget.pl $(DESTDIR)$(datarootdir)/eucalyptus
+- @$(INSTALL) -m 644 floppy $(DESTDIR)$(datarootdir)/eucalyptus
+- @$(INSTALL) -m 755 dynserv.pl $(DESTDIR)$(datarootdir)/eucalyptus
+- @$(INSTALL) -m 644 libvirt-kvm-windows-example.xml $(DESTDIR)$(datarootdir)/eucalyptus/doc/
+- @$(INSTALL) -m 644 libvirt-xen-windows-example.xml $(DESTDIR)$(datarootdir)/eucalyptus/doc/
+- @$(INSTALL) -m 755 getstats.pl $(DESTDIR)$(datarootdir)/eucalyptus
+- @$(INSTALL) -m 755 euca-lictool $(DESTDIR)$(sbindir)
+- @$(INSTALL) -m 755 lic_template $(DESTDIR)$(datarootdir)/eucalyptus
+- @$(INSTALL) -m 755 lic_default $(DESTDIR)$(datarootdir)/eucalyptus
+- @$(INSTALL) -m 644 libvirt.xsl $(DESTDIR)$(etcdir)/eucalyptus
+- @$(INSTALL) -m 755 create-loop-devices $(DESTDIR)$(datarootdir)/eucalyptus
+- @$(INSTALL) -m 644 nc-hooks/example.sh $(DESTDIR)$(etcdir)/eucalyptus/nc-hooks/
++# @$(INSTALL) -m 755 eucanetd $(DESTDIR)$(eucasbindir)
++ @$(INSTALL) -m 755 euca_sync_key $(DESTDIR)$(eucasbindir)
++ @$(INSTALL) -m 644 libvirt-kvm-windows-example.xml $(DESTDIR)$(eucadocdir)
++ @$(INSTALL) -m 644 libvirt-xen-windows-example.xml $(DESTDIR)$(eucadocdir)
++ @$(INSTALL) -m 755 euca-lictool $(DESTDIR)$(eucasbindir)
++ @$(INSTALL) -m 644 libvirt.xsl $(DESTDIR)$(eucaconfdir)
++ @$(INSTALL) -m 644 nc-hooks/example.sh $(DESTDIR)$(eucaconfdir)/nc-hooks/
++ @$(INSTALL) -m 644 lic_template $(DESTDIR)$(eucadatadir)
++ @$(INSTALL) -m 644 lic_default $(DESTDIR)$(eucadatadir)
+
+ uninstall:
+- @$(RM) -f $(DESTDIR)$(etcdir)/init.d/eucalyptus-cloud
+- @$(RM) -f $(DESTDIR)$(etcdir)/init.d/eucalyptus-nc
+- @$(RM) -f $(DESTDIR)$(etcdir)/init.d/eucalyptus-cc
+- @$(RM) -f $(DESTDIR)$(etcdir)/eucalyptus/httpd*
+- @$(RM) -f $(DESTDIR)$(etcdir)/eucalyptus/eucalyptus.conf
+- @$(RM) -f $(DESTDIR)$(etcdir)/eucalyptus/vtunall.conf.template
+- @$(RM) -f $(DESTDIR)$(datarootdir)/eucalyptus/add_key.pl
+- @$(RM) -f $(DESTDIR)$(datarootdir)/eucalyptus/gen_libvirt_xml
+- @$(RM) -f $(DESTDIR)$(datarootdir)/eucalyptus/gen_kvm_libvirt_xml
+- @$(RM) -f $(DESTDIR)$(datarootdir)/eucalyptus/detach.pl
+- @$(RM) -f $(DESTDIR)$(datarootdir)/eucalyptus/partition2disk
+- @$(RM) -f $(DESTDIR)$(datarootdir)/eucalyptus/get_xen_info
+- @$(RM) -f $(DESTDIR)$(datarootdir)/eucalyptus/get_sys_info
+- @$(RM) -f $(DESTDIR)$(datarootdir)/eucalyptus/euca_ipt
+- @$(RM) -f $(DESTDIR)$(datarootdir)/eucalyptus/euca_upgrade
+- @$(RM) -f $(DESTDIR)$(datarootdir)/eucalyptus/populate_arp.pl
+- @$(RM) -f $(DESTDIR)$(sbindir)/euca_conf
++ @for x in eucalyptus-cloud eucalyptus-nc eucalyptus-cc; \
++ do @$(RM) -f $(DESTDIR)$(initddir)/$$x; done
++ @$(RM) -f $(DESTDIR)$(eucaconfdir)/httpd*
++ @$(RM) -f $(DESTDIR)$(eucaconfdir)/eucalyptus.conf
++ @$(RM) -f $(DESTDIR)$(eucadatadir)/vtunall.conf.template
++# XXX: Need root privs
+ @$(RM) -f $(DESTDIR)$(etcdir)/bash_completion.d/euca_conf
+- @$(RM) -f $(DESTDIR)$(sbindir)/euca_sync_key
+- @$(RM) -f $(DESTDIR)$(datarootdir)/eucalyptus/lic_template
+- @$(RM) -f $(DESTDIR)$(datarootdir)/eucalyptus/lic_default
+- @$(RM) -f $(DESTDIR)$(sbindir)/euca-lictool
+- @$(RM) -f $(DESTDIR)$(datarootdir)/eucalyptus/create-loop-devices
++ @for x in add_key.pl gen_libvirt_xml gen_kvm_libvirt_xml detach.pl partition2disk \
++ get_xen_info get_sys_info euca_ipt euca_upgrade populate_arp.pl \
++ connect_iscsitarget.pl connect_iscsitarget_sc.pl disconnect_iscsitarget.pl \
++ disconnect_iscsitarget_sc.pl get_iscsitarget.pl floppy dynserv.pl \
++ getstats.pl create-loop-devices; \
++ do $(RM) -f $(DESTDIR)$(eucahelperdir)/$$x; done
++ @$(RM) -f $(DESTDIR)$(eucasbindir)/euca_conf
++ @$(RM) -f $(DESTDIR)$(eucasbindir)/euca_sync_key
++ @$(RM) -f $(DESTDIR)$(eucasbindir)/euca-lictool
++ @$(RM) -f $(DESTDIR)$(eucadatadir)/lic_template
++ @$(RM) -f $(DESTDIR)$(eucadatadir)/lic_default
+diff --git a/util/Makefile b/util/Makefile
+index 8571826..dda0681 100644
+--- a/util/Makefile
++++ b/util/Makefile
+@@ -9,22 +9,22 @@ all: misc.o hash.o data.o euca_auth.o euca_axis.o ipc.o windows-bundle.o euca_ro
+ build: all
+
+ euca_rootwrap: euca_rootwrap.c
+- $(CC) $(CFLAGS) $(INCLUDES) -o euca_rootwrap euca_rootwrap.c
++ $(CC) $(CFLAGS) $(CPPFLAGS) $(INCLUDES) -o euca_rootwrap euca_rootwrap.c
+
+ euca_mountwrap: euca_mountwrap.c
+- $(CC) $(CFLAGS) $(INCLUDES) -o euca_mountwrap euca_mountwrap.c
++ $(CC) $(CFLAGS) $(CPPFLAGS) $(INCLUDES) -o euca_mountwrap euca_mountwrap.c
+
+ test: test.c ipc.o misc.o
+- $(CC) $(CFLAGS) $(INCLUDES) -o test test.c ipc.o misc.o data.o -lpthread $(LIBS) $(LDFLAGS)
++ $(CC) $(CFLAGS) $(CPPFLAGS) $(INCLUDES) -o test test.c ipc.o misc.o data.o -lpthread $(LIBS) $(LDFLAGS)
+
+ test_misc: misc.c ../storage/diskutil.o ipc.o euca_auth.o
+- $(CC) $(CFLAGS) $(INCLUDES) -D_UNIT_TEST -o test_misc misc.c ../storage/diskutil.o ipc.o euca_auth.o -lpthread -lcrypto $(LIBS) $(LDFLAGS)
++ $(CC) $(CFLAGS) $(CPPFLAGS) $(INCLUDES) -D_UNIT_TEST -o test_misc misc.c ../storage/diskutil.o ipc.o euca_auth.o -lpthread -lcrypto $(LIBS) $(LDFLAGS)
+
+ ../storage/diskutil.o:
+ make -C ../storage
+
+ .c.o: $@
+- $(CC) -c -std=gnu99 $(CFLAGS) $(INCLUDES) $<
++ $(CC) -c -std=gnu99 $(CFLAGS) $(CPPFLAGS) $(INCLUDES) $<
+
+ clean:
+ rm -rf *~ *.o test test_misc euca_rootwrap euca_mountwrap
+@@ -33,12 +33,13 @@ distclean:
+ rm -rf config.h
+
+ install:
+- @$(INSTALL) -m 0755 euca_rootwrap $(DESTDIR)$(usrdir)/lib/eucalyptus/
+- @$(INSTALL) -m 0755 euca_mountwrap $(DESTDIR)$(usrdir)/lib/eucalyptus/
++ @$(INSTALL) -d -m 0755 $(DESTDIR)$(eucalibexecdir)
++ @$(INSTALL) -m 0755 euca_rootwrap $(DESTDIR)$(eucalibexecdir)/
++ @$(INSTALL) -m 0755 euca_mountwrap $(DESTDIR)$(eucalibexecdir)/
+
+ deploy:
+
+ uninstall:
+- @$(RM) -f $(DESTDIR)$(usrdir)/lib/eucalyptus/euca_rootwrap
+- @$(RM) -f $(DESTDIR)$(usrdir)/lib/eucalyptus/euca_mountwrap
++ @$(RM) -f $(DESTDIR)$(eucalibexecdir)/euca_rootwrap
++ @$(RM) -f $(DESTDIR)$(eucalibexecdir)/euca_mountwrap
+
+diff --git a/util/eucalyptus-config.h.in b/util/eucalyptus-config.h.in
+index 88a131c..643498f 100644
+--- a/util/eucalyptus-config.h.in
++++ b/util/eucalyptus-config.h.in
+@@ -8,6 +8,9 @@
+ /* Current version */
+ #undef EUCA_VERSION
+
++/* location for rootwrap / mountwrap
++#undef EUCALYPTUS_LIBEXEC_DIR
++
+ /* headers on the system */
+
+ /* Define if you have standards headers */
diff --git a/eucalyptus-disable-gwt-in-buildxml.patch b/eucalyptus-disable-gwt-in-buildxml.patch
new file mode 100644
index 0000000..3249ead
--- /dev/null
+++ b/eucalyptus-disable-gwt-in-buildxml.patch
@@ -0,0 +1,28 @@
+--- a/clc/modules/www/build.xml 2012-06-20 06:21:42.000000000 +0000
++++ b/clc/modules/www/build.xml 2012-06-29 11:59:29.000000000 +0000
+@@ -123,7 +123,7 @@
+ <target name="compile-src">
+ <mkdir dir="${build.dir}"/>
+ <mkdir dir="${test.dir}"/>
+- <javac deprecation="false" srcdir="${src.dir}" destdir="${build.dir}" classpathref="gwtclasspath" failonerror="true" debug="true" target="1.5" />
++ <javac deprecation="false" srcdir="${src.dir}" excludes="com/eucalyptus/webui/**,com/eucalyptus/www/CommandServlet.java,com/eucalyptus/www/LoginServlet.java,com/eucalyptus/www/ReportServlet.java" destdir="${build.dir}" classpathref="gwtclasspath" failonerror="true" debug="true" target="1.5" />
+ </target>
+
+ <target name="clean">
+@@ -138,13 +138,15 @@
+ <delete dir="${gwt.war.build.dir}" />
+ <mkdir dir="${gwt.war.build.dir}" />
+ <mkdir dir="${gwt.war.dir}" />
++ <!--
+ <java classpathref="gwtcompilerclasspath" fork="true" failonerror="true" classname="com.google.gwt.dev.Compiler">
+ <jvmarg value="-Xmx1024m" />
+ <jvmarg value="-Xss1024k" />
+ <arg line="-war ${gwt.war.build.dir}" />
+ <arg line="com.eucalyptus.webui.EucalyptusWebInterface" />
+ </java>
+- <war destfile="${gwt.war}" webxml="${conf.dir}/gwt-web.xml" basedir="${gwt.war.build.dir}/${gwt.module.rename}/" />
++ -->
++ <war destfile="${gwt.war}" webxml="${conf.dir}/gwt-web.xml" basedir="${gwt.war.build.dir}/" />
+ </target>
+
+ <target name="compile-gwt-debug" depends="check-src" unless="gwtc.notRequired">
diff --git a/eucalyptus-disable-gwt-in-makefile.patch b/eucalyptus-disable-gwt-in-makefile.patch
new file mode 100644
index 0000000..7e8bbd5
--- /dev/null
+++ b/eucalyptus-disable-gwt-in-makefile.patch
@@ -0,0 +1,28 @@
+--- a/clc/Makefile.orig 2012-06-29 11:29:29.000000000 +0000
++++ b/clc/Makefile 2012-06-29 11:30:44.000000000 +0000
+@@ -22,15 +22,16 @@
+ @echo "Copied defaults to ${web_prop_dir}/eucalyptus-web.properties"
+
+ update_theme:
+- @if test -d ${theme_dir}/${euca_theme} ; then \
+- if [ "`readlink ${theme_dir}/active`" != "${euca_theme}" ] ; then \
+- echo "Making '${euca_theme}' the active theme" ; \
+- rm -f ${theme_dir}/active ; \
+- ln -sf ${euca_theme} ${theme_dir}/active ; \
+- fi \
+- else \
+- echo "Theme ${theme_dir}/${euca_theme} is not found!"; exit 1; \
+- fi \
++ echo "Disabling update_theme as GWT is not being used."
++ #@if test -d ${theme_dir}/${euca_theme} ; then \
++ # if [ "`readlink ${theme_dir}/active`" != "${euca_theme}" ] ; then \
++ # echo "Making '${euca_theme}' the active theme" ; \
++ # rm -f ${theme_dir}/active ; \
++ # ln -sf ${euca_theme} ${theme_dir}/active ; \
++ # fi \
++ #else \
++ # echo "Theme ${theme_dir}/${euca_theme} is not found!"; exit 1; \
++ #fi \
+
+ extras: update_properties
+ @if test -n "${euca_theme}" ; then \
diff --git a/eucalyptus-disable-gwt.patch b/eucalyptus-disable-gwt.patch
new file mode 100644
index 0000000..1d2c9c3
--- /dev/null
+++ b/eucalyptus-disable-gwt.patch
@@ -0,0 +1,118 @@
+diff --git a/clc/modules/www/src/main/java/com/eucalyptus/www/X509Download.java b/clc/modules/www/src/main/java/com/eucalyptus/www/X509Download.java
+index c499c6d..d1ead20 100644
+--- a/clc/modules/www/src/main/java/com/eucalyptus/www/X509Download.java
++++ b/clc/modules/www/src/main/java/com/eucalyptus/www/X509Download.java
+@@ -95,8 +95,8 @@ import com.eucalyptus.crypto.Certs;
+ import com.eucalyptus.crypto.util.PEMFiles;
+ import com.eucalyptus.util.Internets;
+ import com.eucalyptus.ws.StackConfiguration;
+-import com.google.gwt.safehtml.shared.SafeHtmlBuilder;
+-import com.google.gwt.safehtml.shared.SafeHtmlUtils;
++//import com.google.gwt.safehtml.shared.SafeHtmlBuilder;
++//import com.google.gwt.safehtml.shared.SafeHtmlUtils;
+
+ public class X509Download extends HttpServlet {
+
+@@ -313,11 +313,13 @@ public class X509Download extends HttpServlet {
+ }
+
+ public static String getError( String message ) {
+- SafeHtmlBuilder builder = new SafeHtmlBuilder( );
+- builder.append( SafeHtmlUtils.fromTrustedString( "<html><title>Getting credentials failed</title><body><div align=\"center\"><p><h1>Getting credentails failed</h1></p><p><img src=\"themes/active/logo.png\" /></p><p><h3 style=\"font-color: red;\">" ) );
+- builder.appendEscaped( message );
+- builder.append( SafeHtmlUtils.fromTrustedString( "</h3></p></div></body></html>" ) );
+- return builder.toSafeHtml( ).asString( );
++ return "<html><title>Getting credentials failed</title><body><div align=\"center\"><p><h1>Getting credentails failed</h1></p><p><img src=\"themes/active/logo.png\" /></p><p><h3 style=\"font-color: red;\">"
++ + message + "</h3></p></div></body></html>" ;
++// SafeHtmlBuilder builder = new SafeHtmlBuilder( );
++// builder.append( SafeHtmlUtils.fromTrustedString( "<html><title>Getting credentials failed</title><body><div align=\"center\"><p><h1>Getting credentails failed</h1></p><p><img src=\"themes/active/logo.png\" /></p><p><h3 style=\"font-color: red;\">" ) );
++// builder.appendEscaped( message );
++// builder.append( SafeHtmlUtils.fromTrustedString( "</h3></p></div></body></html>" ) );
++// return builder.toSafeHtml( ).asString( );
+ }
+
+ }
+--- a/clc/modules/www/conf/gwt-web.xml 2012-06-28 19:36:09.000000000 -0700
++++ b/clc/modules/www/conf/gwt-web.xml 2012-06-28 19:37:37.000000000 -0700
+@@ -81,81 +81,15 @@
+
+ <servlet>
+ <description></description>
+- <display-name>EucalyptusService</display-name>
+- <servlet-name>EucalyptusServiceImpl</servlet-name>
+- <servlet-class>com.eucalyptus.webui.server.EucalyptusServiceImpl</servlet-class>
+- <load-on-startup>1</load-on-startup>
+- </servlet>
+-
+- <servlet>
+- <description>Executes a command within Eucalyptus</description>
+- <display-name>Command Servlet</display-name>
+- <servlet-name>CommandServlet</servlet-name>
+- <servlet-class>com.eucalyptus.www.CommandServlet</servlet-class>
+- <load-on-startup>1</load-on-startup>
+- </servlet>
+-
+- <servlet>
+- <description>New Report Generation Servlet</description>
+- <display-name>Report Servlet</display-name>
+- <servlet-name>ReportServlet</servlet-name>
+- <servlet-class>com.eucalyptus.www.ReportServlet</servlet-class>
+- <load-on-startup>1</load-on-startup>
+- </servlet>
+-
+- <servlet>
+- <description>Logs into eucalyptus and returns a session id</description>
+- <display-name>Login Servlet</display-name>
+- <servlet-name>LoginServlet</servlet-name>
+- <servlet-class>com.eucalyptus.www.LoginServlet</servlet-class>
+- <load-on-startup>1</load-on-startup>
+- </servlet>
+-
+- <servlet>
+- <description></description>
+ <display-name>X509Downloader</display-name>
+ <servlet-name>X509Download</servlet-name>
+ <servlet-class>com.eucalyptus.www.X509Download</servlet-class>
+ <load-on-startup>1</load-on-startup>
+ </servlet>
+
+- <servlet>
+- <description></description>
+- <display-name>CloudRegistration</display-name>
+- <servlet-name>CloudRegistration</servlet-name>
+- <servlet-class>com.eucalyptus.www.Registration</servlet-class>
+- <load-on-startup>1</load-on-startup>
+- </servlet>
+-
+-
+- <servlet-mapping>
+- <servlet-name>EucalyptusServiceImpl</servlet-name>
+- <url-pattern>/backend</url-pattern>
+- </servlet-mapping>
+-
+ <servlet-mapping>
+ <servlet-name>X509Download</servlet-name>
+ <url-pattern>/getX509</url-pattern>
+ </servlet-mapping>
+
+- <servlet-mapping>
+- <servlet-name>CommandServlet</servlet-name>
+- <url-pattern>/commandservlet</url-pattern>
+- </servlet-mapping>
+-
+- <servlet-mapping>
+- <servlet-name>LoginServlet</servlet-name>
+- <url-pattern>/loginservlet</url-pattern>
+- </servlet-mapping>
+-
+- <servlet-mapping>
+- <servlet-name>ReportServlet</servlet-name>
+- <url-pattern>/reportservlet</url-pattern>
+- </servlet-mapping>
+-
+- <servlet-mapping>
+- <servlet-name>CloudRegistration</servlet-name>
+- <url-pattern>/register</url-pattern>
+- </servlet-mapping>
+-
+ </web-app>
diff --git a/eucalyptus-groovy18.patch b/eucalyptus-groovy18.patch
new file mode 100644
index 0000000..24d9f15
--- /dev/null
+++ b/eucalyptus-groovy18.patch
@@ -0,0 +1,79 @@
+diff -ur eucalyptus-3.bzr1505.new/clc/modules/module-inc.xml eucalyptus-3.bzr1505/clc/modules/module-inc.xml
+--- eucalyptus-3.bzr1505.new/clc/modules/module-inc.xml 2012-02-09 03:58:11.960546598 -0500
++++ eucalyptus-3.bzr1505/clc/modules/module-inc.xml 2012-02-09 10:03:52.303521124 -0500
+@@ -118,6 +118,16 @@
+ <include name="**/*" />
+ </fileset>
+ </path>
++ <path id="srcpathjava">
++ <fileset dir="${build.dir}">
++ <include name="**/*.java" />
++ </fileset>
++ </path>
++ <path id="srcpathgroovy">
++ <fileset dir="${build.dir}">
++ <include name="**/*.groovy" />
++ </fileset>
++ </path>
+ <!--================================== copy conf ==================================-->
+ <target name="copy-conf">
+ <copy todir="${DESTDIR}${euca.conf.dir}">
+@@ -195,9 +195,21 @@
+ <antcall target="build-mkdirs" inheritall="true" inheritrefs="true" />
+ <taskdef name="groovyc" classname="org.codehaus.groovy.ant.Groovyc" classpathref="classpath" />
+ <groovyc srcdir="${src.dir}" classpathref="classpath" sourcepathref="srcpath" destdir="${build.dir}" verbose="true" listfiles="true">
+- <javac source="1.6" target="1.6" debug="true" />
++ <javac source="1.6" target="1.6" debug="true" />
+ </groovyc>
+ </target>
++ <target name="build-groovy-isolated" depends="should-build-groovy" unless="build.notRequired">
++ <echo message="[COMPILE] ${builder.target} for ${ant.project.name}" />
++ <antcall target="clean" />
++ <mkdir dir="${build.dir}" />
++ <mkdir dir="${conf.dir}" />
++ <mkdir dir="${rsrc.dir}" />
++ <mkdir dir="${test.dir}" />
++ <mkdir dir="${src.dir}" />
++ <taskdef name="groovyc" classname="org.codehaus.groovy.ant.Groovyc" classpathref="classpath" />
++ <groovyc srcdir="${src.dir}" classpathref="classpath" sourcepathref="srcpathgroovy" destdir="${build.dir}" verbose="true" listfiles="true"/>
++ <javac srcdir="${src.dir}" classpathref="classpath" destdir="${build.dir}" deprecation="true" failonerror="true" debug="true" sourcepathref="srcpathjava" target="1.7" listfiles="true" encoding="UTF-8" />
++ </target>
+ <target name="builder-test">
+ <antcall target="build-mkdirs" inheritall="true" inheritrefs="true" />
+ <condition property="builder.target" value="build-${builder.suffix}" else="build-java">
+diff -ur eucalyptus-3.bzr1505.new/clc/modules/configuration/build.xml eucalyptus-3.bzr1505/clc/modules/configuration/build.xml
+--- eucalyptus-3.bzr1505.new/clc/modules/configuration/build.xml 2012-02-09 02:24:49.000000000 -0500
++++ eucalyptus-3.bzr1505/clc/modules/configuration/build.xml 2012-02-10 04:53:55.476262078 -0500
+@@ -61,7 +61,7 @@
+ ~ Author: chris grzegorczyk <grze at eucalyptus.com>
+ -->
+ <project name="eucalyptus-config" basedir=".">
+- <property name="builder.suffix" value="groovy" />
++ <property name="builder.suffix" value="groovy-isolated" />
+ <uptodate property="groovyc.notRequired" targetfile="${jar.file}">
+ <srcfiles dir="${src.dir}" includes="**/*" />
+ </uptodate>
+diff -ur eucalyptus-3.bzr1505.new/clc/modules/notifications/build.xml eucalyptus-3.bzr1505/clc/modules/notifications/build.xml
+--- eucalyptus-3.bzr1505.new/clc/modules/notifications/build.xml 2012-02-09 02:24:49.000000000 -0500
++++ eucalyptus-3.bzr1505/clc/modules/notifications/build.xml 2012-02-10 04:54:13.664260948 -0500
+@@ -61,7 +61,7 @@
+ ~ @author: Chris Grzeogorczyk grze at eucalyptus.com
+ ~-->
+ <project name="eucalyptus-notifications-common" basedir=".">
+- <property name="builder.suffix" value="groovy" />
++ <property name="builder.suffix" value="groovy-isolated" />
+ <uptodate property="groovyc.notRequired" targetfile="${jar.file}">
+ <srcfiles dir="${src.dir}" includes="**/*" />
+ </uptodate>
+diff -ur eucalyptus-3.bzr1505.old/clc/modules/cloud/build.xml eucalyptus-3.bzr1505/clc/modules/cloud/build.xml
+--- eucalyptus-3.bzr1505.old/clc/modules/cloud/build.xml 2012-02-09 02:24:49.000000000 -0500
++++ eucalyptus-3.bzr1505/clc/modules/cloud/build.xml 2012-02-10 05:07:50.177185340 -0500
+@@ -62,7 +62,7 @@
+ -->
+ <project name="eucalyptus-cloud" basedir=".">
+ <!--================================== BUILD TARGETS ==================================-->
+- <property name="builder.suffix" value="groovy" />
++ <property name="builder.suffix" value="groovy-isolated" />
+ <uptodate property="groovyc.notRequired" targetfile="${jar.file}">
+ <srcfiles dir="${src.dir}" includes="**/*" />
+ </uptodate>
diff --git a/eucalyptus-jarlinks.txt b/eucalyptus-jarlinks.txt
new file mode 100644
index 0000000..5530f70
--- /dev/null
+++ b/eucalyptus-jarlinks.txt
@@ -0,0 +1,140 @@
+/usr/share/java/activemq/kahadb.jar
+/usr/share/java/activemq/activeio-core.jar
+/usr/share/java/activemq/activemq-core.jar
+/usr/share/java/activemq/protobuf.jar
+/usr/share/java/ant.jar
+/usr/share/java/antlr.jar
+/usr/share/java/apache-commons-beanutils.jar
+/usr/share/java/apache-commons-cli.jar
+/usr/share/java/apache-commons-collections.jar
+/usr/share/java/apache-commons-compress.jar
+/usr/share/java/apache-commons-fileupload.jar
+/usr/share/java/apache-commons-io.jar
+/usr/share/java/apache-commons-jxpath.jar
+/usr/share/java/apache-commons-lang.jar
+/usr/share/java/apache-commons-logging-adapters.jar
+/usr/share/java/apache-commons-logging-api.jar
+/usr/share/java/apache-commons-logging.jar
+/usr/share/java/apache-commons-pool.jar
+/usr/share/java/axiom/axiom-api.jar
+/usr/share/java/axiom/axiom-dom.jar
+/usr/share/java/axiom/axiom-impl.jar
+/usr/share/java/backport-util-concurrent-3.1.jar
+/usr/share/java/batik/batik-anim.jar
+/usr/share/java/batik/batik-awt-util.jar
+/usr/share/java/batik/batik-bridge.jar
+/usr/share/java/batik/batik-css.jar
+/usr/share/java/batik/batik-dom.jar
+/usr/share/java/batik/batik-ext.jar
+/usr/share/java/batik/batik-gvt.jar
+/usr/share/java/batik/batik-parser.jar
+/usr/share/java/batik/batik-script.jar
+/usr/share/java/batik/batik-svg-dom.jar
+/usr/share/java/batik/batik-svggen.jar
+/usr/share/java/batik/batik-util.jar
+/usr/share/java/batik/batik-xml.jar
+/usr/share/java/bcel.jar
+/usr/share/java/bcprov.jar
+/usr/share/java/bsf.jar
+/usr/share/java/btm.jar
+/usr/share/java/cglib.jar
+/usr/share/java/commons-codec.jar
+/usr/share/java/commons-digester.jar
+/usr/share/java/dnsjava.jar
+/usr/share/java/dom4j.jar
+/usr/share/java/ehcache-core.jar
+/usr/share/java/ezmorph.jar
+/usr/share/java/geronimo-ejb.jar
+/usr/share/java/geronimo-jms.jar
+/usr/share/java/geronimo-jta.jar
+/usr/share/java/groovy.jar
+/usr/share/java/guava.jar
+/usr/share/java/ha-jdbc.jar
+/usr/share/java/hamcrest12/all.jar
+/usr/share/java/hibernate3/hibernate-core.jar
+/usr/share/java/hibernate3/hibernate-ehcache.jar
+/usr/share/java/hibernate3/hibernate-entitymanager.jar
+/usr/share/java/hibernate3/hibernate-jbosscache.jar
+/usr/share/java/hibernate3/hibernate-proxool.jar
+/usr/share/java/hibernate/hibernate-commons-annotations.jar
+/usr/share/java/hibernate-jpa-2.0-api.jar
+/usr/share/java/jakarta-commons-httpclient.jar
+/usr/share/java/jasperreports/jasperreports.jar
+/usr/share/java/javamail/mail.jar
+/usr/share/java/javassist.jar
+/usr/share/java/java-uuid-generator.jar
+/usr/share/java/jaxen.jar
+/usr/share/java/jbosscache-core.jar
+/usr/share/java/jboss-common-core.jar
+/usr/share/java/jboss-connector-1.6-api.jar
+/usr/share/java/jboss-logging.jar
+/usr/share/java/jcip-annotations.jar
+/usr/share/java/jetty/jetty-ajp.jar
+/usr/share/java/jetty/jetty-annotations.jar
+/usr/share/java/jetty/jetty-client.jar
+/usr/share/java/jetty/jetty-continuation.jar
+/usr/share/java/jetty/jetty-deploy.jar
+/usr/share/java/jetty/jetty-http.jar
+/usr/share/java/jetty/jetty-io.jar
+/usr/share/java/jetty/jetty-jmx.jar
+/usr/share/java/jetty/jetty-jndi.jar
+/usr/share/java/jetty/jetty-overlay-deployer.jar
+/usr/share/java/jetty/jetty-plus.jar
+/usr/share/java/jetty/jetty-policy.jar
+/usr/share/java/jetty/jetty-rewrite.jar
+/usr/share/java/jetty/jetty-security.jar
+/usr/share/java/jetty/jetty-server.jar
+/usr/share/java/jetty/jetty-servlet.jar
+/usr/share/java/jetty/jetty-servlets.jar
+/usr/share/java/jetty/jetty-start.jar
+/usr/share/java/jetty/jetty-util.jar
+/usr/share/java/jetty/jetty-webapp.jar
+/usr/share/java/jetty/jetty-websocket.jar
+/usr/share/java/jetty/jetty-xml.jar
+/usr/share/java/jgroups212.jar
+/usr/share/java/jibx/bind.jar
+/usr/share/java/jibx/extras.jar
+/usr/share/java/jibx/run.jar
+/usr/share/java/jibx/schema.jar
+/usr/share/java/jibx/tools.jar
+/usr/share/java/jsch.jar
+/usr/share/java/json-lib.jar
+/usr/share/java/jsr-305.jar
+/usr/share/java/junit4.jar
+/usr/share/java/log4j.jar
+/usr/share/java/mule/mule-core.jar
+/usr/share/java/mule/mule-module-builders.jar
+/usr/share/java/mule/mule-module-client.jar
+/usr/share/java/mule/mule-module-spring-config.jar
+/usr/share/java/mule/mule-module-xml.jar
+/usr/share/java/mule/mule-transport-vm.jar
+/usr/share/java/netty31.jar
+/usr/share/java/objectweb-asm/asm-all.jar
+/usr/share/java/qname.jar
+/usr/share/java/quartz.jar
+/usr/share/java/regexp.jar
+/usr/share/java/slf4j/api.jar
+/usr/share/java/slf4j/jcl-over-slf4j.jar
+/usr/share/java/slf4j/jul-to-slf4j.jar
+/usr/share/java/slf4j/log4j12.jar
+/usr/share/java/springframework/spring-beans.jar
+/usr/share/java/springframework/spring-context.jar
+/usr/share/java/springframework/spring-context-support.jar
+/usr/share/java/springframework/spring-core.jar
+/usr/share/java/springframework/spring-expression.jar
+/usr/share/java/springframework/spring-web.jar
+/usr/share/java/stax2-api.jar
+/usr/share/java/tomcat-el-2.2-api.jar
+/usr/share/java/tomcat-servlet-3.0-api.jar
+/usr/share/java/velocity.jar
+/usr/share/java/woodstox-core.jar
+/usr/share/java/wsdl4j.jar
+/usr/share/java/wss4j.jar
+/usr/share/java/xalan-j2.jar
+/usr/share/java/xalan-j2-serializer.jar
+/usr/share/java/xerces-j2.jar
+/usr/share/java/xml-commons-apis.jar
+/usr/share/java/xml-security.jar
+/usr/share/java/xom.jar
+/usr/share/java/xpp3.jar
+/usr/share/java/xstream.jar
diff --git a/eucalyptus-jdk7.patch b/eucalyptus-jdk7.patch
new file mode 100644
index 0000000..671d674
--- /dev/null
+++ b/eucalyptus-jdk7.patch
@@ -0,0 +1,48 @@
+diff --git a/clc/modules/module-inc.xml b/clc/modules/module-inc.xml
+index 2315bee..10f38c9 100644
+--- a/clc/modules/module-inc.xml
++++ b/clc/modules/module-inc.xml
+@@ -171,7 +171,7 @@
+ <echo message="[COMPILE] ${builder.target} for ${ant.project.name}" />
+ <antcall target="clean" />
+ <antcall target="build-mkdirs" inheritall="true" inheritrefs="true" />
+- <javac srcdir="${src.dir}" classpathref="classpath" destdir="${build.dir}" deprecation="false" failonerror="true" debug="true" sourcepathref="srcpath" target="1.5" listfiles="true" />
++ <javac srcdir="${src.dir}" classpathref="classpath" destdir="${build.dir}" deprecation="false" failonerror="true" debug="true" sourcepathref="srcpath" source="1.6" target="1.6" listfiles="true" />
+ </target>
+ <target name="should-build-groovy">
+ <mkdir dir="${build.dir}" />
+@@ -185,7 +185,7 @@
+ <antcall target="build-mkdirs" inheritall="true" inheritrefs="true" />
+ <taskdef name="groovyc" classname="org.codehaus.groovy.ant.Groovyc" classpathref="classpath" />
+ <groovyc srcdir="${src.dir}" classpathref="classpath" sourcepathref="srcpath" destdir="${build.dir}" verbose="true" listfiles="true">
+- <javac target="1.5" debug="true" />
++ <javac source="1.6" target="1.6" debug="true" />
+ </groovyc>
+ </target>
+ <target name="builder-test">
+diff --git a/clc/modules/msgs/src/main/java/edu/ucsb/eucalyptus/msgs/BaseMessage.java b/clc/modules/msgs/src/main/java/edu/ucsb/eucalyptus/msgs/BaseMessage.java
+index 4e458f5..1c44c55 100644
+--- a/clc/modules/msgs/src/main/java/edu/ucsb/eucalyptus/msgs/BaseMessage.java
++++ b/clc/modules/msgs/src/main/java/edu/ucsb/eucalyptus/msgs/BaseMessage.java
+@@ -216,7 +216,7 @@ public class BaseMessage {
+ try {
+ Class responseClass = ClassLoader.getSystemClassLoader( ).loadClass( replyType );
+ reply = ( TYPE ) responseClass.newInstance( );
+- reply.correlationId = this.correlationId;
++ reply.setCorrelationId ( this.correlationId );
+ } catch ( Exception e ) {
+ Logger.getLogger( BaseMessage.class ).debug( e, e );
+ throw new TypeNotPresentException( this.correlationId, e );
+diff --git a/clc/modules/storage-controller/build.xml b/clc/modules/storage-controller/build.xml
+index 625fccb..6b80c8a 100644
+--- a/clc/modules/storage-controller/build.xml
++++ b/clc/modules/storage-controller/build.xml
+@@ -74,7 +74,7 @@
+ <antcall target="build-java" />
+ <antcall target="jar" />
+ <mkdir dir="include" />
+- <javah classpath="${build.dir}" destdir="include" force="yes">
++ <javah classpath="${build.dir}:${modules.dir}/core/build:${modules.dir}/msgs/build:/usr/share/java/groovy.jar" destdir="include" force="yes">
+ <class name="com.eucalyptus.storage.OverlayManager" />
+ <class name="com.eucalyptus.storage.AOEManager" />
+ </javah>
diff --git a/eucalyptus-jetty8.patch b/eucalyptus-jetty8.patch
new file mode 100644
index 0000000..c0db3f2
--- /dev/null
+++ b/eucalyptus-jetty8.patch
@@ -0,0 +1,218 @@
+diff -ur eucalyptus-3.bzr1505/clc/modules/www/src/main/java/com/eucalyptus/www/Redirect.java eucalyptus-3.bzr1505.new/clc/modules/www/src/main/java/com/eucalyptus/www/Redirect.java
+--- eucalyptus-3.bzr1505/clc/modules/www/src/main/java/com/eucalyptus/www/Redirect.java 2012-02-09 02:24:49.000000000 -0500
++++ eucalyptus-3.bzr1505.new/clc/modules/www/src/main/java/com/eucalyptus/www/Redirect.java 2012-02-09 04:33:05.473353310 -0500
+@@ -7,7 +7,7 @@
+ import javax.servlet.http.HttpServletResponse;
+
+ import org.apache.log4j.Logger;
+-import org.mortbay.jetty.handler.rewrite.Rule;
++import org.eclipse.jetty.rewrite.handler.Rule;
+ import com.eucalyptus.bootstrap.HttpServerBootstrapper;
+ import com.eucalyptus.component.ServiceConfiguration;
+ import com.eucalyptus.component.Topology;
+diff -ur eucalyptus-3.bzr1505/clc/modules/msgs/src/main/java/com/eucalyptus/empyrean/EmpyreanTransactionManager.java eucalyptus-3.bzr1505.new/clc/modules/msgs/src/main/java/com/eucalyptus/empyrean/EmpyreanTransactionManager.java
+--- eucalyptus-3.bzr1505/clc/modules/msgs/src/main/java/com/eucalyptus/empyrean/EmpyreanTransactionManager.java 2012-02-09 02:24:49.000000000 -0500
++++ eucalyptus-3.bzr1505.new/clc/modules/msgs/src/main/java/com/eucalyptus/empyrean/EmpyreanTransactionManager.java 2012-02-09 05:31:39.500028619 -0500
+@@ -13,7 +13,7 @@
+ import com.eucalyptus.bootstrap.SystemIds;
+ import com.eucalyptus.system.SubDirectory;
+
+-public class EmpyreanTransactionManager extends org.mortbay.component.AbstractLifeCycle implements org.jboss.cache.transaction.TransactionManagerLookup, org.hibernate.transaction.TransactionManagerLookup {
++public class EmpyreanTransactionManager extends org.eclipse.jetty.util.component.AbstractLifeCycle implements org.jboss.cache.transaction.TransactionManagerLookup, org.hibernate.transaction.TransactionManagerLookup {
+ // public static final String JNDI_NAME = "eucalyptusTransactionManager";
+ private static Logger LOG = Logger.getLogger( EmpyreanTransactionManager.class );
+ private static Context ctx = getContext( );
+diff -ur eucalyptus-3.1.0/clc/modules/msgs/src/main/java/com/eucalyptus/ws/handlers/http/NioHttpDecoder.java eucalyptus-3.1.0.new/clc/modules/msgs/src/main/java/com/eucalyptus/ws/handlers/http/NioHttpDecoder.java
+--- eucalyptus-3.1.0/clc/modules/msgs/src/main/java/com/eucalyptus/ws/handlers/http/NioHttpDecoder.java 2012-06-19 14:41:48.000000000 -0400
++++ eucalyptus-3.1.0.new/clc/modules/msgs/src/main/java/com/eucalyptus/ws/handlers/http/NioHttpDecoder.java 2012-06-19 14:41:48.000000000 -0400
+@@ -64,7 +64,7 @@
+ import org.jboss.netty.handler.codec.http.HttpResponse;
+ import org.jboss.netty.handler.codec.http.HttpVersion;
+ import org.jboss.netty.handler.codec.replay.ReplayingDecoder;
+-import org.mortbay.log.Log;
++import org.eclipse.jetty.util.log.Log;
+
+ import com.eucalyptus.context.Context;
+ import com.eucalyptus.context.Contexts;
+diff -ur eucalyptus-3.1.0/clc/modules/www.orig/conf/www/admin.xml eucalyptus-3.1.0/clc/modules/www/conf/www/admin.xml
+--- eucalyptus-3.1.0/clc/modules/www.orig/conf/www/admin.xml 2012-06-19 14:41:48.000000000 -0400
++++ eucalyptus-3.1.0/clc/modules/www/conf/www/admin.xml 2012-08-07 11:34:32.191760020 -0400
+@@ -64,7 +64,7 @@
+ -->
+
+ <!DOCTYPE Configure PUBLIC "-//Mort Bay Consulting//DTD Configure//EN" "http://jetty.mortbay.org/configure.dtd">
+-<Configure class="org.mortbay.jetty.webapp.WebAppContext">
++<Configure class="org.eclipse.jetty.webapp.WebAppContext">
+ <Set name="contextPath">/</Set>
+ <Set name="parentLoaderPriority">true</Set>
+ <Set name="logUrlOnStart">true</Set>
+diff -ur eucalyptus-3.1.0/clc/modules/www.orig/src/main/java/com/eucalyptus/bootstrap/HttpServerBootstrapper.java eucalyptus-3.1.0/clc/modules/www/src/main/java/com/eucalyptus/bootstrap/HttpServerBootstrapper.java
+--- eucalyptus-3.1.0/clc/modules/www.orig/src/main/java/com/eucalyptus/bootstrap/HttpServerBootstrapper.java 2012-08-07 11:29:11.908789566 -0400
++++ eucalyptus-3.1.0/clc/modules/www/src/main/java/com/eucalyptus/bootstrap/HttpServerBootstrapper.java 2012-08-07 11:34:41.070759181 -0400
+@@ -65,10 +65,11 @@
+ import java.io.FileNotFoundException;
+ import java.io.IOException;
+ import java.net.URL;
++import java.nio.channels.SocketChannel;
+ import org.apache.log4j.Logger;
+-import org.mortbay.jetty.Server;
+-import org.mortbay.jetty.security.SslSelectChannelConnector;
+-import org.mortbay.xml.XmlConfiguration;
++import org.eclipse.jetty.server.Server;
++import org.eclipse.jetty.server.ssl.SslSelectChannelConnector;
++import org.eclipse.jetty.xml.XmlConfiguration;
+ import com.eucalyptus.component.id.Eucalyptus;
+ import com.eucalyptus.component.id.HttpService;
+ import com.eucalyptus.configurable.ConfigurableClass;
+@@ -119,7 +119,8 @@
+ if ( System.getProperty( "http.proxyPort" ) != null ) {
+ httpProxyPort = System.getProperty( "http.proxyPort" );
+ }
+- jettyServer = new org.mortbay.jetty.Server( );
++ jettyServer = new org.eclipse.jetty.server.Server( );
++ System.setProperty( "org.eclipse.jetty.util.log.DEBUG", "true" );
+ System.setProperty( "euca.http.port", "" + HTTP_PORT );
+ System.setProperty( "euca.https.port", "" + HTTPS_PORT );
+ URL defaultConfig = ClassLoader.getSystemResource( "eucalyptus-jetty.xml" );
+@@ -241,9 +251,14 @@
+ }
+
+ public static final class ConfiguredSslSelectChannelConnector extends SslSelectChannelConnector {
+- @Override
+ protected SSLEngine createSSLEngine() throws IOException {
+- final SSLEngine engine = super.createSSLEngine();
++ SocketChannel channel = SocketChannel.open();
++ return super.createSSLEngine(channel);
++ }
++
++ @Override
++ protected SSLEngine createSSLEngine(SocketChannel channel) throws IOException {
++ final SSLEngine engine = super.createSSLEngine(channel);
+ engine.setEnabledCipherSuites( getEnabledCipherSuites(HTTPS_CIPHERS, engine.getSupportedCipherSuites()) );
+ return engine;
+ }
+diff -ur eucalyptus-3.1.0/clc/modules/www.orig/src/main/resources/eucalyptus-jetty.xml eucalyptus-3.1.0/clc/modules/www/src/main/resources/eucalyptus-jetty.xml
+--- eucalyptus-3.1.0/clc/modules/www.orig/src/main/resources/eucalyptus-jetty.xml 2012-06-19 14:41:48.000000000 -0400
++++ eucalyptus-3.1.0/clc/modules/www/src/main/resources/eucalyptus-jetty.xml 2012-08-07 11:34:25.586760613 -0400
+@@ -62,7 +62,7 @@
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ ~ Author: chris grzegorczyk grze at eucalyptus.com
+ -->
+-<Configure id="Server" class="org.mortbay.jetty.Server">
++<Configure id="Server" class="org.eclipse.jetty.server.Server">
+ <Call name="addConnector">
+ <Arg>
+ <New class="com.eucalyptus.bootstrap.HttpServerBootstrapper$ConfiguredSslSelectChannelConnector">
+@@ -77,14 +77,12 @@
+ <Set name="password">eucalyptus</Set>
+ <Set name="keyPassword">eucalyptus</Set>
+ <Set name="trustPassword">eucalyptus</Set>
+- <Set name="ThreadPool">
+- <New class="org.mortbay.thread.QueuedThreadPool">
++ <!-- Set name="ThreadPool">
++ <New class="org.eclipse.jetty.util.thread.QueuedThreadPool">
+ <Set name="minThreads">10</Set>
+ <Set name="maxThreads">25</Set>
+- <Set name="lowThreads">5</Set>
+- <Set name="SpawnOrShrinkAt">2</Set>
+ </New>
+- </Set>
++ </Set -->
+ </New>
+ </Arg>
+ </Call>
+@@ -90,7 +90,7 @@
+ </Call>
+ <Call name="addConnector">
+ <Arg>
+- <New class="org.mortbay.jetty.nio.SelectChannelConnector">
++ <New class="org.eclipse.jetty.server.nio.SelectChannelConnector">
+ <Set name="Port">
+ <SystemProperty name="euca.http.port" default="8080" />
+ </Set>
+@@ -98,26 +98,26 @@
+ </Arg>
+ </Call>
+ <Set name="handler">
+- <New id="Handlers" class="org.mortbay.jetty.handler.rewrite.RewriteHandler">
++ <New id="Handlers" class="org.eclipse.jetty.rewrite.handler.RewriteHandler">
+ <Set name="rules">
+- <Array type="org.mortbay.jetty.handler.rewrite.Rule">
++ <Array type="org.eclipse.jetty.rewrite.handler.Rule">
+ <Item>
+ <New id="httpsRedirect" class="com.eucalyptus.www.Redirect" />
+ </Item>
+ </Array>
+ </Set>
+ <Set name="handler">
+- <New id="Handlers" class="org.mortbay.jetty.handler.HandlerCollection">
++ <New id="Handlers" class="org.eclipse.jetty.server.handler.HandlerCollection">
+ <Set name="handlers">
+- <Array type="org.mortbay.jetty.Handler">
++ <Array type="org.eclipse.jetty.server.Handler">
+ <Item>
+- <New id="Contexts" class="org.mortbay.jetty.handler.ContextHandlerCollection" />
++ <New id="Contexts" class="org.eclipse.jetty.server.handler.ContextHandlerCollection" />
+ </Item>
+ <Item>
+- <New id="DefaultHandler" class="org.mortbay.jetty.handler.DefaultHandler" />
++ <New id="DefaultHandler" class="org.eclipse.jetty.server.handler.DefaultHandler" />
+ </Item>
+ <Item>
+- <New id="RequestLog" class="org.mortbay.jetty.handler.RequestLogHandler" />
++ <New id="RequestLog" class="org.eclipse.jetty.server.handler.RequestLogHandler" />
+ </Item>
+ </Array>
+ </Set>
+@@ -132,7 +132,7 @@
+ </Call>
+ <Call name="addLifeCycle">
+ <Arg>
+- <New class="org.mortbay.jetty.deployer.ContextDeployer">
++ <New class="org.eclipse.jetty.deploy.ContextDeployer">
+ <Set name="contexts">
+ <Ref id="Contexts" />
+ </Set>
+@@ -144,7 +144,7 @@
+ </Call>
+ <Ref id="RequestLog">
+ <Set name="requestLog">
+- <New id="RequestLogImpl" class="org.mortbay.jetty.NCSARequestLog">
++ <New id="RequestLogImpl" class="org.eclipse.jetty.server.NCSARequestLog">
+ <Set name="filename"><SystemProperty name="euca.log.dir" default="./log" />/jetty-request-yyyy_mm_dd.log</Set>
+ <Set name="filenameDateFormat">yyyy_MM_dd</Set>
+ <Set name="retainDays">90</Set>
+diff -ur eucalyptus-3.1.0/clc/modules/core/src/main/resources/log4j.xml eucalyptus-3.1.0.patched/clc/modules/core/src/main/resources/log4j.xml
+--- eucalyptus-3.1.0/clc/modules/core/src/main/resources/log4j.xml 2012-06-19 14:41:48.000000000 -0400
++++ eucalyptus-3.1.0.patched/clc/modules/core/src/main/resources/log4j.xml 2012-08-08 14:44:16.357733943 -0400
+@@ -301,7 +301,7 @@
+ <priority value="${euca.log.level}" />
+ <appender-ref ref="cloud-exhaust" />
+ </category>
+- <category name="org.mortbay" additivity="false">
++ <category name="org.eclipse.jetty" additivity="false">
+ <priority value="${euca.log.level}" />
+ <appender-ref ref="cloud-exhaust" />
+ </category>
+--- eucalyptus-3.1.2gitb8c109b4/clc/modules/reporting/src/main/java/com/eucalyptus/reporting/modules/s3/S3ReportingModule.java 2012-09-17 09:23:43.000000000 -0700
++++ eucalyptus-3.1.2gitb8c109b4.new/clc/modules/reporting/src/main/java/com/eucalyptus/reporting/modules/s3/S3ReportingModule.java 2012-09-20 12:11:27.903623883 -0700
+@@ -3,7 +3,7 @@
+ import java.util.*;
+
+ import org.apache.log4j.Logger;
+-import org.mortbay.log.Log;
++import org.eclipse.jetty.util.log.Log;
+
+ import com.eucalyptus.reporting.Period;
+ import com.eucalyptus.reporting.ReportingModule;
+--- eucalyptus-3.1.2gitb8c109b4/clc/modules/reporting/src/main/java/com/eucalyptus/reporting/user/ReportingAccountDao.java 2012-09-17 09:23:43.000000000 -0700
++++ eucalyptus-3.1.2gitb8c109b4.new/clc/modules/reporting/src/main/java/com/eucalyptus/reporting/user/ReportingAccountDao.java 2012-09-20 12:31:16.614116462 -0700
+@@ -4,7 +4,7 @@
+ import java.util.concurrent.ConcurrentHashMap;
+
+ import org.apache.log4j.Logger;
+-import org.mortbay.log.Log;
++import org.eclipse.jetty.util.log.Log;
+
+ import com.eucalyptus.entities.EntityWrapper;
+
diff --git a/eucalyptus-jni-abspath.patch b/eucalyptus-jni-abspath.patch
new file mode 100644
index 0000000..233ba81
--- /dev/null
+++ b/eucalyptus-jni-abspath.patch
@@ -0,0 +1,19 @@
+--- eucalyptus-3.1.0.orig/clc/modules/storage-controller/src/main/java/com/eucalyptus/storage/OverlayManager.java 2012-08-16 23:14:00.640939401 -0400
++++ eucalyptus-3.1.0/clc/modules/storage-controller/src/main/java/com/eucalyptus/storage/OverlayManager.java 2012-08-27 14:18:56.459491065 -0400
+@@ -91,6 +91,7 @@
+ import com.eucalyptus.configurable.ConfigurableProperty;
+ import com.eucalyptus.configurable.PropertyDirectory;
+ import com.eucalyptus.entities.EntityWrapper;
++import com.eucalyptus.system.BaseDirectory;
+ import com.eucalyptus.util.EucalyptusCloudException;
+ import com.eucalyptus.util.StorageProperties;
+ import com.eucalyptus.util.WalrusProperties;
+@@ -287,7 +288,7 @@
+ }
+ //The following should be executed only once during the entire lifetime of the VM.
+ if(!initialized) {
+- System.loadLibrary("lvm2control");
++ System.load(BaseDirectory.JNI.toString() + "/liblvm2control.so");
+ registerSignals();
+ initialized = true;
+ }
diff --git a/eucalyptus-move-version-file.patch b/eucalyptus-move-version-file.patch
new file mode 100644
index 0000000..cd35a41
--- /dev/null
+++ b/eucalyptus-move-version-file.patch
@@ -0,0 +1,11 @@
+--- eucalyptus-3.1.0.orig/tools/euca_conf.in 2012-06-19 14:41:48.000000000 -0400
++++ eucalyptus-3.1.0/tools/euca_conf.in 2012-08-27 16:39:21.337567567 -0400
+@@ -750,6 +750,8 @@
+
+ if [ -e $EUCALYPTUS/etc/eucalyptus/eucalyptus-version ]; then
+ VERSION="$EUCALYPTUS/etc/eucalyptus/eucalyptus-version"
++ elif [ -e /usr/share/eucalyptus/eucalyptus-version ]; then
++ VERSION="/usr/share/eucalyptus/eucalyptus-version"
+ elif [ -e @prefix@/etc/eucalyptus/eucalyptus-version ]; then
+ VERSION="@prefix@/etc/eucalyptus/eucalyptus-version"
+ fi
diff --git a/eucalyptus-nc-libvirt.rules b/eucalyptus-nc-libvirt.rules
new file mode 100644
index 0000000..e5e2b64
--- /dev/null
+++ b/eucalyptus-nc-libvirt.rules
@@ -0,0 +1,11 @@
+polkit.addRule(function(action, subject) {
+ if (action.id == "org.libvirt.unix.manage" &&
+ subject.user == "eucalyptus") {
+ polkit.log("action=" + action.id);
+ polkit.log("subject=" + subject);
+ polkit.log("Returning " + polkit.Result.YES);
+ return polkit.Result.YES;
+ }
+ polkit.log("Returning " + polkit.Result.NOT_HANDLED + " for user " + subject.user);
+ return polkit.Result.NOT_HANDLED;
+});
diff --git a/eucalyptus-nc.init b/eucalyptus-nc.init
new file mode 100755
index 0000000..7157a14
--- /dev/null
+++ b/eucalyptus-nc.init
@@ -0,0 +1,371 @@
+#!/bin/bash
+#Copyright (c) 2009 Eucalyptus Systems, Inc.
+#
+#This program is free software: you can redistribute it and/or modify
+#it under the terms of the GNU General Public License as published by
+#the Free Software Foundation, only version 3 of the License.
+#
+#This file is distributed in the hope that it will be useful, but WITHOUT
+#ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+#FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+#for more details.
+#
+#You should have received a copy of the GNU General Public License along
+#with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+#Please contact Eucalyptus Systems, Inc., 130 Castilian
+#Dr., Goleta, CA 93101 USA or visit <http://www.eucalyptus.com/licenses/>
+#if you need additional information or have any questions.
+#
+#This file may incorporate work covered under the following copyright and
+#permission notice:
+#
+# Software License Agreement (BSD License)
+#
+# Copyright (c) 2008, Regents of the University of California
+#
+#
+# Redistribution and use of this software in source and binary forms, with
+# or without modification, are permitted provided that the following
+# conditions are met:
+#
+# Redistributions of source code must retain the above copyright notice,
+# this list of conditions and the following disclaimer.
+#
+# Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
+# IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+# TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
+# PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
+# OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. USERS OF
+# THIS SOFTWARE ACKNOWLEDGE THE POSSIBLE PRESENCE OF OTHER OPEN SOURCE
+# LICENSED MATERIAL, COPYRIGHTED MATERIAL OR PATENTED MATERIAL IN THIS
+# SOFTWARE, AND IF ANY SUCH MATERIAL IS DISCOVERED THE PARTY DISCOVERING
+# IT MAY INFORM DR. RICH WOLSKI AT THE UNIVERSITY OF CALIFORNIA, SANTA
+# BARBARA WHO WILL THEN ASCERTAIN THE MOST APPROPRIATE REMEDY, WHICH IN
+# THE REGENTS' DISCRETION MAY INCLUDE, WITHOUT LIMITATION, REPLACEMENT
+# OF THE CODE SO IDENTIFIED, LICENSING OF THE CODE SO IDENTIFIED, OR
+# WITHDRAWAL OF THE CODE CAPABILITY TO THE EXTENT NEEDED TO COMPLY WITH
+# ANY SUCH LICENSES OR RIGHTS.
+#
+
+#
+# Init script for the Eucalyptus node controller.
+#
+# chkconfig: 2345 99 05
+# description: script for starting and stopping eucalyptus node controller
+#
+### BEGIN INIT INFO
+# Provides: eucalyptus-nc
+# Required-Start: $remote_fs $syslog libvirtd
+# Required-Stop: $remote_fs $syslog
+# Default-Start: 2 3 4 5
+# Default-Stop: 0 1 6
+# Short-Description: Start Eucalyptus node controller
+# Description: Start the Eucalyptus node controller
+### END INIT INFO
+#
+
+# Do NOT "set -e"
+
+# if we have lsb functions let's source them
+WE_HAVE_LSB="N"
+if [ -e /lib/lsb/init-functions ]; then
+ . /lib/lsb/init-functions
+ # very old lsb don't have the functions we need
+ if type log_daemon_msg > /dev/null 2> /dev/null ; then
+ WE_HAVE_LSB="Y"
+ fi
+fi
+
+if [ "$EUID" != "0" ]; then
+ echo "Eucalyptus init scritps must be run as root."
+ exit 1
+fi
+
+# I just wanted to set PATH to be the system PATH, but if a user install
+# eucalyptus manually, it may have binaries in a non-standard position:
+# hence we need to keep the PATH we receive.
+export PATH=/sbin:/usr/sbin:/bin:/usr/bin:$PATH
+DESC="Eucalyptus services"
+NAME=eucalyptus-nc
+BRCTL="`which brctl 2> /dev/null`"
+MODPROBE="`which modprobe 2> /dev/null`"
+EUCA_USER="eucalyptus"
+
+export EUCALYPTUS="/"
+. $EUCALYPTUS/etc/eucalyptus/eucalyptus.conf
+EUCAHELPERDIR=$EUCALYPTUS/usr/share/eucalyptus
+EUCASBINDIR=$EUCALYPTUS/usr/sbin
+EUCACONFDIR=$EUCALYPTUS/etc/eucalyptus
+EUCADATADIR=$EUCALYPTUS/usr/share/eucalyptus
+EUCARUNDIR=$EUCALYPTUS/var/run/eucalyptus
+EUCALOGDIR=$EUCALYPTUS/var/log/eucalyptus
+LIBDIR=@LIBDIR@
+
+# crude way to start the axis2c services
+do_start() {
+ # fixes #469984
+ IPTABLES="`which iptables 2> /dev/null`"
+ if [ -n "$IPTABLES" ]; then
+ [ -x $IPTABLES ] && $IPTABLES -L -n > /dev/null 2> /dev/null
+ fi
+
+ if [ ! -x $EUCASBINDIR/euca_conf ]; then
+ echo "Some eucalyptus components are missing"
+ exit 1
+ fi
+
+ # Add loop devices if necessary (and possible)
+ [ -z "$CREATE_NC_LOOP_DEVICES" ] && CREATE_NC_LOOP_DEVICES=256
+ if [ "$CREATE_NC_LOOP_DEVICES" -gt 0 ] 2>/dev/null; then
+ "$EUCAHELPERDIR/create-loop-devices" $CREATE_NC_LOOP_DEVICES
+ fi
+
+ # let's see how many loop devices we have available
+ LOOP_AVL_DEV="`/bin/ls -1d /dev/loop* 2>/dev/null | wc -l`"
+ LOOP_AVL_SYS="`/bin/ls -1d /sys/block/loop* 2>/dev/null | wc -l`"
+ if [ -z "$LOOP_AVL_DEV" -o "$LOOP_AVL_DEV" = "0" ]; then
+ echo "warning: no loop devices found in /dev; expect problems" >&2
+ elif [ $LOOP_AVL_DEV -lt 50 ]; then
+ echo "warning: found $LOOP_AVL_DEV loop devices in /dev; at least 50 are recommended" >&2
+ elif [ -z "$LOOP_AVL_SYS" -o "$LOOP_AVL_SYS" -lt "$LOOP_AVL_DEV" ] && [[ `uname -r` < 2.6.22 ]]; then # The version comparison does not work in every shell
+ # When then loop driver's max_loop option is not 0, loop device nodes
+ # that are not automatically created by the kernel do not work. We can
+ # check for this case by looking for too few loop device entries in
+ # sysfs.
+ #
+ # Trying to determine whether or not max_loop is 0 is difficult on
+ # Linux 2, so in general we make no attempt to do so. However, max_loop
+ # *cannot* be 0 on Linux < 2.6.22, so we perform this check on those
+ # systems so it will hopefully cover the majority of cases.
+ echo "warning: found fewer loop devices in /sys/block than in /dev ($LOOP_AVL_SYS < $LOOP_AVL_DEV); expect problems"
+ fi
+
+ if ! $EUCASBINDIR/euca_conf --check nc ; then
+ exit 1
+ fi
+
+ # we have a program to test the hypervisor and more for the NC
+ if [ ! -x $EUCASBINDIR/euca_test_nc ]; then
+ echo
+ echo "Cannot check Node Controller: missing euca_test_nc."
+ else
+ # sometimes, libvirtd takes some time to start on init, so retry euca_test_nc a few times before failing
+ for i in 1 2 3 4 5
+ do
+ PASSED=0
+ if ( $EUCASBINDIR/euca_test_nc $HYPERVISOR > $EUCALOGDIR/euca_test_nc.log 2>&1 ); then
+ PASSED=1
+ else
+ sleep 1
+ fi
+ done
+ if ( test $PASSED = "0" ); then
+ echo
+ echo "Node Controller cannot be started: errors in $EUCALOGDIR/euca_test_nc.log"
+ exit 1
+ fi
+ fi
+
+ # on SYSTEM or STATIC mode the bridge needs to exists
+ if [ "$VNET_MODE" = "SYSTEM" -o "$VNET_MODE" = "STATIC" ]; then
+ if [ -n "$BRCTL" -a -x $BRCTL ]; then
+ if ! $BRCTL show |grep $VNET_BRIDGE > /dev/null 2> /dev/null ; then
+ echo
+ echo "Warning! Cannot find bridge $VNET_BRIDGE: instances may be without net"
+ fi
+ fi
+ fi
+
+ # we need IP forwarding and we need to use iptable over the bridge
+ if [ -w /proc/sys/net/ipv4/ip_forward ]; then
+ VAL=`cat /proc/sys/net/ipv4/ip_forward`
+ if [ "$VAL" = "0" ]; then
+ echo
+ echo "Enabling IP forwarding for eucalyptus."
+ echo -n 1 > /proc/sys/net/ipv4/ip_forward
+ fi
+ fi
+ if [ -w /proc/sys/net/bridge/bridge-nf-call-iptables ]; then
+ VAL=`cat /proc/sys/net/bridge/bridge-nf-call-iptables`
+ if [ "$VAL" = "0" ]; then
+ echo
+ echo "Enabling bridge netfiltering for eucalyptus."
+ echo 1 > /proc/sys/net/bridge/bridge-nf-call-iptables
+ fi
+ fi
+
+ if [ -x $EUCASBINDIR/eucanetd ]; then
+ if ! $EUCASBINDIR/eucanetd ; then
+ echo
+ echo "Failed to start the eucanetd"
+ fi
+ fi
+
+ if ! httpd -f $EUCACONFDIR/httpd/conf/httpd-nc.conf ; then
+ echo
+ echo "Failed to start the NC!"
+ exit 1
+ fi
+}
+
+do_status() {
+ pidfile=$EUCARUNDIR/eucalyptus-nc.pid
+ if [ -s $pidfile ]; then
+ pid=`cat $pidfile 2> /dev/null`
+ if ps axww|grep $pid|grep httpd-nc.conf > /dev/null ; then
+ # we are good
+ return 0
+ fi
+ fi
+ return 1
+}
+
+do_stop() {
+ netpid="$EUCARUNDIR/eucanetd.pid"
+ if [ -f "$netpid" ]; then
+ kill `cat $netpid` >/dev/null 2>&1
+ rm -f $netpid
+ fi
+
+ pidfile=$EUCARUNDIR/eucalyptus-nc.pid
+
+ # let's be sure we are killing the right process
+ if ! do_status ; then
+ rm -f $pidfile
+ return
+ fi
+
+ # now kill the services
+ if [ -s $pidfile ]; then
+ pid=`cat $pidfile 2> /dev/null`
+ kill $pid > /dev/null 2>&1
+ else
+ return
+ fi
+ timeout=5
+ while [ $timeout -gt 0 ]; do
+ if ps $pid > /dev/null 2>&1 ; then
+ sleep 1
+ timeout=$(($timeout - 1))
+ else
+ break
+ fi
+ done
+ if [ $timeout -eq 0 ]; then
+ kill -9 $pid > /dev/null 2>&1
+ fi
+ rm -f $pidfile
+}
+
+# set the library path correctly
+export LD_LIBRARY_PATH=$LIBDIR/wso2-axis2/modules/rampart
+export AXIS2C_HOME=$LIBDIR/eucalyptus/axis2/nc
+export WSFCPP_HOME=$LIBDIR/eucalyptus/axis2/nc
+
+case "$1" in
+ start)
+ if [ "$VERBOSE" != no ]; then
+ if [ "$WE_HAVE_LSB" = "Y" ]; then
+ log_daemon_msg "Starting $DESC" "$NAME"
+ else
+ echo -n "Starting $DESC: "
+ fi
+ fi
+
+ # let's check there is no previous NC running
+ if do_status ; then
+ echo
+ echo "another NC is already running!"
+ if [ "$VERBOSE" != no ]; then
+ if [ "$WE_HAVE_LSB" = "Y" ]; then
+ log_end_msg 1
+ fi
+ fi
+ exit 1
+ fi
+
+ rm -f /dev/shm/sem.eucalyptus-nc* /dev/shm/sem.eucalyptus-st*
+ do_start
+ case "$?" in
+ 0|1)
+ if [ "$VERBOSE" != no ]; then
+ if [ "$WE_HAVE_LSB" = "Y" ]; then
+ log_end_msg 0
+ else
+ echo "done."
+ fi
+ fi
+ ;;
+ *)
+ if [ "$VERBOSE" != no ]; then
+ if [ "$WE_HAVE_LSB" = "Y" ]; then
+ log_end_msg 1
+ else
+ echo "failed!"
+ fi
+ fi
+ ;;
+ esac
+ ;;
+ stop)
+ if [ "$VERBOSE" != no ]; then
+ if [ "$WE_HAVE_LSB" = "Y" ]; then
+ log_begin_msg "Stopping $DESC"
+ else
+ echo -n "Stopping $DESC: "
+ fi
+ fi
+ do_stop
+ rm -f /dev/shm/sem.eucalyptus-nc* /dev/shm/sem.eucalyptus-st*
+ if [ "$VERBOSE" != no ]; then
+ if [ "$WE_HAVE_LSB" = "Y" ]; then
+ log_end_msg 0
+ else
+ echo "done."
+ fi
+ fi
+ ;;
+ restart)
+ if [ "$VERBOSE" != no ]; then
+ if [ "$WE_HAVE_LSB" = "Y" ]; then
+ log_begin_msg "Restarting $DESC"
+ else
+ echo -n "Restarting $DESC: "
+ fi
+ fi
+ # restart allow the CC to mantain the state across restart
+ do_stop
+ do_start
+ if [ "$VERBOSE" != no ]; then
+ if [ "$WE_HAVE_LSB" = "Y" ]; then
+ log_end_msg 0
+ else
+ echo "done."
+ fi
+ fi
+ ;;
+ status)
+ if do_status ; then
+ echo "NC is running"
+ else
+ exit 3
+ fi
+ ;;
+ *)
+ echo "Usage: $NAME {start|stop|restart}" >&2
+ exit 3
+ ;;
+esac
+
+:
diff --git a/eucalyptus-nc.service b/eucalyptus-nc.service
new file mode 100644
index 0000000..0d89cc4
--- /dev/null
+++ b/eucalyptus-nc.service
@@ -0,0 +1,14 @@
+[Unit]
+Description=The Eucalyptus Node Controller service
+After=syslog.target network.target remote-fs.target nss-lookup.target libvirtd.service
+
+[Service]
+Type=forking
+PIDFile=/var/run/eucalyptus/eucalyptus-nc.pid
+# EnvironmentFile=/etc/sysconfig/eucalyptus
+ExecStart=/usr/libexec/eucalyptus/eucalyptus-nc.init start
+ExecStop=/usr/libexec/eucalyptus/eucalyptus-nc.init stop
+PrivateTmp=true
+
+[Install]
+WantedBy=multi-user.target
diff --git a/eucalyptus-respect-ldflags.patch b/eucalyptus-respect-ldflags.patch
new file mode 100644
index 0000000..31733bf
--- /dev/null
+++ b/eucalyptus-respect-ldflags.patch
@@ -0,0 +1,15 @@
+--- eucalyptus-3.1.2gitb8c109b4/util/Makefile 2012-09-17 12:35:58.973014196 -0400
++++ eucalyptus-3.1.2gitb8c109b4.new/util/Makefile 2012-09-17 14:55:37.092135613 -0400
+@@ -9,10 +9,10 @@
+ build: all
+
+ euca_rootwrap: euca_rootwrap.c
+- $(CC) $(CFLAGS) $(CPPFLAGS) $(INCLUDES) -o euca_rootwrap euca_rootwrap.c
++ $(CC) $(CFLAGS) $(CPPFLAGS) $(INCLUDES) -o euca_rootwrap euca_rootwrap.c $(LDFLAGS)
+
+ euca_mountwrap: euca_mountwrap.c
+- $(CC) $(CFLAGS) $(CPPFLAGS) $(INCLUDES) -o euca_mountwrap euca_mountwrap.c
++ $(CC) $(CFLAGS) $(CPPFLAGS) $(INCLUDES) -o euca_mountwrap euca_mountwrap.c $(LDFLAGS)
+
+ test: test.c ipc.o misc.o
+ $(CC) $(CFLAGS) $(CPPFLAGS) $(INCLUDES) -o test test.c ipc.o misc.o data.o -lpthread $(LIBS) $(LDFLAGS)
diff --git a/eucalyptus-rootwrap-python.patch b/eucalyptus-rootwrap-python.patch
new file mode 100644
index 0000000..3b11df8
--- /dev/null
+++ b/eucalyptus-rootwrap-python.patch
@@ -0,0 +1,24 @@
+diff -ur eucalyptus-3.1.0.orig/clc/eucadmin/eucadmin/check.py eucalyptus-3.1.0/clc/eucadmin/eucadmin/check.py
+--- eucalyptus-3.1.0.orig/clc/eucadmin/eucadmin/check.py 2012-06-19 14:41:48.000000000 -0400
++++ eucalyptus-3.1.0/clc/eucadmin/eucadmin/check.py 2012-08-16 16:32:39.180732968 -0400
+@@ -32,7 +32,7 @@
+ import pwd
+ from eucadmin.command import Command
+
+-RootWrapPath = 'usr/lib/eucalyptus/euca_rootwrap'
++RootWrapPath = '/usr/libexec/eucalyptus/euca_rootwrap'
+
+ class Check(object):
+
+diff -ur eucalyptus-3.1.0.orig/clc/eucadmin/eucadmin/eucasetup.py eucalyptus-3.1.0/clc/eucadmin/eucadmin/eucasetup.py
+--- eucalyptus-3.1.0.orig/clc/eucadmin/eucadmin/eucasetup.py 2012-06-19 14:41:48.000000000 -0400
++++ eucalyptus-3.1.0/clc/eucadmin/eucadmin/eucasetup.py 2012-08-16 16:32:54.400888899 -0400
+@@ -32,7 +32,7 @@
+ import pwd
+ from eucadmin.utils import chown_recursive, chmod_recursive
+
+-RootWrapPath = 'usr/lib/eucalyptus/euca_rootwrap'
++RootWrapPath = '/usr/libexec/eucalyptus/euca_rootwrap'
+ MountWrapPath = 'usr/lib/eucalyptus/euca_mountwrap'
+
+ MakeDirs = ['var/lib/eucalyptus/dynserv/data',
diff --git a/eucalyptus-wso2-axis2-configure.patch b/eucalyptus-wso2-axis2-configure.patch
new file mode 100644
index 0000000..197a49f
--- /dev/null
+++ b/eucalyptus-wso2-axis2-configure.patch
@@ -0,0 +1,28 @@
+diff -ur eucalyptus-3.1.0.orig/configure eucalyptus-3.1.0/configure
+--- eucalyptus-3.1.0.orig/configure 2012-08-16 23:14:00.585938864 -0400
++++ eucalyptus-3.1.0/configure 2012-08-18 10:07:10.102716060 -0400
+@@ -4124,6 +4124,10 @@
+ for x in ${AXIS2C_HOME}/include/axis2-* ${AXIS2C_HOME}/include/rampart-*; do
+ INCLUDES="${INCLUDES} -I$x"
+ done
++ else
++ for x in /usr/include/axis2-* /usr/include/rampart-*; do
++ INCLUDES="${INCLUDES} -I$x"
++ done
+ fi
+ if test -d "${AXIS2C_HOME}"/lib ; then
+ LDFLAGS="-L${AXIS2C_HOME}/lib ${LDFLAGS}"
+diff -ur eucalyptus-3.1.0.orig/configure.ac eucalyptus-3.1.0/configure.ac
+--- eucalyptus-3.1.0.orig/configure.ac 2012-08-16 23:14:00.587938882 -0400
++++ eucalyptus-3.1.0/configure.ac 2012-08-18 10:06:36.011376622 -0400
+@@ -124,6 +124,10 @@
+ for x in ${AXIS2C_HOME}/include/axis2-* ${AXIS2C_HOME}/include/rampart-*; do
+ INCLUDES="${INCLUDES} -I$x"
+ done
++ else
++ for x in /usr/include/axis2-* /usr/include/rampart-*; do
++ INCLUDES="${INCLUDES} -I$x"
++ done
+ fi
+ if test -d "${AXIS2C_HOME}"/lib ; then
+ LDFLAGS="-L${AXIS2C_HOME}/lib ${LDFLAGS}"
diff --git a/eucalyptus.spec b/eucalyptus.spec
new file mode 100644
index 0000000..35bd12f
--- /dev/null
+++ b/eucalyptus.spec
@@ -0,0 +1,879 @@
+%global axis2c_home %{_libdir}/wso2-axis2
+%global axis2c_services %{_libdir}/%{name}/axis2
+%global eucalibexecdir %{_libexecdir}/%{name}
+%global eucadatadir %{_datadir}/%{name}
+%global eucajavalibdir %{_datadir}/%{name}
+%global helperdir %{_datadir}/%{name}
+%global gittag b8c109b4
+%global with_axis2v14 0
+%global _hardened_build 1
+%global __provides_exclude_from ^%{_libdir}/%{name}/.*.so$
+
+%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
+
+Summary: Elastic Utility Computing Architecture
+Name: eucalyptus
+Version: 3.1.2
+Release: 0.6.20120917git%{gittag}%{?dist}
+License: GPLv3 and (GPLv3 and ASL 2.0) and (GPLv3 and BSD)
+URL: http://www.eucalyptus.com
+Group: Applications/System
+
+BuildRequires: help2man
+BuildRequires: java-devel >= 1:1.6.0
+BuildRequires: jpackage-utils
+BuildRequires: libvirt-devel >= 0.6
+BuildRequires: libxslt-devel
+BuildRequires: openssl-devel
+BuildRequires: python-boto >= 2.1
+BuildRequires: python-devel
+BuildRequires: python-setuptools
+BuildRequires: swig
+BuildRequires: wso2-axis2-devel
+BuildRequires: wso2-rampart-devel
+BuildRequires: wso2-wsf-cpp-devel
+BuildRequires: iscsi-initiator-utils
+BuildRequires: curl-devel
+BuildRequires: systemd-units
+
+BuildRequires: activemq-core
+BuildRequires: ant >= 1.7
+BuildRequires: antlr-tool
+BuildRequires: apache-commons-codec
+BuildRequires: apache-commons-compress
+BuildRequires: apache-commons-fileupload
+BuildRequires: apache-commons-io
+BuildRequires: apache-commons-lang
+BuildRequires: axiom
+# BuildRequires: axis2
+BuildRequires: backport-util-concurrent
+BuildRequires: batik
+BuildRequires: bcel
+BuildRequires: bouncycastle
+BuildRequires: btm
+BuildRequires: dnsjava
+# Should be a json-lib Requires
+BuildRequires: ezmorph
+BuildRequires: geronimo-jta
+BuildRequires: groovy
+BuildRequires: guava >= 9
+BuildRequires: ha-jdbc
+BuildRequires: hamcrest12
+BuildRequires: hibernate3
+BuildRequires: hibernate3-ehcache
+BuildRequires: hibernate3-entitymanager
+BuildRequires: hibernate3-jbosscache
+BuildRequires: hibernate3-proxool
+BuildRequires: hibernate-jpa-2.0-api
+BuildRequires: jakarta-commons-httpclient
+# NOTE: jasperreports is not yet used, but will be soon
+BuildRequires: jasperreports
+BuildRequires: javamail
+BuildRequires: jetty
+BuildRequires: jgroups212
+BuildRequires: jibx
+BuildRequires: jsch
+BuildRequires: json-lib
+BuildRequires: junit
+BuildRequires: log4j
+BuildRequires: mule-module-builders
+BuildRequires: mule-module-client
+BuildRequires: mule-module-xml
+BuildRequires: mule-transport-vm
+BuildRequires: netty31
+BuildRequires: springframework-context-support
+BuildRequires: springframework-web
+BuildRequires: tomcat-servlet-3.0-api
+BuildRequires: velocity
+BuildRequires: woodstox-core
+BuildRequires: wsdl4j
+BuildRequires: wss4j
+BuildRequires: xalan-j2
+BuildRequires: xml-commons-apis
+BuildRequires: xml-security
+# Should be a json-lib Requires
+BuildRequires: xom
+
+%if %with_axis2v14
+BuildRequires: axis2v14
+%endif
+
+Requires: vconfig
+Requires: wget
+Requires: rsync
+Requires: which
+Requires: libselinux-python
+Requires: perl(Crypt::OpenSSL::RSA)
+Requires: perl(Crypt::OpenSSL::Random)
+Requires: sudo
+Requires(pre): %{_sbindir}/groupadd
+Requires(pre): %{_sbindir}/useradd
+Requires(post): %{_sbindir}/euca_conf
+
+# git clone https://github.com/eucalyptus/eucalyptus.git; cd eucalyptus
+# git archive --prefix=eucalyptus-3.1.2gitb8c109b4/ -o eucalyptus-3.1.2gitb8c109b4.tar.gz b8c109b4
+Source0: eucalyptus-%{version}git%{gittag}.tar.gz
+# A version of WSDL2C.sh that respects standard classpaths
+Source1: euca-WSDL2C.sh
+Source2: eucalyptus-jarlinks.txt
+
+# XXX: these system units should go in the source tree
+Source3: eucalyptus-cloud.service
+Source4: eucalyptus-cc.service
+Source5: eucalyptus-nc.service
+
+# These are sources that greatly simplify CC/NC startup,
+# Removing dynamic config file generation and needless
+# guesswork about where axis2 files are.
+Source6: axis2.xml
+Source7: eucalyptus-cc.init
+Source8: eucalyptus-nc.init
+# Note that these needed to be adapted for httpd 2.4
+# See http://httpd.apache.org/docs/2.4/upgrading.html
+Source9: httpd-cc.conf
+Source10: httpd-nc.conf
+Source11: httpd-common.conf
+
+# Axis2/Java code generation is broken with v1.6
+# To regenerate this code:
+# 1) yum install http://arg.fedorapeople.org/axis2v14/noarch/axis2v14-1.4.1-1.fc18.noarch.rpm
+# 2) Set with_axis2v14 to 1
+# 3) fedpkg prep
+# 4) pushd eucalyptus-<version>git<tag>
+# 5) run configure from this spec (use rpmspec to fill in macros)
+# 6) for x in gatherlog cluster node; do pushd $x; make generated/stubs; popd; done
+# 7) popd
+# 8) tar czf eucalyptus-<version>git<tag>-generated.tgz \
+# eucalyptus-<version>git<tag>/{node,cluster,gatherlog}/generated
+%if !%with_axis2v14
+Source12: eucalyptus-%{version}git%{gittag}-generated.tgz
+%endif
+
+# Add a separate "clean" script for the CC
+Source13: eucalyptus-clean-cc
+
+# Add a new-style polkit rule
+Source14: eucalyptus-nc-libvirt.rules
+
+# Add tmpfiles config
+Source15: eucalyptus.tmpfiles
+
+# https://eucalyptus.atlassian.net/browse/EUCA-2364
+Patch0: eucalyptus-jdk7.patch
+# https://eucalyptus.atlassian.net/browse/EUCA-3253
+Patch2: eucalyptus-jetty8.patch
+# https://eucalyptus.atlassian.net/browse/EUCA-2993
+Patch4: eucalyptus-groovy18.patch
+
+# Three separate patches to disable gwt
+Patch9: eucalyptus-disable-gwt.patch
+Patch10: eucalyptus-disable-gwt-in-buildxml.patch
+Patch11: eucalyptus-disable-gwt-in-makefile.patch
+
+# Make install paths configurable
+# https://eucalyptus.atlassian.net/browse/EUCA-3531
+Patch13: eucalyptus-configurable-paths.patch
+
+# Make one repo per service of Axis2 services
+Patch14: eucalyptus-axis2-services.patch
+
+# Fix rootwrap path in python files
+Patch15: eucalyptus-rootwrap-python.patch
+
+# Fix include location for axis2 libs
+Patch16: eucalyptus-wso2-axis2-configure.patch
+
+# Use System.load with an absolute path for JNI lib load
+Patch18: eucalyptus-jni-abspath.patch
+
+# Move version file out of /etc
+Patch20: eucalyptus-move-version-file.patch
+
+# Respect LDFLAGS when building setuid binaries
+Patch21: eucalyptus-respect-ldflags.patch
+
+%description
+Eucalyptus is a service overlay that implements elastic computing
+using existing resources. The goal of Eucalyptus is to allow sites
+with existing clusters and server infrastructure to co-host an elastic
+computing service that is interface-compatible with Amazon AWS.
+
+This package contains the common parts; you will need to install at
+least one of the cloud controller (cloud), cluster controller (cc),
+node controller (nc), storage controller (sc), or walrus packages as well.
+
+%package common-java
+Summary: Elastic Utility Computing Architecture - ws java stack
+Requires: %{name} = %{version}-%{release}
+Requires: jpackage-utils
+Requires: java >= 1:1.6.0
+Requires: lvm2
+Requires: activemq-core
+Requires: ant
+Requires: antlr-tool
+Requires: apache-commons-codec
+Requires: apache-commons-collections
+Requires: apache-commons-compress
+Requires: apache-commons-fileupload
+Requires: apache-commons-io
+Requires: axiom
+Requires: backport-util-concurrent
+Requires: batik
+Requires: bcel
+Requires: bouncycastle
+Requires: btm
+Requires: dnsjava
+Requires: dom4j
+Requires: ezmorph
+Requires: geronimo-jms
+Requires: geronimo-jta
+Requires: groovy
+Requires: guava >= 9
+Requires: ha-jdbc
+Requires: hamcrest12
+Requires: hibernate3
+Requires: hibernate3-ehcache
+Requires: hibernate3-entitymanager
+Requires: hibernate3-jbosscache
+Requires: hibernate3-proxool
+Requires: hibernate-commons-annotations
+Requires: hibernate-jpa-2.0-api
+Requires: jakarta-commons-httpclient
+Requires: jasperreports
+Requires: javamail
+Requires: jetty
+Requires: jgroups212
+Requires: jibx
+Requires: jsch
+Requires: json-lib
+Requires: jsr-305
+Requires: log4j
+Requires: mule-module-builders
+Requires: mule-module-client
+Requires: mule-module-management
+Requires: mule-module-spring-config
+Requires: mule-module-xml
+Requires: mule-transport-vm
+Requires: mx4j
+Requires: netty31
+Requires: postgresql-jdbc
+Requires: proxool
+Requires: springframework-context-support
+Requires: springframework-web
+Requires: stax-utils
+Requires: tomcat-servlet-3.0-api
+Requires: velocity
+Requires: woodstox-core
+Requires: wsdl4j
+Requires: wss4j
+Requires: xalan-j2
+Requires: xml-commons-apis
+Requires: xml-security
+Requires: xom
+Requires: %{_sbindir}/euca_conf
+Requires(preun): systemd-units
+Requires(post): systemd-units
+
+%description common-java
+Eucalyptus is a service overlay that implements elastic computing
+using existing resources. The goal of Eucalyptus is to allow sites
+with existing clusters and server infrastructure to co-host an elastic
+computing service that is interface-compatible with Amazon AWS.
+
+This package contains the java WS stack.
+
+%package walrus
+Summary: Elastic Utility Computing Architecture - walrus
+Requires: %{name} = %{version}-%{release}
+Requires: %{name}-common-java = %{version}-%{release}
+Requires: drbd-utils
+Requires: lvm2
+
+%description walrus
+Eucalyptus is a service overlay that implements elastic computing
+using existing resources. The goal of Eucalyptus is to allow sites
+with existing clusters and server infrastructure to co-host an elastic
+computing service that is interface-compatible with Amazon AWS.
+
+This package contains storage component for your cloud: images and buckets
+are handled by walrus. Typically this package is installed alongside the
+cloud controller.
+
+%package sc
+Summary: Elastic Utility Computing Architecture - storage controller
+Requires: %{name} = %{version}-%{release}
+Requires: %{name}-common-java = %{version}-%{release}
+Requires: lvm2
+Requires: iscsi-initiator-utils
+Requires: scsi-target-utils
+
+%description sc
+Eucalyptus is a service overlay that implements elastic computing
+using existing resources. The goal of Eucalyptus is to allow sites
+with existing clusters and server infrastructure to co-host an elastic
+computing service that is interface-compatible with Amazon AWS.
+
+This package contains the storage controller part of eucalyptus, which
+handles the elastic blocks for a given cluster. Typically you install it
+alongside the cluster controller.
+
+%package cloud
+Summary: Elastic Utility Computing Architecture - cloud controller
+Requires: %{name} = %{version}-%{release}
+Requires: %{name}-common-java%{?_isa} = %{version}-%{release}
+Requires: euca2ools >= 2.0
+Requires: lvm2
+Requires: perl(Getopt::Long)
+Requires: postgresql
+Requires: postgresql-server
+
+# For reporting web UI
+# Requires: dejavu-serif-fonts
+
+%description cloud
+Eucalyptus is a service overlay that implements elastic computing
+using existing resources. The goal of Eucalyptus is to allow sites
+with existing clusters and server infrastructure to co-host an elastic
+computing service that is interface-compatible with Amazon AWS.
+
+This package contains the cloud controller part of eucalyptus. The cloud
+controller needs to be reachable by both the cluster controller and from
+the cloud clients.
+
+%package cc
+Summary: Elastic Utility Computing Architecture - cluster controller
+Requires: %{name} = %{version}-%{release}
+Requires: %{name}-gl = %{version}-%{release}
+Requires: bridge-utils
+Requires: iptables
+Requires: vtun
+Requires: dhcp
+Requires: httpd
+Requires: %{_sbindir}/euca_conf
+Requires: mod_wso2-axis2
+# XXX: I wish this were not "devel", but some modules are being
+# loaded without a version
+Requires: wso2-axis2-devel
+Requires: wso2-axis2-modules
+Requires(preun): systemd-units
+Requires(post): systemd-units
+
+%description cc
+Eucalyptus is a service overlay that implements elastic computing
+using existing resources. The goal of Eucalyptus is to allow sites
+with existing clusters and server infrastructure to co-host an elastic
+computing service that is interface-compatible with Amazon AWS.
+
+This package contains the cluster controller part of eucalyptus. It
+handles a group of node controllers.
+
+%package nc
+Summary: Elastic Utility Computing Architecture - node controller
+Requires: %{name} = %{version}-%{release}
+Requires: %{name}-gl = %{version}-%{release}
+Requires: bridge-utils
+Requires: device-mapper
+Requires: euca2ools >= 2.0
+# The next six come from storage/diskutil.c, which shells out to lots of stuff.
+Requires: coreutils
+Requires: e2fsprogs
+Requires: file
+Requires: grub2
+Requires: parted
+Requires: util-linux
+Requires: curl
+Requires: httpd
+Requires: kvm
+Requires: iscsi-initiator-utils
+Requires: libvirt
+Requires: mod_wso2-axis2
+# XXX: I wish this were not "devel", but some modules are being
+# loaded without a version
+Requires: wso2-axis2-devel
+Requires: wso2-axis2-modules
+Requires: %{_sbindir}/euca_conf
+Requires(preun): systemd-units
+Requires(post): systemd-units
+
+%description nc
+Eucalyptus is a service overlay that implements elastic computing
+using existing resources. The goal of Eucalyptus is to allow sites
+with existing clusters and server infrastructure to co-host an elastic
+computing service that is interface-compatible with Amazon AWS.
+
+This package contains the node controller part of eucalyptus. This
+component handles instances.
+
+%package gl
+Summary: Elastic Utility Computing Architecture - log service
+Requires: %{name} = %{version}-%{release}
+Requires: httpd
+
+%description gl
+Eucalyptus is a service overlay that implements elastic computing
+using existing resources. The goal of Eucalyptus is to allow sites
+with existing clusters and server infrastructure to co-host an elastic
+computing service that is interface-compatible with Amazon AWS.
+
+This package contains the internal log service of eucalyptus.
+
+%package admin-tools
+Summary: Elastic Utility Computing Architecture - admin CLI tools
+License: BSD
+Requires: %{name} = %{version}-%{release}
+Requires: python-eucadmin = %{version}-%{release}
+Requires: rsync
+BuildArch: noarch
+
+%description admin-tools
+Eucalyptus is a service overlay that implements elastic computing
+using existing resources. The goal of Eucalyptus is to allow sites
+with existing clusters and server infrastructure to co-host an elastic
+computing service that is interface-compatible with Amazon AWS.
+
+This package contains command line tools necessary for managing a
+Eucalyptus cluster.
+
+%package -n python-eucadmin
+Summary: Elastic Utility Computing Architecture - administration Python library
+License: BSD
+Requires: PyGreSQL
+Requires: python-boto >= 2.1
+Requires: rsync
+BuildArch: noarch
+
+%description -n python-eucadmin
+Eucalyptus is a service overlay that implements elastic computing
+using existing resources. The goal of Eucalyptus is to allow sites
+with existing clusters and server infrastructure to co-host an elastic
+computing service that is interface-compatible with Amazon AWS.
+
+This package contains the Python library used by Eucalyptus administration
+tools. It is neither intended nor supported for use by any other programs.
+
+%package axis2-clients
+Summary: Axis2/C web service clients for Eucalyptus services
+License: GPLv3
+Requires: wso2-axis2
+Requires: %{name}-cc = %{version}-%{release}
+
+%description axis2-clients
+This package contains three debugging programs for testing Eucalyptus
+components which run as Axis2/C webservices.
+
+%prep
+%setup -q -n %{name}-%{version}git%{gittag}
+%if !%with_axis2v14
+tar --strip-components=1 -xvzf %{SOURCE12}
+touch gatherlog/generated/stubs cluster/generated/stubs node/generated/stubs
+%endif
+%patch0 -p1
+%patch2 -p1
+%patch4 -p1
+%patch9 -p1
+%patch10 -p1
+%patch11 -p1
+%patch13 -p1
+%patch14 -p1
+%patch15 -p1
+%patch16 -p1
+%patch18 -p1
+%patch20 -p1
+%patch21 -p1
+
+# remove classes which depend on junit
+# This is because junit on Fedora bundles hamcrest 1.1, which has conflicts
+# with hamcrest 1.2. And regardless, these should not be bundled into our
+# production jars.
+pushd clc/modules
+rm core/src/main/java/edu/ucsb/eucalyptus/util/XMLParserTest.java
+rm dns/src/main/java/com/eucalyptus/cloud/ws/tests/DNSControlTest.java
+rm dns/src/main/java/com/eucalyptus/cloud/ws/tests/RemoveARecordTest.java
+rm storage-controller/src/main/java/edu/ucsb/eucalyptus/cloud/ws/tests/CreateVolumeFromSnapshotTest.java
+rm storage-controller/src/main/java/edu/ucsb/eucalyptus/cloud/ws/tests/StorageTests.java
+rm storage-controller/src/main/java/edu/ucsb/eucalyptus/cloud/ws/tests/VolumeTest.java
+rm storage-controller/src/main/java/edu/ucsb/eucalyptus/cloud/ws/tests/DeleteSnapshotTest.java
+rm storage-controller/src/main/java/edu/ucsb/eucalyptus/cloud/ws/tests/CreateSnapshotTest.java
+rm walrus/src/main/java/edu/ucsb/eucalyptus/cloud/ws/tests/ImageCacheTest.java
+rm walrus/src/main/java/edu/ucsb/eucalyptus/cloud/ws/tests/BukkitImageTest.java
+rm walrus/src/main/java/edu/ucsb/eucalyptus/cloud/ws/tests/BukkitTest.java
+rm walrus/src/main/java/edu/ucsb/eucalyptus/cloud/ws/tests/ObjectTest.java
+rm walrus/src/main/java/edu/ucsb/eucalyptus/cloud/ws/tests/WalrusBucketTests.java
+popd
+
+# Do not redistribute a binary floppy image
+# We should have a script to reconstruct this
+echo -n > tools/floppy
+
+%build
+export CFLAGS="%{optflags}"
+export LDFLAGS="$RPM_LD_FLAGS"
+
+# TODO: we should use %%configure now, except that "prefix" is still broken
+# Also, helperdir sould be a config option, unless we decide that
+# it's always eucadatadir
+./configure --with-axis2=%{_datadir}/axis2-* \
+ --with-axis2c=%{axis2c_home} \
+ --with-axis2c-services=%{axis2c_services} \
+ --with-wsdl2c-sh=%{SOURCE1} \
+ --enable-debug \
+ --prefix=/ \
+ --sbindir=%{_sbindir} \
+ --libexecdir=%{_libexecdir} \
+ --libdir=%{_libdir} \
+ --datarootdir=%{_datadir} \
+ --localstatedir=%{_localstatedir} \
+ --sysconfdir=%{_sysconfdir} \
+ --with-apache2-module-dir=%{_libdir}/httpd/modules \
+ --with-db-home=/usr \
+ --with-extra-version=%{release}
+
+# symlink java deps
+mkdir clc/lib
+for x in $( cat %{SOURCE2} );
+do
+ if [ ! -e $x ]; then
+ echo "Could not find $x"
+ exit 1
+ fi
+ ln -s $x clc/lib/;
+done
+
+# FIXME: storage/Makefile breaks with parallel make
+make # %{?_smp_mflags}
+pushd clc/eucadmin
+( export PYTHONPATH=.; python gen_manpages.py )
+popd
+
+%install
+make install DESTDIR=$RPM_BUILD_ROOT
+for x in $( cat %{SOURCE2} | grep -v junit4 );
+do
+ rm $RPM_BUILD_ROOT%{eucajavalibdir}/$( basename $x )
+ ln -s $x $RPM_BUILD_ROOT%{eucajavalibdir}
+done
+rm $RPM_BUILD_ROOT%{eucajavalibdir}/junit4*
+
+# Fix jar paths and replace them with symlinks
+mkdir -p $RPM_BUILD_ROOT%{_javadir}/%{name}
+for x in $RPM_BUILD_ROOT%{eucajavalibdir}/eucalyptus-*.jar; do
+ if [ $( basename $x ) == "eucalyptus-storagecontroller-%{version}.jar" ]; then
+ DESTFILE=%{_libdir}/%{name}/$( basename $x )
+ else
+ DESTFILE=%{_javadir}/%{name}/$( basename $x )
+ fi
+ mv $x $RPM_BUILD_ROOT$DESTFILE
+ ln -s $DESTFILE $RPM_BUILD_ROOT/%{eucajavalibdir}/
+done
+
+# Link jars not needed at build time
+for jar in mule/mule-module-management \
+ postgresql-jdbc \
+ avalon-framework-impl \
+ avalon-logkit \
+ proxool \
+ mx4j/mx4j-impl \
+ mx4j/mx4j \
+ mx4j/mx4j-jmx \
+ mx4j/mx4j-remote \
+ mx4j/mx4j-tools; do
+ ln -s /usr/share/java/${jar}.jar $RPM_BUILD_ROOT%{eucajavalibdir}
+done
+
+pushd clc/eucadmin/man
+mkdir -p $RPM_BUILD_ROOT/%{_mandir}/man1
+cp -p * $RPM_BUILD_ROOT/%{_mandir}/man1
+popd
+
+sed -i -e 's#.*EUCALYPTUS=.*#EUCALYPTUS="/"#' \
+ -e 's#.*HYPERVISOR=.*#HYPERVISOR="kvm"#' \
+ -e 's#.*INSTANCE_PATH=.*#INSTANCE_PATH="/var/lib/%{name}/instances"#' \
+ -e 's#.*VNET_BRIDGE=.*#VNET_BRIDGE="br0"#' \
+ -e 's#.*USE_VIRTIO_DISK=.*#USE_VIRTIO_DISK="1"#' \
+ -e 's#.*USE_VIRTIO_ROOT=.*#USE_VIRTIO_ROOT="1"#' \
+ -e 's#.*VNET_PUBINTERFACE=.*#VNET_PUBINTERFACE="em1"#' \
+ -e 's#.*VNET_PRIVINTERFACE=.*#VNET_PRIVINTERFACE="em1"#' \
+ $RPM_BUILD_ROOT/etc/%{name}/eucalyptus.conf
+
+# Move init scripts into sbindir and call them from systemd
+mv $RPM_BUILD_ROOT/etc/init.d/eucalyptus-cloud \
+ $RPM_BUILD_ROOT/%{_libexecdir}/%{name}/eucalyptus-cloud.init
+rm -rf $RPM_BUILD_ROOT/etc/init.d
+cp -p %{SOURCE7} $RPM_BUILD_ROOT/%{_libexecdir}/%{name}/eucalyptus-cc.init
+cp -p %{SOURCE8} $RPM_BUILD_ROOT/%{_libexecdir}/%{name}/eucalyptus-nc.init
+sed -i -e "s#@LIBDIR@#%{_libdir}#" $RPM_BUILD_ROOT/%{_libexecdir}/%{name}/eucalyptus-cc.init
+sed -i -e "s#@LIBDIR@#%{_libdir}#" $RPM_BUILD_ROOT/%{_libexecdir}/%{name}/eucalyptus-nc.init
+
+cp -p %{SOURCE13} $RPM_BUILD_ROOT/%{_sbindir}/eucalyptus-clean-cc
+
+# Make a server root for apache
+mkdir -p $RPM_BUILD_ROOT/etc/%{name}/httpd/conf/
+cp -p %{SOURCE9} $RPM_BUILD_ROOT/etc/%{name}/httpd/conf/httpd-cc.conf
+cp -p %{SOURCE10} $RPM_BUILD_ROOT/etc/%{name}/httpd/conf/httpd-nc.conf
+cp -p %{SOURCE11} $RPM_BUILD_ROOT/etc/%{name}/httpd/conf/httpd-common.conf
+ln -s %{_libdir}/httpd/modules $RPM_BUILD_ROOT/etc/%{name}/httpd/modules
+rm $RPM_BUILD_ROOT/etc/%{name}/httpd.conf
+
+sed -i -e "s#@EUCAAXIS2HOME@#%{axis2c_services}#" $RPM_BUILD_ROOT/etc/%{name}/httpd/conf/httpd-nc.conf
+sed -i -e "s#@EUCAAXIS2HOME@#%{axis2c_services}#" $RPM_BUILD_ROOT/etc/%{name}/httpd/conf/httpd-cc.conf
+
+# Create the directories where components store their data
+mkdir -p $RPM_BUILD_ROOT/var/lib/%{name}
+touch $RPM_BUILD_ROOT/var/lib/%{name}/services
+for dir in bukkits CC db keys ldap upgrade vmware volumes webapps; do
+ install -d -m 0700 $RPM_BUILD_ROOT/var/lib/%{name}/$dir
+done
+install -d -m 0771 $RPM_BUILD_ROOT/var/lib/%{name}/instances
+
+# Add PolicyKit config on systems that support it
+mkdir -p $RPM_BUILD_ROOT/usr/share/polkit-1/rules.d/
+cp -p %{SOURCE14} $RPM_BUILD_ROOT/usr/share/polkit-1/rules.d/eucalyptus-nc-libvirt.rules
+
+# Install systemd service files
+mkdir -p $RPM_BUILD_ROOT%{_unitdir}
+install -p -m 644 %{SOURCE3} \
+ $RPM_BUILD_ROOT%{_unitdir}/eucalyptus-cloud.service
+install -p -m 644 %{SOURCE4} \
+ $RPM_BUILD_ROOT%{_unitdir}/eucalyptus-cc.service
+install -p -m 644 %{SOURCE5} \
+ $RPM_BUILD_ROOT%{_unitdir}/eucalyptus-nc.service
+
+# Copy axis2.xml into /etc for now, and symlink it
+install -m 644 %{SOURCE6} \
+ $RPM_BUILD_ROOT/etc/%{name}/axis2.xml
+
+# add a mess of symlinks
+ln -s /etc/%{name}/axis2.xml $RPM_BUILD_ROOT%{axis2c_services}/cc/
+ln -s /etc/%{name}/axis2.xml $RPM_BUILD_ROOT%{axis2c_services}/nc/
+ln -s %{_libdir}/wso2-axis2/modules $RPM_BUILD_ROOT%{axis2c_services}/cc/
+ln -s %{_libdir}/wso2-axis2/modules $RPM_BUILD_ROOT%{axis2c_services}/nc/
+ln -s %{_libdir} $RPM_BUILD_ROOT%{axis2c_services}/cc/lib
+ln -s %{_libdir} $RPM_BUILD_ROOT%{axis2c_services}/nc/lib
+ln -s %{axis2c_services}/gl/services/EucalyptusGL $RPM_BUILD_ROOT%{axis2c_services}/cc/services
+ln -s %{axis2c_services}/gl/services/EucalyptusGL $RPM_BUILD_ROOT%{axis2c_services}/nc/services
+
+# Install axis2 test client files
+install -d -m 755 $RPM_BUILD_ROOT%{_bindir}
+install -m 755 gatherlog/GLclient $RPM_BUILD_ROOT%{_bindir}
+install -m 755 node/NCclient $RPM_BUILD_ROOT%{_bindir}
+install -m 755 cluster/CCclient_full $RPM_BUILD_ROOT%{_bindir}/CCclient
+
+# Fix some file permissions found by rpmlint
+chmod -x $RPM_BUILD_ROOT/var/lib/%{name}/keys/nc-client-policy.xml
+chmod -x $RPM_BUILD_ROOT/var/lib/%{name}/keys/cc-client-policy.xml
+chmod -x $RPM_BUILD_ROOT%{axis2c_services}/cc/services/EucalyptusCC/eucalyptus_cc.wsdl
+chmod -x $RPM_BUILD_ROOT%{axis2c_services}/cc/services/EucalyptusCC/services.xml
+chmod -x $RPM_BUILD_ROOT%{axis2c_services}/gl/services/EucalyptusGL/eucalyptus_gl.wsdl
+chmod -x $RPM_BUILD_ROOT%{axis2c_services}/gl/services/EucalyptusGL/services.xml
+chmod -x $RPM_BUILD_ROOT%{axis2c_services}/nc/services/EucalyptusNC/services.xml
+chmod -x $RPM_BUILD_ROOT%{_datadir}/eucalyptus/floppy
+
+# This file is no longer needed, and was not even ported from MySQL to PostGreSQL
+rm $RPM_BUILD_ROOT%{python_sitelib}/eucadmin/local.py*
+
+# This is not the ideal way to set kernel parameters. We'll deal with this
+# via documentation for now.
+rm $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/cloud.d/init.d/01_pg_kernel_params
+
+# Move cloud.d directories which aren't config files. We need symlinks
+# for now, though.
+mv $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/cloud.d/scripts \
+ $RPM_BUILD_ROOT%{_libexecdir}/%{name}/scripts
+mv $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/cloud.d/upgrade \
+ $RPM_BUILD_ROOT%{_libexecdir}/%{name}/upgrade
+ln -s %{_libexecdir}/%{name}/scripts \
+ $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/cloud.d/
+ln -s %{_libexecdir}/%{name}/upgrade \
+ $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/cloud.d/
+
+# doc fixups
+mv $RPM_BUILD_ROOT%{_docdir}/%{name} $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
+mv $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/drbd.conf.example \
+ $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}/
+
+# install tmpfiles config
+install -d -m 755 $RPM_BUILD_ROOT/etc/tmpfiles.d
+install -m 0644 %{SOURCE15} $RPM_BUILD_ROOT/etc/tmpfiles.d/%{name}
+
+%files
+%doc LICENSE README CHANGELOG
+# Eucalyptus initialization fails if the eucalyptus user
+# cannot write this file.
+%config(noreplace) %attr(-,eucalyptus,eucalyptus) /etc/%{name}/eucalyptus.conf
+%{_datadir}/%{name}/eucalyptus-version
+%config(noreplace) /etc/%{name}/axis2.xml
+%dir /etc/%{name}/httpd
+%dir /etc/%{name}/httpd/conf
+%config(noreplace) /etc/%{name}/httpd/conf/httpd-common.conf
+%config /etc/tmpfiles.d/%{name}
+/etc/%{name}/httpd/modules
+%attr(-,root,root) %dir %{eucalibexecdir}
+%attr(4750,root,eucalyptus) %{eucalibexecdir}/euca_mountwrap
+%attr(4750,root,eucalyptus) %{eucalibexecdir}/euca_rootwrap
+%dir %{eucadatadir}
+%{_sbindir}/euca_sync_key
+
+# helperdir is either eucadatadir or eucalibexecdir
+%{helperdir}/add_key.pl
+%{helperdir}/connect_iscsitarget.pl
+%{helperdir}/create-loop-devices
+%{helperdir}/disconnect_iscsitarget.pl
+%{helperdir}/euca_ipt
+%{helperdir}/euca_upgrade
+%{helperdir}/floppy
+%{helperdir}/get_iscsitarget.pl
+%{helperdir}/populate_arp.pl
+%attr(-,eucalyptus,eucalyptus) %dir /var/lib/%{name}
+%attr(-,eucalyptus,eucalyptus) %dir /var/lib/%{name}/db
+%attr(-,eucalyptus,eucalyptus) %dir /var/lib/%{name}/keys
+%attr(-,eucalyptus,eucalyptus) %dir /var/lib/%{name}/upgrade
+# Can this file go into a single-component package? What uses it?
+/var/lib/%{name}/keys/cc-client-policy.xml
+%attr(-,eucalyptus,eucalyptus) %dir /var/log/%{name}
+%attr(-,eucalyptus,eucalyptus) %dir /var/run/%{name}
+
+%files common-java
+%{_unitdir}/eucalyptus-cloud.service
+%{_libexecdir}/%{name}/eucalyptus-cloud.init
+# cloud.d contains random stuff used by every Java component. Most of it
+# probably belongs in /usr/share, but moving it will be painful.
+%{_sysconfdir}/%{name}/cloud.d/
+%{_libexecdir}/%{name}/scripts/
+%{_libexecdir}/%{name}/upgrade/
+%{_sbindir}/eucalyptus-cloud
+%{eucajavalibdir}/*jar*
+%{_javadir}/%{name}/*jar*
+%{_libdir}/%{name}/eucalyptus-storagecontroller-%{version}.jar
+%ghost /var/lib/%{name}/services
+%attr(-,eucalyptus,eucalyptus) /var/lib/%{name}/webapps/
+
+%files cloud
+%{_sbindir}/euca-lictool
+%{eucadatadir}/lic_default
+%{eucadatadir}/lic_template
+
+%files walrus
+%attr(-,eucalyptus,eucalyptus) %dir /var/lib/%{name}/bukkits
+%doc %{_docdir}/%{name}-%{version}/drbd.conf.example
+
+%files sc
+%attr(-,eucalyptus,eucalyptus) %dir /var/lib/%{name}/volumes
+%{helperdir}/connect_iscsitarget_sc.pl
+%{helperdir}/disconnect_iscsitarget_sc.pl
+%{_libdir}/eucalyptus/liblvm2control.so
+
+%files cc
+%{_unitdir}/eucalyptus-cc.service
+%{_libexecdir}/%{name}/eucalyptus-cc.init
+%{axis2c_services}/cc
+%attr(-,eucalyptus,eucalyptus) %dir /var/lib/%{name}/CC
+%config(noreplace) /etc/%{name}/httpd/conf/httpd-cc.conf
+%{_datadir}/%{name}/vtunall.conf.template
+%attr(0755,root,root) %{_libexecdir}/eucalyptus/shutdownCC
+%{_sbindir}/eucalyptus-clean-cc
+%{helperdir}/dynserv.pl
+# Is this used?
+/var/lib/%{name}/keys/nc-client-policy.xml
+
+%files nc
+%config(noreplace) /etc/%{name}/libvirt.xsl
+%dir /etc/%{name}/nc-hooks
+/etc/%{name}/nc-hooks/example.sh
+%{_unitdir}/eucalyptus-nc.service
+%{_libexecdir}/%{name}/eucalyptus-nc.init
+%{axis2c_services}/nc
+%attr(-,eucalyptus,eucalyptus) %dir /var/lib/%{name}/instances
+%config(noreplace) /etc/%{name}/httpd/conf/httpd-nc.conf
+%{_sbindir}/euca_test_nc
+%{helperdir}/detach.pl
+%{helperdir}/gen_kvm_libvirt_xml
+%{helperdir}/gen_libvirt_xml
+%{helperdir}/getstats.pl
+%{helperdir}/get_sys_info
+%{helperdir}/get_xen_info
+%{helperdir}/partition2disk
+/usr/share/polkit-1/rules.d/eucalyptus-nc-libvirt.rules
+%{_docdir}/%{name}-%{version}/libvirt*
+
+%files gl
+%{axis2c_services}/gl
+
+# NB: the vmware tools packaged here only work against Eucalyptus
+# Enterprise plugins, but the client and server may be different
+# systems, so it's reasonable to package these commands here.
+%files admin-tools
+%{_sbindir}/euca_conf
+%{_sbindir}/euca-configure-vmware
+%{_sbindir}/euca-deregister-arbitrator
+%{_sbindir}/euca-deregister-cloud
+%{_sbindir}/euca-deregister-cluster
+%{_sbindir}/euca-deregister-storage-controller
+%{_sbindir}/euca-deregister-vmware-broker
+%{_sbindir}/euca-deregister-walrus
+%{_sbindir}/euca-describe-arbitrators
+%{_sbindir}/euca-describe-clouds
+%{_sbindir}/euca-describe-clusters
+%{_sbindir}/euca-describe-components
+%{_sbindir}/euca-describe-nodes
+%{_sbindir}/euca-describe-properties
+%{_sbindir}/euca-describe-services
+%{_sbindir}/euca-describe-storage-controllers
+%{_sbindir}/euca-describe-vmware-brokers
+%{_sbindir}/euca-describe-walruses
+%{_sbindir}/euca-get-credentials
+%{_sbindir}/euca-modify-cluster
+%{_sbindir}/euca-modify-property
+%{_sbindir}/euca-modify-service
+%{_sbindir}/euca-modify-storage-controller
+%{_sbindir}/euca-modify-walrus
+%{_sbindir}/euca-register-arbitrator
+%{_sbindir}/euca-register-cloud
+%{_sbindir}/euca-register-cluster
+%{_sbindir}/euca-register-storage-controller
+%{_sbindir}/euca-register-vmware-broker
+%{_sbindir}/euca-register-walrus
+%{_mandir}/man1/*
+
+%files -n python-eucadmin
+%{python_sitelib}/eucadmin*
+
+%files axis2-clients
+%{_bindir}/NCclient
+%{_bindir}/CCclient
+%{_bindir}/GLclient
+
+%pre
+getent group eucalyptus >/dev/null || groupadd -r eucalyptus
+## FIXME: Make QA (and Eucalyptus proper?) work with /sbin/nologin as the shell [RT:2092]
+#getent passwd eucalyptus >/dev/null || \
+# useradd -r -g eucalyptus -d /var/lib/%{name} -s /sbin/nologin \
+# -c 'Eucalyptus' eucalyptus
+getent passwd eucalyptus >/dev/null || \
+ useradd -r -g eucalyptus -d /var/lib/%{name} \
+ -c 'Eucalyptus' eucalyptus
+
+%post
+udevadm control --reload-rules
+
+%post common-java
+%{systemd_post} eucalyptus-cloud.service
+
+%post cc
+%{systemd_post} eucalyptus-cc.service
+
+%post nc
+usermod -a -G kvm eucalyptus
+%{systemd_post} eucalyptus-nc.service
+
+%preun common-java
+%{systemd_preun} eucalyptus-cloud.service
+
+%preun cc
+%{systemd_preun} eucalyptus-cc.service
+
+%preun nc
+%{systemd_preun} eucalyptus-nc.service
+
+%changelog
+* Tue Oct 09 2012 Andy Grimm <agirmm at gmail.com> - 3.1.2-0.6.20120917gitb8c109b4
+- First official Fedora build
diff --git a/eucalyptus.tmpfiles b/eucalyptus.tmpfiles
new file mode 100644
index 0000000..4cc131f
--- /dev/null
+++ b/eucalyptus.tmpfiles
@@ -0,0 +1 @@
+d /var/run/eucalyptus 755 eucalyptus eucalyptus
diff --git a/httpd-cc.conf b/httpd-cc.conf
new file mode 100644
index 0000000..ddb60ba
--- /dev/null
+++ b/httpd-cc.conf
@@ -0,0 +1,23 @@
+#
+# This is the apache config for eucalyptus: we use it only to load the
+# axis2c module which will take care of the WebServices
+#
+
+ServerRoot "/etc/eucalyptus/httpd"
+
+Include conf/httpd-common.conf
+
+Listen 8774
+
+PidFile /var/run/eucalyptus/eucalyptus-cc.pid
+
+ErrorLog /var/log/eucalyptus/httpd-cc_error_log
+
+Axis2RepoPath /usr/lib64/eucalyptus/axis2/cc
+Axis2LogFile /var/log/eucalyptus/axis2-cc.log
+Axis2MaxLogFileSize 128
+Axis2LogLevel info
+<Location /axis2>
+ SetHandler axis2_module
+</Location>
+
diff --git a/httpd-common.conf b/httpd-common.conf
new file mode 100644
index 0000000..a72560c
--- /dev/null
+++ b/httpd-common.conf
@@ -0,0 +1,32 @@
+#
+# This is the apache config for eucalyptus: we use it only to load the
+# axis2c module which will take care of the WebServices
+#
+
+ServerTokens OS
+
+ServerRoot "/etc/eucalyptus/httpd"
+
+ServerName 127.0.0.1
+
+KeepAliveTimeout 30
+
+User eucalyptus
+Group eucalyptus
+
+LogLevel info
+
+<IfModule authz_host>
+ <Directory />
+ Order deny,allow
+ Allow from all
+ Deny from all
+ </Directory>
+</IfModule>
+
+LoadModule authz_host_module modules/mod_authz_host.so
+LoadModule axis2_module modules/mod_axis2.so
+LoadModule mpm_event_module modules/mod_mpm_event.so
+LoadModule authn_core_module modules/mod_authn_core.so
+LoadModule authz_core_module modules/mod_authz_core.so
+LoadModule unixd_module modules/mod_unixd.so
diff --git a/httpd-nc.conf b/httpd-nc.conf
new file mode 100644
index 0000000..1067a30
--- /dev/null
+++ b/httpd-nc.conf
@@ -0,0 +1,23 @@
+#
+# This is the apache config for eucalyptus: we use it only to load the
+# axis2c module which will take care of the WebServices
+#
+
+ServerRoot "/etc/eucalyptus/httpd"
+
+Include conf/httpd-common.conf
+
+Listen 8775
+
+PidFile /var/run/eucalyptus/eucalyptus-nc.pid
+
+ErrorLog /var/log/eucalyptus/httpd-nc_error_log
+
+Axis2RepoPath /usr/lib64/eucalyptus/axis2/nc/
+Axis2LogFile /var/log/eucalyptus/axis2-nc.log
+Axis2MaxLogFileSize 128
+Axis2LogLevel debug
+<Location /axis2>
+ SetHandler axis2_module
+</Location>
+
diff --git a/sources b/sources
index e69de29..0aa2199 100644
--- a/sources
+++ b/sources
@@ -0,0 +1,2 @@
+d69b0368c5a0d5415f02aea218dbb1b4 eucalyptus-3.1.2gitb8c109b4-generated.tgz
+c76a0825ffebf75285ee3fdc3f90cbcb eucalyptus-3.1.2gitb8c109b4.tar.gz
More information about the scm-commits
mailing list