[h2] Update to latest upstream stable release

Mat Booth mbooth at fedoraproject.org
Thu Jun 12 11:02:37 UTC 2014


commit 199acd829b3ebe136600f9cfeee3975406cd70d3
Author: Mat Booth <mat.booth at redhat.com>
Date:   Thu Jun 12 12:02:12 2014 +0100

    Update to latest upstream stable release
    
    - Fix lucene BRs
    - Patch to remove implementation of non-existant inferface
    - Patch to fix tests broken by new servlet API

 .gitignore                       |    9 ++--
 fix-broken-tests.patch           |  107 ++++++++++++++++++++++++++++++++++++++
 fix-build.patch                  |   33 ++++++++----
 h2-1.3.168.pom => h2-1.3.176.pom |   10 +++-
 h2.spec                          |   44 +++++++++-------
 rm-osgi-jdbc-service.patch       |   34 ++++++++++++
 sources                          |    2 +-
 7 files changed, 204 insertions(+), 35 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index cd1a8d1..9815846 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,4 +1,5 @@
-/h2-2010-11-02.zip
-/h2-2010-11-21.zip
-h2-2011-12-30.zip
-h2-2012-07-13.zip
+/.project
+/*.src.rpm
+/noarch
+/h2-*.zip
+/h2/
diff --git a/fix-broken-tests.patch b/fix-broken-tests.patch
new file mode 100644
index 0000000..60a5e83
--- /dev/null
+++ b/fix-broken-tests.patch
@@ -0,0 +1,107 @@
+--- src/test/org/h2/test/server/TestWeb.java.orig	2014-04-05 14:57:06.000000000 +0100
++++ src/test/org/h2/test/server/TestWeb.java	2014-06-12 11:22:10.115626270 +0100
+@@ -692,7 +692,7 @@
+         }
+ 
+         @Override
+-        public Map<String, String> getParameterMap() {
++        public Map<String, String[]> getParameterMap() {
+             return null;
+         }
+ 
+@@ -904,6 +904,68 @@
+             return false;
+         }
+ 
++        @Override
++        public java.util.Collection<javax.servlet.http.Part> getParts() {
++            return null;
++        }
++
++        @Override
++        public javax.servlet.http.Part getPart(String name) {
++            return null;
++        }
++
++        @Override
++        public boolean authenticate(HttpServletResponse response) {
++            return false;
++        }
++
++        @Override
++        public void login(String username, String password) {
++            // ignore
++        }
++
++        @Override
++        public void logout() {
++            // ignore
++        }
++
++        @Override
++        public ServletContext getServletContext() {
++            return null;
++        }
++
++        @Override
++        public javax.servlet.AsyncContext startAsync() {
++            return null;
++        }
++
++        @Override
++        public javax.servlet.AsyncContext startAsync(
++                javax.servlet.ServletRequest servletRequest,
++                javax.servlet.ServletResponse servletResponse) {
++            return null;
++        }
++
++        @Override
++        public boolean isAsyncStarted() {
++            return false;
++        }
++
++        @Override
++        public boolean isAsyncSupported() {
++            return false;
++        }
++
++        @Override
++        public javax.servlet.AsyncContext getAsyncContext() {
++            return null;
++        }
++
++        @Override
++        public javax.servlet.DispatcherType getDispatcherType() {
++            return null;
++        }
++
+     }
+ 
+     /**
+@@ -1080,6 +1142,26 @@
+             // ignore
+         }
+ 
++        @Override
++        public int getStatus() {
++            return 0;
++        }
++
++        @Override
++        public String getHeader(String name) {
++            return null;
++        }
++
++        @Override
++        public java.util.Collection<String> getHeaders(String name) {
++            return null;
++        }
++
++        @Override
++        public java.util.Collection<String> getHeaderNames() {
++            return null;
++        }
++
+     }
+ 
+     /**
diff --git a/fix-build.patch b/fix-build.patch
index fa9a514..a5da1eb 100644
--- a/fix-build.patch
+++ b/fix-build.patch
@@ -1,20 +1,33 @@
---- Build.java.sav	2012-07-13 17:04:34.000000000 +0300
-+++ Build.java	2012-07-23 11:47:00.693965953 +0300
-@@ -150,12 +150,12 @@ public class Build extends BuildBase {
+--- src/tools/org/h2/build/Build.java.orig	2014-04-05 14:57:06.000000000 +0100
++++ src/tools/org/h2/build/Build.java	2014-06-12 11:18:39.647010805 +0100
+@@ -188,14 +188,12 @@
          switchSource(debugInfo);
          clean();
          mkdir("temp");
 -        download();
          String classpath = "temp" +
 -                File.pathSeparator + "ext/servlet-api-2.4.jar" +
--                File.pathSeparator + "ext/" + getLuceneJar() +
+-                File.pathSeparator + "ext/lucene-core-3.0.2.jar" +
 -                File.pathSeparator + "ext/slf4j-api-1.6.0.jar" +
--                File.pathSeparator + "ext/org.osgi.core-1.2.0.jar" +
-+        		File.pathSeparator + "/usr/share/java/servlet.jar" +
-+        		File.pathSeparator + "/usr/share/java/lucene.jar" +
-+        		File.pathSeparator + "/usr/share/java/lucene-contrib/lucene-analysis.jar" +
-+        		File.pathSeparator + "/usr/share/java/slf4j/api.jar" +
-+        		File.pathSeparator + "/usr/share/java/felix/org.osgi.core.jar" +
+-                File.pathSeparator + "ext/org.osgi.core-4.2.0.jar" +
+-                File.pathSeparator + "ext/org.osgi.enterprise-4.2.0.jar" +
+-                File.pathSeparator + "ext/jts-1.13.jar" +
++                File.pathSeparator + "/usr/share/java/servlet.jar" +
++                File.pathSeparator + "/usr/share/java/lucene3/lucene-core-3.jar" +
++                File.pathSeparator + "/usr/share/java/slf4j/api.jar" +
++                File.pathSeparator + "/usr/share/java/felix/org.osgi.core.jar" +
++                File.pathSeparator + "/usr/share/java/jts.jar" +
                  File.pathSeparator + System.getProperty("java.home") + "/../lib/tools.jar";
          FileList files;
          if (clientOnly) {
+@@ -536,8 +534,8 @@
+         javadoc("-sourcepath", "src/main", "org.h2.jdbc", "org.h2.jdbcx",
+                 "org.h2.tools", "org.h2.api", "org.h2.engine", "org.h2.fulltext",
+                 "-classpath",
+-                "ext/lucene-core-3.0.2.jar" +
+-                File.pathSeparator + "ext/jts-1.13.jar",
++                "/usr/share/java/lucene3/lucene-core-3.jar" +
++                File.pathSeparator + "/usr/share/java/jts.jar",
+                 "-docletpath", "bin" + File.pathSeparator + "temp",
+                 "-doclet", "org.h2.build.doclet.Doclet");
+         copy("docs/javadoc", files("src/docsrc/javadoc"), "src/docsrc/javadoc");
diff --git a/h2-1.3.168.pom b/h2-1.3.176.pom
similarity index 64%
rename from h2-1.3.168.pom
rename to h2-1.3.176.pom
index 7db01e6..035580c 100644
--- a/h2-1.3.168.pom
+++ b/h2-1.3.176.pom
@@ -2,7 +2,7 @@
     <modelVersion>4.0.0</modelVersion>
     <groupId>com.h2database</groupId>
     <artifactId>h2</artifactId>
-    <version>1.3.168</version>
+    <version>1.3.176</version>
     <packaging>jar</packaging>
     <name>H2 Database Engine</name>
     <url>http://www.h2database.com</url>
@@ -15,8 +15,16 @@
         </license>
     </licenses>
     <scm>
+        <connection>scm:svn:http://h2database.googlecode.com/svn/trunk</connection>
         <url>http://h2database.googlecode.com/svn/trunk</url>
     </scm>
+    <developers>
+        <developer>
+            <id>thomas.tom.mueller</id>
+            <name>Thomas Mueller</name>
+            <email>thomas.tom.mueller at gmail dot com</email>
+        </developer>
+    </developers>
     <dependencies>
     </dependencies>
 </project>
\ No newline at end of file
diff --git a/h2.spec b/h2.spec
index 50fe443..8968f98 100644
--- a/h2.spec
+++ b/h2.spec
@@ -1,23 +1,23 @@
 Name:           h2
-Version:        1.3.168
-Release:        6%{?dist}
+Version:        1.3.176
+Release:        1%{?dist}
 Summary:        Java SQL database
 
-Group:          Development/Libraries
 License:        EPL
 URL:            http://www.h2database.com
-Source0:        http://www.h2database.com/h2-2012-07-13.zip
+Source0:        http://www.h2database.com/h2-2014-04-05.zip
 Source1:        http://repo2.maven.org/maven2/com/h2database/h2/%{version}/h2-%{version}.pom
-Patch1:         fix-build.patch
+Patch0:         fix-build.patch
+Patch1:         rm-osgi-jdbc-service.patch
+Patch2:         fix-broken-tests.patch
 BuildArch: noarch
 BuildRequires: java-devel >= 1:1.5.0
 BuildRequires:  ant
-BuildRequires:  lucene >= 2.4
-BuildRequires:  lucene-contrib
+BuildRequires:  lucene3
 BuildRequires:  slf4j >= 1.5
 BuildRequires:  felix-osgi-core >= 1.2
 BuildRequires:  servlet3
-Requires: java-headless >= 1:1.5.0
+BuildRequires:  jts
 
 %description
 H2 is a the Java SQL database. The main features of H2 are:
@@ -28,8 +28,6 @@ H2 is a the Java SQL database. The main features of H2 are:
 
 %package javadoc
 Summary:        Javadocs for %{name}
-Group:          Documentation
-Requires:       jpackage-utils
 
 %description javadoc
 This package contains the API documentation for %{name}.
@@ -37,15 +35,20 @@ This package contains the API documentation for %{name}.
 %prep
 %setup -q -n %{name}
 pushd src/test/org/h2/test/unit
-rm -fr TestServlet.java
+rm TestServlet.java
 popd
-pushd src/tools/org/h2/build
-%patch1 
-popd
-find -name '*.orig' -exec rm -f '{}' \;
+%patch0
+%patch2
+
+# Because no Fedora package provides org.osgi.service.jdbc interfaces yet
+%patch1
+rm src/main/org/h2/util/OsgiDataSourceFactory.java
+
 find -name '*.class' -exec rm -f '{}' \;
 find -name '*.jar' -exec rm -f '{}' \;
 
+sed -i -e 's|authenticated|authenticate authenticated|' src/tools/org/h2/build/doc/dictionary.txt
+
 %build
 export JAVA_HOME=%{java_home}
 chmod u+x build.sh
@@ -64,10 +67,7 @@ mkdir -p $RPM_BUILD_ROOT%{_mavenpomdir}
 cp -rp %SOURCE1 $RPM_BUILD_ROOT%{_mavenpomdir}/JPP-%{name}.pom
 %add_maven_depmap JPP-%{name}.pom %{name}.jar
 
-%files
-%{_javadir}/*
-%{_mavenpomdir}/*
-%{_mavendepmapfragdir}/*
+%files -f .mfiles
 %doc src/docsrc/html/license.html
 
 %files javadoc
@@ -75,6 +75,12 @@ cp -rp %SOURCE1 $RPM_BUILD_ROOT%{_mavenpomdir}/JPP-%{name}.pom
 %doc src/docsrc/html/license.html
 
 %changelog
+* Wed Jun 11 2014 Mat Booth <mat.booth at redhat.com> - 1.3.176-1
+- Update to latest upstream stable release
+- Fix lucene BRs
+- Patch to remove implementation of non-existant inferface
+- Patch to fix tests broken by new servlet API
+
 * Sat Jun 07 2014 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 1.3.168-6
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
 
diff --git a/rm-osgi-jdbc-service.patch b/rm-osgi-jdbc-service.patch
new file mode 100644
index 0000000..00b5636
--- /dev/null
+++ b/rm-osgi-jdbc-service.patch
@@ -0,0 +1,34 @@
+--- ./src/main/org/h2/util/DbDriverActivator.java.orig	2014-06-12 10:13:52.276707162 +0100
++++ ./src/main/org/h2/util/DbDriverActivator.java	2014-06-12 10:14:21.632227371 +0100
+@@ -6,11 +6,8 @@
+  */
+ package org.h2.util;
+ 
+-import java.util.Properties;
+-import org.h2.engine.Constants;
+ import org.osgi.framework.BundleActivator;
+ import org.osgi.framework.BundleContext;
+-import org.osgi.service.jdbc.DataSourceFactory;
+ 
+ /**
+  * The driver activator loads the H2 driver when starting the bundle. The driver
+@@ -27,19 +24,6 @@
+     @Override
+     public void start(BundleContext bundleContext) {
+         org.h2.Driver driver = org.h2.Driver.load();
+-        Properties properties = new Properties();
+-        properties.put(
+-                DataSourceFactory.OSGI_JDBC_DRIVER_CLASS,
+-                org.h2.Driver.class.getName());
+-        properties.put(
+-                DataSourceFactory.OSGI_JDBC_DRIVER_NAME,
+-                "H2 JDBC Driver");
+-        properties.put(
+-                DataSourceFactory.OSGI_JDBC_DRIVER_VERSION,
+-                Constants.getFullVersion());
+-        bundleContext.registerService(
+-                DataSourceFactory.class.getName(),
+-                new OsgiDataSourceFactory(driver), properties);
+     }
+ 
+     /**
diff --git a/sources b/sources
index 2d9077a..b2d9829 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-6fa2b923d852f53aaa11780dd84fba88  h2-2012-07-13.zip
+4740e3ec5c78e517dab5ac18404c8d56  h2-2014-04-05.zip


More information about the scm-commits mailing list