Merge ~vpa1977/ubuntu/+source/procyon:merge-lp-2064898 into ubuntu/+source/procyon:debian/sid

Proposed by Vladimir Petko
Status: Needs review
Proposed branch: ~vpa1977/ubuntu/+source/procyon:merge-lp-2064898
Merge into: ubuntu/+source/procyon:debian/sid
Diff against target: 154 lines (+116/-1)
4 files modified
debian/changelog (+17/-0)
debian/control (+2/-1)
debian/patches/03-java21-disable-failing-tests.patch (+96/-0)
debian/patches/series (+1/-0)
Reviewer Review Type Date Requested Status
Zixing Liu (community) Approve
git-ubuntu import Pending
Review via email: mp+465740@code.launchpad.net

Description of the change

To post a comment you must log in.
Revision history for this message
Zixing Liu (liushuyu-011) wrote :

LGTM

review: Approve

Unmerged commits

7b011a7... by Vladimir Petko

changelog

af50231... by Vladimir Petko

update-maintainer

99fef21... by Vladimir Petko

reconstruct-changelog

98ad7f8... by Vladimir Petko

merge-changelogs

1b7ad73... by Vladimir Petko

    - d/p/03-java21-disable-failing-tests.patch: disable tests failing
      with Java 21 (LP: 2054251). The decompiler still produces reasonable
      code, just not what the tests expect.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
