Wolfgang Bumiller
fab2413741
catalog: remove unused SenderWriter
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2020-06-10 10:42:42 +02:00
Wolfgang Bumiller
fc6047fcb1
pxar: don't skip list+found by default
...
This used to be default-off and was accidentally set to
on-by-default with the pxar crate update.
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2020-06-10 08:53:10 +02:00
Wolfgang Bumiller
3014088684
pxar: sort .pxareclude-cli file and fix its mode
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2020-06-10 08:49:14 +02:00
Wolfgang Bumiller
cdde66d277
statistics: covariance(): avoid allocation
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2020-06-09 13:57:27 +02:00
Wolfgang Bumiller
239e49f927
pxar: create .pxarexclude-cli file
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2020-06-09 13:17:59 +02:00
Wolfgang Bumiller
9825748e5e
Cargo.toml: readd commented-out proxmox crate via path for convenience
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2020-06-09 11:16:28 +02:00
Wolfgang Bumiller
2179359f40
move src/pxar.rs -> src/pxar/mod.rs
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2020-06-09 10:49:59 +02:00
Wolfgang Bumiller
7eacdc765b
pxar: split assert_relative_path
...
the check for a single component is only required in the dir
stack atm
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2020-06-08 15:02:52 +02:00
Wolfgang Bumiller
c443f58b09
switch to external pxar and fuse crates
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2020-06-08 13:56:58 +02:00
Wolfgang Bumiller
ab1092392f
Cargo.toml: pathpatterns, pxar, proxmox-fuse
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2020-06-08 13:56:58 +02:00
Wolfgang Bumiller
1e3d9b103d
xattr: make xattr_name_fcaps public
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2020-06-08 13:56:58 +02:00
Wolfgang Bumiller
386990ba09
tools: add file_get_non_comment_lines
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2020-06-08 13:56:58 +02:00
Wolfgang Bumiller
a595f0fee0
client: improve connection/new fingerprint query
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2020-06-02 10:40:31 +02:00
Wolfgang Bumiller
10effc9849
add tools/disks.rs (work in progress...)
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2020-05-05 10:14:42 +02:00
Wolfgang Bumiller
9094186a57
xattr: cleanup: don't use pxar types in the API
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2020-04-24 11:23:48 +02:00
Wolfgang Bumiller
27a3decbfe
xattr: api cleanup
...
Make `flistxattr()` return a `ListXAttr` helper which
provides an iterator over `&CStr`.
This exposes the property that xattr names are a
zero-terminated string without simply being an opaque
"byte vector". Using &[u8] as a type here is too lax.
Also let `fgetxattr` take a `CStr`. While this may be a
burden on the caller, we usually already have
zero-terminated strings on the call site. Currently we only
use this method coming from `flistxattr` after all.
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2020-04-24 10:56:52 +02:00
Wolfgang Bumiller
9af76ef075
xattr: use checked_mul to increase size
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2020-04-24 10:56:52 +02:00
Wolfgang Bumiller
00ec8d1685
tools: pub use Fd from proxmox crate
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2020-04-24 10:56:52 +02:00
Wolfgang Bumiller
f7d4e4b506
switch from failure to anyhow
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2020-04-17 18:43:30 +02:00
Wolfgang Bumiller
9abc1166b0
bump proxmox dependency to 0.1.19
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2020-03-19 10:12:33 +01:00
Wolfgang Bumiller
0e7ab0567c
buildsys: add missing dependency
...
required for the docs built when building the deb packages
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2020-03-16 14:54:24 +01:00
Wolfgang Bumiller
0bcbb5434e
cleanup unused module
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2020-02-25 11:38:27 +01:00
Wolfgang Bumiller
9e003074cb
runtime: fix blocking strategy:
...
- do not "double"-block_in_place() (it may not be nested)
- do not call block_in_place() in non-worker threads
is_in_tokio() isn't sufficient, we need to actually know
that we're in a worker-thread, so we do this by remembering
that we're blocking.
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2020-02-17 09:48:22 +01:00
Wolfgang Bumiller
1283d58ca9
runtime: remove IN_TOKIO thread local variable
...
tokio now has Handle::try_current() allowing us to
generally check for a tokio runtime even if spawned by
someone else
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2020-02-13 08:56:38 +01:00
Wolfgang Bumiller
6f763ae673
tools: LruCache: add dropcheck marker
...
See https://doc.rust-lang.org/nomicon/phantom-data.html
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2020-01-29 09:18:27 +01:00
Wolfgang Bumiller
5543f7b7b3
bump proxmox crate version requirement
...
it contained an important api macro bugfix
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2020-01-24 13:43:27 +01:00
Wolfgang Bumiller
51f0ab1e8b
fixup tests for the new proxmox crate layout
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2020-01-22 10:08:40 +01:00
Wolfgang Bumiller
9ea4bce444
bump proxmox crate to 0.1.7
...
The -sys, -tools and -api crate have now been merged into
the proxmx crate directly. Only macro crates are separate
(but still reexported by the proxmox crate in their
designated locations).
When we need to depend on "parts" of the crate later on
we'll just have to use features.
The reason is mostly that these modules had
inter-dependencies which really make them not independent
enough to be their own crates.
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2020-01-21 13:48:37 +01:00
Wolfgang Bumiller
077ac6f8b3
runtime: actually park on Pending...
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2020-01-21 10:37:16 +01:00
Wolfgang Bumiller
2d51569396
runtime: custom block_on implementation
...
futures::executor::block_on does not allow nesting, but we
need that...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2020-01-21 10:24:52 +01:00
Wolfgang Bumiller
650e052299
runtime: drop now not required Send and static restrictions
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2020-01-20 14:09:24 +01:00
Wolfgang Bumiller
d973aa827c
introduce new runtime tokio helpers
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2020-01-20 13:12:40 +01:00
Wolfgang Bumiller
6a0dc4a5bc
bump proxmox crate version
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2020-01-16 11:40:23 +01:00
Wolfgang Bumiller
4f0c4523f6
debian: bump dependency versions
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2020-01-16 10:20:41 +01:00
Wolfgang Bumiller
619495b25e
fix use of deprecated items
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2020-01-16 08:58:54 +01:00
Wolfgang Bumiller
18c0df4c92
import ordering cleanup
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2020-01-16 08:51:52 +01:00
Wolfgang Bumiller
85d3660bf9
bump proxmox dependency to 0.1.2
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2020-01-08 14:18:07 +01:00
Wolfgang Bumiller
8b90dab222
bump proxmox to 0.1.1 - packages are now available
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2020-01-07 10:11:35 +01:00
Wolfgang Bumiller
a546a8a072
proxy/api: await running workers before shutdown
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2019-12-27 12:50:33 +01:00
Wolfgang Bumiller
5e62d19cfb
fix create_datastore parameters:
...
comment was declared as optional but unwrap()ed, causing
panics when not using it
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2019-12-20 12:30:25 +01:00
Wolfgang Bumiller
afdcfb5bc9
let ChunkStore::create take CreateOptions
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2019-12-19 13:14:49 +01:00
Wolfgang Bumiller
7a00f8df12
drop our zstd-sys replacement
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2019-12-18 12:23:20 +01:00
Wolfgang Bumiller
feaa1ad35f
replace file_set_contents with replace_file
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2019-12-18 11:16:04 +01:00
Wolfgang Bumiller
dc08934563
drop Cancellable future in favor of abortable
...
futures-0.3 has a futures::future::abortable() function
which does the exact same, returns an Abortable future with
an AbortHandle providing an abort() method.
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2019-12-17 10:52:07 +01:00
Wolfgang Bumiller
8554ac5ec3
fix broadcast_future test case
...
We used to await all the futures via the runtime's shutdown
method, which doesn't exist anymore, so await all the join
handles instead.
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2019-12-17 10:47:12 +01:00
Wolfgang Bumiller
dd8c03a277
buildsys: make deb: use --lib for first pass build
...
since it'll rebuild the lib & binaries anyway after the
copy, only build the library (to get the dependencies out of
the way), but dont build the binaries...
saves a couple seconds of build time
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2019-12-16 14:07:15 +01:00
Wolfgang Bumiller
78d5436040
client: use api macro for catalog_shell async fn
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2019-12-16 11:24:44 +01:00
Wolfgang Bumiller
f374ba4c0b
update tests
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2019-12-13 12:42:02 +01:00
Wolfgang Bumiller
b5c9a706ce
fix cancellable future
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2019-12-13 12:10:04 +01:00
Wolfgang Bumiller
8a1028e0e7
update to url/percent-encoding to 2.1
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2019-12-13 11:57:01 +01:00
Wolfgang Bumiller
db0cb9ce0b
update a chunk of stuff to the hyper release
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2019-12-13 11:24:41 +01:00
Wolfgang Bumiller
a9aa52e6a8
test another api macro use
...
The api macro now supports hyphens in parameter names and
referencing externally defined `Schema`s, so here's an
example.
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2019-12-03 13:41:40 +01:00
Wolfgang Bumiller
8423c1fe64
cli/completion: use match statements and .contains()
...
`match` is a bit more readable than the if-else chains,
also replace
space_chars.iter().any(|s| c == *s)
with
space_chars.contains(&c)
which is also more readable.
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2019-11-29 13:37:34 +01:00
Wolfgang Bumiller
41874331ed
whitespace fixup
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2019-11-29 09:52:15 +01:00
Wolfgang Bumiller
2905f2b5e6
update api macro example usage
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2019-11-29 09:51:27 +01:00
Wolfgang Bumiller
7b6c41078b
update api macro invocation to new style
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2019-11-27 14:19:46 +01:00
Wolfgang Bumiller
6486cb853f
first api macro usage test/example
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2019-11-27 10:05:37 +01:00
Wolfgang Bumiller
be2bb37205
remove api_schema submodule
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2019-11-22 09:31:45 +01:00
Wolfgang Bumiller
cad540e969
api/compat: remove remaining api_schema references
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2019-11-21 14:53:15 +01:00
Wolfgang Bumiller
a2479cfa1a
api/compat: drop more compat imports from api_schema.rs
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2019-11-21 14:36:28 +01:00
Wolfgang Bumiller
cc4ecf80b0
api/compat: drop api_handler submodule
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2019-11-21 14:18:41 +01:00
Wolfgang Bumiller
4f1963d259
api/comapt: drop schema submodule
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2019-11-21 14:17:36 +01:00
Wolfgang Bumiller
2194824f77
api: BoxFut -> ApiFuture
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2019-11-21 14:16:37 +01:00
Wolfgang Bumiller
3d482025b3
move api schema into proxmox::api crate
...
And leave some compat imports in api_schema.rs to get it to
build with minimal changes.
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2019-11-21 14:14:54 +01:00
Wolfgang Bumiller
db43665a14
drop unused mio crate
...
we still depend on it through other crates, but we don't use
it directly
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2019-11-14 11:20:05 +01:00
Wolfgang Bumiller
c5946faffd
drop md5 crate dependency
...
we already depend on openssl which also provides md5
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2019-11-14 11:19:43 +01:00
Wolfgang Bumiller
f569acc5e2
drop uuid crate dependency
...
proxmox::tools now has a Uuid module using the native
libuuid.
Adds build dependency: libuuid1 (which is a Pre-Depends of
util-linux, so always installed anyway).
Drops uuid + 16 more crate dependencies.
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2019-11-14 10:22:29 +01:00
Wolfgang Bumiller
ba5e67475a
clippy: fix access to unaligned buffer in dynamic reader
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2019-09-11 14:50:45 +02:00
Wolfgang Bumiller
b526bd1408
backup: cleanup unused imports
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2019-09-11 14:46:46 +02:00
Wolfgang Bumiller
4dc79bb1d9
clippy: fix access to unaligned buffer
...
via the newly introduced ReadExt::read_host_value_boxed()
from proxmox::tools::io.
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2019-09-11 14:45:44 +02:00
Wolfgang Bumiller
ccdf3ad1ec
backup: use static assertion in fixed index reader
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2019-09-11 14:43:25 +02:00
Wolfgang Bumiller
34a3845b01
clippy: don't use clone a double reference
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2019-09-11 14:02:30 +02:00
Wolfgang Bumiller
d159610265
buildsys: add 'make lint'
...
for now we only activate lints for code that is "outright
wrong"
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2019-09-11 13:59:58 +02:00
Wolfgang Bumiller
b21851cc5c
clippy: collapse identical if branches
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2019-09-11 13:57:58 +02:00
Wolfgang Bumiller
299a2f18b2
fixup variable naming
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2019-09-11 13:57:23 +02:00
Wolfgang Bumiller
175eeb870d
clippy: use write_all in file logger
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2019-09-11 13:56:09 +02:00
Wolfgang Bumiller
5a54935bc9
clippy: fix pointer to temporary value
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2019-09-11 13:55:56 +02:00
Wolfgang Bumiller
bd430c225b
clippy: remove a loop{} which never actually loops
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2019-09-11 12:31:39 +02:00
Wolfgang Bumiller
44fed91e17
more clippy fixups
...
mostly indentation changes, view with `-w`
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2019-09-11 12:23:12 +02:00
Wolfgang Bumiller
653b1ca10e
some clippy fixups
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2019-09-11 12:14:05 +02:00
Wolfgang Bumiller
ef0338d497
remove Cargo.lock
...
we currently have no git dependencies we need to lock into
specific revisions anymore
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2019-09-11 12:07:54 +02:00
Wolfgang Bumiller
f773f5d512
update hyper & h2 to alpha releases on crates.io
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2019-09-06 10:17:36 +02:00
Wolfgang Bumiller
c77563146b
comment fixup
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2019-09-03 11:17:33 +02:00
Wolfgang Bumiller
daef93f481
tools: add tokio::main() replacement
...
to deal with block_on() not allowing blocking()
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2019-09-03 11:16:30 +02:00
Wolfgang Bumiller
66fbf5bad0
add WrappedReaderStream test
...
Mostly to just document the rt.block_on() issue with
blocking().
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2019-09-03 10:05:45 +02:00
Wolfgang Bumiller
32ad03f351
Makefile: fixup: remove references to proxmox-protocol
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2019-09-03 08:58:46 +02:00
Wolfgang Bumiller
2b92971fba
merge fixup
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2019-09-02 15:22:36 +02:00
Wolfgang Bumiller
1424c7d02e
add Cargo.lock
...
because we're currently using alpha releases...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2019-09-02 15:21:56 +02:00
Wolfgang Bumiller
083ff3fd5d
update to tokio 0.2.0-alpha.4
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2019-09-02 15:21:26 +02:00
Wolfgang Bumiller
1434f4f8df
drop hyper_openssl
...
We can use .await now, which means the whole connection
state machine doesn't need to be typed out as "types"
anymore, so, at least until hyper_openssl gets updated to
proper dependencies, let's drop it.
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2019-09-02 15:21:26 +02:00
Wolfgang Bumiller
556eb70ea3
add generic either-or AsyncRead/Write type
...
The HttpsConnector will use this. Instead of implementing a
specialized MaybeTlsStream, this is simply a generic "either
this or that kind of Async Read/Write type".
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2019-09-02 15:21:26 +02:00
Wolfgang Bumiller
b30415d244
src/server/state.rs: update to tokio alpha.2
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2019-09-02 15:21:26 +02:00
Wolfgang Bumiller
aadcf7c621
src/server/rest.rs: use tokio::timer::delay
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2019-09-02 15:21:26 +02:00
Wolfgang Bumiller
968398930d
tests/worker-task-abort.rs: switch to async
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2019-09-02 15:21:26 +02:00
Wolfgang Bumiller
0cdb8d9c5b
src/tools/wrapped_reader_stream.rs: switch to async
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2019-09-02 15:21:26 +02:00
Wolfgang Bumiller
e668912a99
src/tools/futures.rs: switch to async
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2019-09-02 15:21:26 +02:00
Wolfgang Bumiller
0f5856acca
src/tools/daemon.rs: switch to async
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2019-09-02 15:21:26 +02:00
Wolfgang Bumiller
56e351c911
src/tools/broadcast_future.rs: switch to async
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2019-09-02 15:21:26 +02:00
Wolfgang Bumiller
627bb7d114
src/tools/async_mutex.rs: switch to async
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2019-09-02 15:21:26 +02:00
Wolfgang Bumiller
75fef4b463
src/server/worker_task.rs: switch to async
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2019-09-02 15:21:26 +02:00