diff options
| author | Przemyslaw Pawelczyk <przemoc@gmail.com> | 2016-01-19 20:21:58 +0100 | 
|---|---|---|
| committer | Przemyslaw Pawelczyk <przemoc@gmail.com> | 2016-01-19 20:21:58 +0100 | 
| commit | 5b660adfba7b9c65f2884e27d308b490c5eec10a (patch) | |
| tree | c0ab9a1be63ddb1078edaf22a6ed2e389e37fdbe | |
| parent | ddc57ddc6ca9be5c61e678edb81b946baa774982 (diff) | |
README: Reorder, add sections and extract stuff into FILEFORMAT file.
| -rw-r--r-- | FILEFORMAT | 42 | ||||
| -rw-r--r-- | README | 68 | 
2 files changed, 76 insertions, 34 deletions
| diff --git a/FILEFORMAT b/FILEFORMAT new file mode 100644 index 0000000..fcd3d41 --- /dev/null +++ b/FILEFORMAT @@ -0,0 +1,42 @@ +Version 0 +--------- + +Following sections explain internals of metastore file (.metadata). + + +### Data types + +    CSTRING     = NUL-terminated binary string +    BSTRING(N)  = binary string of length N +    INT(N)      = N byte integer in big endian byte order + + +### File layout + +    HEADER +    N * ENTRY + + +### HEADER format + +    BSTRING(10) - Magic header - "MeTaSt00r3" +    BSTRING(8)  - Version - "\0\0\0\0\0\0\0\0" (currently) + + +### ENTRY format + +    CSTRING     - Path  (absolute or relative) +    CSTRING     - Owner (owner name, not uid) +    CSTRING     - Group (group name, not gid) + +    INT(8)      - Mtime (seconds) +    INT(8)      - Mtime (nanoseconds) +    INT(2)      - Mode  (st_mode from struct stat st_mode AND 0177777, +                         i.e. unix permissions and type of file) + +    INT(4)      - num_xattrs +    FOR (i = 0; i < num_xattrs; i++) { +        CSTRING            - xattr name +        INT(4)             - xattrlen +        BSTRING(xattrlen)  - xattr value +    } @@ -28,64 +28,64 @@ metastore stores following metadata in its files:  Usage  ----- -See the manual page (metastore.1) for details on usage. +See man1/metastore.1 file, which is the manual page.  File format  ----------- -Following sections explain internals of metastore file (.metadata). +See FILEFORMAT file, which describes internals of metastore file. -### Data types +Requirements +------------ -    CSTRING     = NUL-terminated binary string -    BSTRING(N)  = binary string of length N -    INT(N)      = N byte integer in big endian byte order +- Linux +- GNU make +- C99 compiler, like gcc or clang +- libbsd -### File layout +Building +-------- -    HEADER -    N * ENTRY +Simply run `make` from project's root directory. +Building out-of-tree is supported out-of-the-box. Go to your chosen +build directory and run there: -### HEADER format +    $ make -f path/to/metastore/Makefile -    BSTRING(10) - Magic header - "MeTaSt00r3" -    BSTRING(8)  - Version - "\0\0\0\0\0\0\0\0" (currently) +Installation +------------ -### ENTRY format +Run `make install`.  Default settings for installation are: -    CSTRING     - Path  (absolute or relative) -    CSTRING     - Owner (owner name, not uid) -    CSTRING     - Group (group name, not gid) +     PREFIX      = /usr/local +     EXECPREFIX  = ${PREFIX}           (/usr/local) +     BINDIR      = ${EXECPREFIX}/bin   (/usr/local/bin) +     DATAROOTDIR = ${PREFIX}/share     (/usr/local/share) +     MANDIR      = ${DATAROOTDIR}/man  (/usr/local/share/man) -    INT(8)      - Mtime (seconds) -    INT(8)      - Mtime (nanoseconds) -    INT(2)      - Mode  (st_mode from struct stat st_mode AND 0177777, -                         i.e. unix permissions and type of file) +You can always change them, e.g.: -    INT(4)      - num_xattrs -    FOR (i = 0; i < num_xattrs; i++) { -        CSTRING            - xattr name -        INT(4)             - xattrlen -        BSTRING(xattrlen)  - xattr value -    } +    $ make install PREFIX=/usr - -License -------- - -The project is licensed under the terms of the GNU GPL v2 only license. -See LICENSE.GPLv2 file for the full license text. +DESTDIR is also supported. -Bug reports ------------ +Reporing issues +---------------  Please use the issue tracker provided by GitHub to send bug reports  or feature requests.  https://github.com/przemoc/metastore/issues + + +License +------- + +The project is licensed under the terms of the GNU GPL v2 only license. +See LICENSE.GPLv2 file for the full license text. | 
