This reduces the dependency graph and can therefore decrease boot time
on systems that are configured with a static hostname, and which do not
use quota. With this, /usr/share/dbus-1/system-services/ may no longer
contain any service definitions, so add an empty kconfig option for it.

Signed-off-by: Roland Hieber <[email protected]>
---
v1 -> v2:
 * order the new promptable options next to the other promptable options
 * set "default y" for both new options to keep compatibility

PATCH v1: 
https://lore.ptxdist.org/ptxdist/[email protected]
---
 rules/systemd.in   | 23 +++++++++++++++++++++++
 rules/systemd.make | 12 ++++++++----
 2 files changed, 31 insertions(+), 4 deletions(-)

diff --git a/rules/systemd.in b/rules/systemd.in
index 854c344d5441..0c6dcb317613 100644
--- a/rules/systemd.in
+++ b/rules/systemd.in
@@ -56,11 +56,15 @@ comment "D-Bus is needed for the enabled features"
 config SYSTEMD_DBUS
        bool
 
+config SYSTEMD_DBUS_SERVICES
+       bool
+
 config SYSTEMD_MICROHTTPD
        bool
 
 config SYSTEMD_LOCALES
        bool
+       select SYSTEMD_DBUS_SERVICES
        default LOCALES
 
 config SYSTEMD_VCONSOLE
@@ -77,9 +81,19 @@ config SYSTEMD_DISABLE_RANDOM_SEED
          the random seed is not possible.
          Warning: enabling this option may be insecure.
 
+config SYSTEMD_HOSTNAMED
+       bool
+       default y
+       select SYSTEMD_DBUS_SERVICES
+       prompt "hostname daemon"
+       help
+         A tiny daemon that can be used to control the hostname and related
+         machine meta data from user programs.
+
 config SYSTEMD_LOGIND
        bool
        select SYSTEMD_DBUS
+       select SYSTEMD_DBUS_SERVICES
        prompt "login daemon"
 
 config SYSTEMD_UNITS_USER
@@ -89,6 +103,7 @@ config SYSTEMD_UNITS_USER
 
 config SYSTEMD_NETWORK
        bool
+       select SYSTEMD_DBUS_SERVICES
        prompt "network configuration with systemd"
 
 config SYSTEMD_IPMASQUERADE
@@ -102,6 +117,7 @@ config SYSTEMD_TIMEDATE
        bool
        default y
        select SYSTEMD_DBUS
+       select SYSTEMD_DBUS_SERVICES
        prompt "date/time handling"
        help
          NTP client for time synchronization and local timezone handling.
@@ -122,6 +138,13 @@ config SYSTEMD_POLKIT
        bool
        default POLKIT
 
+config SYSTEMD_QUOTACHECK
+       bool
+       default y
+       prompt "disk quota support"
+       help
+         File system quota checker logic
+
 menu "journald                    "
 
 config SYSTEMD_XZ
diff --git a/rules/systemd.make b/rules/systemd.make
index 3a3621fe767e..929a76dd423e 100644
--- a/rules/systemd.make
+++ b/rules/systemd.make
@@ -95,7 +95,7 @@ SYSTEMD_CONF_OPT      := \
        -Dgshadow=false \
        -Dhibernate=false \
        -Dhomed=false \
-       -Dhostnamed=true \
+       -Dhostnamed=$(call ptx/truefalse,PTXCONF_SYSTEMD_HOSTNAMED) \
        -Dhtml=false \
        -Dhwdb=$(call ptx/truefalse,PTXCONF_SYSTEMD_UDEV_HWDB) \
        -Didn=false \
@@ -152,7 +152,7 @@ SYSTEMD_CONF_OPT    := \
        -Dpstore=false \
        -Dpwquality=false \
        -Dqrencode=false \
-       -Dquotacheck=true \
+       -Dquotacheck=$(call ptx/truefalse,PTXCONF_SYSTEMD_QUOTACHECK) \
        -Dquotacheck-path=/usr/sbin/quotacheck \
        -Dquotaon-path=/usr/sbin/quotaon \
        -Drandomseed=$(call ptx/falsetrue,PTXCONF_SYSTEMD_DISABLE_RANDOM_SEED) \
@@ -248,7 +248,7 @@ SYSTEMD_HELPER := \
        $(call ptx/ifdef, PTXCONF_SYSTEMD_COREDUMP,systemd-coredump) \
        systemd-fsck \
        systemd-growfs \
-       systemd-hostnamed \
+       $(call ptx/ifdef, PTXCONF_SYSTEMD_HOSTNAMED,systemd-hostnamed) \
        systemd-journald \
        $(call ptx/ifdef, 
PTXCONF_SYSTEMD_JOURNAL_REMOTE,systemd-journal-remote) \
        $(call ptx/ifdef, PTXCONF_SYSTEMD_LOCALES,systemd-localed) \
@@ -257,7 +257,7 @@ SYSTEMD_HELPER := \
        systemd-modules-load \
        $(call ptx/ifdef, PTXCONF_SYSTEMD_NETWORK,systemd-networkd) \
        $(call ptx/ifdef, PTXCONF_SYSTEMD_NETWORK,systemd-networkd-wait-online) 
\
-       systemd-quotacheck \
+       $(call ptx/ifdef, PTXCONF_SYSTEMD_QUOTACHECK,systemd-quotacheck) \
        $(call ptx/ifdef, 
PTXCONF_SYSTEMD_DISABLE_RANDOM_SEED,,systemd-random-seed) \
        systemd-remount-fs \
        systemd-reply-password \
@@ -347,7 +347,9 @@ $(STATEDIR)/systemd.targetinstall:
        @$(call install_copy, systemd, 0, 0, 0755, -, /usr/bin/systemd-notify)
        @$(call install_copy, systemd, 0, 0, 0755, -, /usr/bin/systemd-tmpfiles)
        @$(call install_copy, systemd, 0, 0, 0755, -, /usr/bin/busctl)
+ifdef PTXCONF_SYSTEMD_HOSTNAMED
        @$(call install_copy, systemd, 0, 0, 0755, -, /usr/bin/hostnamectl)
+endif
        @$(call install_copy, systemd, 0, 0, 0755, -, /usr/bin/systemd-analyze)
        @$(call install_copy, systemd, 0, 0, 0755, -, /usr/bin/systemd-cat)
        @$(call install_copy, systemd, 0, 0, 0755, -, /usr/bin/systemd-cgls)
@@ -377,9 +379,11 @@ $(STATEDIR)/systemd.targetinstall:
        @$(call install_tree, systemd, 0, 0, -, /usr/lib/tmpfiles.d/)
        @$(call install_copy, systemd, 0, 0, 0644, -, 
/usr/lib/sysctl.d/50-default.conf)
 
+ifdef PTXCONF_SYSTEMD_DBUS_SERVICES
        @$(call install_copy, systemd, 0, 0, 0644, -, \
                /usr/share/dbus-1/services/org.freedesktop.systemd1.service)
        @$(call install_tree, systemd, 0, 0, -, 
/usr/share/dbus-1/system-services/)
+endif
 
 #      # systemd expects this directory to exist.
        @$(call install_copy, systemd, 0, 0, 0755, /var/lib/systemd)
-- 
2.29.2


_______________________________________________
ptxdist mailing list
[email protected]
To unsubscribe, send a mail with subject "unsubscribe" to 
[email protected]

Reply via email to