upgrade to 2.1.12

This commit is contained in:
Tomas Mraz 2016-05-05 13:17:46 +02:00
parent 0de873a024
commit be8067122e
6 changed files with 98 additions and 245 deletions

2
.gitignore vendored
View File

@ -38,3 +38,5 @@ gnupg-2.0.16.tar.bz2.sig
/gnupg-2.1.10.tar.bz2.sig
/gnupg-2.1.11.tar.bz2
/gnupg-2.1.11.tar.bz2.sig
/gnupg-2.1.12.tar.bz2
/gnupg-2.1.12.tar.bz2.sig

View File

@ -1,102 +0,0 @@
diff -up gnupg-2.1.11/configure.ac.build gnupg-2.1.11/configure.ac
--- gnupg-2.1.11/configure.ac.build 2016-01-26 10:36:37.000000000 +0100
+++ gnupg-2.1.11/configure.ac 2016-02-16 13:20:24.655953923 +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
@@ -1585,7 +1585,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.11/configure.build gnupg-2.1.11/configure
--- gnupg-2.1.11/configure.build 2016-01-26 13:54:50.000000000 +0100
+++ gnupg-2.1.11/configure 2016-02-16 13:20:24.657953969 +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
@@ -15353,7 +15353,7 @@ fi
#
# Add user CFLAGS.
#
-CFLAGS="$CFLAGS $CFLAGS_orig"
+# CFLAGS="$CFLAGS $CFLAGS_orig"
#
# Decide what to build
diff -up gnupg-2.1.11/dirmngr/Makefile.am.build gnupg-2.1.11/dirmngr/Makefile.am
--- gnupg-2.1.11/dirmngr/Makefile.am.build 2016-01-26 10:36:37.000000000 +0100
+++ gnupg-2.1.11/dirmngr/Makefile.am 2016-02-16 13:20:24.657953969 +0100
@@ -132,7 +132,7 @@ endif
t_http_SOURCES = t-http.c http.c dns-stuff.c
t_http_CFLAGS = -DWITHOUT_NPTH=1 \
$(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)
@@ -140,7 +140,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
+t_ldap_parse_uri_CFLAGS = -DWITHOUT_NPTH=1 $(LIBASSUAN_CFLAGS)
t_ldap_parse_uri_LDADD = $(ldaplibs) $(t_common_ldadd) $(DNSLIBS)
t_dns_stuff_CFLAGS = -DWITHOUT_NPTH=1
diff -up gnupg-2.1.11/dirmngr/Makefile.in.build gnupg-2.1.11/dirmngr/Makefile.in
--- gnupg-2.1.11/dirmngr/Makefile.in.build 2016-01-26 13:54:48.000000000 +0100
+++ gnupg-2.1.11/dirmngr/Makefile.in 2016-02-16 13:20:24.658953991 +0100
@@ -640,7 +640,7 @@ module_tests = t-dns-stuff $(am__append_
t_http_SOURCES = t-http.c http.c dns-stuff.c
t_http_CFLAGS = -DWITHOUT_NPTH=1 \
$(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)
@@ -650,7 +650,7 @@ t_ldap_parse_uri_SOURCES = \
http.c dns-stuff.c \
$(ldap_url) $(t_common_src)
-t_ldap_parse_uri_CFLAGS = -DWITHOUT_NPTH=1
+t_ldap_parse_uri_CFLAGS = -DWITHOUT_NPTH=1 $(LIBASSUAN_CFLAGS)
t_ldap_parse_uri_LDADD = $(ldaplibs) $(t_common_ldadd) $(DNSLIBS)
t_dns_stuff_CFLAGS = -DWITHOUT_NPTH=1
t_dns_stuff_SOURCES = t-dns-stuff.c dns-stuff.c
diff -up gnupg-2.1.11/tests/openpgp/gpgtar.test.build gnupg-2.1.11/tests/openpgp/gpgtar.test
--- gnupg-2.1.11/tests/openpgp/gpgtar.test.build 2016-01-26 10:36:37.000000000 +0100
+++ gnupg-2.1.11/tests/openpgp/gpgtar.test 2016-02-16 15:33:13.215537860 +0100
@@ -33,6 +33,10 @@ GPGARGS="$opt_always --no-permission-war
GPGTAR="../../tools/gpgtar"
GPGZIP="sh ../../tools/gpg-zip"
+if [ ! -f "$GPGTAR" ] ; then
+ exit 77
+fi
+
# Create, inspect, and extract an archive with the given options.
#
# $1 the tool to test

View File

@ -1,136 +0,0 @@
From acac103ba5772ae738ce5409d17feab80596cde6 Mon Sep 17 00:00:00 2001
From: "Neal H. Walfield" <neal@g10code.com>
Date: Fri, 12 Feb 2016 22:12:21 +0100
Subject: [PATCH 1/1] common: Change simple_query to ignore status messages.
* common/simple-pwquery.c (simple_query): Ignore status messages.
--
Signed-off-by: Neal H. Walfield <neal@g10code.com>
GnuPG-bug-id: 2229
---
common/simple-pwquery.c | 95 ++++++++++++++++++++++++++++++++++---------------
1 file changed, 67 insertions(+), 28 deletions(-)
diff --git a/common/simple-pwquery.c b/common/simple-pwquery.c
index 90d04c0..b2d666c 100644
--- a/common/simple-pwquery.c
+++ b/common/simple-pwquery.c
@@ -618,6 +618,7 @@ simple_query (const char *query)
int fd = -1;
int nread;
char response[500];
+ int have = 0;
int rc;
rc = agent_open (&fd);
@@ -628,40 +629,78 @@ simple_query (const char *query)
if (rc)
goto leave;
- /* get response */
- nread = readline (fd, response, 499);
- if (nread < 0)
- {
- rc = -nread;
- goto leave;
- }
- if (nread < 3)
+ while (1)
{
- rc = SPWQ_PROTOCOL_ERROR;
- goto leave;
- }
+ if (! have || ! strchr (response, '\n'))
+ /* get response */
+ {
+ nread = readline (fd, &response[have],
+ sizeof (response) - 1 /* NUL */ - have);
+ if (nread < 0)
+ {
+ rc = -nread;
+ goto leave;
+ }
+ have += nread;
+ if (have < 3)
+ {
+ rc = SPWQ_PROTOCOL_ERROR;
+ goto leave;
+ }
+ response[have] = 0;
+ }
- if (response[0] == 'O' && response[1] == 'K')
- /* OK, do nothing. */;
- else if ((nread > 7 && !memcmp (response, "ERR 111", 7)
- && (response[7] == ' ' || response[7] == '\n') )
- || ((nread > 4 && !memcmp (response, "ERR ", 4)
- && (strtoul (response+4, NULL, 0) & 0xffff) == 99)) )
- {
- /* 111 is the old Assuan code for canceled which might still
- be in use by old installations. 99 is GPG_ERR_CANCELED as
- used by modern gpg-agents; 0xffff is used to mask out the
- error source. */
+ if (response[0] == 'O' && response[1] == 'K')
+ /* OK, do nothing. */;
+ else if ((nread > 7 && !memcmp (response, "ERR 111", 7)
+ && (response[7] == ' ' || response[7] == '\n') )
+ || ((nread > 4 && !memcmp (response, "ERR ", 4)
+ && (strtoul (response+4, NULL, 0) & 0xffff) == 99)) )
+ {
+ /* 111 is the old Assuan code for canceled which might still
+ be in use by old installations. 99 is GPG_ERR_CANCELED as
+ used by modern gpg-agents; 0xffff is used to mask out the
+ error source. */
#ifdef SPWQ_USE_LOGGING
- log_info (_("canceled by user\n") );
+ log_info (_("canceled by user\n") );
#endif
- }
- else
- {
+ }
+ else if (response[0] == 'S' && response[1] == ' ')
+ {
+ char *nextline;
+ int consumed;
+
+ nextline = strchr (response, '\n');
+ if (! nextline)
+ /* Point to the NUL. */
+ nextline = &response[have];
+ else
+ /* Move past the \n. */
+ nextline ++;
+
+ consumed = (size_t) nextline - (size_t) response;
+
+ /* Skip any additional newlines. */
+ while (consumed < have && response[consumed] == '\n')
+ consumed ++;
+
+ have -= consumed;
+
+ if (have)
+ memmove (response, &response[consumed], have + 1);
+
+ continue;
+ }
+ else
+ {
#ifdef SPWQ_USE_LOGGING
- log_error (_("problem with the agent\n"));
+ log_error (_("problem with the agent (unexpected response \"%s\"\n"),
+ response);
#endif
- rc = SPWQ_ERR_RESPONSE;
+ rc = SPWQ_ERR_RESPONSE;
+ }
+
+ break;
}
leave:
--
2.1.4

88
gnupg-2.1.12-build.patch Normal file
View File

@ -0,0 +1,88 @@
diff -up gnupg-2.1.12/configure.ac.build gnupg-2.1.12/configure.ac
--- gnupg-2.1.12/configure.ac.build 2016-05-04 11:43:16.000000000 +0200
+++ gnupg-2.1.12/configure.ac 2016-05-05 12:05:07.314698224 +0200
@@ -90,8 +90,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
@@ -1636,7 +1636,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.12/configure.build gnupg-2.1.12/configure
--- gnupg-2.1.12/configure.build 2016-05-04 16:00:22.000000000 +0200
+++ gnupg-2.1.12/configure 2016-05-05 12:05:07.316698269 +0200
@@ -5043,8 +5043,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
@@ -15413,7 +15413,7 @@ fi
#
# Add user CFLAGS.
#
-CFLAGS="$CFLAGS $CFLAGS_orig"
+# CFLAGS="$CFLAGS $CFLAGS_orig"
#
# Decide what to build
diff -up gnupg-2.1.12/dirmngr/Makefile.am.build gnupg-2.1.12/dirmngr/Makefile.am
--- gnupg-2.1.12/dirmngr/Makefile.am.build 2016-05-04 11:43:16.000000000 +0200
+++ gnupg-2.1.12/dirmngr/Makefile.am 2016-05-05 12:20:24.468656960 +0200
@@ -132,7 +132,7 @@ endif
t_http_SOURCES = t-http.c http.c dns-stuff.c
t_http_CFLAGS = -DWITHOUT_NPTH=1 \
$(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)
@@ -140,7 +140,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 \
+t_ldap_parse_uri_CFLAGS = -DWITHOUT_NPTH=1 $(LIBASSUAN_CFLAGS) \
$(LIBGCRYPT_CFLAGS) $(GPG_ERROR_CFLAGS)
t_ldap_parse_uri_LDADD = $(ldaplibs) $(t_common_ldadd) $(DNSLIBS)
diff -up gnupg-2.1.12/dirmngr/Makefile.in.build gnupg-2.1.12/dirmngr/Makefile.in
--- gnupg-2.1.12/dirmngr/Makefile.in.build 2016-05-04 16:00:20.000000000 +0200
+++ gnupg-2.1.12/dirmngr/Makefile.in 2016-05-05 12:22:43.333832474 +0200
@@ -641,7 +641,7 @@ module_tests = t-dns-stuff $(am__append_
t_http_SOURCES = t-http.c http.c dns-stuff.c
t_http_CFLAGS = -DWITHOUT_NPTH=1 \
$(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)
@@ -651,7 +651,7 @@ t_ldap_parse_uri_SOURCES = \
http.c dns-stuff.c \
$(ldap_url) $(t_common_src)
-t_ldap_parse_uri_CFLAGS = -DWITHOUT_NPTH=1 \
+t_ldap_parse_uri_CFLAGS = -DWITHOUT_NPTH=1 $(LIBASSUAN_CFLAGS) \
$(LIBGCRYPT_CFLAGS) $(GPG_ERROR_CFLAGS)
t_ldap_parse_uri_LDADD = $(ldaplibs) $(t_common_ldadd) $(DNSLIBS)

View File

@ -1,7 +1,7 @@
Summary: Utility for secure communication and data storage
Name: gnupg2
Version: 2.1.11
Release: 4%{?dist}
Version: 2.1.12
Release: 1%{?dist}
License: GPLv3+
Group: Applications/System
@ -16,8 +16,7 @@ Patch3: gnupg-2.1.10-secmem.patch
Patch4: gnupg-2.1.10-file-is-digest.patch
Patch5: gnupg-2.1.1-ocsp-keyusage.patch
Patch6: gnupg-2.1.1-fips-algo.patch
Patch7: gnupg-2.1.11-build.patch
Patch8: gnupg-2.1.11-fix-tests.patch
Patch7: gnupg-2.1.12-build.patch
URL: http://www.gnupg.org/
@ -93,7 +92,6 @@ to the base GnuPG package
%patch5 -p1 -b .keyusage
%patch6 -p1 -b .fips
%patch7 -p1 -b .build
%patch8 -p1 -b .fix-tests
# pcsc-lite library major: 0 in 1.2.0, 1 in 1.2.9+ (dlopen()'d in pcsc-wrapper)
# Note: this is just the name of the default shared lib to load in scdaemon,
@ -209,6 +207,9 @@ fi
%changelog
* Thu May 5 2016 Tomáš Mráz <tmraz@redhat.com> - 2.1.12-1
- upgrade to 2.1.12
* Tue Apr 12 2016 Tomáš Mráz <tmraz@redhat.com> - 2.1.11-4
- make the pinentry dependency weak as for the public-key operations it
is not needed (#1324595)

View File

@ -1,2 +1,2 @@
873302c475c4c90badb67daac90ebd5d gnupg-2.1.11.tar.bz2
05d72ca31c0953ac5aeaa4305df8a57c gnupg-2.1.11.tar.bz2.sig
573bc2cd83934eed12f0d0db443f5bde gnupg-2.1.12.tar.bz2
3173eb3f3d422fc2411d90a351e7a19d gnupg-2.1.12.tar.bz2.sig