5
0
mirror of git://git.proxmox.com/git/pxar.git synced 2025-01-03 09:17:38 +03:00
Commit Graph

261 Commits

Author SHA1 Message Date
Wolfgang Bumiller
fc2f1b9f20 doc fixup
This is a SignedDuration now instead of a Result

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-08-24 12:00:39 +02:00
Wolfgang Bumiller
bb6779b5a0 introduce StatxTimestamp helper type
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-08-24 12:00:39 +02:00
Dietmar Maurer
2ba7b74269 Makefile: fix dinstzall target 2020-07-29 08:10:21 +02:00
Dietmar Maurer
1bcc42bd85 Makefile: build packages inside build/ directory 2020-07-29 08:07:47 +02:00
Dietmar Maurer
b3c43dad2e Makefile: add upload target 2020-07-29 07:49:45 +02:00
Wolfgang Bumiller
10086ac539 bump version to 0.3.0-1
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-07-29 07:40:12 +02:00
Wolfgang Bumiller
3a7b42d0ef add entry v1 compatiblity test
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-07-29 07:39:58 +02:00
Wolfgang Bumiller
644e844d49 implement Entry v2
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-07-29 07:33:41 +02:00
Wolfgang Bumiller
57bee6f8f0 update mk-format-hashes for a new ENTRY
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-07-29 07:31:22 +02:00
Wolfgang Bumiller
939f24689f introduce StatxTimestamp helper type
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-07-29 07:23:53 +02:00
Wolfgang Bumiller
f0279c01e0 add format description to format module
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-07-29 07:23:17 +02:00
Wolfgang Bumiller
cbf1b17b00 bump version to 0.2.1-1
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-07-16 11:44:15 +02:00
Wolfgang Bumiller
1b25fc0820 more clippy lints
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-07-16 11:40:41 +02:00
Wolfgang Bumiller
93fef2fd8a clippy: fix bad cast in max allowed content size
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-07-16 11:21:06 +02:00
Wolfgang Bumiller
c81b2e4e21 add some random access tests with hardlinks
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-06-26 14:12:57 +02:00
Wolfgang Bumiller
cde0236c1c accessor: impl ReadAt for byte slices
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-06-26 13:54:16 +02:00
Wolfgang Bumiller
807a4fd6ba tests: add some ACLs
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-06-26 13:05:22 +02:00
Wolfgang Bumiller
4c3318a28e acl: User/Group::new method
with some convenience to not require the Permissions type
wraparound.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-06-26 13:05:05 +02:00
Wolfgang Bumiller
b4d3fe517f buildsys: pass --all-features to cargo test
Otherwise tests which depend on optional dependencies won't
be run. Particularly the one in the `tests/` subdir.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-06-26 12:27:43 +02:00
Wolfgang Bumiller
08bc9bbc6c rustc compat fixup
lowers crate's rustc requirement to << 1.43

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-06-26 11:44:25 +02:00
Wolfgang Bumiller
1feb04d7b8 tests: cleanup warnings
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-06-26 11:20:45 +02:00
Wolfgang Bumiller
650070b0e6 tests: add fifos and sockets
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-06-26 11:12:00 +02:00
Wolfgang Bumiller
bb74cbfa21 document test helpers a bit
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-06-26 10:08:45 +02:00
Wolfgang Bumiller
ea8ff6368b remove custom PartialEq impl
Hardlink targets are now compared, but only the parts we
also actually decode, not the chosen names in
`Entry.link_key`.

This way we can just `==` compare entries as long as the
files we use for hardlinking use their canonical path as
key.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-06-26 09:57:35 +02:00
Wolfgang Bumiller
1829ef0dd0 some initial sequential encoder/decoder testing
Tests basic files, hardlinks, symlinks. No special metadata
yet.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-06-26 09:54:00 +02:00
Wolfgang Bumiller
2974c111b1 Add TODO file
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-06-26 08:59:03 +02:00
Wolfgang Bumiller
8fe6038295 formatting fixups
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-06-25 13:56:48 +02:00
Wolfgang Bumiller
139932923c start tests directory
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-06-25 13:51:22 +02:00
Wolfgang Bumiller
0104cf77b7 add test-harness feature for separate unit tests
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-06-25 13:51:22 +02:00
Wolfgang Bumiller
611401f9f0 sync encoder: fix metadat lifetime leaking into encoder
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-06-25 13:51:22 +02:00
Wolfgang Bumiller
0f109bf701 Add a metadata builder
for now primarily to get started with tests

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-06-25 13:51:22 +02:00
Wolfgang Bumiller
37774a671d formatting fixup
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-06-25 12:14:07 +02:00
Wolfgang Bumiller
284b53eb1c bump version to 0.2.0-1
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-06-25 09:43:28 +02:00
Wolfgang Bumiller
1b1e52a46a new hashes for the entire archive foramt
This breaks all previous pxar files and represents a clear
cut off of the catar format.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-06-24 13:31:34 +02:00
Wolfgang Bumiller
8029a6e76a bump version to 0.1.9-1
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-06-24 11:56:27 +02:00
Wolfgang Bumiller
8d9968f4c8 sort some constants
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-06-24 11:54:47 +02:00
Wolfgang Bumiller
710e6c8b4d formatting fixups
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-06-24 11:53:55 +02:00
Wolfgang Bumiller
e72062a97a make ReadAt trait more correct
A simple `poll_read_at` with an immutable self reference
lacks the information which poll *operation* is being
polled. An associated type won't work well enough
(particularly with trait objects and lifetimes), and GATs
are unstable (and not advanced enough yet), so we need to
improvise.

To be more async-friendly, the `start_read_at()` method's
Pending now includes a reference to the operation which also
grabs the buffer lifetime, and has to be completed with
`poll_complete()`.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-06-24 11:53:32 +02:00
Wolfgang Bumiller
4af1594473 doc update
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-06-22 11:39:17 +02:00
Wolfgang Bumiller
515cdc4bb4 bump version to 0.1.8-1
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-06-22 11:07:32 +02:00
Wolfgang Bumiller
16f0464d8d fix device encoding
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-06-22 11:05:11 +02:00
Wolfgang Bumiller
0588460861 bump version to 0.1.7-1
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-06-15 10:36:26 +02:00
Wolfgang Bumiller
fd99ae79bc decoder: remove pub(crate) from some internal items
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-06-15 10:34:54 +02:00
Wolfgang Bumiller
1187920fff accessor: don't mess with internal decoder state
skipping a filename is trivial enough to not abuse internal
decoder methods

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-06-15 10:33:06 +02:00
Fabian Grünbichler
a191c6a76a decoder: fix typos
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-06-12 09:46:07 +02:00
Fabian Grünbichler
4a13b8a3e4 header: implement Display
for nicer/readable error messages.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-06-12 09:46:04 +02:00
Fabian Grünbichler
ec0761f9db header: add size checks
to catch
- headers with full_size < size_of::<Header>
- headers with content_size > header-specific limit

both should in practice only occur for corrupted streams/archives, but
panic-ing/attempting to allocate huge amounts of memory should be
avoided even for those.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-06-12 09:46:01 +02:00
Wolfgang Bumiller
3c8ca95cbd bump version to 0.1.6-1
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-06-08 13:56:28 +02:00
Wolfgang Bumiller
79e3f621c3 encoder: implement a larger shared file copy buffer
In the future we can give it a size.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-06-08 13:14:07 +02:00
Wolfgang Bumiller
f3ac1c5125 factor out file name validation, also forbid . and ..
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-06-08 10:31:37 +02:00