n/gnupg2: Upgraded to gnupg-2.1.18.

slackware-14.2
Damien Goutte-Gattat 6 years ago
parent 124c416e09
commit 4536a8f048
  1. 36
      n/gnupg2/gnupg-2.1.17-fix-check-regexp-msg.diff
  2. 72
      n/gnupg2/gnupg-2.1.17-fix-disable-libdns.diff
  3. 72
      n/gnupg2/gnupg-2.1.17-frozen-faked-time.diff
  4. 1
      n/gnupg2/gnupg-2.1.17.tar.bz2.sha1
  5. 1
      n/gnupg2/gnupg-2.1.18.tar.bz2.sha1
  6. 7
      n/gnupg2/gnupg2.SlackBuild

@ -1,36 +0,0 @@
commit bdcec4d67450ee58d1e5dbdf262356c5f7ee0dbd
Author: Damien Goutte-Gattat <dgouttegattat@incenp.org>
Date: Tue Jan 17 20:37:49 2017 +0100
gpg: Fix misleading log message when checking regexp.
* src/trustdb.c (check_regexp): Correctly print whether the
regexp matched or not.
--
This patch fixes the log message displayed when gpg attempts to
match the regexp associated with a trust signature with an user ID.
The current message interprets the 'ret' variable backwards, and
displays 'YES' when the regexp actually fails to match.
diff --git a/g10/trustdb.c b/g10/trustdb.c
index c113b7e..75714ab 100644
--- a/g10/trustdb.c
+++ b/g10/trustdb.c
@@ -1550,14 +1550,14 @@ check_regexp(const char *expr,const char *string)
{
ret=regexec(&pat,string,0,NULL,0);
regfree(&pat);
- ret=(ret==0);
}
+ ret=(ret==0);
}
#endif
if(DBG_TRUST)
log_debug("regexp '%s' ('%s') on '%s': %s\n",
- regexp,expr,string,ret==0?"YES":"NO");
+ regexp,expr,string,ret?"YES":"NO");
xfree(regexp);

