[Pkg-gnupg-commit] [gpa] 07/10: pull in upstream bugfixes

Daniel Kahn Gillmor dkg at fifthhorseman.net
Tue Feb 6 05:27:08 UTC 2018


This is an automated email from the git hooks/post-receive script.

dkg pushed a commit to branch master
in repository gpa.

commit c8fb3bfebb89ace4dae0f671d3d8a6ed39283e1d
Author: Daniel Kahn Gillmor <dkg at fifthhorseman.net>
Date:   Tue Feb 6 00:00:18 2018 -0500

    pull in upstream bugfixes
    
    Replace some of our existing bugfixes with patches pulled from the
    upstream git repository.  Also pull in additional bugfixes from upstream.
---
 .../0002-Add-mimetimes-to-gpa.desktop.patch        | 28 +++++++++++
 ...03-Fix-crash-on-filename-conversion-error.patch | 55 ++++++++++++++++++++++
 ...-of-algorithm-keysize-in-the-subkey-windo.patch | 28 +++++++++++
 debian/patches/add_desktop_file_exec_flag.patch    | 17 -------
 debian/patches/add_desktop_file_keywords.patch     | 12 -----
 debian/patches/gnupg2.patch                        | 13 +++--
 debian/patches/series                              |  5 +-
 7 files changed, 124 insertions(+), 34 deletions(-)

