]> git.proxmox.com Git - pxar.git/log
pxar.git
3 months agoformat: add payload stream start marker
Christian Ebner [Thu, 21 Mar 2024 18:24:13 +0000 (19:24 +0100)]
format: add payload stream start marker

Mark the beginning of the payload stream with a magic number. Allows for
version and file type detection.

Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
3 months agoencoder/format: finish payload stream with marker
Christian Ebner [Mon, 26 Feb 2024 11:08:30 +0000 (12:08 +0100)]
encoder/format: finish payload stream with marker

Mark the end of the optional payload stream, this makes sure that at
least some bytes are written to the stream (as empty archives are not
allowed by the proxmox backup server) and possible injected chunks
must be consumed.

Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
3 months agoencoder: add payload advance capability
Christian Ebner [Tue, 20 Feb 2024 13:07:14 +0000 (14:07 +0100)]
encoder: add payload advance capability

Allows to advance the payload writer position by a given size.
This is used to update the encoders payload input position when
injecting reused chunks for files with unchanged metadata.

Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
3 months agoencoder: add payload position capability
Christian Ebner [Wed, 13 Mar 2024 08:00:21 +0000 (09:00 +0100)]
encoder: add payload position capability

Allows to read the current payload offset from the dedicated payload
input stream. This is required to get the current offset for calculation
of forced boundaries in the proxmox-backup-client, when injecting reused
payload chunks into the payload stream.

Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
3 months agoencoder: add payload reference capability
Christian Ebner [Wed, 13 Mar 2024 08:06:28 +0000 (09:06 +0100)]
encoder: add payload reference capability

Allows to encode regular files with a payload reference within a
separate payload archive rather than encoding the payload within the
regular archive.

Following the PXAR_PAYLOAD_REF marked header, the payload offset and
size are encoded.

Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
3 months agodecoder: set payload input range when decoding via accessor
Christian Ebner [Mon, 29 Apr 2024 08:41:18 +0000 (10:41 +0200)]
decoder: set payload input range when decoding via accessor

When accessing the file contents via the sequential file restore
the range of the payload contents cannot be inferred a-priori but need
to be calculated based on the payload references encountered during
decoding.

Extending the `SeqRead` trait by the method `update_range` allows to
set the range in the payload reader instance by implementing the
method for `SeqReadAtAdapter`, thereby setting the correct content
range to be accessed.

Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
3 months agodecoder/accessor: allow for split input stream variant
Christian Ebner [Tue, 12 Mar 2024 14:06:44 +0000 (15:06 +0100)]
decoder/accessor: allow for split input stream variant

When a pxar archive was encoded using the split stream output
variant, access to the payload of regular files has to be redirected
to the corresponding dedicated input.

Allow to pass the split input variant to the decoder and accessor
instances to handle the split streams accordingly and decode split
stream archives.

Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
3 months agoencoder: allow split output writer for archive creation
Christian Ebner [Thu, 1 Feb 2024 08:47:18 +0000 (09:47 +0100)]
encoder: allow split output writer for archive creation

During regular pxar archive encoding, the payload of regular files is
written as part of the archive.

This patch introduces functionality to instead attach a writer variant
with a split payload writer instance to redirect the payload to a
different output.
The separation of data and metadata streams allows for efficient
reuse of payload data by referencing the payload writer byte offset,
without having to reencode it.

Whenever the payload of regular files is redirected to a dedicated
output writer, encode a payload reference header followed by the
required data to locate the data, instead of adding the regular payload
header followed by the encoded payload to the archive.

This is in preparation for reusing payload chunks for unchanged files
of backups created via the proxmox-backup-client.

Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
3 months agodecoder: add method to read payload references
Christian Ebner [Tue, 12 Mar 2024 13:12:49 +0000 (14:12 +0100)]
decoder: add method to read payload references

