summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Volkov <pva@gentoo.org>2011-09-11 11:26:01 +0000
committerPeter Volkov <pva@gentoo.org>2011-09-11 11:26:01 +0000
commit6a936ba4962485ebf312babc10acc36bd6f700bc (patch)
treea2e605739d9558f61ee56ced2558ad6c05ce2b47 /dev-vcs
parentalpha/ia64/sparc stable wrt #379549 (diff)
downloadhistorical-6a936ba4962485ebf312babc10acc36bd6f700bc.tar.gz
historical-6a936ba4962485ebf312babc10acc36bd6f700bc.tar.bz2
historical-6a936ba4962485ebf312babc10acc36bd6f700bc.zip
Fix bash-completion test. Drop emacs USE flag (bug #382177); fix bash-completion installation (bug #382191), fix build issue with >botan-1.10 (bug #380257), thank Martin von Gagern for all this reports and fixes.
Package-Manager: portage-2.1.10.11/cvs/Linux x86_64
Diffstat (limited to 'dev-vcs')
-rw-r--r--dev-vcs/monotone/ChangeLog11
-rw-r--r--dev-vcs/monotone/Manifest7
-rw-r--r--dev-vcs/monotone/files/monotone-1.0-bash-completion-tests.patch18
-rw-r--r--dev-vcs/monotone/files/monotone-1.0-botan-1.10.patch412
-rw-r--r--dev-vcs/monotone/monotone-1.0-r1.ebuild113
-rw-r--r--dev-vcs/monotone/monotone-1.0.ebuild16
6 files changed, 566 insertions, 11 deletions
diff --git a/dev-vcs/monotone/ChangeLog b/dev-vcs/monotone/ChangeLog
index 2a76ec535104..c8134c227579 100644
--- a/dev-vcs/monotone/ChangeLog
+++ b/dev-vcs/monotone/ChangeLog
@@ -1,6 +1,15 @@
# ChangeLog for dev-vcs/monotone
# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-vcs/monotone/ChangeLog,v 1.18 2011/09/05 13:33:03 pva Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-vcs/monotone/ChangeLog,v 1.19 2011/09/11 11:26:01 pva Exp $
+
+*monotone-1.0-r1 (11 Sep 2011)
+
+ 11 Sep 2011; Peter Volkov <pva@gentoo.org> monotone-1.0.ebuild,
+ +monotone-1.0-r1.ebuild, +files/monotone-1.0-bash-completion-tests.patch,
+ +files/monotone-1.0-botan-1.10.patch:
+ Fix bash-completion test. Drop emacs USE flag (bug #382177); fix
+ bash-completion installation (bug #382191), fix build issue with >botan-1.10
+ (bug #380257), thank Martin von Gagern for all this reports and fixes.
*monotone-1.0 (05 Sep 2011)
diff --git a/dev-vcs/monotone/Manifest b/dev-vcs/monotone/Manifest
index 4f17ca17bad9..f6f56d2a3a11 100644
--- a/dev-vcs/monotone/Manifest
+++ b/dev-vcs/monotone/Manifest
@@ -1,12 +1,15 @@
AUX 50monotone-gentoo.el 1217 RMD160 82532c08ab1409fe2a9a643baf0f769841f39db2 SHA1 ccdd819dd1e497a5dd546df3b898a8f3efce2e45 SHA256 bfd32a5f57abd47bd6bc35ce27c2a31dfd1c1f7517d869fc0bca6b715d8ea259
AUX hooks.lua 154 RMD160 0297c570bafe350a4160a46351c00f46ea4fc1ef SHA1 f31bdd8d567639b2aa427e98b2df47351a8e1237 SHA256 55e17360a14ccf70d2da5b3e3ad038b1021c30f4be5c69029f50bd1ec8cbf326
AUX monotone-0.36.initd 2431 RMD160 bfa9672644eb07cbdfc2a03f7e20c557f2b5cc97 SHA1 448eea7bf3bdf14c85ce01d7197d04cfacedd89d SHA256 361cd19633a64f6b037b98ac50a2622d8856ff2dffb89c0b11b45660ba43bdb6
+AUX monotone-1.0-bash-completion-tests.patch 760 RMD160 71fb25614ca3e7fc2afcc15291ab9a39af6fa859 SHA1 59f6ed8b405fdc11068d97279397644272293eca SHA256 bd5f78ccc627ab7f58d4b628c8bfbbaffe07e7ba8f5434d3ec823e8922aba401
+AUX monotone-1.0-botan-1.10.patch 16771 RMD160 4403fbf7ca9e40aaab150db5e90747dd828dc957 SHA1 8d6b89d015be32418b96c58a8e0a2122a28b88e0 SHA256 79ae0d0925138d0f84fa0af4b4f8d3464f5791a4cba97f7c21ea435301d336e9
AUX monotone.confd 803 RMD160 507ee4058e6f8197bd0b7a25f1115ec42ae226ec SHA1 1887e76fd00585344e614c3392527866bb94614c SHA256 4e266a08108441438fb4b3ac40216e731378d378593807b0826f58446c346e5b
AUX read-permissions 192 RMD160 de9f340da2e143f306b7cf37584d7b43b100c06b SHA1 b83336348987f9c6f9a46f0191adf9fa87d1b83c SHA256 4f93a644b2f16d6ea5c4d28e3039dfddd7f8e38ca1b8d54389094be751fbfa7c
AUX write-permissions 32 RMD160 164bc129fb3cdb2314d7ec96d23a9fc6f0e856a3 SHA1 0b48801914336a5a3baebf79725be81b52d279f4 SHA256 ddd40fac5d6fe98d9f58c4731a500eb1350a42ae7ca0ddaa40eaa3bbeb99026c
DIST monotone-0.99.1.tar.gz 4940291 RMD160 c0db85af8b584e375ca992b3384bd8a38d5b380e SHA1 e74ba571b358f6b76370f882d15ddbd1edd9f37e SHA256 204ebb12f36599ac4c105ae5bf45edd7da13a4e57dc45f31789634fc8c2b30a1
DIST monotone-1.0.tar.bz2 3588074 RMD160 4c0813ae0c11f271dc88f42dd8814e474a67e988 SHA1 aac556bb26d92910b74b65450a0be6c5045e2052 SHA256 5c530bc4652b2c08b5291659f0c130618a14780f075f981e947952dcaefc31dc
EBUILD monotone-0.99.1.ebuild 3288 RMD160 53d5667793dc8f63d4ca35d858a3f59bca25026a SHA1 94f10eb61ef62422053e18c91f5a43c6a2424de4 SHA256 fba553e9fbe3020e8cad865e257c937bd66f014036f6849604ade3ba431a606c
-EBUILD monotone-1.0.ebuild 3554 RMD160 cce85f217d4f76393614a8bdc72f3822df82cc6d SHA1 0d2d8bae4f3da87f3565724521762d29e3816e63 SHA256 67f9f378e7b9dce6d340a7802386124451832162e6c05175bc090e78e580532a
-MISC ChangeLog 13859 RMD160 aabe625b79fa5413a0d85840d2e619a11450a7a8 SHA1 6c64b2b059f1a48ddff75bfdea3878917ee4d337 SHA256 48720546d48144727c6d56740c0a29281662f53426128647f472381a3e26212c
+EBUILD monotone-1.0-r1.ebuild 3281 RMD160 adbf36fa6a9292a46b36b1178e13a61c8c1fcec5 SHA1 8312899d05486730c4a6afdb7119d8a11e5281f7 SHA256 12162abae54c4a898685dea4570d9d216334192bf32e8c16046317a2c3eb4c46
+EBUILD monotone-1.0.ebuild 3586 RMD160 8ba3b32ce4e7f85f19d69b6179426878645aebcb SHA1 e6e9551ef245cffbbe50edfa166c616b11c80895 SHA256 8eaf5d57c154b3ea7c60a81957fb12c5166841e2f51a93c759d1d72563f23023
+MISC ChangeLog 14293 RMD160 831617f4bd1efca7ff4b184884dd5e7ccb895c71 SHA1 7722eb481615db866333324636de469066762a9c SHA256 8bc64da17a95bbd812aea878bb51a256fd632a86072aa4d948cc364dbeab296f
MISC metadata.xml 1012 RMD160 8ab75164d1a500d0a4e20e6b1054c3bd9256a7a2 SHA1 27985c7fa4c9cf22a8487aa1e05355d2b6e6cbe6 SHA256 6ab175d43a137dd1660ff85f9e7a9604dd3f319630b77230f054e7072010e419
diff --git a/dev-vcs/monotone/files/monotone-1.0-bash-completion-tests.patch b/dev-vcs/monotone/files/monotone-1.0-bash-completion-tests.patch
new file mode 100644
index 000000000000..5b877d4d31cd
--- /dev/null
+++ b/dev-vcs/monotone/files/monotone-1.0-bash-completion-tests.patch
@@ -0,0 +1,18 @@
+https://code.monotone.ca/p/monotone/issues/180/
+--- test/extra/bash_completion/bashrc 2011-09-07 09:00:12 +0000
++++ test/extra/bash_completion/bashrc 2011-09-07 12:14:59 +0000
+@@ -18,6 +18,13 @@
+ . /etc/bash_completion
+ elif [ -f /usr/local/etc/bash_completion ]; then
+ . /usr/local/etc/bash_completion
++ elif [ -f /usr/share/bash-completion/.pre -a \
++ -f /usr/share/bash-completion/base ]; then
++ # In Gentoo /etc/profile.d/bash-completion.sh sources required
++ # functions only if enabled with `eselect bashcomp`. We source
++ # required definitions manually.
++ source /usr/share/bash-completion/.pre
++ source /usr/share/bash-completion/base
+ else
+ echo No bash completion package present.
+ exit
+
diff --git a/dev-vcs/monotone/files/monotone-1.0-botan-1.10.patch b/dev-vcs/monotone/files/monotone-1.0-botan-1.10.patch
new file mode 100644
index 000000000000..daf73ca833a8
--- /dev/null
+++ b/dev-vcs/monotone/files/monotone-1.0-botan-1.10.patch
@@ -0,0 +1,412 @@
+by Martin von Gagern:
+https://code.monotone.ca/p/monotone/issues/182/
+
+============================================================
+--- src/database.cc 4c259f963c440fc95564dfec99b2f832f0bad643
++++ src/database.cc 87efeeff2d3263ba98af684a4022f1897434ed2d
+@@ -3425,9 +3425,8 @@ database::encrypt_rsa(key_id const & pub
+ 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 @@ database::check_signature(key_id const &
+ 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));
+============================================================
+--- src/gzip.cc e7c19bee910e3d421fd073933810ec52092b1d9b
++++ src/gzip.cc bab290412cff6031b2d3bf9d1439a08499d39640
+@@ -137,7 +137,7 @@ void Gzip_Compression::start_msg()
+ /*************************************************
+ * 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;
+@@ -267,7 +267,7 @@ void Gzip_Decompression::start_msg()
+ /*************************************************
+ * 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;
+
+@@ -284,8 +284,8 @@ void Gzip_Decompression::write(const byt
+ // 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--;
+@@ -346,8 +346,14 @@ u32bit Gzip_Decompression::eat_footer(co
+ 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)
+ {
+@@ -377,7 +383,12 @@ void Gzip_Decompression::check_footer()
+ 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");
+
+@@ -412,7 +423,11 @@ void Gzip_Decompression::clear()
+ 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;
+ }
+============================================================
+--- src/gzip.hh 649dfc0b250954f39c0f73870f8bec3f32f7fa43
++++ src/gzip.hh f462dfc1df71ae1e9a8203606fd29d9e0eda9b2a
+@@ -7,6 +7,7 @@
+ #ifndef BOTAN_EXT_GZIP_H__
+ #define BOTAN_EXT_GZIP_H__
+
++#include <botan/version.h>
+ #include <botan/filter.h>
+ #include <botan/pipe.h>
+
+@@ -30,13 +31,19 @@ namespace GZIP {
+
+ }
+
++#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 +67,7 @@ class Gzip_Decompression : public Filter
+ 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"; }
+============================================================
+--- src/key_packet.cc d1306df89dd684badac02c03744cd446381c07d3
++++ src/key_packet.cc c97262d161b23c9640972188979669b3e95afe7b
+@@ -106,8 +106,8 @@ namespace
+ 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);
+============================================================
+--- src/key_store.cc 64c4c4bed1fadc26b51207b9f61343f9dd7d3c6e
++++ src/key_store.cc 1b1f1a989c21ee0dc69c540783ffb1fe4bceabf5
+@@ -572,13 +572,19 @@ key_store_state::decrypt_private_key(key
+ 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)
++#else
+ catch (Botan::Exception & e)
++#endif
+ {
+ L(FL("failed to load key with no passphrase: %s") % e.what());
+
+@@ -856,9 +862,9 @@ key_store::make_signature(database & db,
+ {
+ 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 +1037,14 @@ key_store_state::migrate_old_key_pair
+ 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));
+
+============================================================
+--- src/monotone.cc a25ecdd170a601db798b63a60add7681609a34c4
++++ src/monotone.cc 2c5f57762bc687a90f75e732f39d2181fc50bd6d
+@@ -170,11 +170,16 @@ cpp_main(int argc, char ** argv)
+ // 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
++#elif BOTAN_VERSION_CODE < BOTAN_VERSION_CODE_FOR(1,9,11)
+ 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"));
++#else
++ E(linked_botan_version > BOTAN_VERSION_CODE_FOR(1,9,11), origin::system,
++ F("this monotone binary requires Botan 1.9.11 or newer"));
++ E(linked_botan_version < BOTAN_VERSION_CODE_FOR(1,11,0), origin::system,
++ F("this monotone binary does not work with Botan 1.11.x"));
+ #endif
+
+ app_state app;
+============================================================
+--- src/packet.cc f61360ed2524fdf53411bd24d022a2a3c9e6e9c7
++++ src/packet.cc 6f6739c4756933843a2d865dc6790de9013626b7
+@@ -156,8 +156,8 @@ namespace
+ 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 @@ namespace
+ 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 @@ namespace
+ }
+ // 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,8 +466,14 @@ read_packets(istream & in, packet_consum
+ return count;
+ }
+
++#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();
++}
++#endif
+
+-
+ // Local Variables:
+ // mode: C++
+ // fill-column: 76
+============================================================
+--- src/packet.hh 0a224e6e92f244e2c3e9a5cdb935eb8613d7e85b
++++ src/packet.hh 6c7d90e0bd9abe1e2e97da8ed40808fe438ea34b
+@@ -84,8 +84,26 @@ size_t read_packets(std::istream & in, p
+
+ size_t read_packets(std::istream & in, packet_consumer & cons);
+
++#if BOTAN_VERSION_CODE >= BOTAN_VERSION_CODE_FOR(1,9,11)
++// work around botan commit 2d09d7d0cd4bd0e7155d001dd65a4f29103b158c
++#include <botan/ui.h>
++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;
++};
++class Passphrase_Required : public Botan::Exception {
++public:
++ Passphrase_Required(const std::string& m = "Passphrase required") :
++ Botan::Exception(m)
++ {}
++};
+ #endif
+
++#endif
++
+ // Local Variables:
+ // mode: C++
+ // fill-column: 76
+============================================================
+--- src/sha1.cc 5e1aa972d7c7d66e06320b039989652b830dcd75
++++ src/sha1.cc 42e48b22fd88b25e0d38d4f91e1f13f8a83c7120
+@@ -50,9 +50,12 @@ CMD_HIDDEN(benchmark_sha1, "benchmark_sh
+ Botan::Default_Benchmark_Timer timer;
+ std::map<std::string, double> results =
+ Botan::algorithm_benchmark("SHA-1", milliseconds, timer, rng, af);
++#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", milliseconds, rng, af);
++ Botan::algorithm_benchmark("SHA-1", af, rng, milliseconds, 16);
+ #endif
+
+ for(std::map<std::string, double>::const_iterator i = results.begin();
+============================================================
+--- src/ssh_agent.cc 6d188e7012a0b82f782563b09bbd7adf3f70cf75
++++ src/ssh_agent.cc 4a0dcab873559e934e41c5f220b5434d35600d9b
+@@ -385,9 +385,9 @@ ssh_agent::has_key(const keypair & key)
+ 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));
+============================================================
+--- src/transforms.cc cdfb6854ef4992faba21074145f3c8269b845b11
++++ src/transforms.cc 789e01bbff42020d04d8dba8f6b97588fbe4ca3d
+@@ -53,10 +53,10 @@ using Botan::Hash_Filter;
+ // 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)
+@@ -107,7 +107,7 @@ error_in_transform(Botan::Exception & e,
+ 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 +173,7 @@ template<> string xform<Botan::Hex_Decod
+ {
+ 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 +219,7 @@ void pack(T const & in, base64< gzip<T>
+ 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 +237,7 @@ void unpack(base64< gzip<T> > const & in
+ 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 +264,7 @@ calculate_ident(data const & dat,
+ 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);
diff --git a/dev-vcs/monotone/monotone-1.0-r1.ebuild b/dev-vcs/monotone/monotone-1.0-r1.ebuild
new file mode 100644
index 000000000000..b9fb55286580
--- /dev/null
+++ b/dev-vcs/monotone/monotone-1.0-r1.ebuild
@@ -0,0 +1,113 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-vcs/monotone/monotone-1.0-r1.ebuild,v 1.1 2011/09/11 11:26:01 pva Exp $
+
+# QA failiures reported in https://code.monotone.ca/p/monotone/issues/181/
+EAPI="4"
+inherit bash-completion-r1 elisp-common eutils toolchain-funcs
+
+DESCRIPTION="Monotone Distributed Version Control System"
+HOMEPAGE="http://monotone.ca"
+SRC_URI="http://monotone.ca/downloads/${PV}/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="1"
+KEYWORDS="~amd64 ~ia64 ~x86"
+IUSE="doc ipv6 nls test"
+
+RDEPEND="sys-libs/zlib
+ >=dev-libs/libpcre-7.6
+ >=dev-libs/botan-1.8.0
+ >=dev-db/sqlite-3.3.8
+ >=dev-lang/lua-5.1
+ net-dns/libidn"
+DEPEND="${RDEPEND}
+ >=dev-libs/boost-1.33.1
+ nls? ( >=sys-devel/gettext-0.11.5 )
+ doc? ( sys-apps/texinfo )
+ test? ( dev-tcltk/expect
+ app-shells/bash-completion )"
+
+pkg_setup() {
+ enewgroup monotone
+ enewuser monotone -1 -1 /var/lib/monotone monotone
+}
+
+src_prepare() {
+ if [[ $(gcc-major-version) -lt "3" ||
+ ( $(gcc-major-version) -eq "3" && $(gcc-minor-version) -le 3 ) ]]; then
+ die 'requires >=gcc-3.4'
+ fi
+ epatch "${FILESDIR}/monotone-1.0-bash-completion-tests.patch"
+ epatch "${FILESDIR}/monotone-1.0-botan-1.10.patch"
+}
+
+src_configure() {
+ econf \
+ $(use_enable nls) \
+ $(use_enable ipv6)
+}
+
+src_compile() {
+ emake
+ use doc && emake html
+}
+
+src_test() {
+ # Disables netsync_bind_opt test
+ # https://code.monotone.ca/p/monotone/issues/179/
+ export DISABLE_NETWORK_TESTS=true
+ if [[ ${UID} != 0 ]]; then
+ emake check
+ else
+ ewarn "Tests will fail if ran as root, skipping."
+ fi
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+
+ mv "${ED}"/usr/share/doc/${PN} "${ED}"/usr/share/doc/${PF} || die
+
+ rm "${ED}"/etc/bash_completion.d/monotone.bash_completion || die
+ newbashcomp extra/shell/monotone.bash_completion ${PN}
+
+ if use doc; then
+ dohtml -r html/*
+ dohtml -r figures
+ fi
+
+ dodoc AUTHORS NEWS README* UPGRADE
+ docinto contrib
+ docompress -x /usr/share/doc/${PF}/contrib
+ dodoc -r contrib
+ newconfd "${FILESDIR}"/monotone.confd monotone
+ newinitd "${FILESDIR}"/${PN}-0.36.initd monotone
+
+ insinto /etc/monotone
+ newins "${FILESDIR}"/hooks.lua hooks.lua
+ newins "${FILESDIR}"/read-permissions read-permissions
+ newins "${FILESDIR}"/write-permissions write-permissions
+
+ keepdir /var/lib/monotone/keys/ /var/{log,run}/monotone
+ fowners monotone:monotone /var/lib/monotone{,/keys} /var/{log,run}/monotone
+}
+
+pkg_postinst() {
+ elog
+ elog "For details and instructions to upgrade from previous versions,"
+ elog "please read /usr/share/doc/${PF}/UPGRADE.bz2"
+ elog
+ elog " 1. edit /etc/conf.d/monotone"
+ elog " 2. import the first keys to enable access with"
+ elog " env HOME=\${homedir} mtn pubkey me@example.net | /etc/init.d/monotone import"
+ elog " Thereafter, those with write permission can add other keys via"
+ elog " netsync with 'monotone push --key-to-push=IDENT' and then IDENT"
+ elog " can be used in the read-permission and write-permission files."
+ elog " 3. adjust permisions in /etc/monotone/read-permissions"
+ elog " and /etc/monotone/write-permissions"
+ elog " 4. start the daemon: /etc/init.d/monotone start"
+ elog " 5. make persistent: rc-update add monotone default"
+ elog
+}
+
diff --git a/dev-vcs/monotone/monotone-1.0.ebuild b/dev-vcs/monotone/monotone-1.0.ebuild
index 2df5564d61b7..efb9704b67eb 100644
--- a/dev-vcs/monotone/monotone-1.0.ebuild
+++ b/dev-vcs/monotone/monotone-1.0.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-vcs/monotone/monotone-1.0.ebuild,v 1.1 2011/09/05 13:33:03 pva Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-vcs/monotone/monotone-1.0.ebuild,v 1.2 2011/09/11 11:26:01 pva Exp $
# QA failiures reported in https://code.monotone.ca/p/monotone/issues/181/
EAPI="4"
@@ -13,7 +13,7 @@ SRC_URI="http://monotone.ca/downloads/${PV}/${P}.tar.bz2"
LICENSE="GPL-2"
SLOT="1"
KEYWORDS="~amd64 ~ia64 ~x86"
-IUSE="doc emacs ipv6 nls"
+IUSE="doc emacs ipv6 nls test"
RDEPEND="sys-libs/zlib
emacs? ( virtual/emacs )
@@ -25,7 +25,9 @@ RDEPEND="sys-libs/zlib
DEPEND="${RDEPEND}
>=dev-libs/boost-1.33.1
nls? ( >=sys-devel/gettext-0.11.5 )
- doc? ( sys-apps/texinfo )"
+ doc? ( sys-apps/texinfo )
+ test? ( dev-tcltk/expect
+ app-shells/bash-completion )"
pkg_setup() {
enewgroup monotone
@@ -37,6 +39,8 @@ src_prepare() {
( $(gcc-major-version) -eq "3" && $(gcc-minor-version) -le 3 ) ]]; then
die 'requires >=gcc-3.4'
fi
+ epatch "${FILESDIR}/monotone-1.0-bash-completion-tests.patch"
+ epatch "${FILESDIR}/monotone-1.0-botan-1.10.patch"
}
src_configure() {
@@ -60,14 +64,10 @@ src_test() {
# Disables netsync_bind_opt test
# https://code.monotone.ca/p/monotone/issues/179/
export DISABLE_NETWORK_TESTS=true
- # bash_completion test fails too. Expected thus disab
- # https://code.monotone.ca/p/monotone/issues/180/
- rm test/extra/bash_completion/ -rf
if [[ ${UID} != 0 ]]; then
emake check
else
- # Tests fail if run as root
- su portage emake check
+ ewarn "Tests will fail if ran as root, skipping."
fi
}