Commit Graph

5689 Commits

Author SHA1 Message Date
Wolfgang Bumiller e9722f8bde src/bin/proxmox-backup-client.rs: switch to async
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-09-02 15:21:26 +02:00
Wolfgang Bumiller e76ac3a499 src/bin/proxmox-backup-api.rs: switch to async
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-09-02 15:17:58 +02:00
Wolfgang Bumiller e235c8f719 src/bin/h2s-server.rs: switch to async
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-09-02 15:17:58 +02:00
Wolfgang Bumiller 74be6dc9b7 src/bin/h2server.rs: switch to async
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-09-02 15:17:58 +02:00
Wolfgang Bumiller 55d8a631fc src/bin/h2s-client.rs: switch to async
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-09-02 15:17:58 +02:00
Wolfgang Bumiller 15d0e4a3bd src/bin/h2client.rs: switch to async
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-09-02 15:17:58 +02:00
Wolfgang Bumiller b9203d87f4 src/bin/download-speed.rs: switch to async
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-09-02 15:17:58 +02:00
Wolfgang Bumiller 745e652a7f src/backup/index.rs: switch to async
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-09-02 15:17:58 +02:00
Wolfgang Bumiller 32bef1e2d1 src/backup/chunk_stream.rs: switch to async
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-09-02 15:17:58 +02:00
Wolfgang Bumiller f2d9b73c91 src/api_schema/router.rs: switch to async
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-09-02 15:17:58 +02:00
Wolfgang Bumiller ffb6434485 src/api2/reader.rs: switch to async
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-09-02 15:17:58 +02:00
Wolfgang Bumiller 7622005574 src/api2/backup/upload_chunk.rs: switch to async
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-09-02 15:17:58 +02:00
Wolfgang Bumiller 59b2baa0f6 src/api2/backup.rs: switch to async
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-09-02 15:17:58 +02:00
Wolfgang Bumiller 6be147b78c src/api2/admin/datastore.rs: switch to async
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-09-02 15:17:58 +02:00
Wolfgang Bumiller 5c1130df9f implement Sync for DynamicIndexReader and FixedIndexReader
hyper's wrap_stream now needs this

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-09-02 15:17:58 +02:00
Wolfgang Bumiller 236761a3e6 drop src/storage/futures.rs
it's unused and uses a tokio::Task I don't want to lookup
the std-future conversion for...

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-09-02 15:17:58 +02:00
Wolfgang Bumiller 43597bf30b switch to futures 0.3
* cleanup Cargo.toml
* pull in tower_service (required for newer hyper)
* use local hyper-openssl fixup (its Cargo.toml has broken
  outdated dependencies)
* add pin-utils dependency

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-09-02 15:17:58 +02:00
Dietmar Maurer 02fcf372e4 rc/bin/proxmox-backup-client.rs - restore: always download index.json.blob 2019-09-02 14:14:32 +02:00
Dietmar Maurer 0d9862803b src/bin/proxmox-backup-client.rs - reatore: avoid loading (large) blobs into memory 2019-09-02 14:13:31 +02:00
Dietmar Maurer 26c945d3a3 bump zstd-sys version 2019-09-02 11:40:22 +02:00
Christian Ebner 66c8eb9383 src/client/http_client.rs: Refactor handling Option and Result types
Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-08-29 09:15:16 +02:00
Wolfgang Bumiller 40f8680e37 tools: remove SignalFd
We don't use it anymore and it'll just be more work when
switching to async-await.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-08-23 13:44:53 +02:00
Wolfgang Bumiller d21f8a5b5b backup/dynamic_index: explicitly zero-initialize the header
The writer.write_all() call accessed data marked as
undefined to valgrind. Note that we shouldn't write out
uninitialized memory for security reasons anyway.
(note that vec::undefined already did zero-initialize the
data, but also marked it as undefined for valgrind when
compiling with the valgrind feature)

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-08-23 11:42:35 +02:00
Wolfgang Bumiller 990b930f22 backup/dynamic_index: use static assertion, fix size
The type was sized properly but the number was still wrong,
fixed this.
TODO! Once unions with non-Copy values are stable make this
a `union { full: [u8; 4096], data: TheActualHeader }`;

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-08-23 11:42:35 +02:00
Christian Ebner bcb664cb69 pxar/fuse: add pxar cli flag to set single- or multi-threaded session loop
Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-08-23 09:43:14 +02:00
Christian Ebner de2791868a src/pxar/sequentail_decoder.rs: followup: cleanup S_IFMT masking
Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-08-23 09:42:22 +02:00
Christian Ebner 9cb9e1b7db src/pxar/sequential_decoder.rs: style fixups
Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-08-23 09:42:19 +02:00
Christian Ebner dac88033ba src/pxar/dir_stack.rs: style fixups
Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-08-23 09:39:14 +02:00
Christian Ebner b69169e7be src/pxar/fuse.rs: style fixups
Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-08-23 09:37:58 +02:00
Christian Ebner d792dc3cd2 src/pxar/match_pattern.rs: style fixups
Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-08-23 09:37:56 +02:00
Christian Ebner 4ea22b68d9 src/pxar/format_definition.rs: style fixup
Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-08-23 09:37:53 +02:00
Wolfgang Bumiller 7d83440c60 remove proxmox-protocol subcrate
AFAICT we have no use for it anymore, its api entry points
are gone. If we do end up needing something from it, it's
still in the git history anyway. (And about two thirds of it
can be made much less awkward by utilizing async-await
anyway, so no love lost there...)