This is in preparation for reading payloads from a dedicated payload
input stream.

Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
3 months agoformat/examples: add header type `PXAR_PAYLOAD_REF`
Christian Ebner [Thu, 1 Feb 2024 11:51:56 +0000 (12:51 +0100)]
format/examples: add header type `PXAR_PAYLOAD_REF`

Introduces the header type `PXAR_PAYLOAD_REF` to mark regular file
entry payloads, not encoded within the regular pxar archive but
rather redirected to a dedicated payload output writer.
It therefore substitutes the `PXAR_PAYLOAD` header type for these
entries.

The header marks the start and size for a `PayloadRef` typed object
in the archive, storing the offset to the payload header offset in the
payload stream of the dedicated payload output as well as the payload
size.

The `PayloadRef` provides the means to store, serialize and
deserialize the entry.

Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
3 months agoencoder: move to stack based state tracking
Christian Ebner [Tue, 19 Mar 2024 13:51:08 +0000 (14:51 +0100)]
encoder: move to stack based state tracking

In preparation for the proxmox-backup-client look-ahead caching,
where a passing around of different encoder instances with internal
references is not feasible.

Instead of creating a new encoder instance for each directory level
and keeping references to the parent state, use an internal stack.
Adds additional helper functions to solve borrow issues, when both
the state and writers have to be accessed by a mutable reference.

This is a breaking change in the pxar library API.

Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
3 months agolib: add type for input/output variant differentiation
Christian Ebner [Thu, 23 May 2024 06:54:58 +0000 (08:54 +0200)]
lib: add type for input/output variant differentiation

Introduce an enum which stores 2 different possible variants of
inputs or outputs to be passed to encoder and decoder/accessor
instances, depending whether to read/write a fully self contained
pxar archive or whether to split off the payload stream into a
separate input/output.

Co-authored-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
3 months agodecoder: factor out skip part from skip_entry
Christian Ebner [Tue, 12 Mar 2024 14:03:41 +0000 (15:03 +0100)]
decoder: factor out skip part from skip_entry

Make the skip part reusable for a different input.

In preparation for skipping payload paddings in a separated input.

Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
5 months agoencoder: fix some more typos/phrasing
Fabian Grünbichler [Wed, 3 Apr 2024 09:11:40 +0000 (11:11 +0200)]
encoder: fix some more typos/phrasing

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
5 months agoencoder: fix two typos in comments
Christian Ebner [Thu, 28 Mar 2024 12:36:10 +0000 (13:36 +0100)]
encoder: fix two typos in comments

Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
6 months agoformat/examples: Fix typo in PXAR_PAYLOAD description
Christian Ebner [Wed, 28 Feb 2024 14:01:51 +0000 (15:01 +0100)]
format/examples: Fix typo in PXAR_PAYLOAD description

Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
13 months agodoc fixup
Wolfgang Bumiller [Fri, 4 Aug 2023 11:11:03 +0000 (13:11 +0200)]
doc fixup

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
13 months agodecoder: aio: Make `TokioReader` public
Max Carrara [Fri, 21 Jul 2023 15:58:19 +0000 (17:58 +0200)]
decoder: aio: Make `TokioReader` public

This exposes `decoder::aio::TokioReader<T>` in a similar manner to
`decoder::sync::StandardReader<T>`, which is necessary if one wants
to remain generic over `T: tokio::io::AsyncRead`, e.g.:

> struct FooDecoder<T: tokio::io::AsyncRead> {
>    decoder: aio::Decoder<aio::TokioReader<T>>,
> }

Signed-off-by: Max Carrara <m.carrara@proxmox.com>
13 months agod/changelog: fix typo
Fabian Grünbichler [Mon, 31 Jul 2023 13:45:17 +0000 (15:45 +0200)]
d/changelog: fix typo

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
16 months agoformat: Document source of format const values
Christian Ebner [Fri, 28 Apr 2023 08:54:43 +0000 (10:54 +0200)]
format: Document source of format const values

Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
20 months agodrop custom poll_fn, require rust 1.64
Wolfgang Bumiller [Fri, 13 Jan 2023 12:37:17 +0000 (13:37 +0100)]
drop custom poll_fn, require rust 1.64

