12 releases
Uses old Rust 2015
0.2.9 | Apr 16, 2018 |
---|---|
0.2.8 | Apr 12, 2018 |
0.2.4 | Dec 4, 2017 |
0.2.3 | Nov 12, 2017 |
0.1.0 | Dec 23, 2016 |
#1218 in Filesystem
Used in ciruela
98KB
2.5K
SLoC
Dir Signature
Status: Beta
Documentation | Github | Crate
This crate allows to create a signature (index) of a directory with files, which is:
- Reproducible (does not depend on order of file scan)
- Easy to check even using a bash script (sans edge cases)
- Usable for file synchonization
- Can be produced and checked without loading full index into memory
License
Licensed under either of
- Apache License, Version 2.0, (./LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (./LICENSE-MIT or http://opensource.org/licenses/MIT) at your option.
Contribution
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.
lib.rs
:
Directory Signature Library
v1
Currently we have only implemented v1
version of signature file,
it has the following limitations:
- Only stores executable bit for files, no permissions and ownership support (this also means files can be replicated without privileges)
- File modification times are not checked and not replicated
- It's ascii text, so potentially 2x larger than what binary file could be
While these limitations are not enough for generic backup purposes they are fine for deploying configs and read-only images to production servers in 99% use cases. Latter was a primary use case for the library. We will probably make a more featureful format as v2 and later as deemed necessary.
Design of the format features the following things:
- Reproducible (does not depend on order of file scan)
- Easy to check even using a bash script (sans edge cases)
- Usable for file synchronization
- Can be produced and checked without loading full index into memory
Dependencies
~4–11MB
~122K SLoC