Moved the chunker back into src/backup/chunker.rs

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-08-22 14:08:25 +02:00
Wolfgang Bumiller 7a57cb77e1 more formatting & use statement fixups
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-08-22 13:50:27 +02:00
Wolfgang Bumiller 89ceb33f89 import rustfmt.toml
This just sets edition to 2018.
Unfortunately pretty much all other configuration options
are considered unstable for now ...

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-08-22 13:44:57 +02:00
Christian Ebner 35dfd3ceb7 src/pxar/encoder.rs: style fixups by rustfmt
Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-08-22 13:29:11 +02:00
Christian Ebner 1af30bc2fe (pxar: replace deprecated std::mem::uninitialized()
... and use std::mem::MaybeUninit or proxmox::tools::vec::uninitialized() instead.

Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-08-22 13:27:25 +02:00
Wolfgang Bumiller 5e58e1bb7d {dynamic,fixed}_index: replace mem::uninitialized
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-08-22 11:35:36 +02:00
Wolfgang Bumiller f93b55b057 src/backup/index: style fixup & unsafe copy removal
We can use the safe .copy_from_slice alternative in this
case.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-08-22 11:31:45 +02:00
Wolfgang Bumiller fa17b1ce2a src/backup/index: replace mem::uninitialized
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-08-22 11:27:35 +02:00
Wolfgang Bumiller f3a8d1d7e0 api2/node/time: replace mem::uninitialized
and fixup use statements

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-08-22 11:14:41 +02:00
Wolfgang Bumiller 48b85e8e3b tools: tty: replace mem::uninitialized and style fixup
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-08-22 11:14:19 +02:00
Wolfgang Bumiller b528fddfc6 tools: timer: style fixup
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-08-22 11:07:56 +02:00
Wolfgang Bumiller b7f44ace92 timer: replace mem::uninitialized
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-08-22 11:07:10 +02:00
Wolfgang Bumiller 6100071f4e tools: style & use statement fixups
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-08-22 10:57:56 +02:00
Wolfgang Bumiller 5c20e2da6b src/config: more style fixups
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-08-21 14:14:26 +02:00
Wolfgang Bumiller 91640ab567 src/config: style fixup
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-08-21 14:11:07 +02:00
Wolfgang Bumiller 928650c4eb src/config: use statement cleanup
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-08-21 14:10:50 +02:00
Wolfgang Bumiller 2ec979e4ed /var/run -> /run
/var/run is considered deprecated and for instance in
systemd unit files lintian complains...

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-08-21 12:28:24 +02:00
Wolfgang Bumiller 132ba10011 disable offensive test
Tests we run with `make test` should not require root
privileges or write to system paths! This one does both!

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-08-21 12:27:50 +02:00
Wolfgang Bumiller 1ce9eda632 buildsys: defer some variable expansions
So that local.mak needs to only contain a PREFIX.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-08-21 12:26:10 +02:00