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
2 changes: 1 addition & 1 deletion GOVERNANCE.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ The Bootc and its leadership embrace the following values:

## Maintainers

Bootc Maintainers have "gated" write acess to the [project GitHub repository](https://github.com/bootc-dev/bootc).
Bootc Maintainers have "gated" write access to the [project GitHub repository](https://github.com/bootc-dev/bootc).
The current maintainers can be found in [MAINTAINERS.md](./MAINTAINERS.md).

Direct pushes to the code is never allowed. All pull requests require review by a maintainer
Expand Down
6 changes: 3 additions & 3 deletions crates/etc-merge/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -577,14 +577,14 @@ fn create_dir_with_perms(
if new_inode.is_none() {
// Here we use `create_dir_all` to create every parent as we will set the permissions later
// on. Due to the fact that we have an ordered (sorted) list of directories and directory
// entries and we have a DFS traversal, we will aways have directory creation starting from
// entries and we have a DFS traversal, we will always have directory creation starting from
// the parent anyway.
//
// The exception being, if a directory is modified in the current_etc, and a new directory
// is added inside the modified directory, say `dir/prems` has its premissions modified and
// is added inside the modified directory, say `dir/prems` has its permissions modified and
// `dir/prems/new` is the new directory created. Since we handle added files/directories first,
// we will create the directories `perms/new` with directory `new` also getting its
// permissions set, but `perms` will not. `perms` will have its premissions set up when we
// permissions set, but `perms` will not. `perms` will have its permissions set up when we
// handle the modified directories.
new_etc_fd
.create_dir_all(&dir_name)
Expand Down
9 changes: 4 additions & 5 deletions crates/lib/src/bootc_composefs/boot.rs
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ use rustix::{mount::MountFlags, path::Arg};
use schemars::JsonSchema;
use serde::{Deserialize, Serialize};

use crate::bootc_kargs::kargs_from_composefs_filesystem;
use crate::bootc_kargs::compute_new_kargs;
use crate::composefs_consts::{TYPE1_ENT_PATH, TYPE1_ENT_PATH_STAGED};
use crate::parsers::bls_config::{BLSConfig, BLSConfigType};
use crate::parsers::grub_menuconfig::MenuEntry;
Expand Down Expand Up @@ -564,7 +564,7 @@ pub(crate) fn setup_composefs_bls_boot(
None
};

kargs_from_composefs_filesystem(mounted_erofs, current_root, &mut cmdline_refs)?;
compute_new_kargs(mounted_erofs, current_root, &mut cmdline_refs)?;

let (entry_paths, _tmpdir_guard) = match bootloader {
Bootloader::Grub => {
Expand Down Expand Up @@ -675,9 +675,8 @@ pub(crate) fn setup_composefs_bls_boot(
}
}

let shared_entry = shared_entry.ok_or_else(|| {
anyhow::anyhow!("Could not get symlink to BLS boot entry")
})?;
let shared_entry = shared_entry
.ok_or_else(|| anyhow::anyhow!("Shared boot binaries not found"))?;

match bls_config.cfg_type {
BLSConfigType::NonEFI {
Expand Down
2 changes: 1 addition & 1 deletion crates/lib/src/bootc_composefs/delete.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ fn delete_type1_entry(depl: &DeploymentEntry, boot_dir: &Dir, deleting_staged: b
if !file_name.ends_with(".conf") {
// We don't put any non .conf file in the entries dir
// This is here just for sanity
tracing::debug!("Found non .conf file '{file_name}' in entires dir");
tracing::debug!("Found non .conf file '{file_name}' in entries dir");
continue;
}

Expand Down
2 changes: 1 addition & 1 deletion crates/lib/src/bootc_composefs/state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ pub(crate) fn composefs_usr_overlay() -> Result<()> {
.context("Failed to get mount details for /usr")?;

let is_usr_mounted =
is_usr_mounted.ok_or_else(|| anyhow::anyhow!("Falied to get mountinfo"))?;
is_usr_mounted.ok_or_else(|| anyhow::anyhow!("Failed to get mountinfo"))?;

if is_usr_mounted {
println!("A writeable overlayfs is already mounted on /usr");
Expand Down
2 changes: 1 addition & 1 deletion crates/lib/src/bootc_composefs/switch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ pub(crate) async fn switch_composefs(

UpdateAction::UpdateOrigin => {
// The staged image will never be the current image's verity digest
println!("Image already in compoesfs repository");
println!("Image already in composefs repository");
println!("Updating target image reference");
return update_target_imgref_in_origin(storage, booted_cfs, &target_imgref);
}
Expand Down
3 changes: 2 additions & 1 deletion crates/lib/src/bootc_composefs/update.rs
Original file line number Diff line number Diff line change
Expand Up @@ -144,8 +144,9 @@ pub(crate) fn validate_update(
// This could be someone trying to `bootc switch <remote_image>` where
// remote_image is the exact same image as the one currently booted, but
// they are wanting to change the target
// We just update the image origin file here
//
// We could simply update the image origin file here
// If it's not a switch op, then we skip the update
if image_id.to_hex() == *booted_cfs.cmdline.digest {
let ret = if is_switch {
UpdateAction::UpdateOrigin
Expand Down
18 changes: 16 additions & 2 deletions crates/lib/src/bootc_kargs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,22 @@ fn compute_apply_kargs_diff(
}
}

/// Looks for files in usr/lib/bootc/kargs.d and parses cmdline agruments
pub(crate) fn kargs_from_composefs_filesystem(
/// Computes new kernel arguments by applying the diff between existing and new kargs.d files.
///
/// This function:
/// 1. Loads kernel arguments from `usr/lib/bootc/kargs.d` in the new filesystem
/// 2. Loads kernel arguments from the current root (if present)
/// 3. Computes the difference between them (added/removed arguments)
/// 4. Applies that difference to the provided `new_kargs` cmdline
///
/// This allows bootc to maintain user customizations while applying changes from
/// updated container images.
///
/// # Arguments
/// * `new_fs` - Directory handle to the new filesystem containing kargs.d files
/// * `current_root` - Optional directory handle to current root filesystem
/// * `new_kargs` - Mutable cmdline that will be modified with the computed diff
pub(crate) fn compute_new_kargs(
new_fs: &Dir,
current_root: Option<&Dir>,
new_kargs: &mut Cmdline,
Expand Down
2 changes: 1 addition & 1 deletion crates/lib/src/composefs_consts.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#![allow(dead_code)]

/// composefs= paramter in kernel cmdline
/// composefs= parameter in kernel cmdline
pub const COMPOSEFS_CMDLINE: &str = "composefs";

/// Directory to store transient state, such as staged deployemnts etc
Expand Down
6 changes: 3 additions & 3 deletions crates/lib/src/install.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1550,7 +1550,7 @@ async fn install_with_sysroot(
}
tracing::debug!("Installed bootloader");

tracing::debug!("Perfoming post-deployment operations");
tracing::debug!("Performing post-deployment operations");

match bound_images {
BoundImages::Skip => {}
Expand Down Expand Up @@ -1951,7 +1951,7 @@ pub enum Cleanup {
TriggerOnNextBoot,
}

/// Implementation of the `bootc install to-filsystem` CLI command.
/// Implementation of the `bootc install to-filesystem` CLI command.
#[context("Installing to filesystem")]
pub(crate) async fn install_to_filesystem(
opts: InstallToFilesystemOpts,
Expand Down Expand Up @@ -2154,7 +2154,7 @@ pub(crate) async fn install_to_filesystem(

let rootarg = format!("root={}", root_info.mount_spec);
let mut boot = if let Some(spec) = fsopts.boot_mount_spec {
// An empty boot mount spec signals to ommit the mountspec kargs
// An empty boot mount spec signals to omit the mountspec kargs
// See https://github.com/bootc-dev/bootc/issues/1441
if spec.is_empty() {
None
Expand Down
2 changes: 1 addition & 1 deletion crates/lib/src/parsers/grub_menuconfig.rs
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ fn parse_menuentry(input: &str) -> IResult<&str, MenuEntry<'_>> {
// Skip any whitespace after title
let (input, _) = multispace0.parse(input)?;

// Eat up everything insde { .. }
// Eat up everything inside { .. }
let (input, body) = delimited(
tag("{"),
take_until_balanced_allow_nested('{', '}'),
Expand Down
2 changes: 1 addition & 1 deletion crates/lib/src/spec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ pub struct BootEntryOstree {
clap::ValueEnum, Debug, Default, Clone, Serialize, Deserialize, PartialEq, Eq, JsonSchema,
)]
pub enum Bootloader {
/// Use Grub as the booloader
/// Use Grub as the bootloader
#[default]
Grub,
/// Use SystemdBoot as the bootloader
Expand Down
2 changes: 1 addition & 1 deletion crates/lib/src/store/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ pub(crate) struct Storage {
ostree: OnceCell<SysrootLock>,
/// The composefs storage
composefs: OnceCell<Arc<ComposefsRepository>>,
/// The containers-image storage used foR LBIs
/// The containers-image storage used for LBIs
imgstore: OnceCell<CStorage>,
}

Expand Down
2 changes: 1 addition & 1 deletion crates/ostree-ext/src/chunking.rs
Original file line number Diff line number Diff line change
Expand Up @@ -932,7 +932,7 @@ mod test {

#[test]
fn test_advanced_packing() -> Result<()> {
// Step1 : Initial build (Packing sructure computed)
// Step1 : Initial build (Packing structure computed)
let contentmeta_v0: Vec<ObjectSourceMetaSized> = vec![
vec![1, u32::MAX, 100000],
vec![2, u32::MAX, 99999],
Expand Down
6 changes: 3 additions & 3 deletions crates/ostree-ext/src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,17 +36,17 @@ use crate::sysroot::SysrootLock;
use ostree_container::store::{ImageImporter, PrepareResult};
use serde::{Deserialize, Serialize};

/// Parse an [`OstreeImageReference`] from a CLI arguemnt.
/// Parse an [`OstreeImageReference`] from a CLI argument.
pub fn parse_imgref(s: &str) -> Result<OstreeImageReference> {
OstreeImageReference::try_from(s)
}

/// Parse a base [`ImageReference`] from a CLI arguemnt.
/// Parse a base [`ImageReference`] from a CLI argument.
pub fn parse_base_imgref(s: &str) -> Result<ImageReference> {
ImageReference::try_from(s)
}

/// Parse an [`ostree::Repo`] from a CLI arguemnt.
/// Parse an [`ostree::Repo`] from a CLI argument.
pub fn parse_repo(s: &Utf8Path) -> Result<ostree::Repo> {
let repofd = cap_std::fs::Dir::open_ambient_dir(s, cap_std::ambient_authority())
.with_context(|| format!("Opening directory at '{s}'"))?;
Expand Down
2 changes: 1 addition & 1 deletion crates/ostree-ext/src/tar/export.rs
Original file line number Diff line number Diff line change
Expand Up @@ -494,7 +494,7 @@ impl<'a, W: std::io::Write> OstreeTarWriter<'a, W> {
} else {
false
};
// Link sizes shoud always be zero
// Link sizes should always be zero
h.set_size(0);
if is_regular_zerosized {
self.out.append_data(&mut h, dest, &mut std::io::empty())?;
Expand Down
2 changes: 1 addition & 1 deletion tmt/tests/booted/test-logically-bound-switch.nu
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
# <reboot>
# <verify booted state>
# bootc upgrade
# <verify new boudn images are pulled>
# <verify new bound images are pulled>
# <reboot>
# <verify booted state>

Expand Down