this was added to std in 1.64

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
20 months agoupdate d/control
Fabian Grünbichler [Mon, 9 Jan 2023 12:33:47 +0000 (13:33 +0100)]
update d/control

after debcargo update

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
22 months agobump upload target
Wolfgang Bumiller [Thu, 27 Oct 2022 13:31:33 +0000 (15:31 +0200)]
bump upload target

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
22 months agobump d/control
Wolfgang Bumiller [Thu, 27 Oct 2022 13:29:14 +0000 (15:29 +0200)]
bump d/control

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
22 months agobump version to 0.10.2-1
Wolfgang Bumiller [Thu, 27 Oct 2022 13:28:22 +0000 (15:28 +0200)]
bump version to 0.10.2-1

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
22 months agoclippy fixup
Wolfgang Bumiller [Thu, 27 Oct 2022 13:25:50 +0000 (15:25 +0200)]
clippy fixup

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
22 months agoderive PartialEq trait for Metadata and related structs
Lukas Wagner [Thu, 27 Oct 2022 12:28:05 +0000 (14:28 +0200)]
derive PartialEq trait for Metadata and related structs

This change is needed in order to compare a file's metadata
in the coming proxmox-backup-debug diff tool.

Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
22 months agofix fifo and socket entry kinds in accessor
Wolfgang Bumiller [Thu, 27 Oct 2022 13:17:39 +0000 (15:17 +0200)]
fix fifo and socket entry kinds in accessor

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
22 months agotest socket/fifo entry kinds in accessor
Wolfgang Bumiller [Thu, 27 Oct 2022 12:59:49 +0000 (14:59 +0200)]
test socket/fifo entry kinds in accessor

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2 years agoupdate buildbot.yml for tokio 1.18
Wolfgang Bumiller [Thu, 28 Jul 2022 12:54:01 +0000 (14:54 +0200)]
update buildbot.yml for tokio 1.18

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2 years agodon't hold temp buffer mutex across await point
Wolfgang Bumiller [Thu, 28 Jul 2022 12:36:46 +0000 (14:36 +0200)]
don't hold temp buffer mutex across await point

the type system guarantees that this can only be accessed by
a single mutable instance, but it's still a bad idea

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2 years agotrivial clippy fixes
Wolfgang Bumiller [Thu, 28 Jul 2022 12:36:43 +0000 (14:36 +0200)]
trivial clippy fixes

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2 years agodrop imports already in 2021 prelude
Wolfgang Bumiller [Wed, 1 Dec 2021 13:14:47 +0000 (14:14 +0100)]
drop imports already in 2021 prelude

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2 years agoanother clippy fixup
Wolfgang Bumiller [Wed, 1 Dec 2021 13:10:33 +0000 (14:10 +0100)]
another clippy fixup

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2 years agoclippy fixes
Wolfgang Bumiller [Wed, 1 Dec 2021 13:09:10 +0000 (14:09 +0100)]
clippy fixes

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2 years agoupgrade to edition 2021
Wolfgang Bumiller [Wed, 1 Dec 2021 12:54:52 +0000 (13:54 +0100)]
upgrade to edition 2021

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2 years agomore clippy fixes
Wolfgang Bumiller [Fri, 12 Nov 2021 12:53:47 +0000 (13:53 +0100)]
more clippy fixes

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2 years agouse #![deny(unsafe_op_in_unsafe_fn)]
Wolfgang Bumiller [Fri, 12 Nov 2021 12:52:00 +0000 (13:52 +0100)]
use #![deny(unsafe_op_in_unsafe_fn)]

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2 years agobuildbot.yml: remove tokio+fs dep
Wolfgang Bumiller [Tue, 5 Oct 2021 07:30:30 +0000 (09:30 +0200)]
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>
2 years agoadd back .buildbot.yml
Wolfgang Bumiller [Mon, 4 Oct 2021 13:29:46 +0000 (15:29 +0200)]
add back .buildbot.yml

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2 years agobump d/control
Wolfgang Bumiller [Mon, 4 Oct 2021 13:07:54 +0000 (15:07 +0200)]
bump d/control

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2 years agofix deprecated use of std::u64 modules
Wolfgang Bumiller [Mon, 4 Oct 2021 13:00:43 +0000 (15:00 +0200)]
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>
3 years agoadd more code documentation
Wolfgang Bumiller [Mon, 17 May 2021 12:05:10 +0000 (14:05 +0200)]
add more code documentation

