[med-svn] r13267 - in trunk/packages/apache-derby/trunk/debian: . patches

Timothy Booth tbooth-guest at alioth.debian.org
Fri Apr 5 16:00:03 UTC 2013


Author: tbooth-guest
Date: 2013-04-05 16:00:03 +0000 (Fri, 05 Apr 2013)
New Revision: 13267

Added:
   trunk/packages/apache-derby/trunk/debian/README.source
   trunk/packages/apache-derby/trunk/debian/patches/javacc5.diff
Modified:
   trunk/packages/apache-derby/trunk/debian/control
   trunk/packages/apache-derby/trunk/debian/patches/series
   trunk/packages/apache-derby/trunk/debian/rules
Log:
Found and incorporated upstream patches.  This now builds and passes self-tests
against the system JARs (on Ubuntu at least).
Bad news is it needs a patched javacc.
Nearly there.


Added: trunk/packages/apache-derby/trunk/debian/README.source
===================================================================
--- trunk/packages/apache-derby/trunk/debian/README.source	                        (rev 0)
+++ trunk/packages/apache-derby/trunk/debian/README.source	2013-04-05 16:00:03 UTC (rev 13267)
@@ -0,0 +1,14 @@
+# This packaging effort has been tried before and stalled.
+
+See:
+http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=617425
+
+Then see:
+https://issues.apache.org/jira/browse/DERBY-5125
+
+It looks like I need to patch up JavaCC, but after that we should be OK to
+proceed.
+
+Structure of packages based on:
+
+http://packages.ubuntu.com/source/quantal/sun-javadb

Modified: trunk/packages/apache-derby/trunk/debian/control
===================================================================
--- trunk/packages/apache-derby/trunk/debian/control	2013-04-05 09:20:27 UTC (rev 13266)
+++ trunk/packages/apache-derby/trunk/debian/control	2013-04-05 16:00:03 UTC (rev 13267)
@@ -3,7 +3,7 @@
 Priority: optional
 Maintainer: Debian Med Packaging Team <debian-med-packaging at lists.alioth.debian.org>
 Uploaders: Tim Booth <tbooth at ceh.ac.uk>
-Build-Depends: debhelper (>= 9), default-jdk, javacc, junit, liboro-java, ant1.7
+Build-Depends: debhelper (>= 9), default-jdk, javacc ( >= 5.0-5fix1 ) , junit, liboro-java, ant ( >= 1.7 )
 Standards-Version: 3.9.3
 Homepage: http://db.apache.org/derby/
 Vcs-Browser: http://svn.debian.org/wsvn/debian-med/trunk/packages/apache-derby/trunk/
@@ -27,14 +27,14 @@
 Suggests: apache-derby-core, apache-derby-client, apache-derby-doc, apache-derby-javadoc, apache-derby-demo
 Description: Embeddable relational database for Java, common files
  An open source relational database implemented entirely in Java.
- * Derby has a small footprint -- about 2.6 megabytes for the base engine and
- embedded JDBC driver.
- * Derby is based on the Java, JDBC, and SQL standards.
- * Derby provides an embedded JDBC driver that lets you embed Derby in any
-   Java-based solution.
- * Derby also supports the more familiar client/server mode with the Derby
-   Network Client JDBC driver and Derby Network Server.
- * Derby is easy to install, deploy, and use.
+  * Derby has a small footprint -- about 2.6 megabytes for the base engine and
+    embedded JDBC driver.
+  * Derby is based on the Java, JDBC, and SQL standards.
+  * Derby provides an embedded JDBC driver that lets you embed Derby in any
+    Java-based solution.
+  * Derby also supports the more familiar client/server mode with the Derby
+    Network Client JDBC driver and Derby Network Server.
+  * Derby is easy to install, deploy, and use.
  .
  This package contains common information about Apache Derby.  The file
  index.html introduces the product and has references to further
@@ -49,14 +49,14 @@
 Suggests: apache-derby-client, apache-derby-doc, apache-derby-javadoc, apache-derby-demo
 Description: Embeddable relational database for Java, core
  An open source relational database implemented entirely in Java.
- * Derby has a small footprint -- about 2.6 megabytes for the base engine and
- embedded JDBC driver.
- * Derby is based on the Java, JDBC, and SQL standards.
- * Derby provides an embedded JDBC driver that lets you embed Derby in any
-   Java-based solution.
- * Derby also supports the more familiar client/server mode with the Derby
-   Network Client JDBC driver and Derby Network Server.
- * Derby is easy to install, deploy, and use.
+  * Derby has a small footprint -- about 2.6 megabytes for the base engine and
+    embedded JDBC driver.
+  * Derby is based on the Java, JDBC, and SQL standards.
+  * Derby provides an embedded JDBC driver that lets you embed Derby in any
+    Java-based solution.
+  * Derby also supports the more familiar client/server mode with the Derby
+    Network Client JDBC driver and Derby Network Server.
+  * Derby is easy to install, deploy, and use.
  .
  This package includes the database server, the JDBC driver, utilities and
  localisations.

Added: trunk/packages/apache-derby/trunk/debian/patches/javacc5.diff
===================================================================
--- trunk/packages/apache-derby/trunk/debian/patches/javacc5.diff	                        (rev 0)
+++ trunk/packages/apache-derby/trunk/debian/patches/javacc5.diff	2013-04-05 16:00:03 UTC (rev 13267)
@@ -0,0 +1,93 @@
+Patch from upstream - https://issues.apache.org/jira/secure/attachment/12473505/javacc5.diff
+--- a/java/tools/org/apache/derby/impl/tools/ij/ij.jj
++++ b/java/tools/org/apache/derby/impl/tools/ij/ij.jj
+@@ -28,6 +28,7 @@
+ 	UNICODE_INPUT = true;
+ 	IGNORE_CASE = true;
+ 	CACHE_TOKENS = true;
++	JDK_VERSION = "1.4";
+ }
+ 
+ PARSER_BEGIN(ij)
+--- a/java/tools/org/apache/derby/impl/tools/ij/mtGrammar.jj
++++ b/java/tools/org/apache/derby/impl/tools/ij/mtGrammar.jj
+@@ -27,6 +27,7 @@
+ 	IGNORE_CASE = true;
+ 	CACHE_TOKENS = true;
+ 	LOOKAHEAD = 1;
++	JDK_VERSION = "1.4";
+ }
+ 
+ PARSER_BEGIN(mtGrammar)
+--- /dev/null
++++ b/java/engine/org/apache/derby/impl/sql/compile/TokenBase.java
+@@ -0,0 +1,35 @@
++/*
++
++Derby - Class org.apache.derby.impl.sql.compile.Token
++
++Licensed to the Apache Software Foundation (ASF) under one or more
++contributor license agreements.  See the NOTICE file distributed with
++this work for additional information regarding copyright ownership.
++The ASF licenses this file to you 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.derby.impl.sql.compile;
++
++/**
++ * Base class for the Token class generated by JavaCC.
++ */
++abstract class TokenBase {
++    /**
++     * beginOffset and endOffset are useful for siphoning substrings out of
++     * the Statement so that we can recompile the substrings at upgrade time.
++     * For instance, VIEW definitions and the Restrictions on Published Tables
++     * need to be recompiled at upgrade time.
++     */
++    int beginOffset, endOffset;
++}
+--- a/java/engine/org/apache/derby/impl/sql/compile/sqlgrammar.jj
++++ b/java/engine/org/apache/derby/impl/sql/compile/sqlgrammar.jj
+@@ -11,6 +11,8 @@
+ 	COMMON_TOKEN_ACTION = true;
+ 	CACHE_TOKENS = true;
+ 	UNICODE_INPUT = true;
++	JDK_VERSION = "1.4";
++	TOKEN_EXTENDS = "org.apache.derby.impl.sql.compile.TokenBase";
+ }
+ 
+ PARSER_BEGIN(SQLParser)
+--- a/java/engine/org/apache/derby/impl/sql/build.xml
++++ b/java/engine/org/apache/derby/impl/sql/build.xml
+@@ -57,11 +57,10 @@
+       Token.java
+       TokenMgrError.java
+ 
+-      3 of those files are checked into the codeline:
++      2 of those files are checked into the codeline:
+ 
+       CharStream.java
+       ParseException.java
+-      Token.java
+ 
+       We don't want generated code to clash with the checked-in versions. So
+       we delete the conflicting classes here.
+@@ -70,7 +69,6 @@
+       <fileset dir="${generated.src.dir}/${derby.dir}/impl/sql/compile">
+         <include name="CharStream.java"/>
+         <include name="ParseException.java"/>
+-        <include name="Token.java"/>
+       </fileset>
+     </delete>
+ 

Modified: trunk/packages/apache-derby/trunk/debian/patches/series
===================================================================
--- trunk/packages/apache-derby/trunk/debian/patches/series	2013-04-05 09:20:27 UTC (rev 13266)
+++ trunk/packages/apache-derby/trunk/debian/patches/series	2013-04-05 16:00:03 UTC (rev 13267)
@@ -1 +1,2 @@
-work_with_newer_javacc
+stop_ant_fetching
+javacc5.diff

Modified: trunk/packages/apache-derby/trunk/debian/rules
===================================================================
--- trunk/packages/apache-derby/trunk/debian/rules	2013-04-05 09:20:27 UTC (rev 13266)
+++ trunk/packages/apache-derby/trunk/debian/rules	2013-04-05 16:00:03 UTC (rev 13267)
@@ -29,7 +29,10 @@
 	cat /usr/share/java/javacc.jar > tools/java/javacc.jar
 	cat /usr/share/java/junit.jar > tools/java/junit.jar
 	#Munge the build files.
-	sed -i.orig 's/"1.4"/"5"/g' `find -name build.xml`
+	#Apparently not needed as javacc can be told to stay 1.4 compatible
+	#sed -i.orig 's/"1.4"/"5"/g' `find -name build.xml`
+	#Remove file that breaks the build
+	rm -f java/engine/org/apache/derby/impl/sql/compile/Token.java
 	#And build
 	ant buildsource
 	ant buildjars
@@ -44,6 +47,7 @@
 override_dh_test:
 	env CLASSPATH=`echo jars/insane/*.jar | tr ' ' ':'` \
 	    java org.apache.derby.tools.sysinfo
+	ant all
 	
 get-orig-source:
 	. debian/get-orig-source




More information about the debian-med-commit mailing list