=== modified file 'debian/control' --- debian/control 2016-02-28 12:33:38 +0000 +++ debian/control 2016-02-28 13:09:43 +0000 @@ -21,7 +21,7 @@ libgnutls28-dev (>= 3.3.0) | libgnutls30 (>= 3.3.0), python-dbus, python-dbus, python-avahi, python-gobject | python-gi, avahi-daemon, adduser, - python-urwid, gnupg (<< 2) + python-urwid, gnupg Recommends: ssh-client | fping Description: server giving encrypted passwords to Mandos clients This is the server part of the Mandos system, which allows @@ -41,7 +41,7 @@ Package: mandos-client Architecture: linux-any Depends: ${shlibs:Depends}, ${misc:Depends}, adduser, cryptsetup, - gnupg (<< 2), initramfs-tools, dpkg-dev (>=1.16.0) + initramfs-tools, dpkg-dev (>=1.16.0) Recommends: ssh, gnutls-bin | openssl Breaks: dropbear (<= 0.53.1-1) Enhances: cryptsetup === modified file 'mandos' --- mandos 2016-02-28 10:59:18 +0000 +++ mandos 2016-02-28 13:09:43 +0000 @@ -151,8 +151,19 @@ def __init__(self): self.tempdir = tempfile.mkdtemp(prefix="mandos-") + self.gpg = "gpg" + try: + output = subprocess.check_output(["gpgconf"]) + for line in output.splitlines(): + name, text, path = line.split(":") + if name == "gpg": + self.gpg = path + break + except OSError as e: + if e.errno != errno.ENOENT: + raise self.gnupgargs = ['--batch', - '--home', self.tempdir, + '--homedir', self.tempdir, '--force-mdc', '--quiet', '--no-use-agent'] @@ -197,7 +208,7 @@ dir=self.tempdir) as passfile: passfile.write(passphrase) passfile.flush() - proc = subprocess.Popen(['gpg', '--symmetric', + proc = subprocess.Popen([self.gpg, '--symmetric', '--passphrase-file', passfile.name] + self.gnupgargs, @@ -215,7 +226,7 @@ dir = self.tempdir) as passfile: passfile.write(passphrase) passfile.flush() - proc = subprocess.Popen(['gpg', '--decrypt', + proc = subprocess.Popen([self.gpg, '--decrypt', '--passphrase-file', passfile.name] + self.gnupgargs,