]> git.proxmox.com Git - proxmox-backup.git/log
proxmox-backup.git
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>
4 years agosrc/backup/catalog_blob.rs: moved catalog impl. from pxar
Dietmar Maurer [Fri, 16 Aug 2019 10:27:17 +0000 (12:27 +0200)]
src/backup/catalog_blob.rs: moved catalog impl. from pxar

And avoid loading catalog into memory.

4 years agoavoid lifetimes in blob reader/writer
Wolfgang Bumiller [Fri, 16 Aug 2019 07:19:01 +0000 (09:19 +0200)]
avoid lifetimes in blob reader/writer

4 years agosrc/backup/data_blob_reader.rs: fix compiler warning
Dietmar Maurer [Fri, 16 Aug 2019 06:10:39 +0000 (08:10 +0200)]
src/backup/data_blob_reader.rs: fix compiler warning

4 years agosrc/pxar/fuse.rs: fix compiler warnings
Christian Ebner [Wed, 14 Aug 2019 12:33:58 +0000 (14:33 +0200)]
src/pxar/fuse.rs: fix compiler warnings

Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
4 years agosrc/bin/proxmox-backup-client.rs: avoid loading catalog into memory
Dietmar Maurer [Wed, 14 Aug 2019 13:07:28 +0000 (15:07 +0200)]
src/bin/proxmox-backup-client.rs: avoid loading catalog into memory

We can use the new DataBlobReader instead.

4 years agosrc/backup/data_blob_reader.rs: impl for Read instead of BufRead
Dietmar Maurer [Wed, 14 Aug 2019 12:55:22 +0000 (14:55 +0200)]
src/backup/data_blob_reader.rs: impl for Read instead of BufRead

4 years agoimprove docs
Dietmar Maurer [Wed, 14 Aug 2019 12:08:27 +0000 (14:08 +0200)]
improve docs

4 years agosrc/backup/data_blob.rs: move parts into single files
Dietmar Maurer [Wed, 14 Aug 2019 11:05:11 +0000 (13:05 +0200)]
src/backup/data_blob.rs: move parts into single files

4 years agosrc/backup/data_blob.rs: avoid excessive stack usage
Dietmar Maurer [Wed, 14 Aug 2019 10:43:36 +0000 (12:43 +0200)]
src/backup/data_blob.rs: avoid excessive stack usage

4 years agosrc/backup/file_formats.rs: moved header_size
Dietmar Maurer [Wed, 14 Aug 2019 10:35:53 +0000 (12:35 +0200)]
src/backup/file_formats.rs: moved header_size

4 years agosrc/pxar/fuse.rs: enable libfuse debug output in verbose mode
Christian Ebner [Tue, 13 Aug 2019 13:37:47 +0000 (15:37 +0200)]
src/pxar/fuse.rs: enable libfuse debug output in verbose mode

Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
4 years agosrc/pxar/fuse.rs: cleanup callback interface and store decoder within session context
Christian Ebner [Tue, 13 Aug 2019 13:37:46 +0000 (15:37 +0200)]
src/pxar/fuse.rs: cleanup callback interface and store decoder within session context

Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
4 years agopxar: decoder: take ownership of underlying reader
Christian Ebner [Tue, 13 Aug 2019 12:50:13 +0000 (14:50 +0200)]
pxar: decoder: take ownership of underlying reader

By taking ownership it is easier to move the decoder into another struct,
e.g. into a session context in fuse.

Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
4 years agosrc/pxar/decoder.rs: cleanup s/CaDirectoryEntry/DirectoryEntry
Christian Ebner [Tue, 13 Aug 2019 12:50:12 +0000 (14:50 +0200)]
src/pxar/decoder.rs: cleanup s/CaDirectoryEntry/DirectoryEntry

Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
4 years agotests/blob_writer.rs: avoid stack overflow, simplify tests
Dietmar Maurer [Tue, 13 Aug 2019 16:10:38 +0000 (18:10 +0200)]
tests/blob_writer.rs: avoid stack overflow, simplify tests

