ostree/src/libostree
Saqib Ali 725d50a3b5 src/ostree: Add --commit-only option to ostree prune
Recently we have noticed exceedingly long execution times
for multiple invocations of ostree prune. This is a result of
calculating full reachability on each invocation.

The --commit-only flag provides an alternative strategy. It will only
traverse and delete commit objects to avoid the more expensive
reachability calculations. This allows us to chain multiple --commit-only
commands cheaply, and then follow with a more expensive ostree prune
invocation at the end to clean up orphaned meta and content objects.
2022-02-25 18:32:25 -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 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 src/ostree: Add --commit-only option to ostree prune 2022-02-25 18:32:25 -05:00
libostree-released.sym Update FSF license notices to use URL instead of address 2021-12-07 08:34:25 -05:00
ostree-1.pc.in main: Also support CLI extensions in `/usr/libexec/libostree/ext` 2022-01-11 20:13:33 -05:00
ostree-async-progress.c Update FSF license notices to use URL instead of address 2021-12-07 08:34:25 -05:00
ostree-async-progress.h Update FSF license notices to use URL instead of address 2021-12-07 08:34:25 -05:00
ostree-autocleanups.h Update FSF license notices to use URL instead of address 2021-12-07 08:34:25 -05:00
ostree-bloom-private.h Update FSF license notices to use URL instead of address 2021-12-07 08:34:25 -05:00
ostree-bloom.c Update FSF license notices to use URL instead of address 2021-12-07 08:34:25 -05:00
ostree-bootconfig-parser.c Update FSF license notices to use URL instead of address 2021-12-07 08:34:25 -05:00
ostree-bootconfig-parser.h Update FSF license notices to use URL instead of address 2021-12-07 08:34:25 -05:00
ostree-bootloader-grub2.c Update FSF license notices to use URL instead of address 2021-12-07 08:34:25 -05:00
ostree-bootloader-grub2.h Update FSF license notices to use URL instead of address 2021-12-07 08:34:25 -05:00
ostree-bootloader-syslinux.c Update FSF license notices to use URL instead of address 2021-12-07 08:34:25 -05:00
ostree-bootloader-syslinux.h Update FSF license notices to use URL instead of address 2021-12-07 08:34:25 -05:00
ostree-bootloader-uboot.c Update FSF license notices to use URL instead of address 2021-12-07 08:34:25 -05:00
ostree-bootloader-uboot.h Update FSF license notices to use URL instead of address 2021-12-07 08:34:25 -05:00
ostree-bootloader-zipl.c lib/bootloader: use ot_journal_print() instead of sd-journal 2022-02-11 15:40:26 -08:00
ostree-bootloader-zipl.h s390x: add "IBM Secure Execution for Linux" support 2022-02-11 09:00:38 +01:00
ostree-bootloader.c s390x: add "IBM Secure Execution for Linux" support 2022-02-11 09:00:38 +01:00
ostree-bootloader.h s390x: add "IBM Secure Execution for Linux" support 2022-02-11 09:00:38 +01:00
ostree-chain-input-stream.c Update FSF license notices to use URL instead of address 2021-12-07 08:34:25 -05:00
ostree-chain-input-stream.h Update FSF license notices to use URL instead of address 2021-12-07 08:34:25 -05:00
ostree-checksum-input-stream.c Update FSF license notices to use URL instead of address 2021-12-07 08:34:25 -05:00
ostree-checksum-input-stream.h Update FSF license notices to use URL instead of address 2021-12-07 08:34:25 -05:00
ostree-cmdprivate.c Update FSF license notices to use URL instead of address 2021-12-07 08:34:25 -05:00
ostree-cmdprivate.h Update FSF license notices to use URL instead of address 2021-12-07 08:34:25 -05:00
ostree-content-writer.c Update FSF license notices to use URL instead of address 2021-12-07 08:34:25 -05:00
ostree-content-writer.h Update FSF license notices to use URL instead of address 2021-12-07 08:34:25 -05:00
ostree-core-private.h Update FSF license notices to use URL instead of address 2021-12-07 08:34:25 -05:00
ostree-core.c core: Mark `ostree_create_directory_metadata` as `(not nullable)` 2022-02-11 14:09:49 -05:00
ostree-core.h lib/repo: Add commit version metadata to summary metadata 2022-02-04 14:28:11 -07:00
ostree-date-utils-private.h Update FSF license notices to use URL instead of address 2021-12-07 08:34:25 -05:00
ostree-date-utils.c Update FSF license notices to use URL instead of address 2021-12-07 08:34:25 -05:00
ostree-deployment-private.h Update FSF license notices to use URL instead of address 2021-12-07 08:34:25 -05:00
ostree-deployment.c Update FSF license notices to use URL instead of address 2021-12-07 08:34:25 -05:00
ostree-deployment.h Update FSF license notices to use URL instead of address 2021-12-07 08:34:25 -05:00
ostree-diff.c Update FSF license notices to use URL instead of address 2021-12-07 08:34:25 -05:00
ostree-diff.h Update FSF license notices to use URL instead of address 2021-12-07 08:34:25 -05:00
ostree-dummy-enumtypes.c Update FSF license notices to use URL instead of address 2021-12-07 08:34:25 -05:00
ostree-dummy-enumtypes.h Update FSF license notices to use URL instead of address 2021-12-07 08:34:25 -05:00
ostree-enumtypes.c.template Update FSF license notices to use URL instead of address 2021-12-07 08:34:25 -05:00
ostree-enumtypes.h.template Update FSF license notices to use URL instead of address 2021-12-07 08:34:25 -05:00
ostree-fetcher-curl.c Update FSF license notices to use URL instead of address 2021-12-07 08:34:25 -05:00
ostree-fetcher-soup.c Update FSF license notices to use URL instead of address 2021-12-07 08:34:25 -05:00
ostree-fetcher-uri.c Update FSF license notices to use URL instead of address 2021-12-07 08:34:25 -05:00
ostree-fetcher-util.c Update FSF license notices to use URL instead of address 2021-12-07 08:34:25 -05:00
ostree-fetcher-util.h Update FSF license notices to use URL instead of address 2021-12-07 08:34:25 -05:00
ostree-fetcher.h Update FSF license notices to use URL instead of address 2021-12-07 08:34:25 -05:00
ostree-gpg-verifier.c Update FSF license notices to use URL instead of address 2021-12-07 08:34:25 -05:00
ostree-gpg-verifier.h Update FSF license notices to use URL instead of address 2021-12-07 08:34:25 -05:00
ostree-gpg-verify-result-dummy.c lib/gpg-verify-result: Add missing floating annotation 2022-02-09 14:35:31 -05:00
ostree-gpg-verify-result-private.h Update FSF license notices to use URL instead of address 2021-12-07 08:34:25 -05:00
ostree-gpg-verify-result.c lib/gpg-verify-result: Add missing floating annotation 2022-02-09 14:35:31 -05:00
ostree-gpg-verify-result.h Update FSF license notices to use URL instead of address 2021-12-07 08:34:25 -05:00
ostree-impl-system-generator.c Update FSF license notices to use URL instead of address 2021-12-07 08:34:25 -05:00
ostree-kernel-args.c Update FSF license notices to use URL instead of address 2021-12-07 08:34:25 -05:00
ostree-kernel-args.h Update FSF license notices to use URL instead of address 2021-12-07 08:34:25 -05:00
ostree-libarchive-input-stream.c Update FSF license notices to use URL instead of address 2021-12-07 08:34:25 -05:00
ostree-libarchive-input-stream.h Update FSF license notices to use URL instead of address 2021-12-07 08:34:25 -05:00
ostree-libarchive-private.h Update FSF license notices to use URL instead of address 2021-12-07 08:34:25 -05:00
ostree-linuxfsutil.c Update FSF license notices to use URL instead of address 2021-12-07 08:34:25 -05:00
ostree-linuxfsutil.h Update FSF license notices to use URL instead of address 2021-12-07 08:34:25 -05:00
ostree-lzma-common.c Add SPDX-License-Identifier to source files 2018-01-30 20:03:42 +00:00
ostree-lzma-common.h Add SPDX-License-Identifier to source files 2018-01-30 20:03:42 +00:00
ostree-lzma-compressor.c Add SPDX-License-Identifier to source files 2018-01-30 20:03:42 +00:00
ostree-lzma-compressor.h Add SPDX-License-Identifier to source files 2018-01-30 20:03:42 +00:00
ostree-lzma-decompressor.c Add SPDX-License-Identifier to source files 2018-01-30 20:03:42 +00:00
ostree-lzma-decompressor.h Add SPDX-License-Identifier to source files 2018-01-30 20:03:42 +00:00
ostree-metalink.c Update FSF license notices to use URL instead of address 2021-12-07 08:34:25 -05:00
ostree-metalink.h Update FSF license notices to use URL instead of address 2021-12-07 08:34:25 -05:00
ostree-mutable-tree.c mtree: Load traversed subdirs when creating parents 2022-02-18 10:30:27 -05:00
ostree-mutable-tree.h Update FSF license notices to use URL instead of address 2021-12-07 08:34:25 -05:00
ostree-ref.c Update FSF license notices to use URL instead of address 2021-12-07 08:34:25 -05:00
ostree-ref.h Update FSF license notices to use URL instead of address 2021-12-07 08:34:25 -05:00
ostree-remote-private.h Update FSF license notices to use URL instead of address 2021-12-07 08:34:25 -05:00
ostree-remote.c Update FSF license notices to use URL instead of address 2021-12-07 08:34:25 -05:00
ostree-remote.h Update FSF license notices to use URL instead of address 2021-12-07 08:34:25 -05:00
ostree-repo-checkout.c Update FSF license notices to use URL instead of address 2021-12-07 08:34:25 -05:00
ostree-repo-commit.c lib/commit: clean up assertions 2022-02-01 17:33:28 +00:00
ostree-repo-deprecated.h Update FSF license notices to use URL instead of address 2021-12-07 08:34:25 -05:00
ostree-repo-file-enumerator.c Update FSF license notices to use URL instead of address 2021-12-07 08:34:25 -05:00
ostree-repo-file-enumerator.h Update FSF license notices to use URL instead of address 2021-12-07 08:34:25 -05:00
ostree-repo-file.c Update FSF license notices to use URL instead of address 2021-12-07 08:34:25 -05:00
ostree-repo-file.h Update FSF license notices to use URL instead of address 2021-12-07 08:34:25 -05:00
ostree-repo-finder-avahi-parser.c Update FSF license notices to use URL instead of address 2021-12-07 08:34:25 -05:00
ostree-repo-finder-avahi-private.h Update FSF license notices to use URL instead of address 2021-12-07 08:34:25 -05:00
ostree-repo-finder-avahi.c Update FSF license notices to use URL instead of address 2021-12-07 08:34:25 -05:00
ostree-repo-finder-avahi.h Update FSF license notices to use URL instead of address 2021-12-07 08:34:25 -05:00
ostree-repo-finder-config.c Update FSF license notices to use URL instead of address 2021-12-07 08:34:25 -05:00
ostree-repo-finder-config.h Update FSF license notices to use URL instead of address 2021-12-07 08:34:25 -05:00
ostree-repo-finder-mount.c Update FSF license notices to use URL instead of address 2021-12-07 08:34:25 -05:00
ostree-repo-finder-mount.h Update FSF license notices to use URL instead of address 2021-12-07 08:34:25 -05:00
ostree-repo-finder-override.c Update FSF license notices to use URL instead of address 2021-12-07 08:34:25 -05:00
ostree-repo-finder-override.h Update FSF license notices to use URL instead of address 2021-12-07 08:34:25 -05:00
ostree-repo-finder.c Update FSF license notices to use URL instead of address 2021-12-07 08:34:25 -05:00
ostree-repo-finder.h Update FSF license notices to use URL instead of address 2021-12-07 08:34:25 -05:00
ostree-repo-libarchive.c lib/tar: Add some error prefixing 2022-02-15 15:33:04 -05:00
ostree-repo-os.c Update FSF license notices to use URL instead of address 2021-12-07 08:34:25 -05:00
ostree-repo-os.h Update FSF license notices to use URL instead of address 2021-12-07 08:34:25 -05:00
ostree-repo-private.h lib/repo: Add commit version metadata to summary metadata 2022-02-04 14:28:11 -07:00
ostree-repo-prune.c src/ostree: Add --commit-only option to ostree prune 2022-02-25 18:32:25 -05:00
ostree-repo-pull-private.h Update FSF license notices to use URL instead of address 2021-12-07 08:34:25 -05:00
ostree-repo-pull-verify.c Update FSF license notices to use URL instead of address 2021-12-07 08:34:25 -05:00
ostree-repo-pull.c Fix marking static delta commits as partial 2022-02-19 08:11:23 -06:00
ostree-repo-refs.c lib/repo-refs: Remove misleading newline 2022-02-19 14:46:02 -06:00
ostree-repo-static-delta-compilation-analysis.c Update FSF license notices to use URL instead of address 2021-12-07 08:34:25 -05:00
ostree-repo-static-delta-compilation.c Update FSF license notices to use URL instead of address 2021-12-07 08:34:25 -05:00
ostree-repo-static-delta-core.c Update FSF license notices to use URL instead of address 2021-12-07 08:34:25 -05:00
ostree-repo-static-delta-private.h Update FSF license notices to use URL instead of address 2021-12-07 08:34:25 -05:00
ostree-repo-static-delta-processing.c lib/static-delta: throw a proper error on bspatch failure 2022-01-03 17:38:51 +00:00
ostree-repo-traverse.c src/ostree: Add --commit-only option to ostree prune 2022-02-25 18:32:25 -05:00
ostree-repo-verity.c Update FSF license notices to use URL instead of address 2021-12-07 08:34:25 -05:00
ostree-repo.c lib/repo: Add commit version metadata to summary metadata 2022-02-04 14:28:11 -07:00
ostree-repo.h src/ostree: Add --commit-only option to ostree prune 2022-02-25 18:32:25 -05:00
ostree-rollsum.c Update FSF license notices to use URL instead of address 2021-12-07 08:34:25 -05:00
ostree-rollsum.h Update FSF license notices to use URL instead of address 2021-12-07 08:34:25 -05:00
ostree-sepolicy-private.h Update FSF license notices to use URL instead of address 2021-12-07 08:34:25 -05:00
ostree-sepolicy.c libostree/sepolicy: get rid of a g_setenv() call 2022-01-11 15:56:13 +00:00
ostree-sepolicy.h Update FSF license notices to use URL instead of address 2021-12-07 08:34:25 -05:00
ostree-sign-dummy.c Update FSF license notices to use URL instead of address 2021-12-07 08:34:25 -05:00
ostree-sign-dummy.h Update FSF license notices to use URL instead of address 2021-12-07 08:34:25 -05:00
ostree-sign-ed25519.c Update FSF license notices to use URL instead of address 2021-12-07 08:34:25 -05:00
ostree-sign-ed25519.h Update FSF license notices to use URL instead of address 2021-12-07 08:34:25 -05:00
ostree-sign.c Update FSF license notices to use URL instead of address 2021-12-07 08:34:25 -05:00
ostree-sign.h Update FSF license notices to use URL instead of address 2021-12-07 08:34:25 -05:00
ostree-soup-form.c lib/repo: Add (transfer) annotations to various GHashTable arguments 2017-11-14 23:13:14 +00:00
ostree-soup-uri.c soup-uri: Fix clang-analyzer warning by dropping dead code 2021-12-21 15:13:56 -05:00
ostree-soup-uri.h libcurl backend 2017-02-09 16:37:45 +00:00
ostree-sysroot-cleanup.c Update FSF license notices to use URL instead of address 2021-12-07 08:34:25 -05:00
ostree-sysroot-deploy.c Merge pull request #2491 from nikita-dubrovskii/secure-execution 2022-02-11 15:34:55 -05:00
ostree-sysroot-private.h deploy: Add a 5s max timeout on global filesystem `sync()` 2022-01-18 09:19:20 -05:00
ostree-sysroot-upgrader.c Update FSF license notices to use URL instead of address 2021-12-07 08:34:25 -05:00
ostree-sysroot-upgrader.h Update FSF license notices to use URL instead of address 2021-12-07 08:34:25 -05:00
ostree-sysroot.c deploy: Add a 5s max timeout on global filesystem `sync()` 2022-01-18 09:19:20 -05:00
ostree-sysroot.h sysroot: Add a public `#define OSTREE_PATH_BOOTED` 2022-01-12 12:47:11 -05:00
ostree-tls-cert-interaction-private.h Remove OstreeTlsCertInteraction bits from introspection 2021-10-06 12:42:56 -04:00
ostree-tls-cert-interaction.c Remove OstreeTlsCertInteraction bits from introspection 2021-10-06 12:42:56 -04:00
ostree-types.h Update FSF license notices to use URL instead of address 2021-12-07 08:34:25 -05:00
ostree-varint.c Update FSF license notices to use URL instead of address 2021-12-07 08:34:25 -05:00
ostree-varint.h Update FSF license notices to use URL instead of address 2021-12-07 08:34:25 -05:00
ostree-version.h.in Update FSF license notices to use URL instead of address 2021-12-07 08:34:25 -05:00
ostree.h lib: use ostree-content-writer header 2022-01-03 14:20:58 +00:00
s390x-se-luks-gencpio s390x: add LUKS keyfile to 'sd-boot' 2022-02-11 09:02:42 +01: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/