Commit Graph

335 Commits

Author SHA1 Message Date
Fabian Grünbichler 88625f2062 cargo: switch to use packaged crates by default
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2020-01-03 09:40:33 +01:00
Fabian Grünbichler 8921d301fb reference valgrind_request via github
to allow using the same Cargo.toml file with a cargo config referencing
packaged crates instead of crates.io

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2020-01-02 13:57:52 +01:00
Fabian Grünbichler 06440889d8 also bump version in Cargo.toml
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2020-01-02 13:33:28 +01:00
Dietmar Maurer 5b32852266 revert Cargo.toml changes from commit f1baa7f4fc 2019-12-22 10:02:15 +01:00
Thomas Lamprecht f1baa7f4fc ui: ds content: add reload button, use view controller
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-12-20 17:17:44 +01:00
Fabian Grünbichler 522df0b9ad Cargo.toml: remove zstd-sys
no need to specify it explicitly, the bindgen feature takes care of this.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2019-12-20 12:55:32 +01:00
Fabian Grünbichler ceced40756 Cargo.toml: update dependencies
to those that are packaged.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2019-12-20 12:55:32 +01:00
Dietmar Maurer 8bf4559b4e update to nix 0.16 2019-12-19 09:29:44 +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 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
Dietmar Maurer e399398444 remove shellwords crate 2019-11-29 12:49:44 +01:00
Dietmar Maurer ca60ac13d9 use rustyline to replace readline 2019-11-29 12:49:44 +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
Dietmar Maurer 552c225948 sort all property lookup tables
Required, because we use binary sreach to find items.
2019-11-21 13:32:09 +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 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 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 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 26c945d3a3 bump zstd-sys version 2019-09-02 11:40:22 +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 170535addd update to nix 0.15
The proxmox crate now needs it.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-08-21 12:26:10 +02:00
Dietmar Maurer e18a6c9ee5 update to nix 0.14, use code from proxmox:tools 2019-08-03 13:05:38 +02:00
Dietmar Maurer c8fc4fec8d Cargo.toml: update to latest hyper version
Which already includes our path.
2019-07-15 13:37:27 +02:00
Dietmar Maurer 6d1f61b208 use hyper/tokio-openssl instead of hyper/tokio-tls
This exposes the complete SSL setup. And download is much faster
now (600MB/s instead of 130MB/s)!
2019-07-02 13:36:28 +02:00
Dietmar Maurer 8fad30a4b1 use latest hyper master branch to include socket buffer size fix 2019-07-02 07:09:46 +02:00
Dietmar Maurer a7f67a9a9c depend on crc32fast
We can use this to compute fast checksums to test file integrity (not crypto safe).
2019-06-21 15:58:00 +02:00
Dietmar Maurer 11515438cc Cargo.toml: use serde feature derive 2019-06-18 06:23:25 +02:00
Wolfgang Bumiller a70b2aeb48 use ssh+git for the proxmox repository
This works for me, note the `ssh://` protocol, and using `/`
to separate the path instead of `:`.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-06-12 13:16:37 +02:00
Dietmar Maurer a207352d68 depend on ../proxmox/proxmox
I was unable to use a git url ...
2019-06-07 17:34:53 +02:00
Wolfgang Bumiller e3975c2c47 bump zstd-sys version
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-06-05 09:44:43 +02:00
Dietmar Maurer 5e0f305142 src/api_schema/format.rs: depend on textwrap, new wrap_text helper 2019-06-04 12:42:02 +02:00
Wolfgang Bumiller 9cdda3f7c7 tools: add helpful vector and read operations
After importing the I/O ops trait via:
    use crate::tools::io::ops::*;

Instead of:
    let mut buffer = vec![0u8; 65536];
    file.read_exact(&mut buffer)?;
use:
    let buffer = file.read_exact_allocated(65536)?;

After importing the vector helpers via:
    use crate::tools::vec::{self, ops::*};

For a buffer which *could* be uninitialized but you prefer
zero-initialization anyway for security reasons, instead of:
    let mut buffer = vec![0u8; len];
use:
    let mut buffer = vec::undefined(len);
