Skip to content

Etc merge changes#2301

Queued
Johan-Liebert1 wants to merge 3 commits into
bootc-dev:mainfrom
Johan-Liebert1:etc-merge-changes
Queued

Etc merge changes#2301
Johan-Liebert1 wants to merge 3 commits into
bootc-dev:mainfrom
Johan-Liebert1:etc-merge-changes

Conversation

@Johan-Liebert1

Copy link
Copy Markdown
Collaborator

etc-merge: Handle unmergable paths properly

We would have unmergable paths if a modified file was changed to a
directory in the new etc or vice-versa. One of the major issues was that
we were erroring out during "merge" which is not ideal. A new vector now
keeps track of all unmergable paths and the reason they're not mergable.

Ref: composefs/composefs-rs/issues/335


cfs/stage: Compute etc diff before staging

Before we write the staged deployment file at /run/composefs and
before we create new boot entries, we now compute the etc diff in
advance to check whethere we will face any merge conflicts while
finalizing the deployment. If we find conflicts we exit with and error
and detailing where conflicts were found


tmt: Add tests for etc merge conflict

This was predominantly AI generated with some minor tweaks from me.

Makes sure that bootc upgrade/switch fails if merge conflicts are found
during three way etc merge.

@Johan-Liebert1 Johan-Liebert1 requested a review from cgwalters July 9, 2026 09:37
@Johan-Liebert1 Johan-Liebert1 added the ci/tier-1 Run CI for tier-1 OS (centos-10) only label Jul 9, 2026
@bootc-bot bootc-bot Bot requested a review from gursewak1997 July 9, 2026 09:39
@Johan-Liebert1 Johan-Liebert1 force-pushed the etc-merge-changes branch 2 times, most recently from df2466f to e8b524d Compare July 10, 2026 12:49
@Johan-Liebert1 Johan-Liebert1 requested a review from jeckersb July 13, 2026 12:46
Comment thread crates/etc-merge/src/lib.rs Outdated
Comment thread crates/etc-merge/src/lib.rs
Comment thread crates/etc-merge/src/lib.rs Outdated
Comment thread crates/etc-merge/src/lib.rs Outdated
Comment thread crates/lib/src/bootc_composefs/finalize.rs Outdated
We would have unmergable paths if a modified file was changed to a
directory in the new etc or vice-versa. One of the major issues was that
we were erroring out during "merge" which is not ideal. A new vector now
keeps track of all unmergable paths and the reason they're not mergable.

Ref: composefs/composefs-rs/issues/335

Signed-off-by: Pragyan Poudyal <pragyanpoudyal41999@gmail.com>
Before we write the staged deployment file at `/run/composefs` and
before we create new boot entries, we now compute the etc diff in
advance to check whethere we will face any merge conflicts while
finalizing the deployment. If we find conflicts we exit with and error
and detailing where conflicts were found

Signed-off-by: Pragyan Poudyal <pragyanpoudyal41999@gmail.com>
This was predominantly AI generated with some minor tweaks from me.

Makes sure that bootc upgrade/switch fails if merge conflicts are found
during three way etc merge.

Signed-off-by: Pragyan Poudyal <pragyanpoudyal41999@gmail.com>
@jeckersb jeckersb added this pull request to the merge queue Jul 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci/tier-1 Run CI for tier-1 OS (centos-10) only

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants