]> git.proxmox.com Git - proxmox.git/log
proxmox.git
23 months agosys: enable CreateOptions::group_root/root_only
Wolfgang Bumiller [Mon, 25 Jul 2022 08:31:35 +0000 (10:31 +0200)]
sys: enable CreateOptions::group_root/root_only

nix now has the required const fns

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
23 months agosys: file locking depends on timer feature
Wolfgang Bumiller [Fri, 22 Jul 2022 09:58:18 +0000 (11:58 +0200)]
sys: file locking depends on timer feature

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
23 months agosys: introduce 'acl', 'crypt' and 'timer' features
Wolfgang Bumiller [Thu, 21 Jul 2022 13:41:46 +0000 (15:41 +0200)]
sys: introduce 'acl', 'crypt' and 'timer' features

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
23 months agobump proxmox-subscription to 0.2.0-1
Wolfgang Bumiller [Thu, 21 Jul 2022 12:15:45 +0000 (14:15 +0200)]
bump proxmox-subscription to 0.2.0-1

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
23 months agoadd default signing key path
Fabian Grünbichler [Thu, 21 Jul 2022 11:29:54 +0000 (13:29 +0200)]
add default signing key path

for use in dependent modules. this file should be shipped via
proxmox-archive-keyring.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
23 months agosubscription: make key optional and support multiple keys
Fabian Grünbichler [Thu, 21 Jul 2022 11:23:57 +0000 (13:23 +0200)]
subscription: make key optional and support multiple keys

this is a breaking change requiring updates in proxmox-perl-rs and
proxmox-backup.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
23 months agohttp: bump d/control
Wolfgang Bumiller [Thu, 21 Jul 2022 10:58:41 +0000 (12:58 +0200)]
http: bump d/control

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
23 months agobump proxmox-http to 0.6.4-1
Wolfgang Bumiller [Thu, 21 Jul 2022 10:58:11 +0000 (12:58 +0200)]
bump proxmox-http to 0.6.4-1

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
23 months agohttp: fix proxy authorization header to include type
Mira Limbeck [Wed, 20 Jul 2022 14:20:40 +0000 (16:20 +0200)]
http: fix proxy authorization header to include type

and encode the username:password string as base64 [0]. This fixes the
error 407 issue when using proxy authentication [1].

[0] https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Proxy-Authorization
[1] https://forum.proxmox.com/threads/checking-the-subscription-behind-a-proxy-fails.112063/

Signed-off-by: Mira Limbeck <m.limbeck@proxmox.com>
23 months agosubscription: check in d/control
Wolfgang Bumiller [Thu, 21 Jul 2022 10:54:54 +0000 (12:54 +0200)]
subscription: check in d/control

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
23 months agoproxmox-subscription: initial bump to 0.1.0-1
Wolfgang Bumiller [Wed, 20 Jul 2022 11:36:56 +0000 (13:36 +0200)]
proxmox-subscription: initial bump to 0.1.0-1

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
23 months agosys: clippy fixups
Wolfgang Bumiller [Wed, 20 Jul 2022 11:35:58 +0000 (13:35 +0200)]
sys: clippy fixups

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
23 months agohttp: clippy fixups
Wolfgang Bumiller [Wed, 20 Jul 2022 11:31:58 +0000 (13:31 +0200)]
http: clippy fixups

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
23 months agosubscription: clippy fixup
Wolfgang Bumiller [Wed, 20 Jul 2022 11:28:18 +0000 (13:28 +0200)]
subscription: clippy fixup

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
23 months agosubscription: line-wrap test data
Wolfgang Bumiller [Wed, 20 Jul 2022 11:26:45 +0000 (13:26 +0200)]
subscription: line-wrap test data

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
23 months agosubscription: doc comment fixup
Wolfgang Bumiller [Wed, 20 Jul 2022 11:26:33 +0000 (13:26 +0200)]
subscription: doc comment fixup

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
23 months agosubscription: clippy lints
Fabian Grünbichler [Wed, 20 Jul 2022 11:07:18 +0000 (13:07 +0200)]
subscription: clippy lints

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
23 months agosubscription: properly case status enum values
Fabian Grünbichler [Wed, 20 Jul 2022 11:03:56 +0000 (13:03 +0200)]
subscription: properly case status enum values

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
23 months agocheck signature when reading subscription
Fabian Grünbichler [Mon, 27 Jun 2022 10:01:31 +0000 (12:01 +0200)]
check signature when reading subscription

and handle signed keys differently w.r.t. age checks, since they will be
refreshed less frequently.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
23 months agoadd new proxmox-subscription crate
Fabian Grünbichler [Tue, 21 Jun 2022 11:49:14 +0000 (13:49 +0200)]
add new proxmox-subscription crate

taking over slighlty generified helpers and types:
- subscription info and status
- checking subscription status with shop
- reading/writing local subscription-related files

the perl-based code uses base64 with newlines for the data, and base64
without padding for the checksum. accordingly, calculate the checksum
with and without newlines, and compare the decoded checksum instead of
the encoded one.

furthermore, the perl-based code encodes the subscription status using
Capitalized values instead of lowercase, so alias those for the time
being.

PVE also stores the serverid as 'validdirectory', so add that as alias
as well.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
23 months agobump proxmox-sys to 0.3.2
Wolfgang Bumiller [Thu, 7 Jul 2022 09:49:57 +0000 (11:49 +0200)]
bump proxmox-sys to 0.3.2

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
23 months agosys: make escape_unit() more flexible, add unescape_unit_path
Wolfgang Bumiller [Thu, 7 Jul 2022 09:45:26 +0000 (11:45 +0200)]
sys: make escape_unit() more flexible, add unescape_unit_path

This adds the ability to use these functions with non-utf8
strings as well.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
23 months agobump proxmox-compression to 0.1.2-1
Wolfgang Bumiller [Tue, 5 Jul 2022 11:45:49 +0000 (13:45 +0200)]
bump proxmox-compression to 0.1.2-1

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
23 months agocompression: more cleanups
Wolfgang Bumiller [Tue, 5 Jul 2022 11:23:14 +0000 (13:23 +0200)]
compression: more cleanups

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
23 months agocompression: indentation cleanup
Wolfgang Bumiller [Tue, 5 Jul 2022 10:17:04 +0000 (12:17 +0200)]
compression: indentation cleanup

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
23 months agocompression: minor cleanup
Wolfgang Bumiller [Tue, 5 Jul 2022 10:13:38 +0000 (12:13 +0200)]
compression: minor cleanup

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
23 months agoproxmox-compression: add 'tar_directory'
Dominik Csapak [Tue, 31 May 2022 11:17:21 +0000 (13:17 +0200)]
proxmox-compression: add 'tar_directory'

similar to 'zip_directory', this is intended to tar a local directory,
e.g. when we're in a restore vm.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
23 months agoproxmox-compression: make ZstdEncoder stream a bit more generic
Dominik Csapak [Tue, 31 May 2022 11:17:20 +0000 (13:17 +0200)]
proxmox-compression: make ZstdEncoder stream a bit more generic

by not requiring the 'anyhow::Error' type from the source, but only
that it implements 'Into<Error>'. This way, we can also accept a stream
that produces e.g. an io::Error

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
23 months agobump proxmox-http to 0.6.3-1
Fabian Grünbichler [Tue, 21 Jun 2022 11:48:52 +0000 (13:48 +0200)]
bump proxmox-http to 0.6.3-1

23 months agohttp: implement HttpClient for SimpleHttp
Fabian Grünbichler [Thu, 23 Jun 2022 09:57:25 +0000 (11:57 +0200)]
http: implement HttpClient for SimpleHttp

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
23 months agohttp: add HttpClient trait
Fabian Grünbichler [Thu, 23 Jun 2022 09:56:43 +0000 (11:56 +0200)]
http: add HttpClient trait