which zero-initializes, but, if the `valgrind` feature flag
is enabled, marks the vector as having undefined contents,
so reading from it will cause valgrind errors.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-05-23 09:49:10 +02:00
Dietmar Maurer cf639a47de rc/client/http_client.rs: add experimental h2 upgrade code 2019-04-29 11:57:58 +02:00
Dietmar Maurer 152764ec15 src/api2/admin/datastore/h2upload.rs: add test code for http2 2019-04-27 08:57:35 +02:00
Dietmar Maurer 8c3c63fad0 use endian_trait arrays feature 2019-04-23 14:23:36 +02:00
Dietmar Maurer 7a630df709 implement server state/signal handling, depend on tokio-signal 2019-04-08 13:59:07 +02:00
Dietmar Maurer a650f50301 src/tools/process_locker.rs: implement inter-process reader-writer locks 2019-03-22 08:05:51 +01:00
Wolfgang Bumiller b6b012e3c0 add missing mio crate for signalfd
This is what actually provides EventedFd used by tokio.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-03-12 08:05:59 +01:00
Wolfgang Bumiller d04c67b8a9 cargo: patch zstd-sys to use system library
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-03-07 12:18:38 +01:00
Wolfgang Bumiller cd3b9a068f Revert "TEMP: dynamically link against liblz4 for testing"
This reverts commit dc04ce7fe5.
2019-03-07 12:18:38 +01:00
Dietmar Maurer 141f062e08 src/backup/chunk_store.rs: use zstd compression insteadf of lz4
Provides better compressionm rate, and is still fast.
2019-03-07 11:42:59 +01:00
Wolfgang Bumiller dc04ce7fe5 TEMP: dynamically link against liblz4 for testing
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-03-07 08:44:32 +01:00
Wolfgang Bumiller 6716f30bbc add protocol test client
This uses futures for everything which is mostly useful as a
test to see if the protocol crate's non-blocking I/O support
can handle it...

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-03-06 10:26:12 +01:00
Wolfgang Bumiller e2d007f76e api2/admin/datastore: add a backup protocol test api path
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-03-06 10:26:12 +01:00
Dietmar Maurer ba3a60b2a4 src/client/http_client.rs: store/load ticket in xdg runtime dir, depend on crate xdg 2019-03-05 12:56:21 +01:00
Dietmar Maurer 78216a5ab1 src/backup/chunk_store.rs: use lz4 for compression
And depend on lz4 lib now.
2019-02-25 10:00:28 +01:00
Wolfgang Bumiller 1d77b6cf6b update to pam 0.7 (renamed from pam-auth)
It now supports custom conversation methods, so instead of
new() we ask for a default authenticator taking a password
via with_password(). Since the password is now handled by
the now separate conversation handler, `set_credentials()`
is now called on the handler we get via `.get_handler()`.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-02-15 10:34:40 +01:00
Wolfgang Bumiller 4a3f65172c client: use hyper-tls for now
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-02-13 11:03:09 +01:00
Wolfgang Bumiller 0d176f3681 proxy: use TLS via tokio-tls
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-02-04 14:56:07 +01:00
Dietmar Maurer c82bc1a1f9 depend on pam-auth, use pam for root login
Please use username "root@pam" for login via GUI.
2019-02-01 09:30:50 +01:00
Dietmar Maurer 8d04280b29 tools/ticket.rs: add basic ticket support 2019-01-29 12:59:07 +01:00
Dietmar Maurer d96d82736d use crate log and syslog 2019-01-26 10:56:11 +01:00
Dietmar Maurer 7e13b2d67f api2/subscription.rs: add subscription api class 2019-01-22 12:50:19 +01:00
Dietmar Maurer 059ca7c3a1 remove crate tokio-codec (seems to be part of tokio now) 2019-01-20 14:28:06 +01:00
Dietmar Maurer 8e89d9cafe tools/wrapped_reader_stream.rs: use tokio_threadpool::blocking 2019-01-20 10:28:51 +01:00
Dietmar Maurer 832d805cdd use newer versions 2019-01-20 10:06:47 +01:00
Dietmar Maurer 95cea65b04 backup/datastore.rs: list all index files using walkdir crate 2019-01-18 12:24:58 +01:00
Wolfgang Bumiller 40c45a4b98 Cargo.toml: [lib] has no authors/version
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-01-08 12:47:35 +01:00
Dietmar Maurer ad827b3f44 depend on endian_trait 2019-01-07 14:59:33 +01:00
Dietmar Maurer 46b6fbd6ae use external crate siphasher
Because std:#️⃣:SipHasher is deprecated.
2018-12-28 19:50:07 +01:00
Dietmar Maurer 7b2b40a893 use openssl for faster hashing 2018-12-22 14:31:59 +01:00
Dietmar Maurer fe0e04c69c use proxmox-backup as package name 2018-12-20 10:45:14 +01:00
Dietmar Maurer 08481a0b60 impl sweep_used_chunks, first try 2018-12-19 09:51:33 +01:00
Dietmar Maurer 4818c8b6f7 start implementing ImageIndexReader 2018-12-16 14:44:44 +01:00
Dietmar Maurer d13e3745b3 image_index.rs: write header 2018-12-15 17:05:49 +01:00
Dietmar Maurer b6e8dd39aa impl bash completion: first try 2018-12-11 14:21:05 +01:00
Dietmar Maurer 45773720ab depend on nix, use flock
Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
2018-12-07 18:14:07 +01:00
Dietmar Maurer 9393659620 depend on libc 2018-12-07 16:40:35 +01:00
Dietmar Maurer 91a597cc08 depend on rust-crypto 2018-12-07 11:00:34 +01:00
Dietmar Maurer 3c1d7afc42 another way to read files using tokio_codec 2018-11-10 15:12:45 +01:00
Dietmar Maurer 805aec1572 play around with async tasks 2018-11-10 12:06:39 +01:00
Dietmar Maurer b82472c0d2 use futures - first try 2018-11-09 12:14:18 +01:00
Dietmar Maurer d46287e083 implement string regex matcher 2018-11-07 12:35:52 +01:00
Dietmar Maurer 504b359724 another way to initialize the api tree 2018-11-03 10:42:48 +01:00
Dietmar Maurer 763220cefa use edition 2018 (beta)
This is expected to be stable by the end of the year.
2018-11-01 14:42:27 +01:00
Dietmar Maurer d11f14f77d do not use phf 2018-11-01 13:05:45 +01:00
Dietmar Maurer 28e47cea55 start implementing request handler 2018-11-01 11:30:49 +01:00
Dietmar Maurer 886e5ce8f7 split code into several files 2018-10-31 10:42:14 +01:00
Dietmar Maurer 4c488a9dec depend on serde 2018-10-30 14:06:15 +01:00
Dietmar Maurer d6a4ba7192 move code into lib.rs 2018-10-30 10:40:05 +01:00
Dietmar Maurer d8d978ebc4 initial version 2018-10-30 10:04:30 +01:00