[packages/libgcrypt] - updated to 1.5.1 - updated poll patch - added am patch (fixes build with automake 1.13) - enabled

qboosh qboosh at pld-linux.org
Fri Mar 22 22:36:03 CET 2013


commit 9f8871960010f3bc37b2fc3e12109b7f2b59c5e1
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Fri Mar 22 22:35:59 2013 +0100

    - updated to 1.5.1
    - updated poll patch
    - added am patch (fixes build with automake 1.13)
    - enabled capabilities

 libgcrypt-am.patch   | 11 +++++++++++
 libgcrypt-poll.patch | 49 +++++++++++++++++++++++++++++--------------------
 libgcrypt.spec       | 16 ++++++++++------
 3 files changed, 50 insertions(+), 26 deletions(-)
---
diff --git a/libgcrypt.spec b/libgcrypt.spec
index 8ab4e0b..3e2b5c6 100644
--- a/libgcrypt.spec
+++ b/libgcrypt.spec
@@ -1,29 +1,30 @@
 #
 # 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
@@ -63,6 +64,7 @@ Summary(pl.UTF-8):	Pliki nagłówkowe i inne do libgcrypt
 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
@@ -108,6 +110,7 @@ Biblioteka statyczna dietlibc libgcrypt.
 %patch0 -p1
 %patch1 -p1
 %patch2 -p1
+%patch3 -p1
 
 %build
 %{__rm} m4/libtool.m4
@@ -133,7 +136,8 @@ mv src/.libs/libgcrypt.a diet-libgcrypt.a
 %endif
 
 %configure \
-	--enable-static
+	--enable-static \
+	%{?with_libcap:--with-capabilities}
 
 %{__make}
 
diff --git a/libgcrypt-am.patch b/libgcrypt-am.patch
new file mode 100644
index 0000000..ed303b9
--- /dev/null
+++ b/libgcrypt-am.patch
@@ -0,0 +1,11 @@
+--- 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
diff --git a/libgcrypt-poll.patch b/libgcrypt-poll.patch
index 04afd84..088a5cd 100644
--- a/libgcrypt-poll.patch
+++ b/libgcrypt-poll.patch
@@ -1,5 +1,5 @@
---- 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>
@@ -8,7 +8,7 @@
  #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)
      {
@@ -17,23 +17,32 @@
 +      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.  */
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/libgcrypt.git/commitdiff/9f8871960010f3bc37b2fc3e12109b7f2b59c5e1



More information about the pld-cvs-commit mailing list