Package: sbuild
Version: 0.70.0-1
Severity: normal
Tags: patch

Dear maintainers,

With gnupg 2.1, which will soon be the default in unstable,
`sbuild-update --keygen` prompts the user for a passphrase for the
generated keys.  This is confusing, and will probably break things if
the user actually enters a passphrase.

The attached patch fixes the problem.

-- System Information:
Debian Release: stretch/sid
  APT prefers testing
  APT policy: (900, 'testing')
Architecture: i386 (i686)

Kernel: Linux 4.5.0-2-686-pae (SMP w/2 CPU cores)
Locale: LANG=en_GB.utf8, LC_CTYPE=en_GB.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages sbuild depends on:
ii  adduser         3.115
ii  apt-utils       1.3~pre2
ii  gnupg           2.1.14-2
ii  libsbuild-perl  0.70.0-1
ii  perl            5.22.2-3

Versions of packages sbuild recommends:
ii  debootstrap  1.0.81
ii  fakeroot     1.21-1

Versions of packages sbuild suggests:
pn  deborphan  <none>
ii  wget       1.18-2

-- no debconf information

-- 
Sean Whitton
From dd166466e75015a0ebc39f6a0533c98649a7a504 Mon Sep 17 00:00:00 2001
From: Sean Whitton <spwhit...@spwhitton.name>
Date: Fri, 5 Aug 2016 13:14:52 -0700
Subject: [PATCH] don't prompt the user during --keygen

---
 debian/control            | 3 ++-
 lib/Sbuild/ChrootSetup.pm | 2 +-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/debian/control b/debian/control
index 98f061f..40b8b61 100644
--- a/debian/control
+++ b/debian/control
@@ -56,7 +56,8 @@ Depends: adduser,
          libsbuild-perl (= ${source:Version}),
          ${misc:Depends},
          ${perl:Depends},
-         ${shlibs:Depends}
+         ${shlibs:Depends},
+         gnupg (>= 2)
 Recommends: debootstrap, fakeroot
 Suggests: deborphan, wget
 Description: Tool for building Debian binary packages from Debian sources
diff --git a/lib/Sbuild/ChrootSetup.pm b/lib/Sbuild/ChrootSetup.pm
index d45ef68..53dd75b 100644
--- a/lib/Sbuild/ChrootSetup.pm
+++ b/lib/Sbuild/ChrootSetup.pm
@@ -274,7 +274,7 @@ EOF
 	return $?
     }
 
-    my @command = ('gpg', '--no-options', '--no-default-keyring', '--batch', '--gen-key',
+    my @command = ('gpg', '--no-options', '--pinentry-mode', 'loopback', '--passphrase-file', '/dev/null', '--no-default-keyring', '--batch', '--gen-key',
                    $tmpfilename);
     $host->run_command(
         { COMMAND => \@command,
-- 
2.8.1

Attachment: signature.asc
Description: PGP signature

Reply via email to