[libgcrypt] new upstream version
Tomáš Mráz
tmraz at fedoraproject.org
Wed Mar 20 15:38:10 UTC 2013
commit 1aafe14181fc567907ad0f43384f9ba84c7d655b
Author: Tomas Mraz <tmraz at fedoraproject.org>
Date: Wed Mar 20 16:38:05 2013 +0100
new upstream version
.gitignore | 1 +
libgcrypt-1.5.0-empty-passphrase.patch | 54 -------------
libgcrypt-1.5.0-set-enforced-mode.patch | 127 -------------------------------
libgcrypt-1.5.0-use-poll.patch | 57 --------------
libgcrypt-1.5.1-use-poll.patch | 82 ++++++++++++++++++++
libgcrypt.spec | 17 ++---
sources | 2 +-
7 files changed, 91 insertions(+), 249 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 2daa2a1..2474d69 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,4 @@
libgcrypt-1.4.5-hobbled.tar.bz2
/libgcrypt-1.4.6-hobbled.tar.bz2
/libgcrypt-1.5.0-hobbled.tar.bz2
+/libgcrypt-1.5.1-hobbled.tar.xz
diff --git a/libgcrypt-1.5.1-use-poll.patch b/libgcrypt-1.5.1-use-poll.patch
new file mode 100644
index 0000000..f6ed0b7
--- /dev/null
+++ b/libgcrypt-1.5.1-use-poll.patch
@@ -0,0 +1,82 @@
+diff -up libgcrypt-1.5.1/random/rndlinux.c.use-poll libgcrypt-1.5.1/random/rndlinux.c
+--- libgcrypt-1.5.1/random/rndlinux.c.use-poll 2013-03-20 15:33:26.504867356 +0100
++++ libgcrypt-1.5.1/random/rndlinux.c 2013-03-20 15:37:24.999944048 +0100
+@@ -32,6 +32,7 @@
+ #include <string.h>
+ #include <unistd.h>
+ #include <fcntl.h>
++#include <poll.h>
+ #include "types.h"
+ #include "g10lib.h"
+ #include "rand-internal.h"
+@@ -142,49 +143,37 @@ _gcry_rndlinux_gather_random (void (*add
+ }
+
+ /* Enter the read loop. */
+- delay = 0; /* Start with 0 seconds so that we do no block on the
++ delay = 100; /* Start with 0 seconds so that we do no block on the
+ first iteration and in turn call the progress function
+ before blocking. To give the OS a better chance to
+ return with something we will actually use 100ms. */
+ while (length)
+ {
+- fd_set rfds;
+- struct timeval tv;
+ int rc;
++ struct pollfd pfd;
+
+- /* If the system has no limit on the number of file descriptors
+- and we encounter an fd which is larger than the fd_set size,
+- we don't use the select at all. The select code is only used
+- to emit progress messages. A better solution would be to
+- fall back to poll() if available. */
+-#ifdef FD_SETSIZE
+- if (fd < FD_SETSIZE)
+-#endif
++ pfd.fd = fd;
++ pfd.events = POLLIN;
++
++ if ( !(rc=poll(&pfd, 1, delay)) )
+ {
+- FD_ZERO(&rfds);
+- FD_SET(fd, &rfds);
+- tv.tv_sec = delay;
+- tv.tv_usec = delay? 0 : 100000;
+- if ( !(rc=select(fd+1, &rfds, NULL, NULL, &tv)) )
+- {
+- if (!any_need_entropy || last_so_far != (want - length) )
+- {
+- last_so_far = want - length;
+- _gcry_random_progress ("need_entropy", 'X',
+- (int)last_so_far, (int)want);
+- any_need_entropy = 1;
+- }
+- delay = 3; /* Use 3 seconds henceforth. */
+- continue;
+- }
+- else if( rc == -1 )
++ if (!any_need_entropy || last_so_far != (want - length) )
+ {
+- log_error ("select() error: %s\n", strerror(errno));
+- if (!delay)
+- delay = 1; /* Use 1 second if we encounter an error before
++ last_so_far = want - length;
++ _gcry_random_progress ("need_entropy", 'X',
++ (int)last_so_far, (int)want);
++ 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
+ we have ever blocked. */
+- continue;
+- }
++ continue;
+ }
+
+ do
diff --git a/libgcrypt.spec b/libgcrypt.spec
index 12b34ca..bf35271 100644
--- a/libgcrypt.spec
+++ b/libgcrypt.spec
@@ -1,8 +1,8 @@
Name: libgcrypt
-Version: 1.5.0
-Release: 11%{?dist}
+Version: 1.5.1
+Release: 1%{?dist}
URL: http://www.gnupg.org/
-Source0: libgcrypt-%{version}-hobbled.tar.bz2
+Source0: libgcrypt-%{version}-hobbled.tar.xz
# The original libgcrypt sources now contain potentially patented ECC
# cipher support. We have to remove it in the tarball we ship with
# the hobble-libgcrypt script.
@@ -21,14 +21,10 @@ Patch5: libgcrypt-1.5.0-tests.patch
Patch6: libgcrypt-1.5.0-fips-cfgrandom.patch
# make the FIPS-186-3 DSA CAVS testable
Patch7: libgcrypt-1.5.0-fips-cavs.patch
-# add GCRYCTL_SET_ENFORCED_FIPS_FLAG
-Patch8: libgcrypt-1.5.0-set-enforced-mode.patch
# fix for memory leaks an other errors found by Coverity scan
Patch9: libgcrypt-1.5.0-leak.patch
-# allow empty passphrase (upstreamed)
-Patch10: libgcrypt-1.5.0-empty-passphrase.patch
# use poll instead of select when gathering randomness
-Patch11: libgcrypt-1.5.0-use-poll.patch
+Patch11: libgcrypt-1.5.1-use-poll.patch
# Technically LGPLv2.1+, but Fedora's table doesn't draw a distinction.
# Documentation and some utilities are GPLv2+ licensed. These files
@@ -68,9 +64,7 @@ applications using libgcrypt.
%patch5 -p1 -b .tests
%patch6 -p1 -b .cfgrandom
%patch7 -p1 -b .cavs
-%patch8 -p1 -b .enforce
%patch9 -p1 -b .leak
-%patch10 -p1 -b .emptypass
%patch11 -p1 -b .use-poll
mv AUTHORS AUTHORS.iso88591
@@ -185,6 +179,9 @@ exit 0
%doc COPYING
%changelog
+* Wed Mar 20 2013 Tomas Mraz <tmraz at redhat.com> 1.5.1-1
+- new upstream version
+
* Tue Mar 5 2013 Tomas Mraz <tmraz at redhat.com> 1.5.0-11
- use poll() instead of select() when gathering randomness (#913773)
diff --git a/sources b/sources
index 28984ca..e3421d3 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-35a73c1f2616ad904108ed8645c82f4c libgcrypt-1.5.0-hobbled.tar.bz2
+ec6ed0e0c3ad51a4a3d15e730cab0f6a libgcrypt-1.5.1-hobbled.tar.xz
More information about the scm-commits
mailing list