[jboss-cvs] Repository SVN: r30430 - in apache-xerces: 2.7.1.patch02-brew and 2 other directories.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Thu Oct 22 12:19:26 EDT 2009


Author: mbenitez
Date: 2009-10-22 12:19:24 -0400 (Thu, 22 Oct 2009)
New Revision: 30430

Added:
   apache-xerces/2.7.1.patch02-brew/
   apache-xerces/2.7.1.patch02-brew/component-info.xml
   apache-xerces/2.7.1.patch02-brew/lib/
   apache-xerces/2.7.1.patch02-brew/lib/xercesImpl.jar
   apache-xerces/2.7.1.patch02-brew/src/
   apache-xerces/2.7.1.patch02-brew/src/XJavac.java
   apache-xerces/2.7.1.patch02-brew/src/Xerces-J-src.2.7.1.tar.gz
   apache-xerces/2.7.1.patch02-brew/src/xerces-j2-CVE-2009-2625.patch
   apache-xerces/2.7.1.patch02-brew/src/xerces-j2-JBPAPP-1961.patch
   apache-xerces/2.7.1.patch02-brew/src/xerces-j2-build.patch
   apache-xerces/2.7.1.patch02-brew/src/xerces-j2-libgcj.patch
Log:
Add brew-build 2.7.1.patch02-brew

Added: apache-xerces/2.7.1.patch02-brew/component-info.xml
===================================================================
--- apache-xerces/2.7.1.patch02-brew/component-info.xml	                        (rev 0)
+++ apache-xerces/2.7.1.patch02-brew/component-info.xml	2009-10-22 16:19:24 UTC (rev 30430)
@@ -0,0 +1,26 @@
+<project name="apache-xerces-component-info">
+
+   <!-- ============================================================ -->
+   <!-- Apache Xerces                                                -->
+   <!-- ============================================================ -->
+
+   <component id="apache-xerces"
+              licenseType="apache-2.0"
+              version="2.7.1.patch02-brew"
+              projectHome="http://xml.apache.org/xerces2-j/index.html"
+              description="High performance, fully compliant XML parser"
+              scm=":ext:cvs.devel.redhat.com:/cvs/dist/xerces-j2"
+              tag="xerces-j2-2_7_1-1_1_patch_02_ep1_2_el4">
+      <!-- Build using JDK 1.4 -->
+      <artifact id="xercesImpl.jar"/>
+      
+      <import componentref="apache-xml-commons">
+        <compatible version="1.3.03-brew"/>
+      </import>
+       
+      <export>
+         <include input="xercesImpl.jar"/>
+      </export>
+   </component>
+
+</project>

Added: apache-xerces/2.7.1.patch02-brew/lib/xercesImpl.jar
===================================================================
(Binary files differ)


