chiark / gitweb /
Import gnupg2_2.1.18-8~deb9u1.debian.tar.bz2
[gnupg2.git] / patches / dirmngr-idling / 0004-dirmngr-Avoid-automatically-checking-upstream-swdb.patch
1 From: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
2 Date: Sun, 20 Nov 2016 23:09:24 -0500
3 Subject: dirmngr: Avoid automatically checking upstream swdb.
4
5 * dirmngr/dirmngr.c (housekeeping_thread): Avoid automatically
6 checking upstream's software database.  In Debian, software updates
7 should be handled by the distro mechanism, and additional upstream
8 checks only confuse the user.
9 * doc/dirmngr.texi: document that --allow-version-check does nothing.
10
11 Signed-off-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
12 ---
13  dirmngr/dirmngr.c | 13 -------------
14  doc/dirmngr.texi  | 11 +++++------
15  2 files changed, 5 insertions(+), 19 deletions(-)
16
17 diff --git a/dirmngr/dirmngr.c b/dirmngr/dirmngr.c
18 index a8be56fa4..746f43d10 100644
19 --- a/dirmngr/dirmngr.c
20 +++ b/dirmngr/dirmngr.c
21 @@ -1771,7 +1771,6 @@ static void *
22  housekeeping_thread (void *arg)
23  {
24    static int sentinel;
25 -  struct server_control_s ctrlbuf;
26  
27    (void)arg;
28  
29 @@ -1784,18 +1783,6 @@ housekeeping_thread (void *arg)
30    if (opt.verbose > 1)
31      log_info ("starting housekeeping\n");
32  
33 -  memset (&ctrlbuf, 0, sizeof ctrlbuf);
34 -  dirmngr_init_default_ctrl (&ctrlbuf);
35 -
36 -  if (network_activity_seen)
37 -    {
38 -      network_activity_seen = 0;
39 -      if (opt.use_tor || opt.allow_version_check)
40 -        dirmngr_load_swdb (&ctrlbuf, 0);
41 -    }
42 -
43 -  dirmngr_deinit_default_ctrl (&ctrlbuf);
44 -
45    if (opt.verbose > 1)
46      log_info ("ready with housekeeping\n");
47    sentinel--;
48 diff --git a/doc/dirmngr.texi b/doc/dirmngr.texi
49 index e27157c00..dd104273d 100644
50 --- a/doc/dirmngr.texi
51 +++ b/doc/dirmngr.texi
52 @@ -266,12 +266,11 @@ seconds.
53  @item --allow-version-check
54  @opindex allow-version-check
55  Allow Dirmngr to connect to @code{https://versions.gnupg.org} to get
56 -the list of current software versions.  If this option is enabled, or
57 -if @option{use-tor} is active, the list is retrieved when the local
58 -copy does not exist or is older than 5 to 7 days.  See the option
59 -@option{--query-swdb} of the command @command{gpgconf} for more
60 -details.  Note, that regardless of this option a version check can
61 -always be triggered using this command:
62 +the list of current software versions.  On debian-packaged versions,
63 +this option does nothing since software updates should be handled by
64 +the distribution.  See the option @option{--query-swdb} of the command
65 +@command{gpgconf} for more details.  Note, that regardless of this
66 +option a version check can always be triggered using this command:
67  
68  @example
69         gpg-connect-agent --dirmngr 'loadswdb --force' /bye