59 Commits

Author SHA1 Message Date
Wolfgang Bumiller
0ff81719ad move to proxmox-apt/
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2023-05-24 09:21:55 +02:00
Thomas Lamprecht
8a7a719aec bump version to 0.9.3-1
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-10-19 16:17:47 +02:00
Fabian Grünbichler
b522722d9c deb822: source index support
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
 [ T: commit Sources for test & fix white space errors ]
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-10-19 15:55:54 +02:00
Fabian Grünbichler
ab6c2c7493 packages file: add section field
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2022-10-19 07:51:35 +02:00
Fabian Grünbichler
008a771f3e cargo fmt
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2022-10-12 10:42:50 +02:00
Fabian Grünbichler
661b8837f3 clippy fixes
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2022-10-12 10:42:24 +02:00
Thomas Lamprecht
5450421f03 d/control: update
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-09-16 14:19:07 +02:00
Thomas Lamprecht
6c0c48b97a bump version to 0.9.2-1
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-09-16 14:17:34 +02:00
Fabian Grünbichler
7e8eab45dd release: fix typo in 'Acquire-By-Hash'
to allow detection of repositories that support downloading indices via
their hash instead of their filename.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2022-09-16 14:09:29 +02:00
Fabian Grünbichler
f54534cc37 release: add 'architecture' helper
which returns if a file reference is architecture specific, and for
which architecture it is relevant.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2022-09-16 14:09:29 +02:00
Fabian Grünbichler
566981077c release: add Commands file reference type
used by command-not-found to lookup which package ships which command.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2022-09-16 14:09:29 +02:00
Fabian Grünbichler
0a9685ed4a bump version to 0.9.1-1
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2022-09-06 10:36:55 +02:00
Aaron Lauterer
64d7956788 add ceph quincy repositories
Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
2022-09-06 09:37:46 +02:00
Fabian Grünbichler
26e2bce4a7 release: add proper error message
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2022-08-05 11:28:58 +02:00
Wolfgang Bumiller
0e84522116 cleanup non-closure parse helpers
The TryFrom impl is already massive enough as it is.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-08-05 09:35:40 +02:00
Fabian Grünbichler
b2f851da87 release-file: improve invalid file-reference handling
if we encounter a file reference pointing to a component that is not
contained in the componenents list, we can just ignore it as unknown.
only treat parsing errors for references pointing to known components as
actual errors.

this currently triggers with (In)Release files for debian-updates and
debian-security, which reference (empty) files for a "non-free-firmware"
component that is not listed in the `Components` field of the release
file.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2022-08-05 09:10:07 +02:00
Thomas Lamprecht
1148b795f3 bump version to 0.9.0-1
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-07-21 13:32:53 +02:00
Fabian Grünbichler
72dc88fb71 clippy fixes
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2022-07-21 12:44:13 +02:00
Fabian Grünbichler
3e515dbc7d AptRepositoryFile: make path optional
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2022-07-21 12:41:36 +02:00
Thomas Lamprecht
03f14b74dd bump version to 0.8.1-1
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-07-21 12:10:36 +02:00
Thomas Lamprecht
5a3c084219 deb822 checksums: factor out hash equality check into macro
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-07-21 12:10:23 +02:00
Fabian Grünbichler
77fd3c8bce add test files for deb822 module
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-07-21 12:10:23 +02:00
Fabian Grünbichler
8cdd231153 add module for parsing Packages and Release files
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-07-21 12:10:23 +02:00
Fabian Grünbichler
28aafe6e3c file: add pre-parsed content variant
to allow usage with in-memory contents instead of actual files.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-07-21 12:10:23 +02:00
Fabian Ebner
037ce3a0aa check suites: add special check for Debian security repository
since the suffix was changed with Debian Bullseye.

Suggested-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-02-03 08:57:04 +01:00
Fabian Ebner
4bdd6a5148 clippy fixes
Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-02-03 08:55:42 +01:00
Fabian Ebner
9caae7d49e upgrade to edition 2021
std::convert::{TryFrom, TryInto} are now part of the prelude.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-02-03 08:55:08 +01:00
Wolfgang Bumiller
c7b17de1b5 update to proxmox split and bump version to 0.8.0-1
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-10-11 12:00:19 +02:00
Wolfgang Bumiller
f9c6f7a18c bump versionto 0.7.0-1
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-08-24 15:41:08 +02:00
Thomas Lamprecht
4174305528 bump version to 0.6.0-1
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-07-29 18:11:24 +02:00
Fabian Ebner
fb51dcf9db add type DebianCodename
which allows to get rid of an possible error with check_suites, and
easily detect unexpected values with get_current_release_codename.

