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

Subscribers

People subscribed via source and target branches