chiark / gitweb /
rpm: add RPM macros to apply sysusers, sysctl, and binfmt drop-ins
authorLennart Poettering <lennart@poettering.net>
Fri, 13 Jun 2014 17:18:55 +0000 (19:18 +0200)
committerLennart Poettering <lennart@poettering.net>
Fri, 13 Jun 2014 18:11:59 +0000 (20:11 +0200)
With this in place RPMs can make sure that whatever they drop in is
immeidately applied, and not delayed until next reboot.

This also moves systemd-sysusers back to /usr/bin, since hardcoding the
path to /usr/lib in the macros would mean compatibility breaks in
future, should we turn sysusers into a command that is actually OK for
people to call directly. And given that that is quite likely to happen
(since it is useful to prepare images with its --root= switch), let's
just prepare for it.

Makefile.am
src/core/macros.systemd.in
units/systemd-sysusers.service.in

index 2ceee2a9976ce8d955779ad7e117cbb33de41bfd..8af619cc8fa5cfeb23eef5c8a38cedd6a7788e5d 100644 (file)
@@ -1782,7 +1782,7 @@ systemd_sysusers_LDADD = \
        libsystemd-internal.la \
        libsystemd-shared.la
 
        libsystemd-internal.la \
        libsystemd-shared.la
 
-rootlibexec_PROGRAMS += \
+rootbin_PROGRAMS += \
        systemd-sysusers
 
 nodist_systemunit_DATA += \
        systemd-sysusers
 
 nodist_systemunit_DATA += \
index 167016a85a050d235918156e99abc7b3430ab8e6..0d5f8949ab52f955adcc265d2d5a7714ce2899fb 100644 (file)
@@ -26,7 +26,9 @@
 %_udevrulesdir @udevrulesdir@
 %_journalcatalogdir @catalogdir@
 %_tmpfilesdir @tmpfilesdir@
 %_udevrulesdir @udevrulesdir@
 %_journalcatalogdir @catalogdir@
 %_tmpfilesdir @tmpfilesdir@
+%_sysusersdir @sysusersdir@
 %_sysctldir @sysctldir@
 %_sysctldir @sysctldir@
+%_binfmtdir @binfmtdir@
 
 %systemd_requires \
 Requires(post): systemd \
 
 %systemd_requires \
 Requires(post): systemd \
@@ -76,3 +78,15 @@ journalctl --update-catalog >/dev/null 2>&1 || : \
 %tmpfiles_create() \
 systemd-tmpfiles --create %{?*} >/dev/null 2>&1 || : \
 %{nil}
 %tmpfiles_create() \
 systemd-tmpfiles --create %{?*} >/dev/null 2>&1 || : \
 %{nil}
+
+%sysusers_create() \
+systemd-sysusers %{?*} >/dev/null 2>&1 || : \
+%{nil}
+
+%sysctl_apply() \
+@rootlibexecdir@/systemd-sysctl %{?*} >/dev/null 2>&1 || : \
+%{nil}
+
+%binfmt_apply() \
+@rootlibexecdir@/systemd-binfmt %{?*} >/dev/null 2>&1 || : \
+%{nil}
index e123f398a4ba229261f19b8143d708aeda306d60..a4c77141557c73733000db86286bce350170fe99 100644 (file)
@@ -19,4 +19,4 @@ ConditionNeedsUpdate=/etc
 [Service]
 Type=oneshot
 RemainAfterExit=yes
 [Service]
 Type=oneshot
 RemainAfterExit=yes
-ExecStart=@rootlibexecdir@/systemd-sysusers
+ExecStart=@rootbindir@/systemd-sysusers