Wolfgang Bumiller
3c8c2827cb
move required_X_param to pbs_tools::json
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2021-07-20 11:09:52 +02:00
Wolfgang Bumiller
6c221244df
move lru cachers to pbs-tools
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2021-07-20 10:57:22 +02:00
Wolfgang Bumiller
38629c3961
move ChunkStream to pbs-client
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2021-07-20 10:52:21 +02:00
Wolfgang Bumiller
3fa1b4b48c
cleanup unused imports
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2021-07-19 15:55:19 +02:00
Wolfgang Bumiller
a6eac535e4
Makefile: fix build.rs reference
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2021-07-19 15:54:53 +02:00
Wolfgang Bumiller
58a3fae773
move pxar binary to separate crate
...
and move its few remaining proxmox_backup deps out to
pbs-tools
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2021-07-19 15:53:43 +02:00
Wolfgang Bumiller
0889806a3c
resolve some more client imports
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2021-07-19 15:03:24 +02:00
Wolfgang Bumiller
51ec8a3c62
move some api types to pbs-api-types
...
and resolve some imports in the client binary
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2021-07-19 15:01:03 +02:00
Wolfgang Bumiller
a12b1be728
move build.rs and friends to pbs-buildcfg
...
with this the main crate won't be re-compiled every time a
*binary* is modified
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2021-07-19 14:59:18 +02:00
Wolfgang Bumiller
4d04cd9ab9
comment on test output paths
...
cargo should be getting a new env var for this soon
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2021-07-19 14:24:13 +02:00
Wolfgang Bumiller
a3399f4337
doc and tests fixup
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2021-07-19 14:16:28 +02:00
Wolfgang Bumiller
2b7f8dd5ea
move client to pbs-client subcrate
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2021-07-19 12:58:43 +02:00
Wolfgang Bumiller
72fbe9ffa5
move 'wait_for_local_worker' from client to server
...
this just made no sense in the client
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2021-07-19 10:44:44 +02:00
Wolfgang Bumiller
0be8bce718
d/control: fixup proxmox feature flags
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2021-07-19 10:09:43 +02:00
Wolfgang Bumiller
4805edc4ec
move more tools for the client into subcrates
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2021-07-19 10:07:12 +02:00
Wolfgang Bumiller
9eb784076c
move more helpers to pbs-tools
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2021-07-19 10:07:12 +02:00
Wolfgang Bumiller
b9c5cd8291
add proxmox-backup-banner binary crate
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2021-07-19 10:07:12 +02:00
Wolfgang Bumiller
9008c0c177
bump proxmox-apt dependency
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2021-07-19 10:07:12 +02:00
Wolfgang Bumiller
9f5b57a348
buildsys: Prepare new way for path dependencies
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2021-07-15 09:56:32 +02:00
Wolfgang Bumiller
f1c4b8df34
features update
...
so we can drop default-features in proxmox for build-deps to
be more lean
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2021-07-15 09:56:05 +02:00
Wolfgang Bumiller
82bdf6b5e7
api: tfa: module path cleanup
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2021-07-12 08:43:14 +02:00
Wolfgang Bumiller
be3a0295b6
client: import updates
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2021-07-09 15:32:12 +02:00
Wolfgang Bumiller
aa2838c27a
move client::pull to server::pull
...
it's not used by the client and not part of the client, it
just makes use *of* the client, but is used on the
datastore/server...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2021-07-09 15:17:53 +02:00
Wolfgang Bumiller
ea584a7510
move more api types for the client
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2021-07-09 15:17:53 +02:00
Wolfgang Bumiller
ba0ccc5991
move some tools used by the client
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2021-07-09 15:17:52 +02:00
Wolfgang Bumiller
75f83c6a81
move some api types and resolve imports
...
in preparation of moving client & proxmox_client_tools out
into a pbs-client subcrate
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2021-07-09 15:17:52 +02:00
Wolfgang Bumiller
2f02e431b0
moving more code to pbs-datastore
...
prune and fixed/dynamic index
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2021-07-09 10:40:14 +02:00
Wolfgang Bumiller
e64f38cb6b
move chunk_stat, read_chunk to pbs-datastore
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2021-07-09 10:40:14 +02:00
Wolfgang Bumiller
c23192d34e
move chunk_store to pbs-datastore
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2021-07-07 14:37:47 +02:00
Wolfgang Bumiller
83771aa037
move tools::process_locker to pbs-tools
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2021-07-07 14:16:34 +02:00
Wolfgang Bumiller
95f9d67ce9
move UPID to pbs-api-types, add UPIDExt
...
pbs-server side related methods are added via the UPIDExt
trait
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2021-07-07 13:51:03 +02:00
Wolfgang Bumiller
314d360fcd
buildsys: run tests on entire workspace by default
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2021-07-07 12:17:10 +02:00
Wolfgang Bumiller
f8a74456cc
test fixups
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2021-07-07 12:17:10 +02:00
Wolfgang Bumiller
4906bac10f
linking fixup
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2021-07-07 11:59:33 +02:00
Wolfgang Bumiller
86c831a5c3
fixup examples
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2021-07-07 11:49:42 +02:00
Wolfgang Bumiller
a5951b4f38
move manifest and backup_info to pbs-datastore
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2021-07-07 11:34:56 +02:00
Wolfgang Bumiller
f75292bd8d
move tools::json to pbs-tools
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2021-07-07 11:34:56 +02:00
Wolfgang Bumiller
bfff4eaa7f
move backup id related types to pbs-api-types
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2021-07-07 11:34:56 +02:00
Wolfgang Bumiller
067dc06dba
add pbs-systemd: move string and unit handling there
...
the systemd config/unit parsing stays in pbs for now since
that's not usually required and uses our section config
parser
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2021-07-07 11:34:56 +02:00
Wolfgang Bumiller
18cdf20afc
move tools::nom to pbs-tools
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2021-07-07 10:08:26 +02:00
Wolfgang Bumiller
e57841c442
move run_command to pbs-tools
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2021-07-07 10:04:05 +02:00
Wolfgang Bumiller
751f6b6148
move userid types to pbs-api-types
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2021-07-07 09:53:48 +02:00
Wolfgang Bumiller
3c430e9a55
move id and single line comment format to pbs-api-types
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2021-07-07 09:49:38 +02:00
Wolfgang Bumiller
155f657f6b
move TaskState trait to pbs-datastore
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2021-07-07 09:24:39 +02:00
Wolfgang Bumiller
86fb38776b
add pbs-api-types subcrate, move key_derivation
...
move key_derivation to pbs-datastore
pbs-api-types should only contain "basic" types which
* are usually required by clients
* don't depend on pbs-related code directly
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2021-07-07 09:04:09 +02:00
Wolfgang Bumiller
f323e90602
add pbs-datastore module
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2021-07-06 15:11:52 +02:00
Wolfgang Bumiller
770a36e53a
add pbs-tools subcrate
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2021-07-06 15:10:37 +02:00
Wolfgang Bumiller
d420962fbc
split out pbs-runtime module
...
These are mostly tokio specific "hacks" or "workarounds" we
only really need/want in our binaries without pulling it in
via our library crates.
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2021-07-06 14:52:25 +02:00
Wolfgang Bumiller
01fd2447b2
buildsys: don't use debcargo
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2021-07-06 14:50:46 +02:00
Wolfgang Bumiller
85beb7d875
tree-wide: switch to using mod.rs
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2021-07-06 12:04:52 +02:00
Wolfgang Bumiller
af06decd1b
split out pbs-buildcfg module
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2021-07-06 12:00:14 +02:00
Wolfgang Bumiller
aceae32baa
Cargo.toml: regroup imports
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2021-07-06 11:48:28 +02:00
Wolfgang Bumiller
1e7639bfc4
fixup minimum lru capacity
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2021-06-08 10:13:46 +02:00
Wolfgang Bumiller
1b9521bb87
bump d/control
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2021-05-17 11:46:27 +02:00
Wolfgang Bumiller
1d781c5b20
update proxmox-http dependency
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2021-05-17 11:29:24 +02:00
Wolfgang Bumiller and Thomas Lamprecht
126ccbcfa6
acme: improve errors when account loading fails
...
if the account does not exist, error with its name
if file loading fails, the error includes the full path
if the content fails to parse, show file & parse error
and in each case mention that it's about loading the acme account file
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2021-05-12 12:22:21 +02:00
Wolfgang Bumiller and Thomas Lamprecht
fca1cef29f
hot-reload proxy certificate when updating via the API
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2021-05-11 16:28:08 +02:00
Wolfgang Bumiller and Thomas Lamprecht
45b8a0327f
refactor send_command
...
- refactor the combinators,
- make it take a `&T: Serialize` instead of a Value, and
allow sending the raw string via `send_raw_command`.
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2021-05-11 16:28:08 +02:00
Wolfgang Bumiller and Thomas Lamprecht
a723c08715
proxy: implement 'reload-certificate' command
...
to be used via the command socket
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2021-05-11 16:28:08 +02:00
Wolfgang Bumiller and Thomas Lamprecht
c381a162fb
proxy: factor out tls acceptor creation
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2021-05-11 16:28:08 +02:00
Wolfgang Bumiller and Thomas Lamprecht
b4931192c3
proxy: Arc usage cleanup
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2021-05-11 16:28:08 +02:00
Wolfgang Bumiller and Thomas Lamprecht
cc269b9ff9
proxy: "continue on error" for the accept call, too
...
as this gets rid of 2 levels of indentation
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2021-05-11 16:28:08 +02:00
Wolfgang Bumiller and Thomas Lamprecht
a5e3be4992
proxy: factor out accept_connection
...
no functional changes, moved code and named the channel's
type for more readability
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2021-05-11 16:28:08 +02:00
Wolfgang Bumiller
b41f9e9fec
acme: fix bad nonce retry counter
...
Actually return the error on the 3rd try.
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2021-05-10 11:52:04 +02:00
Wolfgang Bumiller
c4e1af3069
make sure URI paths start with a slash
...
Otherwise we get an empty error message.
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2021-05-07 08:46:47 +02:00
Wolfgang Bumiller and Dietmar Maurer
25d78b1068
client: use build_authority in build_uri
...
so we don't need to also duplicate the IPv6 bracket logic
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2021-05-06 10:27:40 +02:00
Wolfgang Bumiller and Dietmar Maurer
ee0c5c8e01
use api_string_type macro
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
Signed-off-by: Dietmar Maurer <dietmar@proxmox.com >
2021-05-05 08:24:37 +02:00
Wolfgang Bumiller
eaef6c8d00
Revert "temporarily disable broken test"
...
This reverts commit 888d89e2dd .
The code this depends on should now be available.
2021-05-04 12:11:35 +02:00
Wolfgang Bumiller
95f3692545
fix permissions set in create_run_dir
...
This directory needs to be owned by the backup user instead
of root.
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2021-05-04 12:11:35 +02:00
Wolfgang Bumiller and Dietmar Maurer
8fb24a2c0a
daily-update: check acme certificates
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2021-05-04 09:43:50 +02:00
Wolfgang Bumiller and Dietmar Maurer
4b5d9b6e64
ui: add certificate & acme view
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2021-05-04 09:42:50 +02:00
Wolfgang Bumiller and Dietmar Maurer
72bd8293e3
add acme commands to proxmox-backup-manager
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2021-05-04 09:39:16 +02:00
Wolfgang Bumiller and Dietmar Maurer
09989d9963
add node/{node}/config api path
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2021-05-04 09:32:42 +02:00
Wolfgang Bumiller and Dietmar Maurer
4088d5bc62
add node/{node}/certificates api call
...
API like in PVE:
GET .../info => current cert information
POST .../custom => upload custom certificate
DELETE .../custom => delete custom certificate
POST .../acme/certificate => order acme certificate
PUT .../acme/certificate => renew expiring acme cert
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2021-05-04 09:31:30 +02:00
Wolfgang Bumiller and Dietmar Maurer
d4b84c1dec
add config/acme api path
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2021-05-04 09:30:49 +02:00
Wolfgang Bumiller and Dietmar Maurer
79b902d512
add node config
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2021-05-04 09:29:31 +02:00
Wolfgang Bumiller and Dietmar Maurer
f2f526b61d
add acme client
...
This is the highlevel part using proxmox-acme-rs to create
requests and our hyper code to issue them to the acme
server.
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2021-05-04 07:56:52 +02:00
Wolfgang Bumiller and Dietmar Maurer
cb67ecaddb
add acme config
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2021-05-04 07:43:43 +02:00
Wolfgang Bumiller and Dietmar Maurer
d724116c0c
add dns alias schema
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2021-04-30 08:10:57 +02:00
Wolfgang Bumiller and Dietmar Maurer
bc5c1a9aa6
add 'config file format' to tools::config
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2021-04-29 12:11:54 +02:00
Wolfgang Bumiller and Dietmar Maurer
3df77ef5da
config::acl: make /system/certificates a valid path
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2021-04-29 12:08:00 +02:00
Wolfgang Bumiller and Dietmar Maurer
e8d9d9adfa
bump d/control
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2021-04-29 12:05:22 +02:00
Wolfgang Bumiller and Dietmar Maurer
01d152720f
Cargo.toml: depend on proxmox-acme-rs
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2021-04-29 12:04:28 +02:00
Wolfgang Bumiller and Dietmar Maurer
5e58381ea9
catalog shell: replace LoopState with ControlFlow
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2021-04-29 11:17:21 +02:00
Wolfgang Bumiller and Dietmar Maurer
0b6d9442bd
tools: add ControlFlow type
...
modeled after std::ops::ControlFlow
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2021-04-29 11:15:20 +02:00
Wolfgang Bumiller and Dietmar Maurer
134ed9e14f
CertInfo: add is_expired_after_epoch
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2021-04-29 11:07:04 +02:00
Wolfgang Bumiller and Dietmar Maurer
0796b642de
CertInfo: add not_{after, before}_unix
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2021-04-29 10:59:02 +02:00
Wolfgang Bumiller and Dietmar Maurer
f912ba6a3e
config: factor out certificate writing
...
for reuse in the certificate api
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2021-04-28 12:58:41 +02:00
Wolfgang Bumiller and Dietmar Maurer
a576e6685b
tools::fs::scan_subdir: use nix::Error instead of anyhow
...
allows using SysError trait on it
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2021-04-28 12:32:57 +02:00
Wolfgang Bumiller and Dietmar Maurer
b1c793cfa5
systemd: add reload_unit
...
via try-reload-or-restart
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2021-04-28 12:15:26 +02:00
Wolfgang Bumiller
e045d154e9
file-restore: avoid unnecessary clone
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2021-04-23 13:22:30 +02:00
Wolfgang Bumiller
79e58a903e
pxar: handle missing GROUP_OBJ ACL entries
...
Previously we did not store GROUP_OBJ ACL entries for
directories, this means that these were lost which may
potentially elevate group permissions if they were masked
before via ACLs, so we also show a warning.
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2021-04-02 11:10:20 +02:00
Wolfgang Bumiller
9f40e09d0a
pxar: fix directory ACL entry creation
...
Don't override `group_obj` with `None` when handling
`ACL_TYPE_DEFAULT` entries for directories.
Reproducer: /var/log/journal ends up without a `MASK` type
entry making it invalid as it has `USER` and `GROUP`
entries.
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2021-04-02 10:22:04 +02:00
Wolfgang Bumiller
a1d90719e4
bump pxar dep to 0.10.1
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2021-03-31 14:00:20 +02:00
Wolfgang Bumiller
b31cdec225
update to pxar 0.10
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2021-03-12 10:48:09 +01:00
Wolfgang Bumiller
591b120d35
fix feature flag logic in pxar create
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2021-03-12 10:17:51 +01:00
Wolfgang Bumiller
46d53e3e90
bump proxmox dep to 0.11.0
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2021-02-25 09:23:30 +01:00
Wolfgang Bumiller
3554fe6480
update to schema changes in proxmox
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2021-02-24 14:50:08 +01:00
Wolfgang Bumiller
e68c0e68bd
bump proxmox dep to 0.10.7
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2021-02-23 14:44:59 +01:00
Wolfgang Bumiller
0514a4308f
update d/control
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2021-02-18 09:13:38 +01:00