diff options
| author | Kristian Klausen <kristian@klausen.dk> | 2021-09-03 23:36:22 +0200 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2021-09-06 09:49:50 +0100 |
| commit | d5f2b5b7ecb591904abfc4d9e8cd515997dc8969 (patch) | |
| tree | 005a742851c133cdfa5b52fe646af1452da4a673 /meta/recipes-core/systemd/systemd-systemctl | |
| parent | f2728d3ec8c0589e02e9a3ce7cf8aca902cae0a3 (diff) | |
| download | poky-d5f2b5b7ecb591904abfc4d9e8cd515997dc8969.tar.gz | |
systemd: Add homed PACKAGECONFIG
If systemd is built with fdisk support[1] and the openssl and cryptsetup
PACKAGECONFIG are enabled, systemd-homed[1] is automatically enabled.
The org.freedesktop.home1.conf file was forgotten, so this commit adds
the file and make enabling homed a explicit choice.
systemd-homed.service and systemd-homed-activate.service have a Also= on
each other, so "systemctl" has been fixed to handle the circular
dependency.
userdb isn't strictly speaking needed for homed but "systemctl" can't
handle the missing unit file and upstream recommend enabling both[3].
[1] Automatically enabled if the fdisk dependency is installed which it
is as util-linux is pulled in by systemd
[2] https://www.freedesktop.org/software/systemd/man/systemd-homed.service.html
[3] https://github.com/systemd/systemd/commit/871dc8d644eef7542a5330f84c25b1db2617317c
(From OE-Core rev: fff339b5bd7789db5d0c024fc84490ac17fa4fe9)
Signed-off-by: Kristian Klausen <kristian@klausen.dk>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-core/systemd/systemd-systemctl')
| -rwxr-xr-x | meta/recipes-core/systemd/systemd-systemctl/systemctl | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/meta/recipes-core/systemd/systemd-systemctl/systemctl b/meta/recipes-core/systemd/systemd-systemctl/systemctl index e8c3d2d1ee..6324319a45 100755 --- a/meta/recipes-core/systemd/systemd-systemctl/systemctl +++ b/meta/recipes-core/systemd/systemd-systemctl/systemctl | |||
| @@ -191,7 +191,7 @@ class SystemdUnit(): | |||
| 191 | except KeyError: | 191 | except KeyError: |
| 192 | pass | 192 | pass |
| 193 | 193 | ||
| 194 | def enable(self): | 194 | def enable(self, caller_unit=None): |
| 195 | # if we're enabling an instance, first extract the actual instance | 195 | # if we're enabling an instance, first extract the actual instance |
| 196 | # then figure out what the template unit is | 196 | # then figure out what the template unit is |
| 197 | template = re.match(r"[^@]+@(?P<instance>[^\.]*)\.", self.unit) | 197 | template = re.match(r"[^@]+@(?P<instance>[^\.]*)\.", self.unit) |
| @@ -227,7 +227,8 @@ class SystemdUnit(): | |||
| 227 | try: | 227 | try: |
| 228 | for also in config.get('Install', 'Also'): | 228 | for also in config.get('Install', 'Also'): |
| 229 | try: | 229 | try: |
| 230 | SystemdUnit(self.root, also).enable() | 230 | if caller_unit != also: |
| 231 | SystemdUnit(self.root, also).enable(unit) | ||
| 231 | except SystemdUnitNotFoundError as e: | 232 | except SystemdUnitNotFoundError as e: |
| 232 | sys.exit("Error: Systemctl also enable issue with %s (%s)" % (service, e.unit)) | 233 | sys.exit("Error: Systemctl also enable issue with %s (%s)" % (service, e.unit)) |
| 233 | 234 | ||
