From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by lists.proxmox.com (Postfix) with ESMTPS id 959E65B62F for ; Tue, 7 Jul 2020 12:27:03 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 8D00126ACC for ; Tue, 7 Jul 2020 12:27:03 +0200 (CEST) Received-SPF: none (sara.proxmox.com: No applicable sender policy available) receiver=firstgate.proxmox.com; identity=mailfrom; envelope-from="moayad@sara.proxmox.com"; helo=sara.proxmox.com; client-ip=212.186.127.178 Received: from sara.proxmox.com (212-186-127-178.static.upcbusiness.at [212.186.127.178]) by firstgate.proxmox.com (Proxmox) with ESMTP id 41F5226ABD for ; Tue, 7 Jul 2020 12:27:02 +0200 (CEST) Received: by sara.proxmox.com (Postfix, from userid 1000) id 3178536B4D1; Tue, 7 Jul 2020 12:20:02 +0200 (CEST) From: Moayad Almalat To: pve-devel@pve.proxmox.com Date: Tue, 7 Jul 2020 12:20:00 +0200 Message-Id: <20200707102001.124244-1-m.almalat@proxmox.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SPAM-LEVEL: Spam detection results: 1 KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment KAM_LAZY_DOMAIN_SECURITY 1 Sending domain does not have any anti-forgery methods KHOP_HELO_FCRDNS 0.275 Relay HELO differs from its IP's reverse DNS NO_DNS_FOR_FROM 0.379 Envelope sender has no MX or A DNS records SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_NONE 0.001 SPF: sender does not publish an SPF Record URIBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [pveceph.pm, nodes.pm, apt.pm] X-Mailman-Approved-At: Tue, 07 Jul 2020 12:27:58 +0200 Subject: [pve-devel] [PATCH pve-manger 0/1] Close #1623: replace apt-get to apt X-BeenThere: pve-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: PVE development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Jul 2020 10:27:03 -0000 Signed-off-by: Moayad Almalat --- PVE/API2/APT.pm | 6 +++--- PVE/API2/Nodes.pm | 6 +++--- PVE/CLI/pveceph.pm | 4 ++-- bin/pveupgrade | 10 +++++----- 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/PVE/API2/APT.pm b/PVE/API2/APT.pm index 2db620aa..01688ed1 100644 --- a/PVE/API2/APT.pm +++ b/PVE/API2/APT.pm @@ -275,7 +275,7 @@ __PACKAGE__->register_method({ name => 'update_database', path => 'update', method => 'POST', - description => "This is used to resynchronize the package index files from their sources (apt-get update).", + description => "This is used to resynchronize the package index files from their sources (apt update).", permissions => { check => ['perm', '/nodes/{node}', [ 'Sys.Modify' ]], }, @@ -322,9 +322,9 @@ __PACKAGE__->register_method({ my $aptcfn = "/etc/apt/apt.conf.d/76pveproxy"; PVE::Tools::file_set_contents($aptcfn, $aptconf); - my $cmd = ['apt-get', 'update']; + my $cmd = ['apt', 'update']; - print "starting apt-get update\n" if !$param->{quiet}; + print "starting apt update\n" if !$param->{quiet}; if ($param->{quiet}) { PVE::Tools::run_command($cmd, outfunc => sub {}, errfunc => sub {}); diff --git a/PVE/API2/Nodes.pm b/PVE/API2/Nodes.pm index 1b133352..75757230 100644 --- a/PVE/API2/Nodes.pm +++ b/PVE/API2/Nodes.pm @@ -884,7 +884,7 @@ __PACKAGE__->register_method ({ node => get_standard_option('pve-node'), upgrade => { type => 'boolean', - description => "Deprecated, use the 'cmd' property instead! Run 'apt-get dist-upgrade' instead of normal shell.", + description => "Deprecated, use the 'cmd' property instead! Run 'apt dist-upgrade' instead of normal shell.", optional => 1, default => 0, }, @@ -1024,7 +1024,7 @@ __PACKAGE__->register_method ({ node => get_standard_option('pve-node'), upgrade => { type => 'boolean', - description => "Deprecated, use the 'cmd' property instead! Run 'apt-get dist-upgrade' instead of normal shell.", + description => "Deprecated, use the 'cmd' property instead! Run 'apt dist-upgrade' instead of normal shell.", optional => 1, default => 0, }, @@ -1160,7 +1160,7 @@ __PACKAGE__->register_method ({ proxy => get_standard_option('spice-proxy', { optional => 1 }), upgrade => { type => 'boolean', - description => "Deprecated, use the 'cmd' property instead! Run 'apt-get dist-upgrade' instead of normal shell.", + description => "Deprecated, use the 'cmd' property instead! Run 'apt dist-upgrade' instead of normal shell.", optional => 1, default => 0, }, diff --git a/PVE/CLI/pveceph.pm b/PVE/CLI/pveceph.pm index af14cbc0..e2c89be2 100755 --- a/PVE/CLI/pveceph.pm +++ b/PVE/CLI/pveceph.pm @@ -157,9 +157,9 @@ __PACKAGE__->register_method ({ local $ENV{DEBIAN_FRONTEND} = 'noninteractive'; print "update available package list\n"; - eval { run_command(['apt-get', '-q', 'update'], outfunc => sub {}, errfunc => sub { print STDERR "$_[0]\n" }) }; + eval { run_command(['apt', '-q', 'update'], outfunc => sub {}, errfunc => sub { print STDERR "$_[0]\n" }) }; - my @apt_install = qw(apt-get --no-install-recommends -o Dpkg::Options::=--force-confnew install --); + my @apt_install = qw(apt --no-install-recommends -o Dpkg::Options::=--force-confnew install --); my @ceph_packages = qw( ceph ceph-common diff --git a/bin/pveupgrade b/bin/pveupgrade index 0ce01824..cd20fa75 100755 --- a/bin/pveupgrade +++ b/bin/pveupgrade @@ -42,13 +42,13 @@ if (!$st || (time() - $st->mtime) > (3*24*3600)) { } else { - my $cmdstr = 'apt-get dist-upgrade'; + my $cmdstr = 'apt dist-upgrade'; - print "Starting system upgrade: apt-get dist-upgrade\n"; + print "Starting system upgrade: apt dist-upgrade\n"; my $oldlist = PVE::API2::APT->list_updates({ node => $nodename}); - system('apt-get', 'dist-upgrade'); + system('apt', 'dist-upgrade'); my $pkglist = PVE::API2::APT->list_updates({ node => $nodename}); @@ -88,7 +88,7 @@ __END__ =head1 NAME -pveupgrade - wrapper arournd "apt-get dist-upgrade" +pveupgrade - wrapper arournd "apt dist-upgrade" =head1 SYNOPSIS @@ -96,6 +96,6 @@ pveupgrade - wrapper arournd "apt-get dist-upgrade" =head1 DESCRIPTION -This is a small wrapper around "apt-get dist-upgrade". We use this to +This is a small wrapper around "apt dist-upgrade". We use this to print additional information (kernel restart required?), and optionally run an interactive shell after the update (--shell) -- 2.20.1