gated behind feature "client-trait"

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
23 months agohttp: move TLS helper to client feature
Fabian Grünbichler [Mon, 27 Jun 2022 07:42:27 +0000 (09:42 +0200)]
http: move TLS helper to client feature

it's only used there and pulls in hyper and tokio, which we don't
want/need in http-helpers.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
23 months agohttp: take over json_object_to_query
Fabian Grünbichler [Tue, 21 Jun 2022 11:47:40 +0000 (13:47 +0200)]
http: take over json_object_to_query

23 months agobump proxmox-serde to 0.1.1
Fabian Grünbichler [Tue, 21 Jun 2022 11:47:09 +0000 (13:47 +0200)]
bump proxmox-serde to 0.1.1

23 months agoserde: take over to/write_canonical_json
Fabian Grünbichler [Tue, 21 Jun 2022 11:45:27 +0000 (13:45 +0200)]
serde: take over to/write_canonical_json

from PBS' tools module, and feature-guard via optional `serde_json`
dependency.

23 months agocargo fmt
Fabian Grünbichler [Wed, 29 Jun 2022 08:32:29 +0000 (10:32 +0200)]
cargo fmt

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
23 months agohttp: clippy fixes
Wolfgang Bumiller [Wed, 29 Jun 2022 08:14:33 +0000 (10:14 +0200)]
http: clippy fixes

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
23 months agosection-config: clippy fixes
Wolfgang Bumiller [Wed, 29 Jun 2022 08:11:28 +0000 (10:11 +0200)]
section-config: clippy fixes

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
23 months agoapi-macro: clippy fixes
Wolfgang Bumiller [Wed, 29 Jun 2022 08:10:07 +0000 (10:10 +0200)]
api-macro: clippy fixes

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
23 months agocompression: clippy fixes
Wolfgang Bumiller [Wed, 29 Jun 2022 08:08:48 +0000 (10:08 +0200)]
compression: clippy fixes

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
23 months agolang: clippy fixes
Wolfgang Bumiller [Wed, 29 Jun 2022 08:06:57 +0000 (10:06 +0200)]
lang: clippy fixes

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
23 months agotime: clippy fixes
Wolfgang Bumiller [Wed, 29 Jun 2022 08:02:39 +0000 (10:02 +0200)]
time: clippy fixes

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
23 months agosys: clippy fixups
Wolfgang Bumiller [Wed, 29 Jun 2022 07:50:51 +0000 (09:50 +0200)]
sys: clippy fixups

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
23 months agobump proxmox-sys to 0.3.1
Wolfgang Bumiller [Wed, 29 Jun 2022 07:41:06 +0000 (09:41 +0200)]
bump proxmox-sys to 0.3.1

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
23 months agopartially fix #2915: proxmox-sys: scandir: stat if file_type is unknown
Dominik Csapak [Tue, 28 Jun 2022 13:15:13 +0000 (15:15 +0200)]
partially fix #2915: proxmox-sys: scandir: stat if file_type is unknown

when using readdir/getdents the file type might be 'DT_UNKNOWN'
(depending on the filesystem). Do a fstatat in that case to
get the file type. Since maybe the callback wants to do
a stat anyway, pass it there (if done)

adds two new helpers:
'file_type_from_file_stat': uses a FileStat struct to get the file type
'get_file_type': calls fstatat to determine the file_type

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2 years agobump proxmox-router to 1.2.4-1
Wolfgang Bumiller [Tue, 21 Jun 2022 08:39:35 +0000 (10:39 +0200)]
bump proxmox-router to 1.2.4-1

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2 years agorouter: restrict 'env_logger' dep to 'cli' feature
Wolfgang Bumiller [Tue, 21 Jun 2022 08:38:16 +0000 (10:38 +0200)]
router: restrict 'env_logger' dep to 'cli' feature

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2 years agorouter: add init_cli_logger helper function
Hannes Laimer [Wed, 15 Jun 2022 08:19:47 +0000 (08:19 +0000)]
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>
2 years agometrics: check in d/control
Wolfgang Bumiller [Mon, 13 Jun 2022 08:03:48 +0000 (10:03 +0200)]
metrics: check in d/control

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2 years agobump proxmox-metrics to 0.2.0-1
Wolfgang Bumiller [Mon, 13 Jun 2022 07:56:05 +0000 (09:56 +0200)]
bump proxmox-metrics to 0.2.0-1

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2 years agoproxmox-metrics: send_data_to_channels: change from slice to IntoIterator
Dominik Csapak [Fri, 10 Jun 2022 11:17:50 +0000 (13:17 +0200)]
proxmox-metrics: send_data_to_channels: change from slice to IntoIterator

