[Pkg-gnupg-commit] [gnupg2] 195/205: drop patches already applied or otherwise addressed upstream

Daniel Kahn Gillmor dkg at fifthhorseman.net
Wed May 11 08:38:47 UTC 2016


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

dkg pushed a commit to branch experimental
in repository gnupg2.

commit 33fdc5ee4cda829e1f6cf3cefe749011832eee5f
Author: Daniel Kahn Gillmor <dkg at fifthhorseman.net>
Date:   Tue May 10 21:10:13 2016 -0400

    drop patches already applied or otherwise addressed upstream
---
 ...ge-simple_query-to-ignore-status-messages.patch | 132 ---------------------
 ...06-use-GPG_NAME-in-how_to_fix_the_trustdb.patch |  30 -----
 ...not-error-out-if-gpgconf-is-not-installed.patch |  31 -----
 ...lled-gpg-and-gpgv-when-enable-gpg2-is-gpg.patch |  68 -----------
 debian/patches/series                              |   4 -
 debian/rules                                       |   2 -
 6 files changed, 267 deletions(-)

diff --git a/debian/patches/0005-common-Change-simple_query-to-ignore-status-messages.patch b/debian/patches/0005-common-Change-simple_query-to-ignore-status-messages.patch
deleted file mode 100644
index f175c05..0000000
--- a/debian/patches/0005-common-Change-simple_query-to-ignore-status-messages.patch
+++ /dev/null
@@ -1,132 +0,0 @@
-From: "Neal H. Walfield" <neal at g10code.com>
-Date: Fri, 12 Feb 2016 22:12:21 +0100
-Subject: common: Change simple_query to ignore status messages.
-
-* common/simple-pwquery.c (simple_query): Ignore status messages.
-
---
-Signed-off-by: Neal H. Walfield <neal at g10code.com>
-GnuPG-bug-id: 2229
----
- common/simple-pwquery.c | 95 ++++++++++++++++++++++++++++++++++---------------
- 1 file changed, 67 insertions(+), 28 deletions(-)
-
-diff --git a/common/simple-pwquery.c b/common/simple-pwquery.c
-index 90d04c0..b2d666c 100644
---- a/common/simple-pwquery.c
-+++ b/common/simple-pwquery.c
-@@ -618,6 +618,7 @@ simple_query (const char *query)
-   int fd = -1;
-   int nread;
-   char response[500];
-+  int have = 0;
-   int rc;
- 
-   rc = agent_open (&fd);
-@@ -628,40 +629,78 @@ simple_query (const char *query)
-   if (rc)
-     goto leave;
- 
--  /* get response */
--  nread = readline (fd, response, 499);
--  if (nread < 0)
--    {
--      rc = -nread;
--      goto leave;
--    }
--  if (nread < 3)
-+  while (1)
-     {
--      rc = SPWQ_PROTOCOL_ERROR;
--      goto leave;
--    }
-+      if (! have || ! strchr (response, '\n'))
-+        /* get response */
-+        {
-+          nread = readline (fd, &response[have],
-+                            sizeof (response) - 1 /* NUL */ - have);
-+          if (nread < 0)
-+            {
-+              rc = -nread;
-+              goto leave;
-+            }
-+          have += nread;
-+          if (have < 3)
-+            {
-+              rc = SPWQ_PROTOCOL_ERROR;
-+              goto leave;
-+            }
-+          response[have] = 0;
-+        }
- 
--  if (response[0] == 'O' && response[1] == 'K')
--    /* OK, do nothing.  */;
--  else if ((nread > 7 && !memcmp (response, "ERR 111", 7)
--            && (response[7] == ' ' || response[7] == '\n') )
--           || ((nread > 4 && !memcmp (response, "ERR ", 4)
--                && (strtoul (response+4, NULL, 0) & 0xffff) == 99)) )
--    {
--      /* 111 is the old Assuan code for canceled which might still
--         be in use by old installations. 99 is GPG_ERR_CANCELED as
--         used by modern gpg-agents; 0xffff is used to mask out the
--         error source.  */
-+      if (response[0] == 'O' && response[1] == 'K')
-+        /* OK, do nothing.  */;
-+      else if ((nread > 7 && !memcmp (response, "ERR 111", 7)
-+                && (response[7] == ' ' || response[7] == '\n') )
-+               || ((nread > 4 && !memcmp (response, "ERR ", 4)
-+                    && (strtoul (response+4, NULL, 0) & 0xffff) == 99)) )
-+        {
-+          /* 111 is the old Assuan code for canceled which might still
-+             be in use by old installations. 99 is GPG_ERR_CANCELED as
-+             used by modern gpg-agents; 0xffff is used to mask out the
-+             error source.  */
- #ifdef SPWQ_USE_LOGGING
--      log_info (_("canceled by user\n") );
-+          log_info (_("canceled by user\n") );
- #endif
--    }
--  else
--    {
-+        }
-+      else if (response[0] == 'S' && response[1] == ' ')
-+        {
-+          char *nextline;
-+          int consumed;
-+
-+          nextline = strchr (response, '\n');
-+          if (! nextline)
-+            /* Point to the NUL.  */
-+            nextline = &response[have];
-+          else
-+            /* Move past the \n.  */
-+            nextline ++;
-+
-+          consumed = (size_t) nextline - (size_t) response;
-+
-+          /* Skip any additional newlines.  */
-+          while (consumed < have && response[consumed] == '\n')
-+            consumed ++;
-+
-+          have -= consumed;
-+
-+          if (have)
-+            memmove (response, &response[consumed], have + 1);
-+
-+          continue;
-+        }
-+      else
-+        {
- #ifdef SPWQ_USE_LOGGING
--      log_error (_("problem with the agent\n"));
-+          log_error (_("problem with the agent (unexpected response \"%s\"\n"),
-+                     response);
- #endif
--      rc = SPWQ_ERR_RESPONSE;
-+          rc = SPWQ_ERR_RESPONSE;
-+        }
-+
-+      break;
-     }
- 
-  leave:
diff --git a/debian/patches/0006-use-GPG_NAME-in-how_to_fix_the_trustdb.patch b/debian/patches/0006-use-GPG_NAME-in-how_to_fix_the_trustdb.patch
deleted file mode 100644
index ad8681f..0000000
--- a/debian/patches/0006-use-GPG_NAME-in-how_to_fix_the_trustdb.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-From: Daniel Kahn Gillmor <dkg at fifthhorseman.net>
-Date: Wed, 30 Mar 2016 10:22:39 -0400
-Subject: use GPG_NAME in how_to_fix_the_trustdb()
-
-* g10/trustdb.c: (how_to_fix_the_trustdb) use GPG_NAME explicitly
-  instead of hardcoding gpg2
----
- g10/trustdb.c | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/g10/trustdb.c b/g10/trustdb.c
-index 8f2b2cb..81d0a1a 100644
---- a/g10/trustdb.c
-+++ b/g10/trustdb.c
-@@ -421,13 +421,13 @@ how_to_fix_the_trustdb ()
- 
-   log_info (_("You may try to re-create the trustdb using the commands:\n"));
-   log_info ("  cd %s\n", default_homedir ());
--  log_info ("  gpg2 --export-ownertrust > otrust.tmp\n");
-+  log_info ("  " GPG_NAME " --export-ownertrust > otrust.tmp\n");
- #ifdef HAVE_W32_SYSTEM
-   log_info ("  del %s\n", name);
- #else
-   log_info ("  rm %s\n", name);
- #endif
--  log_info ("  gpg2 --import-ownertrust < otrust.tmp\n");
-+  log_info ("  " GPG_NAME " --import-ownertrust < otrust.tmp\n");
-   log_info (_("If that does not work, please consult the manual\n"));
- }
- 
diff --git a/debian/patches/0006-w32-Do-not-error-out-if-gpgconf-is-not-installed.patch b/debian/patches/0006-w32-Do-not-error-out-if-gpgconf-is-not-installed.patch
deleted file mode 100644
index 7984b4d..0000000
--- a/debian/patches/0006-w32-Do-not-error-out-if-gpgconf-is-not-installed.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-From: Werner Koch <wk at gnupg.org>
-Date: Tue, 16 Feb 2016 16:07:44 +0100
-Subject: w32: Do not error out if gpgconf is not installed.
-
-* common/homedir.c (check_portable_app): Remove error message.
---
-
-It is sometimes useful to install just gpgv and no other parts.  Our
-test for a portable application returned an error if gpgconf is not
-installed.  That error is not required but was merely a debug aid.
-
-Signed-off-by: Werner Koch <wk at gnupg.org>
----
- common/homedir.c | 4 +---
- 1 file changed, 1 insertion(+), 3 deletions(-)
-
-diff --git a/common/homedir.c b/common/homedir.c
-index 3918693..e0a88fa 100644
---- a/common/homedir.c
-+++ b/common/homedir.c
-@@ -256,9 +256,7 @@ check_portable_app (const char *dir)
-   char *fname;
- 
-   fname = xstrconcat (dir, DIRSEP_S "gpgconf.exe", NULL);
--  if (access (fname, F_OK))
--    log_error ("required binary '%s' is not installed\n", fname);
--  else
-+  if (!access (fname, F_OK))
-     {
-       strcpy (fname + strlen (fname) - 3, "ctl");
-       if (!access (fname, F_OK))
diff --git a/debian/patches/0007-move-installed-gpg-and-gpgv-when-enable-gpg2-is-gpg.patch b/debian/patches/0007-move-installed-gpg-and-gpgv-when-enable-gpg2-is-gpg.patch
deleted file mode 100644
index e6ae016..0000000
--- a/debian/patches/0007-move-installed-gpg-and-gpgv-when-enable-gpg2-is-gpg.patch
+++ /dev/null
@@ -1,68 +0,0 @@
-From 48331ced4969d9b20b1e2cad0297dd77f4bd339f Mon Sep 17 00:00:00 2001
-From: Daniel Kahn Gillmor <dkg at fifthhorseman.net>
-Date: Wed, 30 Mar 2016 10:56:49 -0400
-Subject: [PATCH] move installed gpg and gpgv when --enable-gpg2-is-gpg
-
-* configure.ac: introduce an automake conditional GPG2_IS_GPG, test
-  for WinCE there.
-* g10/Makefile.am: re-use the WinCE install-exec-hook to move the
-  files into the right location when GPG2_IS_GPG is set
----
- configure.ac    | 14 +++++++++++---
- g10/Makefile.am |  5 +++--
- 2 files changed, 14 insertions(+), 5 deletions(-)
-
-diff --git a/configure.ac b/configure.ac
-index 003e509..30a89cc 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -211,10 +211,18 @@ test -n "$GNUPG_DIRMNGR_LDAP_PGM" \
- # installed name of gpg.  This option sets "gpg2"'s installed name to
- # just "gpg".  Note that it might be required to rename gpg2 to gpg
- # manually after the build process.
--#
-+
- AC_ARG_ENABLE(gpg2-is-gpg,
-     AC_HELP_STRING([--enable-gpg2-is-gpg],[Set installed name of gpg2 to gpg]),
--    gpg2_is_gpg=$enableval)
-+    gpg2_is_gpg=$enableval,
-+    # There has never been a gpg for WindowsCE, so this should default
-+    # to true on that platform.
-+    [case "${host}" in
-+          *-mingw32ce*)
-+                  gpg2_is_gpg=yes
-+                  ;;
-+     esac]
-+ )
- if test "$gpg2_is_gpg" = "yes"; then
-    name_of_installed_gpg=gpg
- else
-@@ -222,7 +230,7 @@ else
- fi
- AC_DEFINE_UNQUOTED(NAME_OF_INSTALLED_GPG, "$name_of_installed_gpg",
-                    [The name of the installed GPG tool])
--
-+AM_CONDITIONAL([GPG2_IS_GPG], [test x$name_of_installed_gpg = xgpg])
- 
- # SELinux support includes tracking of sensitive files to avoid
- # leaking their contents through processing these files by gpg itself
-diff --git a/g10/Makefile.am b/g10/Makefile.am
-index 473a3ac..e16a2c2 100644
---- a/g10/Makefile.am
-+++ b/g10/Makefile.am
-@@ -199,9 +199,10 @@ uninstall-local:
- 	- at rm $(DESTDIR)$(pkgdatadir)/distsigkey.gpg
- 
- 
--# There has never been a gpg for WindowsCE, thus we don't need a gpg2 here
--if HAVE_W32CE_SYSTEM
-+if GPG2_IS_GPG
- install-exec-hook:
- 	mv -f $(DESTDIR)$(bindir)/gpg2$(EXEEXT) \
-               $(DESTDIR)$(bindir)/gpg$(EXEEXT)
-+	mv -f $(DESTDIR)$(bindir)/gpgv2$(EXEEXT) \
-+              $(DESTDIR)$(bindir)/gpgv$(EXEEXT)
- endif
--- 
-2.8.0.rc3
-
diff --git a/debian/patches/series b/debian/patches/series
index 5c62d34..c3cd254 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,7 +1,3 @@
 0002-avoid-beta-warning.patch
 0003-Avoid-simple-memory-dumps-via-ptrace.patch
 0004-avoid-gpgtar.test-when-disable-gpgtar-is-configured.patch
-0005-common-Change-simple_query-to-ignore-status-messages.patch
-0006-w32-Do-not-error-out-if-gpgconf-is-not-installed.patch
-0006-use-GPG_NAME-in-how_to_fix_the_trustdb.patch
-0007-move-installed-gpg-and-gpgv-when-enable-gpg2-is-gpg.patch
diff --git a/debian/rules b/debian/rules
index d1dd0f7..5e69db3 100755
--- a/debian/rules
+++ b/debian/rules
@@ -61,8 +61,6 @@ override_dh_auto_install-arch:
 	install -d debian/gnupg-agent/etc/X11/Xsession.d
 	install -m 644 debian/gnupg-agent.xsession \
 		debian/gnupg-agent/etc/X11/Xsession.d/90gpg-agent
-	# upstream ships the man pages with the wrong names:
-	$(foreach x, gpgv gpg, mv debian/tmp/usr/share/man/man1/$(x)2.1 debian/tmp/usr/share/man/man1/$(x).1 ; )
 
 override_dh_auto_install-indep:
 	mkdir -p debian/gpgv-win32/usr/share/win32

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



More information about the Pkg-gnupg-commit mailing list