| Summary: |
PermissionError in systemd_preset_all when using systemd |
| Product: |
[Build System, Metadata & Runtime] OE-Core
|
Reporter: |
Christian Charreyre <christian.charreyre> |
| Component: |
core | Assignee: |
Ross Burton <ross.burton> |
| Status: |
RESOLVED
FIXED
|
QA Contact: |
|
| Severity: |
major
|
|
|
| Priority: |
Medium+
|
CC: |
christian.charreyre, meta.mr.watcher, meta.watcher, randy.macleod
|
| Version: |
5.0.4 | |
|
| Target Milestone: |
5.2 M3 | |
|
| Hardware: |
All | |
|
| OS: |
Multiple | |
|
| Whiteboard: |
|
|
OS type for building Yocto:
|
---
|
Type of Regression:
|
---
|
|
Verified:
|
|
Documentation change:
|
Don't know
|
| Attachments: |
|
Created attachment 5076 [details] Log of do_image step for core-image-minimal When DISTRO_FEATURES contains systemd, systemd_preset_all is added to IMAGE_PREPROCESS_COMMAND. This function uses recipe-sysroot-native/usr/bin/systemctl to create links in etc/systemd/system/, but in the rootfs of the image the processed files can point on nothing (depending on the host distro, mine is Ubunut 20.04). In fact it points to a file in /usr/lib/, that will be OK on the target but can not exist on the dev environment. In my case /dd/test-scarthgap-bug/build/tmp/work/qemux86_64-poky-linux/core-image-minimal/1.0/rootfs/etc/systemd/system/default.target -> /usr/lib/systemd/system/multi-user.target, which triggers the error. This leads to an error in path.is_dir() test of systemctl, due to self.stat() test in python3.12 pathlib.py : def stat(self, *, follow_symlinks=True): """ Return the result of the stat() system call on this path, like os.stat() does. """ return os.stat(self, follow_symlinks=follow_symlinks) Same image with dunfell, using python3.8, worked fine, with different code in pathlib.py : def stat(self): """ Return the result of the stat() system call on this path, like os.stat() does. """ return self._accessor.stat(self) Tests conditions: build core-image-minimal with just poky layer activated.