Commit Graph

53 Commits

Author SHA1 Message Date
Wolfgang Bumiller
985717d948 bump proxmox-router to 2.1.0-1
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2023-07-28 11:26:01 +02:00
Lukas Wagner
add38769f8 router: re-export HttpError from proxmox-http-error
Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
2023-07-28 10:47:05 +02:00
Wolfgang Bumiller
93fc5b503a bump proxmox-router to 2.0.0-1
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2023-07-24 10:53:44 +02:00
Wolfgang Bumiller
8f8d52f148 update d/copyright files to debian copyright-format 1.0
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2023-05-23 13:02:39 +02:00
Wolfgang Bumiller
2cf54dcf2e router: make format&print generic
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2023-02-28 14:57:35 +01:00
Fabian Grünbichler
9c44e9b410 update d/control files
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2023-01-05 12:17:00 +01:00
Fabian Grünbichler
40cb468bef bump proxmox-router to 1.3.1-1
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2023-01-05 12:10:00 +01:00
Fabian Grünbichler
ff9aa2012e update nix to 0.26
it's the version currently shipped by bookworm, so let's unify this widely-used
dependency to make bootstrapping easier.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2023-01-05 12:07:16 +01:00
Fabian Grünbichler
46a675830d update d/control files
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2022-12-07 09:48:47 +01:00
Fabian Grünbichler
bdca6de588 update d/control files
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2022-12-07 09:48:47 +01:00
Fabian Grünbichler
e5abc0590e define workspace dependencies in workspace
so that we no longer have to (or forget to) bump the version in multiple places.

notable changes:
- outdated versions have been unified
- proxmox-metrics -> proxmox-async no longer uses explicit empty features
  (proxmox-async doesn't provide any anyway)
- proxmox-subscription -> proxmox-http no longer uses explicit default_features
  = false (proxmox-http has an empty default feature anyway)
- missing path dependencies added (mainly proxmox-rest-server)

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2022-12-07 09:48:38 +01:00
Fabian Grünbichler
6c161bd5ab update d/control files
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2022-12-07 09:48:38 +01:00
Fabian Grünbichler
4189221470 inherit shared, external dependencies
noteworthy changes:
- proxmox-http had a default_features_false dep on hyper, which is dropped (the
  default feature is empty anyway)
- hyper, libc, nix, tokio and url versions are unified
- missing (cosmetic) bindgen feature on zstd enabled everywhere

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2022-12-07 09:48:38 +01:00
Fabian Grünbichler
64959d9ae0 move common metadata to workspace
and switch all crates to 2021 edition as well as a unified "authors" value.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2022-12-07 09:48:25 +01:00
Fabian Grünbichler
5ec765f842 update d/control files
debcargo 2.6 changed some minor details

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2022-12-06 11:21:43 +01:00
Fabian Grünbichler
e8d02db689 router: bump to 1.3.0
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2022-09-07 09:17:45 +02:00
Fabian Grünbichler
66ace63618 router: make hyper/http optional
but enable it by default.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2022-09-07 09:17:45 +02:00
Thomas Lamprecht
52a8eb6ace d/control: tree wide update after switch to weak/namespaced dependencies
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-08-26 12:07:36 +02:00
Fabian Grünbichler
289d297c7d build: use weak and namespaced features
to reduce the creep of optional dependencies being exposed as features.

this requires cargo 0.63 (and debcargo built against at least that
version), but greatly reduces the number of binary packages and provides
generated, while still allowing sensible selection of optional
dependencies via the explicit feature meant for pulling them in.

diff stat for running `make  deb` after this change:
 proxmox-http/debian/control         | 226 ++++--------------------------------
 proxmox-router/debian/control       |  74 +-----------
 proxmox-schema/debian/control       |  53 ++-------
 proxmox-subscription/debian/control |  17 +--
 proxmox-sys/debian/control          |  51 +++-----
 proxmox-tfa/debian/control          | 110 ++----------------
 6 files changed, 72 insertions(+), 459 deletions(-)

the 'dep:' prefix marks something on the RHS inside the features section
as dependency, it's only allowed if the string after it is an optional
dependency an no explicit feature of the same name exists. if all
pointers to the optional dependency in the features section are marked
as such, the optional dependency itself will not be exposed as a feature
(either on the cargo or debian/control level).

the '?' suffix marks dependencies as "weak", which only enables the
optional dependency + its feature(s) if the optional dependency itself
is also enabled. it has no effect on d/control since such a relationship
is not encodable in Debian package relations, but it does affect cargo
dependency resolution and allows skipping the build of unneeded optional
dependencies in some cases.

with no packages/crates depending on the no longer exposed automatically
generated features/packages, so these are safe to remove even though
it's technically a breaking change.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2022-08-26 10:35:00 +02:00
Fabian Grünbichler
f505240065 cargo fmt
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2022-06-29 10:32:29 +02:00
Wolfgang Bumiller
09032fb88c bump proxmox-router to 1.2.4-1
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-06-21 10:40:05 +02:00
Wolfgang Bumiller
d934c79d4c router: restrict 'env_logger' dep to 'cli' feature
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-06-21 10:38:17 +02:00
Hannes Laimer
32b8ae982f router: add init_cli_logger helper function
Signed-off-by: Hannes Laimer <h.laimer@proxmox.com>
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-06-21 10:37:07 +02:00
Fabian Grünbichler
29c051f5f8 bump proxmox-router to 1.2.3
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2022-06-02 14:33:12 +02:00
Fabian Grünbichler
a3efe0b3dc bump rustyline to 9
it works with nix 0.24

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2022-06-02 13:34:09 +02:00
Wolfgang Bumiller
abf5aedc54 update proxmox-router to nix 0.24.1
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-06-02 13:34:09 +02:00
Wolfgang Bumiller
3facb7b455 router: clippy fixups
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-06-02 10:10:01 +02:00
Thomas Lamprecht
e48568a7f1 router: bump version to 1.2.2-1
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-05-05 09:32:46 +02:00
Thomas Lamprecht
de5d5f7618 router: format doc comment, use full text width
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-05-05 08:54:14 +02:00
Thomas Lamprecht
43b5f1ae3e router: permissions: allow to pass partial-collapsed acl path components
This would allow the following components:

* all in one : &["system/network"]
* mixed: &["system/network", "dns"]
* with templates: &["datastore/{store}"]
* with the value of template being a path, e,g, with ns = "foo/bar":
  &["/datastore/{store}/{ns}"]

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-05-05 08:54:14 +02:00
Thomas Lamprecht
e98ca77777 permissions: fix doc comment text width
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-04-28 11:45:21 +02:00
Wolfgang Bumiller
47acc8dc8f router: drop Index impls for references
these should not be required as the use cases should all be
covered by the non-reference impls

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-04-21 14:04:51 +02:00
Wolfgang Bumiller
16daad64c7 bump proxmox-router to 1.2.1-1
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-04-21 13:48:57 +02:00
Wolfgang Bumiller
39956b5d09 router: fix impl Index for dyn RpcEnvironment
implement Index and IndexMut on `dyn RpcEnvironment` rather
than on a reference to it

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-04-21 13:45:26 +02:00
Wolfgang Bumiller
6ce3a73681 bump proxmox-router to 1.2.0-1
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-04-12 14:26:07 +02:00
Wolfgang Bumiller
930bb59d84 proxmox-router: depend on proxmox-async 0.4.1
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-04-12 14:24:27 +02:00
Wolfgang Bumiller
61d6541ce2 router: deduplicate some code
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-04-12 14:23:05 +02:00
Dominik Csapak
f585722aad proxmox-router: add new ApiHandler variants for streaming serialization
they should behave like their normal variants, but return a
`Box<dyn SerializableReturn + Send>` instead of a value. This is useful
since we do not have to generate the `Value` in-memory, but can
stream the serialization to the client.

We cannot simply use a `Box<dyn serde::Serialize>`, because that trait
is not object-safe and thus cannot be used as a trait-object.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-04-12 14:23:05 +02:00
Dominik Csapak
2c9272945e promxox-router: add SerializableReturn Trait
this will be useful as a generic return type for api calls which
must implement Serialize.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-04-12 14:23:05 +02:00
Thomas Lamprecht
05cad8926b router: rustfmt
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-04-10 12:40:39 +02:00
Wolfgang Bumiller
57d052af36 workspace: set proxmox-lang dep version to 1.1
to ensure the error macros are available

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-02-21 13:45:46 +01:00
Fabian Grünbichler
d363fb2bee switch to new schema verify methods
the deprecated ones only forward to the new ones anyway..

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2021-12-30 11:51:08 +01:00
Thomas Lamprecht
fbd82c81d1 proxmox-router: fix glob-import of anyhow
will break usage of the `Result::Ok()' with anyhow 1.0.49+ as that
added a new Ok helper, so a glob-import would make that shadow the
core one.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-12-13 08:13:13 +01:00
Fabian Grünbichler
9c9b5c02b4 clippy: collapse match/if let/..
best viewed with `-w` ;)

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2021-12-02 09:01:52 +01:00
Fabian Grünbichler
e303ad8605 clippy: misc fixes
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2021-12-02 09:00:52 +01:00
Fabian Grünbichler
b1c2250000 clippy: use matches!
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2021-12-02 08:59:27 +01:00
Fabian Grünbichler
a81b2672d8 clippy: remove unnecessary reference taking
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2021-12-02 08:58:10 +01:00
Fabian Grünbichler
0a0f3906b5 proxmox-router: bump to 1.1.1
for current anyhow compat

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2021-12-01 13:22:26 +01:00
Dietmar Maurer
248e888ae7 cleanup: avoid use anyhow::*
Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
2021-11-28 12:50:59 +01:00
Dietmar Maurer
bb089965c9 bump proxmox vertsion to 0.15.0-1
Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
2021-10-21 07:08:34 +02:00