Property changes on: apache-xerces/2.7.1.patch02-brew/lib/xercesImpl.jar
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: apache-xerces/2.7.1.patch02-brew/src/XJavac.java
===================================================================
--- apache-xerces/2.7.1.patch02-brew/src/XJavac.java	                        (rev 0)
+++ apache-xerces/2.7.1.patch02-brew/src/XJavac.java	2009-10-22 16:19:24 UTC (rev 30430)
@@ -0,0 +1,135 @@
+/*
+ * Copyright 2001-2005 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.xerces.util;
+
+import org.apache.tools.ant.BuildException;
+import org.apache.tools.ant.Project;
+import org.apache.tools.ant.types.Path;
+import org.apache.tools.ant.util.JavaEnvUtils;
+import org.apache.tools.ant.taskdefs.Javac;
+
+import java.lang.StringBuffer;
+import java.util.Properties;
+import java.util.Locale;
+
+/**
+ * The implementation of the javac compiler for IBM JDK 1.4
+ *
+ * The purpose of this task is to diagnose whether we're
+ * running on an IBM 1.4 JVM; if we are, to
+ * set up the bootclasspath such that the build will
+ * succeed; if we aren't, then invoke the Javac12
+ * task.
+ *
+ * @author Neil Graham, IBM
+ */
+
+public class XJavac extends Javac {
+
+    /**
+     * Run the compilation.
+     *
+     * @exception BuildException if the compilation has problems.
+     */
+    public void execute() throws BuildException {
+        if(isJDK14OrHigher()) {
+            // maybe the right one; check vendor:
+            // by checking system properties:
+            Properties props = null;
+            try {
+                props = System.getProperties();
+            } catch (Exception e) {
+                throw new BuildException("unable to determine java vendor because could not access system properties!");
+            }
+            // this is supposed to be provided by all JVM's from time immemorial
+            String vendor = ((String)props.get("java.vendor")).toUpperCase(Locale.ENGLISH);
+            if(vendor.indexOf("IBM") >= 0){
+                // we're on an IBM 1.4; fiddle with the bootclasspath.
+                Path bcp = createBootclasspath();
+                String javaHome = System.getProperty("java.home");
+                StringBuffer bcpMember = new StringBuffer();
+                bcpMember.append(javaHome).append("/lib/charsets.jar:");
+                bcp.createPathElement().setPath(bcpMember.toString());
+                bcpMember.replace(javaHome.length(), bcpMember.length(), "/lib/core.jar:");
+                bcp.createPathElement().setPath(bcpMember.toString());
+                bcpMember.replace(javaHome.length(), bcpMember.length(),  "/lib/graphics.jar:");
+                bcp.createPathElement().setPath(bcpMember.toString());
+                bcpMember.replace(javaHome.length(), bcpMember.length(),  "/lib/javaws.jar:");
+                bcp.createPathElement().setPath(bcpMember.toString());
+                bcpMember.replace(javaHome.length(), bcpMember.length(),  "/lib/jaws.jar:");
+                bcp.createPathElement().setPath(bcpMember.toString());
+                bcpMember.replace(javaHome.length(), bcpMember.length(),  "/lib/security.jar:");
+                bcp.createPathElement().setPath(bcpMember.toString());
+                bcpMember.replace(javaHome.length(), bcpMember.length(),  "/lib/server.jar:");
+                bcp.createPathElement().setPath(bcpMember.toString());
+                bcpMember.replace(javaHome.length(), bcpMember.length(),  "/lib/ext/JawBridge.jar:");
+                bcp.createPathElement().setPath(bcpMember.toString());
+                bcpMember.replace(javaHome.length(), bcpMember.length(),  "/lib/ext/gskikm.jar:");
+                bcp.createPathElement().setPath(bcpMember.toString());
+                bcpMember.replace(javaHome.length(), bcpMember.length(),  "/lib/ext/ibmjceprovider.jar:");
+                bcp.createPathElement().setPath(bcpMember.toString());
+                bcpMember.replace(javaHome.length(), bcpMember.length(),  "/lib/ext/indicim.jar:");
+                bcp.createPathElement().setPath(bcpMember.toString());
+                bcpMember.replace(javaHome.length(), bcpMember.length(),  "/lib/ext/jaccess.jar:");
+                bcp.createPathElement().setPath(bcpMember.toString());
+                bcpMember.replace(javaHome.length(), bcpMember.length(),  "/lib/ext/ldapsec.jar:");
+                bcp.createPathElement().setPath(bcpMember.toString());
+                bcpMember.replace(javaHome.length(), bcpMember.length(),  "/lib/ext/oldcertpath.jar");
+                bcp.createPathElement().setPath(bcpMember.toString());
+                setBootclasspath(bcp);
+            }
+            // need to do special things for Sun too and also
+            // for Apple, HP and Blackdown: a Linux port of Sun Java
+            else if( (vendor.indexOf("SUN") >= 0) || 
+                     (vendor.indexOf("BLACKDOWN") >= 0) || 
+                     (vendor.indexOf("APPLE") >= 0) ||
+                     (vendor.indexOf("HEWLETT-PACKARD") >= 0)) {
+                // we're on an SUN 1.4; fiddle with the bootclasspath.
+                // since we can't eviscerate XML-related info here,
+                // we must use the classpath
+                Path bcp = createBootclasspath();
+                Path clPath = getClasspath();
+                bcp.append(clPath);
+                String currBCP = (String)props.get("sun.boot.class.path");
+                Path currBCPath = new Path(null); 
+                currBCPath.createPathElement().setPath(currBCP);
+                bcp.append(currBCPath);
+                setBootclasspath(bcp);
+            }
+        }
+        // now just do the normal thing:
+        super.execute();
+    }
+    
+    /**
+     * Checks whether the JDK version is 1.4 or higher. If it's not
+     * JDK 1.4 we check whether we're on a future JDK by checking
+     * that we're not on JDKs 1.0, 1.1, 1.2 or 1.3. This check by 
+     * exclusion should future proof this task from new versions of 
+     * Ant which are aware of higher JDK versions.
+     * 
+     * @return true if the JDK version is 1.4 or higher.
+     */
+    private boolean isJDK14OrHigher() {
+        final String version = JavaEnvUtils.getJavaVersion();
+        return version.equals(JavaEnvUtils.JAVA_1_4) ||
+            (!version.equals(JavaEnvUtils.JAVA_1_3) &&
+            !version.equals(JavaEnvUtils.JAVA_1_2) &&
+            !version.equals(JavaEnvUtils.JAVA_1_1) &&
+            !version.equals(JavaEnvUtils.JAVA_1_0));
+    }
+}

