[Gpg4win-commits] [git] Gpg4win - branch, master, updated. gpg4win-2.2.1-24-gf529330

by Andre Heinecke cvs at cvs.gnupg.org
Tue Aug 12 12:24:02 CEST 2014


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GnuPG for Windows".

The branch, master has been updated
       via  f529330a98188e237ad8194effb971c052be9879 (commit)
      from  399bddc6fe814c0e1ecfeef796871b071f318e05 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit f529330a98188e237ad8194effb971c052be9879
Author: Andre Heinecke <aheinecke at intevation.de>
Date:   Tue Aug 12 12:22:33 2014 +0200

    Add patch for dirmngr gcrypt 1.6 compatibilty
    
        * patches/dirmngr-1.1.0/01-mmap.patch: Removed obsolete patch.
        * patches/dirmngr-1.1.1/dirmngr-pth.patch: New.
    
    --
    
        See g10code issue 1590

diff --git a/patches/dirmngr-1.1.0/01-mmap.patch b/patches/dirmngr-1.1.0/01-mmap.patch
deleted file mode 100755
index 3233d83..0000000
--- a/patches/dirmngr-1.1.0/01-mmap.patch
+++ /dev/null
@@ -1,97 +0,0 @@
-#! /bin/sh
-patch -p0 -f $* < $0
-exit $?
-
-src/
-2010-12-14  Werner Koch  <wk at g10code.com>
-
-	* cdb.h (struct cdb) [W32]: Add field CDB_MAPPING.
-	* cdblib.c (cdb_init) [W32]: Save mapping handle.
-	(cdb_free) [W32]: Don't leak the mapping handle from cdb_init by
-	using the saved one.  Fixes bug#1010.
-
-src/
-2010-12-17 Werner Koch  <wk at g10code.com>
-
-        * crlcache.c (crl_cache_insert): Try to close unused but open
-        cache files.  Backported from GnuPG trunk.
-
-
---- src/cdblib.c	(revision 345)
-+++ src/cdblib.c	(working copy)
-@@ -138,6 +138,7 @@
-   mem = (unsigned char *)MapViewOfFile(hMapping, FILE_MAP_READ, 0, 0, 0);
-   if (!mem)
-     return -1;
-+  cdbp->cdb_mapping = hMapping;
- #else
-   mem = (unsigned char*)mmap(NULL, fsize, PROT_READ, MAP_SHARED, fd, 0);
-   if (mem == MAP_FAILED)
-@@ -174,13 +175,9 @@
- {
-   if (cdbp->cdb_mem) {
- #ifdef _WIN32
--    HANDLE hFile, hMapping;
--#endif
--#ifdef _WIN32
--    hFile = (HANDLE) _get_osfhandle(cdbp->cdb_fd);
--    hMapping = CreateFileMapping(hFile, NULL, PAGE_READONLY, 0, 0, NULL);
-     UnmapViewOfFile((void*) cdbp->cdb_mem);
--    CloseHandle(hMapping);
-+    CloseHandle (cdbp->cdb_mapping);
-+    cdbp->cdb_mapping = NULL;
- #else
-     munmap((void*)cdbp->cdb_mem, cdbp->cdb_fsize);
- #endif /* _WIN32 */
-
-
---- src/cdb.h	(revision 345)
-+++ src/cdb.h	(working copy)
-@@ -20,6 +20,9 @@
- struct cdb {
-   int cdb_fd;			/* file descriptor */
-   /* private members */
-+#ifdef HAVE_W32_SYSTEM
-+  void *cdb_mapping;            /* Mapping handle.  */
-+#endif
-   cdbi_t cdb_fsize;		/* datafile size */
-   const unsigned char *cdb_mem; /* mmap'ed file memory */
-   cdbi_t cdb_vpos, cdb_vlen;	/* found data */
-
-
---- src/crlcache.c~     2009-08-07 14:00:17.000000000 +0200
-+++ src/crlcache.c      2010-12-17 16:42:13.000000000 +0100
-@@ -2166,6 +2166,32 @@ crl_cache_insert (ctrl_t ctrl, const cha
-   newfname = make_db_file_name (entry->issuer_hash);
-   if (opt.verbose)
-     log_info (_("creating cache file `%s'\n"), newfname);
-+
-+  /* Just in case close unused matching files.  Actually we need this
-+     only under Windows but saving file descriptors is never bad.  */
-+  {
-+    int any;
-+    do 
-+      {
-+        any = 0;
-+        for (e = cache->entries; e; e = e->next)
-+          if (!e->cdb_use_count && e->cdb
-+              && !strcmp (e->issuer_hash, entry->issuer_hash))
-+            {
-+              int fd = cdb_fileno (e->cdb);
-+              cdb_free (e->cdb);
-+              xfree (e->cdb);
-+              e->cdb = NULL;
-+              if (close (fd))
-+                log_error (_("error closing cache file: %s\n"),
-+                           strerror(errno));
-+              any = 1;
-+              break;
-+            }
-+      }
-+    while (any);
-+  }
-+
- #ifdef HAVE_W32_SYSTEM
-   unlink (newfname);
- #endif
-
diff --git a/patches/dirmngr-1.1.1/dirmngr-pth.patch b/patches/dirmngr-1.1.1/dirmngr-pth.patch
new file mode 100755
index 0000000..bc33829
--- /dev/null
+++ b/patches/dirmngr-1.1.1/dirmngr-pth.patch
@@ -0,0 +1,21 @@
+#! /bin/sh
+patch -p0 -l -f $* < $0
+exit $?
+
+Index: src/dirmngr.c
+===================================================================
+--- src/dirmngr.c	(revision 348)
++++ src/dirmngr.c	(working copy)
+@@ -665,8 +665,11 @@
+      the option parsing may need services of the libraries. */
+
+   /* Libgcrypt requires us to register the threading model first.
+-     Note that this will also do the pth_init. */
++     Note that this will also do the pth_init for libgcrypt < 1.6 */
+
++#if GCRYPT_VERSION_NUMBER >= 0x010600
++  pth_init ();
++#endif
+   /* Init Libgcrypt. */
+   rc = gcry_control (GCRYCTL_SET_THREAD_CBS, &gcry_threads_pth);
+   if (rc)

-----------------------------------------------------------------------

Summary of changes:
 patches/dirmngr-1.1.0/01-mmap.patch     |   97 -------------------------------
 patches/dirmngr-1.1.1/dirmngr-pth.patch |   21 +++++++
 2 files changed, 21 insertions(+), 97 deletions(-)
 delete mode 100755 patches/dirmngr-1.1.0/01-mmap.patch
 create mode 100755 patches/dirmngr-1.1.1/dirmngr-pth.patch


hooks/post-receive
-- 
GnuPG for Windows
http://git.gnupg.org



More information about the Gpg4win-commits mailing list