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 21AB865615 for ; Thu, 23 Jul 2020 10:42:22 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 110FE2697C for ; Thu, 23 Jul 2020 10:42:22 +0200 (CEST) Received: from proxmox-new.maurer-it.com (proxmox-new.maurer-it.com [212.186.127.180]) (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 firstgate.proxmox.com (Proxmox) with ESMTPS id 86A302696F for ; Thu, 23 Jul 2020 10:42:21 +0200 (CEST) Received: from proxmox-new.maurer-it.com (localhost.localdomain [127.0.0.1]) by proxmox-new.maurer-it.com (Proxmox) with ESMTP id 4C0A643321 for ; Thu, 23 Jul 2020 10:42:21 +0200 (CEST) To: Proxmox Backup Server development discussion , Stefan Reiter References: <20200721114108.11603-1-s.reiter@proxmox.com> <20200721114108.11603-2-s.reiter@proxmox.com> From: Thomas Lamprecht Message-ID: <46b82bbe-7e00-0482-0708-bd394d1ec32a@proxmox.com> Date: Thu, 23 Jul 2020 10:42:16 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:79.0) Gecko/20100101 Thunderbird/79.0 MIME-Version: 1.0 In-Reply-To: <20200721114108.11603-2-s.reiter@proxmox.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-SPAM-LEVEL: Spam detection results: 0 AWL 0.007 Adjusted score from AWL reputation of From: address KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment RCVD_IN_DNSWL_MED -2.3 Sender listed at https://www.dnswl.org/, medium trust SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Subject: [pbs-devel] applied: [PATCH v2 backup 2/2] add .../apt/update API call X-BeenThere: pbs-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox Backup Server development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Jul 2020 08:42:22 -0000 On 21.07.20 13:41, Stefan Reiter wrote: > Depends on patched apt-pkg-native-rs. Changelog-URL detection is > inspired by PVE perl code for now, though marked with fixme to use 'apt > changelog' later on, if/when our repos have APT-compatible changelogs > set up. > > list_installed_apt_packages iterates all packages and creates an > APTUpdateInfo with detailed information for every package matched by the > given filter Fn. > > Sadly, libapt-pkg has some questionable design choices regarding their > use of 'iterators', which means quite a bit of nesting... > > Signed-off-by: Stefan Reiter > --- > > v2: > * Include feedback from Fabian: > ** Update Cargo.toml with now packaged apt-pkg-native (still no update on my PR) > ** Use proxmox.com changelog logic for all origin=Proxmox packages, not just pbs > ** Change serde naming to PascalCase for APTUpdateInfo > ** Add FIXME to changelog detection > ** Update comments > > > Cargo.toml | 1 + > src/api2/node.rs | 2 + > src/api2/node/apt.rs | 211 +++++++++++++++++++++++++++++++++++++++++++ > src/api2/types.rs | 27 ++++++ > 4 files changed, 241 insertions(+) > create mode 100644 src/api2/node/apt.rs > > applied, thanks! Adding additionally the POST call on it for `apt-get update` wouldn't have been really more work ;)