ostree/src/libostree
Jonathan Lebon 93e47f88f4 lib/commit: Directly use FICLONE for payload link
The idea of payload linking is to reflink between objects where
possible. Instead of relying on `glnx_regfile_copy_bytes` to hit the
`FICLONE` path, just call `FICLONE` directly. At that point in the code,
we've already established that the source and dest repos are on the same
filesystem and that it supports `FICLONE`.

Related: https://gitlab.gnome.org/GNOME/libglnx/-/merge_requests/41
Related: https://github.com/ostreedev/ostree/pull/2684#issuecomment-1204068437
2022-08-15 14:00:08 -04: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 2022.5 2022-07-22 15:08:25 -04:00
libostree-released.sym Release 2022.5 2022-07-22 15:08:25 -04: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 s390x: rename sd-boot to sdboot 2022-06-24 15:15:57 +02: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 glib: bump glib requirement to 2.66 and port to GUri 2022-03-12 04:44:18 +01: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 glib: bump glib requirement to 2.66 and port to GUri 2022-03-12 04:44:18 +01: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-cmd-private.c Rename ostree-cmdprivate to drop out of introspection 2022-06-02 17:13:17 -04:00
ostree-cmd-private.h Rename ostree-cmdprivate to drop out of introspection 2022-06-02 17:13:17 -04: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 lib/core: introduce 'bare-split-xattrs' mode 2022-03-02 16:45:00 +00:00
ostree-core.c Add APIs to get xattrs from disk 2022-05-09 12:33:38 -04:00
ostree-core.h Add APIs to get xattrs from disk 2022-05-09 12:33:38 -04: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 fetcher/curl: Consistently check return value `curl_easy_setopt` 2022-04-20 15:16:22 -04:00
ostree-fetcher-soup.c glib: bump glib requirement to 2.66 and port to GUri 2022-03-12 04:44:18 +01:00
ostree-fetcher-uri.c glib: bump glib requirement to 2.66 and port to GUri 2022-03-12 04:44:18 +01:00
ostree-fetcher-util.c glib: bump glib requirement to 2.66 and port to GUri 2022-03-12 04:44:18 +01: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 glib: bump glib requirement to 2.66 and port to GUri 2022-03-12 04:44:18 +01: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 Rename ostree-cmdprivate to drop out of introspection 2022-06-02 17:13:17 -04:00
ostree-kernel-args.c RFE: Add a hidden option to `ostree admin kargs edit-in-place` to 2022-06-23 22:31:39 +08:00
ostree-kernel-args.h RFE: Add a hidden option to `ostree admin kargs edit-in-place` to 2022-06-23 22:31:39 +08:00
ostree-libarchive-input-stream.c glib: bump glib requirement to 2.66 and port to GUri 2022-03-12 04:44:18 +01: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 Move FIFREEZE/FITHAW ioctl invocations into linuxfsutil.c 2022-08-03 10:44:51 -04:00
ostree-linuxfsutil.h Move FIFREEZE/FITHAW ioctl invocations into linuxfsutil.c 2022-08-03 10:44:51 -04: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 glib: bump glib requirement to 2.66 and port to GUri 2022-03-12 04:44:18 +01: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 Fix annotations on ostree_mutable_tree_lookup() 2022-05-30 17:36:07 -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: Directly use FICLONE for payload link 2022-08-15 14:00:08 -04: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 glib: bump glib requirement to 2.66 and port to GUri 2022-03-12 04:44:18 +01: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 glib: bump glib requirement to 2.66 and port to GUri 2022-03-12 04:44:18 +01: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 libarchive: Handle `archive_entry_symlink()` returning NULL 2022-04-04 10:25:35 -04: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 ostree-repo: bls-append-except-default followup 2022-07-07 16:06:11 -04:00
ostree-repo-prune.c lib/prune: speed up pruning by retrieving only commits 2022-06-27 08:04:50 -04: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 glib: bump glib requirement to 2.66 and port to GUri 2022-03-12 04:44:18 +01: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 Rename ostree-cmdprivate to drop out of introspection 2022-06-02 17:13:17 -04: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 glib: bump glib requirement to 2.66 and port to GUri 2022-03-12 04:44:18 +01: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 ostree-repo: bls-append-except-default followup 2022-07-07 16:06:11 -04:00
ostree-repo.h lib/prune: speed up pruning by retrieving only commits 2022-06-27 08:04:50 -04: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 sign/ed25519: Verify signatures are minimum length 2022-07-14 17:13:51 -04: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-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 Move FIFREEZE/FITHAW ioctl invocations into linuxfsutil.c 2022-08-03 10:44:51 -04:00
ostree-sysroot-private.h Add an `ostree-boot-complete.service` to propagate staging failures 2022-04-26 13:02:46 -04:00
ostree-sysroot-upgrader.c lib: Stop using old `ostree_sysroot_get_repo()` API 2022-07-06 07:47:57 -04: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 sysroot: Have `ensure_writable` also always initialize 2022-07-13 15:35:00 -04:00
ostree-sysroot.h Fix `ostree admin kargs edit-in-place` fails issue 2022-07-12 16:27:00 +08: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 Drop `OSTREE_BUILT_FEATURES` from introspection 2022-06-02 19:44:40 -04:00
ostree.h lib: use ostree-content-writer header 2022-01-03 14:20:58 +00:00
s390x-se-luks-gencpio s390x: do not unpack existing initrd, just append LUKS keys to its copy 2022-05-27 12:06:33 +02: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/