4 years agosrc/backup/data_blob.rs - CryptReader/CryptWriter: fix buffer size handling
Dietmar Maurer [Tue, 13 Aug 2019 13:23:15 +0000 (15:23 +0200)]
src/backup/data_blob.rs - CryptReader/CryptWriter: fix buffer size handling

4 years agosrc/backup/data_blob.rs - DataBlobReader: impl compressed, encrypted blobs
Dietmar Maurer [Tue, 13 Aug 2019 11:16:14 +0000 (13:16 +0200)]
src/backup/data_blob.rs - DataBlobReader: impl compressed, encrypted blobs

4 years agosrc/backup/data_blob.rs - DataBlobReader: implement reader for encrtypted blobs
Dietmar Maurer [Tue, 13 Aug 2019 11:07:13 +0000 (13:07 +0200)]
src/backup/data_blob.rs - DataBlobReader: implement reader for encrtypted blobs

4 years agod/control: depend on libfuse3-dev
Wolfgang Bumiller [Tue, 13 Aug 2019 10:29:00 +0000 (12:29 +0200)]
d/control: depend on libfuse3-dev

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
4 years agowhitespace fixup
Wolfgang Bumiller [Tue, 13 Aug 2019 10:28:05 +0000 (12:28 +0200)]
whitespace fixup

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
4 years agosrc/backup/data_blob.rs - DataBlobReader: impl compressed, signed blobs
Dietmar Maurer [Mon, 12 Aug 2019 15:47:25 +0000 (17:47 +0200)]
src/backup/data_blob.rs - DataBlobReader: impl compressed, signed blobs

4 years agosrc/backup/data_blob.rs - DataBlobReader: impl. reader for signed blobs
Dietmar Maurer [Mon, 12 Aug 2019 15:41:25 +0000 (17:41 +0200)]
src/backup/data_blob.rs - DataBlobReader: impl. reader for signed blobs

4 years agosrc/backup/data_blob.rs - DataBlobReader: start serious impl.
Dietmar Maurer [Mon, 12 Aug 2019 15:20:41 +0000 (17:20 +0200)]
src/backup/data_blob.rs - DataBlobReader: start serious impl.

4 years agotests/blob_writer.rs: test DataBlobWriter
Dietmar Maurer [Mon, 12 Aug 2019 10:05:11 +0000 (12:05 +0200)]
tests/blob_writer.rs: test DataBlobWriter

4 years agosrc/backup/data_blob.rs - DataBlobWriter: fix decryption
Dietmar Maurer [Mon, 12 Aug 2019 09:57:29 +0000 (11:57 +0200)]
src/backup/data_blob.rs - DataBlobWriter: fix decryption

4 years agosrc/backup/data_blob.rs - compute_crc: start after blob header
Dietmar Maurer [Mon, 12 Aug 2019 09:32:26 +0000 (11:32 +0200)]
src/backup/data_blob.rs - compute_crc: start after blob header

4 years agosrc/backup/file_formats.rs; use const instzead of static
Dietmar Maurer [Mon, 12 Aug 2019 09:20:21 +0000 (11:20 +0200)]
src/backup/file_formats.rs; use const instzead of static

4 years agosrc/backup/data_blob.rs - DataBlobWriter: fix magic number for uncompressed blobs
Dietmar Maurer [Mon, 12 Aug 2019 08:46:05 +0000 (10:46 +0200)]
src/backup/data_blob.rs - DataBlobWriter: fix magic number for uncompressed blobs

4 years agosrc/backup/data_blob.rs - DataBlobWriter: impl. compressed encrypted blobs
Dietmar Maurer [Mon, 12 Aug 2019 08:16:42 +0000 (10:16 +0200)]
src/backup/data_blob.rs - DataBlobWriter: impl. compressed encrypted blobs

4 years agosrc/backup/data_blob.rs - DataBlobWriter: impl. encrypted blobs
Dietmar Maurer [Mon, 12 Aug 2019 08:08:00 +0000 (10:08 +0200)]
src/backup/data_blob.rs - DataBlobWriter: impl. encrypted blobs

