Merge ~mkukri/ubuntu/+source/presage:merge into ubuntu/+source/presage:debian/sid
- Git
- lp:~mkukri/ubuntu/+source/presage
- merge
- Merge into debian/sid
Status: | Merged |
---|---|
Merge reported by: | Mate Kukri |
Merged at revision: | 8f9e8e34b639b4e1b106549883752c774bee1bec |
Proposed branch: | ~mkukri/ubuntu/+source/presage:merge |
Merge into: | ubuntu/+source/presage:debian/sid |
Diff against target: |
440 lines (+352/-1) 6 files modified
debian/changelog (+218/-0) debian/control (+2/-1) debian/patches/add-missing-online-learning-configuration-value.patch (+31/-0) debian/patches/add_presage_config_environment_variable.patch (+35/-0) debian/patches/dont-tokenize-on-apostrophes.patch (+63/-0) debian/patches/series (+3/-0) |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Andreas Hasenack | Approve | ||
Simon Quigley (community) | Needs Fixing | ||
Review via email: mp+456436@code.launchpad.net |
Commit message
Merge with Debian sid
Description of the change
Mate Kukri (mkukri) wrote : | # |
Hmm I think all the Python related patches can be purged because the last version that built any of them was shipped in focal.
Upon investigation, these touch files that were part of the python-presage and presage-dbus packages that aren't even built anymore. It seems the last merge unnecessarily left these in.
> A few items here that need fixing:
> - The changelog should have another once-over on it. Don't modify *past*
> changelog entries, but just double check it's complete. I know we discussed
> some of these elements over IRC, so maybe you're able to just check this one
> off.
> - We should really think about whether d/p/python.diff should still be in the
> delta. Is there now support for Python 3 in the Debian package, and we just
> need to pull that in? Please consider this, and share your thoughts.
> - Generally speaking, I really do like to see proper DEP-3 headers[1]. Lines
> like these:
>
> +From: Ubuntu Developers <email address hidden>
> +Date: Tue, 28 Nov 2023 11:12:03 +0000
> +Subject: python
>
> ...really aren't verbose enough, and do not contain the proper formatting. An
> easy way to add a DEP-3 header to the existing patch on the stack is to remove
> the existing header, then run `quilt header --dep3 -e` which will give you a
> template to work with.
> - Does this build? Does it pass its autopkgtests? Could you provide more
> details on this?
> - Having different patch extensions (.diff and .patch) is somewhat annoying,
> but not a blocker. Please fix this (I *personally* prefer .patch).
> - I would slightly reword this, given that we're a bit past GCC-11:
> "d/p/c++17.patch: fix the build against GCC-11 by porting the code to C++17
> (LP: 1988196)"
>
> Thanks in advance, I look forward to reviewing your followup MP! (You could
> just re-subscribe sponsors to this one.)
>
> [1] https:/
Mate Kukri (mkukri) wrote : | # |
- Dropped Python specific patches and added rationale to changelog:
python-presage and pyprompter aren't even built anymore so these are not useful.
- Added DEP-3 headers to the Ubuntu patches we still do carry.
- PPA testbuild at: https:/
Andreas Hasenack (ahasenack) wrote : | # |
Thanks for addressing those comments, and reducing the delta.
For future merges, please also remember to push the logical/, reconstruct/ and split/ tags, as they help with the review of the delta changes.
+1
Andreas Hasenack (ahasenack) wrote : | # |
Uploaded:
Uploading presage_
Uploading presage_
Uploading presage_
Uploading presage_
Preview Diff
1 | diff --git a/debian/changelog b/debian/changelog |
2 | index 38aafa0..e779147 100644 |
3 | --- a/debian/changelog |
4 | +++ b/debian/changelog |
5 | @@ -1,3 +1,25 @@ |
6 | +presage (0.9.1-2.6ubuntu1) noble; urgency=medium |
7 | + |
8 | + * Merge with Debian unstable. Remaining changes: |
9 | + - d/p/dont-tokenize-on-apostrophes.patch: Allow words with |
10 | + apostrophes to be predicted |
11 | + - d/p/add_presage_config_environment_variable.patch: |
12 | + Replace use_presage_prefix_path_in_default_profile.patch with a new |
13 | + patch making sure all works in snap environments |
14 | + - d/p/add-missing-online-learning-configuration-value.patch: |
15 | + Add missing ONLINE_LEARNING configuration value to defaultProfile |
16 | + * Patches now included in Debian: |
17 | + - d/p/c++17.patch: fix the build with C++17 compliant compilers |
18 | + (LP: 1988196) |
19 | + - d/p/format-security.patch: fix insecure format strings in the demo code |
20 | + (FTBFS on Ubuntu due to -Werror=format-security) |
21 | + * Drop patches for python-presage and pyprompter (no longer being built): |
22 | + - d/p/ubuntu_dont_require_wxpython.patch: Do not check for wx |
23 | + to enable pyprompter |
24 | + - d/p/python.diff: Explicitly use python2 instead of python in the build. |
25 | + |
26 | + -- Mate Kukri <mate.kukri@canonical.com> Tue, 28 Nov 2023 11:07:48 +0000 |
27 | + |
28 | presage (0.9.1-2.6) unstable; urgency=medium |
29 | |
30 | * Non-maintainer upload. |
31 | @@ -63,6 +85,41 @@ presage (0.9.1-2.3) unstable; urgency=medium |
32 | |
33 | -- Nilesh Patra <nilesh@debian.org> Fri, 14 Oct 2022 08:39:51 +0530 |
34 | |
35 | +presage (0.9.1-2.2ubuntu3) kinetic; urgency=medium |
36 | + |
37 | + * d/p/c++17.patch: fix the build against GCC-11 by porting the code to C++17 |
38 | + (LP: #1988196) |
39 | + * d/p/format-security.patch: fix insecure format strings in the demo code |
40 | + (FTBFS on Ubuntu due to -Werror=format-security.patch) |
41 | + |
42 | + -- Simon Chopin <schopin@ubuntu.com> Tue, 30 Aug 2022 17:56:09 +0200 |
43 | + |
44 | +presage (0.9.1-2.2ubuntu2) jammy; urgency=medium |
45 | + |
46 | + * No-change rebuild against latest gdk-pixbuf |
47 | + |
48 | + -- Jeremy Bicha <jeremy.bicha@canonical.com> Wed, 09 Mar 2022 18:53:51 -0500 |
49 | + |
50 | +presage (0.9.1-2.2ubuntu1) groovy; urgency=low |
51 | + |
52 | + * Merge from Debian unstable. Remaining changes: |
53 | + - Remove python-wxgtk3.0 from Build-Depends |
54 | + - debian/patches/ubuntu_dont_require_wxpython.patch: Do not check for wx |
55 | + to enable pyprompter |
56 | + - debian/patches/dont-tokenize-on-apostrophes.patch: Allow words with |
57 | + apostrophes to be predicted |
58 | + - debian/patches/use_presage_prefix_path_in_default_profile.patch: |
59 | + Use the PRESAGE_PREFIX_PATH environment variable in the default |
60 | + profile |
61 | + - debian/patches/add-missing-online-learning-configuration-value.patch: |
62 | + Add missing ONLINE_LEARNING configuration value to defaultProfile |
63 | + - debian/patches/add_presage_config_environment_variable.patch: |
64 | + Replace use_presage_prefix_path_in_default_profile.patch with a new |
65 | + patch making sure all works in snap environments |
66 | + - Explicitly use python2 instead of python in the build. |
67 | + |
68 | + -- Steve Langasek <steve.langasek@ubuntu.com> Wed, 06 May 2020 14:01:16 -0700 |
69 | + |
70 | presage (0.9.1-2.2) unstable; urgency=medium |
71 | |
72 | [ Aron Xu ] |
73 | @@ -75,6 +132,65 @@ presage (0.9.1-2.2) unstable; urgency=medium |
74 | |
75 | -- Aron Xu <aron@debian.org> Sat, 25 Jan 2020 09:31:19 +0000 |
76 | |
77 | +presage (0.9.1-2.1ubuntu9) focal; urgency=medium |
78 | + |
79 | + * No-change rebuild with fixed binutils on arm64. |
80 | + |
81 | + -- Matthias Klose <doko@ubuntu.com> Sat, 08 Feb 2020 11:17:25 +0000 |
82 | + |
83 | +presage (0.9.1-2.1ubuntu8) focal; urgency=medium |
84 | + |
85 | + * No-change rebuild to generate dependencies on python2. |
86 | + |
87 | + -- Matthias Klose <doko@ubuntu.com> Sat, 11 Jan 2020 18:56:52 +0000 |
88 | + |
89 | +presage (0.9.1-2.1ubuntu7) focal; urgency=medium |
90 | + |
91 | + * Explicitly use python2 instead of python in the build. |
92 | + |
93 | + -- Matthias Klose <doko@ubuntu.com> Thu, 09 Jan 2020 15:50:36 +0100 |
94 | + |
95 | +presage (0.9.1-2.1ubuntu6) focal; urgency=medium |
96 | + |
97 | + * No-change rebuild to drop dependencies on python2. |
98 | + |
99 | + -- Matthias Klose <doko@ubuntu.com> Thu, 09 Jan 2020 13:50:47 +0100 |
100 | + |
101 | +presage (0.9.1-2.1ubuntu5) cosmic; urgency=medium |
102 | + |
103 | + * No-change rebuild for ncurses soname changes. |
104 | + |
105 | + -- Matthias Klose <doko@ubuntu.com> Thu, 03 May 2018 14:18:10 +0000 |
106 | + |
107 | +presage (0.9.1-2.1ubuntu4) zesty; urgency=medium |
108 | + |
109 | + * debian/patches/add_presage_config_environment_variable.patch: |
110 | + - Replace use_presage_prefix_path_in_default_profile.patch with a new patch |
111 | + making sure all works in snap environments |
112 | + |
113 | + -- Łukasz 'sil2100' Zemczak <lukasz.zemczak@ubuntu.com> Thu, 08 Dec 2016 10:54:00 +0100 |
114 | + |
115 | +presage (0.9.1-2.1ubuntu3) zesty; urgency=medium |
116 | + |
117 | + [ Michael Sheldon ] |
118 | + * debian/patches/use_presage_prefix_path_in_default_profile.patch: |
119 | + - Use the PRESAGE_PREFIX_PATH environment variable in the default profile |
120 | + * debian/patches/add-missing-online-learning-configuration-value.patch: |
121 | + - Add missing ONLINE_LEARNING configuration value to defaultProfile |
122 | + |
123 | + -- Łukasz 'sil2100' Zemczak <lukasz.zemczak@ubuntu.com> Fri, 04 Nov 2016 18:05:23 +0100 |
124 | + |
125 | +presage (0.9.1-2.1ubuntu1) yakkety; urgency=medium |
126 | + |
127 | + * Merge with Debian; remaining changes: |
128 | + - Remove python-wxgtk3.0 from Build-Depends |
129 | + - debian/patches/ubuntu_dont_require_wxpython.patch: Do not check for wx |
130 | + to enable pyprompter |
131 | + - debian/patches/dont-tokenize-on-apostrophes.patch: Allow words with |
132 | + apostrophes to be predicted |
133 | + |
134 | + -- Matthias Klose <doko@ubuntu.com> Tue, 06 Sep 2016 13:56:40 +0200 |
135 | + |
136 | presage (0.9.1-2.1) unstable; urgency=medium |
137 | |
138 | * Non-maintainer upload. |
139 | @@ -82,6 +198,17 @@ presage (0.9.1-2.1) unstable; urgency=medium |
140 | |
141 | -- Aron Xu <aron@debian.org> Sun, 03 Jul 2016 20:56:47 +0800 |
142 | |
143 | +presage (0.9.1-2ubuntu1) yakkety; urgency=medium |
144 | + |
145 | + * Merge with Debian; remaining changes: |
146 | + - Remove python-wxgtk3.0 from Build-Depends |
147 | + - debian/patches/ubuntu_dont_require_wxpython.patch: Do not check for wx |
148 | + to enable pyprompter |
149 | + - debian/patches/dont-tokenize-on-apostrophes.patch: Allow words with |
150 | + apostrophes to be predicted |
151 | + |
152 | + -- Matthias Klose <doko@ubuntu.com> Thu, 19 May 2016 15:17:23 +0200 |
153 | + |
154 | presage (0.9.1-2) unstable; urgency=medium |
155 | |
156 | * Depend on swig instead of swig2.0 (Closes: #816999) |
157 | @@ -93,6 +220,29 @@ presage (0.9.1-2) unstable; urgency=medium |
158 | |
159 | -- Matteo Vescovi <matteo.vescovi@yahoo.co.uk> Thu, 17 Mar 2016 13:06:19 +0100 |
160 | |
161 | +presage (0.9.1-1.1ubuntu2) xenial; urgency=medium |
162 | + |
163 | + * No-change rebuild for ncurses6 transition. |
164 | + |
165 | + -- Matthias Klose <doko@ubuntu.com> Sun, 07 Feb 2016 09:45:05 +0000 |
166 | + |
167 | +presage (0.9.1-1.1ubuntu1) xenial; urgency=low |
168 | + |
169 | + * Merge from Debian unstable. Remaining changes: |
170 | + - debian/patches/lib_underlinkage.patch: Added missing lib to link, |
171 | + fixing FTBFS. |
172 | + - Remove python-wxgtk3.0 from Build-Depends |
173 | + - debian/patches/ubuntu_dont_require_wxpython.patch: Do not check for wx |
174 | + to enable pyprompter |
175 | + - debian/patches/dont-tokenize-on-apostrophes.patch: Allow words with |
176 | + apostrophes to be predicted |
177 | + - Build-depend on swig (3.0) instead of swig2.0. |
178 | + * Dropped changes, included in Debian: |
179 | + - Build using GCC 5. |
180 | + - Update symbols file. |
181 | + |
182 | + -- Steve Langasek <steve.langasek@ubuntu.com> Sat, 31 Oct 2015 22:10:08 -0700 |
183 | + |
184 | presage (0.9.1-1.1) unstable; urgency=medium |
185 | |
186 | * Non-maintainer upload. |
187 | @@ -107,6 +257,52 @@ presage (0.9.1-1) unstable; urgency=medium |
188 | |
189 | -- Aron Xu <aron@debian.org> Sat, 15 Aug 2015 23:44:45 +0800 |
190 | |
191 | +presage (0.9.1-0ubuntu3) xenial; urgency=medium |
192 | + |
193 | + * Build-depend on swig (3.0) instead of swig2.0. |
194 | + |
195 | + -- Steve Langasek <steve.langasek@ubuntu.com> Fri, 30 Oct 2015 13:09:52 -0700 |
196 | + |
197 | +presage (0.9.1-0ubuntu2) wily; urgency=medium |
198 | + |
199 | + * Build using GCC 5. |
200 | + |
201 | + -- Matthias Klose <doko@ubuntu.com> Wed, 15 Jul 2015 20:21:30 +0200 |
202 | + |
203 | +presage (0.9.1-0ubuntu1) wily; urgency=medium |
204 | + |
205 | + * New upstream version. |
206 | + - No test failures with GCC 5. |
207 | + * Update symbols file. |
208 | + |
209 | + -- Matthias Klose <doko@ubuntu.com> Wed, 15 Jul 2015 20:09:44 +0200 |
210 | + |
211 | +presage (0.9-1ubuntu3) vivid; urgency=medium |
212 | + |
213 | + * Remove python-wxgtk3.0 from Build-Depends (LP: #1430923) |
214 | + * debian/patches/ubuntu_dont_require_wxpython.patch: |
215 | + - Do not check for wx to enable pyprompter |
216 | + |
217 | + -- Aron Xu <happyaron@ubuntu.com> Thu, 12 Mar 2015 00:38:45 +0800 |
218 | + |
219 | +presage (0.9-1ubuntu2) vivid; urgency=medium |
220 | + |
221 | + * debian/patches/dont-tokenize-on-apostrophes.patch: |
222 | + - Allow words with apostrophes to be predicted (lp: #1384800) |
223 | + |
224 | + -- Michael Sheldon <michael.sheldon@canonical.com> Wed, 04 Feb 2015 10:16:01 +0100 |
225 | + |
226 | +presage (0.9-1ubuntu1) vivid; urgency=low |
227 | + |
228 | + * Merge from Debian unstable. Remaining changes: |
229 | + - debian/patches/lib_underlinkage.patch: |
230 | + + Added missing lib to link, fixing FTBFS. (Closes: #776720) |
231 | + * Drop following patches, fixed upstream: |
232 | + - debian/patches/automake-parallel.patch |
233 | + - debian/patches/no-automake-werror.patch |
234 | + |
235 | + -- Artur Rona <ari-tczew@ubuntu.com> Sat, 31 Jan 2015 20:19:30 +0100 |
236 | + |
237 | presage (0.9-1) unstable; urgency=medium |
238 | |
239 | * New upstream release. |
240 | @@ -135,6 +331,28 @@ presage (0.8.9-1) unstable; urgency=low |
241 | |
242 | -- Matteo Vescovi <matteo.vescovi@yahoo.co.uk> Wed, 02 OCt 2013 18:23:01 +0100 |
243 | |
244 | +presage (0.8.8-1ubuntu3) trusty; urgency=medium |
245 | + |
246 | + * Use dh-autoreconf to update libtool for ppc64el. |
247 | + * Disable automake -Werror. |
248 | + * Make shell based test script compatible with automakes (new) default |
249 | + parallel test runner. |
250 | + |
251 | + -- Dimitri John Ledkov <xnox@ubuntu.com> Tue, 24 Dec 2013 17:28:18 +0000 |
252 | + |
253 | +presage (0.8.8-1ubuntu2) trusty; urgency=low |
254 | + |
255 | + * Convert libpresage1, libpresage1-dbg, libpresage-data, and |
256 | + libpresage-dev binary packages to multiarch. |
257 | + |
258 | + -- Colin Watson <cjwatson@ubuntu.com> Thu, 07 Nov 2013 14:19:59 +0000 |
259 | + |
260 | +presage (0.8.8-1ubuntu1) raring; urgency=low |
261 | + |
262 | + * Added missing lib to link, fixing FTBFS. |
263 | + |
264 | + -- Daniel T Chen <crimsun@ubuntu.com> Thu, 18 Apr 2013 16:10:04 -0400 |
265 | + |
266 | presage (0.8.8-1) unstable; urgency=low |
267 | |
268 | * New upstream release. |
269 | diff --git a/debian/control b/debian/control |
270 | index d8e69a5..671afda 100644 |
271 | --- a/debian/control |
272 | +++ b/debian/control |
273 | @@ -1,7 +1,8 @@ |
274 | Source: presage |
275 | Section: devel |
276 | Priority: optional |
277 | -Maintainer: Matteo Vescovi <matteo.vescovi@yahoo.co.uk> |
278 | +Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com> |
279 | +XSBC-Original-Maintainer: Matteo Vescovi <matteo.vescovi@yahoo.co.uk> |
280 | Build-Depends: debhelper-compat (= 13), |
281 | pkg-config, |
282 | libsqlite3-dev, |
283 | diff --git a/debian/patches/add-missing-online-learning-configuration-value.patch b/debian/patches/add-missing-online-learning-configuration-value.patch |
284 | new file mode 100644 |
285 | index 0000000..199747d |
286 | --- /dev/null |
287 | +++ b/debian/patches/add-missing-online-learning-configuration-value.patch |
288 | @@ -0,0 +1,31 @@ |
289 | +Description: Add missing ONLINE_LEARNING configuration value to defaultProfile |
290 | + Fixes a crash in libpresage when a configuration file isn't found. |
291 | +Author: Michael Sheldon <michael.sheldon@canonical.com> |
292 | +Bug: https://sourceforge.net/p/presage/patches/3/ |
293 | +Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/presage/+bug/1639251 |
294 | +Forwarded: https://sourceforge.net/p/presage/patches/3/ |
295 | +Last-Update: 2023-12-04 |
296 | +--- |
297 | +This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ |
298 | +diff --git a/src/lib/core/defaultProfile.cpp b/src/lib/core/defaultProfile.cpp |
299 | +index fe0d9bd..1f7e365 100644 |
300 | +--- a/src/lib/core/defaultProfile.cpp |
301 | ++++ b/src/lib/core/defaultProfile.cpp |
302 | +@@ -62,7 +62,16 @@ void DefaultProfile::build_xml_document (const std::string& filename) |
303 | + " <!-- LOWERCASE_MODE" |
304 | + " Instruct context tracker to track text as lowercase" |
305 | + " -->" |
306 | +-" <LOWERCASE_MODE>yes</LOWERCASE_MODE>" |
307 | ++" <LOWERCASE_MODE>yes</LOWERCASE_MODE>" |
308 | ++" <!-- ONLINE_LEARNING" |
309 | ++" Controls presage online machine learning feature." |
310 | ++" Presage is context-aware and capable of dynamic online learning." |
311 | ++" Setting this to yes/true will enable online learning mode." |
312 | ++" Setting this to no/false will disable online learning mode." |
313 | ++" When online learning mode is disabled, it is still" |
314 | ++" possible to instruct presage to learn through its API." |
315 | ++" -->" |
316 | ++" <ONLINE_LEARNING>yes</ONLINE_LEARNING>" |
317 | + " </ContextTracker>" |
318 | + " <Selector>" |
319 | + " <LOGGER>ERROR</LOGGER>" |
320 | diff --git a/debian/patches/add_presage_config_environment_variable.patch b/debian/patches/add_presage_config_environment_variable.patch |
321 | new file mode 100644 |
322 | index 0000000..0809edd |
323 | --- /dev/null |
324 | +++ b/debian/patches/add_presage_config_environment_variable.patch |
325 | @@ -0,0 +1,35 @@ |
326 | +Description: Add PRESAGE_CONFIG environment variable |
327 | + Provide an environment variable for setting the location that presage should |
328 | + check for its system-wide configuration file. This allows for usage within |
329 | + snap packages. |
330 | +Author: Michael Sheldon <michael.sheldon@canonical.com> |
331 | +Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/presage/+bug/1639270 |
332 | +Forwarded: no |
333 | +Last-Update: 2023-12-04 |
334 | +--- |
335 | +This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ |
336 | +diff --git a/src/lib/core/profileManager.cpp b/src/lib/core/profileManager.cpp |
337 | +index a17809d..3ded80c 100644 |
338 | +--- a/src/lib/core/profileManager.cpp |
339 | ++++ b/src/lib/core/profileManager.cpp |
340 | +@@ -121,10 +121,16 @@ void ProfileManager::init_profiles (const std::string& profilename) |
341 | + } |
342 | + |
343 | + |
344 | +- // system etc directory |
345 | +- profiles.push_back (get_system_etc_dir() + '/' + DefaultProfile::DEFAULT_PROFILE_FILENAME); |
346 | +- // installation config directory |
347 | +- profiles.push_back (static_cast<std::string>(sysconfdir) + '/' + DefaultProfile::DEFAULT_PROFILE_FILENAME); |
348 | ++ // config specified by environment overrides system config |
349 | ++ char *env_profile = getenv("PRESAGE_CONFIG"); |
350 | ++ if (env_profile != NULL) { |
351 | ++ profiles.push_back(env_profile); |
352 | ++ } else { |
353 | ++ // system etc directory |
354 | ++ profiles.push_back (get_system_etc_dir() + '/' + DefaultProfile::DEFAULT_PROFILE_FILENAME); |
355 | ++ // installation config directory |
356 | ++ profiles.push_back (static_cast<std::string>(sysconfdir) + '/' + DefaultProfile::DEFAULT_PROFILE_FILENAME); |
357 | ++ } |
358 | + // home dir dotfile |
359 | + profiles.push_back (get_user_home_dir() + "/.presage/" + DefaultProfile::DEFAULT_PROFILE_FILENAME); |
360 | + // user specified profile (if any) |
361 | diff --git a/debian/patches/dont-tokenize-on-apostrophes.patch b/debian/patches/dont-tokenize-on-apostrophes.patch |
362 | new file mode 100644 |
363 | index 0000000..8425dec |
364 | --- /dev/null |
365 | +++ b/debian/patches/dont-tokenize-on-apostrophes.patch |
366 | @@ -0,0 +1,63 @@ |
367 | +Description: Allow words with apostrophes to be predicted |
368 | + Stop the tokenizer from splitting based on apostrophes and allow for the |
369 | + escaping of words containing apostrophes in the database connector. |
370 | +Author: Michael Sheldon <michael.sheldon@canonical.com> |
371 | +Bug: https://sourceforge.net/p/presage/patches/2/ |
372 | +Bug-Ubuntu: https://launchpad.net/bugs/1384800 |
373 | +Bug-Debian: https://bugs.debian.org/770831 |
374 | +Forwarded: https://sourceforge.net/p/presage/patches/2/ |
375 | +Last-Update: 2023-12-04 |
376 | +--- |
377 | +This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ |
378 | +diff --git a/src/lib/core/charsets.h b/src/lib/core/charsets.h |
379 | +index 1c74d76..c1a6bc0 100644 |
380 | +--- a/src/lib/core/charsets.h |
381 | ++++ b/src/lib/core/charsets.h |
382 | +@@ -180,7 +180,6 @@ const char DEFAULT_SEPARATOR_CHARS[]={ |
383 | + '$', |
384 | + '%', |
385 | + '&', |
386 | +- '\'', |
387 | + '(', |
388 | + ')', |
389 | + '*', |
390 | +diff --git a/src/lib/predictors/dbconnector/databaseConnector.cpp b/src/lib/predictors/dbconnector/databaseConnector.cpp |
391 | +index 15de52a..65cd629 100644 |
392 | +--- a/src/lib/predictors/dbconnector/databaseConnector.cpp |
393 | ++++ b/src/lib/predictors/dbconnector/databaseConnector.cpp |
394 | +@@ -293,12 +293,16 @@ std::string DatabaseConnector::buildValuesClause(const Ngram ngram, const int co |
395 | + |
396 | + std::string DatabaseConnector::sanitizeString(const std::string str) const |
397 | + { |
398 | +- // TODO |
399 | +- // just return the string for the time being |
400 | +- // REVISIT |
401 | +- // TO BE DONE |
402 | +- // TBD |
403 | +- return str; |
404 | ++ // Escape single quotes |
405 | ++ std::size_t searchPos = 0; |
406 | ++ std::size_t pos; |
407 | ++ std::string result(str); |
408 | ++ while((pos = result.find("'", searchPos)) != std::string::npos) |
409 | ++ { |
410 | ++ result.replace(pos, 1, "''"); |
411 | ++ searchPos = pos + 2; |
412 | ++ } |
413 | ++ return result; |
414 | + } |
415 | + |
416 | + int DatabaseConnector::extractFirstInteger(const NgramTable& table) const |
417 | +diff --git a/src/tools/text2ngram.cpp b/src/tools/text2ngram.cpp |
418 | +index 807aa83..20a59f7 100644 |
419 | +--- a/src/tools/text2ngram.cpp |
420 | ++++ b/src/tools/text2ngram.cpp |
421 | +@@ -174,7 +174,7 @@ int main(int argc, char* argv[]) |
422 | + std::ifstream infile(argv[i]); |
423 | + ForwardTokenizer tokenizer(infile, |
424 | + " \f\n\r\t\v ", |
425 | +- "`~!@#$%^&*()_-+=\\|]}[{'\";:/?.>,<«»"); |
426 | ++ "`~!@#$%^&*()_-+=\\|]}[{\";:/?.>,<«»"); |
427 | + tokenizer.lowercaseMode(lowercase); |
428 | + |
429 | + // take care of first N-1 tokens |
430 | diff --git a/debian/patches/series b/debian/patches/series |
431 | index 04b6515..29084a0 100644 |
432 | --- a/debian/patches/series |
433 | +++ b/debian/patches/series |
434 | @@ -4,3 +4,6 @@ format-security.patch |
435 | sfos/docs-Install-css-too.patch |
436 | sfos/text2ngram-Add-and-to-separators.patch |
437 | sfos/text2ngram-Add-non-breaking-space-to-whitespace-chars.patch |
438 | +dont-tokenize-on-apostrophes.patch |
439 | +add_presage_config_environment_variable.patch |
440 | +add-missing-online-learning-configuration-value.patch |
A few items here that need fixing:
- The changelog should have another once-over on it. Don't modify *past* changelog entries, but just double check it's complete. I know we discussed some of these elements over IRC, so maybe you're able to just check this one off.
- We should really think about whether d/p/python.diff should still be in the delta. Is there now support for Python 3 in the Debian package, and we just need to pull that in? Please consider this, and share your thoughts.
- Generally speaking, I really do like to see proper DEP-3 headers[1]. Lines like these:
+From: Ubuntu Developers <email address hidden>
+Date: Tue, 28 Nov 2023 11:12:03 +0000
+Subject: python
...really aren't verbose enough, and do not contain the proper formatting. An easy way to add a DEP-3 header to the existing patch on the stack is to remove the existing header, then run `quilt header --dep3 -e` which will give you a template to work with.
- Does this build? Does it pass its autopkgtests? Could you provide more details on this?
- Having different patch extensions (.diff and .patch) is somewhat annoying, but not a blocker. Please fix this (I *personally* prefer .patch).
- I would slightly reword this, given that we're a bit past GCC-11: "d/p/c++17.patch: fix the build against GCC-11 by porting the code to C++17 (LP: 1988196)"
Thanks in advance, I look forward to reviewing your followup MP! (You could just re-subscribe sponsors to this one.)
[1] https:/ /dep-team. pages.debian. net/deps/ dep3/