[packages/libgcrypt] - updated to 1.10.1 - removed outdated poll patch - require Linux >= 3.17 for getentropy() based ran

qboosh qboosh at pld-linux.org
Fri Apr 1 06:27:47 CEST 2022


commit 9885abc499f2e906e18e76b28804669602ba7145
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Fri Apr 1 06:27:42 2022 +0200

    - updated to 1.10.1
    - removed outdated poll patch
    - require Linux >= 3.17 for getentropy() based random source

 libgcrypt-poll.patch | 54 ----------------------------------------------------
 libgcrypt.spec       | 14 +++++++-------
 2 files changed, 7 insertions(+), 61 deletions(-)
---
diff --git a/libgcrypt.spec b/libgcrypt.spec
index bfaaf5a..ac8c83d 100644
--- a/libgcrypt.spec
+++ b/libgcrypt.spec
@@ -1,6 +1,6 @@
 #
 # Conditional build:
-%bcond_with	dietlibc	# don't build static dietlibc library
+%bcond_with	dietlibc	# static dietlibc library
 %bcond_with	libcap		# Linux capabilities usage
 #
 Summary:	Cryptographic library based on the code from GnuPG
@@ -8,15 +8,14 @@ Summary(es.UTF-8):	Libgcrypt es una biblioteca general de desarrole embasada em
 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.9.4
+Version:	1.10.1
 Release:	1
 License:	LGPL v2.1+
 Group:		Libraries
 Source0:	ftp://ftp.gnupg.org/gcrypt/libgcrypt/%{name}-%{version}.tar.bz2
-# Source0-md5:	edc7becfe09c75d8f95ff7623e40c52e
+# Source0-md5:	8fadbe1fddafa341dce5ef3869f70e25
 Patch0:		%{name}-info.patch
 Patch1:		%{name}-libgcrypt_config.patch
-Patch2:		%{name}-poll.patch
 URL:		https://directory.fsf.org/wiki/Libgcrypt
 BuildRequires:	autoconf >= 2.60
 BuildRequires:	automake >= 1:1.14
@@ -28,6 +27,8 @@ BuildRequires:	libgpg-error-devel >= 1.27
 BuildRequires:	libtool >= 2:2.2.6
 BuildRequires:	texinfo
 Requires:	libgpg-error >= 1.27
+# getrandom() for getentropy()
+Requires:	uname(release) >= 3.17
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 # for some reason known only to rpm there must be "\\|" not "\|" here
@@ -120,7 +121,6 @@ Biblioteka statyczna dietlibc libgcrypt.
 %setup -q
 %patch0 -p1
 %patch1 -p1
-%patch2 -p1
 
 %build
 %{__rm} m4/libtool.m4
@@ -142,7 +142,7 @@ Biblioteka statyczna dietlibc libgcrypt.
 %{__make} -C random
 %{__make} -C src \
 	PROGRAMS=
-mv src/.libs/libgcrypt.a diet-libgcrypt.a
+%{__mv} src/.libs/libgcrypt.a diet-libgcrypt.a
 %{__make} clean
 %endif
 
@@ -161,7 +161,7 @@ rm -rf $RPM_BUILD_ROOT
 	m4datadir=%{_aclocaldir}
 
 install -d $RPM_BUILD_ROOT/%{_lib}
-mv -f $RPM_BUILD_ROOT%{_libdir}/libgcrypt.so.* $RPM_BUILD_ROOT/%{_lib}
+%{__mv} $RPM_BUILD_ROOT%{_libdir}/libgcrypt.so.* $RPM_BUILD_ROOT/%{_lib}
 ln -sf /%{_lib}/$(basename $RPM_BUILD_ROOT/%{_lib}/libgcrypt.so.*.*.*) \
 	$RPM_BUILD_ROOT%{_libdir}/libgcrypt.so
 
diff --git a/libgcrypt-poll.patch b/libgcrypt-poll.patch
deleted file mode 100644
index 5cec837..0000000
--- a/libgcrypt-poll.patch
+++ /dev/null
@@ -1,54 +0,0 @@
---- libgcrypt-1.8.0/random/rndlinux.c.orig	2017-06-24 13:34:29.000000000 +0200
-+++ libgcrypt-1.8.0/random/rndlinux.c	2017-07-29 10:42:28.147643001 +0200
-@@ -32,6 +32,7 @@
- #include <string.h>
- #include <unistd.h>
- #include <fcntl.h>
-+#include <poll.h>
- #if defined(__APPLE__) && defined(__MACH__)
- #include <Availability.h>
- #ifdef __MAC_10_11
-@@ -216,8 +217,7 @@
-                  return with something we will actually use 100ms. */
-   while (length)
-     {
--      fd_set rfds;
--      struct timeval tv;
-+      struct pollfd fds;
-       int rc;
- 
-       /* If we have a modern operating system, we first try to use the new
-@@ -276,21 +276,11 @@
-           any_need_entropy = 1;
-         }
- 
--      /* 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
-         {
--          FD_ZERO(&rfds);
--          FD_SET(fd, &rfds);
--          tv.tv_sec = delay;
--          tv.tv_usec = delay? 0 : 100000;
-+          fds.fd = fd;
-+          fds.events = POLLIN;
-           _gcry_pre_syscall ();
--          rc = select (fd+1, &rfds, NULL, NULL, &tv);
-+          rc = poll(&fds, 1, delay ? (delay*1000) : 100);
-           _gcry_post_syscall ();
-           if (!rc)
-             {
-@@ -300,7 +290,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/9885abc499f2e906e18e76b28804669602ba7145



More information about the pld-cvs-commit mailing list