diff --git a/debian/changelog b/debian/changelog
index e1f0a2b..445e18f 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,9 +1,26 @@
1procyon (0.6.0-2ubuntu1) oracular; urgency=medium
2
3 * Merge with Debian unstable (LP: #2064898). Remaining changes:
4 - d/p/03-java21-disable-failing-tests.patch: disable tests failing
5 with Java 21 (LP 2054251). The decompiler still produces reasonable
6 code, just not what the tests expect.
7
8 -- Vladimir Petko <vladimir.petko@canonical.com> Mon, 06 May 2024 18:00:06 +1200
9
1procyon (0.6.0-2) unstable; urgency=medium10procyon (0.6.0-2) unstable; urgency=medium
211
3 * Prevent untrusted code execution from the command line (Closes: #1068463)12 * Prevent untrusted code execution from the command line (Closes: #1068463)
413
5 -- Emmanuel Bourg <ebourg@apache.org> Sat, 06 Apr 2024 10:46:00 +020014 -- Emmanuel Bourg <ebourg@apache.org> Sat, 06 Apr 2024 10:46:00 +0200
615
16procyon (0.6.0-1ubuntu1) noble; urgency=medium
17
18 * d/p/03-java21-disable-failing-tests.patch: disable tests failing
19 with Java 21 (LP: #2054251). The decompiler still produces reasonable
20 code, just not what the tests expect.
21
22 -- Vladimir Petko <vladimir.petko@canonical.com> Mon, 19 Feb 2024 11:55:04 +1300
23
7procyon (0.6.0-1) unstable; urgency=medium24procyon (0.6.0-1) unstable; urgency=medium
825
9 * New upstream release26 * New upstream release
diff --git a/debian/control b/debian/control
index 7592a06..cb175ef 100644
--- a/debian/control
+++ b/debian/control
@@ -1,7 +1,8 @@
1Source: procyon1Source: procyon
2Section: java2Section: java
3Priority: optional3Priority: optional
4Maintainer: Debian Java Maintainers <pkg-java-maintainers@lists.alioth.debian.org>4Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
5XSBC-Original-Maintainer: Debian Java Maintainers <pkg-java-maintainers@lists.alioth.debian.org>
5Uploaders: Emmanuel Bourg <ebourg@apache.org>6Uploaders: Emmanuel Bourg <ebourg@apache.org>
6Build-Depends:7Build-Depends:
7 debhelper-compat (= 13),8 debhelper-compat (= 13),
diff --git a/debian/patches/03-java21-disable-failing-tests.patch b/debian/patches/03-java21-disable-failing-tests.patch
8new file mode 1006449new file mode 100644
index 0000000..e3fc36f
--- /dev/null
+++ b/debian/patches/03-java21-disable-failing-tests.patch
@@ -0,0 +1,96 @@
1Description: disable tests failing with Java 21
2 - SwitchTests.testEnumSwitch - enum switch was decompiled as an ordinal switch.
3 - ThirdPartyTests.testUnboxToNumber - decompiled code contains Constable,
4 not Number.
5 - ThirdPartyTests.testLiteralAssignments - test specifies float numbers with
6 excess precision, Java truncates those since 19.
7 - ThirdPartyTests.testOptimizedVariables, testSwitchKrakatau,
8 testWhileLoopsKrakatau - decompiled variable does not match ('b' vs 'x')
9Author: Vladimir Petko <vladimir.petko@canonical.com>
10Bug: https://github.com/mstrobel/procyon/issues/71
11Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1057532
12Bug-Ubuntu: https://bugs.launchpad.net/debian/+source/procyon/+bug/2054251
13Last-Update: 2024-02-02
14--- a/Procyon.CompilerTools/src/test/java/com/strobel/decompiler/DecompilerTest.java
15+++ b/Procyon.CompilerTools/src/test/java/com/strobel/decompiler/DecompilerTest.java
16@@ -157,4 +157,14 @@
17
18 return CompilerTarget.DEFAULT;
19 }
20+
21+ protected static boolean specificationVersionLessThan21() {
22+ try {
23+ return Integer.parseInt(System.getProperty("java.specification.version")) < 21 ;
24+ }
25+ catch (NumberFormatException e) {
26+ // will fail for 1.8 earlier
27+ }
28+ return true;
29+ }
30 }
31--- a/Procyon.CompilerTools/src/test/java/com/strobel/decompiler/SwitchTests.java
32+++ b/Procyon.CompilerTools/src/test/java/com/strobel/decompiler/SwitchTests.java
33@@ -13,6 +13,7 @@
34
35 package com.strobel.decompiler;
36
37+import org.junit.Assume;
38 import org.junit.Test;
39
40 public class SwitchTests extends DecompilerTest {
41@@ -254,6 +255,8 @@
42
43 @Test
44 public void testEnumSwitch() {
45+ Assume.assumeTrue("Java 21: enum switch was decompiled as an ordinal switch",
46+ specificationVersionLessThan21());
47 verifyOutput(
48 SwitchTests$D.class,
49 createSettings(OPTION_EXCLUDE_NESTED | OPTION_FLATTEN_SWITCH_BLOCKS),
50--- a/Procyon.CompilerTools/src/test/java/com/strobel/decompiler/ThirdPartyTests.java
51+++ b/Procyon.CompilerTools/src/test/java/com/strobel/decompiler/ThirdPartyTests.java
52@@ -20,6 +20,8 @@
53
54 @Test
55 public void testOptimizedVariables() throws Throwable {
56+ Assume.assumeTrue("Java 21: decompiled variable does not match ('b' vs 'x')",
57+ specificationVersionLessThan21());
58 assumePreJdk9();
59 verifyOutput(
60 Class.forName("SootOptimizationTest"),
61@@ -97,6 +99,8 @@
62
63 @Test
64 public void testSwitchKrakatau() throws Throwable {
65+ Assume.assumeTrue("Java 21: decompiled variable does not match ('b' vs 'x')",
66+ specificationVersionLessThan21());
67 assumePreJdk9();
68 verifyOutput(
69 Class.forName("Switch"),
70@@ -147,6 +151,8 @@
71
72 @Test
73 public void testWhileLoopsKrakatau() throws Throwable {
74+ Assume.assumeTrue("Java 21: decompiled variable does not match ('b' vs 'x')",
75+ specificationVersionLessThan21());
76 assumePreJdk9();
77 verifyOutput(
78 Class.forName("WhileLoops"),
79@@ -283,6 +289,8 @@
80
81 @Test
82 public void testUnboxToNumber() throws Throwable {
83+ Assume.assumeTrue("Java 21: decompiled code contains Constable, not Number",
84+ specificationVersionLessThan21());
85 assumePreJdk9();
86 verifyOutput(
87 Class.forName("UnboxToNumber"),
88@@ -307,6 +315,8 @@
89
90 @Test
91 public void testLiteralAssignments() {
92+ Assume.assumeTrue("Java 21 truncates floats specified with excess precision",
93+ specificationVersionLessThan21());
94 verifyOutput(
95 "LiteralAssignments",
96 defaultSettings(),
diff --git a/debian/patches/series b/debian/patches/series
index 481a8ee..fee79c2 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1,2 @@
102-cli-program-name.patch102-cli-program-name.patch
203-java21-disable-failing-tests.patch

Subscribers

People subscribed via source and target branches