Commit Graph

1787 Commits

Author SHA1 Message Date
Wolfgang Bumiller
6dc2393625 sys: drop comment from Cargo.toml
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-07-28 13:29:42 +02:00
Wolfgang Bumiller
6e857c6090 bump proxmox-sys to 0.4.0
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-07-28 13:28:21 +02:00
Wolfgang Bumiller
00f16b4e94 rest-server: clippy fixups
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-07-27 14:54:44 +02:00
Wolfgang Bumiller
c5382d1b20 sys: doc fixup
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-07-27 10:55:10 +02:00
Wolfgang Bumiller
28ee8bc6d0 http: clippy fixes
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-07-27 10:52:50 +02:00
Wolfgang Bumiller
31a569b425 api-macro: clippy fixes
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-07-27 10:52:07 +02:00
Wolfgang Bumiller
c78c47cff2 uuid: clippy fixes
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-07-27 10:51:22 +02:00
Wolfgang Bumiller
6cac8d5cbe sys: another Arc::clone
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-07-26 14:45:39 +02:00
Wolfgang Bumiller
51746a0d45 sys: explicit Arc::clone
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-07-26 14:44:49 +02:00
Wolfgang Bumiller
6e247b9593 sys: use Iterator::min instead of a manual version
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-07-26 13:21:36 +02:00
Wolfgang Bumiller
36903bf2fe sys: bump edition to 2021
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-07-26 13:04:09 +02:00
Wolfgang Bumiller
4de145aaef lang: update c_str
drop the let binding, easier to use in const context since
CStr::from_bytes_with_nul_unchecked is const since 1.59

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-07-26 12:27:44 +02:00
Wolfgang Bumiller
34d2c91118 sys: drop proxmox-borrow dependency
nix now has an owning directory iterator, we don't need it
anymore

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-07-26 12:24:14 +02:00
Wolfgang Bumiller
36625fb92c tfa: bump d/control
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-07-26 12:24:01 +02:00
Wolfgang Bumiller
d0b4f0bf2f tfa: docs fixup
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-07-26 12:23:50 +02:00
Wolfgang Bumiller
df0d30a106 bump proxmox-tfa to 2.1.0
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-07-25 13:38:04 +02:00
Wolfgang Bumiller
a7f808d43b tfa: bump edition to 2021
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-07-25 13:35:58 +02:00
Wolfgang Bumiller
d396c3ea31 tfa: clippy fixups
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-07-25 13:35:57 +02:00
Wolfgang Bumiller
ea34292850 tfa: expose 'allow_subdomains' property
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-07-25 13:25:52 +02:00
Wolfgang Bumiller
b84446a030 sys: enable CreateOptions::group_root/root_only
nix now has the required const fns

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-07-25 10:31:49 +02:00
Wolfgang Bumiller
d3364e07fb sys: file locking depends on timer feature
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-07-22 11:58:18 +02:00
Wolfgang Bumiller
e2e7ea6d62 sys: introduce 'acl', 'crypt' and 'timer' features
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-07-21 15:42:11 +02:00
Wolfgang Bumiller
f6c7d46d04 bump proxmox-subscription to 0.2.0-1
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-07-21 14:36:49 +02:00
Fabian Grünbichler
6ff1c96021 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>
2022-07-21 13:30:11 +02:00
Fabian Grünbichler
5391f5313b 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>
2022-07-21 13:29:15 +02:00
Wolfgang Bumiller
2e929cc386 bump proxmox-http dep to 0.6.4
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-07-21 13:01:14 +02:00
Wolfgang Bumiller
d228ef6e20 http: bump d/control
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-07-21 12:58:41 +02:00
Wolfgang Bumiller
dc57115703 bump proxmox-http to 0.6.4-1
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-07-21 12:58:11 +02:00
Mira Limbeck
a8a838754d 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>
2022-07-21 12:54:59 +02:00
Wolfgang Bumiller
760c49be6e subscription: check in d/control
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-07-21 12:54:59 +02:00
Wolfgang Bumiller
6794989b2a proxmox-subscription: initial bump to 0.1.0-1
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-07-20 13:37:08 +02:00
Wolfgang Bumiller
757031ef33 sys: clippy fixups
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-07-20 13:35:58 +02:00
Wolfgang Bumiller
94d388b988 http: clippy fixups
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-07-20 13:31:58 +02:00
Wolfgang Bumiller
5e630472ec subscription: clippy fixup
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-07-20 13:28:31 +02:00
Wolfgang Bumiller
ab17e16664 subscription: line-wrap test data
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-07-20 13:28:31 +02:00
Wolfgang Bumiller
0cd02a0d2b subscription: doc comment fixup
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-07-20 13:28:31 +02:00
Fabian Grünbichler
3f694b5481 subscription: clippy lints
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2022-07-20 13:28:31 +02:00
Fabian Grünbichler
baf31dc2d8 subscription: properly case status enum values
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2022-07-20 13:28:31 +02:00
Fabian Grünbichler
38492bde83 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>
2022-07-19 15:20:36 +02:00
Fabian Grünbichler
4ec9a8183d 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>
2022-07-19 15:20:36 +02:00
Wolfgang Bumiller
6e4a43d683 bump proxmox-sys to 0.3.2
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-07-07 11:49:57 +02:00
Wolfgang Bumiller
67fbf2b2ee 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>
2022-07-07 11:45:26 +02:00
Wolfgang Bumiller
c7224c5f67 bump proxmox-compression to 0.1.2-1
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-07-05 13:46:38 +02:00
Wolfgang Bumiller
ff86aa5f8a compression: more cleanups
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-07-05 13:23:14 +02:00
Wolfgang Bumiller
2d37cd92e0 compression: indentation cleanup
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-07-05 12:17:04 +02:00
Wolfgang Bumiller
cc6e5d7372 compression: minor cleanup
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-07-05 12:13:38 +02:00
Dominik Csapak
6e989a1c29 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>
2022-07-05 12:12:02 +02:00
Dominik Csapak
38db37dc5f 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>
2022-07-05 12:11:57 +02:00
Fabian Grünbichler
b5accff750 bump proxmox-http to 0.6.3-1 2022-06-30 12:42:18 +02:00
Fabian Grünbichler
bd1f9f103e http: implement HttpClient for SimpleHttp
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2022-06-30 12:42:17 +02:00