Merge ~vpa1977/ubuntu/+source/gettext:java21_compat into ubuntu/+source/gettext:ubuntu/devel

Proposed by Vladimir Petko
Status: Merged
Merge reported by: Vladimir Petko
Merged at revision: df2fd2e38216aa49706a37ea6e191387c968474e
Proposed branch: ~vpa1977/ubuntu/+source/gettext:java21_compat
Merge into: ubuntu/+source/gettext:ubuntu/devel
Diff against target: 489 lines (+395/-8)
5 files modified
debian/changelog (+9/-0)
debian/control (+2/-1)
debian/patches/07-java-17-support.patch (+27/-7)
debian/patches/12-in-language-java-avoid-stack-overflow.patch (+356/-0)
debian/patches/series (+1/-0)
Reviewer Review Type Date Requested Status
Simon Chopin Pending
git-ubuntu import Pending
Review via email: mp+459117@code.launchpad.net

Description of the change

Changes:
 - Update list of supported Java versions
 - Bump Java compatibility level to 8
 - Default to 11 if Java version is not on the list (previously was using level 1.1. which is not supported by any relevant Java machine)
 - Cherry-pick upstream patch that fixes the stack overflow

Note: gettext 0.22.4 refactors Java support and this delta can be safely dropped with a new upstream release.

PPA: ppa:vpa1977/gettext
PPA (Default Java 21): ppa:vpa1977/gettext-21

Testing:
 - piuparts test[1]
 - build ssl-utils-clojure both with default Java 17[2] and 21[3]

[1] https://bugs.launchpad.net/ubuntu/+source/gettext/+bug/2050033/comments/1
[2] https://launchpadlibrarian.net/710814814/buildlog_ubuntu-noble-amd64.ssl-utils-clojure_3.5.3-1~ppa1_BUILDING.txt.gz
[3] https://launchpad.net/~vpa1977/+archive/ubuntu/gettext-21/+build/27676266/+files/buildlog_ubuntu-noble-amd64.ssl-utils-clojure_3.5.3-1~ppa1_BUILDING.txt.gz

To post a comment you must log in.
Revision history for this message
Simon Chopin (schopin) wrote :

