changed debian/source/format to native

This commit is contained in:
luoyaoming 2024-05-07 16:06:15 +08:00
parent c587bda411
commit 662b9f8419
9 changed files with 1 additions and 365 deletions

View File

@ -1,63 +0,0 @@
Description: Add jcommander to the classpath when TestNG is used.
This fixes a ClassNotFoundException when running the OpenJDK 8 tests
Author: Emmanuel Bourg <ebourg@apache.org>
Forwarded: no
--- a/src/share/classes/com/sun/javatest/regtest/exec/MainAction.java
+++ b/src/share/classes/com/sun/javatest/regtest/exec/MainAction.java
@@ -575,6 +575,7 @@
.append(jdk.getJDKClassPath())
.append(script.getJUnitPath())
.append(script.getTestNGPath())
+ .append(new SearchPath("/usr/share/java/jcommander.jar"))
.asList();
Version v = script.getRequiredVersion();
--- a/src/share/classes/com/sun/javatest/regtest/exec/RegressionScript.java
+++ b/src/share/classes/com/sun/javatest/regtest/exec/RegressionScript.java
@@ -829,16 +829,20 @@
File md = workDir.getFile("modules");
if (needJUnit)
install(params.getJUnitPath(), md);
- if (needTestNG)
+ if (needTestNG) {
install(params.getTestNGPath(), md);
+ install(new SearchPath("/usr/share/java/jcommander.jar"), md);
+ }
mp.append(md);
}
} else {
if (needJUnit)
cp.append(params.getJUnitPath());
- if (needTestNG)
+ if (needTestNG) {
cp.append(params.getTestNGPath());
+ cp.append(new SearchPath("/usr/share/java/jcommander.jar"));
+ }
}
// Extras:
@@ -930,8 +934,10 @@
File md = workDir.getFile("modules");
if (needJUnit)
install(params.getJUnitPath(), md);
- if (needTestNG)
+ if (needTestNG) {
install(params.getTestNGPath(), md);
+ install(new SearchPath("/usr/share/java/jcommander.jar"), md);
+ }
mp.append(md);
}
} else {
@@ -939,8 +945,10 @@
if (needJUnit)
fp.append(params.getJUnitPath());
- if (needTestNG)
+ if (needTestNG) {
fp.append(params.getTestNGPath());
+ fp.append(new SearchPath("/usr/share/java/jcommander.jar"));
+ }
}
// Extras:

View File

@ -1,55 +0,0 @@
Description: Add slf4j to the classpath in line with jcommander patch
Some jtreg tests are failing due to the missing slf4j (dependency of testng7).
Add slf4j to the classpath in line with the jcommander patch.
Author: Vladimir Petko <vladimir.petko@canonical.com>
Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/jtreg6/+bug/2012320
Last-Update: 2023-03-31
--- a/src/share/classes/com/sun/javatest/regtest/exec/MainAction.java
+++ b/src/share/classes/com/sun/javatest/regtest/exec/MainAction.java
@@ -576,6 +576,8 @@
.append(script.getJUnitPath())
.append(script.getTestNGPath())
.append(new SearchPath("/usr/share/java/jcommander.jar"))
+ .append(new SearchPath("/usr/share/java/slf4j-simple.jar"))
+ .append(new SearchPath("/usr/share/java/slf4j-api.jar"))
.asList();
Version v = script.getRequiredVersion();
--- a/src/share/classes/com/sun/javatest/regtest/exec/RegressionScript.java
+++ b/src/share/classes/com/sun/javatest/regtest/exec/RegressionScript.java
@@ -820,6 +820,8 @@
if (needTestNG) {
install(params.getTestNGPath(), md);
install(new SearchPath("/usr/share/java/jcommander.jar"), md);
+ install(new SearchPath("/usr/share/java/slf4j-simple.jar"), md);
+ install(new SearchPath("/usr/share/java/slf4j-api.jar"), md);
}
mp.append(md);
}
@@ -830,6 +832,8 @@
if (needTestNG) {
cp.append(params.getTestNGPath());
cp.append(new SearchPath("/usr/share/java/jcommander.jar"));
+ cp.append(new SearchPath("/usr/share/java/slf4j-simple.jar"));
+ cp.append(new SearchPath("/usr/share/java/slf4j-api.jar"));
}
}
@@ -925,6 +929,8 @@
if (needTestNG) {
install(params.getTestNGPath(), md);
install(new SearchPath("/usr/share/java/jcommander.jar"), md);
+ install(new SearchPath("/usr/share/java/slf4j-simple.jar"), md);
+ install(new SearchPath("/usr/share/java/slf4j-api.jar"), md);
}
mp.append(md);
}
@@ -936,6 +942,8 @@
if (needTestNG) {
fp.append(params.getTestNGPath());
fp.append(new SearchPath("/usr/share/java/jcommander.jar"));
+ fp.append(new SearchPath("/usr/share/java/slf4j-simple.jar"));
+ fp.append(new SearchPath("/usr/share/java/slf4j-api.jar"));
}
}

View File

@ -1,31 +0,0 @@
Description: Set release option to be able to compile with default-jdk
jtreg6 does not set release option and produces class files corresponding
to the compiling jdk. This is expected behavior and patch is not
needed upstream.
We require this patch only to avoid dependency on openjdk-8.
Author: Vladimir Petko <vladimir.petko@canonical.com>
Forwarded: not-needed
Last-Update: 2023-08-11
--- a/make/Defs.gmk
+++ b/make/Defs.gmk
@@ -149,7 +149,7 @@
# Only use -source -target, to support legacy platforms, when building with JDK 8
# Otherwise, use default values for $JDKHOME/bin/javac
-SUPPORT_OLD_SOURCE_TARGET = $(shell $(JDKJAVAC) -version 2>&1 | grep '[8]' > /dev/null && echo true )
+SUPPORT_OLD_SOURCE_TARGET = $(shell $(JDKJAVAC) -version 2>&1 | grep '1\.8\.' > /dev/null && echo true )
ifneq ($(SUPPORT_OLD_SOURCE_TARGET),)
OLD_JAVAC_SOURCE_TARGET = -source 1.2 -target 1.1
AGENT_JAVAC_SOURCE_TARGET = -source 5 -target 5
@@ -157,7 +157,10 @@
REGTEST_TOOL_PATCH_JAVA_BASE_OPTIONS =
else
EXTRA_LINT_OPTS = -rawtypes,-unchecked
- REGTEST_TOOL_PATCH_JAVA_BASE_OPTIONS = --patch-module java.base=$(JAVADIR)
+ REGTEST_TOOL_PATCH_JAVA_BASE_OPTIONS =
+ OLD_JAVAC_SOURCE_TARGET = --release 8
+ AGENT_JAVAC_SOURCE_TARGET = --release 8
+ TOOL_JAVAC_SOURCE_TARGET = --release 8
endif
ifdef JDK5HOME

View File

