ostree/src/libostree
Colin Walters b3ad113f78 Add "unconfigured-state" concept to origin files
Some operating systems may come with external tools for subscription
management that drive access to the content.  In that case, the origin
file may not be useful (for example, it could refer to an installer
ISO).

This patch will allow OS installers to inject that state, with a
useful error message, directing the system administrator to an
external tool.

See: https://github.com/projectatomic/rpm-ostree/issues/31

https://bugzilla.gnome.org/show_bug.cgi?id=737686
2014-10-03 14:03:55 -04:00
..
README-deltas.md Initial basic static delta code drop 2014-02-04 10:31:44 -05: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 libostree: Add _finish() API to async progress 2014-04-29 10:59:57 -04:00
ostree-async-progress.h libostree: Add _finish() API to async progress 2014-04-29 10:59:57 -04:00
ostree-bootconfig-parser.c deploy: fdatasync() bootloader configuration files 2014-04-11 18:43:27 -04:00
ostree-bootconfig-parser.h libostree: Add ostree_bootconfig_parser_clone() 2014-03-19 09:49:55 -04:00
ostree-bootloader-syslinux.c bootloader: fdatasync() bootloader configuration 2014-04-03 22:32:30 -04:00
ostree-bootloader-syslinux.h libostree: Make OstreeBootloader private 2013-09-15 20:26:13 -04:00
ostree-bootloader-uboot.c bootloader: fdatasync() bootloader configuration 2014-04-03 22:32:30 -04:00
ostree-bootloader-uboot.h libostree: Make OstreeBootloader private 2013-09-15 20:26:13 -04:00
ostree-bootloader.c libostree: Make OstreeBootloader private 2013-09-15 20:26:13 -04:00
ostree-bootloader.h libostree: Make OstreeBootloader private 2013-09-15 20:26:13 -04:00
ostree-chain-input-stream.c libostree: Fix many gtk-doc warnings 2013-08-17 08:41:31 -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 libostree: Fix many gtk-doc warnings 2013-08-17 08:41:31 -04:00
ostree-checksum-input-stream.h Switch to #pragma once for headers 2013-07-09 18:53:22 -04:00
ostree-core-private.h Initial basic static delta code drop 2014-02-04 10:31:44 -05:00
ostree-core.c upgrade: Refuse chronologically older commits unless --allow-downgrade 2014-02-20 18:25:56 -05:00
ostree-core.h Add repository "summary" file and metalink support 2014-09-03 13:21:52 -04:00
ostree-deployment.c libostree: Fix ostree_deployment_clone() to also clone bootconfig 2014-03-19 09:49:55 -04:00
ostree-deployment.h libostree: Fix an introspection scanner warning 2013-10-09 12:53:12 -04:00
ostree-diff.c SELinux: Ensure we label /var, and fix /etc merge wrt xattrs 2014-02-02 11:32:52 -05:00
ostree-diff.h SELinux: Ensure we label /var, and fix /etc merge wrt xattrs 2014-02-02 11:32:52 -05:00
ostree-fetcher.c fetcher: Close request body on error paths 2014-08-27 14:00:31 -04:00
ostree-fetcher.h core: Support a per-remote "proxy" configuration option 2014-07-28 13:49:38 -04:00
ostree-gpg-verifier.c libostree: Add a better error if we fail to read keyring directory 2014-03-14 14:42:46 -04:00
ostree-gpg-verifier.h trivial: Don't include config.h in headers 2013-10-15 15:26:37 -04:00
ostree-kernel-args.c ostree admin instutil set-kargs: make more flexible 2014-09-26 10:40:37 -04:00
ostree-kernel-args.h ostree admin instutil set-kargs: make more flexible 2014-09-26 10:40:37 -04:00
ostree-libarchive-input-stream.c libostree: Make OstreeLibarchiveInputStream explicitly private 2014-06-09 14:04:53 -04:00
ostree-libarchive-input-stream.h libostree: Make OstreeLibarchiveInputStream explicitly private 2014-06-09 14:04:53 -04:00
ostree-linuxfsutil.c libostree: Silently ignore EPERM when setting EXT2_IMMUTABLE_FL 2014-06-09 14:44:17 -04:00
ostree-linuxfsutil.h deploy: Set the immutable bit on the deployment root 2014-06-03 13:41:48 -04:00
ostree-lzma-common.c deltas: Link to liblzma, add internal API to use it 2014-04-29 10:59:57 -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 deltas: Link to liblzma, add internal API to use it 2014-04-29 10:59:57 -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 deltas: Link to liblzma, add internal API to use it 2014-04-29 10:59:57 -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 Add repository "summary" file and metalink support 2014-09-03 13:21:52 -04:00
ostree-metalink.h Add repository "summary" file and metalink support 2014-09-03 13:21:52 -04:00
ostree-mutable-tree.c doc: Add OstreeMutableTree, other minor doc updates 2013-09-12 23:53:13 -04:00
ostree-mutable-tree.h Switch to #pragma once for headers 2013-07-09 18:53:22 -04:00
ostree-repo-checkout.c Honor disable_fsync during checkout also 2014-06-04 16:14:46 +02:00
ostree-repo-commit.c [staticanalysis]: Actually check errors on splice() of objects 2014-06-21 18:08:49 -04:00
ostree-repo-file-enumerator.c Install a shared library 2013-07-26 19:25:07 -04:00
ostree-repo-file-enumerator.h Switch to #pragma once for headers 2013-07-09 18:53:22 -04:00
ostree-repo-file.c repofile: Avoid segfault if querying child in non-directory 2014-07-21 07:58:07 -04:00
ostree-repo-file.h repo-file: Base OstreeRepoFile on trees instead of commits 2013-09-09 22:31:59 -04:00
ostree-repo-libarchive.c libostree: Make OstreeLibarchiveInputStream explicitly private 2014-06-09 14:04:53 -04:00
ostree-repo-private.h repo-pull: Allow pulling only one directory 2014-08-20 15:09:32 -04:00
ostree-repo-prune.c repo-pull: Allow pulling only one directory 2014-08-20 15:09:32 -04:00
ostree-repo-pull.c pull: Support full recursive mirrors of repositories with summary file 2014-10-03 13:56:40 -04:00
ostree-repo-refs.c refs: Don't try searching for input strings that can't be objects 2014-07-23 15:09:24 -04:00
ostree-repo-static-delta-compilation.c deltas: Add a timestamp to delta metadata 2014-02-10 09:40:35 -05:00
ostree-repo-static-delta-core.c deltas: Add a timestamp to delta metadata 2014-02-10 09:40:35 -05:00
ostree-repo-static-delta-private.h TODO: update 2014-03-15 19:05:52 -04:00
ostree-repo-static-delta-processing.c Initial basic static delta code drop 2014-02-04 10:31:44 -05:00
ostree-repo-traverse.c [staticanalysis]: Fix two uses of uninitialized variables 2014-06-21 18:08:49 -04:00
ostree-repo.c pull: Support full recursive mirrors of repositories with summary file 2014-10-03 13:56:40 -04:00
ostree-repo.h Add API to directly link() objects between repositories 2014-10-01 23:20:35 -04:00
ostree-sepolicy.c build: Fix build without SELinux 2014-02-20 10:12:53 -05:00
ostree-sepolicy.h libostree: Split off SELinux OstreeSePolicy class 2014-02-19 08:43:45 -05:00
ostree-sysroot-cleanup.c deploy: Set the immutable bit on the deployment root 2014-06-03 13:41:48 -04:00
ostree-sysroot-deploy.c deploy: Copy parent directories for modified config files 2014-09-16 12:06:10 -04:00
ostree-sysroot-private.h deploy: Rework kernel arguments, add --karg-append to "admin deploy" 2014-01-16 15:07:55 -05:00
ostree-sysroot-upgrader.c Add "unconfigured-state" concept to origin files 2014-10-03 14:03:55 -04:00
ostree-sysroot-upgrader.h Add "unconfigured-state" concept to origin files 2014-10-03 14:03:55 -04:00
ostree-sysroot.c sysroot: Add precondition that load() has been called for some API calls 2014-08-15 15:21:40 -04:00
ostree-sysroot.h Move basic commit API into ostree_sysroot_simple_write_deployment() 2014-03-23 11:36:09 -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 Add an OstreeSysrootUpgrader API 2014-03-24 18:08:22 -04:00
ostree-varint.c Initial basic static delta code drop 2014-02-04 10:31:44 -05:00
ostree-varint.h Initial basic static delta code drop 2014-02-04 10:31:44 -05:00
ostree.h Add an OstreeSysrootUpgrader API 2014-03-24 18:08:22 -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/