Skip to content

Conversation

@DomAyre
Copy link
Contributor

@DomAyre DomAyre commented Jul 25, 2025

Why

Some linux distros, such as AzureLinux, are usr-merged meaning that binaries are not where containerplat will expect them to be. This means we need to create symlinks from the usr directory to /bin.

How

When constructing delta.tar.gz, detect if the input rootfs is usr merged, if it isn't, keep the existing behaviour, otherwise create /usr/bin instead of /bin and then symlink.

@DomAyre DomAyre requested a review from a team as a code owner July 25, 2025 14:52
@DomAyre DomAyre force-pushed the domayre/usr-merged-fs branch from b27efae to e0fed7f Compare November 17, 2025 15:21
Signed-off-by: Dominic Ayre <dominicayre@microsoft.com>
@DomAyre DomAyre force-pushed the domayre/usr-merged-fs branch from e0fed7f to 105f41d Compare November 21, 2025 17:01
rm -rf rootfs
mkdir -p rootfs/bin/
rm -rf /tmp/base-rootfs && mkdir -p /tmp/base-rootfs
tar -xf $(BASE) -C /tmp/base-rootfs
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we just extract the directories we need here, and not the entire filesystem?

Suggested change
tar -xf $(BASE) -C /tmp/base-rootfs
tar -xf $(BASE) -C /tmp/base-rootfs --no-anchored --no-recursion bin

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants