Your message dated Tue, 26 Feb 2019 09:50:19 +0000
with message-id <e1gyznt-000epr...@fasolo.debian.org>
and subject line Bug#922279: fixed in debconf 1.5.71
has caused the Debian Bug report #922279,
regarding debconf: Can't select long choices in dialog (whiptail) multiselect
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.)
--
922279: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=922279
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems
--- Begin Message ---
Package: debconf
Version: 1.5.70
Severity: normal
Tags: patch
Dear Maintainer,
After upgrading libpam-cap, systemd user sessions stopped working. I
traced the problem to pam-auth-update, which uses debconf to manage the
PAM configuration. Using the dialog frontend with whiptail in a
terminal that is 80 characters wide, it is not possible to enable the
pam_systemd module, even if it is selected in whiptail. To reproduce:
DEBIAN_FRONTEND=dialog DEBCONF_DEBUG=developer PERL_DL_NONLAZY=1
/usr/share/debconf/frontend sh -c '
. /usr/share/debconf/confmodule
db_x_loadtemplatefile /var/lib/dpkg/info/libpam-runtime.templates libpam-runtime
db_subst libpam-runtime/profiles profile_names unix, systemd, mkhomedir, cgfs,
capability
db_subst libpam-runtime/profiles profiles Unix authentication, Register user
sessions in the systemd control group hierarchy, Create home directory on
login, Create cgroups for user login sessions, Inheritable Capabilities
Management
db_fset libpam-runtime/profiles seen false
db_set libpam-runtime/profiles unix, systemd, cgfs, capability
db_input critical libpam-runtime/profiles || echo $RET
db_go
db_get libpam-runtime/profiles
echo "<$RET>"'
Which will produce output like the following:
debconf (developer): frontend started
debconf (developer): Trying to find a templates file..
debconf (developer): Trying sh.templates
debconf (developer): Trying /usr/share/debconf/templates/sh.templates
debconf (developer): Couldn't find a templates file.
debconf (developer): frontend running, package name is
debconf (developer): starting sh -c
. /usr/share/debconf/confmodule
db_x_loadtemplatefile /var/lib/dpkg/info/libpam-runtime.templates libpam-runtime
db_subst libpam-runtime/profiles profile_names unix, systemd, mkhomedir, cgfs,
capability
db_subst libpam-runtime/profiles profiles Unix authentication, Register user
sessions in the systemd control group hierarchy, Create home directory on
login, Create cgroups for user login sessions, Inheritable Capabilities
Management
db_fset libpam-runtime/profiles seen false
db_set libpam-runtime/profiles unix, systemd, cgfs, capability
db_input critical libpam-runtime/profiles || echo $RET
db_go
db_get libpam-runtime/profiles
echo "<$RET>"
debconf (developer): <-- X_LOADTEMPLATEFILE
/var/lib/dpkg/info/libpam-runtime.templates libpam-runtime
debconf (developer): --> 0
debconf (developer): <-- SUBST libpam-runtime/profiles profile_names unix,
systemd, mkhomedir, cgfs, capability
debconf (developer): --> 0
debconf (developer): <-- SUBST libpam-runtime/profiles profiles Unix
authentication, Register user sessions in the systemd control group hierarchy,
Create home directory on login, Create cgroups for user login sessions,
Inheritable Capabilities Management
debconf (developer): --> 0
debconf (developer): <-- FSET libpam-runtime/profiles seen false
debconf (developer): --> 0 false
debconf (developer): <-- SET libpam-runtime/profiles unix, systemd, cgfs,
capability
debconf (developer): --> 0 value set
debconf (developer): <-- INPUT critical libpam-runtime/profiles
debconf (developer): --> 0 question will be asked
debconf (developer): <-- GO
debconf (developer): Input value, "Register user sessions in the systemd
control group ..." not found in C choices! This should never happen. Perhaps
the templates were incorrectly localized.
debconf (developer): --> 0 ok
debconf (developer): <-- GET libpam-runtime/profiles
debconf (developer): --> 0 unix, cgfs, capability
<unix, cgfs, capability>
Note that systemd does not appear in the output regardless of whether or
not the option is selected. The problem is that the ellipsized choice
text can't be mapped back to the choice value. I have attached a patch
which adds this mapping. It also handles the case that ellipsized
options become ambiguous by allowing screen overflow instead of blindly
mapping both to a single value.
Thanks for considering,
Kevin
P.S. I have set Severity: normal, but the systemd breakage was severe
and difficult to track down without familiarity with systemd user
sessions. The issue may have significant impact.
-- System Information:
Debian Release: buster/sid
APT prefers testing
APT policy: (990, 'testing'), (500, 'unstable'), (101, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386
Kernel: Linux 4.20.8 (SMP w/4 CPU cores)
Kernel taint flags: TAINT_OOT_MODULE
Locale: LANG=en_US.utf8, LC_CTYPE=en_US.utf8 (charmap=UTF-8),
LANGUAGE=en_US.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
Versions of packages debconf depends on:
ii perl-base 5.28.1-4
Versions of packages debconf recommends:
ii apt-utils 1.8.0~rc2
ii debconf-i18n 1.5.70
Versions of packages debconf suggests:
pn debconf-doc <none>
pn debconf-kde-helper <none>
pn debconf-utils <none>
pn libgtk3-perl <none>
pn libnet-ldap-perl <none>
ii libterm-readline-gnu-perl 1.36-1
ii perl 5.28.1-4
ii whiptail 0.52.20-8
-- debconf information:
* debconf/frontend: Dialog
* debconf/priority: medium
debconf-apt-progress/info:
debconf-apt-progress/title:
debconf-apt-progress/media-change:
debconf-apt-progress/preparing:
>From aa4aaf42dca62a11ad3981312fc095f708192c18 Mon Sep 17 00:00:00 2001
Message-Id:
<aa4aaf42dca62a11ad3981312fc095f708192c18.1550122022.git.ke...@kevinlocke.name>
From: Kevin Locke <ke...@kevinlocke.name>
Date: Wed, 13 Feb 2019 22:17:07 -0700
Subject: [PATCH] Dialog/Multiselect: Fix ellipsized selections
When displaying a multiselect using the dialog frontend with whiptail,
if any choices are changed by the ellipsize method (i.e. any choices are
longer than the available screen width to display choices) they can not
be selected. Running with DEBCONF_DEBUG=developer prints the message:
debconf (developer): Input value, "%s" not found in C choices! This should
never happen. Perhaps the templates were incorrectly localized.
The cause is that translate_to_C is unable to map the ellipsized choice
text back to the choice value. This commit adds a hash to do so. It
also fixes the problem that choices may become ambiguous by allowing
screen overflow in this case.
Signed-off-by: Kevin Locke <ke...@kevinlocke.name>
---
Debconf/Element/Dialog/Multiselect.pm | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)
diff --git a/Debconf/Element/Dialog/Multiselect.pm
b/Debconf/Element/Dialog/Multiselect.pm
index 781655c7..d3b6e4cf 100644
--- a/Debconf/Element/Dialog/Multiselect.pm
+++ b/Debconf/Element/Dialog/Multiselect.pm
@@ -10,6 +10,7 @@ package Debconf::Element::Dialog::Multiselect;
use strict;
use base qw(Debconf::Element::Multiselect);
use Debconf::Encoding qw(width);
+use Debconf::Log qw(debug);
=head1 DESCRIPTION
@@ -53,8 +54,18 @@ sub show {
$lines=$lines + $menu_height + $this->frontend->spacer;
my $selectspacer = $this->frontend->selectspacer;
my $c=1;
+ my %unellipsized;
foreach (@choices) {
my $choice = $this->frontend->ellipsize($_);
+
+ if (exists $unellipsized{$choice}) {
+ debug 'developer' => sprintf
+ 'Ambiguous ellipsized choice "%s": "%s" or "%s".
Overflow.',
+ $choice, $unellipsized{$choice}, $_;
+ $choice = $_;
+ }
+ $unellipsized{$choice} = $_;
+
push @params, ($choice, "");
push @params, ($value{$_} ? 'on' : 'off');
@@ -78,7 +89,7 @@ sub show {
# Dialog returns the selected items, each on a line.
# Translate back to C, and turn into our internal format.
$this->value(join(", ", $this->order_values(
- map { $this->translate_to_C($_) }
+ map {
$this->translate_to_C($unellipsized{$_}) }
split(/\n/, $value))));
}
else {
--
2.20.1
--- End Message ---
--- Begin Message ---
Source: debconf
Source-Version: 1.5.71
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 922...@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: Tue, 26 Feb 2019 09:30:35 +0000
Source: debconf
Architecture: source
Version: 1.5.71
Distribution: unstable
Urgency: medium
Maintainer: Debconf Developers <debconf-de...@lists.alioth.debian.org>
Changed-By: Colin Watson <cjwat...@debian.org>
Closes: 922279
Changes:
debconf (1.5.71) unstable; urgency=medium
.
[ Kevin Locke ]
* Dialog: Fix whiptail ellipsized selections (closes: #922279).
Checksums-Sha1:
6686ed689e7281c12fb7a9b7d800beabaa779c1f 2047 debconf_1.5.71.dsc
4fe401d6ebcb2b250003d0a37cbc3c480e9f4658 571272 debconf_1.5.71.tar.xz
0f18e4957d8f3d009017d148a5b1e10ef38b5ee0 6867 debconf_1.5.71_source.buildinfo
Checksums-Sha256:
18580a7817060c492048fac9fe0c859b1f5ca07538decfb32b182948a15cab79 2047
debconf_1.5.71.dsc
dc23f44775be0d2f52f18eaff4d2d47ef62ae50333df1b737248c8a2635ce433 571272
debconf_1.5.71.tar.xz
90229745d0bebb98d0520fbc6304adf05e82cbf842a8748069c4e309ace926e8 6867
debconf_1.5.71_source.buildinfo
Files:
7ffd6d1fabae37590ec96513149a8bd7 2047 admin optional debconf_1.5.71.dsc
2caaada67bd71639ac28d743905a7558 571272 admin optional debconf_1.5.71.tar.xz
1ff7ac928254e5ab14c09bee2e8195fb 6867 admin optional
debconf_1.5.71_source.buildinfo
-----BEGIN PGP SIGNATURE-----
iQIzBAEBCAAdFiEErApP8SYRtvzPAcEROTWH2X2GUAsFAlx1B0kACgkQOTWH2X2G
UAsNvQ//Re00bpC/d5HIxRjHEanuSU2KZW6Se3S3sWRDuYjyE/Z0A6VAdzEgG4Qa
p9g2iDejuE3NSwRZcvIBS+HaMKmzyxDOEiILNvpWYIRgzL92xiEIcGshwdJ4aeaF
6xlf3w5unEJdtbvW36p5d+/0okMIc02y967i+3e+e74qAk5bPpmXR3sCC5jdLrgg
zYlvQh8Xo2k4OFbvdWD0L9zHkj1dsQqcpvMIVNv8IuTn/7WlvG/RYF7oOZIRjE8e
pyWVoNmzrOSm9uA/Dz6XZfN4EjCnJXIJuJWgpxIdaB8fvxs3WGZTXzkyncLvtoox
pRO55p3x/U9QFyBJvUlbHqMF2Bw27oryzSYJ9qvVrmnitZYyGlDJGCRVu4PoXThe
q4ajOeHY6Q9b26eDXcbQQUHuvQIK+MFZM4OkM2Mppqb1hPkYrWAQpmHF0B9llznP
Mqfj6gIbQM2PLKFSQO4A67lfAQcw0YgPF+VGxioD9np4s663idu21yJUVKy1fuI1
YpPABcnLRmP9wvx7zOhJvEhXgMXYlOL5a2uqJxpcjdgfJt5e2/7fkRFIceRSn9rg
HMLwEty23+AcGbnv2vXLwdA8xzxyxOwVc7ArBlaeMwz1WCxIE/XcK/1pvq0W9/Fj
TEC3muS1csctaAOJ1TLLI5hQMFkGGORl+2RCn9jylAbGqwyR3ZI=
=QuPV
-----END PGP SIGNATURE-----
--- End Message ---