This appears to have been sponsored already!

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 3395c81..850f56c 100644
3--- a/debian/changelog
4+++ b/debian/changelog
5@@ -1,3 +1,12 @@
6+gettext (0.21-14ubuntu1) noble; urgency=medium
7+
8+ * Update patches to support Java 21 (LP: #2050033):
9+ - d/p/12-in-language-java-avoid-stack-overflow.patch: cherry-pick upstream
10+ patch to resolve Java 21 FTBFS.
11+ - d/p/07-java-17-support.patch: add Java versions, set release level 8.
12+
13+ -- Vladimir Petko <vladimir.petko@canonical.com> Mon, 22 Jan 2024 13:33:17 +1300
14+
15 gettext (0.21-14) unstable; urgency=medium
16
17 * Update po-mode. Closes: #1055020.
18diff --git a/debian/control b/debian/control
19index d888609..8b2d348 100644
20--- a/debian/control
21+++ b/debian/control
22@@ -1,7 +1,8 @@
23 Source: gettext
24 Section: devel
25 Priority: optional
26-Maintainer: Santiago Vila <sanvila@debian.org>
27+Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
28+XSBC-Original-Maintainer: Santiago Vila <sanvila@debian.org>
29 Standards-Version: 4.6.2
30 Build-Depends: bison,
31 debhelper-compat (= 13),
32diff --git a/debian/patches/07-java-17-support.patch b/debian/patches/07-java-17-support.patch
33index 499d627..b929832 100644
34--- a/debian/patches/07-java-17-support.patch
35+++ b/debian/patches/07-java-17-support.patch
36@@ -11,7 +11,7 @@ Bug-Debian: https://bugs.debian.org/1012105
37 gt_JAVA_CHOICE
38
39 -gt_JAVACOMP([1.5], [1.6])
40-+gt_JAVACOMP([1.7], [1.7])
41++gt_JAVACOMP([1.8], [1.8])
42 AC_CHECK_PROG([JAR], [jar], [jar])
43 if test -n "$HAVE_JAVACOMP" && test -n "$JAR" && test "$JAVA_CHOICE" != no; then
44 BUILDJAVA=yes
45@@ -22,7 +22,7 @@ Bug-Debian: https://bugs.debian.org/1012105
46
47 gt_JAVAEXEC
48 -gt_JAVACOMP([1.5])
49-+gt_JAVACOMP([1.7])
50++gt_JAVACOMP([1.8])
51 AC_CHECK_PROG([JAR], [jar], [jar])
52 if test -n "$HAVE_JAVACOMP" && test -n "$JAR" && test "$JAVA_CHOICE" != no; then
53 BUILDJAVA=yes
54@@ -33,7 +33,7 @@ Bug-Debian: https://bugs.debian.org/1012105
55 gt_JAVAEXEC([TestAWT], [$srcdir/m4])
56 dnl Check whether we can build Java programs.
57 -gt_JAVACOMP([1.5])
58-+gt_JAVACOMP([1.7])
59++gt_JAVACOMP([1.8])
60 AC_CHECK_PROG([JAR], [jar], [jar])
61 if test -n "$HAVE_JAVACOMP" && test -n "$JAR"; then
62 BUILDJAVA=yes
63@@ -44,7 +44,7 @@ Bug-Debian: https://bugs.debian.org/1012105
64 gt_JAVAEXEC([Test15], [$srcdir/m4])
65 dnl Check whether we can build Java programs.
66 -gt_JAVACOMP([1.5], [1.6])
67-+gt_JAVACOMP([1.7], [1.7])
68++gt_JAVACOMP([1.8], [1.8])
69 AC_CHECK_PROG([JAR], [jar], [jar])
70 if test -n "$HAVE_JAVACOMP" && test -n "$JAR"; then
71 BUILDJAVA=yes
72@@ -55,7 +55,7 @@ Bug-Debian: https://bugs.debian.org/1012105
73 gt_JAVAEXEC([TestAWT], [$srcdir/m4])
74 dnl Check whether we can build Java programs.
75 -gt_JAVACOMP([1.5])
76-+gt_JAVACOMP([1.7])
77++gt_JAVACOMP([1.8])
78 AC_CHECK_PROG([JAR], [jar], [jar])
79 if test -n "$HAVE_JAVACOMP" && test -n "$JAR"; then
80 BUILDJAVA=yes
81@@ -66,7 +66,7 @@ Bug-Debian: https://bugs.debian.org/1012105
82 gt_JAVAEXEC
83 dnl Check whether we can build Java programs.
84 -gt_JAVACOMP([1.5])
85-+gt_JAVACOMP([1.7])
86++gt_JAVACOMP([1.8])
87 AC_CHECK_PROG([JAR], [jar], [jar])
88 if test -n "$HAVE_JAVACOMP" && test -n "$JAR"; then
89 BUILDJAVA=yes
90@@ -77,7 +77,27 @@ Bug-Debian: https://bugs.debian.org/1012105
91 which is in a temporary directory in our case. */
92 java_sources[0] = java_file_name;
93 - if (compile_java_class (java_sources, 1, NULL, 0, "1.5", "1.6", directory,
94-+ if (compile_java_class (java_sources, 1, NULL, 0, "1.7", "1.7", directory,
95++ if (compile_java_class (java_sources, 1, NULL, 0, "1.8", "1.8", directory,
96 true, false, true, verbose > 0))
97 {
98 if (!verbose)
99+--- a/gettext-tools/gnulib-m4/javacomp.m4
100++++ b/gettext-tools/gnulib-m4/javacomp.m4
101+@@ -127,7 +127,7 @@
102+ }`
103+ case "$target_version" in
104+ 1.1 | 1.2 | 1.3 | 1.4 | 1.5 | 1.6 | 1.7 | 1.8 | 9 | 10 | 11) ;;
105+- 12 | 13 | 14 | 15 | 16 | 17)
106++ 12 | 13 | 14 | 15 | 16 | 17 | 18| 19| 20 | 21 | 22 | 23| 24 | 25 | 26)
107+ dnl Assume that these (not yet released) Java versions will behave
108+ dnl like the preceding ones.
109+ target_version=11 ;;
110+@@ -135,7 +135,7 @@
111+ dnl JDK 1.1.X returns null.
112+ target_version=1.1 ;;
113+ *) AC_MSG_WARN([unknown target-version $target_version, please update gt_@&t@JAVACOMP macro])
114+- target_version=1.1 ;;
115++ target_version=11 ;;
116+ esac
117+ else
118+ target_version="1.1"
119diff --git a/debian/patches/12-in-language-java-avoid-stack-overflow.patch b/debian/patches/12-in-language-java-avoid-stack-overflow.patch
120new file mode 100644
121index 0000000..57d8260
122--- /dev/null
123+++ b/debian/patches/12-in-language-java-avoid-stack-overflow.patch
124@@ -0,0 +1,356 @@
125+Description: xgettext: In language Java, avoid stack overflow.
126+ * gettext-tools/src/x-java.c (MAX_NESTING_DEPTH): New macro.
127+ (paren_nesting_depth, brace_nesting_depth): New variables.
128+ (extract_parenthesized): Increase and check paren_nesting_depth or
129+ brace_nesting_depth before calling extract_parenthesized recursively.
130+ (extract_java): Initialize paren_nesting_depth and brace_nesting_depth.
131+ * gettext-tools/tests/xgettext-java-stackovfl-1: New file.
132+ * gettext-tools/tests/xgettext-java-stackovfl-2: New file.
133+ * gettext-tools/tests/xgettext-java-stackovfl-3: New file.
134+ * gettext-tools/tests/xgettext-java-stackovfl-4: New file.
135+ * gettext-tools/tests/Makefile.am (TESTS): Add them.
136+Author: Bruno Haible <bruno@clisp.org>
137+Origin: upstream, https://git.savannah.gnu.org/gitweb/?p=gettext.git;a=commit;h=f56d235faf788162c09487df129996ae62f1121f
138+Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1056293
139+Bug-Ubuntu: https://bugs.launchpad.net/debian/+source/gettext/+bug/2050033
140+Forwarded: not-needed
141+Applied-Upstream: f56d235faf788162c09487df129996ae62f1121f
142+Last-Update: 2024-01-22
143+--- a/gettext-tools/src/x-java.c
144++++ b/gettext-tools/src/x-java.c
145+@@ -1,5 +1,5 @@
146+ /* xgettext Java backend.
147+- Copyright (C) 2003, 2005-2009, 2018-2020 Free Software Foundation, Inc.
148++ Copyright (C) 2003, 2005-2009, 2018-2023 Free Software Foundation, Inc.
149+ Written by Bruno Haible <bruno@clisp.org>, 2003.
150+
151+ This program is free software: you can redistribute it and/or modify
152+@@ -1431,6 +1431,14 @@
153+ static flag_context_list_table_ty *flag_context_list_table;
154+
155+
156++/* Maximum supported nesting depth. */
157++#define MAX_NESTING_DEPTH 1000
158++
159++/* Current nesting depths. */
160++static int paren_nesting_depth;
161++static int brace_nesting_depth;
162++
163++
164+ /* The file is broken into tokens. Scan the token stream, looking for
165+ a keyword, followed by a left paren, followed by a string. When we
166+ see this sequence, we have something to remember. We assume we are
167+@@ -1566,6 +1574,12 @@
168+ }
169+
170+ case token_type_lparen:
171++ if (++paren_nesting_depth > MAX_NESTING_DEPTH)
172++ {
173++ error_with_progname = false;
174++ error (EXIT_FAILURE, 0, _("%s:%d: error: too many open parentheses"),
175++ logical_file_name, line_number);
176++ }
177+ if (extract_parenthesized (mlp, token_type_rparen,
178+ inner_context, next_context_iter,
179+ arglist_parser_alloc (mlp,
180+@@ -1574,6 +1588,7 @@
181+ arglist_parser_done (argparser, arg);
182+ return true;
183+ }
184++ paren_nesting_depth--;
185+ next_context_iter = null_context_list_iterator;
186+ state = 0;
187+ continue;
188+@@ -1597,6 +1612,12 @@
189+ continue;
190+
191+ case token_type_lbrace:
192++ if (++brace_nesting_depth > MAX_NESTING_DEPTH)
193++ {
194++ error_with_progname = false;
195++ error (EXIT_FAILURE, 0, _("%s:%d: error: too many open braces"),
196++ logical_file_name, line_number);
197++ }
198+ if (extract_parenthesized (mlp, token_type_rbrace,
199+ null_context, null_context_list_iterator,
200+ arglist_parser_alloc (mlp, NULL)))
201+@@ -1604,6 +1625,7 @@
202+ arglist_parser_done (argparser, arg);
203+ return true;
204+ }
205++ brace_nesting_depth--;
206+ next_context_iter = null_context_list_iterator;
207+ state = 0;
208+ continue;
209+@@ -1706,6 +1728,8 @@
210+ phase6_last = token_type_eof;
211+
212+ flag_context_list_table = flag_table;
213++ paren_nesting_depth = 0;
214++ brace_nesting_depth = 0;
215+
216+ init_keywords ();
217+
218+--- a/gettext-tools/tests/Makefile.am
219++++ b/gettext-tools/tests/Makefile.am
220+@@ -99,6 +99,8 @@
221+ xgettext-its-1 xgettext-its-2 \
222+ xgettext-java-1 xgettext-java-2 xgettext-java-3 xgettext-java-4 \
223+ xgettext-java-5 xgettext-java-6 xgettext-java-7 \
224++ xgettext-java-stackovfl-1 xgettext-java-stackovfl-2 \
225++ xgettext-java-stackovfl-3 xgettext-java-stackovfl-4 \
226+ xgettext-javascript-1 xgettext-javascript-2 xgettext-javascript-3 \
227+ xgettext-javascript-4 xgettext-javascript-5 xgettext-javascript-6 \
228+ xgettext-javascript-7 \
229+--- /dev/null
230++++ b/gettext-tools/tests/xgettext-java-stackovfl-1
231+@@ -0,0 +1,63 @@
232++#! /bin/sh
233++. "${srcdir=.}/init.sh"; path_prepend_ . ../src
234++
235++# Test Java support: stack overflow prevented by nesting depth check.
236++
237++cat <<EOF > xg-j-so-1.java
238++((((((((((((((((((((((((((((((((((((((((((((((((((
239++((((((((((((((((((((((((((((((((((((((((((((((((((
240++((((((((((((((((((((((((((((((((((((((((((((((((((
241++((((((((((((((((((((((((((((((((((((((((((((((((((
242++((((((((((((((((((((((((((((((((((((((((((((((((((
243++((((((((((((((((((((((((((((((((((((((((((((((((((
244++((((((((((((((((((((((((((((((((((((((((((((((((((
245++((((((((((((((((((((((((((((((((((((((((((((((((((
246++((((((((((((((((((((((((((((((((((((((((((((((((((
247++((((((((((((((((((((((((((((((((((((((((((((((((((
248++((((((((((((((((((((((((((((((((((((((((((((((((((
249++((((((((((((((((((((((((((((((((((((((((((((((((((
250++((((((((((((((((((((((((((((((((((((((((((((((((((
251++((((((((((((((((((((((((((((((((((((((((((((((((((
252++((((((((((((((((((((((((((((((((((((((((((((((((((
253++((((((((((((((((((((((((((((((((((((((((((((((((((
254++((((((((((((((((((((((((((((((((((((((((((((((((((
255++((((((((((((((((((((((((((((((((((((((((((((((((((
256++((((((((((((((((((((((((((((((((((((((((((((((((((
257++(((((((((((((((((((((((((((((((((((((((((((((((((
258++bundle.gettext("Hello!")
259++))))))))))))))))))))))))))))))))))))))))))))))))))
260++))))))))))))))))))))))))))))))))))))))))))))))))))
261++))))))))))))))))))))))))))))))))))))))))))))))))))
262++))))))))))))))))))))))))))))))))))))))))))))))))))
263++))))))))))))))))))))))))))))))))))))))))))))))))))
264++))))))))))))))))))))))))))))))))))))))))))))))))))
265++))))))))))))))))))))))))))))))))))))))))))))))))))
266++))))))))))))))))))))))))))))))))))))))))))))))))))
267++))))))))))))))))))))))))))))))))))))))))))))))))))
268++))))))))))))))))))))))))))))))))))))))))))))))))))
269++))))))))))))))))))))))))))))))))))))))))))))))))))
270++))))))))))))))))))))))))))))))))))))))))))))))))))
271++))))))))))))))))))))))))))))))))))))))))))))))))))
272++))))))))))))))))))))))))))))))))))))))))))))))))))
273++))))))))))))))))))))))))))))))))))))))))))))))))))
274++))))))))))))))))))))))))))))))))))))))))))))))))))
275++))))))))))))))))))))))))))))))))))))))))))))))))))
276++))))))))))))))))))))))))))))))))))))))))))))))))))
277++))))))))))))))))))))))))))))))))))))))))))))))))))
278++)))))))))))))))))))))))))))))))))))))))))))))))))
279++EOF
280++
281++: ${XGETTEXT=xgettext}
282++${XGETTEXT} --omit-header --no-location -d xg-j-so-1.tmp xg-j-so-1.java || Exit 1
283++LC_ALL=C tr -d '\r' < xg-j-so-1.tmp.po > xg-j-so-1.po || Exit 1
284++
285++cat <<EOF > xg-j-so-1.ok
286++msgid "Hello!"
287++msgstr ""
288++EOF
289++
290++: ${DIFF=diff}
291++${DIFF} xg-j-so-1.ok xg-j-so-1.po
292++result=$?
293++
294++exit $result
295+--- /dev/null
296++++ b/gettext-tools/tests/xgettext-java-stackovfl-2
297+@@ -0,0 +1,56 @@
298++#! /bin/sh
299++. "${srcdir=.}/init.sh"; path_prepend_ . ../src
300++
301++# Test Java support: stack overflow prevented by nesting depth check.
302++
303++cat <<EOF > xg-j-so-2.java
304++((((((((((((((((((((((((((((((((((((((((((((((((((
305++((((((((((((((((((((((((((((((((((((((((((((((((((
306++((((((((((((((((((((((((((((((((((((((((((((((((((
307++((((((((((((((((((((((((((((((((((((((((((((((((((
308++((((((((((((((((((((((((((((((((((((((((((((((((((
309++((((((((((((((((((((((((((((((((((((((((((((((((((
310++((((((((((((((((((((((((((((((((((((((((((((((((((
311++((((((((((((((((((((((((((((((((((((((((((((((((((
312++((((((((((((((((((((((((((((((((((((((((((((((((((
313++((((((((((((((((((((((((((((((((((((((((((((((((((
314++((((((((((((((((((((((((((((((((((((((((((((((((((
315++((((((((((((((((((((((((((((((((((((((((((((((((((
316++((((((((((((((((((((((((((((((((((((((((((((((((((
317++((((((((((((((((((((((((((((((((((((((((((((((((((
318++((((((((((((((((((((((((((((((((((((((((((((((((((
319++((((((((((((((((((((((((((((((((((((((((((((((((((
320++((((((((((((((((((((((((((((((((((((((((((((((((((
321++((((((((((((((((((((((((((((((((((((((((((((((((((
322++((((((((((((((((((((((((((((((((((((((((((((((((((
323++((((((((((((((((((((((((((((((((((((((((((((((((((
324++bundle.gettext("Hello!")
325++))))))))))))))))))))))))))))))))))))))))))))))))))
326++))))))))))))))))))))))))))))))))))))))))))))))))))
327++))))))))))))))))))))))))))))))))))))))))))))))))))
328++))))))))))))))))))))))))))))))))))))))))))))))))))
329++))))))))))))))))))))))))))))))))))))))))))))))))))
330++))))))))))))))))))))))))))))))))))))))))))))))))))
331++))))))))))))))))))))))))))))))))))))))))))))))))))
332++))))))))))))))))))))))))))))))))))))))))))))))))))
333++))))))))))))))))))))))))))))))))))))))))))))))))))
334++))))))))))))))))))))))))))))))))))))))))))))))))))
335++))))))))))))))))))))))))))))))))))))))))))))))))))
336++))))))))))))))))))))))))))))))))))))))))))))))))))
337++))))))))))))))))))))))))))))))))))))))))))))))))))
338++))))))))))))))))))))))))))))))))))))))))))))))))))
339++))))))))))))))))))))))))))))))))))))))))))))))))))
340++))))))))))))))))))))))))))))))))))))))))))))))))))
341++))))))))))))))))))))))))))))))))))))))))))))))))))
342++))))))))))))))))))))))))))))))))))))))))))))))))))
343++))))))))))))))))))))))))))))))))))))))))))))))))))
344++))))))))))))))))))))))))))))))))))))))))))))))))))
345++EOF
346++
347++: ${XGETTEXT=xgettext}
348++${XGETTEXT} --omit-header --no-location -d xg-j-so-2.tmp xg-j-so-2.java 2>xg-j-so-2.err
349++result=$?
350++cat xg-j-so-2.err
351++test $result = 1 || Exit 1
352++
353++exit 0
354+--- /dev/null
355++++ b/gettext-tools/tests/xgettext-java-stackovfl-3
356+@@ -0,0 +1,63 @@
357++#! /bin/sh
358++. "${srcdir=.}/init.sh"; path_prepend_ . ../src
359++
360++# Test Java support: stack overflow prevented by nesting depth check.
361++
362++cat <<EOF > xg-j-so-3.java
363++{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{
364++{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{
365++{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{
366++{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{
367++{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{
368++{{{{{{{{{{{{{{{{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}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}
389++}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}
390++}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}
391++}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}
392++}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}
393++}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}
394++}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}
395++}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}
396++}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}
397++}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}
398++}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}
399++}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}
400++}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}
401++}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}
402++}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}
403++}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}
404++EOF
405++
406++: ${XGETTEXT=xgettext}
407++${XGETTEXT} --omit-header --no-location -d xg-j-so-3.tmp xg-j-so-3.java || Exit 1
408++LC_ALL=C tr -d '\r' < xg-j-so-3.tmp.po > xg-j-so-3.po || Exit 1
409++
410++cat <<EOF > xg-j-so-3.ok
411++msgid "Hello!"
412++msgstr ""
413++EOF
414++
415++: ${DIFF=diff}
416++${DIFF} xg-j-so-3.ok xg-j-so-3.po
417++result=$?
418++
419++exit $result
420+--- /dev/null
421++++ b/gettext-tools/tests/xgettext-java-stackovfl-4
422+@@ -0,0 +1,58 @@
423++#! /bin/sh
424++. "${srcdir=.}/init.sh"; path_prepend_ . ../src
425++
426++# Test Java support: stack overflow prevented by nesting depth check.
427++
428++cat <<EOF > xg-j-so-4.java
429++{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{
430++{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{
431++{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{
432++{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{
433++{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{
434++{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{
435++{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{
436++{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{
437++{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{
438++{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{
439++{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{
440++{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{
441++{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{
442++{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{
443++{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{
444++{{{{{{{{{{{{{{{{{{{{{{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}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}
467++}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}
468++}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}
469++}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}
470++}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}
471++}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}
472++EOF
473++
474++: ${XGETTEXT=xgettext}
475++${XGETTEXT} --omit-header --no-location -d xg-j-so-4.tmp xg-j-so-4.java 2>xg-j-so-4.err
476++result=$?
477++cat xg-j-so-4.err
478++test $result = 1 || Exit 1
479++
480++exit 0
481diff --git a/debian/patches/series b/debian/patches/series
482index 546f2f4..2642572 100644
483--- a/debian/patches/series
484+++ b/debian/patches/series
485@@ -9,3 +9,4 @@
486 09-update-po-mode-1-of-3.patch
487 10-update-po-mode-2-of-3.patch
488 11-update-po-mode-3-of-3.patch
489+12-in-language-java-avoid-stack-overflow.patch

Subscribers

People subscribed via source and target branches