summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorŁukasz Stelmach <l.stelmach@samsung.com>2014-11-28 15:59:59 +0100
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2014-11-30 23:50:19 -0500
commit5a16bc264c32237e38a844d55e7a1820a31b8440 (patch)
tree0f259cac8dcc873dff16ea25f8c6e9f7b7dc6889
parentf4e9cdbc6259237b2cb779a16e7c1aca0fd44e58 (diff)
build-sys: configure the list of system users, files and directories
Choose which system users defined in sysusers.d/systemd.conf and files or directories in tmpfiles.d/systemd.conf, should be provided depending on comile-time configuration.
-rw-r--r--Makefile.am4
-rw-r--r--configure.ac2
-rw-r--r--sysusers.d/.gitignore1
-rw-r--r--sysusers.d/systemd.conf.m4 (renamed from sysusers.d/systemd.conf)8
-rw-r--r--tmpfiles.d/.gitignore3
-rw-r--r--tmpfiles.d/systemd.conf.m4 (renamed from tmpfiles.d/systemd.conf)2
6 files changed, 19 insertions, 1 deletions
diff --git a/Makefile.am b/Makefile.am
index cd81a77754..38d320fc3b 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -5856,6 +5856,10 @@ src/%: src/%.m4
$(AM_V_at)$(MKDIR_P) $(dir $@)
$(AM_V_M4)$(M4) -P $(M4_DEFINES) < $< > $@
+sysusers.d/%: sysusers.d/%.m4
+ $(AM_V_at)$(MKDIR_P) $(dir $@)
+ $(AM_V_M4)$(M4) -P $(M4_DEFINES) < $< > $@
+
tmpfiles.d/%: tmpfiles.d/%.m4
$(AM_V_at)$(MKDIR_P) $(dir $@)
$(AM_V_M4)$(M4) -P $(M4_DEFINES) < $< > $@
diff --git a/configure.ac b/configure.ac
index 928ac2e995..356a3c3d67 100644
--- a/configure.ac
+++ b/configure.ac
@@ -984,6 +984,7 @@ have_timesyncd=no
AC_ARG_ENABLE(timesyncd, AS_HELP_STRING([--disable-timesyncd], [disable timesync daemon]))
if test "x$enable_timesyncd" != "xno"; then
have_timesyncd=yes
+ M4_DEFINES="$M4_DEFINES -DENABLE_TIMESYNCD"
fi
AM_CONDITIONAL(ENABLE_TIMESYNCD, [test "$have_timesyncd" = "yes"])
@@ -1073,6 +1074,7 @@ AC_ARG_ENABLE(networkd, AS_HELP_STRING([--disable-networkd], [disable networkd])
AS_IF([test "x$enable_networkd" != "xno"], [
AC_DEFINE(ENABLE_NETWORKD, 1, [Define if networkd support is to be enabled])
have_networkd=yes
+ M4_DEFINES="$M4_DEFINES -DENABLE_NETWORKD"
])
AM_CONDITIONAL(ENABLE_NETWORKD, [test "x$have_networkd" = "xyes"])
diff --git a/sysusers.d/.gitignore b/sysusers.d/.gitignore
index f7957a9889..bb3aaaf821 100644
--- a/sysusers.d/.gitignore
+++ b/sysusers.d/.gitignore
@@ -1 +1,2 @@
/basic.conf
+/systemd.conf
diff --git a/sysusers.d/systemd.conf b/sysusers.d/systemd.conf.m4
index 95437b8544..23175de1f5 100644
--- a/sysusers.d/systemd.conf
+++ b/sysusers.d/systemd.conf.m4
@@ -6,7 +6,15 @@
# (at your option) any later version.
g systemd-journal - -
+m4_ifdef(`ENABLE_KDBUS',
u systemd-bus-proxy - "systemd Bus Proxy"
+)m4_dnl
+m4_ifdef(`ENABLE_NETWORKD',
u systemd-network - "systemd Network Management"
+)m4_dnl
+m4_ifdef(`ENABLE_RESOLVED',
u systemd-resolve - "systemd Resolver"
+)m4_dnl
+m4_ifdef(`ENABLE_TIMESYNCD',
u systemd-timesync - "systemd Time Synchronization"
+)m4_dnl
diff --git a/tmpfiles.d/.gitignore b/tmpfiles.d/.gitignore
index eb323154ff..4f0ecaa9c3 100644
--- a/tmpfiles.d/.gitignore
+++ b/tmpfiles.d/.gitignore
@@ -1 +1,2 @@
-etc.conf
+/etc.conf
+/systemd.conf
diff --git a/tmpfiles.d/systemd.conf b/tmpfiles.d/systemd.conf.m4
index 9ca5ad2bc8..ad05f43334 100644
--- a/tmpfiles.d/systemd.conf
+++ b/tmpfiles.d/systemd.conf.m4
@@ -16,9 +16,11 @@ d /run/systemd/sessions 0755 root root -
d /run/systemd/users 0755 root root -
d /run/systemd/machines 0755 root root -
d /run/systemd/shutdown 0755 root root -
+m4_ifdef(`ENABLE_NETWORKD',
d /run/systemd/netif 0755 systemd-network systemd-network -
d /run/systemd/netif/links 0755 systemd-network systemd-network -
d /run/systemd/netif/leases 0755 systemd-network systemd-network -
+)m4_dnl
d /run/log 0755 root root -