@ -1,72 +0,0 @@
commit d26c51825e2255fe58305cbc1cd74fa43f80d93e
Author: NIIBE Yutaka <gniibe@fsij.org>
Date: Fri Dec 23 16:05:01 2016 +0900
dirmngr: Fix for --disable-libdns usage.
* dirmngr/dns-stuff.c (enable_recursive_resolver, set_dns_nameserver)
(reload_dns_stuff): Conditionalize with USE_LIBDNS.
(get_h_errno_as_gpg_error): Map HOST_NOT_FOUND to GPG_ERR_NO_NAME.
--
get_dns_srv assumes error code of GPG_ERR_NO_NAME when no SRV record
available.
Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
GnuPG-bug-id: 2889
diff --git a/dirmngr/dns-stuff.c b/dirmngr/dns-stuff.c
index 491fcce..a31b073 100644
--- a/dirmngr/dns-stuff.c
+++ b/dirmngr/dns-stuff.c
@@ -181,7 +181,9 @@ void
enable_recursive_resolver (int yes)
{
recursive_resolver = yes;
+#ifdef USE_LIBDNS
libdns_reinit_pending = 1;
+#endif
}
@@ -251,8 +253,10 @@ set_dns_nameserver (const char *ipaddr)
strncpy (tor_nameserver, ipaddr? ipaddr : DEFAULT_NAMESERVER,
sizeof tor_nameserver -1);
tor_nameserver[sizeof tor_nameserver -1] = 0;
+#ifdef USE_LIBDNS
libdns_reinit_pending = 1;
libdns_tor_port = 0; /* Start again with the default port. */
+#endif
}
@@ -278,7 +282,7 @@ get_h_errno_as_gpg_error (void)
switch (h_errno)
{
- case HOST_NOT_FOUND: ec = GPG_ERR_UNKNOWN_HOST; break;
+ case HOST_NOT_FOUND: ec = GPG_ERR_NO_NAME; break;
case TRY_AGAIN: ec = GPG_ERR_TRY_LATER; break;
case NO_RECOVERY: ec = GPG_ERR_SERVER_FAILED; break;
case NO_DATA: ec = GPG_ERR_NO_DATA; break;
@@ -534,15 +538,17 @@ libdns_deinit (void)
void
reload_dns_stuff (int force)
{
+#ifdef USE_LIBDNS
if (force)
{
-#ifdef USE_LIBDNS
libdns_deinit ();
-#endif
libdns_reinit_pending = 0;
}
else
libdns_reinit_pending = 1;
+#else
+ (void)force;
+#endif
}

@ -1,72 +0,0 @@
commit 8b4cc3421a7c0be5fe23c6857967d995a58dcdf3
Author: Damien Goutte-Gattat <dgouttegattat@incenp.org>
Date: Wed Jan 18 18:37:19 2017 +0100
gpg: Allow to freeze faked system time.
* g10/gpg.c (main): If the parameter for --faked-system-time
ends with a '!', freeze time at the specified point.
* common/gettime.c (gnupg_set_time): Allow to freeze the time
at an arbitrary time instead of only the current time.
* doc/gpg.texi: Update documentation for --faked-system-time.
--
This patch allows the user to modify the behavior of the
--faked-system-time option: by appending a '!' to the parameter,
time in GnuPG will be frozen at the specified time, instead of
advancing normally from that time onward.
diff --git a/common/gettime.c b/common/gettime.c
index e5da4fb..3e1ee55 100644
--- a/common/gettime.c
+++ b/common/gettime.c
@@ -133,7 +133,7 @@ gnupg_set_time (time_t newtime, int freeze)
else if (freeze)
{
timemode = FROZEN;
- timewarp = current;
+ timewarp = newtime == (time_t)-1 ? current : newtime;
}
else if (newtime > current)
{
diff --git a/doc/gpg.texi b/doc/gpg.texi
index 4ea2cd2..044ba37 100644
--- a/doc/gpg.texi
+++ b/doc/gpg.texi
@@ -2748,6 +2748,9 @@ forth to @var{epoch} which is the number of seconds elapsed since the year
1970. Alternatively @var{epoch} may be given as a full ISO time string
(e.g. "20070924T154812").
+If you suffix @var{epoch} with an exclamation mark (!), the system time
+will appear to be frozen at the specified time.
+
@item --enable-progress-filter
@opindex enable-progress-filter
Enable certain PROGRESS status outputs. This option allows frontends
diff --git a/g10/gpg.c b/g10/gpg.c
index 8c5b505..f9039ae 100644
--- a/g10/gpg.c
+++ b/g10/gpg.c
@@ -3493,10 +3493,20 @@ main (int argc, char **argv)
case oFakedSystemTime:
{
- time_t faked_time = isotime2epoch (pargs.r.ret_str);
+ size_t len = strlen (pargs.r.ret_str);
+ int freeze = 0;
+ time_t faked_time;
+
+ if (len > 0 && pargs.r.ret_str[len-1] == '!')
+ {
+ freeze = 1;
+ pargs.r.ret_str[len-1] = '\0';
+ }
+
+ faked_time = isotime2epoch (pargs.r.ret_str);
if (faked_time == (time_t)(-1))
faked_time = (time_t)strtoul (pargs.r.ret_str, NULL, 10);
- gnupg_set_time (faked_time, 0);
+ gnupg_set_time (faked_time, freeze);
}
break;

@ -1 +0,0 @@
d83ab893faab35f37ace772ca29b939e6a5aa6a7 gnupg-2.1.17.tar.bz2

@ -0,0 +1 @@
b698012cc2d77c2652afd168a15e679d1394fa89 gnupg-2.1.18.tar.bz2

@ -28,14 +28,14 @@
# Source package infos
NAMESRC=${NAMESRC:-gnupg}
VERSION=${VERSION:-2.1.17}
VERSION=${VERSION:-2.1.18}
PKGVERSION=${VERSION/-beta/b}
ARCHIVE=${ARCHIVE:-$NAMESRC-$VERSION.tar.bz2}
WGET=${WGET:-https://www.gnupg.org/ftp/gcrypt/gnupg/$ARCHIVE}
# Build infos
NAMEPKG=${NAMEPKG:-gnupg2}
BUILD=${BUILD:-3GGD}
BUILD=${BUILD:-1GGD}
ARCH=${ARCH:-$(uname -m | sed 's/^i.86$/i486/;s/^arm.*/arm/')}
JOBS=${JOBS:-1}
EXT=${EXT:-txz}
@ -86,9 +86,6 @@ cd $TMP
echo "Building $ARCHIVE..."
tar xf $CWD/$ARCHIVE
cd $NAME
patch -p 1 < $CWD/gnupg-2.1.17-fix-disable-libdns.diff
patch -p 1 < $CWD/gnupg-2.1.17-frozen-faked-time.diff
patch -p 1 < $CWD/gnupg-2.1.17-fix-check-regexp-msg.diff
patch -p 1 < $CWD/gnupg-2.1.17-fix-regexp-sanitization.diff
CFLAGS=$CPUOPT \
CXXFLAGS=$CPUOPT \

Loading…
Cancel
Save