summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJose Quinteiro <gentoo@quinteiro.org>2013-04-13 17:10:10 -0700
committerJose Quinteiro <gentoo@quinteiro.org>2013-04-13 17:10:10 -0700
commit1824f24891c8cf909c5488e8ee461ad44c131c7a (patch)
tree9110834fcd58aa5fd769cdbd12f8e09edd96ba24
parentAdd an ebuild for nvidia-drivers-96.43.23 that will build with kernel 3.7.* (diff)
downloadJoseQ-1824f24891c8cf909c5488e8ee461ad44c131c7a.tar.gz
JoseQ-1824f24891c8cf909c5488e8ee461ad44c131c7a.tar.bz2
JoseQ-1824f24891c8cf909c5488e8ee461ad44c131c7a.zip
Add support for PolarSSL 1.2.x
Fix from upstream https://github.com/fatbob313/umurmur/commit/5ae05ac
-rw-r--r--media-sound/umurmur/Manifest2
-rw-r--r--media-sound/umurmur/files/umurmur-0.2.10-Add-support-for-PolarSSL-1.2.x.patch91
-rw-r--r--media-sound/umurmur/umurmur-0.2.10-r2.ebuild77
3 files changed, 170 insertions, 0 deletions
diff --git a/media-sound/umurmur/Manifest b/media-sound/umurmur/Manifest
index ff9b583..396f386 100644
--- a/media-sound/umurmur/Manifest
+++ b/media-sound/umurmur/Manifest
@@ -1,4 +1,5 @@
AUX Fix-handling-of-long-cipherstrings-lists-with-OpenSSL.patch 1938 SHA256 b154c0edc9c3900876251ce305c6f6a08adfceccdc73e6ea48bde388a6476ea9 SHA512 7fc7f583d6e12afc262c055dfda92c5e81cefe03c157d7d9f99b647cd43f42ad8e277553dda70953e8965e0529c2a4af78bc9755c4bc5467ed3dd6496c1ce118 WHIRLPOOL afa6272742bc7acd7b0e3a8a6502af916efe78bd65e363ef771826355a37da4ac059b74a22fc0359cd62716190f588b077a66bc9468619c3c74c0d058cba3d33
+AUX umurmur-0.2.10-Add-support-for-PolarSSL-1.2.x.patch 2131 SHA256 b17e5bfc6e7d6600c1afce3605a32825645f4d84dd592ba3c844139a299f6ac3 SHA512 1df10e00af75a3d79eaa499f5833d2b845dee34d09aedb30418be8726c754960565ab78628d1711ed7f03728c15851d90b3ce675ad2d1c74ed5dc3c849ea23e1 WHIRLPOOL 9d09f479667cbe431a780898b081812860cbcb81cd9099625a5a16456e224f6aaaf08eb09dd569b585cdfa1b3648caa807efafdee556827d21483b331bc12587
AUX umurmur-0.2.8-polarssl-1.1.1.patch 1766 SHA256 8d0ee47be178a04c2cbc43ead2e8cb789e69b5958ddd81208eea5c79d2ce971c SHA512 d87d5356bec2393c2eb84e93e56ffe16d5bc5606a0dc30833592f245239bdec7c0ed8a8f71c1fc348b0db6ab21e45be2df37e32752f1833615bef646e7370a4b WHIRLPOOL 2c20dea45ab5395b249fe81e3ac8977367d736fa782b7f4469cb8d9bb76429b0fbc0fce224214e6c20e3abd663465b67b36098fb9683fef513fdf23098c0ccbf
AUX umurmur.conf 1639 SHA256 32ee6824594e16e5f20c8b08923a517063a54cbdf5116caa6f76f4098be97442 SHA512 0a5882dca2daf686716d7b78f916e4506c7b98e3460ccd56aace087dca88b686b659e32b325bf253922cc824049a800b06e5006ea04cc5539c82b63cda5cccea WHIRLPOOL e3ee76ed340704521a612859cfbe306b4bb333e10034acbb2d21443a7ed990344d537b54d2859da5d6879c7e90dcf79e925efad0f9cc6b4ba8a14720274bfb41
AUX umurmurd.confd 185 SHA256 ed2d207e2ec5f3df61b9d28827e59513c7d3a72b891488206a59c4d7a571893e SHA512 955ac262533f6ff685f7fb5211bd8084cfb10ca6f83bebb76e04c839761e2cd82478ff09563ca76ab4457432850a910036460f12516c5c29105b1cc6090e9285 WHIRLPOOL bd98d48f1e75a3341f7def75ea9f48f1ea4c9bdc1afb2a9b89450d7c998df2fced66fed0a1e84349bb29add50c78a045e6be27939fbb4b276d8b1b26a3de76f6
@@ -6,5 +7,6 @@ AUX umurmurd.initd 475 SHA256 5e53c46069a3473eb5cb849c3dea5e4beb36b7ef742b10022b
DIST umurmur-0.2.10.tar.gz 161937 SHA256 7e4f962a04f2a683b5f855726c059c504f6b2ee09fe290a5a2468d53b7042931 SHA512 7e47e748a12a19eebdce7f49a2a75b0c50ab378c8c0f6a841582c24df25842661b248c54410433e2e9e66932cd73a04f127f9be9a9b9ffeb696494bee976f102 WHIRLPOOL bf3a20956d2330dfa056fc2447c54c3321defd9a4b0989108b6c6a4e1f9df74ad86c5fcfab097dfb10f8c128afe1e21dadb0b9eeca3db7d9c362272c842c88fa
DIST umurmur-0.2.8.tar.gz 155357 SHA256 62c43da2f07125977cf8024a0775ed697101816c3fa8f36345780901aaf08736 SHA512 e2564bf4be4a4c68c100d2b72b69fbe31733e3de11f476b76de5007fbe10d17271b2dcb6957ef00070d005a955a77138e12aa18b0fb128bab8c822f030a98388 WHIRLPOOL 674b321965a0985c66bdfc3e99e6f6bc73263cd3693311e0a738c275a95b34726363ac7747e8fa487d55f0327c140049ffdc8431e426ca04f143db699a63c5cf
EBUILD umurmur-0.2.10-r1.ebuild 2146 SHA256 17fac717033e79978c9c4ba651c1b3e0686018bacf6aa5e6134d09319a3f84e3 SHA512 fd61ac289b367efdde211b02ec70c212f13c9e37d4b5dba8ec835e275797f932f9d8e768ced0eba4548b6206938f56ec8f1e241d5e66d5fd4d67c6023bae8d87 WHIRLPOOL 8d039e708317779d0fdc325b369e38b0df4f85b9272ce4fd91eb59cc803534545e1ab6ec64557fae70fbdb2330ab429a73fab569eda0022ac5151c304ff02fd2
+EBUILD umurmur-0.2.10-r2.ebuild 2210 SHA256 9a34491dfc43f53225d29ea831fc200e0fafa120a1ef78667f6fac59e2251496 SHA512 8fc3169e65dccffb2840c29ac3e1fb2981f9667dfc2d7ad329450ff2a9e6ebed2f6446dbee27cbde06a5ab3f58fcd4e65a047d6781933a5147b5425c228e5da2 WHIRLPOOL 4702fcbb395d3ee6ebab58733c73dd2515ae414a498dd161b81b1f7b38f2dde6ca7f12d3113d7b50b41bbfb731e2fab63887c2a4ab827f0635402cbb52a6a28e
EBUILD umurmur-0.2.10.ebuild 2045 SHA256 7b85b795f51ec452554ddb1c6c2c9fb7d8da4c1fd7fabd7a6b31c23bc82b7d8c SHA512 74eef797bd74e017d5848284f5437d7876b14f559175cbf5f7e2d139637dc52130d45465f74d6af8a2f80f220f374b20cfbabbeea3889df5447fb8607b673f1d WHIRLPOOL d2a404d50e80b7c59b4110f26adb9814ed244474584215541f550ac8ab664a4287af2d51d1737c6aedcc88473fedadd8a5939e62b7e90e2c079dcadad35a116a
EBUILD umurmur-0.2.8.ebuild 2197 SHA256 bd8cf76ae3ed6511119d7e5baddb2eff9b2db2a73beff111324b3b5351a75559 SHA512 e81ac72b61dfddd23e490f9f31ac2cd89cd00b3ad4ab4ba15bc9a331927124ebb50044cd7bb0de9c80b58115b8fa3ce474671fbbce617e78f7c394811140994e WHIRLPOOL de77f761403f39a503124bc4c0505d50d2e8f376dbfcbe412d90882df8ec76c37854ca12b2198368208a51aa2a46b662e46c13d96ebd86c2c3be91f3ab670f08
diff --git a/media-sound/umurmur/files/umurmur-0.2.10-Add-support-for-PolarSSL-1.2.x.patch b/media-sound/umurmur/files/umurmur-0.2.10-Add-support-for-PolarSSL-1.2.x.patch
new file mode 100644
index 0000000..c46e13e
--- /dev/null
+++ b/media-sound/umurmur/files/umurmur-0.2.10-Add-support-for-PolarSSL-1.2.x.patch
@@ -0,0 +1,91 @@
+From 5ae05ac1f347fcbdcc73aadf52d6a56c82a50e2e Mon Sep 17 00:00:00 2001
+From: Martin Johansson <martin@fatbob.nu>
+Date: Wed, 5 Dec 2012 22:01:22 +0100
+Subject: [PATCH] Add support for PolarSSL 1.2.x
+
+---
+ src/ssl.c | 31 ++++++++++++++++++++++---------
+ src/ssl.h | 3 +++
+ 2 files changed, 25 insertions(+), 9 deletions(-)
+
+diff --git a/src/ssl.c b/src/ssl.c
+index 2204a3c..e7a53a2 100644
+--- a/src/ssl.c
++++ b/src/ssl.c
+@@ -46,20 +46,23 @@
+ #include <polarssl/ssl.h>
+ #include <polarssl/net.h>
+
++#ifdef POLARSSL_API_V1_2
++int ciphers[] =
++{
++ TLS_DHE_RSA_WITH_AES_256_CBC_SHA,
++ TLS_RSA_WITH_AES_256_CBC_SHA,
++ TLS_RSA_WITH_AES_128_CBC_SHA,
++ 0
++};
++#else
+ int ciphers[] =
+ {
+ SSL_EDH_RSA_AES_256_SHA,
+- SSL_EDH_RSA_CAMELLIA_256_SHA,
+- SSL_EDH_RSA_DES_168_SHA,
+ SSL_RSA_AES_256_SHA,
+- SSL_RSA_CAMELLIA_256_SHA,
+ SSL_RSA_AES_128_SHA,
+- SSL_RSA_CAMELLIA_128_SHA,
+- SSL_RSA_DES_168_SHA,
+- SSL_RSA_RC4_128_SHA,
+- SSL_RSA_RC4_128_MD5,
+ 0
+ };
++#endif
+ static x509_cert certificate;
+ static rsa_context key;
+ bool_t builtInTestCertificate;
+@@ -170,8 +173,13 @@ void SSLi_deinit(void)
+ /* Create SHA1 of last certificate in the peer's chain. */
+ bool_t SSLi_getSHA1Hash(SSL_handle_t *ssl, uint8_t *hash)
+ {
+- x509_cert *cert = ssl->peer_cert;
+- if (!ssl->peer_cert) {
++ x509_cert *cert;
++#ifdef POLARSSL_API_V1_2
++ cert = ssl_get_peer_cert(ssl);
++#else
++ cert = ssl->peer_cert;
++#endif
++ if (!cert) {
+ return false;
+ }
+ sha1(cert->raw.p, cert->raw.len, hash);
+@@ -207,7 +215,12 @@ SSL_handle_t *SSLi_newconnection(int *fd, bool_t *SSLready)
+ #else
+ ssl_set_ciphers(ssl, ciphers);
+ #endif
++
++#ifdef POLARSSL_API_V1_2
++ ssl_set_session(ssl, ssn);
++#else
+ ssl_set_session(ssl, 0, 0, ssn);
++#endif
+
+ ssl_set_ca_chain(ssl, &certificate, NULL, NULL);
+ ssl_set_own_cert(ssl, &certificate, &key);
+diff --git a/src/ssl.h b/src/ssl.h
+index aa719af..d155f7f 100644
+--- a/src/ssl.h
++++ b/src/ssl.h
+@@ -68,6 +68,9 @@
+ } \
+ } while (0)
+ #endif
++ #if (POLARSSL_VERSION_MINOR >= 2)
++ #define POLARSSL_API_V1_2
++ #endif
+ #endif
+ #endif
+
+--
+1.8.1.5
+
diff --git a/media-sound/umurmur/umurmur-0.2.10-r2.ebuild b/media-sound/umurmur/umurmur-0.2.10-r2.ebuild
new file mode 100644
index 0000000..0390637
--- /dev/null
+++ b/media-sound/umurmur/umurmur-0.2.10-r2.ebuild
@@ -0,0 +1,77 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+EAPI=3
+
+inherit eutils
+
+DESCRIPTION="Minimalistic Murmur (Mumble server)"
+HOMEPAGE="http://code.google.com/p/umurmur/"
+SRC_URI="http://${PN}.googlecode.com/files/${P}.tar.gz"
+
+LICENSE="BSD-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="polarssl"
+
+DEPEND="dev-libs/protobuf-c
+ dev-libs/libconfig
+ polarssl? ( >=net-libs/polarssl-1.1 )
+ !polarssl? ( dev-libs/openssl )"
+
+RDEPEND="${DEPEND}"
+
+pkg_setup() {
+ enewgroup umurmur || die
+ enewuser umurmur "" "" "" umurmur || die
+}
+
+src_prepare() {
+ epatch "${FILESDIR}/Fix-handling-of-long-cipherstrings-lists-with-OpenSSL.patch"
+ epatch "${FILESDIR}/${P}-Add-support-for-PolarSSL-1.2.x.patch"
+}
+
+src_configure() {
+ local myconf
+
+ # build uses polarssl by default, but instead, make it use openssl unless
+ # polarssl is desired.
+ use !polarssl && myconf="${myconf} --with-ssl=openssl"
+
+ econf ${myconf}
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die "install failed"
+
+ newinitd "${FILESDIR}/umurmurd.initd" umurmurd || die
+ newconfd "${FILESDIR}/umurmurd.confd" umurmurd || die
+
+ dodoc AUTHORS ChangeLog || die "dodoc failed"
+ newdoc README.md README || die "newdoc failed"
+
+ # Some permissions are adjusted as the config may contain a server
+ # password, and /etc/umurmur will typically contain the cert and the key
+ # used to sign it, which are read after priveleges are dropped.
+ insinto /etc
+ doins "${FILESDIR}/umurmur.conf" || die
+ fperms 0640 /etc/umurmur.conf || die
+
+ dodir /etc/umurmur || die
+ fperms 0750 /etc/umurmur || die
+ fowners root:umurmur /etc/umurmur || die
+}
+
+pkg_postinst() {
+ elog "A configuration file has been installed at /etc/umurmur.conf - you may "
+ elog "want to review it. See also http://code.google.com/p/umurmur/wiki/Configuring02x"
+
+ if use polarssl ; then
+ elog
+ elog "Because you have enabled PolarSSL support, umurmurd will use a"
+ elog "predefined test-certificate and key if none are configured, which"
+ elog "is insecure. See http://code.google.com/p/umurmur/wiki/Installing02x#Installing_uMurmur_with_PolarSSL_support"
+ elog "for more information on how to create your certificate and key"
+ fi
+}