[arch-commits] CVS update of extra/gnome/bug-buddy (4 files)
Jan de Groot
jgc at archlinux.org
Tue Sep 25 16:19:56 UTC 2007
Date: Tuesday, September 25, 2007 @ 12:19:56
Author: jgc
Path: /home/cvs-extra/extra/gnome/bug-buddy
Added: bgo479536-memleak.patch (1.1)
bgo479929-segfault-handler.patch (1.1)
bgo480130-email-validation.patch (1.1)
Modified: PKGBUILD (1.24 -> 1.25)
Fix memleak, fix email address parsing and fix crash handling of java applications
----------------------------------+
PKGBUILD | 17 +++++++--
bgo479536-memleak.patch | 11 ++++++
bgo479929-segfault-handler.patch | 66 +++++++++++++++++++++++++++++++++++++
bgo480130-email-validation.patch | 51 ++++++++++++++++++++++++++++
4 files changed, 141 insertions(+), 4 deletions(-)
Index: extra/gnome/bug-buddy/PKGBUILD
diff -u extra/gnome/bug-buddy/PKGBUILD:1.24 extra/gnome/bug-buddy/PKGBUILD:1.25
--- extra/gnome/bug-buddy/PKGBUILD:1.24 Fri Sep 21 17:13:34 2007
+++ extra/gnome/bug-buddy/PKGBUILD Tue Sep 25 12:19:56 2007
@@ -1,9 +1,9 @@
-# $Id: PKGBUILD,v 1.24 2007/09/21 21:13:34 jgc Exp $
+# $Id: PKGBUILD,v 1.25 2007/09/25 16:19:56 jgc Exp $
# Maintainer: Jan de Groot <jgc at archlinux.org>
pkgname=bug-buddy
pkgver=2.20.0
-pkgrel=1
+pkgrel=2
pkgdesc="A bug reporting tool for GNOME"
arch=(i686 x86_64)
install=bug-buddy.install
@@ -13,11 +13,20 @@
license=(GPL)
options=('!libtool' '!emptydirs')
url="http://www.gnome.org"
-source=(http://ftp.gnome.org/pub/gnome/sources/${pkgname}/2.20/${pkgname}-${pkgver}.tar.bz2)
-md5sums=('bce8b08a14d123ecfeefb3902031d773')
+source=(http://ftp.gnome.org/pub/gnome/sources/${pkgname}/2.20/${pkgname}-${pkgver}.tar.bz2
+ bgo479536-memleak.patch
+ bgo479929-segfault-handler.patch
+ bgo480130-email-validation.patch)
+md5sums=('bce8b08a14d123ecfeefb3902031d773'
+ 'a73477557523bd65670839e2c99cb435'
+ '3805b438a1114629de5fd15a95ff69a3'
+ '4c9efc3e6ea5f093444b36bee0f2bc68')
build() {
cd ${startdir}/src/${pkgname}-${pkgver}
+ patch -Np1 -i ${startdir}/src/bgo479536-memleak.patch || return 1
+ patch -Np1 -i ${startdir}/src/bgo479929-segfault-handler.patch || return 1
+ patch -Np1 -i ${startdir}/src/bgo480130-email-validation.patch || return 1
./configure --prefix=/usr --sysconfdir=/etc \
--localstatedir=/var
make || return 1
Index: extra/gnome/bug-buddy/bgo479536-memleak.patch
diff -u /dev/null extra/gnome/bug-buddy/bgo479536-memleak.patch:1.1
--- /dev/null Tue Sep 25 12:19:56 2007
+++ extra/gnome/bug-buddy/bgo479536-memleak.patch Tue Sep 25 12:19:56 2007
@@ -0,0 +1,11 @@
+--- trunk/gnome-breakpad/gnome-breakpad.cc 2007/09/25 16:03:21 2431
++++ trunk/gnome-breakpad/gnome-breakpad.cc 2007/09/25 16:06:33 2432
+@@ -105,6 +105,8 @@
+ tries[1] = g_build_filename (dir, ".debug", debug_filename, NULL);
+ tries[2] = g_build_filename ("/usr", "lib", "debug", dir, debug_filename, NULL);
+
++ g_free (dir);
++
+ for (i = 0; i < N_TRIES; ++i) {
+ if (g_file_test (tries[i], G_FILE_TEST_EXISTS))
+ return true;
Index: extra/gnome/bug-buddy/bgo479929-segfault-handler.patch
diff -u /dev/null extra/gnome/bug-buddy/bgo479929-segfault-handler.patch:1.1
--- /dev/null Tue Sep 25 12:19:56 2007
+++ extra/gnome/bug-buddy/bgo479929-segfault-handler.patch Tue Sep 25 12:19:56 2007
@@ -0,0 +1,66 @@
+--- trunk/gnome-breakpad/gnome-breakpad.cc 2007/08/16 17:56:32 2340
++++ trunk/gnome-breakpad/gnome-breakpad.cc 2007/09/25 16:03:21 2431
+@@ -291,21 +291,58 @@
+
+ if (bugbuddy && !g_getenv ("GNOME_DISABLE_CRASH_DIALOG")) {
+ #ifdef ENABLE_GOOGLE_BREAKPAD
++ static struct sigaction old_action;
++
++ sigaction(SIGSEGV, NULL, &old_action);
++ if (old_action.sa_handler != SIG_DFL)
++ return;
++
++ sigaction(SIGABRT, NULL, &old_action);
++ if (old_action.sa_handler != SIG_DFL)
++ return;
++
++ sigaction(SIGTRAP, NULL, &old_action);
++ if (old_action.sa_handler != SIG_DFL)
++ return;
++
++ sigaction(SIGFPE, NULL, &old_action);
++ if (old_action.sa_handler != SIG_DFL)
++ return;
++
++ sigaction(SIGBUS, NULL, &old_action);
++ if (old_action.sa_handler != SIG_DFL)
++ return;
++
+ static ExceptionHandler handler("/tmp", check_if_gdb,
+ MinidumpCallback, NULL, true);
+ #else
+ static struct sigaction *setptr;
++ static struct sigaction old_action;
+ struct sigaction sa;
+ memset(&sa, 0, sizeof(sa));
+ setptr = &sa;
+
+ sa.sa_handler = bugbuddy_segv_handle;
+
+- sigaction(SIGSEGV, setptr, NULL);
+- sigaction(SIGABRT, setptr, NULL);
+- sigaction(SIGTRAP, setptr, NULL);
+- sigaction(SIGFPE, setptr, NULL);
+- sigaction(SIGBUS, setptr, NULL);
++ sigaction(SIGSEGV, NULL, &old_action);
++ if (old_action.sa_handler == SIG_DFL)
++ sigaction(SIGSEGV, setptr, NULL);
++
++ sigaction(SIGABRT, NULL, &old_action);
++ if (old_action.sa_handler == SIG_DFL)
++ sigaction(SIGABRT, setptr, NULL);
++
++ sigaction(SIGTRAP, NULL, &old_action);
++ if (old_action.sa_handler == SIG_DFL)
++ sigaction(SIGTRAP, setptr, NULL);
++
++ sigaction(SIGFPE, NULL, &old_action);
++ if (old_action.sa_handler == SIG_DFL)
++ sigaction(SIGFPE, setptr, NULL);
++
++ sigaction(SIGBUS, NULL, &old_action);
++ if (old_action.sa_handler == SIG_DFL)
++ sigaction(SIGBUS, setptr, NULL);
+ #endif
+ }
+
Index: extra/gnome/bug-buddy/bgo480130-email-validation.patch
diff -u /dev/null extra/gnome/bug-buddy/bgo480130-email-validation.patch:1.1
--- /dev/null Tue Sep 25 12:19:56 2007
+++ extra/gnome/bug-buddy/bgo480130-email-validation.patch Tue Sep 25 12:19:56 2007
@@ -0,0 +1,51 @@
+--- trunk/src/bug-buddy.c 2007/09/01 20:26:26 2374
++++ trunk/src/bug-buddy.c 2007/09/25 15:55:33 2430
+@@ -823,12 +823,9 @@
+ return FALSE;
+
+ for (character = local_part; *character; character++) {
+- /* If character is alphanumeric it is valid. */
+- if (g_ascii_isalnum (*character))
+- continue;
+-
+- /* If character is "-", "_" or "." it is valid. */
+- if (*character == '-' || *character == '_' || *character == '.')
++ /* RFC 3696 says *any* printable ASCII character can
++ * appear in local-part, subject to quoting rules. */
++ if (g_ascii_isprint (*character))
+ continue;
+
+ /* Not valid character, not valid local part. */
+@@ -903,21 +900,25 @@
+ {
+ char *local_part;
+ char *domain;
+- char **parts;
++ char *at_sign;
+ gboolean is_valid;
+
+- parts = g_strsplit (address, "@", 2);
++ /* Split on the *last* '@' character: */
++ at_sign = strrchr (address, '@');
+
+- /* Check we have the 2 parts */
+- if (!(local_part = parts[0]) || !(domain = parts[1])) {
+- g_strfreev (parts);
++ if (at_sign == NULL)
+ return FALSE;
+- }
+
++ local_part = g_strndup (address, at_sign - address);
++ domain = g_strdup (at_sign + 1);
++
++ /* Check each part is valid */
+ is_valid = email_local_part_is_valid (local_part)
+ && email_domain_is_valid (domain);
+
+- g_strfreev (parts);
++ g_free (local_part);
++ g_free (domain);
++
+ return is_valid;
+ }
+
More information about the arch-commits
mailing list