ostree/src/libostree
Colin Walters a14ff0aeab core: Fix mkdtemp invocation 2012-06-06 10:03:15 -04:00
..
README.md core: Associate branches with remotes, move trigger runs into checkout 2012-04-03 23:46:34 -04:00
ostree-chain-input-stream.c core: Clean up object storage API 2012-05-03 19:59:13 -04:00
ostree-chain-input-stream.h core: Re-unify on one OSTREE_OBJECT_TYPE_FILE 2012-04-11 22:27:59 -04:00
ostree-checksum-input-stream.c core: Clean up checksumming 2012-04-11 22:04:06 -04:00
ostree-checksum-input-stream.h core: Clean up checksumming 2012-04-11 22:04:06 -04:00
ostree-core.c core: Fix mkdtemp invocation 2012-06-06 10:03:15 -04:00
ostree-core.h core: Switch to using mkdtemp() so we only depend on GLib 2.28 2012-05-29 22:34:11 -04:00
ostree-libarchive-input-stream.c core: Support for committing from any libarchive-supported format 2011-12-04 14:08:55 -05:00
ostree-libarchive-input-stream.h core: Support for committing from any libarchive-supported format 2011-12-04 14:08:55 -05:00
ostree-mutable-tree.c core: Port libostree to local alloc 2012-04-09 15:57:46 -04:00
ostree-mutable-tree.h core: Add ostree-types.h 2012-03-06 11:59:06 -05:00
ostree-repo-file-enumerator.c core: Make OstreeRepoFile "public" 2011-12-21 13:41:38 -05:00
ostree-repo-file-enumerator.h core: Make OstreeRepoFile "public" 2011-12-21 13:41:38 -05:00
ostree-repo-file.c core: Add valgrind framework, plug various memory leaks 2012-05-04 10:04:32 -04:00
ostree-repo-file.h core: Drop wrapping of metadata variants 2012-04-11 22:04:05 -04:00
ostree-repo.c core: Don't checkout symbolic links via hardlink 2012-05-26 11:55:12 -04:00
ostree-repo.h core: Make OstreeRepo struct private 2012-05-23 18:08:52 -04:00
ostree-sysroot.c core: Port libostree to local alloc 2012-04-09 15:57:46 -04:00
ostree-sysroot.h core: Associate branches with remotes, move trigger runs into checkout 2012-04-03 23:46:34 -04:00
ostree-traverse.c core: Limit recursion during traversal 2012-05-18 16:30:44 -04:00
ostree-traverse.h core: Move commit/dirtree traversal into library 2012-04-02 18:32:40 -04:00
ostree-types.h core: Add ostree-types.h 2012-03-06 11:59:06 -05:00
ostree.h core: Re-unify on one OSTREE_OBJECT_TYPE_FILE 2012-04-11 22:27:59 -04:00

README.md

Repository design

At the heart of OSTree is the repository. It's very similar to git, with the idea of content-addressed storage. However, OSTree is designed to store operating system binaries, not source code. There are several consequences to this. The key difference as compared to git is that the OSTree definition of "content" includes key Unix metadata such as owner uid/gid, as well as all extended attributes.

Essentially OSTree is designed so that if two files have the same OSTree checksum, it's safe to replace them with a hard link. This fundamental design means that an OSTree repository imposes negligible overhead. In contrast, a git repository stores copies of zlib-compressed data.

Key differences versus git

  • As mentioned above, extended attributes and owner uid/gid are versioned
  • Optimized for Unix hardlinks between repository and checkout
  • SHA256 instead of SHA1
  • Support for empty directories

Binary files

While this is still in planning, I plan to heavily optimize OSTree for versioning ELF operating systems. In industry jargon, this would be "content-aware storage".

Trimming history

OSTree will also be optimized to trim intermediate history; in theory one can regenerate binaries from corresponding (git) source code, so we don't need to keep all possible builds over time.

MILESTONE 1

  • Basic pack files (like git)

MILESTONE 2

  • Store checksums as ay
  • Drop version/metadata from tree/dirmeta objects
  • Add index size to superindex, pack size to index
    • So pull can calculate how much we need to download
  • Split pack files into metadata/data
  • pull: Extract all we can from each packfile one at a time, then delete it
  • Restructure repository so that links can be generated as a cache; i.e. objects/raw, pack files are now the canonical
  • For files, checksum combination of metadata variant + raw data
    • i.e. there is only OSTREE_OBJECT_TYPE_FILE (again)

MILESTONE 3

  • Drop archive/raw distinction - archive repositories always generate packfiles per commit
  • Include git packv4 ideas:
    • metadata packfiles have string dictionary (tree filenames and checksums)
    • data packfiles match up similar objects
  • Rolling checksums for partitioning large files? Kernel debuginfo
  • Improved pack clustering
    • file fingerprinting?
  • ELF-x86 aware deltas

git: http://git-scm.com/ Venti: http://plan9.bell-labs.com/magic/man2html/6/venti Elephant FS: http://www.hpl.hp.com/personal/Alistair_Veitch/papers/elephant-hotos/index.html

Compression

xdelta: http://xdelta.org/ Bsdiff: http://www.daemonology.net/bsdiff/ xz: http://tukaani.org/xz/