4 years agosrc/backup/crypt_config.rs: new helper data_crypter to get openssl Crypter
Dietmar Maurer [Mon, 12 Aug 2019 08:06:51 +0000 (10:06 +0200)]
src/backup/crypt_config.rs: new helper data_crypter to get openssl Crypter

4 years agosrc/backup/data_blob.rs - DataBlobWriter: impl. compressed signed blobs
Dietmar Maurer [Mon, 12 Aug 2019 07:01:08 +0000 (09:01 +0200)]
src/backup/data_blob.rs - DataBlobWriter: impl. compressed signed blobs

4 years agosrc/backup/data_blob.rs: impl. ChecksumWriter
Dietmar Maurer [Mon, 12 Aug 2019 06:53:53 +0000 (08:53 +0200)]
src/backup/data_blob.rs: impl. ChecksumWriter

To correctly compute crc,hmac of final data.

4 years agosrc/backup/data_blob.rs: impl. DataBlobWriter for authenticated blobs
Dietmar Maurer [Mon, 12 Aug 2019 05:34:41 +0000 (07:34 +0200)]
src/backup/data_blob.rs: impl. DataBlobWriter for authenticated blobs

4 years agosrc/backup/crypt_config.rs: new method to get hmac signer
Dietmar Maurer [Mon, 12 Aug 2019 05:33:15 +0000 (07:33 +0200)]
src/backup/crypt_config.rs: new method to get hmac signer

4 years agosrc/backup/data_blob.rs: make DataBlobWriter more generic
Dietmar Maurer [Sun, 11 Aug 2019 10:07:37 +0000 (12:07 +0200)]
src/backup/data_blob.rs: make DataBlobWriter more generic

Allow to write compressed and uncompressed blobs.

4 years agosrc/backup/data_blob.rs: impl. simple reader/writer
Dietmar Maurer [Sun, 11 Aug 2019 09:32:36 +0000 (11:32 +0200)]
src/backup/data_blob.rs: impl. simple reader/writer

To avoid loading blob into memory.

4 years agosrc/bin/proxmox-backup-client.rs: implement login/logout
Dietmar Maurer [Sat, 10 Aug 2019 07:12:17 +0000 (09:12 +0200)]
src/bin/proxmox-backup-client.rs: implement login/logout

4 years agopxar: add command 'mount' to cli of pxar
Christian Ebner [Thu, 8 Aug 2019 10:49:20 +0000 (12:49 +0200)]
pxar: add command 'mount' to cli of pxar

Allows to mount an archive to a specified mountpoint via the cli.
Once the archive is mounted, the process is send to the background.
By passing the --verbose flag, the process is kept in foreground and
debug output is provided.

Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
4 years agopxar: add fuse module and expose its pub functionality.
Dietmar Maurer [Fri, 9 Aug 2019 14:45:13 +0000 (16:45 +0200)]
pxar: add fuse module and expose its pub functionality.

4 years agopxar: add basic code for FUSE implementation.
Christian Ebner [Thu, 8 Aug 2019 10:49:18 +0000 (12:49 +0200)]
pxar: add basic code for FUSE implementation.

This adds the basic code in order to create a fuse session and mount an archive.
It adds libfuse3-3 as runtime dependency and libfuse3-dev as build dependency.

Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
4 years agosrc/backup/data_blob.rs: define const MAX_BLOB_SIZE
Dietmar Maurer [Fri, 9 Aug 2019 09:49:06 +0000 (11:49 +0200)]
src/backup/data_blob.rs: define const MAX_BLOB_SIZE

4 years agosrc/bin/proxmox-backup-client.rs: implement catalog command
Dietmar Maurer [Fri, 9 Aug 2019 09:34:47 +0000 (11:34 +0200)]
src/bin/proxmox-backup-client.rs: implement catalog command

4 years agosrc/bin/proxmox-backup-client.rs: add archive filename to catalog
Dietmar Maurer [Fri, 9 Aug 2019 09:03:24 +0000 (11:03 +0200)]
src/bin/proxmox-backup-client.rs: add archive filename to catalog

4 years agosrc/backup/data_blob.rs: allow largert blob sizes (128MB)
Dietmar Maurer [Fri, 9 Aug 2019 08:22:56 +0000 (10:22 +0200)]
src/backup/data_blob.rs: allow largert blob sizes (128MB)

