upgrade to 2.1.19

shorten time waiting on gpg-agent/dirmngr to start by exponential
  backoff (#1431749)
This commit is contained in:
Tomas Mraz 2017-03-15 18:55:49 +01:00
parent 529234a149
commit 170553d6b2
6 changed files with 145 additions and 94 deletions

2
.gitignore vendored
View File

@ -48,3 +48,5 @@ gnupg-2.0.16.tar.bz2.sig
/gnupg-2.1.17.tar.bz2.sig /gnupg-2.1.17.tar.bz2.sig
/gnupg-2.1.18.tar.bz2 /gnupg-2.1.18.tar.bz2
/gnupg-2.1.18.tar.bz2.sig /gnupg-2.1.18.tar.bz2.sig
/gnupg-2.1.19.tar.bz2
/gnupg-2.1.19.tar.bz2.sig

View File

@ -1,88 +0,0 @@
diff -up gnupg-2.1.18/configure.ac.build gnupg-2.1.18/configure.ac
--- gnupg-2.1.18/configure.ac.build 2017-01-23 19:39:13.000000000 +0100
+++ gnupg-2.1.18/configure.ac 2017-03-01 09:51:34.245988503 +0100
@@ -89,8 +89,8 @@ AC_GNU_SOURCE
# CFLAGS (they are restored at the end of the configure script). This
# is because some configure checks don't work with -Werror, but we'd
# like to use -Werror with our build.
-CFLAGS_orig=$CFLAGS
-CFLAGS=
+#CFLAGS_orig=$CFLAGS
+#CFLAGS=
# Some status variables.
have_gpg_error=no
@@ -1632,7 +1632,7 @@ AC_ARG_ENABLE(optimization,
#
# Add user CFLAGS.
#
-CFLAGS="$CFLAGS $CFLAGS_orig"
+# CFLAGS="$CFLAGS $CFLAGS_orig"
#
# Decide what to build
diff -up gnupg-2.1.18/configure.build gnupg-2.1.18/configure
--- gnupg-2.1.18/configure.build 2017-01-23 21:26:36.000000000 +0100
+++ gnupg-2.1.18/configure 2017-03-01 09:51:34.247988533 +0100
@@ -5039,8 +5039,8 @@ $as_echo "$ac_cv_safe_to_define___extens
# CFLAGS (they are restored at the end of the configure script). This
# is because some configure checks don't work with -Werror, but we'd
# like to use -Werror with our build.
-CFLAGS_orig=$CFLAGS
-CFLAGS=
+#CFLAGS_orig=$CFLAGS
+#CFLAGS=
# Some status variables.
have_gpg_error=no
@@ -15492,7 +15492,7 @@ fi
#
# Add user CFLAGS.
#
-CFLAGS="$CFLAGS $CFLAGS_orig"
+# CFLAGS="$CFLAGS $CFLAGS_orig"
#
# Decide what to build
diff -up gnupg-2.1.18/dirmngr/Makefile.am.build gnupg-2.1.18/dirmngr/Makefile.am
--- gnupg-2.1.18/dirmngr/Makefile.am.build 2016-12-20 11:19:05.000000000 +0100
+++ gnupg-2.1.18/dirmngr/Makefile.am 2017-03-01 09:51:34.247988533 +0100
@@ -141,7 +141,7 @@ endif
t_http_SOURCES = $(t_common_src) t-http.c http.c dns-stuff.c
t_http_CFLAGS = -DWITHOUT_NPTH=1 $(USE_C99_CFLAGS) \
$(LIBGCRYPT_CFLAGS) $(NTBTLS_CFLAGS) $(LIBGNUTLS_CFLAGS) \
- $(GPG_ERROR_CFLAGS)
+ $(GPG_ERROR_CFLAGS) $(LIBASSUAN_CFLAGS)
t_http_LDADD = $(t_common_ldadd) \
$(NTBTLS_LIBS) $(LIBGNUTLS_LIBS) $(DNSLIBS)
@@ -149,7 +149,7 @@ t_ldap_parse_uri_SOURCES = \
t-ldap-parse-uri.c ldap-parse-uri.c ldap-parse-uri.h \
http.c dns-stuff.c \
$(ldap_url) $(t_common_src)
-t_ldap_parse_uri_CFLAGS = -DWITHOUT_NPTH=1 $(USE_C99_CFLAGS) \
+t_ldap_parse_uri_CFLAGS = -DWITHOUT_NPTH=1 $(LIBASSUAN_CFLAGS) $(USE_C99_CFLAGS) \
$(LIBGCRYPT_CFLAGS) $(GPG_ERROR_CFLAGS)
t_ldap_parse_uri_LDADD = $(ldaplibs) $(t_common_ldadd) $(DNSLIBS)
diff -up gnupg-2.1.18/dirmngr/Makefile.in.build gnupg-2.1.18/dirmngr/Makefile.in
--- gnupg-2.1.18/dirmngr/Makefile.in.build 2017-01-23 21:26:34.000000000 +0100
+++ gnupg-2.1.18/dirmngr/Makefile.in 2017-03-01 09:51:34.247988533 +0100
@@ -665,7 +665,7 @@ module_tests = $(am__append_13)
t_http_SOURCES = $(t_common_src) t-http.c http.c dns-stuff.c
t_http_CFLAGS = -DWITHOUT_NPTH=1 $(USE_C99_CFLAGS) \
$(LIBGCRYPT_CFLAGS) $(NTBTLS_CFLAGS) $(LIBGNUTLS_CFLAGS) \
- $(GPG_ERROR_CFLAGS)
+ $(GPG_ERROR_CFLAGS) $(LIBASSUAN_CFLAGS)
t_http_LDADD = $(t_common_ldadd) \
$(NTBTLS_LIBS) $(LIBGNUTLS_LIBS) $(DNSLIBS)
@@ -675,7 +675,7 @@ t_ldap_parse_uri_SOURCES = \
http.c dns-stuff.c \
$(ldap_url) $(t_common_src)
-t_ldap_parse_uri_CFLAGS = -DWITHOUT_NPTH=1 $(USE_C99_CFLAGS) \
+t_ldap_parse_uri_CFLAGS = -DWITHOUT_NPTH=1 $(LIBASSUAN_CFLAGS) $(USE_C99_CFLAGS) \
$(LIBGCRYPT_CFLAGS) $(GPG_ERROR_CFLAGS)
t_ldap_parse_uri_LDADD = $(ldaplibs) $(t_common_ldadd) $(DNSLIBS)

92
gnupg-2.1.19-build.patch Normal file
View File

@ -0,0 +1,92 @@
diff -up gnupg-2.1.19/configure.ac.build gnupg-2.1.19/configure.ac
--- gnupg-2.1.19/configure.ac.build 2017-03-01 18:30:52.000000000 +0100
+++ gnupg-2.1.19/configure.ac 2017-03-15 17:03:23.909920917 +0100
@@ -89,8 +89,8 @@ AC_GNU_SOURCE
# CFLAGS (they are restored at the end of the configure script). This
# is because some configure checks don't work with -Werror, but we'd
# like to use -Werror with our build.
-CFLAGS_orig=$CFLAGS
-CFLAGS=
+#CFLAGS_orig=$CFLAGS
+#CFLAGS=
# Some status variables.
have_gpg_error=no
@@ -1710,7 +1710,7 @@ fi
#
# Add user CFLAGS.
#
-CFLAGS="$CFLAGS $CFLAGS_orig"
+# CFLAGS="$CFLAGS $CFLAGS_orig"
#
# Decide what to build
diff -up gnupg-2.1.19/configure.build gnupg-2.1.19/configure
--- gnupg-2.1.19/configure.build 2017-03-01 18:41:49.000000000 +0100
+++ gnupg-2.1.19/configure 2017-03-15 17:03:23.911920964 +0100
@@ -5044,8 +5044,8 @@ $as_echo "$ac_cv_safe_to_define___extens
# CFLAGS (they are restored at the end of the configure script). This
# is because some configure checks don't work with -Werror, but we'd
# like to use -Werror with our build.
-CFLAGS_orig=$CFLAGS
-CFLAGS=
+#CFLAGS_orig=$CFLAGS
+#CFLAGS=
# Some status variables.
have_gpg_error=no
@@ -15656,7 +15656,7 @@ fi
#
# Add user CFLAGS.
#
-CFLAGS="$CFLAGS $CFLAGS_orig"
+# CFLAGS="$CFLAGS $CFLAGS_orig"
#
# Decide what to build
diff -up gnupg-2.1.19/dirmngr/Makefile.am.build gnupg-2.1.19/dirmngr/Makefile.am
--- gnupg-2.1.19/dirmngr/Makefile.am.build 2017-03-01 14:04:33.000000000 +0100
+++ gnupg-2.1.19/dirmngr/Makefile.am 2017-03-15 17:03:23.911920964 +0100
@@ -152,7 +152,7 @@ t_ldap_parse_uri_SOURCES = \
t-ldap-parse-uri.c ldap-parse-uri.c ldap-parse-uri.h \
http.c dns-stuff.c \
$(ldap_url) $(t_common_src)
-t_ldap_parse_uri_CFLAGS = -DWITHOUT_NPTH=1 $(USE_C99_CFLAGS) \
+t_ldap_parse_uri_CFLAGS = -DWITHOUT_NPTH=1 $(LIBASSUAN_CFLAGS) $(USE_C99_CFLAGS) \
$(LIBGCRYPT_CFLAGS) $(GPG_ERROR_CFLAGS)
t_ldap_parse_uri_LDADD = $(ldaplibs) $(t_common_ldadd) $(DNSLIBS)
diff -up gnupg-2.1.19/dirmngr/Makefile.in.build gnupg-2.1.19/dirmngr/Makefile.in
--- gnupg-2.1.19/dirmngr/Makefile.in.build 2017-03-01 18:41:47.000000000 +0100
+++ gnupg-2.1.19/dirmngr/Makefile.in 2017-03-15 17:03:23.911920964 +0100
@@ -681,7 +681,7 @@ t_ldap_parse_uri_SOURCES = \
http.c dns-stuff.c \
$(ldap_url) $(t_common_src)
-t_ldap_parse_uri_CFLAGS = -DWITHOUT_NPTH=1 $(USE_C99_CFLAGS) \
+t_ldap_parse_uri_CFLAGS = -DWITHOUT_NPTH=1 $(LIBASSUAN_CFLAGS) $(USE_C99_CFLAGS) \
$(LIBGCRYPT_CFLAGS) $(GPG_ERROR_CFLAGS)
t_ldap_parse_uri_LDADD = $(ldaplibs) $(t_common_ldadd) $(DNSLIBS)
diff -up gnupg-2.1.19/tests/openpgp/Makefile.am.build gnupg-2.1.19/tests/openpgp/Makefile.am
--- gnupg-2.1.19/tests/openpgp/Makefile.am.build 2017-03-01 14:04:33.000000000 +0100
+++ gnupg-2.1.19/tests/openpgp/Makefile.am 2017-03-15 18:41:09.899078597 +0100
@@ -82,7 +82,6 @@ XTESTS = \
import-revocation-certificate.scm \
ecc.scm \
4gb-packet.scm \
- tofu.scm \
gpgtar.scm \
use-exact-key.scm \
default-key.scm \
diff -up gnupg-2.1.19/tests/openpgp/Makefile.in.build gnupg-2.1.19/tests/openpgp/Makefile.in
--- gnupg-2.1.19/tests/openpgp/Makefile.in.build 2017-03-01 18:41:48.000000000 +0100
+++ gnupg-2.1.19/tests/openpgp/Makefile.in 2017-03-15 18:41:27.318482699 +0100
@@ -478,7 +478,6 @@ XTESTS = \
import-revocation-certificate.scm \
ecc.scm \
4gb-packet.scm \
- tofu.scm \
gpgtar.scm \
use-exact-key.scm \
default-key.scm \

View File

@ -0,0 +1,38 @@
diff -up gnupg-2.1.19/common/asshelp.c.exponential gnupg-2.1.19/common/asshelp.c
--- gnupg-2.1.19/common/asshelp.c.exponential 2017-03-01 14:04:33.000000000 +0100
+++ gnupg-2.1.19/common/asshelp.c 2017-03-15 17:18:14.279792654 +0100
@@ -434,12 +434,12 @@ start_new_gpg_agent (assuan_context_t *r
agent_program, gpg_strerror (err));
else
{
- for (i=0; i < SECS_TO_WAIT_FOR_AGENT; i++)
+ for (i=2; i < SECS_TO_WAIT_FOR_AGENT*1000; i<<=1) /* start with 2 ms */
{
- if (verbose)
+ if (verbose && i > 500)
log_info (_("waiting for the agent to come up ... (%ds)\n"),
- SECS_TO_WAIT_FOR_AGENT - i);
- gnupg_sleep (1);
+ SECS_TO_WAIT_FOR_AGENT - i/1000);
+ gnupg_usleep (i*1000);
err = assuan_socket_connect (ctx, sockname, 0, 0);
if (!err)
{
@@ -587,13 +587,13 @@ start_new_dirmngr (assuan_context_t *r_c
{
int i;
- for (i=0; i < SECS_TO_WAIT_FOR_DIRMNGR; i++)
+ for (i=2; i < SECS_TO_WAIT_FOR_DIRMNGR*1000; i<<=1) /* start with 2 ms */
{
- if (verbose)
+ if (verbose && i > 500)
log_info (_("waiting for the dirmngr "
"to come up ... (%ds)\n"),
- SECS_TO_WAIT_FOR_DIRMNGR - i);
- gnupg_sleep (1);
+ SECS_TO_WAIT_FOR_DIRMNGR - i/1000);
+ gnupg_usleep (i*1000);
err = assuan_socket_connect (ctx, sockname, 0, 0);
if (!err)
{

View File

@ -1,7 +1,7 @@
Summary: Utility for secure communication and data storage Summary: Utility for secure communication and data storage
Name: gnupg2 Name: gnupg2
Version: 2.1.18 Version: 2.1.19
Release: 2%{?dist} Release: 1%{?dist}
License: GPLv3+ License: GPLv3+
Group: Applications/System Group: Applications/System
@ -10,13 +10,15 @@ Source1: ftp://ftp.gnupg.org/gcrypt/%{?pre:alpha/}gnupg/gnupg-%{version}%{?pre}.
# svn export svn://cvs.gnupg.org/gnupg/trunk gnupg2; tar cjf gnupg-<date>svn.tar.bz2 gnupg2 # svn export svn://cvs.gnupg.org/gnupg/trunk gnupg2; tar cjf gnupg-<date>svn.tar.bz2 gnupg2
#Source0: gnupg2-20090809svn.tar.bz2 #Source0: gnupg2-20090809svn.tar.bz2
Patch1: gnupg-2.1.11-insttools.patch Patch1: gnupg-2.1.11-insttools.patch
# exponential backoff when waiting on gpg-agent and dirmngr to save time
Patch2: gnupg-2.1.19-exponential.patch
# needed for compatibility with system FIPS mode # needed for compatibility with system FIPS mode
Patch3: gnupg-2.1.10-secmem.patch Patch3: gnupg-2.1.10-secmem.patch
# non-upstreamable patch adding file-is-digest option needed for Copr # non-upstreamable patch adding file-is-digest option needed for Copr
Patch4: gnupg-2.1.16-file-is-digest.patch Patch4: gnupg-2.1.16-file-is-digest.patch
Patch5: gnupg-2.1.1-ocsp-keyusage.patch Patch5: gnupg-2.1.1-ocsp-keyusage.patch
Patch6: gnupg-2.1.1-fips-algo.patch Patch6: gnupg-2.1.1-fips-algo.patch
Patch7: gnupg-2.1.18-build.patch Patch7: gnupg-2.1.19-build.patch
URL: http://www.gnupg.org/ URL: http://www.gnupg.org/
@ -89,6 +91,7 @@ to the base GnuPG package
%if 0%{?rhel} > 5 %if 0%{?rhel} > 5
%patch1 -p1 -b .insttools %patch1 -p1 -b .insttools
%endif %endif
%patch2 -p1 -b .exponential
%patch3 -p1 -b .secmem %patch3 -p1 -b .secmem
%patch4 -p1 -b .file-is-digest %patch4 -p1 -b .file-is-digest
%patch5 -p1 -b .keyusage %patch5 -p1 -b .keyusage
@ -152,7 +155,6 @@ rm -f %{buildroot}%{_infodir}/dir
%check %check
# need scratch gpg database for tests # need scratch gpg database for tests
mkdir -p $HOME/.gnupg mkdir -p $HOME/.gnupg
# some gpg2 tests (still) FAIL on non i386 platforms
make -k check make -k check
@ -208,6 +210,11 @@ fi
%changelog %changelog
* Wed Mar 15 2017 Tomáš Mráz <tmraz@redhat.com> - 2.1.19-1
- upgrade to 2.1.19
- shorten time waiting on gpg-agent/dirmngr to start by exponential
backoff (#1431749)
* Wed Mar 1 2017 Tomáš Mráz <tmraz@redhat.com> - 2.1.18-2 * Wed Mar 1 2017 Tomáš Mráz <tmraz@redhat.com> - 2.1.18-2
- upgrade to 2.1.18 - upgrade to 2.1.18

View File

@ -1,2 +1,2 @@
SHA512 (gnupg-2.1.18.tar.bz2) = b8357f0a883a33c2e4f6ab5a8f5ddb171c899b7a2899e8ce4cac232938fe1dffb789a54980dfc4b758c4cb47f11f1fc570fea905244735048dfc6f06b3353baf SHA512 (gnupg-2.1.19.tar.bz2) = c6d0a2cb7f1f7ce851729559edab08d2356dffe00ee836fc1d71eb4c4e34b566e214a0352934d2985fb0183b9e7ecc1221422d258f3bd467e735c0a5c8a3d0ca
SHA512 (gnupg-2.1.18.tar.bz2.sig) = d821af7c1b55ff37b569724bec186c968152ec3a7ef8a5b2dc8405c62e2cf84c0b61ff9cf1405fd6cfe50fe6673b3f68d889558284b014f5fcf5a64da32fb262 SHA512 (gnupg-2.1.19.tar.bz2.sig) = 501e2a9ef2b41b6b252a9880e948914c182ae86d1478d59f94a68f022da25e6bc7bdc1e71e343408c161da7c0fedba3e17856b376bed25d5d980f4ef040cdf0c