Blame README.md

Packit Service b97f6f
# libostree
Packit Service 2a3f3d
Packit Service 2a3f3d
This project is now known as "libostree", though it is still appropriate to use
Packit Service 2a3f3d
the previous name: "OSTree" (or "ostree"). The focus is on projects which use
Packit Service 2a3f3d
libostree's shared library, rather than users directly invoking the command line
Packit Service 2a3f3d
tools (except for build systems). However, in most of the rest of the
Packit Service 2a3f3d
documentation, we will use the term "OSTree", since it's slightly shorter, and
Packit Service 2a3f3d
changing all documentation at once is impractical. We expect to transition to
Packit Service 2a3f3d
the new name over time.
Packit Service 2a3f3d
Packit Service 2a3f3d
As implied above, libostree is both a shared library and suite of command line
Packit Service 2a3f3d
tools that combines a "git-like" model for committing and downloading bootable
Packit Service 2a3f3d
filesystem trees, along with a layer for deploying them and managing the
Packit Service 2a3f3d
bootloader configuration.
Packit Service 2a3f3d
Packit Service 2a3f3d
The core OSTree model is like git in that it checksums individual files and has
Packit Service 2a3f3d
a content-addressed-object store. It's unlike git in that it "checks out" the
Packit Service 2a3f3d
files via hardlinks, and they thus need to be immutable to prevent corruption.
Packit Service 2a3f3d
Therefore, another way to think of OSTree is that it's just a more polished
Packit Service 2a3f3d
version of
Packit Service 2a3f3d
[Linux VServer hardlinks](http://linux-vserver.org/index.php?title=util-vserver:Vhashify&oldid=2285).
Packit Service 2a3f3d
Packit Service 2a3f3d
**Features:**
Packit Service 2a3f3d
Packit Service 2a3f3d
 - Transactional upgrades and rollback for the system
Packit Service 2a3f3d
 - Replicating content incrementally over HTTP via GPG signatures and "pinned TLS" support
Packit Service 2a3f3d
 - Support for parallel installing more than just 2 bootable roots
Packit Service 2a3f3d
 - Binary history on the server side (and client)
Packit Service 2a3f3d
 - Introspectable shared library API for build and deployment systems
Packit Service 2a3f3d
 - Flexible support for multiple branches and repositories, supporting
Packit Service 2a3f3d
   projects like [flatpak](https://github.com/flatpak/flatpak) which
Packit Service 2a3f3d
   use libostree for applications, rather than hosts.
Packit Service 2a3f3d
Packit Service b97f6f
## Documentation
Packit Service b97f6f
Packit Service b97f6f
For more information, see the [project documentation](docs/index.md) or the
Packit Service b97f6f
[project documentation website](https://ostreedev.github.io/ostree).
Packit Service b97f6f
Packit Service b97f6f
## Operating systems and distributions using OSTree
Packit Service 2a3f3d
Packit Service 2a3f3d
[Endless OS](https://endlessos.com/) uses libostree for their host system as
Packit Service 2a3f3d
well as flatpak. See
Packit Service 2a3f3d
their [eos-updater](https://github.com/endlessm/eos-updater)
Packit Service 2a3f3d
and [deb-ostree-builder](https://github.com/dbnicholson/deb-ostree-builder)
Packit Service 2a3f3d
projects.
Packit Service 2a3f3d
Packit Service 2a3f3d
Fedora derivatives use rpm-ostree (noted below); there are 3 variants using OSTree:
Packit Service 2a3f3d
Packit Service 2a3f3d
 - [Fedora CoreOS](https://getfedora.org/en/coreos/)
Packit Service 2a3f3d
 - [Fedora Silverblue](https://silverblue.fedoraproject.org/)
Packit Service 2a3f3d
 - [Fedora IoT](https://iot.fedoraproject.org/)
Packit Service 2a3f3d
Packit Service 2a3f3d
Red Hat Enterprise Linux CoreOS is a derivative of Fedora CoreOS, used in [OpenShift 4](https://try.openshift.com/).
Packit Service 2a3f3d
The [machine-config-operator](https://github.com/openshift/machine-config-operator/blob/master/docs/OSUpgrades.md)
Packit Service 2a3f3d
manages upgrades.  RHEL CoreOS is also the successor to RHEL Atomic Host, which
Packit Service 2a3f3d
uses rpm-ostree as well.
Packit Service 2a3f3d
Packit Service 2a3f3d
[GNOME Continuous](https://wiki.gnome.org/Projects/GnomeContinuous) is
Packit Service 2a3f3d
where OSTree was born - as a high performance continuous delivery/testing
Packit Service 2a3f3d
system for GNOME.
Packit Service 2a3f3d
Packit Service 2a3f3d
[Liri OS](https://liri.io/download/silverblue/) has the option to install
Packit Service 2a3f3d
their distribution using ostree.
Packit Service 2a3f3d
Packit Service b97f6f
## Distribution build tools
Packit Service 2a3f3d
Packit Service 2a3f3d
[meta-updater](https://github.com/advancedtelematic/meta-updater) is
Packit Service 2a3f3d
a layer available for [OpenEmbedded](http://www.openembedded.org/wiki/Main_Page)
Packit Service 2a3f3d
systems.
Packit Service 2a3f3d
Packit Service 2a3f3d
[QtOTA](http://doc.qt.io/QtOTA/) is Qt's over-the-air update framework
Packit Service 2a3f3d
which uses libostree.
Packit Service 2a3f3d
Packit Service 2a3f3d
The [BuildStream](https://gitlab.com/BuildStream/buildstream) build and
Packit Service 2a3f3d
integration tool supports importing and exporting from libostree repos.
Packit Service 2a3f3d
Packit Service 2a3f3d
Fedora [coreos-assembler](https://github.com/coreos/coreos-assembler) is
Packit Service 2a3f3d
the build tool used to generate Fedora CoreOS derivatives.
Packit Service 2a3f3d
Packit Service b97f6f
## Projects linking to libostree
Packit Service 2a3f3d
Packit Service 2a3f3d
[rpm-ostree](https://github.com/projectatomic/rpm-ostree) is used by the
Packit Service 2a3f3d
Fedora-derived operating systems listed above.  It is a full hybrid
Packit Service 2a3f3d
image/package system.  By default it uses libostree to atomically replicate a base OS
Packit Service 2a3f3d
(all dependency resolution is done on the server), but it supports "package layering", where
Packit Service 2a3f3d
additional RPMs can be layered on top of the base.  This brings a "best of both worlds""
Packit Service 2a3f3d
model for image and package systems.
Packit Service 2a3f3d
Packit Service 2a3f3d
[eos-updater](https://github.com/endlessm/eos-updater) is a daemon that implements updates
Packit Service 2a3f3d
on EndlessOS.
Packit Service 2a3f3d
Packit Service 2a3f3d
[flatpak](https://github.com/flatpak/flatpak) uses libostree for desktop
Packit Service 2a3f3d
application containers. Unlike most of the other systems here, flatpak does not
Packit Service 2a3f3d
use the "libostree host system" aspects (e.g. bootloader management), just the
Packit Service 2a3f3d
"git-like hardlink dedup". For example, flatpak supports a per-user OSTree
Packit Service 2a3f3d
repository.
Packit Service 2a3f3d
Packit Service b97f6f
## Language bindings
Packit Service 2a3f3d
Packit Service 2a3f3d
libostree is accessible via [GObject Introspection](https://gi.readthedocs.io/en/latest/);
Packit Service 2a3f3d
any language which has implemented the GI binding model should work.
Packit Service 2a3f3d
For example, Both [pygobject](https://pygobject.readthedocs.io/en/latest/)
Packit Service 2a3f3d
and [gjs](https://gitlab.gnome.org/GNOME/gjs) are known to work
Packit Service 2a3f3d
and further are actually used in libostree's test suite today.
Packit Service 2a3f3d
Packit Service 2a3f3d
Some bindings take the approach of using GI as a lower level and
Packit Service 2a3f3d
write higher level manual bindings on top; this is more common
Packit Service 2a3f3d
for statically compiled languages.  Here's a list of such bindings:
Packit Service 2a3f3d
Packit Service 2a3f3d
 - [ostree-go](https://github.com/ostreedev/ostree-go/)
Packit Service 2a3f3d
 - [ostree-rs](https://gitlab.com/fkrull/ostree-rs/)
Packit Service 2a3f3d
Packit Service b97f6f
## Building
Packit Service 2a3f3d
Packit Service 2a3f3d
Releases are available as GPG signed git tags, and most recent
Packit Service 2a3f3d
versions support extended validation using
Packit Service 2a3f3d
[git-evtag](https://github.com/cgwalters/git-evtag).
Packit Service 2a3f3d
Packit Service 2a3f3d
However, in order to build from a git clone, you must update the
Packit Service 2a3f3d
submodules.  If you're packaging OSTree and want a tarball, I
Packit Service 2a3f3d
recommend using a "recursive git archive" script.  There are several
Packit Service 2a3f3d
available online;
Packit Service 2a3f3d
[this code](https://github.com/ostreedev/ostree/blob/master/packaging/Makefile.dist-packaging#L11)
Packit Service 2a3f3d
in OSTree is an example.
Packit Service 2a3f3d
Packit Service 2a3f3d
Once you have a git clone or recursive archive, building is the
Packit Service 2a3f3d
same as almost every autotools project:
Packit Service 2a3f3d
Packit Service 2a3f3d
```
Packit Service 2a3f3d
git submodule update --init
Packit Service 2a3f3d
env NOCONFIGURE=1 ./autogen.sh
Packit Service 2a3f3d
./configure --prefix=...
Packit Service 2a3f3d
make
Packit Service 2a3f3d
make install DESTDIR=/path/to/dest
Packit Service 2a3f3d
```
Packit Service 2a3f3d
Packit Service b97f6f
## Contributing
Packit Service 2a3f3d
Packit Service 2a3f3d
See [Contributing](docs/CONTRIBUTING.md).
Packit Service 2a3f3d
Packit Service b97f6f
## Licensing
Packit Service 2a3f3d
Packit Service 2a3f3d
The licensing for the *code* of libostree can be canonically found in the individual files;
Packit Service 2a3f3d
and the overall status in the [COPYING](https://github.com/ostreedev/ostree/blob/master/COPYING)
Packit Service 2a3f3d
file in the source.  Currently, that's LGPLv2+.  This also covers the man pages and API docs.
Packit Service 2a3f3d
Packit Service 2a3f3d
The license for the manual documentation in the `doc/` directory is:
Packit Service 2a3f3d
`SPDX-License-Identifier: (CC-BY-SA-3.0 OR GFDL-1.3-or-later)`
Packit Service 2a3f3d
This is intended to allow use by Wikipedia and other projects.
Packit Service 2a3f3d
Packit Service 2a3f3d
In general, files should have a `SPDX-License-Identifier` and that is canonical.