Added: apache-xerces/2.7.1.patch02-brew/src/Xerces-J-src.2.7.1.tar.gz
===================================================================
(Binary files differ)


Property changes on: apache-xerces/2.7.1.patch02-brew/src/Xerces-J-src.2.7.1.tar.gz
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: apache-xerces/2.7.1.patch02-brew/src/xerces-j2-CVE-2009-2625.patch
===================================================================
--- apache-xerces/2.7.1.patch02-brew/src/xerces-j2-CVE-2009-2625.patch	                        (rev 0)
+++ apache-xerces/2.7.1.patch02-brew/src/xerces-j2-CVE-2009-2625.patch	2009-10-22 16:19:24 UTC (rev 30430)
@@ -0,0 +1,17 @@
+--- src/org/apache/xerces/impl/XMLScanner.java.orig	2009-09-30 10:40:17.000000000 -0400
++++ src/org/apache/xerces/impl/XMLScanner.java	2009-09-30 10:43:06.000000000 -0400
+@@ -1026,6 +1026,14 @@ public abstract class XMLScanner 
+                     if (XMLChar.isMarkup(c) || c == ']') {
+                         fStringBuffer.append((char)fEntityScanner.scanChar());
+                     }
++                    else if (XMLChar.isHighSurrogate(c)) {
++                        scanSurrogates(fStringBuffer);
++                    }
++                    else if (isInvalidLiteral(c)) {
++                        reportFatalError("InvalidCharInSystemID",
++                            new Object[] { Integer.toHexString(c) });
++                        fEntityScanner.scanChar();
++                    }
+                 } while (fEntityScanner.scanLiteral(quote, ident) != quote);
+                 fStringBuffer.append(ident);
+                 ident = fStringBuffer;

