public inbox for pbs-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [pbs-devel] [RFC 0/4] Add GET /apt/changelog API call
@ 2020-07-28  8:58 Stefan Reiter
  2020-07-28  8:58 ` [pbs-devel] [RFC proxmox-backup 1/4] apt: allow filter to select different package version Stefan Reiter
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Stefan Reiter @ 2020-07-28  8:58 UTC (permalink / raw)
  To: pbs-devel

Allows a user to retrieve changelogs for individual packages. Compatible with
the widget-toolkit's APT panel, works the same as in PVE.

Sent as RFC since it contains quite a bit of 'workaround' code. The initial idea
was to replicate the way PVE does it right now, but that turned out to be very
fragile with all the hardcoded URLs and whatnot (indicated by the fact that is
indeed currently broken in PVE, I'll look at that soon).

So instead, after Discussion with Fabian, I opted to simply use 'apt-get
changelog' - this works well for Debian packages, but not for ours, since our
repo doesn't contain the changelogs at the place APT expects.

These patches therefore implement a rather weird in-between solution, where a
HTTP GET to a fixed URL is used for our packages, and 'apt-get changelog
[--print-uris]' is used for Debian ones.

If we can make our repos work with 'apt-get changelog' soon, or don't mind the
changelogs for our packages unavailable in PBS for a while, I can send a v2
dropping the 'tools::http' module and using 'apt-get' everywhere, without any
new FIXMEs. If not, consider using it like this and I'll rework the code once
our Repos support it.

@Fabian: the idea that you can pre-download packages and get changelogs that way
appears moot, since as it turns out, packages only downloaded with 'apt-get -d
install' are not checked by 'apt-get changelog', returning the same 404 error as
before.


proxmox-backup: Stefan Reiter (4):
  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
  apt: add /changelog API call similar to PVE

 src/api2/node/apt.rs      | 157 ++++++++++++++++++++++++++------------
 src/client/http_client.rs |  64 +---------------
 src/tools.rs              |   1 +
 src/tools/http.rs         |  90 ++++++++++++++++++++++
 4 files changed, 202 insertions(+), 110 deletions(-)
 create mode 100644 src/tools/http.rs

-- 
2.20.1




^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2020-10-15 13:26 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-28  8:58 [pbs-devel] [RFC 0/4] Add GET /apt/changelog API call Stefan Reiter
2020-07-28  8:58 ` [pbs-devel] [RFC proxmox-backup 1/4] apt: allow filter to select different package version Stefan Reiter
2020-07-28  8:58 ` [pbs-devel] [RFC proxmox-backup 2/4] add tools::http for generic HTTP GET and move HttpsConnector there Stefan Reiter
2020-07-28  8:58 ` [pbs-devel] [RFC proxmox-backup 3/4] apt: use 'apt-get changelog --print-uris' in get_changelog_url Stefan Reiter
2020-07-28  8:58 ` [pbs-devel] [RFC proxmox-backup 4/4] apt: add /changelog API call similar to PVE Stefan Reiter
2020-10-15 13:26 ` [pbs-devel] [RFC 0/4] Add GET /apt/changelog API call Stefan Reiter

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