diff options
| author | Patrick Williams <patrick@stwcx.xyz> | 2025-05-28 23:43:59 +0300 |
|---|---|---|
| committer | Patrick Williams <patrick@stwcx.xyz> | 2025-07-23 10:25:47 +0300 |
| commit | 66be983025289e1b4086ad5680ed649e28c7aee0 (patch) | |
| tree | e449ef2d6357108edb2259b9bb9b903a1f838fd3 /meta-openembedded/meta-python/recipes-devtools/python/python3-u-msgpack-python_2.8.0.bb | |
| parent | e499e6fe9380ae5478c27c6aa28adcc54901282a (diff) | |
| download | openbmc-66be983025289e1b4086ad5680ed649e28c7aee0.tar.xz | |
systemd.bbclass: generate preset for templates
There was a regression introduced by the change to use
systemd-systemctl-native rather than a python fake implementation,
which caused template units to not be properly enabled when set in
the SYSTEMD_SERVICE variable. Through investigation, it seems that
the best way to re-enable template instances is to handle them
explicitly in the systemd.bbclass and enable them with `preset`, like
most units are handled[1,2].
Per the systemd.preset manpage, the format for template units is
different than for regular units[3]. We need to coalesce all the
template instances onto a single line and emit them as an additional
space-deliminated argument.
Ran this against openbmc's phosphor-ipmi-net recipe and generated
the following preset file:
```
$ cat packages-split/phosphor-ipmi-net/usr/lib/systemd/system-preset/98-phosphor-ipmi-net.preset
enable phosphor-ipmi-net@.service eth0
enable phosphor-ipmi-net@.socket eth0
```
[1]: https://lore.kernel.org/openembedded-core/Z2ch.1747051947055246176.oktf@lists.openembedded.org/
[2]: https://lore.kernel.org/openembedded-core/aDdoTVtCmElpURYD@heinlein/
[3]: https://www.freedesktop.org/software/systemd/man/latest/systemd.preset.html
Fixes: 7a580800db39 ("systemd: Build the systemctl executable")
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
(cherry picked from commit 56fd00726aabdcba9d1439d9956b7fd398762a5b)
Change-Id: I1ce41c3c860b0bb800340809916e8757a0b4d436
Diffstat (limited to 'meta-openembedded/meta-python/recipes-devtools/python/python3-u-msgpack-python_2.8.0.bb')
0 files changed, 0 insertions, 0 deletions
