5
0
mirror of git://git.proxmox.com/git/pxar.git synced 2024-12-22 21:33:50 +03:00
Commit Graph

220 Commits

Author SHA1 Message Date
Wolfgang Bumiller
609e3a633f use #![deny(unsafe_op_in_unsafe_fn)]
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-11-12 13:52:17 +01:00
Wolfgang Bumiller
04eccc8e53 buildbot.yml: remove tokio+fs dep
it's provided by the tokio main package and we have an old
real package around which causes buildbot issues

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-10-05 09:31:01 +02:00
Wolfgang Bumiller
2d8f513a21 add back .buildbot.yml
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-10-04 15:29:46 +02:00
Wolfgang Bumiller
8184367000 bump d/control
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-10-04 15:07:54 +02:00
Wolfgang Bumiller
1a2a5570b1 fix deprecated use of std::u64 modules
MAX values in these modules are replaced by associated
constants in the integer types

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-10-04 15:00:44 +02:00
Wolfgang Bumiller
e5a2495ed3 add more code documentation
all but the `format` module are now #![deny(missing_docs)]

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-05-17 14:09:19 +02:00
Wolfgang Bumiller
5d4e59c52c make the ReadAtImpl enum variants private
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-05-17 14:09:19 +02:00
Wolfgang Bumiller
71194b54e4 ditch anyhow crate in examples/tests
mostly to shutup our current buildbot tests

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-05-17 11:46:53 +02:00
Wolfgang Bumiller
d4a04d53c9 some clippy fixes
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-05-07 11:57:28 +02:00
Wolfgang Bumiller
b203d38bcd bump version to 0.10.1-1
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-03-31 13:56:22 +02:00
Wolfgang Bumiller
07265b3e37 rustfmt
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-03-31 13:54:18 +02:00
Stefan Reiter
8a9c71c035 decoder/aio: add contents() and content_size() calls
Returns a decoder::Contents without a wrapper type, since in this case
we don't want to hide the SeqRead implementation (as done in
decoder::sync). For conviencience also implement AsyncRead if "tokio-io"
is enabled.

Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
2021-03-31 13:52:24 +02:00
Wolfgang Bumiller
eae6dc06af rustfmt
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-03-31 13:52:09 +02:00
Wolfgang Bumiller
e827b69a60 encoder: only flush owned outputs in 'finish'
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-03-31 13:51:46 +02:00
Dominik Csapak
d995b5319d encoder: flush after writing last entry
some writers may need to be flushed to write out all data

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2021-03-25 07:31:16 +01:00
Wolfgang Bumiller
737f75cf97 rustfmt
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-03-12 10:42:14 +01:00
Wolfgang Bumiller
64f8857c70 bump version to 0.10.0-1
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-03-12 10:38:34 +01:00
Wolfgang Bumiller
180186c567 explicitly pad StatxTimestamp with zeros
otherwise we can have random data in there

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-03-12 10:34:55 +01:00
Wolfgang Bumiller
6e24d08a08 update d/control
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-02-17 09:55:26 +01:00
Wolfgang Bumiller
82608859c8 bump version to 0.9.0-1
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-02-17 09:54:38 +01:00
Wolfgang Bumiller
b8d79e5fc7 add EncoderOutput::to_borrowed()
may more "explicit" than using `.as_mut().into()`, but
otherwise just seems like a useful addition to show the
lifetime constraints on this

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-02-17 09:51:38 +01:00
Wolfgang Bumiller
f904859816 revert Send requirement from previous patch
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-02-17 09:23:37 +01:00
Stefan Reiter
d84024338a make aio::Encoder actually behave with async
To really use the encoder with async/await, it needs to support
SeqWrite implementations that are Send. This requires changing a whole
bunch of '&mut dyn SeqWrite' trait objects to instead take a 'T:
SeqWrite' generic parameter directly instead. Most of this is quite
straightforward, though incurs a lot of churn (FileImpl needs a generic
parameter now for example).

The trickiest part is returning a new Encoder instance in
create_directory, as the trait object trick with
SeqWrite::as_trait_object doesn't work if SeqWrite is implemented for
generic '&mut S'.

Instead, work with the generic object directly, and express the
owned/borrowed state in the Encoder (to avoid nested borrowing) as an
enum EncoderOutput.