which is a bit generic and allows us to use e.g. a map result to be
passed here

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2 years agobump proxmox-http to 0.6.2
Fabian Grünbichler [Thu, 2 Jun 2022 11:53:54 +0000 (13:53 +0200)]
bump proxmox-http to 0.6.2

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2 years agohttp: bump proxmox-sys to 0.3.0
Fabian Grünbichler [Thu, 2 Jun 2022 11:52:23 +0000 (13:52 +0200)]
http: bump proxmox-sys to 0.3.0

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2 years agoproxmox-time: add missing 1.1.3 change
Fabian Grünbichler [Thu, 2 Jun 2022 11:33:17 +0000 (13:33 +0200)]
proxmox-time: add missing 1.1.3 change

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2 years agobump proxmox-router to 1.2.3
Fabian Grünbichler [Thu, 2 Jun 2022 10:18:48 +0000 (12:18 +0200)]
bump proxmox-router to 1.2.3

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2 years agobump proxmox-schema to 1.3.3
Fabian Grünbichler [Thu, 2 Jun 2022 10:16:36 +0000 (12:16 +0200)]
bump proxmox-schema to 1.3.3

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2 years agobump proxmox-shared-memory to 0.2.1
Fabian Grünbichler [Thu, 2 Jun 2022 10:13:36 +0000 (12:13 +0200)]
bump proxmox-shared-memory to 0.2.1

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2 years agoshared-memory: bump proxmox-sys to 0.3.0
Fabian Grünbichler [Thu, 2 Jun 2022 10:12:30 +0000 (12:12 +0200)]
shared-memory: bump proxmox-sys to 0.3.0

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2 years agobump proxmox-sys to 0.3.0
Fabian Grünbichler [Thu, 2 Jun 2022 10:10:57 +0000 (12:10 +0200)]
bump proxmox-sys to 0.3.0

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2 years agosys: feature-gate logrotate (and zstd)
Fabian Grünbichler [Thu, 2 Jun 2022 12:08:06 +0000 (14:08 +0200)]
sys: feature-gate logrotate (and zstd)

it's not needed everywhere we pull in proxmox-sys.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2 years agobump rustyline to 9
Fabian Grünbichler [Thu, 2 Jun 2022 09:59:00 +0000 (11:59 +0200)]
bump rustyline to 9

it works with nix 0.24

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2 years agoproxmox-shared-memory: fix nix 0.24 compat in test
Fabian Grünbichler [Thu, 2 Jun 2022 09:58:46 +0000 (11:58 +0200)]
proxmox-shared-memory: fix nix 0.24 compat in test

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2 years agoupdate proxmox-router to nix 0.24.1
Wolfgang Bumiller [Wed, 1 Jun 2022 13:06:27 +0000 (15:06 +0200)]
update proxmox-router to nix 0.24.1

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2 years agoupdate proxmox-schema to nix 0.24.1
Wolfgang Bumiller [Wed, 1 Jun 2022 13:05:43 +0000 (15:05 +0200)]
update proxmox-schema to nix 0.24.1

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2 years agoupdate proxmox-shared-memory to nix 0.24.1
Wolfgang Bumiller [Wed, 1 Jun 2022 13:03:27 +0000 (15:03 +0200)]
update proxmox-shared-memory to nix 0.24.1

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2 years agoupdate proxmox-sys to nix 0.24.1
Wolfgang Bumiller [Wed, 1 Jun 2022 13:02:48 +0000 (15:02 +0200)]
update proxmox-sys to nix 0.24.1

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2 years agoproxmox-serde: move serde_json to dev-dependencies
Wolfgang Bumiller [Thu, 2 Jun 2022 11:18:02 +0000 (13:18 +0200)]
proxmox-serde: move serde_json to dev-dependencies

