Wolfgang Bumiller
7d0754a6d2
pxar: fixup 'vanished-file' logic a bit
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2020-06-30 14:41:42 +02:00
Wolfgang Bumiller
5afa0755ea
pxar: fix missing newlines in warnings
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2020-06-30 14:37:20 +02:00
Wolfgang Bumiller
a8e2940ff3
pxar: deal with files changing size during archiving
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2020-06-26 11:49:51 +02:00
Wolfgang Bumiller
c65bc99a41
[chore] bump to using pxar 0.2.0
...
This breaks all previously created pxar archives!
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2020-06-25 09:46:56 +02:00
Wolfgang Bumiller
a6f8728339
update to pxar 0.1.9, update ReadAt implementations
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2020-06-24 11:57:12 +02:00
Wolfgang Bumiller
00c2327564
bump pxar dep to 0.1.8
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2020-06-22 11:10:22 +02:00
Wolfgang Bumiller
c08fac4d69
tools::daemon: sync with child after MainPid message
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2020-06-22 10:58:04 +02:00
Wolfgang Bumiller
c40440092d
tools: add socketpair helper
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2020-06-22 10:49:56 +02:00
Wolfgang Bumiller
dc2ef2b54f
tools::daemon: fetch exe name in the beginning
...
We get the path to our executable via a readlink() on
"/proc/self/exe", which appends a " (deleted)" during
package reloads.
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2020-06-22 10:31:54 +02:00
Wolfgang Bumiller
4e37d9ce67
add general indented_list_to_tree implementation
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2020-06-19 14:37:40 +02:00
Wolfgang Bumiller
e303077132
lru_cache: restrict and annotate Send impl
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2020-06-19 09:37:34 +02:00
Wolfgang Bumiller
8ecd7c9c21
move api dump binaries back to src/bin for package building
...
they're required for docs
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2020-06-16 14:48:01 +02:00
Wolfgang Bumiller
d19c96d507
move test binaries to examples/
...
These aren't installed and are only used for manual testing,
so there's no reason to force them to be built all the time.
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2020-06-16 13:32:24 +02:00
Wolfgang Bumiller
bb59df9134
catalog: don't panic on invalid file mtimes
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2020-06-16 11:25:54 +02:00
Wolfgang Bumiller
2564b0834f
fix file timestamps in catalog
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2020-06-16 11:25:31 +02:00
Wolfgang Bumiller
9321bbd1f5
pxar: fix missing subdirectories in catalogs
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2020-06-16 11:04:56 +02:00
Wolfgang Bumiller
4264e52220
reuse some extractor code in catalog shell
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2020-06-16 10:54:54 +02:00
Wolfgang Bumiller
6988b29bdc
use O_EXCL when creating files during extraction
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2020-06-16 10:33:27 +02:00
Wolfgang Bumiller
98c54240e6
pxar: make extractor state more reusable
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2020-06-16 10:32:13 +02:00
Wolfgang Bumiller
d30c192589
AsyncReadChunk: require Send
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2020-06-16 09:50:29 +02:00
Wolfgang Bumiller
67908b47fa
require pxar 0.1.7
...
fixes some hardlink reading issues in random-accessor
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2020-06-15 10:39:09 +02:00
Wolfgang Bumiller
7a6b549270
dynamic index: make it hard to mess up endianess
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2020-06-15 09:19:35 +02:00
Wolfgang Bumiller
0196b9bf5b
remove unnecessary .into
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2020-06-12 14:57:58 +02:00
Wolfgang Bumiller
57e50fb906
use new Mmap helper for dynamic index
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2020-06-12 13:57:56 +02:00
Wolfgang Bumiller
3136792c95
bump proxmox dep to 0.1.40
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2020-06-12 13:57:35 +02:00
Wolfgang Bumiller
3d571d5509
some internal combinator-influenced api cleanup
...
The download methods used to take the destination by value
and return them again, since this was required when using
combinators before we had `async fn`.
But this is just an ugly left-over now.
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2020-06-12 11:46:42 +02:00
Wolfgang Bumiller
8e6e18b77c
client: make dump_image async, use async chunk reader
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2020-06-12 11:40:18 +02:00
Wolfgang Bumiller
4d16badf6f
add an AsyncReadChunk trait
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2020-06-12 11:38:21 +02:00
Wolfgang Bumiller
a609cf210e
more cleanup
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2020-06-12 11:01:04 +02:00
Wolfgang Bumiller
1498659b4e
cleanup
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2020-06-12 10:59:34 +02:00
Wolfgang Bumiller
4482f3fe11
pxar, acl: cleanup acl helper usage
...
use NixPath for Acl::set_file to avoid memduping the c
string
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2020-06-12 10:52:18 +02:00
Wolfgang Bumiller
cf1bd08131
pxar: fcaps in fuse
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2020-06-12 10:37:48 +02:00
Wolfgang Bumiller
3d68536fc2
pxar: support .pxareclude files, error report updates
...
Report vanished files (instead of erroring out on them),
also only warn about files inaccessible due to permissions
instead of bailing out.
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2020-06-10 12:22:18 +02:00
Wolfgang Bumiller
26e78a2efb
downgrade some FIXMEs to TODOs
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2020-06-10 11:09:23 +02:00
Wolfgang Bumiller
5444fa940b
turn pxar::flags into bitflags, pxar::Flags
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2020-06-10 11:05:53 +02:00
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