diff --git a/debian/patches/0002-Add-mimetimes-to-gpa.desktop.patch b/debian/patches/0002-Add-mimetimes-to-gpa.desktop.patch
new file mode 100644
index 0000000..e4f4f16
--- /dev/null
+++ b/debian/patches/0002-Add-mimetimes-to-gpa.desktop.patch
@@ -0,0 +1,28 @@
+From: Werner Koch <wk at gnupg.org>
+Date: Thu, 9 Feb 2017 09:48:28 +0100
+Subject: Add mimetimes to gpa.desktop
+
+--
+
+Suggested-by: Olivier Mehani <shtrom at ssji.net>
+Signed-off-by: Werner Koch <wk at gnupg.org>
+(cherry picked from commit 710b734dffc8f896ed36e287355b55adfac9342f)
+---
+ gpa.desktop | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/gpa.desktop b/gpa.desktop
+index 789ce7c..abeffe5 100644
+--- a/gpa.desktop
++++ b/gpa.desktop
+@@ -5,8 +5,9 @@ Name[en_US.ISO8859-1]=gpa
+ GenericName=GNU Privacy Assistant
+ GenericName[sv]=GNU Integritets-hjälpreda
+ GenericName[en_US.ISO8859-1]=GNU Privacy Assistant
+-Exec=gpa
++Exec=gpa %f
+ Icon=gpa
+ Terminal=false
+ Type=Application
+ Categories=GTK;Application;Security;Utility;
++MimeType=application/pgp-encrypted;application/pgp-signature
diff --git a/debian/patches/0003-Fix-crash-on-filename-conversion-error.patch b/debian/patches/0003-Fix-crash-on-filename-conversion-error.patch
new file mode 100644
index 0000000..437d3ac
--- /dev/null
+++ b/debian/patches/0003-Fix-crash-on-filename-conversion-error.patch
@@ -0,0 +1,55 @@
+From: Andre Heinecke <aheinecke at intevation.de>
+Date: Sun, 14 May 2017 14:39:57 +0200
+Subject: Fix crash on filename conversion error
+
+* src/fileman.c (add_file): Handle conversion errors.
+
+--
+If g_filename_to_utf8 fails we now fall back to g_locale_to_utf8.
+If this still does not work we fall back to g_filename_display_name
+which replaces unconvertibale strings by question marks or unicode
+markup.
+Previously NULL pointer would be inserted as filenames, leading
+to crashes later on.
+
+This is especially important for windows where D&D files came
+in System encoding as well as "Double clicked" or "Open With" files.
+On windows filename_to_utf8 always assumes that the input is already
+UTF-8, because it's stupid. (or because the GTK File Dialog returns
+UTF-8 filenames) so the fallback to locale is especially important
+here.
+
+GnuPG-Bug-ID: T2185
+(cherry picked from commit ee3ec98dba5a8c98e9ca9737da633d0767d54214)
+---
+ src/fileman.c | 17 ++++++++++++++++-
+ 1 file changed, 16 insertions(+), 1 deletion(-)
+
+diff --git a/src/fileman.c b/src/fileman.c
+index 10824d4..cb0b67f 100644
+--- a/src/fileman.c
++++ b/src/fileman.c
+@@ -217,7 +217,22 @@ add_file (GpaFileManager *fileman, const gchar *filename)
+   gchar *filename_utf8;
+ 
+   /* The tree contains filenames in the UTF-8 encoding.  */
+-  filename_utf8 = g_filename_to_utf8 (filename, -1, NULL, NULL, NULL),
++  filename_utf8 = g_filename_to_utf8 (filename, -1, NULL, NULL, NULL);
++
++  /* Try to convert from the current locale as fallback. This is important
++     for windows where g_filename_to_utf8 does not take locale into account
++     because the filedialogs already convert to utf8. */
++  if (!filename_utf8)
++    {
++      filename_utf8 = g_locale_to_utf8 (filename, -1, NULL, NULL, NULL);
++    }
++
++  /* Last fallback is guranteed to never be NULL so in doubt we can still fail
++     later showing a filename that can't be found to the user etc.*/
++  if (!filename_utf8)
++    {
++      filename_utf8 = g_filename_display_name (filename);
++    }
+ 
+   store = GTK_LIST_STORE (gtk_tree_view_get_model
+                           (GTK_TREE_VIEW (fileman->list_files)));
diff --git a/debian/patches/0004-Fix-listing-of-algorithm-keysize-in-the-subkey-windo.patch b/debian/patches/0004-Fix-listing-of-algorithm-keysize-in-the-subkey-windo.patch
new file mode 100644
index 0000000..9521931
--- /dev/null
+++ b/debian/patches/0004-Fix-listing-of-algorithm-keysize-in-the-subkey-windo.patch
@@ -0,0 +1,28 @@
+From: Werner Koch <wk at gnupg.org>
+Date: Wed, 13 Sep 2017 07:49:45 +0200
+Subject: Fix listing of algorithm/keysize in the subkey window.
+
+* src/gpasubkeylist.c (gpa_subkey_list_set_key): Use the current
+subkey.
+--
+
+GnuPG-bug-id: 3405
+Signed-off-by: Werner Koch <wk at gnupg.org>
+(cherry picked from commit 7fb061b1d784bce2e85664b097e4266a15a4fd01)
+---
+ src/gpasubkeylist.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/gpasubkeylist.c b/src/gpasubkeylist.c
+index 9862521..2039e0a 100644
+--- a/src/gpasubkeylist.c
++++ b/src/gpasubkeylist.c
+@@ -253,7 +253,7 @@ gpa_subkey_list_set_key (GtkWidget *list, gpgme_key_t key)
+             *p = 0;
+ 
+ #if GPGME_VERSION_NUMBER >= 0x010601  /* GPGME >= 1.6.1 */
+-          algostr_buf = gpgme_pubkey_algo_string (key->subkeys);
++          algostr_buf = gpgme_pubkey_algo_string (subkey);
+           algostr = algostr_buf? algostr_buf : "?";
+ #else  /* GPGME < 1.6.1 */
+           algostr = gpgme_pubkey_algo_name (subkey->pubkey_algo),
diff --git a/debian/patches/add_desktop_file_exec_flag.patch b/debian/patches/add_desktop_file_exec_flag.patch
deleted file mode 100644
index 778f7c9..0000000
--- a/debian/patches/add_desktop_file_exec_flag.patch
+++ /dev/null
@@ -1,17 +0,0 @@
-Author: Andreas Rönnquist <gusnan at debian.org>
-Description: Silence lintian warning desktop-mime-but-no-exec-code
- Add F exec code to desktop file to make the desktop file aware that
- the gpa executable can take several files. If the application can
- indeed handle files of the listed mime types, it should specify a
- way to pass the filenames as parameters.
---- a/gpa.desktop
-+++ b/gpa.desktop
-@@ -5,7 +5,7 @@
- GenericName=GNU Privacy Assistant
- GenericName[sv]=GNU Integritets-hjälpreda
- GenericName[en_US.ISO8859-1]=GNU Privacy Assistant
--Exec=gpa
-+Exec=gpa %F
- Icon=gpa
- Terminal=false
- Type=Application
diff --git a/debian/patches/add_desktop_file_keywords.patch b/debian/patches/add_desktop_file_keywords.patch
deleted file mode 100644
index 9456a28..0000000
--- a/debian/patches/add_desktop_file_keywords.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-Author: Andreas Rönnquist
-Description: Add keywords to the desktop file to silence lintian
-Forwarded: http://lists.gnupg.org/pipermail/gnupg-users/2014-September/050818.html
---- a/gpa.desktop
-+++ b/gpa.desktop
-@@ -10,3 +10,5 @@
- Terminal=false
- Type=Application
- Categories=GTK;Application;Security;Utility;
-+Keywords=keyring;encryption;security;sign;
-+MimeType=application/pgp-encrypted
-
diff --git a/debian/patches/gnupg2.patch b/debian/patches/gnupg2.patch
index 5c53752..92014c1 100644
--- a/debian/patches/gnupg2.patch
+++ b/debian/patches/gnupg2.patch
@@ -1,10 +1,17 @@
-Author: Daniel Leidert <dleidert at debian.org>
-Description: Make sure to check for gnupg2 binary and helpers.
+From: Daniel Leidert <dleidert at debian.org>
+Date: Mon, 5 Feb 2018 23:58:23 -0500
+Subject: Make sure to check for gnupg2 binary and helpers.
+
 Forwarded: no
+---
+ configure.ac | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
 
+diff --git a/configure.ac b/configure.ac
+index ca7c0a8..848bf54 100644
 --- a/configure.ac
 +++ b/configure.ac
-@@ -193,7 +193,7 @@
+@@ -193,7 +193,7 @@ AM_CONDITIONAL(ENABLE_KEYSERVER_SUPPORT, test "$keyserver_support" = yes)
  # Find the keyserver plugins. Assume that gpgkeys_ldap is always available
  #
  if test "$keyserver_support" = yes ; then
diff --git a/debian/patches/series b/debian/patches/series
index ff45af9..236f1d0 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,3 +1,4 @@
 gnupg2.patch
-add_desktop_file_keywords.patch
-add_desktop_file_exec_flag.patch
+0002-Add-mimetimes-to-gpa.desktop.patch
+0003-Fix-crash-on-filename-conversion-error.patch
+0004-Fix-listing-of-algorithm-keysize-in-the-subkey-windo.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-gnupg/gpa.git



More information about the Pkg-gnupg-commit mailing list