]> git.ipfire.org Git - thirdparty/systemd.git/commit
mkosi: Copy sources under /usr in the image
authorMichal Koutný <mkoutny@suse.com>
Wed, 9 Aug 2023 19:31:58 +0000 (21:31 +0200)
committerLuca Boccassi <luca.boccassi@gmail.com>
Thu, 10 Aug 2023 18:14:40 +0000 (19:14 +0100)
commit9e42433ff9eeab3c3e75cbee690b334cdd3c2caa
tree286aacfab98236feaa9a62a46b7d1969f3baf951
parentbd95029c3e2719db9cc04e785db71ddd45fd7b4c
mkosi: Copy sources under /usr in the image

Originally, the source code was copied under /root/src.
This home directory is part of root FS and the new mkosi building
paradigm has only ephemeral root FS that is generated lazily.
Any files placed on the root FS in the build environment are that
excluded from the final image.

It is useful to have source codes available in the image's runtime (not
build time) environment for debugging.

ExtraTrees= as used currently are ineffective, so change the destination
to copy files under /usr to achieve the intention.

gdb sees source files as:
> 1354 ../src/src/systemctl/systemctl.c: No such file or directory.

Modify gdb configration in the built image accordingly (that file cannot
be in /root neither) to resolve to the moved sources.

(Commit fdecbf7 ("Enable unprivileged image builds") envisions bind
mounting or virtiofsd for nspawn or qemu containers respectively.)
mkosi.presets/system/mkosi.conf
mkosi.presets/system/mkosi.extra/usr/share/factory/mkosi/gdbinit.d/systemd.gdb [moved from mkosi.presets/system/mkosi.extra/root/.gdbinit with 57% similarity]