Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ fn stage_bls_entry_changes(
.unwrap_or("bootc");

// to not add duplicate transactions since we share BLS entries
// across deployements
// across deployments
let mut fixed = vec![];
let mut new_bls_entries = vec![];

Expand Down
2 changes: 1 addition & 1 deletion crates/lib/src/bootc_composefs/finalize.rs
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ pub(crate) async fn composefs_backend_finalize(
}
};

// Now that we have successfully updated bootloader entires, we can GC the unreferenced ones
// Now that we have successfully updated bootloader entries, we can GC the unreferenced ones
// We do not prune the composefs repository here though
composefs_gc(
storage,
Expand Down
2 changes: 1 addition & 1 deletion crates/lib/src/bootc_composefs/selinux.rs
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ fn get_selinux_policy_for_deployment(
let type_ = selinux_config
.lines()
.find(|l| l.starts_with(SELINUX_TYPE))
.ok_or_else(|| anyhow::anyhow!("Falied to find SELINUXTYPE"))?
.ok_or_else(|| anyhow::anyhow!("Failed to find SELINUXTYPE"))?
.split("=")
.nth(1)
.ok_or_else(|| anyhow::anyhow!("Failed to parse SELINUXTYPE"))?
Expand Down
4 changes: 2 additions & 2 deletions crates/lib/src/bootc_composefs/soft_reboot.rs
Original file line number Diff line number Diff line change
Expand Up @@ -86,12 +86,12 @@ pub(crate) async fn prepare_soft_reboot_composefs(

let all_deployments = host.all_composefs_deployments()?;

let requred_deployment = all_deployments
let required_deployment = all_deployments
.iter()
.find(|entry| entry.deployment.verity == *deployment_id)
.ok_or_else(|| anyhow::anyhow!("Deployment '{deployment_id}' not found"))?;

if !requred_deployment.soft_reboot_capable {
if !required_deployment.soft_reboot_capable {
match soft_reboot_mode {
SoftRebootMode::Required => {
anyhow::bail!("Cannot soft-reboot to deployment with a different kernel state")
Expand Down
4 changes: 2 additions & 2 deletions crates/lib/src/bootc_composefs/status.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1090,8 +1090,8 @@ async fn composefs_deployment_status_from(
}
};

// Determine rollback deployment by matching extra deployment boot entries against entires read from /boot
// This collects verity digest across bls and grub enties, we should just have one of them, but still works
// Determine rollback deployment by matching extra deployment boot entries against entries read from /boot
// This collects verity digest across bls and grub entries, we should just have one of them, but still works
//
// We want this ordered, so we have a vector here
let bootloader_configured_verity = sorted_bls_config
Expand Down
2 changes: 1 addition & 1 deletion crates/lib/src/bootc_composefs/update.rs
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,7 @@ pub(crate) async fn apply_upgrade_from_downloaded(
.context("Reading staged file")?;

let mut new_staged: StagedDeployment =
serde_json::from_str(&current).context("Deserialzing staged file")?;
serde_json::from_str(&current).context("Deserializing staged file")?;

// Make the staged deployment not download_only
new_staged.finalization_locked = false;
Expand Down
2 changes: 1 addition & 1 deletion crates/lib/src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ pub(crate) enum SoftRebootMode {
pub(crate) struct StatusOpts {
/// Output in JSON format.
///
/// Superceded by the `format` option.
/// Superseded by the `format` option.
#[clap(long, hide = true)]
pub(crate) json: bool,

Expand Down
42 changes: 17 additions & 25 deletions crates/lib/src/install.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1817,32 +1817,24 @@ async fn prepare_install(
//
// NOTE: This isn't really 100% accurate 100% of the time as the cmdline can be in an addon
if let Some(root_filesystem) = root_filesystem {
match kernel {
Some(k) => match k.k_type {
crate::kernel::KernelType::Uki { cmdline, .. } => {
let allow_missing_fsverity = if let Some(cmdline) = cmdline {
ComposefsCmdline::find_in_cmdline(&cmdline)?
.is_some_and(|cfs_cmdline| cfs_cmdline.allow_missing_fsverity)
} else {
false
};
// >>>>>>> 626befdf (install: Handle root filesystem)

if !allow_missing_fsverity {
anyhow::ensure!(
root_filesystem.supports_fsverity(),
"Specified filesystem {root_filesystem} does not support fs-verity"
);
}

composefs_options.allow_missing_verity = allow_missing_fsverity;
is_uki = true;
}
if let Some(k) = kernel
&& let crate::kernel::KernelType::Uki { cmdline, .. } = k.k_type
{
let allow_missing_fsverity = match cmdline {
Some(cmdline) => ComposefsCmdline::find_in_cmdline(&cmdline)?
.is_some_and(|cfs_cmdline| cfs_cmdline.allow_missing_fsverity),
None => false,
};

crate::kernel::KernelType::Vmlinuz { .. } => {}
},
if !allow_missing_fsverity {
anyhow::ensure!(
root_filesystem.supports_fsverity(),
"Specified filesystem {root_filesystem} does not support fs-verity"
);
}

None => {}
composefs_options.allow_missing_verity = allow_missing_fsverity;
is_uki = true;
}

// If `--allow-missing-verity` is already passed via CLI, don't modify
Expand Down Expand Up @@ -2195,7 +2187,7 @@ async fn install_to_filesystem_impl(

// For s390x, we set zipl as the bootloader
// this needs to be done after the ostree commit is deployed,
// as we don't want zipl to run during the initial ostree deployement.
// as we don't want zipl to run during the initial ostree deployment.
if cfg!(target_arch = "s390x") {
Command::new("ostree")
.args([
Expand Down
4 changes: 2 additions & 2 deletions crates/lib/src/install/baseline.rs
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,7 @@ fn systemd_repart(
return Ok(layout);
}

// Root partition is not defined, create defintion for the root part
// Root partition is not defined, create definition for the root part
let mut root_conf = String::from("[Partition]\nType=root\n");

match root_size {
Expand All @@ -380,7 +380,7 @@ fn systemd_repart(
// Installing to a disk, compute the root ptn size
// by taking all other partitions into account
//
// We're doing this to accomodate for partitions that are
// We're doing this to accommodate for partitions that are
// supposed to be crated on first boot, like home,var,swap etc
let space_taken = dry_partitions
.iter()
Expand Down
2 changes: 1 addition & 1 deletion crates/ostree-ext/src/tar/write.rs
Original file line number Diff line number Diff line change
Expand Up @@ -516,7 +516,7 @@ mod tests {

#[test]
fn test_remap_etc() {
// These shouldn't change. Test etcc to verify we're not doing string matching.
// These shouldn't change. Test etc to verify we're not doing string matching.
let unchanged = ["", "foo", "/etcc/foo", "../etc/baz"];
for x in unchanged {
similar_asserts::assert_eq!(x, remap_etc_path(x.into()).as_str());
Expand Down
2 changes: 1 addition & 1 deletion tmt/tests/booted/test-install-repart.nu
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ EOF
verify_part_layout_second_boot

# Now run systemd-repart on the disk again to simulate what would happen on first boot
print "Runnin systemd-repart to simulate first boot"
print "Running systemd-repart to simulate first boot"
(
podman run --privileged --rm
-v /dev:/dev
Expand Down
Loading