it's only used in doctests

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2 years agobump proxmox-schema to 1.3.2
Wolfgang Bumiller [Thu, 2 Jun 2022 08:11:35 +0000 (10:11 +0200)]
bump proxmox-schema to 1.3.2

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2 years agoschema: drop some commented out lines
Wolfgang Bumiller [Thu, 2 Jun 2022 08:14:06 +0000 (10:14 +0200)]
schema: drop some commented out lines

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2 years agorouter: clippy fixups
Wolfgang Bumiller [Tue, 31 May 2022 09:57:41 +0000 (11:57 +0200)]
router: clippy fixups

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2 years agoschema: bump api macro dep to 1.0.3
Wolfgang Bumiller [Tue, 31 May 2022 07:43:13 +0000 (09:43 +0200)]
schema: bump api macro dep to 1.0.3

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2 years agoschema: clippy fixups
Wolfgang Bumiller [Tue, 31 May 2022 07:42:25 +0000 (09:42 +0200)]
schema: clippy fixups

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2 years agoapi-macro: doc update
Wolfgang Bumiller [Mon, 23 May 2022 08:34:57 +0000 (10:34 +0200)]
api-macro: doc update

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2 years agobump proxmox-api-macro to 1.0.3-1
Wolfgang Bumiller [Thu, 19 May 2022 10:04:03 +0000 (12:04 +0200)]
bump proxmox-api-macro to 1.0.3-1

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2 years agosys: bump log dependency
Fabian Grünbichler [Mon, 16 May 2022 13:49:25 +0000 (15:49 +0200)]
sys: bump log dependency

to ensure format strings with "{var}" work properly.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2 years agoapi-macro: allow overriding field attributes in the updater
Wolfgang Bumiller [Wed, 11 May 2022 14:00:40 +0000 (16:00 +0200)]
api-macro: allow overriding field attributes in the updater

This allows fixing up things such as `skip_serialize_if`
calls like so:

    #[derive(Updater)]
    struct Foo {
        #[serde(skip_serializing_if = "MyType::is_special")]
        #[updater(serde(skip_serializing_if = "Option::is_none"))]
        field: MyType,
    }

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2 years agoschema: doc comment format/slight-expansion
Thomas Lamprecht [Thu, 5 May 2022 09:03:21 +0000 (11:03 +0200)]
schema: doc comment format/slight-expansion

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agohttp: bump version to 0.6.1-1
Thomas Lamprecht [Thu, 5 May 2022 08:35:37 +0000 (10:35 +0200)]
http: bump version to 0.6.1-1

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agotree wide update of genereated control
Thomas Lamprecht [Thu, 5 May 2022 08:22:50 +0000 (10:22 +0200)]
tree wide update of genereated control

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agorouter: bump version to 1.2.2-1
Thomas Lamprecht [Thu, 5 May 2022 06:56:34 +0000 (08:56 +0200)]
router: bump version to 1.2.2-1

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agorouter: format doc comment, use full text width
Thomas Lamprecht [Thu, 5 May 2022 06:43:40 +0000 (08:43 +0200)]
router: format doc comment, use full text width

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agorouter: permissions: allow to pass partial-collapsed acl path components
Thomas Lamprecht [Thu, 28 Apr 2022 11:27:02 +0000 (13:27 +0200)]
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>
2 years agopermissions: fix doc comment text width
Thomas Lamprecht [Thu, 28 Apr 2022 09:45:21 +0000 (11:45 +0200)]
permissions: fix doc comment text width

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agorouter: drop Index impls for references
Wolfgang Bumiller [Thu, 21 Apr 2022 12:04:49 +0000 (14:04 +0200)]
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>
2 years agobump proxmox-router to 1.2.1-1
Wolfgang Bumiller [Thu, 21 Apr 2022 11:46:52 +0000 (13:46 +0200)]
bump proxmox-router to 1.2.1-1

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2 years agorouter: fix impl Index for dyn RpcEnvironment
Wolfgang Bumiller [Thu, 21 Apr 2022 11:45:25 +0000 (13:45 +0200)]
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>
2 years agoimpl epoch_to_rfc3339_utc on wasm target
Dietmar Maurer [Wed, 20 Apr 2022 07:10:47 +0000 (09:10 +0200)]
impl epoch_to_rfc3339_utc on wasm target

