From f1e2848544e198ef0f35acb3dcfd5c7d48153b51 Mon Sep 17 00:00:00 2001 From: Natanael Copa Date: Wed, 20 Feb 2013 09:52:01 +0000 Subject: main/loudmouth: moved from testing and add compile fix --- main/loudmouth/01-fix-sasl-md5-digest-uri.patch | 25 ++++++++++ main/loudmouth/03-drop-stanzas-on-fail.patch | 46 ++++++++++++++++++ main/loudmouth/04-use-pkg-config-for-gnutls.patch | 24 ++++++++++ main/loudmouth/APKBUILD | 55 ++++++++++++++++++++++ .../loudmouth-1.4.3-glib-compile-fix.patch | 17 +++++++ testing/loudmouth/01-fix-sasl-md5-digest-uri.patch | 25 ---------- testing/loudmouth/03-drop-stanzas-on-fail.patch | 46 ------------------ .../loudmouth/04-use-pkg-config-for-gnutls.patch | 24 ---------- testing/loudmouth/APKBUILD | 55 ---------------------- 9 files changed, 167 insertions(+), 150 deletions(-) create mode 100644 main/loudmouth/01-fix-sasl-md5-digest-uri.patch create mode 100644 main/loudmouth/03-drop-stanzas-on-fail.patch create mode 100644 main/loudmouth/04-use-pkg-config-for-gnutls.patch create mode 100644 main/loudmouth/APKBUILD create mode 100644 main/loudmouth/loudmouth-1.4.3-glib-compile-fix.patch delete mode 100644 testing/loudmouth/01-fix-sasl-md5-digest-uri.patch delete mode 100644 testing/loudmouth/03-drop-stanzas-on-fail.patch delete mode 100644 testing/loudmouth/04-use-pkg-config-for-gnutls.patch delete mode 100644 testing/loudmouth/APKBUILD diff --git a/main/loudmouth/01-fix-sasl-md5-digest-uri.patch b/main/loudmouth/01-fix-sasl-md5-digest-uri.patch new file mode 100644 index 0000000000..872d93553b --- /dev/null +++ b/main/loudmouth/01-fix-sasl-md5-digest-uri.patch @@ -0,0 +1,25 @@ +diff --git a/loudmouth/lm-connection.c b/loudmouth/lm-connection.c +index 21c1bc2..ae8de94 100644 +--- a/loudmouth/lm-connection.c ++++ b/loudmouth/lm-connection.c +@@ -1441,11 +1441,18 @@ lm_connection_authenticate (LmConnection *connection, + connection->effective_jid = g_strdup_printf ("%s/%s", + connection->jid, connection->resource); + + if (connection->use_sasl) { ++ gchar *domain = NULL; ++ ++ if (!connection_get_server_from_jid (connection->jid, &domain)) { ++ domain = g_strdup (connection->server); ++ } ++ + lm_sasl_authenticate (connection->sasl, + username, password, +- connection->server, ++ domain, + connection_sasl_auth_finished); ++ g_free (domain); + + connection->features_cb = + lm_message_handler_new (connection_features_cb, + diff --git a/main/loudmouth/03-drop-stanzas-on-fail.patch b/main/loudmouth/03-drop-stanzas-on-fail.patch new file mode 100644 index 0000000000..05f4248de0 --- /dev/null +++ b/main/loudmouth/03-drop-stanzas-on-fail.patch @@ -0,0 +1,46 @@ +From: Sjoerd Simons +Date: Tue, 13 Jan 2009 11:28:44 +0000 +Subject: [PATCH] Drop stanzas when failing to convert them to LmMessages + +when a stanza comes in that for some reason can't be parsed into an LmMessage, +just drop them on the floor instead of blocking the parser. I've seen this +issue happen in practise because some (buggy?) client sending an iq with a +prefix e.g. +--- + loudmouth/lm-parser.c | 15 ++++++--------- + 1 files changed, 6 insertions(+), 9 deletions(-) + +diff --git a/loudmouth/lm-parser.c b/loudmouth/lm-parser.c +index 1938d56..89f6675 100644 +--- a/loudmouth/lm-parser.c ++++ b/loudmouth/lm-parser.c +@@ -151,19 +151,16 @@ parser_end_node_cb (GMarkupParseContext *context, + if (!m) { + g_warning ("Couldn't create message: %s\n", + parser->cur_root->name); +- return; +- } +- +- g_log (LM_LOG_DOMAIN, LM_LOG_LEVEL_PARSER, ++ } else { ++ g_log (LM_LOG_DOMAIN, LM_LOG_LEVEL_PARSER, + "Have a new message\n"); +- if (parser->function) { +- (* parser->function) (parser, m, parser->user_data); ++ if (parser->function) { ++ (* parser->function) (parser, m, parser->user_data); ++ } ++ lm_message_unref (m); + } + +- lm_message_unref (m); + lm_message_node_unref (parser->cur_root); +- +- + parser->cur_node = parser->cur_root = NULL; + } else { + LmMessageNode *tmp_node; +-- +1.5.6.5 + + diff --git a/main/loudmouth/04-use-pkg-config-for-gnutls.patch b/main/loudmouth/04-use-pkg-config-for-gnutls.patch new file mode 100644 index 0000000000..eecd419871 --- /dev/null +++ b/main/loudmouth/04-use-pkg-config-for-gnutls.patch @@ -0,0 +1,24 @@ +Description: use pkg-config to detect gnutls +Debian: http://bugs.debian.org/529835 +Origin: http://groups.google.com/group/loudmouth-dev/browse_thread/thread/3f78255837048daf# + +--- a/configure.ac.orig 2009-08-16 20:29:36.000000000 +0200 ++++ b/configure.ac 2009-08-16 20:30:43.000000000 +0200 +@@ -146,10 +146,12 @@ AC_ARG_WITH(openssl-libs, + enable_ssl=no + if test "x$ac_ssl" = "xgnutls"; then + dnl Look for GnuTLS +- AM_PATH_LM_LIBGNUTLS($GNUTLS_REQUIRED, have_libgnutls=yes, have_libgnutls=no) +- if test "x$have_libgnutls" = "xyes"; then +- CFLAGS="$CFLAGS $LIBGNUTLS_CFLAGS" +- LIBS="$LIBS $LIBGNUTLS_LIBS" ++ PKG_CHECK_MODULES(GNUTLS, gnutls >= $GNUTLS_REQUIRED, have_gnutls=yes, have_gnutls=no) ++ if test "x$have_gnutls" = "xyes"; then ++ AC_SUBST(ASYNCNS_CFLAGS) ++ AC_SUBST(ASYNCNS_LIBS) ++ CFLAGS="$CFLAGS $GNUTLS_CFLAGS" ++ LIBS="$LIBS $GNUTLS_LIBS" + AC_DEFINE(HAVE_GNUTLS, 1, [whether to use GnuTSL support.]) + enable_ssl=GnuTLS + else + diff --git a/main/loudmouth/APKBUILD b/main/loudmouth/APKBUILD new file mode 100644 index 0000000000..1d0c0b91da --- /dev/null +++ b/main/loudmouth/APKBUILD @@ -0,0 +1,55 @@ +# Contributor: Fabian Affolter +# Maintainer: Fabian Affolter +pkgname=loudmouth +pkgver=1.4.3 +pkgrel=1 +pkgdesc="A lightweight Jabber client library" +url="http://groups.google.com/group/loudmouth-dev" +arch="all" +license="LGPL2+" +depends="" +depends_dev="pkgconfig glib-dev openssl-dev libidn-dev libasyncns-dev check-dev" +makedepends="$depends_dev" +install="" +subpackages="$pkgname-dev $pkgname-doc" +source="http://ftp.gnome.org/pub/gnome/sources/${pkgname}/1.4/${pkgname}-${pkgver}.tar.bz2 + 01-fix-sasl-md5-digest-uri.patch + 03-drop-stanzas-on-fail.patch + 04-use-pkg-config-for-gnutls.patch" +_builddir="$srcdir"/$pkgname-$pkgver + +prepare() { + local i + cd "$_builddir" + for i in $source; do + case $i in + *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;; + esac + done +} + +build() { + cd "$_builddir" + ./configure \ + --disable-static \ + --with-asyncns=yes \ + --with-ssl=openssl \ + --prefix=/usr \ + --with-libgnutls-prefix=/usr \ + --infodir=/usr/share/info \ + --localstatedir=/var \ + || return 1 + make || return 1 + make check || return 1 +} + +package() { + cd "$_builddir" + make DESTDIR="$pkgdir" install || return 1 + rm -f "$pkgdir"/usr/lib/*.la +} + +md5sums="55339ca42494690c3942ee1465a96937 loudmouth-1.4.3.tar.bz2 +5a860172e76dc5df8e694602f360ce76 01-fix-sasl-md5-digest-uri.patch +d0f34028837b7ff93262373ac3d4dd59 03-drop-stanzas-on-fail.patch +2cfb0ef5c32c9bd377e3abb6ad38135a 04-use-pkg-config-for-gnutls.patch" diff --git a/main/loudmouth/loudmouth-1.4.3-glib-compile-fix.patch b/main/loudmouth/loudmouth-1.4.3-glib-compile-fix.patch new file mode 100644 index 0000000000..03d04e78a3 --- /dev/null +++ b/main/loudmouth/loudmouth-1.4.3-glib-compile-fix.patch @@ -0,0 +1,17 @@ +Fix compile against new glib. + +From: Daniel Drake + +Index: loudmouth-1.4.3/loudmouth/lm-error.c +=================================================================== +--- loudmouth-1.4.3.orig/loudmouth/lm-error.c ++++ loudmouth-1.4.3/loudmouth/lm-error.c +@@ -19,7 +19,7 @@ + */ + + #include +-#include ++#include + #include "lm-error.h" + + /** diff --git a/testing/loudmouth/01-fix-sasl-md5-digest-uri.patch b/testing/loudmouth/01-fix-sasl-md5-digest-uri.patch deleted file mode 100644 index 872d93553b..0000000000 --- a/testing/loudmouth/01-fix-sasl-md5-digest-uri.patch +++ /dev/null @@ -1,25 +0,0 @@ -diff --git a/loudmouth/lm-connection.c b/loudmouth/lm-connection.c -index 21c1bc2..ae8de94 100644 ---- a/loudmouth/lm-connection.c -+++ b/loudmouth/lm-connection.c -@@ -1441,11 +1441,18 @@ lm_connection_authenticate (LmConnection *connection, - connection->effective_jid = g_strdup_printf ("%s/%s", - connection->jid, connection->resource); - - if (connection->use_sasl) { -+ gchar *domain = NULL; -+ -+ if (!connection_get_server_from_jid (connection->jid, &domain)) { -+ domain = g_strdup (connection->server); -+ } -+ - lm_sasl_authenticate (connection->sasl, - username, password, -- connection->server, -+ domain, - connection_sasl_auth_finished); -+ g_free (domain); - - connection->features_cb = - lm_message_handler_new (connection_features_cb, - diff --git a/testing/loudmouth/03-drop-stanzas-on-fail.patch b/testing/loudmouth/03-drop-stanzas-on-fail.patch deleted file mode 100644 index 05f4248de0..0000000000 --- a/testing/loudmouth/03-drop-stanzas-on-fail.patch +++ /dev/null @@ -1,46 +0,0 @@ -From: Sjoerd Simons -Date: Tue, 13 Jan 2009 11:28:44 +0000 -Subject: [PATCH] Drop stanzas when failing to convert them to LmMessages - -when a stanza comes in that for some reason can't be parsed into an LmMessage, -just drop them on the floor instead of blocking the parser. I've seen this -issue happen in practise because some (buggy?) client sending an iq with a -prefix e.g. ---- - loudmouth/lm-parser.c | 15 ++++++--------- - 1 files changed, 6 insertions(+), 9 deletions(-) - -diff --git a/loudmouth/lm-parser.c b/loudmouth/lm-parser.c -index 1938d56..89f6675 100644 ---- a/loudmouth/lm-parser.c -+++ b/loudmouth/lm-parser.c -@@ -151,19 +151,16 @@ parser_end_node_cb (GMarkupParseContext *context, - if (!m) { - g_warning ("Couldn't create message: %s\n", - parser->cur_root->name); -- return; -- } -- -- g_log (LM_LOG_DOMAIN, LM_LOG_LEVEL_PARSER, -+ } else { -+ g_log (LM_LOG_DOMAIN, LM_LOG_LEVEL_PARSER, - "Have a new message\n"); -- if (parser->function) { -- (* parser->function) (parser, m, parser->user_data); -+ if (parser->function) { -+ (* parser->function) (parser, m, parser->user_data); -+ } -+ lm_message_unref (m); - } - -- lm_message_unref (m); - lm_message_node_unref (parser->cur_root); -- -- - parser->cur_node = parser->cur_root = NULL; - } else { - LmMessageNode *tmp_node; --- -1.5.6.5 - - diff --git a/testing/loudmouth/04-use-pkg-config-for-gnutls.patch b/testing/loudmouth/04-use-pkg-config-for-gnutls.patch deleted file mode 100644 index eecd419871..0000000000 --- a/testing/loudmouth/04-use-pkg-config-for-gnutls.patch +++ /dev/null @@ -1,24 +0,0 @@ -Description: use pkg-config to detect gnutls -Debian: http://bugs.debian.org/529835 -Origin: http://groups.google.com/group/loudmouth-dev/browse_thread/thread/3f78255837048daf# - ---- a/configure.ac.orig 2009-08-16 20:29:36.000000000 +0200 -+++ b/configure.ac 2009-08-16 20:30:43.000000000 +0200 -@@ -146,10 +146,12 @@ AC_ARG_WITH(openssl-libs, - enable_ssl=no - if test "x$ac_ssl" = "xgnutls"; then - dnl Look for GnuTLS -- AM_PATH_LM_LIBGNUTLS($GNUTLS_REQUIRED, have_libgnutls=yes, have_libgnutls=no) -- if test "x$have_libgnutls" = "xyes"; then -- CFLAGS="$CFLAGS $LIBGNUTLS_CFLAGS" -- LIBS="$LIBS $LIBGNUTLS_LIBS" -+ PKG_CHECK_MODULES(GNUTLS, gnutls >= $GNUTLS_REQUIRED, have_gnutls=yes, have_gnutls=no) -+ if test "x$have_gnutls" = "xyes"; then -+ AC_SUBST(ASYNCNS_CFLAGS) -+ AC_SUBST(ASYNCNS_LIBS) -+ CFLAGS="$CFLAGS $GNUTLS_CFLAGS" -+ LIBS="$LIBS $GNUTLS_LIBS" - AC_DEFINE(HAVE_GNUTLS, 1, [whether to use GnuTSL support.]) - enable_ssl=GnuTLS - else - diff --git a/testing/loudmouth/APKBUILD b/testing/loudmouth/APKBUILD deleted file mode 100644 index 1d0c0b91da..0000000000 --- a/testing/loudmouth/APKBUILD +++ /dev/null @@ -1,55 +0,0 @@ -# Contributor: Fabian Affolter -# Maintainer: Fabian Affolter -pkgname=loudmouth -pkgver=1.4.3 -pkgrel=1 -pkgdesc="A lightweight Jabber client library" -url="http://groups.google.com/group/loudmouth-dev" -arch="all" -license="LGPL2+" -depends="" -depends_dev="pkgconfig glib-dev openssl-dev libidn-dev libasyncns-dev check-dev" -makedepends="$depends_dev" -install="" -subpackages="$pkgname-dev $pkgname-doc" -source="http://ftp.gnome.org/pub/gnome/sources/${pkgname}/1.4/${pkgname}-${pkgver}.tar.bz2 - 01-fix-sasl-md5-digest-uri.patch - 03-drop-stanzas-on-fail.patch - 04-use-pkg-config-for-gnutls.patch" -_builddir="$srcdir"/$pkgname-$pkgver - -prepare() { - local i - cd "$_builddir" - for i in $source; do - case $i in - *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;; - esac - done -} - -build() { - cd "$_builddir" - ./configure \ - --disable-static \ - --with-asyncns=yes \ - --with-ssl=openssl \ - --prefix=/usr \ - --with-libgnutls-prefix=/usr \ - --infodir=/usr/share/info \ - --localstatedir=/var \ - || return 1 - make || return 1 - make check || return 1 -} - -package() { - cd "$_builddir" - make DESTDIR="$pkgdir" install || return 1 - rm -f "$pkgdir"/usr/lib/*.la -} - -md5sums="55339ca42494690c3942ee1465a96937 loudmouth-1.4.3.tar.bz2 -5a860172e76dc5df8e694602f360ce76 01-fix-sasl-md5-digest-uri.patch -d0f34028837b7ff93262373ac3d4dd59 03-drop-stanzas-on-fail.patch -2cfb0ef5c32c9bd377e3abb6ad38135a 04-use-pkg-config-for-gnutls.patch" -- cgit v1.2.3