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 C377861D2F for ; Thu, 22 Oct 2020 17:21:02 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id B1B4C21314 for ; Thu, 22 Oct 2020 17:20:32 +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 E80A521308 for ; Thu, 22 Oct 2020 17:20:30 +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 B2EC245ABA for ; Thu, 22 Oct 2020 17:20:30 +0200 (CEST) Date: Thu, 22 Oct 2020 17:20:24 +0200 From: Fabian =?iso-8859-1?q?Gr=FCnbichler?= To: Proxmox Backup Server development discussion References: <20201021094116.32501-1-s.reiter@proxmox.com> In-Reply-To: <20201021094116.32501-1-s.reiter@proxmox.com> MIME-Version: 1.0 User-Agent: astroid/0.15.0 (https://github.com/astroidmail/astroid) Message-Id: <1603379935.ftfpo61vxu.astroid@nora.none> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-SPAM-LEVEL: Spam detection results: 0 AWL 0.030 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 URIBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [apt.rs, proxmox.com, http.rs, tools.rs] Subject: [pbs-devel] applied-series: [PATCH 0/7] apt: add changelog API and fix #2934 (list new packages) 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, 22 Oct 2020 15:21:02 -0000 I dropped the apt-pkg-native version bump (both from this series, and=20 the patches to the binding crate) since I dislike bumping versions=20 before upstream those (it's very confusing down the line). added the following as follow-up as well: diff --git a/src/api2/node/apt.rs b/src/api2/node/apt.rs index 1c5b7db9..e8d4094b 100644 --- a/src/api2/node/apt.rs +++ b/src/api2/node/apt.rs @@ -42,7 +42,7 @@ fn get_changelog_url( let output =3D match output.splitn(2, ' ').next() { Some(output) =3D> { if output.len() < 2 { - bail!("invalid output (URI part too short) from 'apt-g= et changelog --print-uris: {}", output) + bail!("invalid output (URI part too short) from 'apt-g= et changelog --print-uris': {}", output) } output[1..output.len()-1].to_owned() }, @@ -421,7 +421,7 @@ fn apt_get_changelog( // FIXME: use 'apt-get changelog' for proxmox packages as well, once r= epo supports it if changelog_url.starts_with("http://download.proxmox.com/") { let changelog =3D crate::tools::runtime::block_on(http::get_string= (changelog_url)) - .map_err(|err| format_err!("Error downloading changelog: {}", = err))?; + .map_err(|err| format_err!("Error downloading changelog from '= {}': {}", changelog_url, err))?; return Ok(json!(changelog)); } else { let mut command =3D std::process::Command::new("apt-get"); On October 21, 2020 11:41 am, Stefan Reiter wrote: > (Note: This is technically a successor to this series [0], but since I ch= anged a > lot around and also added onto it, this is not a v2 but a seperate series > entirely.) >=20 > Bring the "Updates" panel up to par with PVE by adding two features: > * A /changelog API call > * A fix for #2934, so new packages that will be installed on upgrade are > shown too (i.e. new kernels) >=20 > The former also requires extracting a new 'http' module out of 'api', so = we can > make simple HTTP requests from 'tools'. >=20 > Before that, some cleanup is done. Even with that, the code is not quite = a prime > example of readability, but with the weirdness that is the libapt-pkg lib= and > binding, this was the best I could manage. >=20 > Patch 4 is a dependency bump on a new version of my forked libapt-pkg bin= ding > (apt-pkg-native(-rs)). As before, the changes I made to that can be found= on > GitHub [1]. Patches 5 and later require the new version to compile. >=20 >=20 > [0] https://lists.proxmox.com/pipermail/pbs-devel/2020-July/000045.html > [1] https://github.com/PiMaker/apt-pkg-native-rs/ >=20 >=20 > proxmox-backup: Stefan Reiter (7): > apt: allow filter to select different package version > add tools::http for generic HTTP GET and move HttpsConnector there > apt: use 'apt-get changelog --print-uris' in get_changelog_url > bump apt-pkg-native dependency to 0.3.2 > apt: refactor package detail reading into function > fix #2934: list to-be-installed packages in updates > apt: add /changelog API call similar to PVE >=20 > Cargo.toml | 2 +- > src/api2/node/apt.rs | 384 ++++++++++++++++++++++++++++---------- > src/client/http_client.rs | 75 +------- > src/tools.rs | 1 + > src/tools/http.rs | 100 ++++++++++ > 5 files changed, 386 insertions(+), 176 deletions(-) > create mode 100644 src/tools/http.rs >=20 > --=20 > 2.20.1 >=20 >=20 > _______________________________________________ > pbs-devel mailing list > pbs-devel@lists.proxmox.com > https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel >=20 >=20 >=20 =