From 04aff5f70cb7c04abe06ca8eaf8261cbb0eeb378 Mon Sep 17 00:00:00 2001 From: root Date: Wed, 11 Apr 2012 00:01:18 +0000 Subject: Wed Apr 11 00:01:18 UTC 2012 --- community-testing/dee/PKGBUILD | 33 ++++++++++++++ community-testing/dee/fix-crash.patch | 86 +++++++++++++++++++++++++++++++++++ 2 files changed, 119 insertions(+) create mode 100644 community-testing/dee/PKGBUILD create mode 100644 community-testing/dee/fix-crash.patch (limited to 'community-testing/dee') diff --git a/community-testing/dee/PKGBUILD b/community-testing/dee/PKGBUILD new file mode 100644 index 000000000..e65c2d80c --- /dev/null +++ b/community-testing/dee/PKGBUILD @@ -0,0 +1,33 @@ +# $Id: PKGBUILD 69158 2012-04-09 22:02:32Z bgyorgy $ +# Maintainer: Balló György + +pkgname=dee +pkgver=1.0.8 +pkgrel=1 +pkgdesc="Library to provide objects allowing to create Model-View-Controller type programs across DBus" +arch=('i686' 'x86_64') +url="https://launchpad.net/dee" +license=('LGPL') +depends=('glib2' 'icu') +makedepends=('python2' 'gobject-introspection' 'vala') +options=('!libtool') +source=(http://launchpad.net/$pkgname/1.0/$pkgver/+download/$pkgname-$pkgver.tar.gz + fix-crash.patch) +md5sums=('e9dbf5526ac4aca5a001e87e8cea516d' + 'e6e95a783dd1f3aa0accc7410a5783e1') + +build() { + cd "$srcdir/$pkgname-$pkgver" + patch -Np0 -i "$srcdir/fix-crash.patch" + + ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ + --disable-static --disable-tests \ + PYTHON=python2 + make +} + +package() { + cd "$srcdir/$pkgname-$pkgver" + + make DESTDIR="$pkgdir/" install +} diff --git a/community-testing/dee/fix-crash.patch b/community-testing/dee/fix-crash.patch new file mode 100644 index 000000000..9ce664e10 --- /dev/null +++ b/community-testing/dee/fix-crash.patch @@ -0,0 +1,86 @@ +=== modified file 'src/dee-shared-model.c' +--- src/dee-shared-model.c 2012-03-12 11:49:53 +0000 ++++ src/dee-shared-model.c 2012-03-29 12:04:44 +0000 +@@ -1183,6 +1183,7 @@ + guint32 pos; + guchar change_type; + gint i, j; ++ gboolean transaction_error; + + g_return_if_fail (DEE_IS_SHARED_MODEL (self)); + g_return_if_fail (transaction != NULL); +@@ -1249,48 +1250,56 @@ + g_variant_get (tt, "(tt)", &seqnum_before, &seqnum_after); + g_variant_unref (tt); + ++ transaction_error = FALSE; + /* If this is our first transaction we accept anything, if not the + * incoming seqnums must align with our own records */ + current_seqnum = dee_serializable_model_get_seqnum (DEE_MODEL (self)); +- if (current_seqnum != 0 && +- current_seqnum != seqnum_before) +- { ++ ++ if (current_seqnum != 0 && current_seqnum != seqnum_before) ++ { + g_warning ("Transaction from %s is in the %s. Expected seqnum %"G_GUINT64_FORMAT + ", but got %"G_GUINT64_FORMAT". Ignoring transaction.", + sender_name, + current_seqnum < seqnum_before ? "future" : "past", + current_seqnum, seqnum_before); +- if (dee_shared_model_is_leader (self)) +- { +- g_warning ("Invalidating %s", sender_name); +- invalidate_peer (self, sender_name, NULL); +- } +- +- g_variant_unref (transaction); +- g_variant_unref (aav); +- g_variant_unref (au); +- g_variant_unref (ay); +- return; +- } ++ transaction_error = TRUE; ++ } + + /* Check that the lengths of all the arrays match up */ + n_rows = g_variant_n_children (aav); ++ + if (n_rows != g_variant_n_children (au)) + { + g_warning ("Commit from %s has illegal position vector", + sender_name); +- // FIXME cleanup ++ transaction_error = TRUE; + } + if (n_rows != g_variant_n_children (ay)) + { + g_warning ("Commit from %s has illegal change type vector", + sender_name); +- // FIXME cleanup ++ transaction_error = TRUE; + } + if (n_rows > (seqnum_after - seqnum_before)) + { + g_warning ("Commit from %s has illegal seqnum count.", + sender_name); ++ transaction_error = TRUE; ++ } ++ ++ if (transaction_error) ++ { ++ if (dee_shared_model_is_leader (self)) ++ { ++ g_warning ("Invalidating %s", sender_name); ++ invalidate_peer (self, sender_name, NULL); ++ } ++ ++ g_variant_unref (transaction); ++ g_variant_unref (aav); ++ g_variant_unref (au); ++ g_variant_unref (ay); ++ return; + } + + /* Allocate an array on the stack as a temporary row data buffer */ + -- cgit v1.2.3-54-g00ecf