package/systemd: add homed support
authorJames Hilliard <james.hilliard1@gmail.com>
Sun, 8 Mar 2020 21:49:36 +0000 (15:49 -0600)
committerThomas Petazzoni <thomas.petazzoni@bootlin.com>
Sun, 12 Apr 2020 13:47:09 +0000 (15:47 +0200)
systemd-homed is a system service that may be used to create, remove,
change or inspect home directories.

Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
[Thomas:
  - add missing dependency on kernel headers >= 4.12
  - add missing Config.in comment about dependency]
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
package/systemd/Config.in
package/systemd/systemd.mk

index 8a3149ee5ee3e07c520606751c0afae4c90d86e1..dd3b8c534de77a1c09aff49669f2438c1a7a2c49 100644 (file)
@@ -193,6 +193,28 @@ config BR2_PACKAGE_SYSTEMD_HIBERNATE
 
          http://www.freedesktop.org/software/systemd/man/systemd-sleep.html
 
+config BR2_PACKAGE_SYSTEMD_HOMED
+       bool "enable home daemon"
+       depends on BR2_TOOLCHAIN_HAS_THREADS # cryptsetup -> lvm2
+       depends on BR2_USE_MMU # cryptsetup -> lvm2
+       depends on !BR2_STATIC_LIBS # cryptsetup -> lvm2
+       depends on BR2_TOOLCHAIN_HAS_SYNC_4 # cryptsetup -> json-c
+       depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_12 # fscrypt_key
+       select BR2_PACKAGE_CRYPTSETUP
+       select BR2_PACKAGE_OPENSSL
+       select BR2_PACKAGE_UTIL_LINUX_LIBFDISK
+       help
+         systemd-homed is a system service that may be used to create,
+         remove, change or inspect home directories.
+
+         https://www.freedesktop.org/software/systemd/man/systemd-homed.service.html
+
+comment "homed support needs a toolchain w/ threads, dynamic library, kernel headers >= 4.12"
+       depends on BR2_USE_MMU
+       depends on BR2_TOOLCHAIN_HAS_SYNC_4
+       depends on !BR2_TOOLCHAIN_HAS_THREADS || \
+               BR2_STATIC_LIBS || BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_12
+
 config BR2_PACKAGE_SYSTEMD_HOSTNAMED
        bool "enable hostname daemon"
        default y
index 0a4a84e7e24601ef21dc92a22c8bfefab13c7b1d..623e9422053c1afe331869d888485ac6bed279a9 100644 (file)
@@ -41,7 +41,6 @@ SYSTEMD_CONF_OPTS += \
        -Dumount-path=/usr/bin/umount \
        -Dnobody-group=nogroup \
        -Didn=true \
-       -Dhomed=false \
        -Dnss-systemd=true
 
 ifeq ($(BR2_PACKAGE_ACL),y)
@@ -279,6 +278,13 @@ else
 SYSTEMD_CONF_OPTS += -Dimportd=false
 endif
 
+ifeq ($(BR2_PACKAGE_SYSTEMD_HOMED),y)
+SYSTEMD_CONF_OPTS += -Dhomed=true
+SYSTEMD_DEPENDENCIES += cryptsetup openssl
+else
+SYSTEMD_CONF_OPTS += -Dhomed=false
+endif
+
 ifeq ($(BR2_PACKAGE_SYSTEMD_HOSTNAMED),y)
 SYSTEMD_CONF_OPTS += -Dhostnamed=true
 else