[eucalyptus] Fix build issues caused by Jetty 9 update

Andy Grimm arg at fedoraproject.org
Fri Mar 1 21:57:53 UTC 2013


commit 851034e39c57e3997ff93efe65b16e11134fcf0d
Author: Andy Grimm <agrimm at gmail.com>
Date:   Fri Mar 1 16:57:43 2013 -0500

    Fix build issues caused by Jetty 9 update

 eucalyptus-jarlinks.txt           |    5 --
 eucalyptus-jetty-logging.patch    |   33 +++++++++++++
 eucalyptus-jetty-ssl-config.patch |   95 +++++++++++++++++++++++++++++++++++++
 eucalyptus.spec                   |   31 +++++++++++-
 4 files changed, 157 insertions(+), 7 deletions(-)
---
diff --git a/eucalyptus-jarlinks.txt b/eucalyptus-jarlinks.txt
index bc2e32c..0d00c85 100644
--- a/eucalyptus-jarlinks.txt
+++ b/eucalyptus-jarlinks.txt
@@ -54,7 +54,6 @@
 /usr/share/java/jboss-connector-1.6-api.jar
 /usr/share/java/jboss-logging/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
@@ -63,18 +62,14 @@
 /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
diff --git a/eucalyptus-jetty-logging.patch b/eucalyptus-jetty-logging.patch
new file mode 100644
index 0000000..d40981f
--- /dev/null
+++ b/eucalyptus-jetty-logging.patch
@@ -0,0 +1,33 @@
+diff -urN eucalyptus-3.2.1/clc/modules/core/src/main/java/edu/ucsb/eucalyptus/cloud/entities/WalrusInfo.java eucalyptus-3.2.1.new/clc/modules/core/src/main/java/edu/ucsb/eucalyptus/cloud/entities/WalrusInfo.java
+--- eucalyptus-3.2.1/clc/modules/core/src/main/java/edu/ucsb/eucalyptus/cloud/entities/WalrusInfo.java	2013-02-28 14:02:03.161907116 -0500
++++ eucalyptus-3.2.1.new/clc/modules/core/src/main/java/edu/ucsb/eucalyptus/cloud/entities/WalrusInfo.java	2013-02-28 22:02:51.845870758 -0500
+@@ -225,7 +225,7 @@
+       capacity = (capacity > 1 ? capacity - 1 : capacity);
+       
+     } catch(Exception e) {
+-      Log.warn("Unable to detect usable space in the directory:" + WalrusProperties.bucketRootDirectory + " because of exception: " + e.getMessage() + ". Using Walrus default: " + WalrusProperties.DEFAULT_INITIAL_CAPACITY + "GB");
++      // Log.warn("Unable to detect usable space in the directory:" + WalrusProperties.bucketRootDirectory + " because of exception: " + e.getMessage() + ". Using Walrus default: " + WalrusProperties.DEFAULT_INITIAL_CAPACITY + "GB");
+     }
+     return capacity;
+ 	}
+diff -urN eucalyptus-3.2.1/clc/modules/msgs/src/main/java/com/eucalyptus/ws/handlers/http/NioHttpDecoder.java eucalyptus-3.2.1.new/clc/modules/msgs/src/main/java/com/eucalyptus/ws/handlers/http/NioHttpDecoder.java
+--- eucalyptus-3.2.1/clc/modules/msgs/src/main/java/com/eucalyptus/ws/handlers/http/NioHttpDecoder.java	2013-02-28 14:02:03.160907102 -0500
++++ eucalyptus-3.2.1.new/clc/modules/msgs/src/main/java/com/eucalyptus/ws/handlers/http/NioHttpDecoder.java	2013-02-28 22:03:07.611087579 -0500
+@@ -482,7 +482,7 @@
+   }
+ 
+   private int getChunkSize( String hex ) {
+-    Log.info( "Chunk Size Hex to parse:" + hex );
++    // Log.info( "Chunk Size Hex to parse:" + hex );
+     hex = hex.replaceAll( "\\W", "" ).trim( );
+     for ( int i = 0; i < hex.length( ); i++ ) {
+       char c = hex.charAt( i );
+@@ -491,7 +491,7 @@
+         break;
+       }
+     }
+-    Log.info( "Chunk Size in Hex:" + hex );
++    // Log.info( "Chunk Size in Hex:" + hex );
+     return Integer.parseInt( hex, 16 );
+   }
+ 
diff --git a/eucalyptus-jetty-ssl-config.patch b/eucalyptus-jetty-ssl-config.patch
new file mode 100644
index 0000000..ec1caf2
--- /dev/null
+++ b/eucalyptus-jetty-ssl-config.patch
@@ -0,0 +1,95 @@
+diff -urN eucalyptus-3.2.1.new/clc/modules/www/src/main/java/com/eucalyptus/bootstrap/HttpServerBootstrapper.java eucalyptus-3.2.1/clc/modules/www/src/main/java/com/eucalyptus/bootstrap/HttpServerBootstrapper.java
+--- eucalyptus-3.2.1.new/clc/modules/www/src/main/java/com/eucalyptus/bootstrap/HttpServerBootstrapper.java	2013-02-28 14:02:03.160907102 -0500
++++ eucalyptus-3.2.1/clc/modules/www/src/main/java/com/eucalyptus/bootstrap/HttpServerBootstrapper.java	2013-03-01 09:13:04.881625622 -0500
+@@ -70,7 +70,7 @@
+ import java.nio.channels.SocketChannel;
+ import org.apache.log4j.Logger;
+ import org.eclipse.jetty.server.Server;
+-import org.eclipse.jetty.server.ssl.SslSelectChannelConnector;
++// 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;
+@@ -252,7 +252,7 @@
+     }
+   }
+ 
+-  public static final class ConfiguredSslSelectChannelConnector extends SslSelectChannelConnector {
++  /* public static final class ConfiguredSslSelectChannelConnector extends SslSelectChannelConnector {
+     protected SSLEngine createSSLEngine() throws IOException {
+       SocketChannel channel = SocketChannel.open();
+       return super.createSSLEngine(channel);
+@@ -264,5 +264,5 @@
+       engine.setEnabledCipherSuites( getEnabledCipherSuites(HTTPS_CIPHERS, engine.getSupportedCipherSuites()) );
+       return engine;
+     }
+-  }
++  } */
+ }
+diff -urN eucalyptus-3.2.1.new/clc/modules/www/src/main/resources/eucalyptus-jetty.xml eucalyptus-3.2.1/clc/modules/www/src/main/resources/eucalyptus-jetty.xml
+--- eucalyptus-3.2.1.new/clc/modules/www/src/main/resources/eucalyptus-jetty.xml	2013-02-28 14:02:03.161907116 -0500
++++ eucalyptus-3.2.1/clc/modules/www/src/main/resources/eucalyptus-jetty.xml	2013-03-01 09:09:47.611172790 -0500
+@@ -63,26 +63,47 @@
+   -->
+ 
+ <Configure id="Server" class="org.eclipse.jetty.server.Server">
++  <!-- =========================================================== -->
++  <!-- Setup the SSL Context factory used to establish all TLS     -->
++  <!-- Connections and session.                                    -->
++  <!--                                                             -->
++  <!-- Consult the javadoc of o.e.j.util.ssl.SslContextFactory     -->
++  <!-- o.e.j.server.HttpConnectionFactory for all configuration    -->
++  <!-- that may be set here.                                       -->
++  <!-- =========================================================== -->
++  <New id="sslContextFactory" class="org.eclipse.jetty.util.ssl.SslContextFactory">
++    <Set name="KeyStorePath"><SystemProperty name="euca.var.dir" default="conf" />/keys/euca.p12</Set>
++    <Set name="KeyStorePassword">eucalyptus</Set>
++    <Set name="KeyStoreType">pkcs12</Set>
++    <Set name="KeyManagerPassword">eucalyptus</Set>
++    <Set name="TrustStorePath"><SystemProperty name="euca.var.dir" default="conf" />/keys/euca.p12</Set>
++    <Set name="TrustStorePassword">eucalyptus</Set>
++    <Set name="TrustStoreType">pkcs12</Set>
++  </New>
++
+   <Call name="addConnector">
+     <Arg>
+-      <New class="com.eucalyptus.bootstrap.HttpServerBootstrapper$ConfiguredSslSelectChannelConnector">
+-        <Set name="Port">
++      <New class="org.eclipse.jetty.server.ServerConnector">
++        <Arg name="server"><Ref refid="Server" /></Arg>
++        <Arg name="factories">
++          <Array type="org.eclipse.jetty.server.ConnectionFactory">
++            <Item>
++              <New class="org.eclipse.jetty.server.SslConnectionFactory">
++                <Arg name="next">http/1.1</Arg>
++                <Arg name="sslContextFactory"><Ref refid="sslContextFactory"/></Arg>
++              </New>
++            </Item>
++            <Item>
++              <New class="org.eclipse.jetty.server.HttpConnectionFactory">
++                <Arg name="config"><Ref refid="tlsHttpConfig"/></Arg>
++              </New>
++            </Item>
++          </Array>
++        </Arg>
++        <Set name="port">
+           <SystemProperty name="euca.https.port" default="8443" />
+         </Set>
+-        <Set name="maxIdleTime">30000</Set>
+-        <Set name="keystoreType">pkcs12</Set>
+-        <Set name="truststoreType">pkcs12</Set>
+-        <Set name="keystore"><SystemProperty name="euca.var.dir" default="conf" />/keys/euca.p12</Set>
+-        <Set name="truststore"><SystemProperty name="euca.var.dir" default="conf" />/keys/euca.p12</Set>
+-        <Set name="password">eucalyptus</Set>
+-        <Set name="keyPassword">eucalyptus</Set>
+-        <Set name="trustPassword">eucalyptus</Set>
+-        <!-- Set name="ThreadPool">
+-          <New class="org.eclipse.jetty.util.thread.QueuedThreadPool">
+-            <Set name="minThreads">10</Set>
+-            <Set name="maxThreads">25</Set>
+-          </New>
+-        </Set -->
++        <Set name="idleTimeout">30000</Set>
+       </New>
+     </Arg>
+   </Call>
diff --git a/eucalyptus.spec b/eucalyptus.spec
index a62a734..a927212 100644
--- a/eucalyptus.spec
+++ b/eucalyptus.spec
@@ -14,7 +14,7 @@
 Summary:       Elastic Utility Computing Architecture
 Name:          eucalyptus
 Version:       3.2.1
