Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

podvm-mkosi: fix Architecture cannot be used in [Match] #1762

Merged
merged 1 commit into from
Mar 29, 2024

Conversation

genjuro214
Copy link
Contributor

When build x86 podvm image with mkosi, we may hit following error:

Architecture cannot be used in [Match]

We depend on nix to setup mkosi build environment. Current mkosi version in nix is 17.1:

# nix develop ..#podvm-mkosi --command mkosi --version
warning: Git tree '/root/cloud-api-adaptor' is dirty
mkosi 17.1

According to the v17.1 doc, Architecture in [Match] has not been supported in this version:
https://github.com/systemd/mkosi/blob/v17.1/mkosi/resources/mkosi.md

If upgrading mkosi version in nix, we may hit some other new errors. So I'd like to keep mkosi version and use flag files instead to fix the Architecture error.

mkosi version in nix is 17.1,
which doesn't support Architecture in [Match]
As a workaround, use a flag files instead

Signed-off-by: Lei Li <genjuro214@gmail.com>
Signed-off-by: Lei Li <cdlleili@cn.ibm.com>
@huoqifeng
Copy link
Contributor

As we discussed on the meeting yesterday, we'll try to get this PR reviewed and merged for 0.8.1 release to fix the x86 problem. And we'll create a new issue to align the approach for s390x and x86. @liudalibj @genjuro214 @stevenhorsman @bpradipt

Copy link
Contributor

@huoqifeng huoqifeng left a comment

Choose a reason for hiding this comment

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

LGTM, thanks @genjuro214
I don't have a env to test it but I think it's OK to use:
PathExists=... instead Architecture in [March] because Architecture is not supported in mkosi introduced in nix 17.1 while the image built via latest nix does not work either.

Copy link
Member

@liudalibj liudalibj left a comment

Choose a reason for hiding this comment

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

LGTM

@huoqifeng huoqifeng merged commit d12a5be into confidential-containers:main Mar 29, 2024
18 checks passed
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.

None yet

3 participants