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:   14-Apr-2008 20:26:48
  Branch: HEAD                             Handle: 2008041419264700

  Added files:
    openpkg-src/monotone    monotone.patch
  Modified files:
    openpkg-src/monotone    monotone.spec

  Log:
    apply an upstream vendor patch to fix the SSH-agent use on commit
    operations

  Summary:
    Revision    Changes     Path
    1.16        +38 -0      openpkg-src/monotone/monotone.patch
    1.34        +3  -1      openpkg-src/monotone/monotone.spec
  ____________________________________________________________________________

  patch -p0 <<'@@ .'
  Index: openpkg-src/monotone/monotone.patch
  ============================================================================
  $ cvs diff -u -r0 -r1.16 monotone.patch
  --- /dev/null 2008-04-14 20:26:45 +0200
  +++ monotone.patch    2008-04-14 20:26:48 +0200
  @@ -0,0 +1,38 @@
  +Upstream fix for committing via SSH-agent.
  +
  +Index: key_store.cc
  +--- key_store.cc     55878f97b03349c66d95398799780f43ae63165b
  ++++ key_store.cc     1c879bc94af0a672b7077245d755f660890ec043
  +@@ -438,6 +438,32 @@ key_store::cache_decrypted_key(const rsa
  + key_store::cache_decrypted_key(const rsa_keypair_id & id)
  + {
  +   signing_key = id;
  ++
  ++  //grab the monotone public key as an RSA_PublicKey
  ++  keypair key;
  ++  get_key_pair(id, key);
  ++  SecureVector<Botan::byte> pub_block;
  ++  pub_block.set(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));
  ++  shared_ptr<RSA_PublicKey> pub_key = 
shared_dynamic_cast<RSA_PublicKey>(x509_key);
  ++
  ++  if (!pub_key)
  ++    throw informative_failure("Failed to get monotone RSA public key");
  ++  
  ++  ssh_agent & agent = s->get_agent();
  ++  vector<RSA_PublicKey> ssh_keys = agent.get_keys();
  ++  for (vector<RSA_PublicKey>::const_iterator
  ++         si = ssh_keys.begin(); si != ssh_keys.end(); ++si) {
  ++    if ((*pub_key).get_e() == (*si).get_e()
  ++        && (*pub_key).get_n() == (*si).get_n()) {
  ++      L(FL("ssh-agent has key loaded, skipping internal cache"));
  ++      return;
  ++    }
  ++  }
  ++
  +   if (s->lua.hook_persist_phrase_ok())
  +     s->decrypt_private_key(id);
  + }
  @@ .
  patch -p0 <<'@@ .'
  Index: openpkg-src/monotone/monotone.spec
  ============================================================================
  $ cvs diff -u -r1.33 -r1.34 monotone.spec
  --- openpkg-src/monotone/monotone.spec        11 Apr 2008 20:24:40 -0000      
1.33
  +++ openpkg-src/monotone/monotone.spec        14 Apr 2008 18:26:47 -0000      
1.34
  @@ -32,7 +32,7 @@
   Group:        SCM
   License:      GPL
   Version:      0.40
  -Release:      20080411
  +Release:      20080414
   
   #   package options
   %option       with_rse  yes
  @@ -44,6 +44,7 @@
   Source4:      monotone-colorize.pl
   Source5:      monotone-colorize.bashrc
   Source6:      monotone.bashrc
  +Patch0:       monotone.patch
   Patch1:       monotone.patch.rse
   
   #   build information
  @@ -76,6 +77,7 @@
   
   %prep
       %setup -q
  +    %patch -p0 -P 0
   %if "%{with_rse}" == "yes"
       %patch -p0 -P 1
   %endif
  @@ .
______________________________________________________________________
OpenPKG                                             http://openpkg.org
CVS Repository Commit List                     [email protected]

Reply via email to