The check_repos function needs to be adapted, since the type does
not include suite names like oldstable,experimental,etc.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2021-07-29 18:00:38 +02:00
Fabian Ebner
51c69d76a5 repo: remove has_suite_variant helper
by exchanging loops in the check_suites function, which was the only
user. Exchanging loops also helps for introducing a type for Debian condenames.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2021-07-29 18:00:38 +02:00
Fabian Ebner
13cdf8d1df check repos: have caller specify the current suite
Like that, a potential error is further up the stack, and it's more
consistent with what the standard_repository functions do.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2021-07-29 18:00:38 +02:00
Fabian Ebner
c7f6163e2b repo: make suite_variant helper more general
use the first appearance of '-' or '/' to detect the variant instead
of keeping a list of possible variants, which would need to include
things like "-proposed-updates-debug".

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2021-07-29 18:00:38 +02:00
Fabian Ebner
f48c12b00a standard repos: add suite parameter for stricter detection
Require that the suite matches too when detecting standard
repositories, since no or invalid updates will be obtained when the
suite is wrong. Thus, it should not be considered to be the same
repository.

Add the parameter for get_standard_repository too, so that the two
related calls have more similar parameters, and the detection of the
current release code name can be done once in the caller once.

This also will fix an issue with the front-end, where adding a
standard repository would end up just enabling an already present
repository with the wrong suite.

Reported-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2021-07-29 18:00:38 +02:00
Thomas Lamprecht
68064f65bc buildsys: indent continued command
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-07-20 18:08:49 +02:00
Thomas Lamprecht
606eac1db7 cargo: disable default-features for proxmox
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-07-20 17:54:03 +02:00
Dietmar Maurer
39f12a8c05 depend on proxmox 0.12.0, bump version to 0.5.1-1
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-07-20 17:25:09 +02:00
Thomas Lamprecht
7d88081e0d bump version to 0.5.0-1
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-07-16 16:19:28 +02:00
Fabian Ebner
5581858b30 code cleanup: use contains()
Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2021-07-16 15:22:51 +02:00
Fabian Ebner
2a1fb9bfdd standard repo detection: handle alternative URI for PVE repos
For PVE, URIs without the final "/pve" are also valid.

Make the single URL response a vector and iterate over it, lower
index is preferred.

Reported in the community forum:
https://forum.proxmox.com/threads/pve-7-0-9-no-proxmox-ve-repository-enabled.92427/

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
[ Thomas: extend commit message slightly ]
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-07-16 15:21:21 +02:00
Fabian Ebner
652f52a1f2 bump proxmox dependency
Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2021-07-16 15:18:45 +02:00
Fabian Ebner
9a51a30f46 tests: parse and write the result again
A cheap way to "double" the number of test cases.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2021-07-02 13:04:00 +02:00
Thomas Lamprecht
4b0935c621 bump version to 0.4.0-1
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-07-01 18:35:09 +02:00
Fabian Ebner
ae7e2360b7 support quote-word parsing for one-line format
so that parsing CD ROM repositories with spaces in the name works too.
But it's not limited to that, and should make one-line parsing rather
similar to what APT does (stanza parsing in APT doesn't use
ParseQuoteWord at all AFAICS).

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2021-07-01 18:27:27 +02:00
Fabian Ebner
8265d0ce33 avoid backtick unicode symbol in string
Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2021-07-01 18:27:27 +02:00
Thomas Lamprecht
fd99aa062e bump version to 0.3.1-1
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-06-30 20:45:27 +02:00
Thomas Lamprecht
34074c1b80 slightly adapt repository text
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-06-30 20:42:31 +02:00
Fabian Ebner
3c4e441d7c standard repos: allow conversion from handle and improve information
Add a description for the handle, which can be useful to display
alongside the name. The descriptions are essentially the first
sentence from PVE's "Package Repositories" docs, but without the
product name.

Also drop the " Repository" suffix from the names, as it's not useful,
but can be ugly: e.g. for the UI when the label already is
'Repository:'.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2021-06-30 20:38:05 +02:00
Thomas Lamprecht
47c2c350b4 bump version to 0.3.0-1
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-06-30 13:34:37 +02:00