Need this for catalog files.

4 years agosrc/bin/proxmox-backup-client.rs: avoid compiler warning
Dietmar Maurer [Fri, 9 Aug 2019 08:22:32 +0000 (10:22 +0200)]
src/bin/proxmox-backup-client.rs: avoid compiler warning

4 years agosrc/bin/proxmox-backup-client.rs: new completion helper for snapshots
Dietmar Maurer [Fri, 9 Aug 2019 08:08:45 +0000 (10:08 +0200)]
src/bin/proxmox-backup-client.rs: new completion helper for snapshots

4 years agosrc/pxar/encoder.rs: use BackupCatalogWriter
Dietmar Maurer [Fri, 9 Aug 2019 07:46:49 +0000 (09:46 +0200)]
src/pxar/encoder.rs: use BackupCatalogWriter

4 years agosrc/pxar/catalog.rs: new catalog helper
Dietmar Maurer [Fri, 9 Aug 2019 06:11:32 +0000 (08:11 +0200)]
src/pxar/catalog.rs: new catalog helper

4 years agosrc/bin/proxmox-backup-client.rs: avoid doubled file extensions (.blob.blob) in index...
Dietmar Maurer [Wed, 7 Aug 2019 08:23:08 +0000 (10:23 +0200)]
src/bin/proxmox-backup-client.rs: avoid doubled file extensions (.blob.blob) in index.json

4 years agoapi: always use complete file names (including add exctensions)
Dietmar Maurer [Wed, 7 Aug 2019 08:10:14 +0000 (10:10 +0200)]
api: always use complete file names (including add exctensions)

4 years agosrc/api2/admin/datastore.rs - list_snapshot_files: list all files
Dietmar Maurer [Wed, 7 Aug 2019 07:16:14 +0000 (09:16 +0200)]
src/api2/admin/datastore.rs - list_snapshot_files: list all files

Add files that are not mentioned in index.json.

4 years agosrc/api2/backup/environment.rs - add_blob: always verify blob crc
Dietmar Maurer [Wed, 7 Aug 2019 07:15:13 +0000 (09:15 +0200)]
src/api2/backup/environment.rs - add_blob: always verify blob crc

4 years agosrc/backup/data_blob.rs - encode: always compute crc
Dietmar Maurer [Wed, 7 Aug 2019 06:29:38 +0000 (08:29 +0200)]
src/backup/data_blob.rs - encode: always compute crc

4 years agosrc/backup/backup_info.rs: add BackupInfo::new constructor
Dietmar Maurer [Wed, 7 Aug 2019 06:27:52 +0000 (08:27 +0200)]
src/backup/backup_info.rs: add BackupInfo::new constructor

4 years agosrc/bin/proxmox-backup-client.rs: fix remote filename completion
Dietmar Maurer [Wed, 7 Aug 2019 04:48:18 +0000 (06:48 +0200)]
src/bin/proxmox-backup-client.rs: fix remote filename completion

4 years agosrc/client/http_client.rs: compute checksums for chunk streams
Dietmar Maurer [Tue, 6 Aug 2019 10:23:06 +0000 (12:23 +0200)]
src/client/http_client.rs: compute checksums for chunk streams

4 years agosrc/client/http_client.rs: minor code cleanup
Dietmar Maurer [Tue, 6 Aug 2019 09:46:15 +0000 (11:46 +0200)]
src/client/http_client.rs: minor code cleanup

4 years agosrc/backup/data_blob.rs: always compute crc
Dietmar Maurer [Tue, 6 Aug 2019 09:42:14 +0000 (11:42 +0200)]
src/backup/data_blob.rs: always compute crc

4 years agosrc/client/http_client.rs: compute file checksums
Dietmar Maurer [Tue, 6 Aug 2019 09:26:06 +0000 (11:26 +0200)]
src/client/http_client.rs: compute file checksums

4 years agosrc/api2/admin/datastore.rs: extract backup size from index.json
Dietmar Maurer [Tue, 6 Aug 2019 08:56:21 +0000 (10:56 +0200)]
src/api2/admin/datastore.rs: extract backup size from index.json

