ostree/src/libostree
Matthew Barnes 1f1bfbf711 fetcher: Lazily create tmp directory
The tmp directory is lazily created for each fetcher instance, since
it may require superuser permissions and some instances only need
_ostree_fetcher_request_uri_to_membuf() which keeps everything in
memory buffers.
2015-12-19 09:21:22 -05:00
..
README-deltas.md syntax-check: Remove empty lines at the end of file 2015-02-02 15:07:56 +01:00
README-gpg pull: Verify commits with gpg signatures from detached metadata 2013-09-29 14:49:47 -04:00
README.md core: Associate branches with remotes, move trigger runs into checkout 2012-04-03 23:46:34 -04:00
bupsplit.c core: Import bup's "rollsum" code, add a test case 2014-02-04 10:12:56 -05:00
bupsplit.h core: Import bup's "rollsum" code, add a test case 2014-02-04 10:12:56 -05:00
ostree-1.pc.in Install a shared library 2013-07-26 19:25:07 -04:00
ostree-async-progress.c Remove unnecessary #include "libgsystem.h" 2015-05-06 22:07:11 -04:00
ostree-async-progress.h syntax-check: Remove empty lines at the end of file 2015-02-02 15:07:56 +01:00
ostree-bootconfig-parser.c bootconfig: Add ostree_bootconfig_parser_write_at 2015-12-19 08:24:51 -05:00
ostree-bootconfig-parser.h bootconfig: Add ostree_bootconfig_parser_write_at 2015-12-19 08:24:51 -05:00
ostree-bootloader-grub2.c Remove unnecessary #include "libgsystem.h" 2015-05-06 22:07:11 -04:00
ostree-bootloader-grub2.h syntax-check: Remove empty lines at the end of file 2015-02-02 15:07:56 +01:00
ostree-bootloader-syslinux.c Remove unnecessary #include "libgsystem.h" 2015-05-06 22:07:11 -04:00
ostree-bootloader-syslinux.h syntax-check: Remove empty lines at the end of file 2015-02-02 15:07:56 +01:00
ostree-bootloader-uboot.c Don't require /boot/uEnv.txt for u-boot support 2015-10-12 10:22:12 -04:00
ostree-bootloader-uboot.h libostree: Make OstreeBootloader private 2013-09-15 20:26:13 -04:00
ostree-bootloader.c Remove unnecessary #include "libgsystem.h" 2015-05-06 22:07:11 -04:00
ostree-bootloader.h syntax-check: Remove empty lines at the end of file 2015-02-02 15:07:56 +01:00
ostree-chain-input-stream.c Remove unnecessary #include "libgsystem.h" 2015-05-06 22:07:11 -04:00
ostree-chain-input-stream.h core: Fix all introspection warnings 2013-07-27 10:13:30 -04:00
ostree-checksum-input-stream.c Remove unnecessary #include "libgsystem.h" 2015-05-06 22:07:11 -04:00
ostree-checksum-input-stream.h syntax-check: Remove empty lines at the end of file 2015-02-02 15:07:56 +01:00
ostree-cmdprivate.c Teach fsck about partial commits 2015-05-06 08:07:20 -04:00
ostree-cmdprivate.h syntax-check: Remove empty lines at the end of file 2015-02-02 15:07:56 +01:00
ostree-core-private.h core: Add _ostree_get_default_sysroot_path() 2015-07-16 12:48:11 -04:00
ostree-core.c pull: add support for tombstone commits 2015-11-03 09:53:38 +01:00
ostree-core.h pull: add support for tombstone commits 2015-11-03 09:53:38 +01:00
ostree-deployment-private.h deploy: Find kernel/initramfs consistently from filesystem 2015-12-19 08:24:51 -05:00
ostree-deployment.c deploy: Find kernel/initramfs consistently from filesystem 2015-12-19 08:24:51 -05:00
ostree-deployment.h deployment: Add an API to get relative origin path 2015-03-10 10:47:47 -04:00
ostree-diff.c Remove unnecessary #include "libgsystem.h" 2015-05-06 22:07:11 -04:00
ostree-diff.h syntax-check: Remove empty lines at the end of file 2015-02-02 15:07:56 +01:00
ostree-enumtypes.c.template fetcher: Add "config-flags" construct-only property 2015-12-14 09:41:29 -05:00
ostree-enumtypes.h.template fetcher: Add "config-flags" construct-only property 2015-12-14 09:41:29 -05:00
ostree-fetcher.c fetcher: Lazily create tmp directory 2015-12-19 09:21:22 -05:00
ostree-fetcher.h fetcher: Lazily create tmp directory 2015-12-19 09:21:22 -05:00
ostree-gpg-verifier.c gpg-verifier: Fix compiler warning 2015-12-04 09:51:14 -05:00
ostree-gpg-verifier.h repo: Change GPG verification policy 2015-06-10 12:28:57 -04:00
ostree-gpg-verify-result-private.h libotutil: Establish a place for GPG utilities 2015-05-01 10:20:34 -04:00
ostree-gpg-verify-result.c libostree: Fix a couple compiler warnings 2015-11-12 14:32:07 -05:00
ostree-gpg-verify-result.h gpg: Add ostree_gpg_verify_result_describe_variant() 2015-05-06 21:04:40 -04:00
ostree-kernel-args.c Remove unnecessary #include "libgsystem.h" 2015-05-06 22:07:11 -04:00
ostree-kernel-args.h syntax-check: Remove empty lines at the end of file 2015-02-02 15:07:56 +01:00
ostree-libarchive-input-stream.c Remove unnecessary #include "libgsystem.h" 2015-05-06 22:07:11 -04:00
ostree-libarchive-input-stream.h syntax-check: Remove empty lines at the end of file 2015-02-02 15:07:56 +01:00
ostree-linuxfsutil.c Remove unnecessary #include "libgsystem.h" 2015-05-06 22:07:11 -04:00
ostree-linuxfsutil.h syntax-check: Remove empty lines at the end of file 2015-02-02 15:07:56 +01:00
ostree-lzma-common.c static-delta: Handle LZMA_BUF_ERROR returned by zlib 2015-10-10 10:27:17 -04:00
ostree-lzma-common.h deltas: Link to liblzma, add internal API to use it 2014-04-29 10:59:57 -04:00
ostree-lzma-compressor.c static-delta: Handle LZMA_BUF_ERROR returned by zlib 2015-10-10 10:27:17 -04:00
ostree-lzma-compressor.h deltas: Link to liblzma, add internal API to use it 2014-04-29 10:59:57 -04:00
ostree-lzma-decompressor.c static-delta: Handle LZMA_BUF_ERROR returned by zlib 2015-10-10 10:27:17 -04:00
ostree-lzma-decompressor.h deltas: Link to liblzma, add internal API to use it 2014-04-29 10:59:57 -04:00
ostree-metalink.c pull: Push a temporary main context for sync requests 2015-12-14 11:11:34 -05:00
ostree-metalink.h pull: Stop using GMainLoop 2015-08-13 22:02:00 -04:00
ostree-mutable-tree.c Remove unnecessary #include "libgsystem.h" 2015-05-06 22:07:11 -04:00
ostree-mutable-tree.h syntax-check: Remove empty lines at the end of file 2015-02-02 15:07:56 +01:00
ostree-repo-checkout.c Use g_autoptr(GVariant) instead of gs_unref_variant 2015-05-06 22:07:10 -04:00
ostree-repo-commit.c repo: Use per-transaction staging dir 2015-12-14 08:38:51 +01:00
ostree-repo-file-enumerator.c Remove unnecessary #include "libgsystem.h" 2015-05-06 22:07:11 -04:00
ostree-repo-file-enumerator.h syntax-check: Remove empty lines at the end of file 2015-02-02 15:07:56 +01:00
ostree-repo-file.c repo: Validate checksums have correct length 2015-11-17 20:35:54 -05:00
ostree-repo-file.h syntax-check: Remove empty lines at the end of file 2015-02-02 15:07:56 +01:00
ostree-repo-libarchive.c Use g_autoptr(GPtrArray) instead of gs_unref_ptrarray 2015-05-06 22:07:10 -04:00
ostree-repo-private.h repo: Use per-transaction staging dir 2015-12-14 08:38:51 +01:00
ostree-repo-prune.c repo: new function ostree_repo_prune_static_deltas 2015-12-18 11:21:57 +01:00
ostree-repo-pull.c repo: Allocate a tmpdir for each OstreeFetcher to isolate concurrent downloads 2015-12-14 08:39:11 +01:00
ostree-repo-refs.c repo: Validate checksums have correct length 2015-11-17 20:35:54 -05:00
ostree-repo-static-delta-compilation-analysis.c static-delta: Ignore symlinks when computing similar objects 2015-08-26 16:25:28 -04:00
ostree-repo-static-delta-compilation.c deltas: Support including detached metadata in static deltas 2015-11-10 08:56:16 +01:00
ostree-repo-static-delta-core.c deltas: Support including detached metadata in static deltas 2015-11-10 08:56:16 +01:00
ostree-repo-static-delta-private.h deltas: Verify checksums in apply-offline unless skip_validate is TRUE 2015-11-10 08:56:14 +01:00
ostree-repo-static-delta-processing.c deltas: Verify checksums in apply-offline unless skip_validate is TRUE 2015-11-10 08:56:14 +01:00
ostree-repo-traverse.c Remove unnecessary #include "libgsystem.h" 2015-05-06 22:07:11 -04:00
ostree-repo.c fetcher: Lazily create tmp directory 2015-12-19 09:21:22 -05:00
ostree-repo.h repo: new function ostree_repo_prune_static_deltas 2015-12-18 11:21:57 +01:00
ostree-rollsum.c rollsum: Fix assertion for CRC matches 2015-08-25 09:26:22 -04:00
ostree-rollsum.h Add bsdiff support to deltas 2015-03-03 12:16:17 -05:00
ostree-sepolicy.c Remove unnecessary #include "libgsystem.h" 2015-05-06 22:07:11 -04:00
ostree-sepolicy.h syntax-check: Remove empty lines at the end of file 2015-02-02 15:07:56 +01:00
ostree-sysroot-cleanup.c sysroot: Cleanup refs and prune even on last undeployment 2015-09-24 12:25:23 -04:00
ostree-sysroot-deploy.c deploy: Change large parts to be fd-relative, drop fsync 2015-12-19 08:24:51 -05:00
ostree-sysroot-private.h sysroot: Add ostree_sysroot_prepare_cleanup() 2015-09-16 09:23:37 -04:00
ostree-sysroot-upgrader.c upgrader: Allow overriding the commit to pull 2015-10-13 12:34:56 -04:00
ostree-sysroot-upgrader.h upgrader: Add ostree_sysroot_upgrader_dup_origin() 2015-10-13 12:34:56 -04:00
ostree-sysroot.c sysroot: Add an unload() API 2015-08-13 12:43:14 -04:00
ostree-sysroot.h Mutable is a keyword in C++11 2015-09-23 08:29:35 -04:00
ostree-tls-cert-interaction.c libostree: Make OstreeTlsCertInteraction explicitly private 2014-06-09 14:04:53 -04:00
ostree-tls-cert-interaction.h libostree: Make OstreeTlsCertInteraction explicitly private 2014-06-09 14:04:53 -04:00
ostree-types.h syntax-check: Remove empty lines at the end of file 2015-02-02 15:07:56 +01:00
ostree-varint.c syntax-check: Remove empty lines at the end of file 2015-02-02 15:07:56 +01:00
ostree-varint.h syntax-check: Remove empty lines at the end of file 2015-02-02 15:07:56 +01:00
ostree.h Include ostree-gpg-verify-result.h in ostree.h 2015-03-31 19:48:55 -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/