ostree/src/libostree
Colin Walters 9856ed3840 deltas: Don't try to rollsum/bsdiff .xz files
Fedora switched to 'xz' compress kernel modules, and recently
[RHEL7 did too](https://bugzilla.redhat.com/show_bug.cgi?id=1367496).
This compression defeats bsdiff.

While we have a "rollsum-able" test, we don't have a "bsdiff-able" test as it'd
be very expensive (we'd have to bsdiff, then apply it and compare the result).

Let's do the tactical quick fix here and just not try to delta files ending in
`.xz.`. This avoids us using bsdiff pointlessly for over 4000 files, which is
quite a notable speed increase for generating deltas.

Closes: #1333
Approved by: jlebon
2017-11-09 03:10:49 +00: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 lib: Move the bupsplit selftest into our test framework 2017-02-02 16:51:36 +00:00
bupsplit.h lib: Move the bupsplit selftest into our test framework 2017-02-02 16:51:36 +00:00
libostree-devel.sym Release 2017.13 2017-11-02 13:53:41 +00:00
libostree-experimental.sym lib/repo-finder: Add OstreeRepoFinderOverride 2017-10-19 19:11:58 +00:00
libostree-released.sym Release 2017.13 2017-11-02 13:53:41 +00:00
ostree-1.pc.in libostree: Expose $OSTREE_FEATURES in the pkg-config file 2017-05-08 18:48:07 +00:00
ostree-async-progress.c tree-wide: Remove Emacs modelines 2017-09-21 21:38:34 +00:00
ostree-async-progress.h tree-wide: Remove Emacs modelines 2017-09-21 21:38:34 +00:00
ostree-autocleanups.h lib/repo-finder: Add OstreeRepoFinderOverride 2017-10-19 19:11:58 +00:00
ostree-bloom-private.h tree-wide: Remove Emacs modelines 2017-09-21 21:38:34 +00:00
ostree-bloom.c lib/bloom: Add some missing preconditions on n_bytes 2017-10-02 18:08:55 +00:00
ostree-bootconfig-parser.c tree-wide: Remove Emacs modelines 2017-09-21 21:38:34 +00:00
ostree-bootconfig-parser.h tree-wide: Remove Emacs modelines 2017-09-21 21:38:34 +00:00
ostree-bootloader-grub2.c tree-wide: Update to new libglnx fd APIs 2017-10-11 19:26:10 +00:00
ostree-bootloader-grub2.h tree-wide: Remove Emacs modelines 2017-09-21 21:38:34 +00:00
ostree-bootloader-syslinux.c lib/syslinux: Port to fd-relative 2017-10-02 16:19:59 +00:00
ostree-bootloader-syslinux.h tree-wide: Remove Emacs modelines 2017-09-21 21:38:34 +00:00
ostree-bootloader-uboot.c tree-wide: Use autoptr for OstreeKernelArgs 2017-10-25 01:48:56 +00:00
ostree-bootloader-uboot.h tree-wide: Remove Emacs modelines 2017-09-21 21:38:34 +00:00
ostree-bootloader.c tree-wide: Remove Emacs modelines 2017-09-21 21:38:34 +00:00
ostree-bootloader.h tree-wide: Remove Emacs modelines 2017-09-21 21:38:34 +00:00
ostree-chain-input-stream.c tree-wide: Remove Emacs modelines 2017-09-21 21:38:34 +00:00
ostree-chain-input-stream.h tree-wide: Remove Emacs modelines 2017-09-21 21:38:34 +00:00
ostree-checksum-input-stream.c tree-wide: Remove Emacs modelines 2017-09-21 21:38:34 +00:00
ostree-checksum-input-stream.h tree-wide: Remove Emacs modelines 2017-09-21 21:38:34 +00:00
ostree-cmdprivate.c tree-wide: Remove Emacs modelines 2017-09-21 21:38:34 +00:00
ostree-cmdprivate.h tree-wide: Remove Emacs modelines 2017-09-21 21:38:34 +00:00
ostree-core-private.h lib/repo-finder: Add OstreeRepoFinderOverride 2017-10-19 19:11:58 +00:00
ostree-core.c lib/core: Fix documentation comment in ostree_validate_collection_id 2017-11-03 22:05:47 +00:00
ostree-core.h core: Add standard SOURCE_TITLE metadata key 2017-10-23 14:19:41 +00:00
ostree-deployment-private.h tree-wide: Remove Emacs modelines 2017-09-21 21:38:34 +00:00
ostree-deployment.c tree-wide: Remove Emacs modelines 2017-09-21 21:38:34 +00:00
ostree-deployment.h tree-wide: Remove Emacs modelines 2017-09-21 21:38:34 +00:00
ostree-diff.c lib/diff: Add compile-time ABI check on 64 bit arches 2017-09-27 18:20:10 +00:00
ostree-diff.h lib/diff: Add compile-time ABI check on 64 bit arches 2017-09-27 18:20:10 +00:00
ostree-dummy-enumtypes.c build: Don't run glib-mkenums if there's nothing to do 2016-05-12 17:15:50 +00:00
ostree-dummy-enumtypes.h build: Don't run glib-mkenums if there's nothing to do 2016-05-12 17:15:50 +00:00
ostree-enumtypes.c.template build: Add -Werror=undef by default, fix fallout 2017-11-06 15:30:14 +00:00
ostree-enumtypes.h.template Make enum generation private by default, export stub symbol 2016-05-12 17:15:50 +00:00
ostree-fetcher-curl.c fetcher/curl: Fix invalid memory access in finalize() 2017-11-07 15:37:20 +00:00
ostree-fetcher-soup.c lib/pull: Change fetcher to return O_TMPFILE 2017-10-05 14:58:20 +00:00
ostree-fetcher-uri.c tree-wide: Remove Emacs modelines 2017-09-21 21:38:34 +00:00
ostree-fetcher-util.c tree-wide: Remove Emacs modelines 2017-09-21 21:38:34 +00:00
ostree-fetcher-util.h lib/pull: Change fetcher to return O_TMPFILE 2017-10-05 14:58:20 +00:00
ostree-fetcher.h lib/pull: Change fetcher to return O_TMPFILE 2017-10-05 14:58:20 +00:00
ostree-gpg-verifier.c tree-wide: Update to new libglnx fd APIs 2017-10-11 19:26:10 +00:00
ostree-gpg-verifier.h lib/gpg: Print debug info when reading GPG keys 2017-10-03 13:09:33 +00:00
ostree-gpg-verify-result-private.h tree-wide: Remove Emacs modelines 2017-09-21 21:38:34 +00:00
ostree-gpg-verify-result.c tree-wide: Remove Emacs modelines 2017-09-21 21:38:34 +00:00
ostree-gpg-verify-result.h tree-wide: Remove Emacs modelines 2017-09-21 21:38:34 +00:00
ostree-impl-system-generator.c tree-wide: Update to new libglnx fd APIs 2017-10-11 19:26:10 +00:00
ostree-kernel-args.c tree-wide: Use autoptr for OstreeKernelArgs 2017-10-25 01:48:56 +00:00
ostree-kernel-args.h tree-wide: Use autoptr for OstreeKernelArgs 2017-10-25 01:48:56 +00:00
ostree-libarchive-input-stream.c tree-wide: Remove Emacs modelines 2017-09-21 21:38:34 +00:00
ostree-libarchive-input-stream.h tree-wide: Remove Emacs modelines 2017-09-21 21:38:34 +00:00
ostree-libarchive-private.h tree-wide: Remove Emacs modelines 2017-09-21 21:38:34 +00:00
ostree-linuxfsutil.c tree-wide: Remove Emacs modelines 2017-09-21 21:38:34 +00:00
ostree-linuxfsutil.h tree-wide: Remove Emacs modelines 2017-09-21 21:38:34 +00:00
ostree-lzma-common.c tree-wide: Remove Emacs modelines 2017-09-21 21:38:34 +00:00
ostree-lzma-common.h tree-wide: Remove Emacs modelines 2017-09-21 21:38:34 +00:00
ostree-lzma-compressor.c tree-wide: Remove Emacs modelines 2017-09-21 21:38:34 +00:00
ostree-lzma-compressor.h tree-wide: Remove Emacs modelines 2017-09-21 21:38:34 +00:00
ostree-lzma-decompressor.c tree-wide: Remove Emacs modelines 2017-09-21 21:38:34 +00:00
ostree-lzma-decompressor.h tree-wide: Remove Emacs modelines 2017-09-21 21:38:34 +00:00
ostree-metalink.c tree-wide: Remove Emacs modelines 2017-09-21 21:38:34 +00:00
ostree-metalink.h tree-wide: Remove Emacs modelines 2017-09-21 21:38:34 +00:00
ostree-mutable-tree.c tree-wide: Remove Emacs modelines 2017-09-21 21:38:34 +00:00
ostree-mutable-tree.h tree-wide: Remove Emacs modelines 2017-09-21 21:38:34 +00:00
ostree-ref.c tree-wide: Remove Emacs modelines 2017-09-21 21:38:34 +00:00
ostree-ref.h tree-wide: Remove Emacs modelines 2017-09-21 21:38:34 +00:00
ostree-remote-private.h lib/remote: Store name of remote providing keyring for dynamic remotes 2017-09-27 16:38:07 +00:00
ostree-remote.c lib/remote: Store name of remote providing keyring for dynamic remotes 2017-09-27 16:38:07 +00:00
ostree-remote.h tree-wide: Remove Emacs modelines 2017-09-21 21:38:34 +00:00
ostree-repo-checkout.c repo: Add wrapper function for setting devino cache on checkout opts 2017-10-20 18:20:19 +00:00
ostree-repo-commit.c lib/commit: Fix hardlink checkout commit with bare-user + mod xattrs 2017-10-23 17:02:28 +00:00
ostree-repo-deprecated.h tree-wide: Remove Emacs modelines 2017-09-21 21:38:34 +00:00
ostree-repo-file-enumerator.c tree-wide: Remove Emacs modelines 2017-09-21 21:38:34 +00:00
ostree-repo-file-enumerator.h tree-wide: Remove Emacs modelines 2017-09-21 21:38:34 +00:00
ostree-repo-file.c tree-wide: Remove Emacs modelines 2017-09-21 21:38:34 +00:00
ostree-repo-file.h tree-wide: Remove Emacs modelines 2017-09-21 21:38:34 +00:00
ostree-repo-finder-avahi-parser.c tree-wide: Remove Emacs modelines 2017-09-21 21:38:34 +00:00
ostree-repo-finder-avahi-private.h tree-wide: Remove Emacs modelines 2017-09-21 21:38:34 +00:00
ostree-repo-finder-avahi.c lib/repo-finder-avahi: Fix memory corruption of a GVariantIter 2017-10-24 12:55:24 +00:00
ostree-repo-finder-avahi.h tree-wide: Remove Emacs modelines 2017-09-21 21:38:34 +00:00
ostree-repo-finder-config.c tree-wide: Remove Emacs modelines 2017-09-21 21:38:34 +00:00
ostree-repo-finder-config.h tree-wide: Remove Emacs modelines 2017-09-21 21:38:34 +00:00
ostree-repo-finder-mount.c lib/repo-finder-mount: Ignore mounts which have a ‘system’ file system 2017-10-26 01:34:14 +00:00
ostree-repo-finder-mount.h tree-wide: Remove Emacs modelines 2017-09-21 21:38:34 +00:00
ostree-repo-finder-override.c lib/repo-finder: Add OstreeRepoFinderOverride 2017-10-19 19:11:58 +00:00
ostree-repo-finder-override.h lib/repo-finder: Add OstreeRepoFinderOverride 2017-10-19 19:11:58 +00:00
ostree-repo-finder.c tree-wide: Remove Emacs modelines 2017-09-21 21:38:34 +00:00
ostree-repo-finder.h tree-wide: Remove Emacs modelines 2017-09-21 21:38:34 +00:00
ostree-repo-libarchive.c libarchive: Fix assertion error if used with CANONICAL_PERMISSIONS 2017-09-28 19:59:24 +00:00
ostree-repo-private.h lib/commit: (refactor) Clean up delta bare write API 2017-10-18 14:07:55 +00:00
ostree-repo-prune.c tree-wide: Remove Emacs modelines 2017-09-21 21:38:34 +00:00
ostree-repo-pull.c lib/pull: Avoid error if current with --require-static-deltas 2017-11-06 19:41:07 +00:00
ostree-repo-refs.c Disallow refs starting with a non-letter or digit 2017-10-18 20:55:43 +00:00
ostree-repo-static-delta-compilation-analysis.c deltas: Don't try to rollsum/bsdiff .xz files 2017-11-09 03:10:49 +00:00
ostree-repo-static-delta-compilation.c deltas: Add an if0'd bit to print bsdiff objects 2017-11-01 17:38:26 +00:00
ostree-repo-static-delta-core.c tree-wide: Update to new libglnx fd APIs 2017-10-11 19:26:10 +00:00
ostree-repo-static-delta-private.h tree-wide: Remove Emacs modelines 2017-09-21 21:38:34 +00:00
ostree-repo-static-delta-processing.c lib: Minor static delta fixes 2017-10-30 22:52:02 +00:00
ostree-repo-traverse.c tree-wide: Remove Emacs modelines 2017-09-21 21:38:34 +00:00
ostree-repo.c lib/repo: Fix loading commitstate with parent repos 2017-10-26 07:06:50 +00:00
ostree-repo.h lib/repo: Add gtk-doc comment to OstreeRepoCommitState 2017-11-08 15:47:11 +00:00
ostree-rollsum.c tree-wide: Remove Emacs modelines 2017-09-21 21:38:34 +00:00
ostree-rollsum.h tree-wide: Remove Emacs modelines 2017-09-21 21:38:34 +00:00
ostree-sepolicy-private.h tree-wide: Remove Emacs modelines 2017-09-21 21:38:34 +00:00
ostree-sepolicy.c tree-wide: Update to new libglnx fd APIs 2017-10-11 19:26:10 +00:00
ostree-sepolicy.h tree-wide: Remove Emacs modelines 2017-09-21 21:38:34 +00:00
ostree-soup-form.c libcurl backend 2017-02-09 16:37:45 +00:00
ostree-soup-uri.c libcurl backend 2017-02-09 16:37:45 +00:00
ostree-soup-uri.h libcurl backend 2017-02-09 16:37:45 +00:00
ostree-sysroot-cleanup.c tree-wide: Update to new libglnx fd APIs 2017-10-11 19:26:10 +00:00
ostree-sysroot-deploy.c tree-wide: Use autoptr for OstreeKernelArgs 2017-10-25 01:48:56 +00:00
ostree-sysroot-private.h tree-wide: Remove Emacs modelines 2017-09-21 21:38:34 +00:00
ostree-sysroot-upgrader.c tree-wide: Remove Emacs modelines 2017-09-21 21:38:34 +00:00
ostree-sysroot-upgrader.h tree-wide: Remove Emacs modelines 2017-09-21 21:38:34 +00:00
ostree-sysroot.c tree-wide: Use autoptr for OstreeKernelArgs 2017-10-25 01:48:56 +00:00
ostree-sysroot.h tree-wide: Remove Emacs modelines 2017-09-21 21:38:34 +00:00
ostree-tls-cert-interaction.c tree-wide: Remove Emacs modelines 2017-09-21 21:38:34 +00:00
ostree-tls-cert-interaction.h tree-wide: Remove Emacs modelines 2017-09-21 21:38:34 +00:00
ostree-types.h tree-wide: Remove Emacs modelines 2017-09-21 21:38:34 +00:00
ostree-varint.c tree-wide: Remove Emacs modelines 2017-09-21 21:38:34 +00:00
ostree-varint.h tree-wide: Remove Emacs modelines 2017-09-21 21:38:34 +00:00
ostree-version.h.in tree-wide: Remove Emacs modelines 2017-09-21 21:38:34 +00:00
ostree.h lib/repo-finder: Add OstreeRepoFinderOverride 2017-10-19 19:11:58 +00: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/