all but the `format` module are now #![deny(missing_docs)]

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
3 years agomake the ReadAtImpl enum variants private
Wolfgang Bumiller [Mon, 17 May 2021 12:04:52 +0000 (14:04 +0200)]
make the ReadAtImpl enum variants private

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
3 years agoditch anyhow crate in examples/tests
Wolfgang Bumiller [Mon, 17 May 2021 09:46:50 +0000 (11:46 +0200)]
ditch anyhow crate in examples/tests

mostly to shutup our current buildbot tests

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
3 years agosome clippy fixes
Wolfgang Bumiller [Fri, 7 May 2021 09:57:28 +0000 (11:57 +0200)]
some clippy fixes

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
3 years agobump version to 0.10.1-1
Wolfgang Bumiller [Wed, 31 Mar 2021 11:56:22 +0000 (13:56 +0200)]
bump version to 0.10.1-1

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
3 years agorustfmt
Wolfgang Bumiller [Wed, 31 Mar 2021 11:54:18 +0000 (13:54 +0200)]
rustfmt

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
3 years agodecoder/aio: add contents() and content_size() calls
Stefan Reiter [Wed, 31 Mar 2021 10:21:43 +0000 (12:21 +0200)]
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>
3 years agorustfmt
Wolfgang Bumiller [Wed, 31 Mar 2021 11:52:09 +0000 (13:52 +0200)]
rustfmt

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
3 years agoencoder: only flush owned outputs in 'finish'
Wolfgang Bumiller [Wed, 31 Mar 2021 11:51:46 +0000 (13:51 +0200)]
encoder: only flush owned outputs in 'finish'

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
3 years agoencoder: flush after writing last entry
Dominik Csapak [Wed, 24 Mar 2021 10:56:38 +0000 (11:56 +0100)]
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>
3 years agorustfmt
Wolfgang Bumiller [Fri, 12 Mar 2021 09:42:14 +0000 (10:42 +0100)]
rustfmt

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
3 years agobump version to 0.10.0-1
Wolfgang Bumiller [Fri, 12 Mar 2021 09:38:03 +0000 (10:38 +0100)]
bump version to 0.10.0-1

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
3 years agoexplicitly pad StatxTimestamp with zeros
Wolfgang Bumiller [Fri, 12 Mar 2021 09:34:17 +0000 (10:34 +0100)]
explicitly pad StatxTimestamp with zeros

