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