From 1c953f2503ffde8ca5d8cc000b464adf0baa6f61 Mon Sep 17 00:00:00 2001 From: Tomas Mraz Date: Mon, 30 Jan 2017 18:05:13 +0100 Subject: [PATCH] new upstream version 1.7.6 --- .gitignore | 1 + ...ll.patch => libgcrypt-1.7.6-use-poll.patch | 34 +++++++++---------- libgcrypt.spec | 7 ++-- sources | 2 +- 4 files changed, 24 insertions(+), 20 deletions(-) rename libgcrypt-1.7.3-use-poll.patch => libgcrypt-1.7.6-use-poll.patch (79%) diff --git a/.gitignore b/.gitignore index 7be4383..3aa8d24 100644 --- a/.gitignore +++ b/.gitignore @@ -12,3 +12,4 @@ libgcrypt-1.4.5-hobbled.tar.bz2 /libgcrypt-1.6.6-hobbled.tar.xz /libgcrypt-1.7.3-hobbled.tar.xz /libgcrypt-1.7.5-hobbled.tar.xz +/libgcrypt-1.7.6-hobbled.tar.xz diff --git a/libgcrypt-1.7.3-use-poll.patch b/libgcrypt-1.7.6-use-poll.patch similarity index 79% rename from libgcrypt-1.7.3-use-poll.patch rename to libgcrypt-1.7.6-use-poll.patch index 16b7164..4ec20ce 100644 --- a/libgcrypt-1.7.3-use-poll.patch +++ b/libgcrypt-1.7.6-use-poll.patch @@ -1,6 +1,6 @@ -diff -up libgcrypt-1.7.3/random/rndlinux.c.use-poll libgcrypt-1.7.3/random/rndlinux.c ---- libgcrypt-1.7.3/random/rndlinux.c.use-poll 2016-11-22 16:05:05.114761069 +0100 -+++ libgcrypt-1.7.3/random/rndlinux.c 2016-11-22 16:16:05.373139721 +0100 +diff -up libgcrypt-1.7.6/random/rndlinux.c.use-poll libgcrypt-1.7.6/random/rndlinux.c +--- libgcrypt-1.7.6/random/rndlinux.c.use-poll 2017-01-30 14:20:13.665662981 +0100 ++++ libgcrypt-1.7.6/random/rndlinux.c 2017-01-30 14:27:45.957027214 +0100 @@ -32,6 +32,7 @@ #include #include @@ -9,7 +9,7 @@ diff -up libgcrypt-1.7.3/random/rndlinux.c.use-poll libgcrypt-1.7.3/random/rndli #if defined(__linux__) && defined(HAVE_SYSCALL) # include #endif -@@ -211,9 +212,11 @@ _gcry_rndlinux_gather_random (void (*add +@@ -211,9 +212,8 @@ _gcry_rndlinux_gather_random (void (*add return with something we will actually use 100ms. */ while (length) { @@ -17,13 +17,10 @@ diff -up libgcrypt-1.7.3/random/rndlinux.c.use-poll libgcrypt-1.7.3/random/rndli - struct timeval tv; int rc; + struct pollfd pfd; -+ -+ pfd.fd = fd; -+ pfd.events = POLLIN; - /* If we collected some bytes update the progress indicator. We - do this always and not just if the select timed out because -@@ -227,33 +230,19 @@ _gcry_rndlinux_gather_random (void (*add + /* If we have a modern Linux kernel and we want to read from the + * the non-blocking /dev/urandom, we first try to use the new +@@ -269,33 +269,22 @@ _gcry_rndlinux_gather_random (void (*add any_need_entropy = 1; } @@ -35,13 +32,10 @@ diff -up libgcrypt-1.7.3/random/rndlinux.c.use-poll libgcrypt-1.7.3/random/rndli -#ifdef FD_SETSIZE - if (fd < FD_SETSIZE) -#endif ++ pfd.fd = fd; ++ pfd.events = POLLIN; ++ + if ( !(rc=poll(&pfd, 1, delay)) ) -+ { -+ any_need_entropy = 1; -+ delay = 3000; /* Use 3 seconds henceforth. */ -+ continue; -+ } -+ else if( rc == -1 ) { - FD_ZERO(&rfds); - FD_SET(fd, &rfds); @@ -61,6 +55,12 @@ diff -up libgcrypt-1.7.3/random/rndlinux.c.use-poll libgcrypt-1.7.3/random/rndli - we have ever blocked. */ - continue; - } ++ any_need_entropy = 1; ++ delay = 3000; /* Use 3 seconds henceforth. */ ++ continue; ++ } ++ else if( rc == -1 ) ++ { + log_error ("poll() error: %s\n", strerror(errno)); + if (!delay) + delay = 1000; /* Use 1 second if we encounter an error before @@ -68,4 +68,4 @@ diff -up libgcrypt-1.7.3/random/rndlinux.c.use-poll libgcrypt-1.7.3/random/rndli + continue; } - /* If we have a modern Linux kernel and we want to read from the + /* Read from the device. */ diff --git a/libgcrypt.spec b/libgcrypt.spec index b4487b2..068e1ba 100644 --- a/libgcrypt.spec +++ b/libgcrypt.spec @@ -1,5 +1,5 @@ Name: libgcrypt -Version: 1.7.5 +Version: 1.7.6 Release: 1%{?dist} URL: http://www.gnupg.org/ Source0: libgcrypt-%{version}-hobbled.tar.xz @@ -27,7 +27,7 @@ Patch6: libgcrypt-1.7.3-fips-cfgrandom.patch # update the CAVS tests Patch7: libgcrypt-1.7.3-fips-cavs.patch # use poll instead of select when gathering randomness -Patch11: libgcrypt-1.7.3-use-poll.patch +Patch11: libgcrypt-1.7.6-use-poll.patch # slight optimalization of mpicoder.c to silence Valgrind (#968288) Patch13: libgcrypt-1.6.1-mpicoder-gccopt.patch # fix tests to work with approved ECC @@ -197,6 +197,9 @@ exit 0 %license COPYING %changelog +* Mon Jan 30 2017 Tomáš Mráz 1.7.6-1 +- new upstream version 1.7.6 + * Fri Dec 16 2016 Tomáš Mráz 1.7.5-1 - new upstream version 1.7.5 diff --git a/sources b/sources index 93082e7..e4f2850 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (libgcrypt-1.7.5-hobbled.tar.xz) = 687a4d01e02d8a92faeec6e9e9a3dbd32e71df9da83c2f1d69c2d8a625ce572d1ee1f025f4b5563b294f450849d65ce3da31a9e9f9cd47438da3b558e6e15c77 +SHA512 (libgcrypt-1.7.6-hobbled.tar.xz) = 4aa981f4b270e480324dc3b021781c0b01a0f1fc5950654ccd379d47acbb791a2df612f212191ecac50c39a7ba83cc62de9a9271c663aad6d49721de14ecced5