otherwise we can have random data in there

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
3 years agoupdate d/control
Wolfgang Bumiller [Wed, 17 Feb 2021 08:55:26 +0000 (09:55 +0100)]
update d/control

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
3 years agobump version to 0.9.0-1
Wolfgang Bumiller [Wed, 17 Feb 2021 08:54:38 +0000 (09:54 +0100)]
bump version to 0.9.0-1

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
3 years agoadd EncoderOutput::to_borrowed()
Wolfgang Bumiller [Wed, 17 Feb 2021 08:50:10 +0000 (09:50 +0100)]
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>
3 years agorevert Send requirement from previous patch
Wolfgang Bumiller [Wed, 17 Feb 2021 08:23:29 +0000 (09:23 +0100)]
revert Send requirement from previous patch

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
3 years agomake aio::Encoder actually behave with async
Stefan Reiter [Tue, 9 Feb 2021 12:03:47 +0000 (13:03 +0100)]
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>
3 years agocargo fmt
Wolfgang Bumiller [Tue, 2 Feb 2021 09:54:36 +0000 (10:54 +0100)]
cargo fmt

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
3 years agomake Send test not depend on tokio
Wolfgang Bumiller [Tue, 2 Feb 2021 09:54:11 +0000 (10:54 +0100)]
make Send test not depend on tokio

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
3 years agobump version to 0.8.0-1
Wolfgang Bumiller [Tue, 2 Feb 2021 09:50:03 +0000 (10:50 +0100)]
bump version to 0.8.0-1

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
3 years agofix Encoder to be Send + Sync
Wolfgang Bumiller [Tue, 2 Feb 2021 09:47:56 +0000 (10:47 +0100)]
fix Encoder to be Send + Sync

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
3 years agodebcargo: fix maintainer directive
Fabian Grünbichler [Mon, 1 Feb 2021 10:21:17 +0000 (11:21 +0100)]
debcargo: fix maintainer directive

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
3 years agodrop futures dependency
Wolfgang Bumiller [Fri, 15 Jan 2021 13:59:29 +0000 (14:59 +0100)]
drop futures dependency

we're not actually using it anymore now

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
3 years agotypo fix: this was supposed to be from_tokio
Wolfgang Bumiller [Fri, 15 Jan 2021 13:42:31 +0000 (14:42 +0100)]
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>
3 years agoclippy fixups
Wolfgang Bumiller [Fri, 15 Jan 2021 13:24:50 +0000 (14:24 +0100)]
clippy fixups

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
3 years agomove extra build-dependencies from .builtbot.yml to d/control
Thomas Lamprecht [Fri, 15 Jan 2021 09:07:53 +0000 (10:07 +0100)]
move extra build-dependencies from .builtbot.yml to d/control

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoadd futures to builbot.yml
Thomas Lamprecht [Thu, 14 Jan 2021 15:45:57 +0000 (16:45 +0100)]
add futures to builbot.yml

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoupdate builbot.yml for tokio 1.0
Thomas Lamprecht [Thu, 14 Jan 2021 15:30:53 +0000 (16:30 +0100)]
update builbot.yml for tokio 1.0

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agobump version to 0.7.0-1
Fabian Grünbichler [Thu, 14 Jan 2021 14:26:40 +0000 (15:26 +0100)]
bump version to 0.7.0-1

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
3 years agobuild: fix --no-default-features
Fabian Grünbichler [Thu, 14 Jan 2021 14:26:16 +0000 (15:26 +0100)]
build: fix --no-default-features

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
3 years agofix example
Wolfgang Bumiller [Wed, 13 Jan 2021 08:59:58 +0000 (09:59 +0100)]
fix example

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
3 years agoremove futures-io feature
Fabian Grünbichler [Mon, 11 Jan 2021 12:59:49 +0000 (13:59 +0100)]
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>
3 years agoclippy: use matches! instead of match
Fabian Grünbichler [Mon, 11 Jan 2021 13:47:45 +0000 (14:47 +0100)]
clippy: use matches! instead of match

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
3 years agoupdate to tokio 1.0
Fabian Grünbichler [Fri, 4 Dec 2020 10:39:55 +0000 (11:39 +0100)]
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>
3 years agobump version to 0.6.2-1
Wolfgang Bumiller [Tue, 15 Dec 2020 12:10:50 +0000 (13:10 +0100)]
bump version to 0.6.2-1

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
3 years agofix `decode_entry` on special files
Wolfgang Bumiller [Tue, 15 Dec 2020 10:34:15 +0000 (11:34 +0100)]
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>
3 years agoclippy
Wolfgang Bumiller [Fri, 27 Nov 2020 10:55:07 +0000 (11:55 +0100)]
clippy

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
4 years agobump version to 0.6.1-1
Dietmar Maurer [Fri, 18 Sep 2020 09:35:35 +0000 (11:35 +0200)]
bump version to 0.6.1-1

