--- /dev/null
+--- libgcrypt-1.5.1/configure.ac.orig 2013-03-18 16:01:39.000000000 +0100
++++ libgcrypt-1.5.1/configure.ac 2013-03-22 22:19:39.288273059 +0100
+@@ -72,7 +72,7 @@
+
+ AC_CONFIG_SRCDIR([src/libgcrypt.vers])
+ AM_INIT_AUTOMAKE
+-AM_CONFIG_HEADER(config.h)
++AC_CONFIG_HEADERS(config.h)
+ AC_CONFIG_MACRO_DIR([m4])
+ AC_CONFIG_LIBOBJ_DIR([compat])
+ AC_CANONICAL_HOST
---- libgcrypt-1.5.0/random/rndlinux.c.orig 2011-02-04 20:16:03.000000000 +0100
-+++ libgcrypt-1.5.0/random/rndlinux.c 2011-07-03 11:04:00.391674161 +0200
+--- libgcrypt-1.5.1/random/rndlinux.c.orig 2012-11-29 15:22:35.000000000 +0100
++++ libgcrypt-1.5.1/random/rndlinux.c 2013-03-22 22:16:30.431614318 +0100
@@ -32,6 +32,7 @@
#include <string.h>
#include <unistd.h>
#include "types.h"
#include "g10lib.h"
#include "rand-internal.h"
-@@ -130,15 +131,12 @@
+@@ -130,24 +131,13 @@
return with something we will actually use 100ms. */
while (length)
{
+ struct pollfd fds;
int rc;
-- 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)) )
-+ fds.fd = fd;
-+ fds.events = POLLIN;
-+ if ( !(rc=poll(&fds, 1, delay ? (delay*1000) : 100)) )
+- /* 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
{
- if (!any_need_entropy || last_so_far != (want - length) )
+- 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)) )
++ fds.fd = fd;
++ fds.events = POLLIN;
++ if ( !(rc=poll(&fds, 1, delay ? (delay*1000) : 100)) )
{
-@@ -152,7 +150,7 @@
- }
- else if( rc == -1 )
- {
-- log_error ("select() error: %s\n", strerror(errno));
-+ log_error ("poll() error: %s\n", strerror(errno));
- if (!delay)
- delay = 1; /* Use 1 second if we encounter an error before
+ if (!any_need_entropy || last_so_far != (want - length) )
+ {
+@@ -161,7 +151,7 @@
+ }
+ else if( rc == -1 )
+ {
+- log_error ("select() error: %s\n", strerror(errno));
++ log_error ("poll() error: %s\n", strerror(errno));
+ if (!delay)
+ delay = 1; /* Use 1 second if we encounter an error before
we have ever blocked. */
#
# Conditional build:
%bcond_without dietlibc # don't build static dietlibc library
+%bcond_without libcap # Linux capabilities usage
#
Summary: Cryptographic library based on the code from GnuPG
Summary(es.UTF-8): Libgcrypt es una biblioteca general de desarrole embasada em GnuPG
Summary(pl.UTF-8): Biblioteka kryptograficzna oparta na kodzie GnuPG
Summary(pt_BR.UTF-8): libgcrypt é uma biblioteca de criptografia de uso geral baseada no GnuPG
Name: libgcrypt
-Version: 1.5.0
+Version: 1.5.1
Release: 1
License: LGPL v2.1+
Group: Libraries
-# devel versions:
-#Source0: ftp://ftp.gnupg.org/gcrypt/alpha/libgcrypt/%{name}-%{version}.tar.gz
Source0: ftp://ftp.gnupg.org/gcrypt/libgcrypt/%{name}-%{version}.tar.bz2
-# Source0-md5: 693f9c64d50c908bc4d6e01da3ff76d8
+# Source0-md5: 5be3cc6e105db5d64c318127a5c10c94
Patch0: %{name}-info.patch
Patch1: %{name}-libgcrypt_config.patch
Patch2: %{name}-poll.patch
+Patch3: %{name}-am.patch
URL: http://www.gnu.org/directory/security/libgcrypt.html
BuildRequires: autoconf >= 2.60
-BuildRequires: automake >= 1:1.10
+BuildRequires: automake >= 1:1.11
BuildRequires: binutils >= 2:2.12
%{?with_dietlibc:BuildRequires: dietlibc-static >= 2:0.31-5}
BuildRequires: gcc >= 5:3.2
+%{?with_libcap:BuildRequires: libcap-devel}
BuildRequires: libgpg-error-devel >= 1.8
BuildRequires: libtool >= 2:2.2.6
BuildRequires: texinfo
Summary(pt_BR.UTF-8): Arquivos de desenvolvimento da libgcrypt
Group: Development/Libraries
Requires: %{name} = %{version}-%{release}
+%{?with_libcap:Requires: libcap-devel}
Requires: libgpg-error-devel >= 1.8
%description devel
%patch0 -p1
%patch1 -p1
%patch2 -p1
+%patch3 -p1
%build
%{__rm} m4/libtool.m4
%endif
%configure \
- --enable-static
+ --enable-static \
+ %{?with_libcap:--with-capabilities}
%{__make}