Package: dnssec-trigger
Version: 0.13~svn685-4+b1
Severity: grave
Tags: patch

The /usr/lib/dnssec-trigger/dnssec-trigger-script fails to update
/etc/resolv.conf with the version of network-manager now in
testing and unstable. The problem is that calls to
client.get_manager_running() return False even if NetworkManager is
running. This is caused by imporper initialization of the client object.

According to https://bugzilla.redhat.com/show_bug.cgi?id=1229337 the
client object should be created with NMClient.Client().new() instead of
just using NMClient.Client(). The attached patch fixes this and resolves
the issue.

The patch also adds the recommended GI version specification before
importing NMClient. This currently only avoids a warning and if you
don't like that part you can also apply the patch without it.

Gaudenz

-- System Information:
Debian Release: stretch/sid
  APT prefers testing-proposed-updates
  APT policy: (500, 'testing-proposed-updates'), (500, 'testing'), (100, 
'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.3.0-1-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=de_CH.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages dnssec-trigger depends on:
ii  gir1.2-networkmanager-1.0  1.1.90-6
ii  init-system-helpers        1.28
ii  libc6                      2.21-9
ii  libgdk-pixbuf2.0-0         2.32.3-1.2
ii  libglib2.0-0               2.46.2-3
ii  libgtk2.0-0                2.24.29-1
ii  libldns1                   1.6.17-8
ii  libssl1.0.2                1.0.2f-2
ii  python                     2.7.11-1
ii  python-gi                  3.18.2-2
ii  python-lockfile            1:0.10.2-2
ii  unbound                    1.5.7-1

dnssec-trigger recommends no packages.

dnssec-trigger suggests no packages.

-- no debconf information

-- debsums errors found:
debsums: changed file /usr/lib/dnssec-trigger/dnssec-trigger-script (from 
dnssec-trigger package)
--- /usr/lib/dnssec-trigger/dnssec-trigger-script.orig	2016-02-25 10:17:23.296285495 +0100
+++ /usr/lib/dnssec-trigger/dnssec-trigger-script	2016-02-25 10:34:25.856239132 +0100
@@ -5,6 +5,8 @@
 @author: Pavel Šimerda <psime...@redhat.com>
 """
 
+import gi
+gi.require_version('NMClient', '1.0')
 from gi.repository import NMClient
 import os, sys, shutil, glob, subprocess
 import logging, logging.handlers
@@ -333,7 +335,7 @@
         except AttributeError:
             self.usage()
         self.config = Config()
-        self.client = NMClient.Client()
+        self.client = NMClient.Client().new()
 
         self.resolvconf = "/etc/resolv.conf"
         self.resolvconf_backup = "/run/dnssec-trigger/resolv.conf.bak"

Reply via email to