r22570 - in /desktop/unstable/seahorse-plugins/debian: changelog patches/01_maxpathlen_hurd.patch

pochu at users.alioth.debian.org pochu at users.alioth.debian.org
Sun Dec 13 23:19:16 UTC 2009


Author: pochu
Date: Sun Dec 13 23:19:16 2009
New Revision: 22570

URL: http://svn.debian.org/wsvn/pkg-gnome/?sc=1&rev=22570
Log:
* debian/patches/01_maxpathlen_hurd.patch:
  - Fix build failure on the Hurd, use dynamic allocation rather than
    hardcoding the GPG homedir maximum length to MAXPATHLEN.

Added:
    desktop/unstable/seahorse-plugins/debian/patches/01_maxpathlen_hurd.patch
Modified:
    desktop/unstable/seahorse-plugins/debian/changelog

Modified: desktop/unstable/seahorse-plugins/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/unstable/seahorse-plugins/debian/changelog?rev=22570&op=diff
==============================================================================
--- desktop/unstable/seahorse-plugins/debian/changelog [utf-8] (original)
+++ desktop/unstable/seahorse-plugins/debian/changelog [utf-8] Sun Dec 13 23:19:16 2009
@@ -1,3 +1,11 @@
+seahorse-plugins (2.28.1-3) UNRELEASED; urgency=low
+
+  * debian/patches/01_maxpathlen_hurd.patch:
+    - Fix build failure on the Hurd, use dynamic allocation rather than
+      hardcoding the GPG homedir maximum length to MAXPATHLEN.
+
+ -- Emilio Pozuelo Monfort <pochu at debian.org>  Sun, 13 Dec 2009 20:50:04 +0100
+
 seahorse-plugins (2.28.1-2) unstable; urgency=low
 
   * Disable epiphany plugin, it doesn’t work at all since it’s still 

Added: desktop/unstable/seahorse-plugins/debian/patches/01_maxpathlen_hurd.patch
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/unstable/seahorse-plugins/debian/patches/01_maxpathlen_hurd.patch?rev=22570&op=file
==============================================================================
--- desktop/unstable/seahorse-plugins/debian/patches/01_maxpathlen_hurd.patch (added)
+++ desktop/unstable/seahorse-plugins/debian/patches/01_maxpathlen_hurd.patch [utf-8] Sun Dec 13 23:19:16 2009
@@ -1,0 +1,108 @@
+diff -Nur -x '*.orig' -x '*~' seahorse-plugins-2.28.1/agent/seahorse-agent-io.c seahorse-plugins-2.28.1.new/agent/seahorse-agent-io.c
+--- seahorse-plugins-2.28.1/agent/seahorse-agent-io.c	2009-10-04 23:11:19.000000000 +0200
++++ seahorse-plugins-2.28.1.new/agent/seahorse-agent-io.c	2009-12-13 21:55:57.000000000 +0100
+@@ -69,7 +69,7 @@
+ static gint g_socket = -1;              /* Socket we're listening on */
+ static GIOChannel *g_iochannel = NULL;  /* IO channel for above */
+ static gint g_iochannel_tag = 0;        /* Event source tag for above */
+-static char g_socket_name[MAXPATHLEN];  /* Name of socket we're listening on */
++static char *g_socket_name;  /* Name of socket we're listening on */
+ 
+ struct _SeahorseAgentConn {
+     gint stag;                  /* glib source tag */
+@@ -138,9 +138,8 @@
+     g_assert (g_socket == -1);
+ 
+     /* We build put the socket in a directory called /tmp/seahorse-XXXXXX */
+-    t = g_build_filename (g_get_tmp_dir (), SOCKET_DIR, NULL);
+-    strncpy (g_socket_name, t, KL (g_socket_name));
+-    g_free (t);
++    g_free (g_socket_name);
++    g_socket_name = g_build_filename (g_get_tmp_dir (), SOCKET_DIR, NULL);
+ 
+     /* Make the appropriate directory */
+     if (!mkdtemp (g_socket_name)) {
+@@ -154,8 +153,9 @@
+         g_warning ("couldn't set permissions on directory: %s", strerror (errno));
+ 
+     /* Build the socket name */
+-    strncat (g_socket_name, SOCKET_FILE, KL (g_socket_name));
+-    g_socket_name[KL (g_socket_name)] = 0;
++    t = g_socket_name;
++    g_socket_name = g_strdup_printf ("%s%s", g_socket_name, SOCKET_FILE);
++    g_free (t);
+ 
+     memset (&addr, 0, sizeof (addr));
+     addr.sun_family = AF_UNIX;
+@@ -810,16 +810,19 @@
+ 
+         g_clear_error (&err);
+ 
+-        /* Remove the socket */
+-        unlink (g_socket_name);
++        if (g_socket_name) {
++            /* Remove the socket */
++            unlink (g_socket_name);
+ 
+-        /* Remove the directory */
+-        t = strrchr (g_socket_name, '/');
+-        if (t != NULL) {
+-            *t = 0;
+-            rmdir (g_socket_name);
+-        }
++            /* Remove the directory */
++            t = strrchr (g_socket_name, '/');
++            if (t != NULL) {
++                *t = 0;
++                rmdir (g_socket_name);
++            }
+ 
+-        g_socket_name[0] = 0;
++            g_free (g_socket_name);
++            g_socket_name = NULL;
++        }
+     }    
+ }
+diff -Nur -x '*.orig' -x '*~' seahorse-plugins-2.28.1/libseahorse/seahorse-gpg-options.c seahorse-plugins-2.28.1.new/libseahorse/seahorse-gpg-options.c
+--- seahorse-plugins-2.28.1/libseahorse/seahorse-gpg-options.c	2009-08-04 16:26:43.000000000 +0200
++++ seahorse-plugins-2.28.1.new/libseahorse/seahorse-gpg-options.c	2009-12-13 21:50:34.000000000 +0100
+@@ -41,7 +41,7 @@
+ #define  GPG_VERSION_PREFIX1   "1."
+ #define  GPG_VERSION_PREFIX2   "2."
+ 
+-static gchar gpg_homedir[MAXPATHLEN];
++static gchar *gpg_homedir;
+ static gboolean gpg_options_inited = FALSE;
+ 
+ static gboolean
+@@ -75,6 +75,9 @@
+     g_assert (gpg_options_inited);
+     g_assert (!err || !*err);
+ 
++    if (!gpg_homedir)
++        return NULL;
++
+     /* Check for and open ~/.gnupg/gpg.conf */
+     conf = g_strconcat (gpg_homedir, "/gpg.conf", NULL);
+     if (g_file_test (conf, G_FILE_TEST_IS_REGULAR | G_FILE_TEST_EXISTS)) 
+@@ -206,16 +209,14 @@
+                     *x = 0;
+                     g_strstrip (t);
+ 
+-                    gpg_homedir[0] = 0;
++                    g_free (gpg_homedir);
+ 
+                     /* If it's not a rooted path then expand */
+                     if (t[0] == '~') {
+-                        g_strlcpy (gpg_homedir, g_get_home_dir (),
+-                                   sizeof (gpg_homedir));
+-                        t++;
++                        gpg_homedir = g_strconcat (g_get_home_dir(), ++t);
++                    } else {
++                        gpg_homedir = g_strdup (t);
+                     }
+-
+-                    g_strlcat (gpg_homedir, t, sizeof (gpg_homedir));
+                     found = TRUE;
+                 }
+             }




More information about the pkg-gnome-commits mailing list