From dffd09d0549bf23aa451264ca642caf38396d698 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Pialasse Date: Sat, 13 Apr 2024 04:21:57 -0400 Subject: [PATCH] * Sat Apr 13 2024 Jean-Philippe Pialasse 11.0.0-4.sme - remove whiptail [SME: 8275] --- .../share/perl5/vendor_perl/esmith/console.pm | 32 ++++--------------- smeserver-lib.spec | 5 ++- 2 files changed, 10 insertions(+), 27 deletions(-) diff --git a/root/usr/share/perl5/vendor_perl/esmith/console.pm b/root/usr/share/perl5/vendor_perl/esmith/console.pm index ad39919..87f0e39 100755 --- a/root/usr/share/perl5/vendor_perl/esmith/console.pm +++ b/root/usr/share/perl5/vendor_perl/esmith/console.pm @@ -23,7 +23,7 @@ esmith::console - A class to provide a backend library to the server console. =head1 DESCRIPTION This class provides a backend library of methods for the frontend console on -the server. The intent is that all of the whiptail code is hidden in this +the server. The intent is that all of the dialog code is hidden in this library, and the frontend can just concern itself with the logical progression through any and all applicable screens. @@ -104,7 +104,7 @@ sub new =head2 screen and dialog -These method are wrappers around whiptail and dialog, and permit the creation +These method are wrappers around dialog, and permit the creation of custom screens depending on the arguments passed. They are typically not called directly, but are used by all of the other page methods that follow. You should only call these method directly if none of the other @@ -122,11 +122,6 @@ sub dialog _screen(shift, "/usr/bin/dialog", @_); } -sub whiptail -{ - _screen(shift, "/usr/bin/whiptail", @_); -} - sub _screen { my $self = shift; @@ -159,28 +154,13 @@ sub _screen close READER or die gettext("Couldn't close reading end of pipe") , ": $!\n"; - if ($whiptail =~ m{\bwhiptail$} ) { - # whiptail sends its output via STDERR. We temporarily - # shut off warnings so they don't interfere with that. - local $^W = 0; + use Fcntl qw/F_SETFD/; - open STDERR, ">& WRITER" - or die gettext("Couldn't connect STDERR to pipe"), ": $!\n"; + # Clear close-on-exec on WRITER so that it stays open for dialog to use + fcntl(WRITER, F_SETFD, 0); - close WRITER - or die gettext("Couldn't close writing end of pipe"), ": $!\n"; - - unshift @whiptailArgs, $whiptail, - '--backtitle', $self->backtitle; - } else { - use Fcntl qw/F_SETFD/; - - # Clear close-on-exec on WRITER so that it stays open for dialog to use - fcntl(WRITER, F_SETFD, 0); - - unshift @whiptailArgs, $whiptail, + unshift @whiptailArgs, $whiptail, '--backtitle', $self->backtitle, "--output-fd", fileno(WRITER); - } exec @whiptailArgs; die gettext("Couldn't exec:"), ": $!\n"; } diff --git a/smeserver-lib.spec b/smeserver-lib.spec index 0ff1da4..113b2cc 100644 --- a/smeserver-lib.spec +++ b/smeserver-lib.spec @@ -6,7 +6,7 @@ Summary: smeserver server and gateway - library module %define name smeserver-lib Name: %{name} %define version 11.0.0 -%define release 3 +%define release 4 Version: %{version} Release: %{release}%{?dist} License: Artistic @@ -33,6 +33,9 @@ Provides: e-smith-lib smeserver server and gateway software - library module. %changelog +* Sat Apr 13 2024 Jean-Philippe Pialasse 11.0.0-4.sme +- remove whiptail [SME: 8275] + * Thu Apr 04 2024 Brian Read 11.0.0-3.sme - Set license file to GPL2.0 [SME: 12577]