Merge ~vpa1977/ubuntu/+source/cheshire-clojure:java21-ftbfs into ubuntu/+source/cheshire-clojure:ubuntu/devel

Proposed by Vladimir Petko
Status: Needs review
Proposed branch: ~vpa1977/ubuntu/+source/cheshire-clojure:java21-ftbfs
Merge into: ubuntu/+source/cheshire-clojure:ubuntu/devel
Diff against target: 76 lines (+31/-2)
5 files modified
debian/changelog (+9/-0)
debian/control (+2/-1)
debian/patches/0003-compile-with-jdk21.patch (+17/-0)
debian/patches/series (+1/-0)
debian/rules (+2/-1)
Reviewer Review Type Date Requested Status
Julian Andres Klode (community) Approve
git-ubuntu import Pending
Review via email: mp+460408@code.launchpad.net

Description of the change

This MP resolves Java 21 ftbfs.

PPA: ppa:vpa1977/october-21 [1]

Changes:
 - Use java_compat_level variable provided by java-common to adjust -source/-target level to the minimum required by the default Java

Testing:
 - rebuild in default Java 21 ppa[2]
 - piuparts test [3]

[1] https://launchpad.net/~vpa1977/+archive/ubuntu/october-21
[2] https://launchpad.net/~vpa1977/+archive/ubuntu/october-21-2/+sourcepub/15785346/+listing-archive-extra
[3] https://bugs.launchpad.net/ubuntu/+source/cheshire-clojure/+bug/2052757/comments/1

To post a comment you must log in.
Revision history for this message
Julian Andres Klode (juliank) wrote :

Uploaded, thanks

review: Approve

Unmerged commits

51944f1... by Vladimir Petko

changelog

6263d82... by Vladimir Petko

update-maintainer

8563229... by Vladimir Petko

Use JAVA_COMPAT_LEVEL to adjust -source/-target in project.clj

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 7e2e866..fe0d3c6 100644
3--- a/debian/changelog
4+++ b/debian/changelog
5@@ -1,3 +1,12 @@
6+cheshire-clojure (5.11.0-2ubuntu1) noble; urgency=medium
7+
8+ [ Pushkar Kulkarni ]
9+ * debian/patches/0003-compile-with-jdk21.patch: use JAVA_COMPAT_LEVEL
10+ environment variable provided by java-common to adjust -source/-target
11+ level to the minimum required by the default Java (LP: #2052757).
12+
13+ -- Vladimir Petko <vladimir.petko@canonical.com> Tue, 13 Feb 2024 10:43:03 +1300
14+
15 cheshire-clojure (5.11.0-2) unstable; urgency=medium
16
17 * d/tests: add autopkgtests
18diff --git a/debian/control b/debian/control
19index a16162e..b070564 100644
20--- a/debian/control
21+++ b/debian/control
22@@ -1,7 +1,8 @@
23 Source: cheshire-clojure
24 Section: java
25 Priority: optional
26-Maintainer: Debian Clojure Maintainers <team+clojure@tracker.debian.org>
27+Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
28+XSBC-Original-Maintainer: Debian Clojure Maintainers <team+clojure@tracker.debian.org>
29 Uploaders:
30 Apollon Oikonomopoulos <apoikos@debian.org>,
31 Jérôme Charaoui <jerome@riseup.net>,
32diff --git a/debian/patches/0003-compile-with-jdk21.patch b/debian/patches/0003-compile-with-jdk21.patch
33new file mode 100644
34index 0000000..5c23b28
35--- /dev/null
36+++ b/debian/patches/0003-compile-with-jdk21.patch
37@@ -0,0 +1,17 @@
38+Description: use java_compat_level variable provided by java-common
39+ This is a Debian-specific patch to set javac source and target level options
40+ using a variable provided by java-common package.
41+Author: Pushkar Kulkarni <pushkar.kulkarni@canonical.com>
42+Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1053016
43+Bug-Ubuntu: https://bugs.launchpad.net/debian/+source/cheshire-clojure/+bug/2052757
44+Forwarded: not-needed
45+Last-Update: 2024-02-09
46+--- a/project.clj
47++++ b/project.clj
48+@@ -39,5 +39,5 @@
49+ ;; "-XX:+UnlockDiagnosticVMOptions"
50+ ;; "-XX:+PrintInlining"
51+ ]
52+- :javac-options ["-target" "1.7" "-source" "1.7" "-Xlint:-options"]
53++ :javac-options ["-target" ~(System/getenv, "JAVA_COMPAT_LEVEL") "-source" ~(System/getenv, "JAVA_COMPAT_LEVEL")]
54+ :local-repo "debian/maven-repo")
55diff --git a/debian/patches/series b/debian/patches/series
56index 53c5240..8878832 100644
57--- a/debian/patches/series
58+++ b/debian/patches/series
59@@ -1,2 +1,3 @@
60 0001-Lein-Local.patch
61 0002-Skip-failing-test.generative-testcase.patch
62+0003-compile-with-jdk21.patch
63diff --git a/debian/rules b/debian/rules
64index 5940ff3..0e1c6fb 100755
65--- a/debian/rules
66+++ b/debian/rules
67@@ -2,7 +2,8 @@
68
69 include /usr/share/dpkg/pkg-info.mk
70 include /usr/share/javahelper/java-vars.mk
71-
72+include /usr/share/java/java_defaults.mk
73+export JAVA_COMPAT_LEVEL=$(java_compat_level)
74 export LEIN_HOME=$(CURDIR)/.lein
75 export LEIN_OFFLINE=true
76 NAME=cheshire

Subscribers

People subscribed via source and target branches