Commit Graph

62 Commits

Author SHA1 Message Date
Fabian Grünbichler
c8433e3219 fix #4653: (In)Release file: improve handling of special suites
APT doesn't mind a repository with either "/" or "./" as suite/distribution,
such as

 deb https://example.com/debian ./

in that case, the 'dists' part of the URL and the trailing slash (which would
be encoded as '_') is dropped in the file name in '/var/lib/apt/lists/'.

Other suite values with a trailing or leading '/' are rejected with an error by APT:

 E: Malformed entry 1 in sources file /etc/apt/sources.list.d/test.list (absolute Suite Component)
 E: The list of sources could not be read.

so this should be the only special case requiring handling.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2023-06-06 18:24:39 +02:00
Fabian Grünbichler
27cd025053 fallback to Release file for Origin retrieval
APT will not store the InRelease file in some cases, and some repositories
might not even have one in the first place.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2023-06-06 18:24:39 +02:00
Thomas Lamprecht
45432b689d apt: bump version to 0.10.1-1
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-06-03 18:29:04 +02:00
Fiona Ebner
cc17861f54 apt: tests: add tests for Ceph Quincy repository detection on Bookworm
Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
2023-06-03 14:39:05 +02:00
Fiona Ebner
06ad528c94 apt: tests: code cleanup to avoid useless vector
Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
2023-06-03 14:39:05 +02:00
Fiona Ebner
9b7c5339d7 apt: tests: create temporary test directories in CARGO_TARGET_TMPDIR
Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
2023-06-03 14:39:05 +02:00
Fiona Ebner
bae15e2408 apt: split Ceph main repository into no-subscription and enterprise
The old 'main' component stays valid, pointing to no-subscription,
which means the is_referenced_repository() check needs a special case
for it. It will eventually go away, together with the handles for
Quincy.

Alternatively, the standard repository's info() could've been changed
to return multiple possible components, similar to URLs, but as
opposed to URLs, there could be a standard repository that wants to
have multiple components and it feels a bit unnatural, because
multiple components are usually not aliases of the same. And adapting
is_referenced_repository() would be needed here too. So overall, the
above alternative just felt better.

Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
2023-06-03 14:39:05 +02:00
Fiona Ebner
21b58c3384 apt: drop older Ceph standard repositories
On Proxmox VE 8, only Quincy and newer will be supported.

Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
2023-06-03 14:39:05 +02:00
Wolfgang Bumiller
c25c1cf4cd bump proxmox-apt to 0.10.0-1
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2023-05-24 09:50:33 +02:00
Wolfgang Bumiller
3c85df6830 proxmox-apt: update tests to expect bookworm
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2023-05-24 09:50:33 +02:00
Wolfgang Bumiller
077a83f401 add proxmox-apt and proxmox-openid to workspace
and fixup d/copyright

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2023-05-24 09:24:27 +02:00
Wolfgang Bumiller
0ff81719ad move to proxmox-apt/
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2023-05-24 09:21:55 +02:00