public inbox for pmg-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Stoiko Ivanov <s.ivanov@proxmox.com>
To: Fiona Ebner <f.ebner@proxmox.com>
Cc: pmg-devel@lists.proxmox.com
Subject: Re: [pmg-devel] [PATCH pmg-api 2/4] partially fix #2077: pmgcm: remove dependency on Term::ReadLine
Date: Mon, 22 Sep 2025 11:46:59 +0200	[thread overview]
Message-ID: <20250922114659.3aa7e5f2@rosa.proxmox.com> (raw)
In-Reply-To: <20250918142052.131956-3-f.ebner@proxmox.com>

Tested this by creating a cluster on a trixie based container, and joining
it to my bookworm PMG (the trixie container had pve-common
containing:
https://lore.proxmox.com/pve-devel/20250918135215.95188-2-f.ebner@proxmox.com/
and this patch applied)

Consider this:
Reviewed-by: Stoiko Ivanov <s.ivanov@proxmox.com>
Tested-by: Stoiko Ivanov <s.ivanov@proxmox.com>

On Thu, 18 Sep 2025 16:19:42 +0200
Fiona Ebner <f.ebner@proxmox.com> wrote:

> Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
> ---
>  src/PMG/CLI/pmgcm.pm | 7 ++-----
>  1 file changed, 2 insertions(+), 5 deletions(-)
> 
> diff --git a/src/PMG/CLI/pmgcm.pm b/src/PMG/CLI/pmgcm.pm
> index ab9fe2a..401f680 100644
> --- a/src/PMG/CLI/pmgcm.pm
> +++ b/src/PMG/CLI/pmgcm.pm
> @@ -3,7 +3,6 @@ package PMG::CLI::pmgcm;
>  use strict;
>  use warnings;
>  use Data::Dumper;
> -use Term::ReadLine;
>  use POSIX qw(strftime);
>  use JSON;
>  
> @@ -11,6 +10,7 @@ use PVE::SafeSyslog;
>  use PVE::Tools qw(extract_param);
>  use PVE::INotify;
>  use PVE::CLIHandler;
> +use PVE::PTY;
>  
>  use PMG::Utils;
>  use PMG::Ticket;
> @@ -188,10 +188,7 @@ __PACKAGE__->register_method({
>  
>              die "cluster already defined\n" if scalar(keys %{ $cinfo->{ids} });
>  
> -            my $term = new Term::ReadLine('pmgcm');
> -            my $attribs = $term->Attribs;
> -            $attribs->{redisplay_function} = $attribs->{shadow_redisplay};
> -            my $password = $term->readline('Enter password: ');
> +            my $password = PVE::PTY::read_password('Enter password: ');
>  
>              my $setup = {
>                  username => 'root@pam',



_______________________________________________
pmg-devel mailing list
pmg-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pmg-devel


  reply	other threads:[~2025-09-22  9:47 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-18 14:19 [pmg-devel] [PATCH-SERIES pmg-api 0/3] fix #2077: " Fiona Ebner
2025-09-18 14:19 ` [pmg-devel] [PATCH pmg-api 1/4] partially fix #2077: pmgconfig: " Fiona Ebner
2025-09-22  9:47   ` Stoiko Ivanov
2025-09-18 14:19 ` [pmg-devel] [PATCH pmg-api 2/4] partially fix #2077: pmgcm: " Fiona Ebner
2025-09-22  9:46   ` Stoiko Ivanov [this message]
2025-09-18 14:19 ` [pmg-devel] [PATCH pmg-api 3/4] partially fix #2077: pmgsh: " Fiona Ebner
2025-09-18 20:58   ` Stoiko Ivanov
2025-09-19  8:41     ` Fiona Ebner
2025-09-22  9:47       ` Stoiko Ivanov
2025-09-18 14:19 ` [pmg-devel] [RFC pmg-api 4/4] d/control: remove libterm-readline-gnu-perl dependency Fiona Ebner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250922114659.3aa7e5f2@rosa.proxmox.com \
    --to=s.ivanov@proxmox.com \
    --cc=f.ebner@proxmox.com \
    --cc=pmg-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal