]> git.proxmox.com Git - proxmox-backup.git/log
proxmox-backup.git
4 years agosrc/bin/proxmox-backup-client.rs: verify blob/catlog checksums
Dietmar Maurer [Wed, 4 Sep 2019 06:47:14 +0000 (08:47 +0200)]
src/bin/proxmox-backup-client.rs: verify blob/catlog checksums

4 years agosrc/pxar/sequential_decoder.rs: make functions needed in non-sequential decoder acces...
Christian Ebner [Tue, 3 Sep 2019 12:14:32 +0000 (14:14 +0200)]
src/pxar/sequential_decoder.rs: make functions needed in non-sequential decoder accessible from within crate

Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
4 years agosrc/pxar/format_definitions.rs: move header type in PxarHeader and hash in PxarGoodby...
Christian Ebner [Tue, 3 Sep 2019 12:14:31 +0000 (14:14 +0200)]
src/pxar/format_definitions.rs: move header type in PxarHeader and hash in PxarGoodbyeItem to top of struct

By this it is possible to read and check just the first u64 of the corresponding
structs in order to identify the items.
This is needed for the fuse implementation in order to get entries based on the
archive offset, used as inode.
Directories are referenced by the offset to the goodbye tail while other items
are referenced by the offset of the filename followed by the entry.

Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
4 years agosrc/pxar/fuse.rs: add function to map offset to inode and vice versa
Christian Ebner [Tue, 3 Sep 2019 12:14:30 +0000 (14:14 +0200)]
src/pxar/fuse.rs: add function to map offset to inode and vice versa

Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
4 years agosrc/pxar/decoder.rs: add getter functions to obtain start/end offsets for directories
Christian Ebner [Tue, 3 Sep 2019 12:14:29 +0000 (14:14 +0200)]
src/pxar/decoder.rs: add getter functions to obtain start/end offsets for directories

Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
4 years agosrc/pxar/decoder.rs: rustfmt fixups
Christian Ebner [Tue, 3 Sep 2019 11:17:02 +0000 (13:17 +0200)]
src/pxar/decoder.rs: rustfmt fixups

Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
4 years agosrc/bin/proxmox-backup-client.rs: refactoring of match statement
Christian Ebner [Tue, 3 Sep 2019 14:17:23 +0000 (16:17 +0200)]
src/bin/proxmox-backup-client.rs: refactoring of match statement

Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
4 years agosrc/bin/proxmox-backup-client.rs: code cleanup - factor out some functions
Dietmar Maurer [Tue, 3 Sep 2019 11:31:13 +0000 (13:31 +0200)]
src/bin/proxmox-backup-client.rs: code cleanup - factor out some functions

4 years agosrc/backup.rs: define INDEX_BLOB_NAME here
Dietmar Maurer [Tue, 3 Sep 2019 11:15:44 +0000 (13:15 +0200)]
src/backup.rs: define INDEX_BLOB_NAME here

4 years agosrc/bin/proxmox-backup-client.rs - restore: verify checksums
Dietmar Maurer [Tue, 3 Sep 2019 11:12:16 +0000 (13:12 +0200)]
src/bin/proxmox-backup-client.rs - restore: verify checksums

4 years agosrc/backup/fixed_index.rs: new helper to compute checksum and file size
Dietmar Maurer [Tue, 3 Sep 2019 11:11:45 +0000 (13:11 +0200)]
src/backup/fixed_index.rs: new helper to compute checksum and file size

4 years agosrc/backup/dynamic_index.rs: new helper to compute checksum and file size
Dietmar Maurer [Tue, 3 Sep 2019 11:11:09 +0000 (13:11 +0200)]
src/backup/dynamic_index.rs: new helper to compute checksum and file size

4 years agosrc/client/http_client.rs: fix dynamic index checksum
Dietmar Maurer [Tue, 3 Sep 2019 11:10:18 +0000 (13:10 +0200)]
src/client/http_client.rs: fix dynamic index checksum

4 years agocomment fixup
Wolfgang Bumiller [Tue, 3 Sep 2019 09:17:33 +0000 (11:17 +0200)]
comment fixup

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
4 years agotools: add tokio::main() replacement
Wolfgang Bumiller [Tue, 3 Sep 2019 09:16:29 +0000 (11:16 +0200)]
tools: add tokio::main() replacement

to deal with block_on() not allowing blocking()

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
4 years agoadd WrappedReaderStream test
Wolfgang Bumiller [Tue, 3 Sep 2019 08:05:45 +0000 (10:05 +0200)]
add WrappedReaderStream test

Mostly to just document the rt.block_on() issue with
blocking().

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
4 years agoMakefile: fixup: remove references to proxmox-protocol
Wolfgang Bumiller [Tue, 3 Sep 2019 06:58:46 +0000 (08:58 +0200)]
Makefile: fixup: remove references to proxmox-protocol

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
4 years agomerge fixup
Wolfgang Bumiller [Mon, 2 Sep 2019 13:22:36 +0000 (15:22 +0200)]
merge fixup

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
4 years agoadd Cargo.lock
Wolfgang Bumiller [Mon, 2 Sep 2019 13:17:03 +0000 (15:17 +0200)]
add Cargo.lock

because we're currently using alpha releases...

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
4 years agoupdate to tokio 0.2.0-alpha.4
Wolfgang Bumiller [Mon, 2 Sep 2019 13:16:21 +0000 (15:16 +0200)]
update to tokio 0.2.0-alpha.4

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
4 years agodrop hyper_openssl
Wolfgang Bumiller [Mon, 2 Sep 2019 13:14:55 +0000 (15:14 +0200)]
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>
4 years agoadd generic either-or AsyncRead/Write type
Wolfgang Bumiller [Mon, 2 Sep 2019 13:13:54 +0000 (15:13 +0200)]
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>
4 years agosrc/server/state.rs: update to tokio alpha.2
Wolfgang Bumiller [Mon, 2 Sep 2019 11:04:44 +0000 (13:04 +0200)]
src/server/state.rs: update to tokio alpha.2

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
4 years agosrc/server/rest.rs: use tokio::timer::delay
Wolfgang Bumiller [Mon, 2 Sep 2019 10:40:53 +0000 (12:40 +0200)]
src/server/rest.rs: use tokio::timer::delay

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
4 years agotests/worker-task-abort.rs: switch to async
Wolfgang Bumiller [Thu, 29 Aug 2019 08:05:43 +0000 (10:05 +0200)]
tests/worker-task-abort.rs: switch to async

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
4 years agosrc/tools/wrapped_reader_stream.rs: switch to async
Wolfgang Bumiller [Fri, 23 Aug 2019 11:30:27 +0000 (13:30 +0200)]
src/tools/wrapped_reader_stream.rs: switch to async

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
4 years agosrc/tools/futures.rs: switch to async
Wolfgang Bumiller [Fri, 23 Aug 2019 10:22:15 +0000 (12:22 +0200)]
src/tools/futures.rs: switch to async

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
4 years agosrc/tools/daemon.rs: switch to async
Wolfgang Bumiller [Fri, 23 Aug 2019 11:47:30 +0000 (13:47 +0200)]
src/tools/daemon.rs: switch to async

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
4 years agosrc/tools/broadcast_future.rs: switch to async
Wolfgang Bumiller [Mon, 26 Aug 2019 11:44:00 +0000 (13:44 +0200)]
src/tools/broadcast_future.rs: switch to async

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
4 years agosrc/tools/async_mutex.rs: switch to async
Wolfgang Bumiller [Fri, 23 Aug 2019 10:20:49 +0000 (12:20 +0200)]
src/tools/async_mutex.rs: switch to async

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
4 years agosrc/server/worker_task.rs: switch to async
Wolfgang Bumiller [Tue, 27 Aug 2019 07:18:39 +0000 (09:18 +0200)]
src/server/worker_task.rs: switch to async

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
4 years agosrc/server/state.rs: switch to async
Wolfgang Bumiller [Fri, 23 Aug 2019 11:41:38 +0000 (13:41 +0200)]
src/server/state.rs: switch to async

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
4 years agosrc/server/rest.rs: switch to async
Wolfgang Bumiller [Mon, 26 Aug 2019 11:33:38 +0000 (13:33 +0200)]
src/server/rest.rs: switch to async

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
4 years agosrc/server/h2service.rs: switch to async
Wolfgang Bumiller [Fri, 23 Aug 2019 12:11:14 +0000 (14:11 +0200)]
src/server/h2service.rs: switch to async

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
4 years agosrc/server/command_socket.rs: switch to async
Wolfgang Bumiller [Fri, 23 Aug 2019 13:00:18 +0000 (15:00 +0200)]
src/server/command_socket.rs: switch to async

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
4 years agosrc/client/remote_chunk_reader.rs: switch to async
Wolfgang Bumiller [Mon, 26 Aug 2019 11:40:24 +0000 (13:40 +0200)]
src/client/remote_chunk_reader.rs: switch to async

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
4 years agosrc/client/pxar_backup_stream.rs: switch to async
Wolfgang Bumiller [Fri, 23 Aug 2019 12:36:51 +0000 (14:36 +0200)]
src/client/pxar_backup_stream.rs: switch to async

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
4 years agosrc/client/pipe_to_stream.rs: switch to async
Wolfgang Bumiller [Fri, 23 Aug 2019 11:43:17 +0000 (13:43 +0200)]
src/client/pipe_to_stream.rs: switch to async

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
4 years agosrc/client/merge_known_chunks.rs: switch to async
Wolfgang Bumiller [Fri, 23 Aug 2019 12:31:23 +0000 (14:31 +0200)]
src/client/merge_known_chunks.rs: switch to async

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
4 years agosrc/client/http_client.rs: switch to async
Wolfgang Bumiller [Fri, 23 Aug 2019 12:33:48 +0000 (14:33 +0200)]
src/client/http_client.rs: switch to async

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
4 years agosrc/bin/upload-speed.rs: switch to async
Wolfgang Bumiller [Thu, 29 Aug 2019 07:58:20 +0000 (09:58 +0200)]
src/bin/upload-speed.rs: switch to async

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
4 years agosrc/bin/test_chunk_speed2.rs: switch to async
Wolfgang Bumiller [Thu, 29 Aug 2019 07:55:49 +0000 (09:55 +0200)]
src/bin/test_chunk_speed2.rs: switch to async

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
4 years agosrc/bin/proxmox-backup-proxy.rs: switch to async
Wolfgang Bumiller [Thu, 29 Aug 2019 07:45:34 +0000 (09:45 +0200)]
src/bin/proxmox-backup-proxy.rs: switch to async

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
4 years agosrc/bin/proxmox-backup-client.rs: switch to async
Wolfgang Bumiller [Wed, 28 Aug 2019 15:20:32 +0000 (17:20 +0200)]
src/bin/proxmox-backup-client.rs: switch to async

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
4 years agosrc/bin/proxmox-backup-api.rs: switch to async
Wolfgang Bumiller [Wed, 28 Aug 2019 14:11:01 +0000 (16:11 +0200)]
src/bin/proxmox-backup-api.rs: switch to async

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
4 years agosrc/bin/h2s-server.rs: switch to async
Wolfgang Bumiller [Wed, 28 Aug 2019 14:01:10 +0000 (16:01 +0200)]
src/bin/h2s-server.rs: switch to async

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
4 years agosrc/bin/h2server.rs: switch to async
Wolfgang Bumiller [Wed, 28 Aug 2019 13:50:40 +0000 (15:50 +0200)]
src/bin/h2server.rs: switch to async

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
4 years agosrc/bin/h2s-client.rs: switch to async
Wolfgang Bumiller [Wed, 28 Aug 2019 13:05:45 +0000 (15:05 +0200)]
src/bin/h2s-client.rs: switch to async

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
4 years agosrc/bin/h2client.rs: switch to async
Wolfgang Bumiller [Wed, 28 Aug 2019 13:37:57 +0000 (15:37 +0200)]
src/bin/h2client.rs: switch to async

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
4 years agosrc/bin/download-speed.rs: switch to async
Wolfgang Bumiller [Wed, 28 Aug 2019 13:30:25 +0000 (15:30 +0200)]
src/bin/download-speed.rs: switch to async

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
4 years agosrc/backup/index.rs: switch to async
Wolfgang Bumiller [Fri, 23 Aug 2019 12:20:18 +0000 (14:20 +0200)]
src/backup/index.rs: switch to async

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
4 years agosrc/backup/chunk_stream.rs: switch to async
Wolfgang Bumiller [Fri, 23 Aug 2019 11:41:30 +0000 (13:41 +0200)]
src/backup/chunk_stream.rs: switch to async

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
4 years agosrc/api_schema/router.rs: switch to async
Wolfgang Bumiller [Mon, 26 Aug 2019 11:44:54 +0000 (13:44 +0200)]
src/api_schema/router.rs: switch to async

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
4 years agosrc/api2/reader.rs: switch to async
Wolfgang Bumiller [Tue, 27 Aug 2019 11:55:41 +0000 (13:55 +0200)]
src/api2/reader.rs: switch to async

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
4 years agosrc/api2/backup/upload_chunk.rs: switch to async
Wolfgang Bumiller [Fri, 23 Aug 2019 11:44:13 +0000 (13:44 +0200)]
src/api2/backup/upload_chunk.rs: switch to async

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
4 years agosrc/api2/backup.rs: switch to async
Wolfgang Bumiller [Wed, 28 Aug 2019 07:58:39 +0000 (09:58 +0200)]
src/api2/backup.rs: switch to async

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
4 years agosrc/api2/admin/datastore.rs: switch to async
Wolfgang Bumiller [Tue, 27 Aug 2019 11:54:50 +0000 (13:54 +0200)]
src/api2/admin/datastore.rs: switch to async

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
4 years agoimplement Sync for DynamicIndexReader and FixedIndexReader
Wolfgang Bumiller [Wed, 28 Aug 2019 08:33:41 +0000 (10:33 +0200)]
implement Sync for DynamicIndexReader and FixedIndexReader

hyper's wrap_stream now needs this

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
4 years agodrop src/storage/futures.rs
Wolfgang Bumiller [Fri, 23 Aug 2019 12:22:25 +0000 (14:22 +0200)]
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>
4 years agoswitch to futures 0.3
Wolfgang Bumiller [Fri, 23 Aug 2019 10:20:33 +0000 (12:20 +0200)]
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>
4 years agorc/bin/proxmox-backup-client.rs - restore: always download index.json.blob
Dietmar Maurer [Mon, 2 Sep 2019 12:14:32 +0000 (14:14 +0200)]
rc/bin/proxmox-backup-client.rs - restore: always download index.json.blob

4 years agosrc/bin/proxmox-backup-client.rs - reatore: avoid loading (large) blobs into memory
Dietmar Maurer [Mon, 2 Sep 2019 12:13:31 +0000 (14:13 +0200)]
src/bin/proxmox-backup-client.rs - reatore: avoid loading (large) blobs into memory

4 years agobump zstd-sys version
Dietmar Maurer [Mon, 2 Sep 2019 09:40:22 +0000 (11:40 +0200)]
bump zstd-sys version

4 years agosrc/client/http_client.rs: Refactor handling Option and Result types
Christian Ebner [Wed, 28 Aug 2019 14:03:48 +0000 (16:03 +0200)]
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>
4 years agotools: remove SignalFd
Wolfgang Bumiller [Fri, 23 Aug 2019 11:44:52 +0000 (13:44 +0200)]
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>
4 years agobackup/dynamic_index: explicitly zero-initialize the header
Wolfgang Bumiller [Fri, 23 Aug 2019 09:39:53 +0000 (11:39 +0200)]
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>
4 years agobackup/dynamic_index: use static assertion, fix size
Wolfgang Bumiller [Fri, 23 Aug 2019 09:38:16 +0000 (11:38 +0200)]
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>
4 years agopxar/fuse: add pxar cli flag to set single- or multi-threaded session loop
Christian Ebner [Thu, 22 Aug 2019 14:39:04 +0000 (16:39 +0200)]
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>
4 years agosrc/pxar/sequentail_decoder.rs: followup: cleanup S_IFMT masking
Christian Ebner [Thu, 22 Aug 2019 13:36:26 +0000 (15:36 +0200)]
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>
4 years agosrc/pxar/sequential_decoder.rs: style fixups
Christian Ebner [Thu, 22 Aug 2019 13:36:25 +0000 (15:36 +0200)]
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>
4 years agosrc/pxar/dir_stack.rs: style fixups
Christian Ebner [Thu, 22 Aug 2019 13:00:02 +0000 (15:00 +0200)]
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>
4 years agosrc/pxar/fuse.rs: style fixups
Christian Ebner [Thu, 22 Aug 2019 12:46:23 +0000 (14:46 +0200)]
src/pxar/fuse.rs: style fixups

Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
4 years agosrc/pxar/match_pattern.rs: style fixups
Christian Ebner [Thu, 22 Aug 2019 12:46:22 +0000 (14:46 +0200)]
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>
4 years agosrc/pxar/format_definition.rs: style fixup
Christian Ebner [Thu, 22 Aug 2019 12:46:21 +0000 (14:46 +0200)]
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>
4 years agoremove proxmox-protocol subcrate
Wolfgang Bumiller [Thu, 22 Aug 2019 12:03:43 +0000 (14:03 +0200)]
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>
4 years agomore formatting & use statement fixups
Wolfgang Bumiller [Thu, 22 Aug 2019 11:46:31 +0000 (13:46 +0200)]
more formatting & use statement fixups

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
4 years agoimport rustfmt.toml
Wolfgang Bumiller [Thu, 22 Aug 2019 11:44:57 +0000 (13:44 +0200)]
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>
4 years agosrc/pxar/encoder.rs: style fixups by rustfmt
Christian Ebner [Thu, 22 Aug 2019 10:49:07 +0000 (12:49 +0200)]
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>
4 years ago(pxar: replace deprecated std::mem::uninitialized()
Christian Ebner [Thu, 22 Aug 2019 10:49:06 +0000 (12:49 +0200)]
(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>
4 years ago{dynamic,fixed}_index: replace mem::uninitialized
Wolfgang Bumiller [Thu, 22 Aug 2019 09:35:35 +0000 (11:35 +0200)]
{dynamic,fixed}_index: replace mem::uninitialized

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
4 years agosrc/backup/index: style fixup & unsafe copy removal
Wolfgang Bumiller [Thu, 22 Aug 2019 09:30:23 +0000 (11:30 +0200)]
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>
4 years agosrc/backup/index: replace mem::uninitialized
Wolfgang Bumiller [Thu, 22 Aug 2019 09:24:15 +0000 (11:24 +0200)]
src/backup/index: replace mem::uninitialized

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
4 years agoapi2/node/time: replace mem::uninitialized
Wolfgang Bumiller [Thu, 22 Aug 2019 09:14:01 +0000 (11:14 +0200)]
api2/node/time: replace mem::uninitialized

and fixup use statements

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
4 years agotools: tty: replace mem::uninitialized and style fixup
Wolfgang Bumiller [Thu, 22 Aug 2019 09:09:43 +0000 (11:09 +0200)]
tools: tty: replace mem::uninitialized and style fixup

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
4 years agotools: timer: style fixup
Wolfgang Bumiller [Thu, 22 Aug 2019 09:07:56 +0000 (11:07 +0200)]
tools: timer: style fixup

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
4 years agotimer: replace mem::uninitialized
Wolfgang Bumiller [Thu, 22 Aug 2019 09:07:10 +0000 (11:07 +0200)]
timer: replace mem::uninitialized

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
4 years agotools: style & use statement fixups
Wolfgang Bumiller [Thu, 22 Aug 2019 08:57:56 +0000 (10:57 +0200)]
tools: style & use statement fixups

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
4 years agosrc/config: more style fixups
Wolfgang Bumiller [Wed, 21 Aug 2019 12:14:00 +0000 (14:14 +0200)]
src/config: more style fixups

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
4 years agosrc/config: style fixup
Wolfgang Bumiller [Wed, 21 Aug 2019 12:11:07 +0000 (14:11 +0200)]
src/config: style fixup

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
4 years agosrc/config: use statement cleanup
Wolfgang Bumiller [Wed, 21 Aug 2019 12:09:27 +0000 (14:09 +0200)]
src/config: use statement cleanup

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
4 years ago/var/run -> /run
Wolfgang Bumiller [Wed, 21 Aug 2019 10:28:24 +0000 (12:28 +0200)]
/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>
4 years agodisable offensive test
Wolfgang Bumiller [Wed, 21 Aug 2019 10:27:10 +0000 (12:27 +0200)]
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>
4 years agobuildsys: defer some variable expansions
Wolfgang Bumiller [Wed, 21 Aug 2019 10:22:35 +0000 (12:22 +0200)]
buildsys: defer some variable expansions

So that local.mak needs to only contain a PREFIX.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
4 years agoswitch from create_dir_chown to create_path
Wolfgang Bumiller [Wed, 21 Aug 2019 10:21:56 +0000 (12:21 +0200)]
switch from create_dir_chown to create_path

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
4 years agoupdate to nix 0.15
Wolfgang Bumiller [Wed, 21 Aug 2019 10:25:49 +0000 (12:25 +0200)]
update to nix 0.15

The proxmox crate now needs it.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
4 years ago.gitignore: add local.mak
Wolfgang Bumiller [Wed, 21 Aug 2019 08:07:15 +0000 (10:07 +0200)]
.gitignore: add local.mak

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
4 years agopxar/decoder: avoid failing on hardlinks and return corresponding target file entry
Christian Ebner [Tue, 20 Aug 2019 11:40:19 +0000 (13:40 +0200)]
pxar/decoder: avoid failing on hardlinks and return corresponding target file entry

Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
[Fixup: remove unnecessary 'mut']
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
4 years agosrc/pxar/decoder.rs: get correct stats for root directory
Christian Ebner [Tue, 20 Aug 2019 11:40:18 +0000 (13:40 +0200)]
src/pxar/decoder.rs: get correct stats for root directory

Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
4 years agosrc/pxar/decoder.rs: move GOODBYE_ITEM_SIZE from function to module scope.
Christian Ebner [Tue, 20 Aug 2019 11:40:17 +0000 (13:40 +0200)]
src/pxar/decoder.rs: move GOODBYE_ITEM_SIZE from function to module scope.

Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
4 years agouse statement cleanup
Wolfgang Bumiller [Tue, 13 Aug 2019 10:59:03 +0000 (12:59 +0200)]
use statement cleanup

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>