monotone

monotone Commit Details

Date:2014-05-04 13:45:56 (5 years 1 month ago)
Author:Markus Wanner
Branch:org.debian.monotone
Commit:27b6f0ea9349d321bf7b8addb2692ac43c59c1b7
Parents: 813a3d6e758d6ae37b9a35a0cd4bcda1f1ff2e25
Message:Adapt to release 1.1, drop lots of patches.

Changes:
Dpatches/00-db-extension-bash-completion.diff (full)
Dpatches/01-format-security.diff (full)
Dpatches/02-file_handle.diff (full)
Dpatches/03-url_escaping.diff (full)
Dpatches/04-botan-1.10-adaption.diff (full)
Dpatches/05-hurd-compilation-fix.diff (full)
Dpatches/06-broken-dns-work-around.diff (full)
Dpatches/07-support-boost-1.53.diff (full)
Dpatches/08-texinfo-fix.diff (full)
Dpatches/09-ignore-aggressive-gnu-patch.diff (full)
Dpatches/10-mtn-ignore-syntax-error-test.diff (full)
Mchangelog (1 diff)
Mpatches/series (1 diff)

File differences

changelog
1
1
22
3
4
5
6
7
8
9
10
311
412
513
6
14
715
816
917
monotone (1.0-12) unstable; urgency=low
monotone (1.1-1) UNRELEASED; urgency=medium
* New upstream release
* Drop all patches from upstream commits now integrated: from patch
numbered 00 through 10.
-- Markus Wanner <markus@bluegap.ch> Sun, 04 May 2014 13:02:15 +0200
monotone (1.0-12) unstable; urgency=medium
* Add texlive-fonts-recommended as a B-D-I. Closes: #735933.
* Bump Standards-Version to 3.9.5; no changes required.
-- Markus Wanner <markus@bluegap.ch> Thu, 27 Feb 2014 19:00:19 +0100
-- Markus Wanner <markus@bluegap.ch> Thu, 27 Feb 2014 11:44:07 +0100
monotone (1.0-11) unstable; urgency=low
patches/00-db-extension-bash-completion.diff
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
Description: Since monotone defaults to databases ending with .db as
well, check for files with that extension as well when looking for
databases.
Origin: upstream, commit: bb5b0702260383c4086ab2088bfa79883f53f6ce
Index: monotone-1.0/extra/shell/monotone.bash_completion.in
===================================================================
--- monotone-1.0.orig/extra/shell/monotone.bash_completion.in2011-04-16 16:48:56.943628328 +0100
+++ monotone-1.0/extra/shell/monotone.bash_completion.in2011-04-16 16:49:18.683795516 +0100
@@ -70,6 +70,7 @@
_monotone_databases() {
_filedir mtn
+ _filedir db
COMPREPLY=(
"${COMPREPLY[@]}"
$(compgen -W "$(LANG=POSIX \
patches/01-format-security.diff
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
Description: Enable monotone to build with the -Werror=format-security
flag.
Bug-Debian: http://bugs.debian.org/646349
Origin: upstream, commit: e3bb68c53c351f411ea4505400c16c8d9f252013
Index: monotone-1.0/src/cmd.cc
===================================================================
--- monotone-1.0.orig/src/cmd.cc2011-03-26 06:40:58.000000000 +0000
+++ monotone-1.0/src/cmd.cc2012-03-25 23:53:18.251488351 +0100
@@ -974,7 +974,7 @@
F("could not execute man page formatter command '%s': %s")
% cmd % strerror(errno));
- fprintf(fp, ss.str().c_str());
+ fputs(ss.str().c_str(), fp);
pclose(fp);
}
patches/02-file_handle.diff
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
Description: Rename struct "file_handle" to "rcs_file_handle" to avoid
confict with glibc >= 2.14.
Origin: upstream, commit: da62cad10eda55aa233ac124273f3db4f541137a
Index: monotone-1.0/src/rcs_file.cc
===================================================================
--- monotone-1.0.orig/src/rcs_file.cc2011-03-26 06:41:01.000000000 +0000
+++ monotone-1.0/src/rcs_file.cc2012-03-26 01:41:52.208975095 +0100
@@ -42,12 +42,12 @@
#ifdef HAVE_MMAP
struct
-file_handle
+rcs_file_handle
{
string const & filename;
off_t length;
int fd;
- file_handle(string const & fn) :
+ rcs_file_handle(string const & fn) :
filename(fn),
length(0),
fd(-1)
@@ -60,13 +60,13 @@
if (fd == -1)
throw oops("open of " + filename + " failed");
}
- ~file_handle()
+ ~rcs_file_handle()
{
if (close(fd) == -1)
throw oops("close of " + filename + " failed");
}
};
-struct file_source
+struct rcs_file_source
{
string const & filename;
int fd;
@@ -91,7 +91,7 @@
++pos;
return good();
}
- file_source(string const & fn,
+ rcs_file_source(string const & fn,
int f,
off_t len) :
filename(fn),
@@ -104,7 +104,7 @@
if (mapping == MAP_FAILED)
throw oops("mmap of " + filename + " failed");
}
- ~file_source()
+ ~rcs_file_source()
{
if (munmap(mapping, length) == -1)
throw oops("munmapping " + filename + " failed, after reading RCS file");
@@ -112,12 +112,12 @@
};
#elif defined(WIN32)
struct
-file_handle
+rcs_file_handle
{
string const & filename;
off_t length;
HANDLE fd;
- file_handle(string const & fn) :
+ rcs_file_handle(string const & fn) :
filename(fn),
length(0),
fd(NULL)
@@ -134,7 +134,7 @@
if (fd == NULL)
throw oops("open of " + filename + " failed");
}
- ~file_handle()
+ ~rcs_file_handle()
{
if (CloseHandle(fd)==0)
throw oops("close of " + filename + " failed");
@@ -142,7 +142,7 @@
};
struct
-file_source
+rcs_file_source
{
string const & filename;
HANDLE fd,map;
@@ -167,7 +167,7 @@
++pos;
return good();
}
- file_source(string const & fn,
+ rcs_file_source(string const & fn,
HANDLE f,
off_t len) :
filename(fn),
@@ -183,7 +183,7 @@
if (mapping==NULL)
throw oops("MapViewOfFile of " + filename + " failed");
}
- ~file_source()
+ ~rcs_file_source()
{
if (UnmapViewOfFile(mapping)==0)
throw oops("UnmapViewOfFile of " + filename + " failed");
@@ -193,7 +193,7 @@
};
#else
// no mmap at all
-typedef istream file_source;
+typedef istream rcs_file_source;
#endif
typedef enum
@@ -220,7 +220,7 @@
}
static token_type
-get_token(file_source & ist,
+get_token(rcs_file_source & ist,
string & str,
size_t & line,
size_t & col)
@@ -303,14 +303,14 @@
struct parser
{
- file_source & ist;
+ rcs_file_source & ist;
rcs_file & r;
string token;
token_type ttype;
size_t line, col;
- parser(file_source & s,
+ parser(rcs_file_source & s,
rcs_file & r)
: ist(s), r(r), line(1), col(1)
{}
@@ -489,8 +489,8 @@
parse_rcs_file(string const & filename, rcs_file & r)
{
#if defined(HAVE_MMAP) || defined(WIN32)
- file_handle handle(filename);
- file_source ifs(filename, handle.fd, handle.length);
+ rcs_file_handle handle(filename);
+ rcs_file_source ifs(filename, handle.fd, handle.length);
#else
ifstream ifs(filename.c_str());
ifs.unsetf(ios_base::skipws);
patches/03-url_escaping.diff
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
Description: Escape characters in URLs used by test suite.
Bug-Debian: http://bugs.debian.org/668457
Origin: upstream, commit: a0ed177b60caee5cf304c01d83e75812af1225e1
Index: monotone-1.0/test/func/attr_mtn_execute/__driver__.lua
===================================================================
--- monotone-1.0.orig/test/func/attr_mtn_execute/__driver__.lua2012-04-28 15:41:51.595817578 +0100
+++ monotone-1.0/test/func/attr_mtn_execute/__driver__.lua2012-04-28 15:43:21.839400322 +0100
@@ -30,7 +30,7 @@
-- test clone with mtn:execute
copy("test.db", "test-clone.db")
-testURI="file://" .. test.root .. "/test-clone.db?testbranch"
+test_uri="file://" .. url_encode_path(test.root .. "/test-clone.db") .. "?testbranch"
-check(nodb_mtn("clone", testURI, "clone"), 0, false, true)
+check(nodb_mtn("clone", test_uri, "clone"), 0, false, true)
check(indir("clone", {"test", "-x","foo"}, 0, false, false))
Index: monotone-1.0/test/func/branch_leaves_sync_bug/__driver__.lua
===================================================================
--- monotone-1.0.orig/test/func/branch_leaves_sync_bug/__driver__.lua2012-04-28 15:41:51.595817578 +0100
+++ monotone-1.0/test/func/branch_leaves_sync_bug/__driver__.lua2012-04-28 15:43:21.839400322 +0100
@@ -46,7 +46,9 @@
-- Create Beth's workspace via checkout, so 'update' works
chdir(test.root)
-check(abe_mtn("sync", "file://" .. test.root .. "/beth.db?*"), 0, false, false)
+
+test_uri="file://" .. url_encode_path(test.root .. "/beth.db") .. "?*"
+check(abe_mtn("sync", test_uri), 0, false, false)
check(beth_mtn("checkout", "--branch", "testbranch", "Beth"), 0, false, false)
chdir("Beth")
check(beth_mtn("genkey", "beth@test.net"), 0, false, false, string.rep("beth@test.net\n", 2))
@@ -64,7 +66,7 @@
rev_b = base_revision()
-- Sync dbs
-check(abe_mtn("sync", "file://" .. test.root .. "/beth.db?*"), 0, false, false)
+check(abe_mtn("sync", test_uri), 0, false, false)
-- Abe merges
chdir("Abe")
@@ -80,7 +82,8 @@
rev_d = base_revision()
-- Sync dbs (not clear if direction of sync matters)
-check(beth_mtn("sync", "file://" .. test.root .. "/abe.db?*"), 0, false, false)
+test_uri="file://" .. url_encode_path(test.root .. "/abe.db") .. "?*"
+check(beth_mtn("sync", test_uri), 0, false, false)
-- bug; rev_d and rev_c are both heads according to branch_leaves table.
check(beth_mtn("db", "check"), 0, false, false)
Index: monotone-1.0/test/func/clone_aborts_on_branch_pattern_in_uri/__driver__.lua
===================================================================
--- monotone-1.0.orig/test/func/clone_aborts_on_branch_pattern_in_uri/__driver__.lua2012-04-28 15:41:51.595817578 +0100
+++ monotone-1.0/test/func/clone_aborts_on_branch_pattern_in_uri/__driver__.lua2012-04-28 15:43:21.839400322 +0100
@@ -6,9 +6,9 @@
commit("mybranch")
copy("test.db", "test-clone.db")
-testURI="file://" .. test.root .. "/test-clone.db?mybranch*"
-check(nodb_mtn("clone", testURI), 1, false, true)
+test_uri="file://" .. url_encode_path(test.root .. "/test-clone.db") .. "?mybranch*"
+check(nodb_mtn("clone", test_uri), 1, false, true)
check(qgrep("you must specify an unambiguous branch to clone", "stderr"))
-- the branch option is invalid in non-URI mode
@@ -16,7 +16,7 @@
check(qgrep("the '--branch' option is only valid with an URI to clone", "stderr"))
-- finally, this should succeed
-check(nodb_mtn("clone", testURI, "--branch=mybranch"), 0, false, false)
+check(nodb_mtn("clone", test_uri, "--branch=mybranch"), 0, false, false)
check(exists("mybranch"))
check(readfile("foo") == readfile("mybranch/foo"))
Index: monotone-1.0/test/func/clone_branch_no_dir/__driver__.lua
===================================================================
--- monotone-1.0.orig/test/func/clone_branch_no_dir/__driver__.lua2012-04-28 15:41:51.595817578 +0100
+++ monotone-1.0/test/func/clone_branch_no_dir/__driver__.lua2012-04-28 15:43:21.839400322 +0100
@@ -6,18 +6,18 @@
commit("mybranch")
copy("test.db", "test-clone.db")
-testURI="file://" .. test.root .. "/test-clone.db?mybranch"
-check(nodb_mtn("clone", testURI), 0, false, false)
+test_uri="file://" .. url_encode_path(test.root .. "/test-clone.db") .. "?mybranch"
+check(nodb_mtn("clone", test_uri), 0, false, false)
check(exists("mybranch"))
check(readfile("foo") == readfile("mybranch/foo"))
-- but now that that directory exists, this clone should fail
-check(nodb_mtn("clone", testURI), 1, false, false)
+check(nodb_mtn("clone", test_uri), 1, false, false)
-- but succeed if given a specific dir
-check(nodb_mtn("clone", testURI, "otherdir"), 0, false, false)
+check(nodb_mtn("clone", test_uri, "otherdir"), 0, false, false)
-- clone into . should not fail, like checkout
mkdir("test4")
-check(indir("test4", nodb_mtn("clone", testURI, ".")), 0, false, false)
+check(indir("test4", nodb_mtn("clone", test_uri, ".")), 0, false, false)
Index: monotone-1.0/test/func/clone_creates__MTN_log/__driver__.lua
===================================================================
--- monotone-1.0.orig/test/func/clone_creates__MTN_log/__driver__.lua2012-04-28 15:41:51.595817578 +0100
+++ monotone-1.0/test/func/clone_creates__MTN_log/__driver__.lua2012-04-28 15:43:21.840400284 +0100
@@ -13,9 +13,9 @@
check(mtn("--branch=testbranch", "--rcfile=commit_log.lua", "commit"), 0, false, false)
copy("test.db", "test-clone.db")
-testURI="file://" .. test.root .. "/test-clone.db?testbranch"
-check(nodb_mtn("clone", testURI, "testbranch"), 0, false, true)
+test_uri="file://" .. url_encode_path(test.root .. "/test-clone.db") .. "?testbranch"
+check(nodb_mtn("clone", test_uri, "testbranch"), 0, false, true)
check(exists("testbranch/_MTN/log"))
check(fsize("_MTN/log") == 0)
Index: monotone-1.0/test/func/clone_creates_right__MTN_options/__driver__.lua
===================================================================
--- monotone-1.0.orig/test/func/clone_creates_right__MTN_options/__driver__.lua2012-04-28 15:41:51.595817578 +0100
+++ monotone-1.0/test/func/clone_creates_right__MTN_options/__driver__.lua2012-04-28 15:43:21.840400284 +0100
@@ -10,7 +10,7 @@
writefile("testfile", "blah")
commit()
-testURI="file://" .. test.root .. "/test-clone.db?testbranch"
+test_uri="file://" .. url_encode_path(test.root .. "/test-clone.db") .. "?testbranch"
-- We use RAW_MTN because it used to be that passing --db= (as
-- MTN does) would hide a bug in this functionality...
@@ -18,16 +18,17 @@
-- all of these inherit options settings from the current _MTN dir
-- unless they override them on the command line
-check(nodb_mtn("clone", testURI, "test_dir1"), 0, false, false)
-check(nodb_mtn("clone", "--revision", rev, testURI, "test_dir2"), 0, false, false)
-check(nodb_mtn("--db=" .. test.root .. "/test-new.db", "clone", testURI, "test_dir3"), 0, false, false)
-check(nodb_mtn("--db=" .. test.root .. "/test-new.db", "clone", testURI, "--revision", rev, "test_dir4"), 0, false, false)
+check(nodb_mtn("clone", test_uri, "test_dir1"), 0, false, false)
+check(nodb_mtn("clone", "--revision", rev, test_uri, "test_dir2"), 0, false, false)
+check(nodb_mtn("--db=" .. test.root .. "/test-new.db", "clone", test_uri, "test_dir3"), 0, false, false)
+check(nodb_mtn("--db=" .. test.root .. "/test-new.db", "clone", test_uri, "--revision", rev, "test_dir4"), 0, false, false)
-- checkout fails if the specified revision is not a member of the specified branch
-testURI="file://" .. test.root .. "/test-clone.db?foobar"
-check(nodb_mtn("clone", testURI, "--revision", rev, "test_dir5"), 1, false, false)
+test_uri="file://" .. url_encode_path(test.root .. "/test-clone.db") .. "?foobar"
+
+check(nodb_mtn("clone", test_uri, "--revision", rev, "test_dir5"), 1, false, false)
check(nodb_mtn("cert", rev, "branch", "foobar", "-d", "test-clone.db"), 0, false, false)
-check(nodb_mtn("clone", testURI, "--revision", rev, "test_dir6"), 0, false, false)
+check(nodb_mtn("clone", test_uri, "--revision", rev, "test_dir6"), 0, false, false)
for i = 1,2 do
Index: monotone-1.0/test/func/clone_validates_target_directory/__driver__.lua
===================================================================
--- monotone-1.0.orig/test/func/clone_validates_target_directory/__driver__.lua2012-04-28 15:41:51.595817578 +0100
+++ monotone-1.0/test/func/clone_validates_target_directory/__driver__.lua2012-04-28 15:43:21.840400284 +0100
@@ -6,15 +6,15 @@
commit()
copy("test.db", "test-clone.db")
-testURI="file://" .. test.root .. "/test-clone.db?testbranch"
-check(nodb_mtn("clone", testURI, "test_dir1"), 0, false, false)
+test_uri="file://" .. url_encode_path(test.root .. "/test-clone.db") .. "?testbranch"
+check(nodb_mtn("clone", test_uri, "test_dir1"), 0, false, false)
writefile("test_dir2")
-check(nodb_mtn("clone", testURI, "test_dir2"), 1, false, false)
+check(nodb_mtn("clone", test_uri, "test_dir2"), 1, false, false)
mkdir("test_dir3")
-check(nodb_mtn("clone", testURI, "test_dir3"), 1, false, false)
+check(nodb_mtn("clone", test_uri, "test_dir3"), 1, false, false)
if existsonpath("chmod") and existsonpath("test") then
-- skip this part if run as root (hi Gentoo!)
@@ -27,9 +27,9 @@
else
mkdir("test_dir4")
check({"chmod", "444", "test_dir4"}, 0, false)
- check(nodb_mtn("clone", testURI, "test_dir4"),
+ check(nodb_mtn("clone", test_uri, "test_dir4"),
1, false, false)
- check(nodb_mtn("clone", testURI, "test_dir4/subdir"),
+ check(nodb_mtn("clone", test_uri, "test_dir4/subdir"),
1, false, false)
-- Reset the permissions so Autotest can correctly clean up our
-- temporary directory.
Index: monotone-1.0/test/func/clone_warning_with_multiple_heads/__driver__.lua
===================================================================
--- monotone-1.0.orig/test/func/clone_warning_with_multiple_heads/__driver__.lua2012-04-28 15:41:51.595817578 +0100
+++ monotone-1.0/test/func/clone_warning_with_multiple_heads/__driver__.lua2012-04-28 15:43:21.840400284 +0100
@@ -16,9 +16,9 @@
REV3=base_revision()
copy("test.db", "test-clone.db")
-testURI="file://" .. test.root .. "/test-clone.db?testbranch"
-check(nodb_mtn("clone", testURI, "test_dirA"),
+test_uri="file://" .. url_encode_path(test.root .. "/test-clone.db") .. "?testbranch"
+check(nodb_mtn("clone", test_uri, "test_dirA"),
1, false, true)
check(qgrep(REV2, "stderr"))
check(qgrep(REV3, "stderr"))
Index: monotone-1.0/test/func/clone_weird_branch_names/__driver__.lua
===================================================================
--- monotone-1.0.orig/test/func/clone_weird_branch_names/__driver__.lua2012-04-28 15:41:51.595817578 +0100
+++ monotone-1.0/test/func/clone_weird_branch_names/__driver__.lua2012-04-28 15:43:21.840400284 +0100
@@ -6,10 +6,11 @@
commit("my-branch[1,2]-1^3")
copy("test.db", "test-clone.db")
--- some of the special chars need to get double-escaped to get "through"
-testURI="file://" .. test.root .. "/test-clone.db?my-branch\\\[1,2\\\]-1^3"
-check(nodb_mtn("clone", testURI), 0, false, false)
+-- some of the special chars need to get double-escaped to get "through"
+test_uri="file://" .. url_encode_path(test.root .. "/test-clone.db") ..
+ "?" .. url_encode_query("my-branch\\\[1,2\\\]-1^3")
+check(nodb_mtn("clone", test_uri), 0, false, false)
check(exists("my-branch[1,2]-1^3"))
check(readfile("foo") == readfile("my-branch[1,2]-1^3/foo"))
Index: monotone-1.0/test/func/imp_test_filesync_confdir/__driver__.lua
===================================================================
--- monotone-1.0.orig/test/func/imp_test_filesync_confdir/__driver__.lua2012-04-28 15:41:51.595817578 +0100
+++ monotone-1.0/test/func/imp_test_filesync_confdir/__driver__.lua2012-04-28 15:43:21.840400284 +0100
@@ -18,7 +18,8 @@
rcfile:close()
end
-check(mtn("sync", "file://" .. test.root .. "/test2.db?testbranch"), 0, true, false)
+test_uri="file://" .. url_encode_path(test.root .. "/test2.db") .. "?testbranch"
+check(mtn("sync", test_uri), 0, true, false)
n = 0
Index: monotone-1.0/test/func/netsync_over_pipes/__driver__.lua
===================================================================
--- monotone-1.0.orig/test/func/netsync_over_pipes/__driver__.lua2012-04-28 15:41:51.595817578 +0100
+++ monotone-1.0/test/func/netsync_over_pipes/__driver__.lua2012-04-28 15:43:21.840400284 +0100
@@ -7,6 +7,7 @@
addfile("testfile", "foo")
commit()
-check(mtn("sync", "file://" .. test.root .. "/test2.db?testbranch"), 0, false, true)
+test_uri="file://" .. url_encode_path(test.root .. "/test2.db") .. "?testbranch"
+check(mtn("sync", test_uri), 0, false, true)
check(not qgrep("error", "stderr"))
check_same_db_contents("test.db", "test2.db")
Index: monotone-1.0/test/func/serve-automate-single-run/__driver__.lua
===================================================================
--- monotone-1.0.orig/test/func/serve-automate-single-run/__driver__.lua2012-04-28 15:41:51.595817578 +0100
+++ monotone-1.0/test/func/serve-automate-single-run/__driver__.lua2012-04-28 15:43:21.840400284 +0100
@@ -60,8 +60,9 @@
-- 'file:' not supported on Windows
copy("allow-automate.lua", "custom_test_hooks.lua")
+test_uri="file://" .. url_encode_path(test.root .. "/test.db")
check(mtn2("automate", "remote", "--remote-stdio-host",
- "file://"..test.root.."/test.db",
+ test_uri,
"get_file_of", "--", "-r".. R1, "foo"), 0, true, false)
check(qgrep("bar", "stdout"))
end
Index: monotone-1.0/test/func/serve-automate/__driver__.lua
===================================================================
--- monotone-1.0.orig/test/func/serve-automate/__driver__.lua2012-04-28 15:41:51.595817578 +0100
+++ monotone-1.0/test/func/serve-automate/__driver__.lua2012-04-28 15:43:21.840400284 +0100
@@ -56,7 +56,8 @@
if ostype ~= "Windows" then
-- 'file:' not supported on Windows
-check(mtn2("automate", "remote_stdio", "file://" .. test.root .. "/test.db"),
+test_uri="file://" .. url_encode_path(test.root .. "/test.db")
+check(mtn2("automate", "remote_stdio", test_uri),
0, true, false, "l17:interface_versione")
check(parse_stdio(readfile("stdout"), 0, 0, "m") ~= nil)
end
Index: monotone-1.0/test/func/util_mtnopt/__driver__.lua
===================================================================
--- monotone-1.0.orig/test/func/util_mtnopt/__driver__.lua2012-04-28 15:41:51.595817578 +0100
+++ monotone-1.0/test/func/util_mtnopt/__driver__.lua2012-04-28 15:43:21.840400284 +0100
@@ -6,6 +6,11 @@
normalized_testroot = normalize_path (test.root)
+-- Escape regexp special characters to form a proper regexp that correctly
+-- checks for the given path.
+escaped_testroot = string.gsub(normalized_testroot, "([*+.()[\\^$|?])",
+ function (x) return "\\" .. x end)
+
-- check default operation
-- MinGW does not process the shebang in mtnopt; must invoke sh directly
@@ -13,7 +18,7 @@
-- Don't pass the full /bin/sh path, it looks like that doesn't always
-- work under mingw.
check({"sh", "./mtnopt"}, 0, true)
-check(qgrep('^MTN_database="' .. normalized_testroot .. '/test.db";$', "stdout"))
+check(qgrep('^MTN_database="' .. escaped_testroot .. '/test.db";$', "stdout"))
check(qgrep('^MTN_branch="testbranch";$', "stdout"))
-- check operation with a specific key and just returning the value
Index: monotone-1.0/test/src/testlib.lua
===================================================================
--- monotone-1.0.orig/test/src/testlib.lua2012-04-28 15:41:51.595817578 +0100
+++ monotone-1.0/test/src/testlib.lua2012-04-28 15:43:21.841400246 +0100
@@ -144,6 +144,22 @@
return n
end
+-- encodes a query by percent escaping reserved characters (as defined
+-- in RFC 3986) - except for the directory separator ('/').
+function url_encode_path(path)
+ path = string.gsub(path, "([!*'();:@&=+$,?#[%]])",
+ function (x) return string.format("%%%02X", string.byte(x)) end)
+ return string.gsub(path, " ", "+")
+end
+
+-- encodes a query by percent escaping reserved characters (as defined
+-- in RFC 3986) - except for the ampersand and equal sign ('&', '=')
+function url_encode_query(path)
+ path = string.gsub(path, "([!*'();:@+$,/?#[%]])",
+ function (x) return string.format("%%%02X", string.byte(x)) end)
+ return string.gsub(path, " ", "+")
+end
+
function open_or_err(filename, mode, depth)
local file, e = io.open(filename, mode)
if file == nil then
patches/04-botan-1.10-adaption.diff
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
Description: allow monotone to be built and linked against botan 1.10.x
Origin: upstream, branch net.venge.monotone.issue-182
--- a/src/database.cc
+++ b/src/database.cc
@@ -3425,9 +3425,8 @@
rsa_pub_key pub;
get_key(pub_id, pub);
- SecureVector<Botan::byte> pub_block;
- pub_block.set(reinterpret_cast<Botan::byte const *>(pub().data()),
- pub().size());
+ SecureVector<Botan::byte> pub_block
+ (reinterpret_cast<Botan::byte const *>(pub().data()), pub().size());
shared_ptr<X509_PublicKey> x509_key(Botan::X509::load_key(pub_block));
shared_ptr<RSA_PublicKey> pub_key
@@ -3471,14 +3470,13 @@
else
{
rsa_pub_key pub;
- SecureVector<Botan::byte> pub_block;
if (!public_key_exists(id))
return cert_unknown;
get_key(id, pub);
- pub_block.set(reinterpret_cast<Botan::byte const *>(pub().data()),
- pub().size());
+ SecureVector<Botan::byte> pub_block
+ (reinterpret_cast<Botan::byte const *>(pub().data()), pub().size());
L(FL("building verifier for %d-byte pub key") % pub_block.size());
shared_ptr<X509_PublicKey> x509_key(Botan::X509::load_key(pub_block));
--- a/src/gzip.cc
+++ b/src/gzip.cc
@@ -110,7 +110,7 @@
if(deflateInit2(&(zlib->stream), level, Z_DEFLATED, -15, 8, Z_DEFAULT_STRATEGY) != Z_OK)
{
delete zlib; zlib = 0;
- throw Exception("Gzip_Compression: Memory allocation error");
+ throw Memory_Exhaustion();
}
}
@@ -137,7 +137,7 @@
/*************************************************
* Compress Input with Gzip *
*************************************************/
-void Gzip_Compression::write(const byte input[], u32bit length)
+void Gzip_Compression::write(const byte input[], filter_length_t length)
{
count += length;
@@ -152,7 +152,7 @@
zlib->stream.avail_out = buffer.size();
int rc = deflate(&(zlib->stream), Z_NO_FLUSH);
if (rc != Z_OK && rc != Z_STREAM_END)
- throw Exception("Internal error in Gzip_Compression deflate.");
+ throw Invalid_State("Internal error in Gzip_Compression deflate.");
send(buffer.begin(), buffer.size() - zlib->stream.avail_out);
}
}
@@ -172,7 +172,7 @@
zlib->stream.avail_out = buffer.size();
rc = deflate(&(zlib->stream), Z_FINISH);
if (rc != Z_OK && rc != Z_STREAM_END)
- throw Exception("Internal error in Gzip_Compression finishing deflate.");
+ throw Invalid_State("Internal error in Gzip_Compression finishing deflate.");
send(buffer.begin(), buffer.size() - zlib->stream.avail_out);
}
@@ -228,7 +228,7 @@
no_writes(true), pipe(new Hash_Filter("CRC32")), footer(0)
{
if (DEFAULT_BUFFERSIZE < sizeof(GZIP::GZIP_HEADER))
- throw Exception("DEFAULT_BUFFERSIZE is too small");
+ throw Decoding_Error("DEFAULT_BUFFERSIZE is too small");
zlib = new Zlib_Stream;
@@ -237,7 +237,7 @@
if(inflateInit2(&(zlib->stream), -15) != Z_OK)
{
delete zlib; zlib = 0;
- throw Exception("Gzip_Decompression: Memory allocation error");
+ throw Memory_Exhaustion();
}
}
@@ -256,7 +256,7 @@
void Gzip_Decompression::start_msg()
{
if (!no_writes)
- throw Exception("Gzip_Decompression: start_msg after already writing");
+ throw Decoding_Error("Gzip_Decompression: start_msg after already writing");
pipe.start_msg();
datacount = 0;
@@ -267,7 +267,7 @@
/*************************************************
* Decompress Input with Gzip *
*************************************************/
-void Gzip_Decompression::write(const byte input[], u32bit length)
+void Gzip_Decompression::write(const byte input[], filter_length_t length)
{
if(length) no_writes = false;
@@ -277,15 +277,16 @@
u32bit eat_len = eat_footer(input, length);
input += eat_len;
length -= eat_len;
- if (length == 0)
- return;
}
+ if (length == 0)
+ return;
+
// Check the gzip header
if (pos < sizeof(GZIP::GZIP_HEADER))
{
- u32bit len = std::min((u32bit)sizeof(GZIP::GZIP_HEADER)-pos, length);
- u32bit cmplen = len;
+ filter_length_t len = std::min((filter_length_t)sizeof(GZIP::GZIP_HEADER)-pos, length);
+ filter_length_t cmplen = len;
// The last byte is the OS flag - we don't care about that
if (pos + len - 1 >= GZIP::HEADER_POS_OS)
cmplen--;
@@ -317,8 +318,8 @@
if(rc == Z_NEED_DICT)
throw Decoding_Error("Gzip_Decompression: Need preset dictionary");
if(rc == Z_MEM_ERROR)
- throw Exception("Gzip_Decompression: Memory allocation error");
- throw Exception("Gzip_Decompression: Unknown decompress error");
+ throw Memory_Exhaustion();
+ throw Decoding_Error("Gzip_Decompression: Unknown decompress error");
}
send(buffer.begin(), buffer.size() - zlib->stream.avail_out);
pipe.write(buffer.begin(), buffer.size() - zlib->stream.avail_out);
@@ -346,8 +347,14 @@
if (footer.size() >= GZIP::FOOTER_LENGTH)
throw Decoding_Error("Gzip_Decompression: Data integrity error in footer");
+#if BOTAN_VERSION_CODE >= BOTAN_VERSION_CODE_FOR(1,9,11)
+ size_t eat_len = std::min(GZIP::FOOTER_LENGTH-footer.size(),
+ static_cast<size_t>(length));
+ footer += std::make_pair(input, eat_len);
+#else
u32bit eat_len = std::min(GZIP::FOOTER_LENGTH-footer.size(), length);
footer.append(input, eat_len);
+#endif
if (footer.size() == GZIP::FOOTER_LENGTH)
{
@@ -364,7 +371,7 @@
void Gzip_Decompression::check_footer()
{
if (footer.size() != GZIP::FOOTER_LENGTH)
- throw Exception("Gzip_Decompression: Error finalizing decompression");
+ throw Decoding_Error("Gzip_Decompression: Error finalizing decompression");
pipe.end_msg();
@@ -377,7 +384,12 @@
for (int i = 0; i < 4; i++)
buf[3-i] = tmpbuf[i];
+#if BOTAN_VERSION_CODE >= BOTAN_VERSION_CODE_FOR(1,9,11)
+ tmpbuf.resize(4);
+ tmpbuf.copy(footer.begin(), 4);
+#else
tmpbuf.set(footer.begin(), 4);
+#endif
if (buf != tmpbuf)
throw Decoding_Error("Gzip_Decompression: Data integrity error - CRC32 error");
@@ -400,7 +412,7 @@
// read, clear() will reset no_writes
if(no_writes) return;
- throw Exception("Gzip_Decompression: didn't find footer");
+ throw Decoding_Error("Gzip_Decompression: didn't find footer");
}
@@ -412,7 +424,11 @@
no_writes = true;
inflateReset(&(zlib->stream));
+#if BOTAN_VERSION_CODE >= BOTAN_VERSION_CODE_FOR(1,9,11)
+ footer.clear();
+#else
footer.destroy();
+#endif
pos = 0;
datacount = 0;
}
--- a/src/gzip.hh
+++ b/src/gzip.hh
@@ -7,11 +7,18 @@
#ifndef BOTAN_EXT_GZIP_H__
#define BOTAN_EXT_GZIP_H__
+#include <botan/version.h>
#include <botan/filter.h>
#include <botan/pipe.h>
namespace Botan {
+#if BOTAN_VERSION_CODE < BOTAN_VERSION_CODE_FOR(1,9,4)
+// Only 1.9.4 and newer export the Memory_Exception. Give this gzip
+// implementation something compatible to work with.
+typedef std::bad_alloc Memory_Exhaustion;
+#endif
+
namespace GZIP {
/* A basic header - we only need to set the IDs and compression method */
@@ -30,13 +37,19 @@
}
+#if BOTAN_VERSION_CODE >= BOTAN_VERSION_CODE_FOR(1,9,11)
+typedef size_t filter_length_t;
+#else
+typedef u32bit filter_length_t;
+#endif
+
/*************************************************
* Gzip Compression Filter *
*************************************************/
class Gzip_Compression : public Filter
{
public:
- void write(const byte input[], u32bit length);
+ void write(const byte input[], filter_length_t length);
void start_msg();
void end_msg();
std::string name() const { return "Gzip_Compression"; }
@@ -60,7 +73,7 @@
class Gzip_Decompression : public Filter
{
public:
- void write(const byte input[], u32bit length);
+ void write(const byte input[], filter_length_t length);
void start_msg();
void end_msg();
std::string name() const { return "Gzip_Decompression"; }
--- a/src/key_packet.cc
+++ b/src/key_packet.cc
@@ -106,8 +106,8 @@
void validate_public_key_data(string const & name, string const & keydata) const
{
string decoded = decode_base64_as<string>(keydata, origin::user);
- Botan::SecureVector<Botan::byte> key_block;
- key_block.set(reinterpret_cast<Botan::byte const *>(decoded.c_str()), decoded.size());
+ Botan::SecureVector<Botan::byte> key_block
+ (reinterpret_cast<Botan::byte const *>(decoded.c_str()), decoded.size());
try
{
Botan::X509::load_key(key_block);
--- a/src/key_store.cc
+++ b/src/key_store.cc
@@ -572,13 +572,21 @@
try // with empty passphrase
{
Botan::DataSource_Memory ds(kp.priv());
-#if BOTAN_VERSION_CODE >= BOTAN_VERSION_CODE_FOR(1,7,7)
+#if BOTAN_VERSION_CODE >= BOTAN_VERSION_CODE_FOR(1,9,11)
+ pkcs8_key.reset(Botan::PKCS8::load_key(ds, lazy_rng::get(), Dummy_UI()));
+#elif BOTAN_VERSION_CODE >= BOTAN_VERSION_CODE_FOR(1,7,7)
pkcs8_key.reset(Botan::PKCS8::load_key(ds, lazy_rng::get(), ""));
#else
pkcs8_key.reset(Botan::PKCS8::load_key(ds, ""));
#endif
}
+#if BOTAN_VERSION_CODE >= BOTAN_VERSION_CODE_FOR(1,9,11)
+ catch (Passphrase_Required & e)
+#elif BOTAN_VERSION_CODE >= BOTAN_VERSION_CODE_FOR(1,9,4)
+ catch (Botan::Invalid_Argument & e)
+#else
catch (Botan::Exception & e)
+#endif
{
L(FL("failed to load key with no passphrase: %s") % e.what());
@@ -605,13 +613,18 @@
{
Botan::DataSource_Memory ds(kp.priv());
#if BOTAN_VERSION_CODE >= BOTAN_VERSION_CODE_FOR(1,7,7)
- pkcs8_key.reset(Botan::PKCS8::load_key(ds, lazy_rng::get(), phrase()));
+ pkcs8_key.reset(Botan::PKCS8::load_key(ds, lazy_rng::get(),
+ phrase()));
#else
pkcs8_key.reset(Botan::PKCS8::load_key(ds, phrase()));
#endif
break;
}
+#if BOTAN_VERSION_CODE >= BOTAN_VERSION_CODE_FOR(1,9,4)
+ catch (Botan::Invalid_Argument)
+#else
catch (Botan::Exception & e)
+#endif
{
cycles++;
L(FL("decrypt_private_key: failure %d to load encrypted key: %s")
@@ -822,10 +835,14 @@
plaintext = string(reinterpret_cast<char const*>(plain.begin()),
plain.size());
}
- catch (Botan::Exception & ex)
+#if BOTAN_VERSION_CODE >= BOTAN_VERSION_CODE_FOR(1,9,4)
+ catch (std::exception & e)
+#else
+ catch (Botan::Exception & e)
+#endif
{
E(false, ciphertext.made_from,
- F("Botan error decrypting data: '%s'") % ex.what());
+ F("Botan error decrypting data: '%s'") % e.what());
}
}
@@ -856,9 +873,9 @@
{
if (agent.connected()) {
//grab the monotone public key as an RSA_PublicKey
- SecureVector<Botan::byte> pub_block;
- pub_block.set(reinterpret_cast<Botan::byte const *>(key.pub().data()),
- key.pub().size());
+ SecureVector<Botan::byte> pub_block
+ (reinterpret_cast<Botan::byte const *>(key.pub().data()),
+ key.pub().size());
L(FL("make_signature: building %d-byte pub key") % pub_block.size());
shared_ptr<X509_PublicKey> x509_key =
shared_ptr<X509_PublicKey>(Botan::X509::load_key(pub_block));
@@ -1031,8 +1048,14 @@
for (;;)
try
{
+#if BOTAN_VERSION_CODE >= BOTAN_VERSION_CODE_FOR(1,9,11)
+ arc4_key.resize(phrase().size());
+ arc4_key.copy(reinterpret_cast<Botan::byte const *>(phrase().data()),
+ phrase().size());
+#else
arc4_key.set(reinterpret_cast<Botan::byte const *>(phrase().data()),
phrase().size());
+#endif
Pipe arc4_decryptor(get_cipher("ARC4", arc4_key, Botan::DECRYPTION));
@@ -1051,7 +1074,11 @@
#endif
break;
}
+#if BOTAN_VERSION_CODE >= BOTAN_VERSION_CODE_FOR(1,9,4)
+ catch (Botan::Invalid_Argument & e)
+#else
catch (Botan::Exception & e)
+#endif
{
L(FL("migrate_old_key_pair: failure %d to load old private key: %s")
% cycles % e.what());
--- a/src/monotone.cc
+++ b/src/monotone.cc
@@ -156,27 +156,53 @@
E(linked_botan_version != BOTAN_VERSION_CODE_FOR(1,7,14), origin::system,
F("monotone does not support Botan 1.7.14"));
-#if BOTAN_VERSION_CODE <= BOTAN_VERSION_CODE_FOR(1,7,6)
+ // In Botan 1.9.9, the DataSink_Stream cannot be instantiated per
+ // se. As 1.10.1 is already out, let's simply disable support for
+ // that specific (testing) version of botan.
+ E(linked_botan_version != BOTAN_VERSION_CODE_FOR(1,9,9), origin::system,
+ F("monotone does not support Botan 1.9.9"));
+
+#if BOTAN_VERSION_CODE < BOTAN_VERSION_CODE_FOR(1,7,7)
+ // motonote binary compiled against botan younger than 1.7.7
E(linked_botan_version >= BOTAN_VERSION_CODE_FOR(1,6,3), origin::system,
F("this monotone binary requires Botan 1.6.3 or newer"));
- E(linked_botan_version <= BOTAN_VERSION_CODE_FOR(1,7,6), origin::system,
- F("this monotone binary does not work with Botan newer than 1.7.6"));
-#elif BOTAN_VERSION_CODE <= BOTAN_VERSION_CODE_FOR(1,7,22)
- E(linked_botan_version > BOTAN_VERSION_CODE_FOR(1,7,6), origin::system,
+ E(linked_botan_version < BOTAN_VERSION_CODE_FOR(1,7,7), origin::system,
+ F("this monotone binary does not work with Botan 1.7.7 or newer"));
+
+#elif BOTAN_VERSION_CODE < BOTAN_VERSION_CODE_FOR(1,7,22)
+ // motonote binary compiled against botan 1.7.7 - 1.7.21
+ E(linked_botan_version >= BOTAN_VERSION_CODE_FOR(1,7,7), origin::system,
F("this monotone binary requires Botan 1.7.7 or newer"));
- // While compiling against 1.7.22 or newer is recommended, because
- // it enables new features of Botan, the monotone binary compiled
- // against Botan 1.7.21 and before should still work with newer Botan
- // versions, including all of the stable branch 1.8.x.
- E(linked_botan_version < BOTAN_VERSION_CODE_FOR(1,9,0), origin::system,
- F("this monotone binary does not work with Botan 1.9.x"));
-#else
- E(linked_botan_version > BOTAN_VERSION_CODE_FOR(1,7,22), origin::system,
+ // While compiling against 1.7.22 or newer is recommended, because it
+ // enables new features of Botan, the monotone binary compiled against
+ // Botan 1.7.21 and before should still work with newer Botan version,
+ // including all of the stable branch 1.8.x, up to and including
+ // 1.9.3.
+ E(linked_botan_version < BOTAN_VERSION_CODE_FOR(1,9,4), origin::system,
+ F("this monotone binary does not work with Botan 1.9.4 or newer"));
+
+#elif BOTAN_VERSION_CODE < BOTAN_VERSION_CODE_FOR(1,9,4)
+ // motonote binary compiled against botan 1.7.22 - 1.9.3
+ E(linked_botan_version >= BOTAN_VERSION_CODE_FOR(1,7,22), origin::system,
F("this monotone binary requires Botan 1.7.22 or newer"));
- E(linked_botan_version < BOTAN_VERSION_CODE_FOR(1,9,0), origin::system,
- F("this monotone binary does not work with Botan 1.9.x"));
+ E(linked_botan_version < BOTAN_VERSION_CODE_FOR(1,9,4), origin::system,
+ F("this monotone binary does not work with Botan 1.9.4 or newer"));
+
+#elif BOTAN_VERSION_CODE < BOTAN_VERSION_CODE_FOR(1,9,11)
+ // motonote binary compiled against botan 1.9.4 - 1.9.10
+#pragma message ( "The resulting monotone binary won't be able to run with any stable release of botan." )
+ E(linked_botan_version >= BOTAN_VERSION_CODE_FOR(1,9,4), origin::system,
+ F("this monotone binary requires Botan 1.9.4 or newer"));
+ E(linked_botan_version < BOTAN_VERSION_CODE_FOR(1,9,11), origin::system,
+ F("this monotone binary does not work with Botan 1.9.11 or newer"));
+
+#else
+ // motonote binary compiled against botan 1.9.11 and newer
+ E(linked_botan_version >= BOTAN_VERSION_CODE_FOR(1,9,11), origin::system,
+ F("this monotone binary requires Botan 1.9.11 or newer"));
#endif
+
app_state app;
try
{
--- a/src/packet.cc
+++ b/src/packet.cc
@@ -156,8 +156,8 @@
void validate_public_key_data(string const & name, string const & keydata) const
{
string decoded = decode_base64_as<string>(keydata, origin::user);
- Botan::SecureVector<Botan::byte> key_block;
- key_block.set(reinterpret_cast<Botan::byte const *>(decoded.c_str()), decoded.size());
+ Botan::SecureVector<Botan::byte> key_block
+ (reinterpret_cast<Botan::byte const *>(decoded.c_str()), decoded.size());
try
{
Botan::X509::load_key(key_block);
@@ -175,7 +175,9 @@
Botan::DataSource_Memory ds(decoded);
try
{
-#if BOTAN_VERSION_CODE >= BOTAN_VERSION_CODE_FOR(1,7,7)
+#if BOTAN_VERSION_CODE >= BOTAN_VERSION_CODE_FOR(1,9,11)
+ Botan::PKCS8::load_key(ds, lazy_rng::get(), Dummy_UI());
+#elif BOTAN_VERSION_CODE >= BOTAN_VERSION_CODE_FOR(1,7,7)
Botan::PKCS8::load_key(ds, lazy_rng::get(), string());
#else
Botan::PKCS8::load_key(ds, string());
@@ -189,7 +191,11 @@
}
// since we do not want to prompt for a password to decode it finally,
// we ignore all other exceptions
+#if BOTAN_VERSION_CODE >= BOTAN_VERSION_CODE_FOR(1,9,11)
+ catch (Passphrase_Required) {}
+#else
catch (Botan::Invalid_Argument) {}
+#endif
}
void validate_certname(string const & cn) const
{
@@ -460,7 +466,15 @@
return count;
}
-
+// Dummy User_Interface implementation for Botan
+#if BOTAN_VERSION_CODE >= BOTAN_VERSION_CODE_FOR(1,9,11)
+std::string
+Dummy_UI::get_passphrase(const std::string &, const std::string &,
+ Botan::User_Interface::UI_Result&) const
+{
+ throw Passphrase_Required("Passphrase required");
+}
+#endif
// Local Variables:
// mode: C++
--- a/src/packet.hh
+++ b/src/packet.hh
@@ -10,6 +10,10 @@
#ifndef __PACKET_HH__
#define __PACKET_HH__
+#if BOTAN_VERSION_CODE >= BOTAN_VERSION_CODE_FOR(1,9,11)
+#include <botan/ui.h>
+#endif
+
#include "vocab.hh"
struct cert;
@@ -84,6 +88,21 @@
size_t read_packets(std::istream & in, packet_consumer & cons);
+#if BOTAN_VERSION_CODE >= BOTAN_VERSION_CODE_FOR(1,9,11)
+// A helper class implementing Botan::User_Interface - which doesn't really
+// interface with the user, but provides the necessary plumbing for Botan.
+//
+// See Botan commit 2d09d7d0cd4bd0e7155d001dd65a4f29103b158c
+typedef std::runtime_error Passphrase_Required;
+
+class Dummy_UI : public Botan::User_Interface
+{
+public:
+ virtual std::string get_passphrase(const std::string &, const std::string &,
+ Botan::User_Interface::UI_Result &) const;
+};
+#endif
+
#endif
// Local Variables:
--- a/src/sha1.cc
+++ b/src/sha1.cc
@@ -50,9 +50,12 @@
Botan::Default_Benchmark_Timer timer;
std::map<std::string, double> results =
Botan::algorithm_benchmark("SHA-1", milliseconds, timer, rng, af);
-#else
+#elif BOTAN_VERSION_CODE < BOTAN_VERSION_CODE_FOR(1,9,11)
std::map<std::string, double> results =
Botan::algorithm_benchmark("SHA-1", milliseconds, rng, af);
+#else
+ std::map<std::string, double> results =
+ Botan::algorithm_benchmark("SHA-1", af, rng, milliseconds, 16);
#endif
for(std::map<std::string, double>::const_iterator i = results.begin();
--- a/src/ssh_agent.cc
+++ b/src/ssh_agent.cc
@@ -385,9 +385,9 @@
ssh_agent::has_key(const keypair & key)
{
//grab the monotone public key as an RSA_PublicKey
- SecureVector<Botan::byte> pub_block;
- pub_block.set(reinterpret_cast<Botan::byte const *>((key.pub)().data()),
- (key.pub)().size());
+ SecureVector<Botan::byte> pub_block
+ (reinterpret_cast<Botan::byte const *>((key.pub)().data()),
+ (key.pub)().size());
L(FL("has_key: building %d-byte pub key") % pub_block.size());
shared_ptr<X509_PublicKey> x509_key =
shared_ptr<X509_PublicKey>(Botan::X509::load_key(pub_block));
--- a/src/transforms.cc
+++ b/src/transforms.cc
@@ -53,15 +53,16 @@
// paradigm "must" be used. this program is intended for source code
// control and I make no bones about it.
-NORETURN(static inline void error_in_transform(Botan::Exception & e));
+NORETURN(static inline void error_in_transform(std::exception & e));
static inline void
-error_in_transform(Botan::Exception & e, origin::type caused_by)
+error_in_transform(std::exception & e, origin::type caused_by)
{
// these classes can all indicate data corruption
if (typeid(e) == typeid(Botan::Encoding_Error)
|| typeid(e) == typeid(Botan::Decoding_Error)
|| typeid(e) == typeid(Botan::Stream_IO_Error)
+ || typeid(e) == typeid(Botan::Invalid_Argument)
|| typeid(e) == typeid(Botan::Integrity_Failure))
{
// clean up the what() string a little: throw away the
@@ -107,7 +108,7 @@
pipe->process_msg(in); \
out = pipe->read_all_as_string(Pipe::LAST_MESSAGE); \
} \
- catch (Botan::Exception & e) \
+ catch (std::exception & e) \
{ \
pipe.reset(new Pipe(new T(carg))); \
error_in_transform(e, made_from); \
@@ -173,7 +174,7 @@
{
throw Botan::Decoding_Error(string("invalid hex character '") + (char)c + "'");
}
- catch(Botan::Exception & e)
+ catch(std::exception & e)
{
error_in_transform(e, made_from);
}
@@ -219,7 +220,7 @@
tmp = pipe->read_all_as_string(Pipe::LAST_MESSAGE);
out = base64< gzip<T> >(tmp, in.made_from);
}
- catch (Botan::Exception & e)
+ catch (std::exception & e)
{
pipe.reset(new Pipe(new Gzip_Compression,
new Base64_Encoder));
@@ -237,7 +238,7 @@
pipe->process_msg(in());
out = T(pipe->read_all_as_string(Pipe::LAST_MESSAGE), in.made_from);
}
- catch (Botan::Exception & e)
+ catch (std::exception & e)
{
pipe.reset(new Pipe(new Base64_Decoder,
new Gzip_Decompression));
@@ -264,7 +265,7 @@
p->process_msg(dat());
ident = id(p->read_all_as_string(Pipe::LAST_MESSAGE), dat.made_from);
}
- catch (Botan::Exception & e)
+ catch (std::exception & e)
{
p.reset(new Pipe(new Hash_Filter("SHA-160")));
error_in_transform(e, dat.made_from);
patches/05-hurd-compilation-fix.diff
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
Description: fix compilation on hurd-i386
Do not rely on MAXPATHLEN to be defined. Instead iteratively call getcwd()
with an increasing buffer size until the current path fits.
Bug-Debian: http://bugs.debian.org/624779
Origin: upstream, backport of 64e690fd0e14f6a0ad816d8fd55044f36d8559d5,
d23dbf2ce78cd11fc1a1dc85cd78cc28ab2df8ca and
c14cb021dafa331f859634a14087f6f81d870aed
============================================================
--- a/src/netxx/serverbase.cxx
+++ b/src/netxx/serverbase.cxx
@@ -44,6 +44,9 @@
#include "probeinfo.h"
#include "socket.h"
+// Monotone specific, for get_current_working_dir()
+#include <src/platform.hh>
+
// standard includes
#include <map>
#include <vector>
@@ -167,14 +170,16 @@
if (saun->sun_path[0] == '/') {
files_.push_back(saun->sun_path);
} else {
- char buffer[MAXPATHLEN];
-
- if (getcwd(buffer, sizeof(buffer))) {
- std::string fullpath = buffer; fullpath += '/'; fullpath += saun->sun_path;
-files_.push_back(fullpath);
- } else {
-files_.push_back(saun->sun_path);
- }
+ /*
+ * the original (netxx) code here relied on MAXPATHLEN,
+ * which isn't defined on hurd. As netxx seems to only
+ * live on within monotone, we can as well make it
+ * inter-dependent. And the unix/fs.cc variant certainly
+ * gets more test mileage than anything special here.
+ */
+ std::string fullpath = get_current_working_dir();
+ fullpath += '/'; fullpath += saun->sun_path;
+ files_.push_back(fullpath);
}
}
#endif
--- a/src/unix/fs.cc
+++ b/src/unix/fs.cc
@@ -41,14 +41,26 @@
string
get_current_working_dir()
{
- char buffer[4096];
- if (!getcwd(buffer, 4096))
+ std::vector<char> cwd_buf;
+ size_t cwd_sz = 4096;
+
+ // This funny loop prevents having to specify a MAXPATHLEN or similar, but
+ // uses a dynamic approach, repeatedly calling getcwd() until our buffer
+ // is big enough for the current path to fit. Think of it as a portable
+ // replacement for get_current_dir_name(), which is GNU-only.
+ do
{
- const int err = errno;
- E(false, origin::system,
- F("cannot get working directory: %s") % os_strerror(err));
+ cwd_buf.resize(cwd_sz);
+ if (getcwd(&cwd_buf[0], cwd_sz))
+ return string(&cwd_buf[0]);
+
+ cwd_sz += 4096;
}
- return string(buffer);
+ while (errno == ERANGE);
+
+ const int err = errno;
+ E(false, origin::system,
+ F("cannot get working directory: %s") % os_strerror(err));
}
void
patches/06-broken-dns-work-around.diff
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
Description: work-around to skip a test in case we are behind a broken DNS
Checks a domain that's supposed to be inexistent and skips a test that
fails in case a broken DNS tries to be helpful and resolves such an
inexistent name.
Bug-Debian: http://bugs.debian.org/671080
Origin: upstream, commit: 7b87eec0dc2298a18531b95c1cd2d1b72986e71c
--- a/test/func/netsync_badhost_gives_nice_error/__driver__.lua
+++ b/test/func/netsync_badhost_gives_nice_error/__driver__.lua
@@ -1,3 +1,22 @@
+skip_if(not existsonpath("host"))
+
+-- We punt in case of misconfigured DNS servers that resolve inexistant
+-- domain names. (Don't even think about buying that domain name!)
+L("\nChecking DNS resolution for nosuchhost__blahblah__asdvasoih.com: ")
+local pid = spawn_redirected("", "host-lookup.out", "host-lookup.err",
+ "host", "nosuchhost__blahblah__asdvasoih.com")
+local ec = wait(pid)
+
+if ec == 0 then
+ L("failed\n",
+ "\n",
+ "Your DNS resolver is trying to be helpful by resolving names that do\n",
+ "not exist. `host nosuchhost__blahblah__asdvasoih.com` returned:\n\n")
+ log_file_contents("host-lookup.out")
+ skip_if(true)
+else
+ L("good\n")
+end
mtn_setup()
patches/07-support-boost-1.53.diff
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
Description: fix compilation against boost-1.53.
Replace all occurances of boost::shared_dynamic_cast with
boost::dynamic_pointer_cast so as to compile with boost 1.53.
Origin: upstream, commit: dfe4b51c8db852b7281a125aac6f3ddee34906f6
Author: Markus Wanner <markus@bluegap.ch>
--- a/src/database.cc
+++ b/src/database.cc
@@ -92,7 +92,7 @@
using std::accumulate;
using boost::shared_ptr;
-using boost::shared_dynamic_cast;
+using boost::dynamic_pointer_cast;
using boost::lexical_cast;
using boost::get;
using boost::tuple;
@@ -3430,7 +3430,7 @@
shared_ptr<X509_PublicKey> x509_key(Botan::X509::load_key(pub_block));
shared_ptr<RSA_PublicKey> pub_key
- = shared_dynamic_cast<RSA_PublicKey>(x509_key);
+ = dynamic_pointer_cast<RSA_PublicKey>(x509_key);
if (!pub_key)
throw recoverable_failure(origin::system,
"Failed to get RSA encrypting key");
@@ -3481,7 +3481,7 @@
L(FL("building verifier for %d-byte pub key") % pub_block.size());
shared_ptr<X509_PublicKey> x509_key(Botan::X509::load_key(pub_block));
shared_ptr<RSA_PublicKey> pub_key
- = boost::shared_dynamic_cast<RSA_PublicKey>(x509_key);
+ = boost::dynamic_pointer_cast<RSA_PublicKey>(x509_key);
E(pub_key, id.inner().made_from,
F("Failed to get RSA verifying key for %s") % id);
--- a/src/key_store.cc
+++ b/src/key_store.cc
@@ -43,7 +43,7 @@
using boost::scoped_ptr;
using boost::shared_ptr;
-using boost::shared_dynamic_cast;
+using boost::dynamic_pointer_cast;
using Botan::RSA_PrivateKey;
using Botan::RSA_PublicKey;
@@ -641,7 +641,7 @@
I(pkcs8_key);
shared_ptr<RSA_PrivateKey> priv_key;
- priv_key = shared_dynamic_cast<RSA_PrivateKey>(pkcs8_key);
+ priv_key = dynamic_pointer_cast<RSA_PrivateKey>(pkcs8_key);
E(priv_key, origin::no_fault,
F("failed to extract RSA private key from PKCS#8 keypair"));
@@ -879,7 +879,8 @@
L(FL("make_signature: building %d-byte pub key") % pub_block.size());
shared_ptr<X509_PublicKey> x509_key =
shared_ptr<X509_PublicKey>(Botan::X509::load_key(pub_block));
- shared_ptr<RSA_PublicKey> pub_key = shared_dynamic_cast<RSA_PublicKey>(x509_key);
+ shared_ptr<RSA_PublicKey> pub_key =
+ dynamic_pointer_cast<RSA_PublicKey>(x509_key);
if (!pub_key)
throw recoverable_failure(origin::system,
@@ -1092,7 +1093,7 @@
continue;
}
- priv_key = shared_dynamic_cast<RSA_PrivateKey>(pkcs8_key);
+ priv_key = dynamic_pointer_cast<RSA_PrivateKey>(pkcs8_key);
I(priv_key);
// now we can write out the new key
--- a/src/ssh_agent.cc
+++ b/src/ssh_agent.cc
@@ -32,7 +32,7 @@
using std::vector;
using boost::shared_ptr;
-using boost::shared_dynamic_cast;
+using boost::dynamic_pointer_cast;
using Botan::RSA_PublicKey;
using Botan::RSA_PrivateKey;
@@ -391,7 +391,8 @@
L(FL("has_key: building %d-byte pub key") % pub_block.size());
shared_ptr<X509_PublicKey> x509_key =
shared_ptr<X509_PublicKey>(Botan::X509::load_key(pub_block));
- shared_ptr<RSA_PublicKey> pub_key = shared_dynamic_cast<RSA_PublicKey>(x509_key);
+ shared_ptr<RSA_PublicKey> pub_key =
+ dynamic_pointer_cast<RSA_PublicKey>(x509_key);
if (!pub_key)
throw recoverable_failure(origin::system,
patches/08-texinfo-fix.diff
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
Description: fix texinfo errors with texinfo >= 5.0
Origin: upstream, commit: 0d22697daf2fd169db15445cd88f8a7be7371f64
Author: Markus Wanner <markus@bluegap.ch>
--- a/doc/monotone.texi
+++ b/doc/monotone.texi
@@ -4779,7 +4779,7 @@
Cancel all previous @option{--rcfile} options (standard rcfiles are
still loaded). See @ref{rcfiles}.
-@itemx --root <arg>
+@item --root <arg>
Limit the search for a workspace to the specified root directory
@item --ssh-sign <arg>
@@ -6150,7 +6150,7 @@
Specifying only the pathname "." will restrict the search for unknown
files to the current subdirectory of the workspace.
-@itemx mtn list vars [@var{domain}]
+@item mtn list vars [@var{domain}]
@itemx mtn ls vars
@command{ls vars} is an alias for @command{list vars}.
--- a/doc/pcrepattern.texi
+++ b/doc/pcrepattern.texi
@@ -74,32 +74,32 @@
brackets, the metacharacters are as follows:
@table @code
-@itemx \
+@item \
general escape character with several uses
-@itemx ^
+@item ^
assert start of string (or line, in multiline mode)
-@itemx $
+@item $
assert end of string (or line, in multiline mode)
-@itemx .
+@item .
match any character except newline (by default)
-@itemx [
+@item [
start character class definition
-@itemx |
+@item |
start of alternative branch
-@itemx (
+@item (
start subpattern
-@itemx )
+@item )
end subpattern
-@itemx ?
+@item ?
extends the meaning of @samp{(}
also 0 or 1 quantifier
also quantifier minimizer
-@itemx *
+@item *
0 or more quantifier
-@itemx +
+@item +
1 or more quantifier
also ``possessive quantifier''
-@itemx @{
+@item @{
start min/max quantifier
@end table
@@ -108,16 +108,16 @@
class". In a character class the only metacharacters are:
@table @code
-@itemx \
+@item \
general escape character
-@itemx ^
+@item ^
negate the class, but only if the first character
-@itemx -
+@item -
indicates character range
-@itemx [
+@item [
POSIX character class (only if followed by POSIX
syntax)
-@itemx ]
+@item ]
terminates the character class
@end table
@@ -159,25 +159,25 @@
represents:
@table @code
-@itemx \a
+@item \a
alarm, that is, the BEL character (hex 07)
-@itemx \c@var{x}
+@item \c@var{x}
"control-@var{x}", where @var{x} is any character
-@itemx \e
+@item \e
escape (hex 1B)
-@itemx \f
+@item \f
formfeed (hex 0C)
-@itemx \n
+@item \n
linefeed (hex 0A)
-@itemx \r
+@item \r
carriage return (hex 0D)
-@itemx \t
+@item \t
tab (hex 09)
-@itemx \@var{ddd}
+@item \@var{ddd}
character with octal code @var{ddd}, or backreference
-@itemx \x@var{hh}
+@item \x@var{hh}
character with hex code @var{hh}
-@itemx \x@{@var{hhh...}@}
+@item \x@{@var{hhh...}@}
character with hex code @var{hhh...}
@end table
@@ -244,27 +244,27 @@
@samp{\777} are permitted. For example:
@table @code
-@itemx \040
+@item \040
is another way of writing a space
-@itemx \40
+@item \40
is the same, provided there are fewer than 40
previous capturing subpatterns
-@itemx \7
+@item \7
is always a back reference
-@itemx \11
+@item \11
might be a back reference, or another way of
writing a tab
-@itemx \011
+@item \011
is always a tab
-@itemx \0113
+@item \0113
is a tab followed by the character @samp{3}
-@itemx \113
+@item \113
might be a back reference, otherwise the
character with octal code 113
-@itemx \377
+@item \377
might be a back reference, otherwise
the byte consisting entirely of 1 bits
-@itemx \81
+@item \81
is either a back reference, or a binary zero
followed by the two characters @samp{8} and @samp{1}
@end table
@@ -294,25 +294,25 @@
following are always recognized:
@table @code
-@itemx \d
+@item \d
any decimal digit
-@itemx \D
+@item \D
any character that is not a decimal digit
-@itemx \h
+@item \h
any horizontal whitespace character
-@itemx \H
+@item \H
any character that is not a horizontal whitespace character
-@itemx \s
+@item \s
any whitespace character
-@itemx \S
+@item \S
any character that is not a whitespace character
-@itemx \v
+@item \v
any vertical whitespace character
-@itemx \V
+@item \V
any character that is not a vertical whitespace character
-@itemx \w
+@item \w
any ``word'' character
-@itemx \W
+@item \W
any ``non-word'' character
@end table
@@ -342,43 +342,43 @@
characters are:
@table @code
-@itemx U+0009
+@item U+0009
Horizontal tab
-@itemx U+0020
+@item U+0020
Space
-@itemx U+00A0
+@item U+00A0
Non-break space
-@itemx U+1680
+@item U+1680
Ogham space mark
-@itemx U+180E
+@item U+180E
Mongolian vowel separator
@item U+2000
En quad
-@itemx U+2001
+@item U+2001
Em quad
-@itemx U+2002
+@item U+2002
En space
-@itemx U+2003
+@item U+2003
Em space
-@itemx U+2004
+@item U+2004
Three-per-em space
-@itemx U+2005
+@item U+2005
Four-per-em space
-@itemx U+2006
+@item U+2006
Six-per-em space
@item U+2007
Figure space
-@itemx U+2008
+@item U+2008
Punctuation space
-@itemx U+2009
+@item U+2009
Thin space
-@itemx U+200A
+@item U+200A
Hair space
-@itemx U+202F
+@item U+202F
Narrow no-break space
-@itemx U+205F
+@item U+205F
Medium mathematical space
-@itemx U+3000
+@item U+3000
Ideographic space
@end table
@@ -386,19 +386,19 @@
The vertical space characters are:
@table @code
-@itemx U+000A
+@item U+000A
Linefeed
-@itemx U+000B
+@item U+000B
Vertical tab
-@itemx U+000C
+@item U+000C
Formfeed
-@itemx U+000D
+@item U+000D
Carriage return
-@itemx U+0085
+@item U+0085
Next line
-@itemx U+2028
+@item U+2028
Line separator
-@itemx U+2029
+@item U+2029
Paragraph separator
@end table
@@ -418,15 +418,15 @@
the following five sequences:
@table @code
-@itemx (*CR)
+@item (*CR)
carriage return
-@itemx (*LF)
+@item (*LF)
linefeed
-@itemx (*CRLF)
+@item (*CRLF)
carriage return, followed by linefeed
-@itemx (*ANYCRLF)
+@item (*ANYCRLF)
any of the three above
-@itemx (*ANY)
+@item (*ANY)
all Unicode newline sequences
@end table
@@ -474,9 +474,9 @@
pattern string with one of the following sequences:
@table @code
-@itemx (*BSR_ANYCRLF)
+@item (*BSR_ANYCRLF)
@key{CR}, @key{LF}, or @key{CR}@key{LF} only
-@itemx (*BSR_UNICODE)
+@item (*BSR_UNICODE)
any Unicode newline sequence (the default)
@end table
@@ -501,11 +501,11 @@
256, but they do work in this mode. The extra escape sequences are:
@table @code
-@itemx \p@{@var{xx}@}
+@item \p@{@var{xx}@}
a character with the @var{xx} property
-@itemx \P@{@var{xx}@}
+@item \P@{@var{xx}@}
a character without the @var{xx} property
-@itemx \X
+@item \X
an extended Unicode sequence
@end table
@@ -618,83 +618,83 @@
@table @code
@item C
Other
-@itemx Cc
+@item Cc
Control
-@itemx Cf
+@item Cf
Format
-@itemx Cn
+@item Cn
Unassigned
-@itemx Co
+@item Co
Private use
-@itemx Cs
+@item Cs
Surrogate
@item L
Letter
-@itemx Ll
+@item Ll
Lower case letter
-@itemx Lm
+@item Lm
Modifier letter
-@itemx Lo
+@item Lo
Other letter
-@itemx Lt
+@item Lt
Title case letter
-@itemx Lu
+@item Lu
Upper case letter
@item M
Mark
-@itemx Mc
+@item Mc
Spacing mark
-@itemx Me
+@item Me
Enclosing mark
-@itemx Mn
+@item Mn
Non-spacing mark
@item N
Number
-@itemx Nd
+@item Nd
Decimal number
-@itemx Nl
+@item Nl
Letter number
-@itemx No
+@item No
Other number
@item P
Punctuation
-@itemx Pc
+@item Pc
Connector punctuation
-@itemx Pd
+@item Pd
Dash punctuation
-@itemx Pe
+@item Pe
Close punctuation
-@itemx Pf
+@item Pf
Final punctuation
-@itemx Pi
+@item Pi
Initial punctuation
-@itemx Po
+@item Po
Other punctuation
-@itemx Ps
+@item Ps
Open punctuation
@item S
Symbol
-@itemx Sc
+@item Sc
Currency symbol
-@itemx Sk
+@item Sk
Modifier symbol
-@itemx Sm
+@item Sm
Mathematical symbol
-@itemx So
+@item So
Other symbol
@item Z
Separator
-@itemx Zl
+@item Zl
Line separator
-@itemx Zp
+@item Zp
Paragraph separator
-@itemx Zs
+@item Zs
Space separator
@end table
@@ -771,18 +771,18 @@
described below. The backslashed assertions are:
@table @code
-@itemx \b
+@item \b
matches at a word boundary
-@itemx \B
+@item \B
matches when not at a word boundary
-@itemx \A
+@item \A
matches at the start of the subject
-@itemx \Z
+@item \Z
matches at the end of the subject
also matches before a newline at the end of the subject
-@itemx \z
+@item \z
matches only at the end of the subject
-@itemx \G
+@item \G
matches at the first matching position in the subject
@end table
@@ -993,33 +993,33 @@
supported class names are
@table @code
-@itemx alnum
+@item alnum
letters and digits
-@itemx alpha
+@item alpha
letters
-@itemx ascii
+@item ascii
character codes 0 -- 127
-@itemx blank
+@item blank
space or tab only
-@itemx cntrl
+@item cntrl
control characters
-@itemx digit
+@item digit
decimal digits (same as @samp{\d})
-@itemx graph
+@item graph
printing characters, excluding space
-@itemx lower
+@item lower
lower case letters
-@itemx print
+@item print
printing characters, including space
-@itemx punct
+@item punct
printing characters, excluding letters and digits
-@itemx space
+@item space
white space (not quite the same as @samp{\s})
-@itemx upper
+@item upper
upper case letters
-@itemx word
+@item word
``word'' characters (same as @samp{\w})
-@itemx xdigit
+@item xdigit
hexadecimal digits
@end table
@@ -1071,22 +1071,22 @@
@samp{)}. The option letters are
@table @code
-@itemx i
+@item i
Caseless: characters in one case match the corresponding
characters in other cases as well.
-@itemx m
+@item m
Multiline: @samp{^} and @samp{$} match at newlines
as well as at beginning and end of string.
-@itemx s
+@item s
Dotall: dot matches any character, including newline characters.
-@itemx x
+@item x
Extended syntax: unescaped white space is ignored and embedded
comments are possible.
-@itemx J
+@item J
Dupnames: names for capturing subpattern need not be unique.
-@itemx U
+@item U
Ungreedy: quantifiers match as few times as possible by default.
-@itemx X
+@item X
Extra: for forward compatibility, give an error if any escape sequence
with no defined meaning appears.
@end table
@@ -1358,11 +1358,11 @@
single-character abbreviations:
@table @code
-@itemx *
+@item *
is equivalent to @{0,@}
-@itemx +
+@item +
is equivalent to @{1,@}
-@itemx ?
+@item ?
is equivalent to @{0,1@}
@end table
@@ -2302,7 +2302,7 @@
The following verbs act as soon as they are encountered:
@table @code
-@itemx (*ACCEPT)
+@item (*ACCEPT)
This verb causes the match to end successfully, skipping the remainder
of the pattern. When inside a recursion, only the innermost pattern is
@@ -2317,7 +2317,7 @@
This matches @samp{AB}, @samp{AAD}, or @samp{ACD}, but when it matches
@samp{AB}, no data is captured.
-@itemx (*FAIL) @r{or} (*F)
+@item (*FAIL) @r{or} (*F)
This verb causes the match to fail, forcing backtracking to occur. It
is equivalent to @samp{(?!)} but easier to read. It is not clear
@@ -2334,7 +2334,7 @@
occurs.
@table @code
-@itemx (*COMMIT)
+@item (*COMMIT)
This verb causes the whole match to fail outright if the rest of the
pattern does not match. Even if the pattern is unanchored, no further
@@ -2350,7 +2350,7 @@
This matches @samp{xxaab} but not @samp{aacaab}. It can be thought of
as a kind of dynamic anchor, or ``I've started, so I must finish.''
-@itemx (*PRUNE)
+@item (*PRUNE)
This verb causes the match to fail at the current position if the rest
of the pattern does not match. If the pattern is unanchored, the
@@ -2363,7 +2363,7 @@
are some uses of @code{(*PRUNE)} that cannot be expressed in any other
way.
-@itemx (*SKIP)
+@item (*SKIP)
This verb is like @code{(*PRUNE)}, except that if the pattern is
unanchored, the "bumpalong" advance is not to the next character, but
@@ -2383,7 +2383,7 @@
attempt would start at the second character instead of skipping on to
@samp{c}.
-@itemx (*THEN)
+@item (*THEN)
This verb causes a skip to the next alternation if the rest of the
pattern does not match. That is, it cancels pending backtracking, but
patches/09-ignore-aggressive-gnu-patch.diff
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
Description: fix functional test diff_patch_drop
Old GNU patch versions were a bit aggressive and removed an empty directory,
where they should have removed only the file. Let's not rely on that and
allow the test to pass with newer GNU patch versions that behave better.
Origin: upstream, commit: f79d8215061cd57a97ecfe3bd02a7748ff605cf5
Author: Markus Wanner <markus@bluegap.ch>
--- a/test/func/diff_patch_drop/__driver__.lua
+++ b/test/func/diff_patch_drop/__driver__.lua
@@ -32,9 +32,10 @@
check({"patch", "-p0", "-E"}, 0, false, false, true)
check(not exists("dir/file"))
else
- -- GNU patch should only remove the file
- -- but it is a little aggressive and removes the dir too!
check({"patch", "-p0"}, 0, false, false, true)
check(not exists("dir/file"))
- check(not exists("dir"))
+
+ -- GNU patch should only remove the file but older versions may be a
+ -- little aggressive and remove the dir too! We test monotone, here,
+ -- so we shouldn't care whether or not "dir" still exists.
end
patches/10-mtn-ignore-syntax-error-test.diff
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
Author: Francis Russell
Bug-Debian: http://bugs.debian.org/665448
Description: The test 'syntax_errors_in_.mtn-ignore' from the monotone
test suite contains a .mtn-ignore file which contains a number of
regular expressions. Some of these are intended to match and fail to
match the names of files created by the test harness. The rest have
invalid syntax and should be ignored.
.
One regex, '(?<=\C)' is presumably intended to be invalid, but with
the most recent version of pcre3 matches most files and therefore
causes the test to fail. In fact, it appears to be a valid regex that
performs a positive look behind to match a single data unit (usually a
byte, even in UTF mode). This patch removes the problematic regex until
the issue can be addressed upstream.
Index: monotone-1.0/test/func/syntax_errors_in_.mtn-ignore/mtn-ignore
===================================================================
--- monotone-1.0.orig/test/func/syntax_errors_in_.mtn-ignore/mtn-ignore2011-03-26 06:41:05.000000000 +0000
+++ monotone-1.0/test/func/syntax_errors_in_.mtn-ignore/mtn-ignore2012-03-25 20:02:37.695875219 +0100
@@ -21,7 +21,6 @@
[[:fnord:]]
\\x{123456}
(?(0))
-(?<=\C)
\l
(?C256)
(?C1
patches/series
1
2
3
4
5
6
7
8
9
10
11
121
132
00-db-extension-bash-completion.diff
01-format-security.diff
02-file_handle.diff
03-url_escaping.diff
04-botan-1.10-adaption.diff
05-hurd-compilation-fix.diff
06-broken-dns-work-around.diff
07-support-boost-1.53.diff
08-texinfo-fix.diff
09-ignore-aggressive-gnu-patch.diff
10-mtn-ignore-syntax-error-test.diff
11-no-gettext-on-lua.diff
90-stacktrace-on-crash.diff

Archive Download the corresponding diff file

Branches

Tags

Quick Links:     www.monotone.ca    -     Downloads    -     Documentation    -     Wiki    -     Code Forge    -     Build Status