Go to file
Jonathan Lebon 5e2aeb4793 lockfile: Switch to writing it from Rust
I wanted to modify the lockfile specification, but then remembered that
it currently lives in two places right now: once on the Rust side where
it's deserialized, and once more on the C side where it's serialized.

If we could write the lockfile from the Rust side, then we wouldn't have
to deal with the `GVariantBuild` and `json-glib` goop, and instead
we could consistently use serde against the same struct for both
serialization and deserialization.

But there isn't an easy way to do this given that the state to be
serialized is intrinsically linked to libdnf.

So this patch takes the next step in our oxidation process by adding a
minimal `libdnf_sys` module which allows us to call `libdnf` functions
from Rust. This is not the prettiest code I've written, and there's
definitely some polishing that could be done. But I think overall it's a
move in the right general direction: as we oxidize more things, we'll at
some point *have* to integrate more tightly with the C side in a
bidirectional way, instead of the "one-way" approach we've been using so
far.

For this patch specifically, in exchange we get a unique source of truth
for the lockfile spec, just like the treefile, and we drop a lot of C
code in the process.

Closes: #1867
Approved by: cgwalters
2019-07-18 18:54:27 +00:00
.github Fix GitHub issue template formatting 2018-03-14 21:54:16 +00:00
api-doc rust/treefile: Support dash convention for all options 2019-03-02 19:20:21 +00:00
bindgen bindgen: Also track Cargo.lock 2019-07-09 20:28:18 +00:00
buildutil buildutils: Add libglnx.m4 to .gitignore 2018-04-05 15:26:46 +00:00
ci tests/vmcheck: Fully drop python 3 requirement 2019-06-10 15:36:06 +00:00
completion Add support for bash completion 2019-03-01 21:36:39 +00:00
design Initial renaming pass of "jigdo" to "rojig" 2018-02-26 15:32:50 +00:00
docs treefile: Add new add-commit-metadata key 2019-07-09 20:28:18 +00:00
experiments-and-demos/skopeo2ostree experiments-and-demos: New subdir with skopeo2ostree Dockerfile 2018-01-11 14:07:17 +00:00
libdnf@8a6b5837bb libdnf: Bump for GPG subkeys fix 2019-04-28 14:15:11 +00:00
libglnx@470af8763f Update libglnx 2018-07-17 18:35:38 +00:00
man man: Fix references to automatic timer and service 2018-11-01 15:26:06 +00:00
packaging tests: Bump to Python 3 only 2019-05-08 19:02:32 +00:00
rust lockfile: Switch to writing it from Rust 2019-07-18 18:54:27 +00:00
scripts tests: Bump to Python 3 only 2019-05-08 19:02:32 +00:00
src lockfile: Switch to writing it from Rust 2019-07-18 18:54:27 +00:00
tests tests/compose: Fix unified rev-parse test 2019-07-09 20:28:18 +00:00
vagrant vagrant: Add header noting coreos-assembler 2019-05-13 19:50:58 +00:00
.dir-locals.el .dir-locals.el: Global Emacs style settings 2017-01-12 16:09:16 +00:00
.editorconfig tree: add vimrc and editorconfig 2017-10-02 14:36:44 +00:00
.gitmodules Rebase to latest libdnf 2019-03-19 14:29:15 +00:00
.papr.yml ci: Bump minimum Rust version to v1.31.0 2019-03-19 12:19:38 +00:00
.vimrc tree: add vimrc and editorconfig 2017-10-02 14:36:44 +00:00
autogen.sh build-sys: Fix use of libglnx configure bits 2017-12-15 16:32:39 +00:00
configure.ac Release 2019.4 2019-05-22 01:17:08 +00:00
CONTRIBUTING.md docs: fix ostree and CONTRIBUTING.md links 2016-07-12 15:46:53 +00:00
COPYING COPYING: Update to latest LGPLv2+ 2014-03-10 16:40:16 -04:00
git.mk build: Use git.mk, make git status clean 2016-03-10 14:36:44 -05:00
HACKING.md HACKING: Add link to tests README 2019-05-09 00:08:14 +00:00
LICENSE Add a LICENSE symlink 2016-04-28 13:09:22 +00:00
Makefile-bash.am build: Hook up bash completions 2019-03-07 00:47:39 +00:00
Makefile-daemon.am daemon: Time out client txn connections after 30s 2019-02-22 14:47:02 +00:00
Makefile-decls.am packaging: Support vendoring the Rust sources 2018-06-06 15:52:48 +00:00
Makefile-extra.inc ci: Verify rustfmt 2018-11-21 21:16:03 +00:00
Makefile-lib-defines.am lib: Add version macros and version checking function 2017-07-21 20:35:26 +00:00
Makefile-lib.am Makefile-libs.am: Work around g-ir-scanner issues with clang 2019-03-19 12:19:38 +00:00
Makefile-libdnf.am Rebase to latest libdnf 2019-03-19 14:29:15 +00:00
Makefile-libpriv.am scripts: Ignore new glibc lua %post 2019-07-17 13:43:03 +00:00
Makefile-man.am man: Add rpm-ostreed-automatic page 2018-03-07 22:54:33 +00:00
Makefile-rpm-ostree.am Add new D-Bus APIs for deployment finalization 2019-04-30 08:36:28 +00:00
Makefile-tests.am test: add unit test for passwd to sysuser conversion 2018-08-30 17:37:27 +00:00
Makefile.am build: Bump minimum glib2 version to 2.56 2019-03-23 18:48:04 +00:00
mkdocs.yml docs: Start using mkdocs 2016-03-09 11:10:58 -05:00
README.md README.md: Fix youtube link 2018-04-14 15:24:54 +00:00
Vagrantfile vagrant: Use a Fedora 29 container 2019-05-09 00:08:14 +00:00

