| Summary: | systemd.bbclass does not handle presets for user services properly | ||
|---|---|---|---|
| Product: | [Build System, Metadata & Runtime] OE-Core | Reporter: | Artur Kowalski <arturkow2000> |
| Component: | configuration | Assignee: | Artur Kowalski <arturkow2000> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | Medium+ | CC: | pavel, randy.macleod |
| Version: | unspecified | ||
| Target Milestone: | 5.2 M2 | ||
| Hardware: | x86 | ||
| OS: | Multiple | ||
| Whiteboard: | |||
| OS type for building Yocto: | --- | Type of Regression: | --- |
| Verified: | Documentation change: | Don't know | |
Artur, are you willing and able to send a patch? Even adding a readable error message would help. Fix is underway, I will provide patches in a day or two. Merged 8 commits, the most recent of which was: https://git.openembedded.org/openembedded-core/commit/?id=ce62b88d8f71368e356b6409ada46a34a6017ddf Thanks Artur! |
systemd.bbclass creates all presets in ${systemd_unitdir}/system-preset where presets for user services should be created in ${systemd_unitdir}/user-preset instead. An example recipe SUMMARY = "Bug reproduction" LICENSE = "MIT" LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" do_configure[noexec] = "1" do_compile[noexec] = "1" inherit allarch systemd SYSTEMD_PACKAGES = "${PN}" SYSTEMD_SERVICE:${PN} = "test-service.service" do_install() { install -d ${D}${systemd_user_unitdir} cat <<EOF > ${D}${systemd_user_unitdir}/test-service.service [Unit] Description=Test [Service] ExecStart=${bindir}/true EOF } Results in ./usr ./usr/lib ./usr/lib/systemd ./usr/lib/systemd/user ./usr/lib/systemd/user/test-service.service ./usr/lib/systemd/system-preset ./usr/lib/systemd/system-preset/98-do-something.preset In effect, this causes image build to fail if broken package is included: ERROR: core-image-minimal-1.0-r0 do_rootfs: Error: Systemctl main enable issue in test-service.service (test-service.service)