From 9d1c82be26fb8d0ed9394d82beeb5a3d666d8dfe Mon Sep 17 00:00:00 2001 From: starlet-dx <15929766099@163.com> Date: Fri, 10 Oct 2025 17:01:00 +0800 Subject: [PATCH] Fix build failure caused by javacc updated --- derby-javacc5.patch | 72 +++++++++++++++++++++++ derby-javacc.patch => derby-javacc7.patch | 1 + derby-lucene.patch | 35 ++++++++++- derby.spec | 17 ++++-- 4 files changed, 117 insertions(+), 8 deletions(-) create mode 100644 derby-javacc5.patch rename derby-javacc.patch => derby-javacc7.patch (99%) diff --git a/derby-javacc5.patch b/derby-javacc5.patch new file mode 100644 index 0000000..3b3cb32 --- /dev/null +++ b/derby-javacc5.patch @@ -0,0 +1,72 @@ +--- java/engine/org/apache/derby/impl/sql/compile/sqlgrammar.jj.orig 2015-06-18 17:00:53.946356696 +0100 ++++ java/engine/org/apache/derby/impl/sql/compile/sqlgrammar.jj 2015-06-18 17:01:24.982950034 +0100 +@@ -12,6 +12,7 @@ + CACHE_TOKENS = true; + UNICODE_INPUT = true; + JDK_VERSION = "1.5"; ++ TOKEN_EXTENDS = "org.apache.derby.impl.sql.compile.TokenBase"; + } + + PARSER_BEGIN(SQLParser) +--- java/engine/org/apache/derby/impl/sql/compile/TokenBase.java.orig 2014-06-09 14:54:14.096762143 +0100 ++++ java/engine/org/apache/derby/impl/sql/compile/TokenBase.java 2014-06-09 14:54:58.672044878 +0100 +@@ -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; ++} +--- java/engine/org/apache/derby/impl/sql/build.xml.orig 2014-06-09 14:54:14.096762143 +0100 ++++ java/engine/org/apache/derby/impl/sql/build.xml 2014-06-09 14:54:58.672044878 +0100 +@@ -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 @@ + + + +- + + + + diff --git a/derby-javacc.patch b/derby-javacc7.patch similarity index 99% rename from derby-javacc.patch rename to derby-javacc7.patch index 2e070b2..7ab30f3 100644 --- a/derby-javacc.patch +++ b/derby-javacc7.patch @@ -19,3 +19,4 @@ + public boolean getTrackLineColumn() { return trackLineColumn; } + public void setTrackLineColumn(boolean tlc) { trackLineColumn = tlc; } } + diff --git a/derby-lucene.patch b/derby-lucene.patch index 97d74c0..a24addb 100644 --- a/derby-lucene.patch +++ b/derby-lucene.patch @@ -1,6 +1,34 @@ ---- java/optional/org/apache/derby/optional/api/LuceneUtils.java.orig 2015-06-18 17:39:57.626721793 +0100 -+++ java/optional/org/apache/derby/optional/api/LuceneUtils.java 2015-06-18 17:40:24.430371127 +0100 -@@ -108,21 +108,7 @@ +--- build.xml 2016-09-27 18:40:46.000000000 +0200 ++++ build.xml 2017-09-20 17:06:06.173755242 +0200 +@@ -48,7 +48,7 @@ + + + + +@@ -1735,7 +1735,6 @@ + + + +- + + + - 10.14.2.0-2 +- Fix build failure caused by javacc updated + * Fri Dec 1 2023 dillon chen - 10.14.2.0-1 - Update to 10.14.2.0 for fix CVE-2023-48284(patch from debian) -- Gitee