Added: apache-xerces/2.7.1.patch02-brew/src/xerces-j2-JBPAPP-1961.patch
===================================================================
--- apache-xerces/2.7.1.patch02-brew/src/xerces-j2-JBPAPP-1961.patch	                        (rev 0)
+++ apache-xerces/2.7.1.patch02-brew/src/xerces-j2-JBPAPP-1961.patch	2009-10-22 16:19:24 UTC (rev 30430)
@@ -0,0 +1,44 @@
+--- src/org/apache/xerces/dom/DeferredDocumentImpl.java (revision 511133)
++++ src/org/apache/xerces/dom/DeferredDocumentImpl.java (revision 511134)
+@@ -1952,11 +1952,17 @@
+         if (value == -1) {
+             return clearChunkIndex(data, chunk, index);
+         }
+-        int ovalue = data[chunk][index];
++        int [] dataChunk = data[chunk];
++        // Re-create chunk if it was deleted.
++        if (dataChunk == null) {
++            createChunk(data, chunk);
++            dataChunk = data[chunk];
++        }
++        int ovalue = dataChunk[index];
+         if (ovalue == -1) {
+-            data[chunk][CHUNK_SIZE]++;
++            dataChunk[CHUNK_SIZE]++;
+         }
+-        data[chunk][index] = value;
++        dataChunk[index] = value;
+         return ovalue;
+     }
+     private final String setChunkValue(Object data[][], Object value,
+@@ -1964,12 +1970,18 @@
+         if (value == null) {
+             return clearChunkValue(data, chunk, index);
+         }
+-        String ovalue = (String) data[chunk][index];
++        Object [] dataChunk = data[chunk];
++        // Re-create chunk if it was deleted.
++        if (dataChunk == null) {
++            createChunk(data, chunk);
++            dataChunk = data[chunk];
++        }
++        String ovalue = (String) dataChunk[index];
+         if (ovalue == null) {
+-            RefCount c = (RefCount) data[chunk][CHUNK_SIZE];
++            RefCount c = (RefCount) dataChunk[CHUNK_SIZE];
+             c.fCount++;
+         }
+-        data[chunk][index] = value;
++        dataChunk[index] = value;
+         return ovalue;
+     }