rpm-ostree: A true hybrid image/package system

rpm-ostree combines libostree (an image system), with libdnf (a package system), bringing many of the benefits of both together.

                         +-----------------------------------------+
                         |                                         |
                         |       rpm-ostree (daemon + CLI)         |
                  +------>                                         <---------+
                  |      |     status, upgrade, rollback,          |         |
                  |      |     pkg layering, initramfs --enable    |         |
                  |      |                                         |         |
                  |      +-----------------------------------------+         |
                  |                                                          |
                  |                                                          |
                  |                                                          |
+-----------------|-------------------------+        +-----------------------|-----------------+
|                                           |        |                                         |
|         libostree (image system)          |        |            libdnf (pkg system)          |
|                                           |        |                                         |
|   C API, hardlink fs trees, system repo,  |        |    ties together libsolv (SAT solver)   |
|   commits, atomic bootloader swap         |        |    with librepo (RPM repo downloads)    |
|                                           |        |                                         |
+-------------------------------------------+        +-----------------------------------------+

For more information, see the online manual: Read The Docs (rpm-ostree)

Features:

  • Transactional, background image-based (versioned/checksummed) upgrades
  • OS rollback without affecting user data (/usr but not /etc, /var) via libostree
  • Client-side package layering (and overrides)
  • Easily make your own: rpm-ostree compose tree

Projects using rpm-ostree

Project Atomic is an umbrella project for delivering upstream container technologies and combined with a minimized, atomically upgradable host system to Fedora, Red Hat Enterprise Linux, and CentOS.

rpm-ostree is the underlying technology for host updates. The headlining project is "Atomic Host", which is a server variant oriented towards running Linux containers using e.g. Kubernetes. However, there is now also a Workstation variant, showing the full generality of the rpm-ostree model.

Manual

For more information, see the online manual: Read The Docs (rpm-ostree)

Talks and media

A number of Project Atomic talks are available; see for example this post which has a bigger collection that also includes talks on containers.

rpm-ostree specific talks: