Merge ~vpa1977/ubuntu/+source/bazel-bootstrap:ubuntu/devel into ubuntu/+source/bazel-bootstrap:ubuntu/devel

Proposed by Vladimir Petko
Status: Merged
Merge reported by: Vladimir Petko
Merged at revision: 5bccf3802a96c1d0caec8c20f5dc595191bcc60c
Proposed branch: ~vpa1977/ubuntu/+source/bazel-bootstrap:ubuntu/devel
Merge into: ubuntu/+source/bazel-bootstrap:ubuntu/devel
Diff against target: 74 lines (+40/-1)
4 files modified
debian/changelog (+7/-0)
debian/control (+2/-1)
debian/patches/handle_synthetic_method_parameters_entries_that_dont_have_names.patch (+30/-0)
debian/patches/series (+1/-0)
Reviewer Review Type Date Requested Status
Canonical Foundations Team Pending
Ubuntu Sponsors Pending
git-ubuntu import Pending
Review via email: mp+460544@code.launchpad.net

Description of the change

This MP resolves Java 21 ftbfs.

PPA: ppa:vpa1977/gettext [1]

Changes:
 - Cherry-pick upstream patch to resolve Java 21 ftbfs

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

[1] https://launchpad.net/~vpa1977/+archive/ubuntu/gettext
[2] https://launchpad.net/~vpa1977/+archive/ubuntu/gettext-21/+sourcepub/15788140/+listing-archive-extra
[3] https://bugs.launchpad.net/ubuntu/+source/bazel-bootstrap/+bug/2053202/comments/1

To post a comment you must log in.

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 04ce192..153fcd9 100644
3--- a/debian/changelog
4+++ b/debian/changelog
5@@ -1,3 +1,10 @@
6+bazel-bootstrap (4.2.3+ds-9ubuntu1) noble; urgency=medium
7+
8+ * d/p/handle_synthetic_method_parameters_that_dont_have_names.patch:
9+ apply upstream patch to resolve Java 21 ftbfs (LP: #2053202).
10+
11+ -- Vladimir Petko <vladimir.petko@canonical.com> Fri, 05 Jan 2024 15:57:39 +1300
12+
13 bazel-bootstrap (4.2.3+ds-9) unstable; urgency=high
14
15 [ Markus Koschany ]
16diff --git a/debian/control b/debian/control
17index ef19ccf..a6f2767 100644
18--- a/debian/control
19+++ b/debian/control
20@@ -1,7 +1,8 @@
21 Source: bazel-bootstrap
22 Section: devel
23 Priority: optional
24-Maintainer: Debian Bazel Team <bazel-team@lists.launchpad.net>
25+Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
26+XSBC-Original-Maintainer: Debian Bazel Team <bazel-team@lists.launchpad.net>
27 Uploaders:
28 Debian Bazel Team <team+bazel@tracker.debian.org>,
29 Olek Wojnar <olek@debian.org>
30diff --git a/debian/patches/handle_synthetic_method_parameters_entries_that_dont_have_names.patch b/debian/patches/handle_synthetic_method_parameters_entries_that_dont_have_names.patch
31new file mode 100644
32index 0000000..199d9e1
33--- /dev/null
34+++ b/debian/patches/handle_synthetic_method_parameters_entries_that_dont_have_names.patch
35@@ -0,0 +1,30 @@
36+Description: Handle synthetic method parameters entries that don't have names
37+ > If the value of the name_index item is zero, then this parameters element indicates a formal parameter with no name.
38+ https://docs.oracle.com/javase/specs/jvms/se20/html/jvms-4.html#jvms-4.7.24
39+Author: Liam Miller-Cushon <cushon@google.com>
40+Origin: upstream, https://github.com/bazelbuild/bazel/commit/3954a18fa6b0e3d1a1005cc3409ebc95f6adf3af
41+Forwarded: not-needed
42+Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1057490
43+Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/bazel-bootstrap/+bug/2053202
44+Last-Update: 2024-01-05
45+--- a/third_party/ijar/classfile.cc
46++++ b/third_party/ijar/classfile.cc
47+@@ -1168,7 +1168,8 @@
48+ u1 parameters_count = get_u1(p);
49+ for (int ii = 0; ii < parameters_count; ++ii) {
50+ MethodParameter* parameter = new MethodParameter;
51+- parameter->name_ = constant(get_u2be(p));
52++ int name_id = get_u2be(p);
53++ parameter->name_ = name_id == 0 ? NULL : constant(name_id);
54+ parameter->access_flags_ = get_u2be(p);
55+ attr->parameters_.push_back(parameter);
56+ }
57+@@ -1180,7 +1181,7 @@
58+ u1 *payload_start = p - 4;
59+ put_u1(p, parameters_.size());
60+ for (MethodParameter* parameter : parameters_) {
61+- put_u2be(p, parameter->name_->slot());
62++ put_u2be(p, parameter->name_ == NULL ? 0 : parameter->name_->slot());
63+ put_u2be(p, parameter->access_flags_);
64+ }
65+ put_u4be(payload_start, p - 4 - payload_start); // backpatch length
66diff --git a/debian/patches/series b/debian/patches/series
67index 2ca3fef..6a3cef0 100644
68--- a/debian/patches/series
69+++ b/debian/patches/series
70@@ -31,3 +31,4 @@ grpc-absl_synchronization.patch
71 exclude_build_data.patch
72 fix-install_base_key-generation.patch
73 javax.annotations.patch
74+handle_synthetic_method_parameters_entries_that_dont_have_names.patch

Subscribers

People subscribed via source and target branches