Merge ~dviererbe/ubuntu/+source/plocate:merge-lp2029150-mantic into ubuntu/+source/plocate:debian/sid
- Git
- lp:~dviererbe/ubuntu/+source/plocate
- merge-lp2029150-mantic
- Merge into debian/sid
Proposed by
Dominik Viererbe
Status: | Merged |
---|---|
Merge reported by: | Dominik Viererbe |
Merged at revision: | 5fc9314a8470b36e989cc526385af90bcf7c652a |
Proposed branch: | ~dviererbe/ubuntu/+source/plocate:merge-lp2029150-mantic |
Merge into: | ubuntu/+source/plocate:debian/sid |
Diff against target: |
370 lines (+282/-1) 6 files modified
debian/changelog (+93/-0) debian/control (+2/-1) debian/patches/locate-add-ignore-spaces-option-to-ignore-word-separ.patch (+173/-0) debian/patches/series (+1/-0) debian/plocate.postinst (+10/-0) debian/rules (+3/-0) |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Graham Inggs (community) | Approve | ||
Review via email: mp+448127@code.launchpad.net |
Commit message
Description of the change
To post a comment you must log in.
Revision history for this message
Dominik Viererbe (dviererbe) wrote (last edit ): | # |
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | diff --git a/debian/changelog b/debian/changelog |
2 | index 57c3215..ddcfe1a 100644 |
3 | --- a/debian/changelog |
4 | +++ b/debian/changelog |
5 | @@ -1,3 +1,15 @@ |
6 | +plocate (1.1.19-2ubuntu1) mantic; urgency=medium |
7 | + |
8 | + * Merge with Debian unstable (LP: #2029150). Remaining changes: |
9 | + - Adjust handling of db generation on package install to ensure db |
10 | + generation even in chroots, print a message before, and ensure db |
11 | + generation finishes before the postinst returns. |
12 | + - Adjust dh_systemd handling to match the above. |
13 | + - d/p/locate-add-ignore-spaces-option-to-ignore-word-separ.patch: port |
14 | + support for the --ignore-spaces option from mlocate. |
15 | + |
16 | + -- Dominik Viererbe <dominik.viererbe@canonical.com> Mon, 31 Jul 2023 23:04:46 +0300 |
17 | + |
18 | plocate (1.1.19-2) unstable; urgency=medium |
19 | |
20 | * Remove compatibility cruft for upgrading from pre-bullseye. |
21 | @@ -10,18 +22,56 @@ plocate (1.1.19-2) unstable; urgency=medium |
22 | |
23 | -- Steinar H. Gunderson <sesse@debian.org> Tue, 04 Jul 2023 18:24:02 +0200 |
24 | |
25 | +plocate (1.1.19-1ubuntu1) mantic; urgency=low |
26 | + |
27 | + * Merge from Debian unstable. Remaining changes: |
28 | + - Adjust handling of db generation on package install to ensure db |
29 | + generation even in chroots, print a message before, and ensure db |
30 | + generation finishes before the postinst returns. |
31 | + - Adjust dh_systemd handling to match the above. |
32 | + - d/p/locate-add-ignore-spaces-option-to-ignore-word-separ.patch: port |
33 | + support for the --ignore-spaces option from mlocate. |
34 | + |
35 | + -- Steve Langasek <steve.langasek@ubuntu.com> Thu, 15 Jun 2023 19:10:12 -0700 |
36 | + |
37 | plocate (1.1.19-1) unstable; urgency=medium |
38 | |
39 | * New upstream release. |
40 | |
41 | -- Steinar H. Gunderson <sesse@debian.org> Fri, 09 Jun 2023 09:36:32 +0200 |
42 | |
43 | +plocate (1.1.18-1ubuntu1) lunar; urgency=low |
44 | + |
45 | + * Merge from Debian unstable. Remaining changes: |
46 | + - Adjust handling of db generation on package install to match the |
47 | + previous mlocate behavior, which ensured db generation even in |
48 | + chroots, printed a message before, and ensured db generation finished |
49 | + before the postinst returned. |
50 | + - Adjust dh_systemd handling to match the above. |
51 | + - d/p/locate-add-ignore-spaces-option-to-ignore-word-separ.patch: port |
52 | + support for the --ignore-spaces option from mlocate. |
53 | + |
54 | + -- Steve Langasek <steve.langasek@ubuntu.com> Mon, 06 Feb 2023 16:09:29 -0800 |
55 | + |
56 | plocate (1.1.18-1) unstable; urgency=medium |
57 | |
58 | * New upstream release. |
59 | |
60 | -- Steinar H. Gunderson <sesse@debian.org> Sat, 28 Jan 2023 21:46:26 +0100 |
61 | |
62 | +plocate (1.1.17-2ubuntu1) lunar; urgency=low |
63 | + |
64 | + * Merge from Debian unstable. Remaining changes: |
65 | + - Adjust handling of db generation on package install to match the |
66 | + previous mlocate behavior, which ensured db generation even in |
67 | + chroots, printed a message before, and ensured db generation finished |
68 | + before the postinst returned. |
69 | + - Adjust dh_systemd handling to match the above. |
70 | + - d/p/locate-add-ignore-spaces-option-to-ignore-word-separ.patch: port |
71 | + support for the --ignore-spaces option from mlocate. |
72 | + |
73 | + -- Steve Langasek <steve.langasek@ubuntu.com> Tue, 24 Jan 2023 13:21:44 -0800 |
74 | + |
75 | plocate (1.1.17-2) unstable; urgency=medium |
76 | |
77 | * Adjust the autopkgtest to deal with the return value changes in 1.1.17. |
78 | @@ -36,6 +86,23 @@ plocate (1.1.17-1) unstable; urgency=medium |
79 | |
80 | -- Steinar H. Gunderson <sesse@debian.org> Mon, 21 Nov 2022 18:27:45 +0100 |
81 | |
82 | +plocate (1.1.16-1ubuntu1) kinetic; urgency=low |
83 | + |
84 | + * Merge from Debian unstable. Remaining changes: |
85 | + - Adjust handling of db generation on package install to match the |
86 | + previous mlocate behavior, which ensured db generation even in |
87 | + chroots, printed a message before, and ensured db generation finished |
88 | + before the postinst returned. |
89 | + - Adjust dh_systemd handling to match the above. |
90 | + - d/p/locate-add-ignore-spaces-option-to-ignore-word-separ.patch: port |
91 | + support for the --ignore-spaces option from mlocate. |
92 | + * Dropped changes, included in Debian: |
93 | + - Add /home/.ecryptfs and /var/lib/schroot to PRUNEPATHS. |
94 | + - Add fuse.cryfs and fuse.encfs to PRUNEFS. |
95 | + - Remove debian/source/include-binaries file. |
96 | + |
97 | + -- Steve Langasek <steve.langasek@ubuntu.com> Fri, 24 Jun 2022 09:50:11 -0700 |
98 | + |
99 | plocate (1.1.16-1) unstable; urgency=medium |
100 | |
101 | * New upstream release. |
102 | @@ -53,6 +120,31 @@ plocate (1.1.15-2) unstable; urgency=medium |
103 | |
104 | -- Steinar H. Gunderson <sesse@debian.org> Wed, 02 Mar 2022 20:52:02 +0100 |
105 | |
106 | +plocate (1.1.15-1ubuntu2) jammy; urgency=medium |
107 | + |
108 | + * Remove debian/source/include-binaries file. (LP: #1961266) |
109 | + |
110 | + -- Nick Rosbrook <nick.rosbrook@canonical.com> Thu, 17 Feb 2022 09:26:51 -0500 |
111 | + |
112 | +plocate (1.1.15-1ubuntu1) jammy; urgency=medium |
113 | + |
114 | + * Port changes over from mlocate so that we can move to plocate in Ubuntu. |
115 | + * Add /home/.ecryptfs and /var/lib/schroot to PRUNEPATHS. |
116 | + * Add fuse.cryfs and fuse.encfs to PRUNEFS. |
117 | + * Adjust handling of db generation on package install to match the |
118 | + previous mlocate behavior, which ensured db generation even in chroots, |
119 | + printed a message before, and ensured db generation finished before the |
120 | + postinst returned. |
121 | + * Adjust dh_systemd handling to match the above. |
122 | + * Drops support for the --transliterate option, which requires significant |
123 | + porting of functionality from C to the independent plocate C++ codebase. |
124 | + * d/p/locate-add-ignore-spaces-option-to-ignore-word-separ.patch: port |
125 | + support for the --ignore-spaces option from mlocate. |
126 | + * All other patches and packaging delta for mlocate are obsolete for |
127 | + plocate. |
128 | + |
129 | + -- Steve Langasek <steve.langasek@ubuntu.com> Thu, 10 Feb 2022 00:45:06 +0000 |
130 | + |
131 | plocate (1.1.15-1) unstable; urgency=medium |
132 | |
133 | * New upstream release. |
134 | @@ -389,3 +481,4 @@ plocate (1.0.0-1) unstable; urgency=medium |
135 | * Initial release. |
136 | |
137 | -- Steinar H. Gunderson <sesse@debian.org> Sun, 11 Oct 2020 21:24:13 +0200 |
138 | + |
139 | diff --git a/debian/control b/debian/control |
140 | index 8ecf3be..2147b08 100644 |
141 | --- a/debian/control |
142 | +++ b/debian/control |
143 | @@ -1,7 +1,8 @@ |
144 | Source: plocate |
145 | Section: utils |
146 | Priority: optional |
147 | -Maintainer: Steinar H. Gunderson <sesse@debian.org> |
148 | +Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com> |
149 | +XSBC-Original-Maintainer: Steinar H. Gunderson <sesse@debian.org> |
150 | # liburing-dev is technically optional, but strongly recommended. |
151 | Build-Depends: debhelper-compat (= 13), liburing-dev [linux-any], libzstd-dev, meson, ninja-build, pkg-config, systemd [linux-any] |
152 | Standards-Version: 4.5.0 |
153 | diff --git a/debian/patches/locate-add-ignore-spaces-option-to-ignore-word-separ.patch b/debian/patches/locate-add-ignore-spaces-option-to-ignore-word-separ.patch |
154 | new file mode 100644 |
155 | index 0000000..2774959 |
156 | --- /dev/null |
157 | +++ b/debian/patches/locate-add-ignore-spaces-option-to-ignore-word-separ.patch |
158 | @@ -0,0 +1,173 @@ |
159 | +Description: locate: add --ignore-spaces option to ignore word separators |
160 | + It allows to locate files ignoring separators such as punctuation and |
161 | + spaces, so searching for "foo-bar" will match "foo bar", "foo_bar" or |
162 | + "foo?bar". |
163 | + . |
164 | + This is not compatible with regex. |
165 | + . |
166 | + Ported from https://pagure.io/mlocate/pull-request/42 |
167 | +Author: Steve Langasek <steve.langasek@ubuntu.com> |
168 | +Last-Update: 2022-02-09 |
169 | +Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/mlocate/+bug/1752148 |
170 | + |
171 | +Index: plocate-1.1.15/plocate.cpp |
172 | +=================================================================== |
173 | +--- plocate-1.1.15.orig/plocate.cpp |
174 | ++++ plocate-1.1.15/plocate.cpp |
175 | +@@ -47,6 +47,7 @@ |
176 | + using namespace std::chrono; |
177 | + |
178 | + bool ignore_case = false; |
179 | ++bool ignore_spaces = false; |
180 | + bool only_count = false; |
181 | + bool print_nul = false; |
182 | + bool use_debug = false; |
183 | +@@ -171,6 +172,49 @@ |
184 | + } |
185 | + } |
186 | + |
187 | ++/* Remove repeated punctuation or spaces from string and replace |
188 | ++ them with a space */ |
189 | ++static char * |
190 | ++collapse_string_separators (const char *str, bool is_pattern) |
191 | ++{ |
192 | ++ size_t strippedlen = 0; |
193 | ++ size_t i; |
194 | ++ char *outbuf; |
195 | ++ bool first = false; |
196 | ++ bool changed = false; |
197 | ++ |
198 | ++ outbuf = (char *) malloc (strlen (str) + 1); |
199 | ++ |
200 | ++ for (i = 0; str[i]; i++) { |
201 | ++ char cnt = str[i]; |
202 | ++ |
203 | ++ if (isspace (cnt) || (ispunct (cnt) && cnt != '@' && |
204 | ++ (!is_pattern || strchr ("*?[\\]", cnt) == NULL))) |
205 | ++ { |
206 | ++ if (first) { |
207 | ++ changed = true; |
208 | ++ continue; |
209 | ++ } |
210 | ++ if (cnt != ' ') { |
211 | ++ cnt = ' '; |
212 | ++ changed = true; |
213 | ++ } |
214 | ++ first = true; |
215 | ++ } else |
216 | ++ first = false; |
217 | ++ |
218 | ++ outbuf[strippedlen++] = cnt; |
219 | ++ } |
220 | ++ |
221 | ++ if (!changed) { |
222 | ++ free (outbuf); |
223 | ++ return NULL; |
224 | ++ } |
225 | ++ |
226 | ++ outbuf[strippedlen] = '\0'; |
227 | ++ return outbuf; |
228 | ++} |
229 | ++ |
230 | + void scan_file_block(const vector<Needle> &needles, string_view compressed, |
231 | + IOUringEngine *engine, AccessRXCache *access_rx_cache, uint64_t seq, ResultReceiver *serializer, |
232 | + atomic<uint64_t> *matched) |
233 | +@@ -223,6 +267,7 @@ |
234 | + filename != block.data() + block.size(); |
235 | + filename += strlen(filename) + 1) { |
236 | + const char *haystack = filename; |
237 | ++ char *altered_match = NULL; |
238 | + if (match_basename) { |
239 | + haystack = strrchr(filename, '/'); |
240 | + if (haystack == nullptr) { |
241 | +@@ -232,6 +277,12 @@ |
242 | + } |
243 | + } |
244 | + |
245 | ++ if (ignore_spaces) |
246 | ++ altered_match = collapse_string_separators(haystack, |
247 | ++ false); |
248 | ++ if (altered_match) |
249 | ++ haystack = altered_match; |
250 | ++ |
251 | + bool found = true; |
252 | + for (const Needle &needle : needles) { |
253 | + if (!matches(needle, haystack)) { |
254 | +@@ -246,6 +297,8 @@ |
255 | + } |
256 | + pending_candidate = filename; |
257 | + } |
258 | ++ if (altered_match) |
259 | ++ free(altered_match); |
260 | + } |
261 | + if (pending_candidate == nullptr) { |
262 | + serializer->print(seq << 32, 1ULL << 32, ""); |
263 | +@@ -842,6 +895,7 @@ |
264 | + { "database", required_argument, 0, 'd' }, |
265 | + { "existing", no_argument, 0, 'e' }, |
266 | + { "ignore-case", no_argument, 0, 'i' }, |
267 | ++ { "ignore-spaces", no_argument, 0, 'p' }, |
268 | + { "limit", required_argument, 0, 'l' }, |
269 | + { "literal", no_argument, 0, 'N' }, |
270 | + { "null", no_argument, 0, '0' }, |
271 | +@@ -858,7 +912,7 @@ |
272 | + setlocale(LC_ALL, ""); |
273 | + for (;;) { |
274 | + int option_index = 0; |
275 | +- int c = getopt_long(argc, argv, "Abcd:ehil:n:N0rwVD", long_options, &option_index); |
276 | ++ int c = getopt_long(argc, argv, "Abcd:ehipl:n:N0rwVD", long_options, &option_index); |
277 | + if (c == -1) { |
278 | + break; |
279 | + } |
280 | +@@ -884,6 +938,9 @@ |
281 | + case 'i': |
282 | + ignore_case = true; |
283 | + break; |
284 | ++ case 'p': |
285 | ++ ignore_spaces = true; |
286 | ++ break; |
287 | + case 'l': |
288 | + case 'n': |
289 | + limit_matches = limit_left = atoll(optarg); |
290 | +@@ -934,6 +991,11 @@ |
291 | + } |
292 | + } |
293 | + |
294 | ++ if (patterns_are_regex && ignore_spaces) { |
295 | ++ perror("ignore-spaces is not supported when using regexp"); |
296 | ++ exit(EXIT_FAILURE); |
297 | ++ } |
298 | ++ |
299 | + if (!print_nul) { |
300 | + stdout_is_tty = isatty(1); |
301 | + } |
302 | +@@ -968,6 +1030,14 @@ |
303 | + needle.type = Needle::STRSTR; |
304 | + needle.str = unescape_glob_to_plain_string(needle.str); |
305 | + } |
306 | ++ |
307 | ++ if (ignore_spaces) { |
308 | ++ char *pattern = collapse_string_separators(needle.str.c_str(), |
309 | ++ true); |
310 | ++ if (pattern) |
311 | ++ needle.str = pattern; |
312 | ++ } |
313 | ++ |
314 | + needles.push_back(move(needle)); |
315 | + } |
316 | + if (needles.empty()) { |
317 | +Index: plocate-1.1.15/plocate.1 |
318 | +=================================================================== |
319 | +--- plocate-1.1.15.orig/plocate.1 |
320 | ++++ plocate-1.1.15/plocate.1 |
321 | +@@ -104,6 +104,10 @@ |
322 | + generate more candidates for searching the index. |
323 | + |
324 | + .TP |
325 | ++\fB\-p\fR, \fB\-\-ignore\-spaces\fR |
326 | ++Ignore punctuation and spaces when matching patterns. |
327 | ++ |
328 | ++.TP |
329 | + \fB\-l\fR, \fB\-\-limit\fR \fILIMIT\fR |
330 | + Stop searching after |
331 | + .I LIMIT |
332 | diff --git a/debian/patches/series b/debian/patches/series |
333 | new file mode 100644 |
334 | index 0000000..7a363de |
335 | --- /dev/null |
336 | +++ b/debian/patches/series |
337 | @@ -0,0 +1 @@ |
338 | +locate-add-ignore-spaces-option-to-ignore-word-separ.patch |
339 | diff --git a/debian/plocate.postinst b/debian/plocate.postinst |
340 | index 5728938..ad3b1f3 100644 |
341 | --- a/debian/plocate.postinst |
342 | +++ b/debian/plocate.postinst |
343 | @@ -17,6 +17,16 @@ if [ "$1" = "configure" ]; then |
344 | if ! dpkg-statoverride --list /usr/bin/plocate >/dev/null 2>&1; then |
345 | dpkg-statoverride --update --add root "$GROUP" 2755 /usr/bin/plocate |
346 | fi |
347 | + |
348 | + if [ -z "$2" ] && ! [ -f /var/lib/plocate/plocate.db ]; then |
349 | + echo -n "Initializing plocate database; this may take some time... " |
350 | + NOCACHE= |
351 | + if [ -x /usr/bin/nocache ]; then |
352 | + NOCACHE="/usr/bin/nocache" |
353 | + fi |
354 | + $NOCACHE /usr/sbin/updatedb.plocate || true |
355 | + echo "done" |
356 | + fi |
357 | fi |
358 | |
359 | |
360 | diff --git a/debian/rules b/debian/rules |
361 | index 8e8b766..c24f340 100755 |
362 | --- a/debian/rules |
363 | +++ b/debian/rules |
364 | @@ -5,3 +5,6 @@ |
365 | |
366 | override_dh_auto_configure: |
367 | dh_auto_configure -- -Dupdatedb_progname=updatedb.plocate |
368 | + |
369 | +override_dh_installsystemd: |
370 | + dh_installsystemd --no-start |
- The proposed merge candidate built successful in a PPA (ppa:dviererbe/ dviererbe- ppa) [1].
- All tests pass, except for i386 which never succeeded before (see [8]). Test Logs:
- amd64 [2]
- arm64 [3]
- armhf [4]
- i386 [5]
- ppc64el [6]
- s390x [7]
- I tested upgrading from the previous version in a local lxc container.
[1] https:/ /launchpad. net/~dviererbe/ +archive/ ubuntu/ dviererbe- ppa /autopkgtest. ubuntu. com/results/ autopkgtest- mantic- dviererbe- dviererbe- ppa/mantic/ amd64/p/ plocate/ 20230801_ 071222_ 2812b@/ log.gz /autopkgtest. ubuntu. com/results/ autopkgtest- mantic- dviererbe- dviererbe- ppa/mantic/ arm64/p/ plocate/ 20230801_ 072110_ 727fc@/ log.gz /autopkgtest. ubuntu. com/results/ autopkgtest- mantic- dviererbe- dviererbe- ppa/mantic/ armhf/p/ plocate/ 20230801_ 071210_ ecdb8@/ log.gz /autopkgtest. ubuntu. com/results/ autopkgtest- mantic- dviererbe- dviererbe- ppa/mantic/ i386/p/ plocate/ 20230801_ 073124_ 2fbcb@/ log.gz /autopkgtest. ubuntu. com/results/ autopkgtest- mantic- dviererbe- dviererbe- ppa/mantic/ ppc64el/ p/plocate/ 20230801_ 071033_ dc339@/ log.gz /autopkgtest. ubuntu. com/results/ autopkgtest- mantic- dviererbe- dviererbe- ppa/mantic/ s390x/p/ plocate/ 20230801_ 070931_ 5fc2a@/ log.gz /autopkgtest. ubuntu. com/packages/ plocate
[2] https:/
[3] https:/
[4] https:/
[5] https:/
[6] https:/
[7] https:/
[8] https:/