4 years agopxar: add initial docs for MatchPattern
Christian Ebner [Mon, 5 Aug 2019 12:28:21 +0000 (14:28 +0200)]
pxar: add initial docs for MatchPattern

Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
4 years agopxar: add error handling for MatchPattern::matches_filename()
Christian Ebner [Mon, 5 Aug 2019 12:28:03 +0000 (14:28 +0200)]
pxar: add error handling for MatchPattern::matches_filename()

Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
4 years agosrc/api2/admin/datastore.rs - files: return data from index.json
Dietmar Maurer [Mon, 5 Aug 2019 11:22:19 +0000 (13:22 +0200)]
src/api2/admin/datastore.rs - files: return data from index.json

4 years agotests/worker-task-abort.rs: use proxmox::tools::try_block
Dietmar Maurer [Mon, 5 Aug 2019 08:04:12 +0000 (10:04 +0200)]
tests/worker-task-abort.rs: use proxmox::tools::try_block

4 years agouse new proxmox::tools::nodename
Dietmar Maurer [Sat, 3 Aug 2019 15:06:23 +0000 (17:06 +0200)]
use new proxmox::tools::nodename

4 years agoremove src/tools/common_regex.rs, use proxmox::tools::common_regex instead
Dietmar Maurer [Sat, 3 Aug 2019 14:44:31 +0000 (16:44 +0200)]
remove src/tools/common_regex.rs, use proxmox::tools::common_regex instead

4 years agoremove src/tools/procfs.rs, use proxmox::sys::linux::procfs instead
Dietmar Maurer [Sat, 3 Aug 2019 14:26:44 +0000 (16:26 +0200)]
remove src/tools/procfs.rs, use proxmox::sys::linux::procfs instead

4 years agosrc/tools/vec.rs: remove unused file
Dietmar Maurer [Sat, 3 Aug 2019 14:11:47 +0000 (16:11 +0200)]
src/tools/vec.rs: remove unused file

We already moved that to proxmox::tools

4 years agoupdate to nix 0.14, use code from proxmox:tools
Dietmar Maurer [Sat, 3 Aug 2019 11:05:38 +0000 (13:05 +0200)]
update to nix 0.14, use code from proxmox:tools

4 years agouse new proxmox::sys::linux::magic
Dietmar Maurer [Sat, 3 Aug 2019 07:28:57 +0000 (09:28 +0200)]
use new proxmox::sys::linux::magic

4 years agopxar: remove flag to change digest algorithm
Christian Ebner [Fri, 2 Aug 2019 15:43:25 +0000 (17:43 +0200)]
pxar: remove flag to change digest algorithm

The flag CA_FORMAT_SHA512_256 is used to switch between sha512 and sha256 to
calculate digest in casync.

As we use sha256, we can get rid of this flag for now.

Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
4 years agopxar: cleanup: refactor and rename exclude pattern
Christian Ebner [Fri, 2 Aug 2019 15:02:24 +0000 (17:02 +0200)]
pxar: cleanup: refactor and rename exclude pattern

The original name PxarExcludePattern makes no sense anymore as the patterns are
also used to match filenames during restore of the archive.

Therefore, exclude_pattern.rs is moved to match_pattern.rs and PxarExcludePattern
rename to MatchPattern.
Further, since it makes more sense the MatchTypes are now declared as None,
Positive, Negative, PartialPositive or PartialNegative, as this makes more sense
and seems more readable.
Positive matches are those without '!' prefix, Negatives with '!' prefix.

This makes also the filename matching in the encoder/decoder more intuitive and
the logic was adapted accordingly.

Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
4 years agopxar: cleanup: s/PxarDirBuf/PxarDirStack/g and move dir_buffer.rs to dir_stack.rs
Christian Ebner [Fri, 2 Aug 2019 13:19:36 +0000 (15:19 +0200)]
pxar: cleanup: s/PxarDirBuf/PxarDirStack/g and move dir_buffer.rs to dir_stack.rs

Signed-off-by: Christian Ebner <c.ebner@proxmox.com>