Your message dated Sun, 01 Jan 2023 20:52:57 +0000
with message-id <e1pc5kd-005agv...@fasolo.debian.org>
and subject line Bug#929417: fixed in debconf 1.5.81
has caused the Debian Bug report #929417,
regarding debconf: Readline frontend should check that stdin is a tty (to fix 
Docker build freezes)
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact ow...@bugs.debian.org
immediately.)


-- 
929417: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=929417
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems
--- Begin Message ---
Package: debconf
Version: 1.5.72
Tags: patch

When building a Debian- or Ubuntu-based Docker container, installing
perl (so that Term::Readline is available) and a package that asks a
Debconf question causes the build to freeze with an interactive readline
prompt that cannot be answered:

    $ cat Dockerfile
    FROM debian:sid-20190506-slim
    RUN apt-get update
    RUN apt-get -y --no-install-recommends install perl keyboard-configuration

    $ docker build .
    […]
    Setting up keyboard-configuration (1.191) ...
    debconf: unable to initialize frontend: Dialog
    debconf: (TERM is not set, so the dialog frontend is not usable.)
    debconf: falling back to frontend: Readline
    Configuring keyboard-configuration
    ----------------------------------

    Please select the layout matching the keyboard for this machine.

      1. English (US)
    […]
      21. Other
    Keyboard layout:

Docker builds are noninteractive, of course, and stdin is connected to /dev/null. What seems to have happened here is that apt created a pty and connected stdout and stderr to it, but left stdin connected to /dev/null. The Readline frontend checked that there’s a controlling tty (there is), but failed to check that stdin is a tty (it’s not). So it proceeded to wait for input from a tty that will never provide it.

(Obviously one can set DEBIAN_FRONTEND=noninteractive as a workaround, but that shouldn’t be necessary, and is in fact discouraged: https://docs.docker.com/engine/faq/#why-is-debian_frontendnoninteractive-discouraged-in-dockerfiles because it’s often set in ways that persist for longer than intended.)

I’ll let the maintainers decide whether it’s worth updating the translated error message to be more technically accurate.

--- a/Debconf/FrontEnd/Readline.pm
+++ b/Debconf/FrontEnd/Readline.pm
@@ -44,8 +44,7 @@ sub init {
        $this->SUPER::init(@_);

        # Yeah, you need a controlling tty. Make sure there is one.
-       open(TESTTY, "/dev/tty") || die gettext("This frontend requires a controlling 
tty.")."\n";
-       close TESTTY;
+       -t STDIN || die gettext("This frontend requires a controlling 
tty.")."\n";

        $Term::ReadLine::termcap_nowarn = 1; # Turn off stupid termcap warning.
        $this->readline(Term::ReadLine->new('debconf'));

--- End Message ---
--- Begin Message ---
Source: debconf
Source-Version: 1.5.81
Done: Colin Watson <cjwat...@debian.org>

We believe that the bug you reported is fixed in the latest version of
debconf, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 929...@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Colin Watson <cjwat...@debian.org> (supplier of updated debconf package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmas...@ftp-master.debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Format: 1.8
Date: Sun, 01 Jan 2023 20:27:59 +0000
Source: debconf
Architecture: source
Version: 1.5.81
Distribution: unstable
Urgency: medium
Maintainer: Debconf Developers <debconf-de...@lists.alioth.debian.org>
Changed-By: Colin Watson <cjwat...@debian.org>
Closes: 223683 369953 657626 737392 929417 968814
Changes:
 debconf (1.5.81) unstable; urgency=medium
 .
   [ martin f krafft ]
   * confmodule: Allow use from scripts with "set -u" (closes: #369953).
 .
   [ Colin Watson ]
   * dpkg-preconfigure: Extract into /var/cache/debconf/tmp.ci, to avoid
     problems if /tmp is mounted noexec (closes: #223683, LP: #90085).
   * dpkg-reconfigure: Document --terse (closes: #737392).
 .
   [ Jakub Wilk ]
   * debconf-get-selections: Sort output by question name (closes: #968814).
 .
   [ Matthijs Kooijman ]
   * Display unsupported commands in debug logging (closes: #657626).
 .
   [ Anders Kaseorg ]
   * Make Readline frontend check that stdin is a tty (closes: #929417).
Checksums-Sha1:
 c000c0e486d97966b25b0b480e1e9188e7cd4708 2035 debconf_1.5.81.dsc
 6d99811bffe858a9e91dbf2786cf1a5760c32a77 571648 debconf_1.5.81.tar.xz
Checksums-Sha256:
 df592dedb028c311bd18082b9b1b28735a1653b41fd30ced5977bc1fb697351f 2035 
debconf_1.5.81.dsc
 3cc3bbc431ed2dbba8a084cea244af6e32299699477f09a5fbd380c0e1572183 571648 
debconf_1.5.81.tar.xz
Files:
 0944adb1f495f9c3c9b9540faeeeb8cc 2035 admin optional debconf_1.5.81.dsc
 88e44c1a9b88312b632193da05c4b5fc 571648 admin optional debconf_1.5.81.tar.xz

-----BEGIN PGP SIGNATURE-----

iQIzBAEBCAAdFiEErApP8SYRtvzPAcEROTWH2X2GUAsFAmOx7PAACgkQOTWH2X2G
UAuqbg/7Blz5ylZizwY1cnygEcKYQPzmBggSvvhIyBkEPv/w0ZsWSvadnaYjdpOk
DRCnUfQdJmidDB8LOmHwFl7/cZyXTvcw58gmzQoorwRonPGnXmZWzudEUa+3pCEi
xchOQONTD8KCoSccw2YG2UeixAeIrDXVlOMvlWjeFZAl3lBeXcUiCyjiV4q7cW28
zfgU6EhAVV+NxoQd5yMAPWnsGV/x4DGlrAY1AfSUj17Fij+i6/OB0LWKuuIuAMPu
LIPOPvUAC+EK0d08xW4Hyr5ey5Z5Ew8sqC5ch75Wy1xBCn992PuY1Dh0YSi0DWs2
OjmdICAV3ZFsAntYvsG41XdgffVAu/V1KJ1wMwlscHXbZ0JSaWg2KlOFxXztTdSw
ND8Bjtmxzda+f93gUntT3E7A8/LvLdLZCDgcfM1qhOuyQroMB+2fBHZ/b1US4Y1E
t0IjCx1QhiRVM/4T0TMkdeYTTWupWAW1iot1jTqV0/tHQ4GVU+Asur1nuOhlICMM
RqG15yLpgBpel74aP2mSjNbhHMBqvvZShB9fy8PJNvDIIFJ/7CPwB4vTHYBgt7R+
s3fu5RNhksm6235w0HBdm+lIhrHDJpyik1arYkzYK5e7w11VEZ6XFVYlxRgBWZ7S
xlRCtd4LwvseqKvoYddEhykZAYELrBunYDCkkJ173NZysz+B4/8=
=PsVl
-----END PGP SIGNATURE-----

--- End Message ---

Reply via email to