-Release:       2%{?dist}
+Release:       3%{?dist}
 License:       GPLv3 and (GPLv3 and ASL 2.0) and (GPLv3 and BSD)
 URL:           http://www.eucalyptus.com
 Group:         Applications/System
@@ -66,7 +66,24 @@ BuildRequires: hibernate-jpa-2.0-api
 BuildRequires: jakarta-commons-httpclient
 BuildRequires: javamail
 BuildRequires: jboss-logging
-BuildRequires: jetty
+BuildRequires: jetty-annotations
+BuildRequires: jetty-client
+BuildRequires: jetty-continuation
+BuildRequires: jetty-deploy
+BuildRequires: jetty-http
+BuildRequires: jetty-io
+BuildRequires: jetty-jmx
+BuildRequires: jetty-jndi
+BuildRequires: jetty-plus
+BuildRequires: jetty-policy
+BuildRequires: jetty-rewrite
+BuildRequires: jetty-security
+BuildRequires: jetty-server
+BuildRequires: jetty-servlet
+BuildRequires: jetty-servlets
+BuildRequires: jetty-util
+BuildRequires: jetty-webapp
+BuildRequires: jetty-xml
 BuildRequires: jgroups212
 BuildRequires: jibx
 BuildRequires: jsch
@@ -213,6 +230,11 @@ Patch28:       eucalyptus-unlink-mod_rampart.patch
 # since the CLC has a self-signed cert
 Patch29:       eucalyptus-no-console-cert-validation.patch
 
+# jetty.util.log.Log usage breaks in Jetty 9
+Patch30:       eucalyptus-jetty-logging.patch
+# jetty SslSelectChannelConnector was deprecated and has been removed.
+Patch31:       eucalyptus-jetty-ssl-config.patch
+
 %description
 Eucalyptus is a service overlay that implements elastic computing
 using existing resources. The goal of Eucalyptus is to allow sites
@@ -526,6 +548,8 @@ touch gatherlog/generated/stubs cluster/generated/stubs node/generated/stubs
 %patch27 -p1
 %patch28 -p1
 %patch29 -p1
+%patch30 -p1
+%patch31 -p1
 
 # remove classes which depend on junit
 # This is because junit on Fedora bundles hamcrest 1.1, which has conflicts
@@ -1027,6 +1051,9 @@ if [ "$1" = "0" ]; then
 fi
 
 %changelog
+* Fri Mar  1 2013 Andy Grimm <agrimm at gmail.com> - 3.2.1-3
+- Fix build issues caused by Jetty 9 update
+
 * Thu Feb 28 2013 Andy Grimm <agrimm at gmail.com> - 3.2.1-2
 - Add explicit BuildRequires/Requires for jboss-logging
 


More information about the scm-commits mailing list