openembedded / meta-openembedded

MIT License
400 stars 695 forks source link

SYSTEMD_AUTO_ENABLE_${PN} = "mask" worked in warrior, stopped in zeus #279

Open JohannesSchilling opened 3 years ago

JohannesSchilling commented 3 years ago

In our project, we have two instances of a service, one being the real deal and the other a simulator. Both offer the exact same D-Bus interface under the exact same D-Bus name. Therefore we need to mask the one not currently supposed to run, as otherwise systemd won't let us start the other (services of type=dbus must have a unique D-Bus name, it seems).

In Yocto "warrior", we had SYSTEMD_AUTO_ENABLE = "mask" in simulator.bb and SYSTEMD_AUTO_ENABLE = "enable" in real_service.bb.

In Yocto zeus (more specifically in this commit, presets were introduced and the line previously allowing us to mask services (by just passing through ${SYSTEMD_AUTO_ENABLE} as the subcommand to systemctl) was replaced, only allowing "enable". A later commit claims to "Restore mask and preset targets", but didn't; we still get only a disabled, not masked, simulator.service on target.

kraj commented 3 years ago

@akiernan can you take a look ?