Added: apache-xerces/2.7.1.patch02-brew/src/xerces-j2-build.patch
===================================================================
--- apache-xerces/2.7.1.patch02-brew/src/xerces-j2-build.patch	                        (rev 0)
+++ apache-xerces/2.7.1.patch02-brew/src/xerces-j2-build.patch	2009-10-22 16:19:24 UTC (rev 30430)
@@ -0,0 +1,99 @@
+--- build.xml.orig	2005-07-26 16:09:07.000000000 -0400
++++ build.xml	2006-08-11 17:57:09.000000000 -0400
+@@ -19,7 +19,8 @@
+ <project default="usage" basedir=".">
+ 
+   <!-- enable compilation under IBM JDK 1.4 -->
+-  <taskdef name="xjavac" classname="org.apache.xerces.util.XJavac"/>
++  <taskdef name="xjavac" classname="org.apache.xerces.util.XJavac"
++           classpath="./tools/bin/xjavac.jar"/>
+ 
+   <!-- Allow properties following these statements to be overridden -->
+   <!-- Note that all of these don't have to exist.  They've just been defined
+@@ -69,7 +70,7 @@
+     <property name="packages" value="org.*"/>
+ 
+     <property name="doc.generator" value="org.apache.stylebook.StyleBook"/>
+-    <property name="doc.generator.package" value="${tools.dir}/stylebook-1.0-b2.jar"/>
++    <property name="doc.generator.package" value="./tools/stylebook-1.0-b2.jar"/>
+ 
+     <property name="build.dir" value="./build"/>
+     <property name="build.src" value="${build.dir}/src"/>
+@@ -83,7 +84,6 @@
+     <property name="distsrc.dir" value="${build.dir}/${parser.shortname}-${parser_version}"/>
+     <property name="disttools.dir" value="${build.dir}/tools"/>
+     <property name="distbin.dir" value="${build.dir}/${parser.shortname}-${parser_version}"/>
+-    <property name='src.apis.zip' value="${tools.dir}/xml-commons-external-src.zip"/>
+ 
+     <filter token="year" value="${year}"/>
+     <filter token="version" value="${parser.Version}"/>
+@@ -195,27 +195,6 @@
+                        javax.xml.parsers.ConvertToURI.java">
+         </fileset>
+     </copy>
+-
+-    <!-- now deal with API's:  -->
+-    <unzip src="${src.apis.zip}" dest="${build.src}">
+-        <patternset
+-            includes="org/xml/sax/** 
+-    	        javax/xml/**
+-    	        javax/xml/datatype/**
+-    	        javax/xml/namespace/**
+-                javax/xml/parsers/**
+-    	        javax/xml/transform/**
+-    	        javax/xml/validation/**
+-    	        javax/xml/xpath/**
+-                org/w3c/dom/*
+-                org/w3c/dom/events/**
+-                org/w3c/dom/html/**
+-                org/w3c/dom/ls/**
+-                org/w3c/dom/ranges/**
+-                org/w3c/dom/traversal/**
+-        	    org/w3c/dom/xpath/**"
+-        />
+-    </unzip>
+     
+     <!-- substitute tokens as needed -->
+     <replace file="${build.dir}/src/org/apache/xerces/impl/Version.java" 
+@@ -311,7 +290,7 @@
+     </copy>
+     <xjavac srcdir="${build.tests}"
+            destdir="${build.dest}"
+-           classpath="${tools.dir}/${jar.apis}:${build.dir}/classes:./tools/junit.jar"
++           classpath="${tools.dir}/${jar.apis}:${build.dir}/classes:${tools.dir}/junit.jar"
+            debug="${debug}"
+            includeAntRuntime="false"
+            includeJavaRuntime="true"/>
+@@ -354,9 +333,10 @@
+   <target name="docs" depends="prepare, prepare-docs">
+     <echo message="Building docs for ${parser.Name} ${parser.Version} ..." />
+     <java fork="yes"
+-          classpath="${java.class.path}:${doc.generator.package}:./tools/xalan.jar"
++          classpath="${java.class.path}:${doc.generator.package}:${tools.dir}/xalan.jar"
+           classname="${doc.generator}"
+           failOnError="yes">
++      <jvmarg value="-Djava.awt.headless=true"/>
+       <arg value="targetDirectory=${build.docs}"/>
+       <arg value="${build.dir}/xdocs/docs-book.xml"/>
+       <arg value="${build.dir}/xdocs/style"/>
+@@ -997,20 +977,6 @@
+     <replace file="${build.dir}/src/org/apache/xerces/parsers/AbstractSAXParser.java"
+              token="return (fConfiguration instanceof XML11Configurable);" value="return false;"/>
+  
+-    <!-- now deal with API's:  -->
+-    <unzip src="${src.apis.zip}" dest="${build.src}">
+-        <patternset
+-            includes="org/xml/sax/** 
+-                javax/xml/parsers/**
+-                org/w3c/dom/*
+-                org/w3c/dom/events/**
+-                org/w3c/dom/html/**
+-                org/w3c/dom/ranges/**
+-                org/w3c/dom/traversal/**"
+-        />
+-    </unzip>
+-
+-
+     <!-- substitute tokens as needed -->
+     <replace file="${build.dir}/src/org/apache/xerces/impl/Version.java" 
+              token="@@VERSION@@" value="${parser.Name} ${parser.Version}"/>

Added: apache-xerces/2.7.1.patch02-brew/src/xerces-j2-libgcj.patch
===================================================================
--- apache-xerces/2.7.1.patch02-brew/src/xerces-j2-libgcj.patch	                        (rev 0)
+++ apache-xerces/2.7.1.patch02-brew/src/xerces-j2-libgcj.patch	2009-10-22 16:19:24 UTC (rev 30430)
@@ -0,0 +1,17 @@
+Also apply the xjavac classpath hack when running under libgcj.
+
+  http://issues.apache.org/bugzilla/show_bug.cgi?id=34551
+  http://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=152255
+
+--- tools/org/apache/xerces/util/XJavac.java~	2005-06-10 10:18:47 +0100
++++ tools/org/apache/xerces/util/XJavac.java	2005-06-10 11:14:35 +0100
+@@ -97,7 +97,8 @@
+             else if( (vendor.indexOf("SUN") >= 0) || 
+                      (vendor.indexOf("BLACKDOWN") >= 0) || 
+                      (vendor.indexOf("APPLE") >= 0) ||
+-                     (vendor.indexOf("HEWLETT-PACKARD") >= 0)) {
++                     (vendor.indexOf("HEWLETT-PACKARD") >= 0) ||
++                     (vendor.indexOf("FREE SOFTWARE FOUNDATION") >= 0)) {
+                 // we're on an SUN 1.4; fiddle with the bootclasspath.
+                 // since we can't eviscerate XML-related info here,
+                 // we must use the classpath




More information about the jboss-cvs-commits mailing list