[systemd-devel] Issue with ukify in mkosi Build Process
Daan De Meyer
daan.j.demeyer at gmail.com
Thu Nov 21 21:15:00 UTC 2024
Hi,
As documented in HACKING.md, add `ExtraSearchPaths=build` to
mkosi.local.conf in the [Host] section to have mkosi use executables
from the systemd build directory.
Cheers,
Daan
On Thu, 21 Nov 2024 at 18:04, Vishwanath Chandapur <vishwavtu at gmail.com> wrote:
>
> Hi,
>
> I am attempting to build the latest version of systemd using mkosi build to create a bootable image, but I am encountering an error during the process.
>
> Am I doing anything wrong here?
>
> Build system: Fedora 39
>
> Commands used:
> git clone https://github.com/systemd/mkosi.git
> ln -s $PWD/mkosi/bin/mkosi /usr/local/bin/mkosi
> git clone https://github.com/systemd/systemd.git
> cd systemd
> meson setup -Dinstall-tests=true
> ninja -C build
> mkosi genkey
> mkosi -f
>
> Error output:
>
> Generating UKI profile 'profile1'
>
> + /usr/bin/python3 /usr/bin/ukify build --profile @/home/vishwa/.cache/mkosi/mkosi-workspace-bjy71c_r/uki-profiles/profile1.profile --efi-arch x64 --stub /work/home/vishwa/.cache/mkosi/mkosi-workspace-bjy71c_r/root/usr/lib/systemd/boot/efi/addonx64.efi.stub --output /work/home/vishwa/.cache/mkosi/mkosi-workspace-bjy71c_r/uki-profiles/profile1.efi --cmdline @/work/home/vishwa/.cache/mkosi/mkosi-workspace-bjy71c_r/cmdline
>
> ukify: error: unrecognized arguments: --profile @/home/vishwa/.cache/mkosi/mkosi-workspace-bjy71c_r/uki-profiles/profile1.profile
>
> mkosi debug output
> Command '[PosixPath('/usr/bin/python3'), PosixPath('/usr/bin/ukify'), 'build', '--profile', '@/home/vishwa/.cache/mkosi/mkosi-workspace-bjy71c_r/uki-profiles/profile1.profile', '--efi-arch', 'x64', '--stub', '/work/home/vishwa/.cache/mkosi/mkosi-workspace-bjy71c_r/root/usr/lib/systemd/boot/efi/addonx64.efi.stub', '--output', '/work/home/vishwa/.cache/mkosi/mkosi-workspace-bjy71c_r/uki-profiles/profile1.efi', '--cmdline', '@/work/home/vishwa/.cache/mkosi/mkosi-workspace-bjy71c_r/cmdline']' returned non-zero exit status 2.
>
> Traceback (most recent call last):
> File "/home/vishwa/mkosi/mkosi/run.py", line 62, in uncaught_exception_handler
> yield
> File "/home/vishwa/mkosi/mkosi/run.py", line 103, in fork_and_wait
> target(*args, **kwargs)
> File "/home/vishwa/mkosi/mkosi/__init__.py", line 4528, in run_build
> build_image(
> File "/home/vishwa/mkosi/mkosi/__init__.py", line 3700, in build_image
> install_kernel(context, partitions)
> File "/home/vishwa/mkosi/mkosi/__init__.py", line 2108, in install_kernel
> profiles = build_uki_profiles(context, cmdline)
> File "/home/vishwa/mkosi/mkosi/__init__.py", line 2061, in build_uki_profiles
> run_ukify(
> File "/home/vishwa/mkosi/mkosi/__init__.py", line 1570, in run_ukify
> run(
> File "/home/vishwa/mkosi/mkosi/run.py", line 150, in run
> with spawn(
> File "/usr/lib64/python3.12/contextlib.py", line 144, in __exit__
> next(self.gen)
> File "/home/vishwa/mkosi/mkosi/run.py", line 295, in spawn
> raise subprocess.CalledProcessError(returncode, cmdline)
> subprocess.CalledProcessError: Command '[PosixPath('/usr/bin/python3'), PosixPath('/usr/bin/ukify'), 'build', '--profile', '@/home/vishwa/.cache/mkosi/mkosi-workspace-bjy71c_r/uki-profiles/profile1.profile', '--efi-arch', 'x64', '--stub', '/work/home/vishwa/.cache/mkosi/mkosi-workspace-bjy71c_r/root/usr/lib/systemd/boot/efi/addonx64.efi.stub', '--output', '/work/home/vishwa/.cache/mkosi/mkosi-workspace-bjy71c_r/uki-profiles/profile1.efi', '--cmdline', '@/work/home/vishwa/.cache/mkosi/mkosi-workspace-bjy71c_r/cmdline']' returned non-zero exit status 2.
>
> Regards
> Vishwa
More information about the systemd-devel
mailing list