2 years agobump proxmox-compression to 0.1.1-1
Wolfgang Bumiller [Wed, 13 Apr 2022 07:34:35 +0000 (09:34 +0200)]
bump proxmox-compression to 0.1.1-1

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2 years agocompression: limit ZstdEncoder constructors to usable ones
Wolfgang Bumiller [Wed, 13 Apr 2022 07:31:56 +0000 (09:31 +0200)]
compression: limit ZstdEncoder constructors to usable ones

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2 years agocompression: don't use tokio::main in doctest
Wolfgang Bumiller [Wed, 13 Apr 2022 07:31:25 +0000 (09:31 +0200)]
compression: don't use tokio::main in doctest

because we have no rt feature enabled

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2 years agocompression: style changes
Wolfgang Bumiller [Wed, 13 Apr 2022 07:12:45 +0000 (09:12 +0200)]
compression: style changes

use where clauses where the parameter list is short enough
to become a single line

easier to read

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2 years agocompression: fmt
Wolfgang Bumiller [Wed, 13 Apr 2022 07:08:44 +0000 (09:08 +0200)]
compression: fmt

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2 years agocompression: clone_from_slice -> copy_from_slice
Wolfgang Bumiller [Wed, 13 Apr 2022 07:07:33 +0000 (09:07 +0200)]
compression: clone_from_slice -> copy_from_slice

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2 years agoproxmox-compression: add streaming zstd encoder
Dominik Csapak [Tue, 12 Apr 2022 11:04:14 +0000 (13:04 +0200)]
proxmox-compression: add streaming zstd encoder

similar to our DeflateEncoder, takes a Stream and implements it itself,
so that we can use it as an adapter for async api calls

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2 years agoproxmox-compression: add async tar builder
Dominik Csapak [Tue, 12 Apr 2022 11:04:13 +0000 (13:04 +0200)]
proxmox-compression: add async tar builder

inspired by tar::Builder, but limited to the things we need and using
AsyncRead+AsyncWrite instead of the sync variants.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2 years agobump proxmox-schema to 1.3.1-1
Wolfgang Bumiller [Wed, 13 Apr 2022 06:19:08 +0000 (08:19 +0200)]
bump proxmox-schema to 1.3.1-1

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2 years agoschema: bump api macro to 1.0.2 for the streaming attribute
Wolfgang Bumiller [Wed, 13 Apr 2022 06:19:00 +0000 (08:19 +0200)]
schema: bump api macro to 1.0.2 for the streaming attribute

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2 years agobump proxmox-api-macro to 1.0.2-1
Wolfgang Bumiller [Tue, 12 Apr 2022 12:27:11 +0000 (14:27 +0200)]
bump proxmox-api-macro to 1.0.2-1

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2 years agobump proxmox-router to 1.2.0-1
Wolfgang Bumiller [Tue, 12 Apr 2022 12:24:38 +0000 (14:24 +0200)]
bump proxmox-router to 1.2.0-1

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2 years agoproxmox-router: depend on proxmox-async 0.4.1
Wolfgang Bumiller [Tue, 12 Apr 2022 12:24:27 +0000 (14:24 +0200)]
proxmox-router: depend on proxmox-async 0.4.1

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>