Add to the aio test to ensure the Encoder is now actually useable.

Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-02-17 09:20:40 +01:00
Wolfgang Bumiller
8bff2f7c7e cargo fmt
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-02-02 10:54:36 +01:00
Wolfgang Bumiller
574cfa09bc make Send test not depend on tokio
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-02-02 10:54:11 +01:00
Wolfgang Bumiller
f4b103697a bump version to 0.8.0-1
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-02-02 10:50:22 +01:00
Wolfgang Bumiller
a08b84b79b fix Encoder to be Send + Sync
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-02-02 10:47:56 +01:00
Fabian Grünbichler
326b6a103e debcargo: fix maintainer directive
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2021-02-01 11:21:17 +01:00
Wolfgang Bumiller
03d1f3f2c4 drop futures dependency
we're not actually using it anymore now

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-01-15 14:59:30 +01:00
Wolfgang Bumiller
ae14f6c072 typo fix: this was supposed to be from_tokio
it's on `tokio-io` after all and there previously used to be
a `form_futures` for the `Async*` traits from `futures`

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-01-15 14:42:31 +01:00
Wolfgang Bumiller
1646a72d3f clippy fixups
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-01-15 14:24:50 +01:00
Thomas Lamprecht
6b0a82f8ae move extra build-dependencies from .builtbot.yml to d/control
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-01-15 10:08:50 +01:00
Thomas Lamprecht
5a3454e8ca add futures to builbot.yml
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-01-14 16:45:57 +01:00
Thomas Lamprecht
d48ed56b48 update builbot.yml for tokio 1.0
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-01-14 16:30:57 +01:00
Fabian Grünbichler
5db2e175b2 bump version to 0.7.0-1
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2021-01-14 15:26:40 +01:00
Fabian Grünbichler
43c585cd83 build: fix --no-default-features
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2021-01-14 15:26:16 +01:00
Wolfgang Bumiller
a5b958d10c fix example
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-01-13 10:58:15 +01:00
Fabian Grünbichler
7aee9c1f6b remove futures-io feature
we don't use it, and it adds unnecessary duplication/complexity.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2021-01-12 11:35:39 +01:00
Fabian Grünbichler
8de202d4c4 clippy: use matches! instead of match
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2021-01-11 14:48:15 +01:00
Fabian Grünbichler
6e02c1221c update to tokio 1.0
unfortunately, futures::io::AsyncRead and tokio::io::AsyncRead no longer
share a do_poll_read signature, so we need to adapt one to the other
(and also no longer generate some wrapper implementations via macro).

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2020-12-29 13:58:38 +01:00
Wolfgang Bumiller
379043a0b9 bump version to 0.6.2-1
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-12-15 13:12:01 +01:00
Wolfgang Bumiller
318462ea3d fix decode_entry on special files
When using the random accessor to access FIFOs or sockets,
the ranged reader limits the data to only that entry, and
the `decode_entry` will never see a `PAYLOAD` or
`GOODBYE_TABLE` item to finish the entry.
Instead, it'll reach EOF and we need to handle this.
The accessor now tells the decoder to expect EOF as a valid
condition for ending the entry.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-12-15 11:34:15 +01:00
Wolfgang Bumiller
9e7287abc1 clippy
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-11-27 11:55:07 +01:00
Dietmar Maurer
4f2d271a96 bump version to 0.6.1-1 2020-09-18 11:35:35 +02:00
Dietmar Maurer
1568a7546d Decoder<StandardReader<T>>: allow access to input
We need this to query the status of the input when decode fails.
2020-09-18 11:32:43 +02:00
Wolfgang Bumiller
3acfbd6133 more build dep fixups for buildbot
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-08-28 10:18:18 +02:00
Wolfgang Bumiller
175eff9ff0 have the buildbot install anyhow for now
there are some build/test/dev dependencies issues with
debcargo still open, once those are resolved we can maybe
revert this

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-08-28 09:46:05 +02:00
Wolfgang Bumiller
420639374d formatting fixup
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-08-28 09:00:13 +02:00
Wolfgang Bumiller
67ba385ce1 d/control bump
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-08-27 12:14:39 +02:00
Wolfgang Bumiller
aef2fafe27 bump version to 0.6.0-1
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-08-27 12:12:42 +02:00