@ -1,26 +0,0 @@
Description: cannot compile jtreg with jdk-19
Java 19 introduced a [serial] linter warning. The build fails due to
'[serial] non-transient instance field of a serializable class declared with
a non-serializable type'.
Author: Jonathan Gibbons <jjg@openjdk.org>
Origin: upstream, https://github.com/openjdk/jtreg/commit/f4f1a41e4add3187b2c73f95c06591ae2de475a4
Bug: https://bugs.openjdk.org/browse/CODETOOLS-7903346
Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1057511
Forwarded: not-needed
Applied-Upstream: f4f1a41e4add3187b2c73f95c06591ae2de475a4
diff --git a/src/share/classes/com/sun/javatest/diff/SuperDiff.java b/src/share/classes/com/sun/javatest/diff/SuperDiff.java
index b40fe38..8c8d92b 100644
--- a/src/share/classes/com/sun/javatest/diff/SuperDiff.java
+++ b/src/share/classes/com/sun/javatest/diff/SuperDiff.java
@@ -212,10 +212,9 @@ class SuperDiff extends Diff {
}
}
+ @SuppressWarnings("serial")
static class SuperTable extends TreeMap<YearDay, Map<String, File>> {
- static final long serialVersionUID = 5933594140534747584L;
-
SuperTable(File inDir, String resultPath) {
super();
for (File pDir : inDir.listFiles()) {

View File

@ -1,106 +0,0 @@
Description: fix [this-escape] warnings by declaring classes final.
[this-escape] warning is generated when a class's constructor calls
a method that can be overridden.
Author: Jonathan Gibbons <jjg@openjdk.org>
Origin: upstream, https://github.com/openjdk/jtreg/commit/48935be4685ec5c99b3fe15c10439946944c9f7e
Bug: https://bugs.openjdk.org/browse/CODETOOLS-7903516
Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1057511
Forwarded: not-needed
Applied-Upstream: 48935be4685ec5c99b3fe15c10439946944c9f7e
--- a/src/share/classes/com/sun/javatest/regtest/agent/AgentServer.java
+++ b/src/share/classes/com/sun/javatest/regtest/agent/AgentServer.java
@@ -57,7 +57,7 @@
@SuppressWarnings("removal") // Security Manager and related APIs
-public class AgentServer implements ActionHelper.OutputHandler {
+public final class AgentServer implements ActionHelper.OutputHandler {
/**
* Main program used to invoke and run the server in child JVMs
--- a/src/share/classes/com/sun/javatest/regtest/agent/SearchPath.java
+++ b/src/share/classes/com/sun/javatest/regtest/agent/SearchPath.java
@@ -37,7 +37,7 @@
* A path, as in an ordered set of file system locations, such as directories,
* zip files and jar files.
*/
-public class SearchPath {
+public final class SearchPath {
/**
* Create an empty path.
*/
--- a/src/share/classes/com/sun/javatest/regtest/config/Locations.java
+++ b/src/share/classes/com/sun/javatest/regtest/config/Locations.java
@@ -44,7 +44,7 @@
/**
* Utilities to locate source and class files used by a test.
*/
-public class Locations {
+public final class Locations {
/**
* Used to report problems that are found.
*/
--- a/src/share/classes/com/sun/javatest/regtest/config/ParseException.java
+++ b/src/share/classes/com/sun/javatest/regtest/config/ParseException.java
@@ -34,7 +34,7 @@
*
* @author Iris A Garcia
*/
-public class ParseException extends TestRunException
+public final class ParseException extends TestRunException
{
static final long serialVersionUID = 5598548899306920122L;
public ParseException(String msg) {
@@ -44,7 +44,7 @@
public ParseException(Throwable t) {
super(PARSE_EXCEPTION + t.getMessage());
initCause(t);
- } // ParseExeptionException()
+ }
//----------misc statics----------------------------------------------------
--- a/src/share/classes/com/sun/javatest/regtest/config/RegressionParameters.java
+++ b/src/share/classes/com/sun/javatest/regtest/config/RegressionParameters.java
@@ -65,7 +65,7 @@
import static com.sun.javatest.regtest.util.StringUtils.join;
-public class RegressionParameters
+public final class RegressionParameters
extends BasicInterviewParameters
implements Parameters.EnvParameters
{
--- a/src/share/classes/com/sun/javatest/regtest/config/RegressionTestFinder.java
+++ b/src/share/classes/com/sun/javatest/regtest/config/RegressionTestFinder.java
@@ -66,7 +66,7 @@
* @see com.sun.javatest.TestFinder
* @see com.sun.javatest.finder.TagTestFinder
*/
-public class RegressionTestFinder extends TagTestFinder
+public final class RegressionTestFinder extends TagTestFinder
{
/**
* Constructs the list of file names to exclude for pruning in the search
--- a/src/share/classes/com/sun/javatest/regtest/config/RegressionTestSuite.java
+++ b/src/share/classes/com/sun/javatest/regtest/config/RegressionTestSuite.java
@@ -51,7 +51,7 @@
import com.sun.javatest.regtest.tool.RegressionContextManager;
-public class RegressionTestSuite extends TestSuite
+public final class RegressionTestSuite extends TestSuite
{
static Map<File, SoftReference<RegressionTestSuite>> cache;
--- a/src/share/classes/com/sun/javatest/regtest/util/StreamCopier.java
+++ b/src/share/classes/com/sun/javatest/regtest/util/StreamCopier.java
@@ -34,7 +34,7 @@
/**
* A thread to copy an input stream/reader to an output stream/writer.
*/
-public class StreamCopier extends Thread {
+public final class StreamCopier extends Thread {
public StreamCopier(InputStream in, PrintWriter out, LineScanner scanner) {
super(Thread.currentThread().getName() + "_StreamCopier_" + (serial++));

View File

@ -1,47 +0,0 @@
Description: Modifies the launcher scripts to specify the default Java and jtreg paths
Author: Emmanuel Bourg <ebourg@apache.org>
Forwarded: not-needed
--- a/src/share/bin/jtdiff.sh
+++ b/src/share/bin/jtdiff.sh
@@ -37,6 +37,10 @@
#
# jtdiff also provides an Ant task for direct invocation from Ant.
+if [ -z "${JT_HOME}" ]; then
+ JT_HOME="/usr/share/jtreg"
+fi
+
# Determine jtdiff/JavaTest installation directory
if [ -n "$JT_HOME" ]; then
if [ ! -r $JT_HOME/lib/jtreg.jar ];then
@@ -96,7 +100,7 @@
elif [ -n "$JAVA_HOME" ]; then
JT_JAVA="$JAVA_HOME/bin/java"
else
- JT_JAVA=java
+ JT_JAVA=/usr/lib/jvm/default-java/bin/java
fi
# Verify java version (1.)5 or newer used to run jtdiff
--- a/src/share/bin/jtreg.sh
+++ b/src/share/bin/jtreg.sh
@@ -70,6 +70,10 @@
# Determine jtreg installation directory
JTREG_HOME=${JTREG_HOME:-$JT_HOME} # allow for old version of name
+if [ -z "${JTREG_HOME}" ]; then
+ JTREG_HOME="/usr/share/jtreg"
+fi
+
if [ -n "$JTREG_HOME" ]; then
if [ ! -r $JTREG_HOME/lib/jtreg.jar ];then
echo "Invalid JTREG_HOME=$JTREG_HOME. Cannot find or read $JTREG_HOME/lib/jtreg.jar"
@@ -125,7 +129,7 @@
elif [ -n "$jdk" ]; then
JTREG_JAVA="$jdk/bin/java"
else
- JTREG_JAVA=java
+ JTREG_JAVA=/usr/lib/jvm/default-java/bin/java
fi
# Fixup JTREG_JAVA, JTREG_HOME as needed, if using Cygwin or WSL

View File

@ -1,29 +0,0 @@
Description: Make the build reproducible
Author: Chris Lamb <lamby@debian.org>
Last-Update: 2023-08-31
--- jtreg6-6.2+1.orig/make/Rules.gmk
+++ jtreg6-6.2+1/make/Rules.gmk
@@ -55,6 +55,13 @@ $(CLASSDIR) $(BUILDDIR) $(BUILDDIR)/test
# default copyright; override as necessary
JAR_COPYRIGHT = -C $(TOPDIR) COPYRIGHT
+DATE_FMT = %B %d, %Y
+ifdef SOURCE_DATE_EPOCH
+ BUILD_DATE ?= $(shell LC_ALL=C date -u -d "@$(SOURCE_DATE_EPOCH)" "$(DATE_FMT)" 2>/dev/null || LC_ALL=C date -u -r "$(SOURCE_DATE_EPOCH)" "$(DATE_FMT)" 2>/dev/null || LC_ALL=C date -u "$(DATE_FMT)")
+else
+ BUILD_DATE ?= $(shell date "$(DATE_FMT)")
+endif
+
$(IMAGES_DIR)/%.jar: pkgsToFiles.sh
$(RM) $@ $(@:$(IMAGES_DIR)/%.jar=$(BUILDDIR)/jarData/%)
$(MKDIR) -p $(@D)
@@ -68,7 +75,7 @@ $(IMAGES_DIR)/%.jar: pkgsToFiles.sh
echo "$(@F:%.jar=%)-Build: $(BUILD_NUMBER)" ; \
echo "$(@F:%.jar=%)-BuildJavaVersion: `$(JDKJAVA) -fullversion 2>&1 | awk '{print $$NF}' | \
sed -e 's|^"\(.*\)"$$|Java(TM) 2 SDK, Version \1|'`" ; \
- echo "$(@F:%.jar=%)-BuildDate: `/bin/date +'%B %d, %Y'`" ; \
+ echo "$(@F:%.jar=%)-BuildDate: $(BUILD_DATE)" ; \
) \
> $(@:$(IMAGES_DIR)/%.jar=$(BUILDDIR)/jarData/%/manifest.txt)
sh pkgsToFiles.sh $(CLASSDIR) $($(@F:%.jar=PKGS.JAR.%)) > $(@:$(IMAGES_DIR)/%.jar=$(BUILDDIR)/jarData/%/includes.txt)

View File

@ -1,7 +0,0 @@
add-release-options.patch
launchers.patch
add-jcommander-to-classpath.patch
add-logger-to-classpath.patch
reproducible-build.patch
java21-this-escape.patch
java21-suppress-serial.patch

View File

@ -1 +1 @@
3.0 (quilt)
3.0 (native)