]> git.pld-linux.org Git - packages/libgcrypt.git/commitdiff
- updated to 1.5.1
authorJakub Bogusz <qboosh@pld-linux.org>
Fri, 22 Mar 2013 21:35:59 +0000 (22:35 +0100)
committerJakub Bogusz <qboosh@pld-linux.org>
Fri, 22 Mar 2013 21:35:59 +0000 (22:35 +0100)
- updated poll patch
- added am patch (fixes build with automake 1.13)
- enabled capabilities

libgcrypt-am.patch [new file with mode: 0644]
libgcrypt-poll.patch
libgcrypt.spec

diff --git a/libgcrypt-am.patch b/libgcrypt-am.patch
new file mode 100644 (file)
index 0000000..ed303b9
--- /dev/null
@@ -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
index 04afd8476f1e399441a022d7894545fa584ae3e1..088a5cdad4ef5b717f90d2111de2c9b92531c96a 100644 (file)
@@ -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)
      {
 +      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.  */
index 8ab4e0b4cd00737c69dd7e6c06ef6190474cd13b..3e2b5c6fa6f95e0bc323c622e922730414f82c56 100644 (file)
@@ -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}
 
This page took 0.120105 seconds and 4 git commands to generate.