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

Update mkosi version in nix flake #1763

Open
genjuro214 opened this issue Mar 27, 2024 · 0 comments
Open

Update mkosi version in nix flake #1763

genjuro214 opened this issue Mar 27, 2024 · 0 comments

Comments

@genjuro214
Copy link
Contributor

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

The mkosi version in nix has been updated to 20.2:
https://github.com/NixOS/nixpkgs/blob/nixos-unstable/pkgs/tools/virtualization/mkosi/default.nix#L48

We can run nix flake update to update mkosi version to 20.2 in nix.

However, we may hit some errors with mkosi 20.2:

  • Environment option cannot work, need try profile instead:
nix develop ..#podvm-mkosi --command mkosi --profile debug.conf
  • Failed to copy resources/binaries-tree:
‣ Building system image
‣  Copying in package manager file trees…
cp: cannot create directory '/root/.cache/mkosi-workspace08nm3do0/pkgmngr/usr/local': Read-only file system
cp: preserving permissions for '/root/.cache/mkosi-workspace08nm3do0/pkgmngr/usr': Read-only file system
‣ "cp --recursive --no-dereference --preserve=mode,links --reflink=auto /root/cloud-api-adaptor/src/cloud-api-adaptor/podvm-mkosi/resources/binaries-tree /root/.cache/mkosi-workspace08nm3do0/pkgmngr --no-target-directory" returned non-zero exit code 1.

I believe it's a bug that has been fixed in mkosi v21
workaround is to use ExtraTrees instead of SkeletonTrees in podvm-mkosi/mkosi.presets/system/mkosi.conf.d/fedora.conf

If we need update mkosi version in nix, we have to resolve the issues above, and verify the Pod VM image.

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

No branches or pull requests

1 participant