2019-03-18 11:27:30 +00:00
|
|
|
//! *pxar* Implementation (proxmox file archive format)
|
2018-12-30 12:47:27 +00:00
|
|
|
//!
|
2019-03-14 09:54:09 +00:00
|
|
|
//! This code implements a slightly modified version of the *catar*
|
|
|
|
//! format used in the [casync](https://github.com/systemd/casync)
|
2019-03-18 11:27:30 +00:00
|
|
|
//! toolkit (we are not 100\% binary compatible). It is a file archive
|
2019-03-14 09:54:09 +00:00
|
|
|
//! format defined by 'Lennart Poettering', specially defined for
|
2020-05-30 14:37:33 +00:00
|
|
|
//! efficient deduplication.
|
2018-12-30 12:47:27 +00:00
|
|
|
|
|
|
|
//! Every archive contains items in the following order:
|
2019-03-18 11:27:30 +00:00
|
|
|
//! * `ENTRY` -- containing general stat() data and related bits
|
|
|
|
//! * `USER` -- user name as text, if enabled
|
|
|
|
//! * `GROUP` -- group name as text, if enabled
|
|
|
|
//! * `XATTR` -- one extended attribute
|
|
|
|
//! * ... -- more of these when there are multiple defined
|
|
|
|
//! * `ACL_USER` -- one `USER ACL` entry
|
|
|
|
//! * ... -- more of these when there are multiple defined
|
|
|
|
//! * `ACL_GROUP` -- one `GROUP ACL` entry
|
|
|
|
//! * ... -- more of these when there are multiple defined
|
|
|
|
//! * `ACL_GROUP_OBJ` -- The `ACL_GROUP_OBJ`
|
|
|
|
//! * `ACL_DEFAULT` -- The various default ACL fields if there's one defined
|
|
|
|
//! * `ACL_DEFAULT_USER` -- one USER ACL entry
|
|
|
|
//! * ... -- more of these when multiple are defined
|
|
|
|
//! * `ACL_DEFAULT_GROUP` -- one GROUP ACL entry
|
|
|
|
//! * ... -- more of these when multiple are defined
|
|
|
|
//! * `FCAPS` -- file capability in Linux disk format
|
|
|
|
//! * `QUOTA_PROJECT_ID` -- the ext4/xfs quota project ID
|
|
|
|
//! * `PAYLOAD` -- file contents, if it is one
|
|
|
|
//! * `SYMLINK` -- symlink target, if it is one
|
|
|
|
//! * `DEVICE` -- device major/minor, if it is a block/char device
|
2018-12-30 12:47:27 +00:00
|
|
|
//!
|
|
|
|
//! If we are serializing a directory, then this is followed by:
|
|
|
|
//!
|
2019-03-18 11:27:30 +00:00
|
|
|
//! * `FILENAME` -- name of the first directory entry (strictly ordered!)
|
|
|
|
//! * `<archive>` -- serialization of the first directory entry's metadata and contents,
|
2018-12-30 12:47:27 +00:00
|
|
|
//! following the exact same archive format
|
2019-03-18 11:27:30 +00:00
|
|
|
//! * `FILENAME` -- name of the second directory entry (strictly ordered!)
|
|
|
|
//! * `<archive>` -- serialization of the second directory entry
|
2018-12-30 12:47:27 +00:00
|
|
|
//! * ...
|
2019-03-18 11:27:30 +00:00
|
|
|
//! * `GOODBYE` -- lookup table at the end of a list of directory entries
|
2018-12-30 12:47:27 +00:00
|
|
|
|
2019-03-18 11:27:30 +00:00
|
|
|
//!
|
|
|
|
//! The original format has no way to deal with hardlinks, so we
|
|
|
|
//! extended the format by a special `HARDLINK` tag, which can replace
|
|
|
|
//! an `ENTRY` tag. The `HARDLINK` tag contains an 64bit offset which
|
|
|
|
//! points to the linked `ENTRY` inside the archive, followed by the
|
|
|
|
//! full path name of that `ENTRY`. `HARDLINK`s may not have further data
|
|
|
|
//! (user, group, acl, ...) because this is already defined by the
|
|
|
|
//! linked `ENTRY`.
|
2019-03-16 10:02:12 +00:00
|
|
|
|
2019-03-15 07:24:32 +00:00
|
|
|
mod binary_search_tree;
|
2019-03-15 10:34:31 +00:00
|
|
|
pub use binary_search_tree::*;
|
2018-12-30 12:47:27 +00:00
|
|
|
|
2019-08-02 13:19:33 +00:00
|
|
|
pub mod flags;
|
|
|
|
pub use flags::*;
|
|
|
|
|
2019-03-15 07:24:32 +00:00
|
|
|
mod format_definition;
|
|
|
|
pub use format_definition::*;
|
|
|
|
|
|
|
|
mod encoder;
|
|
|
|
pub use encoder::*;
|
|
|
|
|
2019-03-15 07:36:02 +00:00
|
|
|
mod sequential_decoder;
|
|
|
|
pub use sequential_decoder::*;
|
2019-03-15 08:36:05 +00:00
|
|
|
|
|
|
|
mod decoder;
|
|
|
|
pub use decoder::*;
|
2019-05-27 11:59:17 +00:00
|
|
|
|
2019-08-02 15:02:24 +00:00
|
|
|
mod match_pattern;
|
|
|
|
pub use match_pattern::*;
|
2019-06-21 16:15:01 +00:00
|
|
|
|
2019-08-02 13:19:36 +00:00
|
|
|
mod dir_stack;
|
|
|
|
pub use dir_stack::*;
|
2019-08-01 14:23:46 +00:00
|
|
|
|
2019-08-09 14:45:13 +00:00
|
|
|
pub mod fuse;
|
|
|
|
pub use fuse::*;
|
|
|
|
|
2019-08-09 06:11:32 +00:00
|
|
|
pub mod catalog;
|
|
|
|
|
2019-05-27 11:59:17 +00:00
|
|
|
mod helper;
|