OpenPKG CVS Repository
http://cvs.openpkg.org/
____________________________________________________________________________
Server: cvs.openpkg.org Name: Ralf S. Engelschall
Root: /v/openpkg/cvs Email: [EMAIL PROTECTED]
Module: openpkg-src Date: 22-Apr-2008 08:20:24
Branch: HEAD Handle: 2008042207202300
Modified files:
openpkg-src/monotone monotone.patch monotone.spec
Log:
one more upstream fix
Summary:
Revision Changes Path
1.19 +42 -0 openpkg-src/monotone/monotone.patch
1.36 +1 -1 openpkg-src/monotone/monotone.spec
____________________________________________________________________________
patch -p0 <<'@@ .'
Index: openpkg-src/monotone/monotone.patch
============================================================================
$ cvs diff -u -r1.18 -r1.19 monotone.patch
--- openpkg-src/monotone/monotone.patch 17 Apr 2008 05:59:42 -0000
1.18
+++ openpkg-src/monotone/monotone.patch 22 Apr 2008 06:20:23 -0000
1.19
@@ -164,3 +164,45 @@
renames.insert(make_pair(src, dpath));
+-----------------------------------------------------------------------------
+
+Upstream fix:
+
+If a key clash occurs on a netsync operation, i.e. two different
+keys with the same key id are encountered, mtn now fails cleanly
+and provides further guidance how to proceed.
+
+Index: netsync.cc
+--- netsync.cc 255ab2fc2c3ca94f0686014fea03035ba7649bdf
++++ netsync.cc 0be25c91e1a814bcb2070386e43d05297f51a1e6
+@@ -1335,9 +1335,28 @@ session::process_hello_cmd(rsa_keypair_i
+ % printable_key_hash);
+ project.db.set_var(their_key_key, printable_key_hash);
+ }
+- if (project.db.put_key(their_keyname, their_key))
+- W(F("saving public key for %s to database") % their_keyname);
+
++ if (project.db.public_key_exists(their_keyname))
++ {
++ rsa_pub_key tmp;
++ project.db.get_key(their_keyname, tmp);
++
++ E(keys_match(their_keyname, tmp, their_keyname, their_key),
++ F("the server sent a key with the key id '%s'\n"
++ "which is already in use in your database. you may want to
execute\n"
++ " %s dropkey %s\n"
++ "on your local database before you run this command again,\n"
++ "assumed that your local key has NOT a private counterpart.")
++ % their_keyname % ui.prog_name % their_keyname);
++ }
++ else
++ {
++ // this should now always return true since we just checked
++ // for the existance of this particular key
++ I(project.db.put_key(their_keyname, their_key));
++ W(F("saving public key for %s to database") % their_keyname);
++ }
++
+ {
+ hexenc<id> hnonce;
+ encode_hexenc(nonce, hnonce);
@@ .
patch -p0 <<'@@ .'
Index: openpkg-src/monotone/monotone.spec
============================================================================
$ cvs diff -u -r1.35 -r1.36 monotone.spec
--- openpkg-src/monotone/monotone.spec 17 Apr 2008 05:59:42 -0000
1.35
+++ openpkg-src/monotone/monotone.spec 22 Apr 2008 06:20:23 -0000
1.36
@@ -32,7 +32,7 @@
Group: SCM
License: GPL
Version: 0.40
-Release: 20080417
+Release: 20080422
# package options
%option with_rse yes
@@ .
______________________________________________________________________
OpenPKG http://openpkg.org
CVS Repository Commit List [email protected]