Skip to content

Commit

Permalink
Rewrite livefs
Browse files Browse the repository at this point in the history
Now always based on an overlayfs:
ostreedev/ostree@f2773c1
This fixes a whole swath of problems with the previous design,
including the danger in replacing `/usr/lib/ostree-boot` which
broke booting for some people.

Further, we don't need to push a rollback deployment; the livefs
changes are always transient.  So now we store livefs state
in `/run` instead of in the origin file.

Since we're doing a rewrite, it's now in Rust for much more safety.

We also always work in terms of incremental diffs between commits;
the previous huge hammer of swapping `/usr` was way too dangerous.
  • Loading branch information
cgwalters authored and openshift-merge-robot committed Nov 16, 2020
1 parent 213d8f0 commit a76ddf0
Show file tree
Hide file tree
Showing 21 changed files with 792 additions and 1,171 deletions.
1 change: 0 additions & 1 deletion rust/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ subprocess = "0.2.6"
chrono = { version = "0.4.19", features = ["serde"] }
libdnf-sys = { path = "libdnf-sys", version = "0.1.0" }


[lib]
name = "rpmostree_rust"
path = "src/lib.rs"
Expand Down
10 changes: 0 additions & 10 deletions rust/src/includes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ NOTICE: The C header definitions are canonical, please update those first
then synchronize the entries here.
!*/

use crate::syscore::ffi::RpmOstreeOrigin;
use libdnf_sys::DnfPackage;

// From `libpriv/rpmostree-rpm-util.h`.
Expand All @@ -19,12 +18,3 @@ extern "C" {
gerror: *mut *mut glib_sys::GError,
) -> libc::c_int;
}

// From `libpriv/rpmostree-origin.h`.
extern "C" {
pub(crate) fn rpmostree_origin_get_live_state(
origin: *mut RpmOstreeOrigin,
out_inprogress: *mut *mut libc::c_char,
out_livereplaced: *mut *mut libc::c_char,
);
}
6 changes: 4 additions & 2 deletions rust/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,12 @@ mod initramfs;
pub use self::initramfs::ffi::*;
mod lockfile;
pub use self::lockfile::*;
mod livefs;
pub use self::livefs::*;
mod ostree_diff;
mod ostree_utils;
mod progress;
pub use self::progress::*;
mod syscore;
pub use self::syscore::ffi::*;
mod testutils;
pub use self::testutils::*;
mod treefile;
Expand Down
Loading

0 comments on commit a76ddf0

Please sign in to comment.