Wolfgang Bumiller
5b17a02da4
drop str::join helper
...
the standard join method can do this now
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2021-09-30 12:43:33 +02:00
Wolfgang Bumiller
8735247f29
drop fd_change_cloexec from proxmox-rest-server
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2021-09-30 12:43:22 +02:00
Wolfgang Bumiller
450105b0c3
make pbs_tools::cert not depend on pbs-buildcfg
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2021-09-29 14:11:26 +02:00
Wolfgang Bumiller
b62edce929
remove pbs_client::connect_to_localhost
...
It also used `CertInfo` from pbs-tools which is also server
specific.
The original helper is now in the main crate's
client_helpers instead.
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2021-09-29 14:11:26 +02:00
Wolfgang Bumiller
67678ec39c
add all autotraits to output_or_stdout trait object
...
just in case we ever need any of them in async code that
requires them and loses it because of accessing such a trait
object...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2021-09-29 13:59:02 +02:00
Wolfgang Bumiller
01a080215d
drop pbs_tools::auth
...
`pbs_client::connect_to_localhost` now requires the key as
optional parameter
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2021-09-29 11:08:52 +02:00
Wolfgang Bumiller
f9c0a94140
buildsys: set pkg-buildcfg version automatically
...
the 'build' target now fixates the pbs-buildcfg version to
$(DEB_VERSION_UPSTREAM)
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2021-09-07 13:54:20 +02:00
Wolfgang Bumiller
df12c9ec4e
add proxmox-backup-debug debian package
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2021-09-02 11:25:50 +02:00
Wolfgang Bumiller
4c1b776168
another import cleanup
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2021-09-01 14:46:01 +02:00
Wolfgang Bumiller
42dad3abd3
fixup imports in tests and examples
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2021-09-01 12:32:21 +02:00
Wolfgang Bumiller
6c76aa434d
split proxmox-file-restore into its own crate
...
This also moves a couple of required utilities such as
logrotate and some file descriptor methods to pbs-tools.
Note that the logrotate usage and run-dir handling should be
improved to work as a regular user as this *should* (IMHO)
be a regular unprivileged command (including running
qemu given the kvm privileges...)
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2021-09-01 12:23:29 +02:00
Wolfgang Bumiller
e5f9b7f79e
split out proxmox-backup-debug binary
...
and introduce pbs_tools::cli module
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2021-08-31 14:45:48 +02:00
Wolfgang Bumiller
dd2162f6bd
more import cleanups
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2021-08-31 14:01:03 +02:00
Wolfgang Bumiller
cabdabba3d
fixup imports in debug binary
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2021-08-31 13:29:06 +02:00
Wolfgang Bumiller
86582454e8
make api2::helpers::list_dir_content a CatalogReader method
...
this is its natural place and everything required is already
part of the catalog module
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2021-08-31 11:29:17 +02:00
Wolfgang Bumiller
013b1e8bca
move some more API types
...
ArchiveEntry -> pbs-datastore
RestoreDaemonStatus -> pbs-api-types
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2021-08-31 11:29:17 +02:00
Wolfgang Bumiller
b2065dc7d2
cleanup proxmox_backup::backup module
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2021-08-30 14:14:04 +02:00
Wolfgang Bumiller
e351ac786d
split out proxmox-backup-client binary
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2021-08-30 11:39:01 +02:00
Wolfgang Bumiller
7b570c177d
move some API return types to pbs-api-types
...
they'll be required by the api client
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2021-08-30 11:39:01 +02:00
Wolfgang Bumiller
6838b75904
Cargo.toml: drop features in 'patch' section
...
the features array does not need to be repeated here
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2021-08-30 11:39:01 +02:00
Wolfgang Bumiller
80f950c05d
more Updatable -> UpdaterType fixups
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2021-08-25 10:43:58 +02:00
Wolfgang Bumiller
4933b853cd
d/control bump
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2021-08-25 10:43:58 +02:00
Wolfgang Bumiller
aec1b91eb8
bump proxmox-openid dependency to 0.7.0
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2021-08-25 10:43:58 +02:00
Wolfgang Bumiller
2e2d64fdba
bump proxmox dependency to 0.13.0
...
and with it:
* bump proxmox-http dependency to 0.4.0
* bump proxmox-apt dependency to 0.7.0
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2021-08-25 10:43:58 +02:00
Wolfgang Bumiller
a37c8d2431
use ApiType trait
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2021-08-25 10:43:58 +02:00
Wolfgang Bumiller
ad0364c558
tools: xattr: don't test things beyond our control
...
whether the kernel allows super-long names or weird
namespace prefixes is not our concern...
also the latter fails under fakeroot
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2021-07-22 11:34:40 +02:00
Wolfgang Bumiller
ef4df211ab
move CachedChunkReader to pbs-datastore
...
this was actually still missing from the previous commit
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2021-07-21 14:20:03 +02:00
Wolfgang Bumiller
eb5e0ae65a
move remaining client tools to pbs-tools/datastore
...
pbs-datastore now ended up depending on tokio after all, but
that's fine for now
for the fuse code I added pbs-fuse-loop (has the old
fuse_loop and its 'loopdev' module)
ultimately only binaries should depend on this to avoid the
library link
the only thins remaining to move out the client binary are
the api method return types, those will need to be moved to
pbs-api-types...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2021-07-21 14:12:24 +02:00
Wolfgang Bumiller
bbc71e3b02
client: fix panic message
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2021-07-21 13:28:55 +02:00
Wolfgang Bumiller
a00888e93f
fixup examples
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2021-07-20 15:26:25 +02:00
Wolfgang Bumiller
fc5870be53
move channel/stream helpers to pbs-tools
...
pbs_tools
::blocking: std/async wrapping with block_in_place
::stream: stream <-> AsyncRead/AsyncWrite wrapping
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2021-07-20 11:27:40 +02:00
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