4 years agoDecoder<StandardReader<T>>: allow access to input
Dietmar Maurer [Fri, 18 Sep 2020 09:32:43 +0000 (11:32 +0200)]
Decoder<StandardReader<T>>: allow access to input

We need this to query the status of the input when decode fails.

4 years agomore build dep fixups for buildbot
Wolfgang Bumiller [Fri, 28 Aug 2020 08:18:18 +0000 (10:18 +0200)]
more build dep fixups for buildbot

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
4 years agohave the buildbot install anyhow for now
Wolfgang Bumiller [Fri, 28 Aug 2020 07:46:04 +0000 (09:46 +0200)]
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>
4 years agoformatting fixup
Wolfgang Bumiller [Fri, 28 Aug 2020 07:00:13 +0000 (09:00 +0200)]
formatting fixup

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
4 years agod/control bump
Wolfgang Bumiller [Thu, 27 Aug 2020 10:14:39 +0000 (12:14 +0200)]
d/control bump

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
4 years agobump version to 0.6.0-1
Wolfgang Bumiller [Thu, 27 Aug 2020 10:12:42 +0000 (12:12 +0200)]
bump version to 0.6.0-1

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
4 years agoencoder: let finish return writer, add into_writer
Wolfgang Bumiller [Thu, 27 Aug 2020 10:04:18 +0000 (12:04 +0200)]
encoder: let finish return writer, add into_writer

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
4 years agobump version to 0.5.0-2
Wolfgang Bumiller [Tue, 25 Aug 2020 10:46:07 +0000 (12:46 +0200)]
bump version to 0.5.0-2

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
4 years agofixup d/control
Wolfgang Bumiller [Tue, 25 Aug 2020 10:44:21 +0000 (12:44 +0200)]
fixup d/control

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
4 years agobump version to 0.5.0-1
Wolfgang Bumiller [Tue, 25 Aug 2020 10:26:16 +0000 (12:26 +0200)]
bump version to 0.5.0-1

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
4 years agorename Entry to Stat, add Metadata::builder_from_stat
Wolfgang Bumiller [Tue, 25 Aug 2020 10:21:18 +0000 (12:21 +0200)]
rename Entry to Stat, add Metadata::builder_from_stat

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
4 years agofixup build and test dependencies
Wolfgang Bumiller [Tue, 25 Aug 2020 08:11:15 +0000 (10:11 +0200)]
fixup build and test dependencies

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
4 years agogenerate and check-in d/control
Wolfgang Bumiller [Tue, 25 Aug 2020 07:30:55 +0000 (09:30 +0200)]
generate and check-in d/control

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
4 years agobump version to 0.4.0-1
Wolfgang Bumiller [Mon, 24 Aug 2020 09:54:45 +0000 (11:54 +0200)]
bump version to 0.4.0-1

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
4 years agodrop poll_close and poll_position from SeqWrite
Wolfgang Bumiller [Mon, 24 Aug 2020 09:51:42 +0000 (11:51 +0200)]
drop poll_close and poll_position from SeqWrite

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
4 years agodoc fixup
Wolfgang Bumiller [Thu, 30 Jul 2020 07:40:47 +0000 (09:40 +0200)]
doc fixup

This is a SignedDuration now instead of a Result

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
4 years agointroduce StatxTimestamp helper type
Wolfgang Bumiller [Tue, 28 Jul 2020 09:03:11 +0000 (11:03 +0200)]
introduce StatxTimestamp helper type

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
4 years agoMakefile: fix dinstzall target
Dietmar Maurer [Wed, 29 Jul 2020 06:10:21 +0000 (08:10 +0200)]
Makefile: fix dinstzall target

4 years agoMakefile: build packages inside build/ directory
Dietmar Maurer [Wed, 29 Jul 2020 06:07:47 +0000 (08:07 +0200)]
Makefile: build packages inside build/ directory