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

Add a mkosi.init script to run before configuration files parsing happens #3176

Open
davide125 opened this issue Nov 11, 2024 · 1 comment
Open
Labels

Comments

@davide125
Copy link
Contributor

mkosi commit the issue has been seen with

main

Used host distribution

Fedora Linux 41

Used target distribution

Fedora Linux 41

Linux kernel version used

No response

CPU architectures issue was seen on

None

Unexpected behaviour you saw

I'd like to have a mkosi.init script to run at the very beginning (before config parsing/validation) in order to create/initialize the contents of things like PackageDirectories and ExtraSearchPaths. The specific usecase I have in mind is building systemd as part of the mkosi build, and including the systemd packages into the image built by mkosi. My attempt at that involved cloning systemd in the mkosi directory, and then adding a mkosi.sync with mkosi --directory=systemd --release=41 -t none to build it. However, this runs too late, and mkosi ends up failing because the build directory doesn't exist yet.

Used mkosi config

[Distribution]
Distribution=fedora
Release=41

[Content]
PackageDirectories=systemd/build/mkosi.builddir/%d~%r~%a

[Host]
ExtraSearchPaths=systemd/build/mkosi.builddir/%d~%r~%a

mkosi output

‣ systemd/build/mkosi.builddir/fedora~41~x86-64 does not exist
@davide125 davide125 added the bug label Nov 11, 2024
@davide125
Copy link
Contributor Author

Obviously, a workaround for this is manually running mkdir systemd/build/mkosi.builddir/fedora~41~x86-64 before attempting to build, but that's an additional manual step I'd like to avoid if possible.

@DaanDeMeyer DaanDeMeyer added RFE and removed bug labels Nov 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

2 participants