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
Wolfgang Bumiller
bd99958c34
accessor: forbid slashes in file names
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-06-08 10:27:54 +02:00
Wolfgang Bumiller
2dfb36020a
decoder: forbid slashes in file names
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-06-08 10:26:36 +02:00
Wolfgang Bumiller
ef72634f27
encoder: forbid slashes in file names
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-06-08 10:25:33 +02:00
Wolfgang Bumiller
37f52caf16
bump version to 0.1.5-1
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-06-08 10:09:25 +02:00
Wolfgang Bumiller
1250e3ea15
formatting fixups
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-06-08 10:07:46 +02:00
Wolfgang Bumiller
0a6c735062
format: fix mtime in Metadata::from(StdMetadata)
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-06-08 10:06:07 +02:00
Wolfgang Bumiller
145b50e682
examples: add hardlink support to pxarcmd
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-06-08 09:55:42 +02:00
Wolfgang Bumiller
f3e50baaf8
encoder: fix contents of hardlinks
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-06-08 09:55:31 +02:00
Wolfgang Bumiller
72f3670986
bump version to 0.1.4-1
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-06-05 16:26:17 +02:00
Wolfgang Bumiller
63f2296f0c
encoder: use relative hardlink offsets
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-06-05 16:26:13 +02:00
Wolfgang Bumiller
06070d267f
major updates to allow following hardlinks efficiently
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-06-05 16:22:20 +02:00
Wolfgang Bumiller
b0487d4f9f
formatting fixups
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-06-05 15:08:32 +02:00
Wolfgang Bumiller
6bfadb8a3f
accessor: add follow_hardlink to accessor toplevel
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-06-05 15:06:58 +02:00
Wolfgang Bumiller
501ea22023
encoder: only provide a LinkOffset on regular files
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-06-05 15:05:12 +02:00
Wolfgang Bumiller
fd999d5695
remove unused binary for now
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-06-05 14:06:11 +02:00
Wolfgang Bumiller
5d283b7eeb
bump version to 0.1.3-1
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-06-05 14:01:16 +02:00
Wolfgang Bumiller
28be6927ea
decoder: more hardlink reading fixups
...
the previous code use a read helper which would not allow
for there to be more data after the offset
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-06-05 14:00:08 +02:00
Wolfgang Bumiller
d67488626b
encoder: introduce LinkOffset
...
To create hardlinks we need to reference the
in-archive-offset of the file we want to link to.
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-06-05 13:17:03 +02:00
Wolfgang Bumiller
c7b0cd2a1a
switch to using mod.rs
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-06-05 13:03:27 +02:00
Wolfgang Bumiller
b07529294d
hardlinks also contain the offset
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-06-05 12:35:11 +02:00
Wolfgang Bumiller
500440c873
bump version to 0.1.2-1
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-06-05 12:21:08 +02:00
Wolfgang Bumiller
2ab25a1717
fix hardlink format
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-06-05 12:18:55 +02:00
Wolfgang Bumiller
2f56c76c83
silence encoder warning
...
As it is normal for this to happen when bailing out with an
error.
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-06-04 15:07:55 +02:00
Wolfgang Bumiller
8f1a41637e
fixup clean target in Makefile
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-06-04 11:29:58 +02:00
Wolfgang Bumiller
96da0e0d90
bump version to 0.1.1-1
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-06-04 11:27:04 +02:00
Wolfgang Bumiller
cebd81832c
turn Permissions into just an u64
...
So we don't need to deal with `from_bits_truncate` and can
just use it as it is...
An alternative would be an enum which is either NoMask or a
bitfield, but that seems too tedious right now.
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-06-04 11:24:35 +02:00
Wolfgang Bumiller
448bb127a2
remove rust-toolchain file
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-06-03 13:26:58 +02:00
Wolfgang Bumiller
707bad0d57
add debian build files
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-06-03 13:25:30 +02:00
Wolfgang Bumiller
afe05f3ffa
accessor: use aio Decoder in aio Accessor
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-06-02 12:58:29 +02:00
Wolfgang Bumiller
da286c2802
Entry: add is_blockdev, is_chardev next to is_device
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-06-02 12:57:27 +02:00