diff --git a/Makefile-daemon.am b/Makefile-daemon.am index 8324765a..ed8ff56d 100644 --- a/Makefile-daemon.am +++ b/Makefile-daemon.am @@ -59,10 +59,14 @@ systemdunit_service_in_files = \ $(srcdir)/src/daemon/rpm-ostreed.service.in \ $(srcdir)/src/daemon/rpm-ostreed-automatic.service.in \ $(srcdir)/src/daemon/rpm-ostree-bootstatus.service.in \ + $(srcdir)/src/daemon/rpm-ostree-countme.service.in \ $(NULL) systemdunit_service_files = $(systemdunit_service_in_files:.service.in=.service) -systemdunit_timer_files = $(srcdir)/src/daemon/rpm-ostreed-automatic.timer +systemdunit_timer_files = \ + $(srcdir)/src/daemon/rpm-ostreed-automatic.timer \ + $(srcdir)/src/daemon/rpm-ostree-countme.timer \ + $(NULL) systemdunit_DATA = \ $(systemdunit_service_files) \ @@ -78,6 +82,9 @@ endif $(systemdunit_service_files): Makefile $(SED_SUBST) $(daemon_asan_options) $@.in > $@ +systemdsysusers_DATA = $(srcdir)/src/daemon/rpm-ostree.conf +systemdsysusersdir = $(prefix)/lib/sysusers.d + # We keep this stub script around to have SELinux labeling work, # plus some backwards compatibility. libexec_SCRIPTS = rpm-ostreed @@ -107,6 +114,7 @@ EXTRA_DIST += \ $(service_in_files) \ $(systemdunit_service_in_files) \ $(systemdunit_timer_files) \ + $(systemdsysusers_conf_files) \ $(NULL) CLEANFILES += \ diff --git a/packaging/rpm-ostree.spec.in b/packaging/rpm-ostree.spec.in index a9748434..3605e84b 100644 --- a/packaging/rpm-ostree.spec.in +++ b/packaging/rpm-ostree.spec.in @@ -175,6 +175,7 @@ $PYTHON autofiles.py > files \ '%{_datadir}/dbus-1/system.d/*' \ '%{_sysconfdir}/rpm-ostreed.conf' \ '%{_prefix}/lib/systemd/system/*' \ + '%{_prefix}/lib/sysusers.d*' \ '%{_libexecdir}/rpm-ostree*' \ '%{_datadir}/polkit-1/actions/*.policy' \ '%{_datadir}/dbus-1/system-services' \ diff --git a/src/app/rpm-ostree-countme.service b/src/daemon/rpm-ostree-countme.service.in similarity index 87% rename from src/app/rpm-ostree-countme.service rename to src/daemon/rpm-ostree-countme.service.in index 77487f4c..9083e141 100644 --- a/src/app/rpm-ostree-countme.service +++ b/src/daemon/rpm-ostree-countme.service.in @@ -9,4 +9,4 @@ User=rpm-ostree DynamicUser=yes StateDirectory=rpm-ostree-countme StateDirectoryMode=750 -ExecStart=/usr/bin/rpm-ostree countme +ExecStart=@bindir@/rpm-ostree countme diff --git a/src/app/rpm-ostree-countme.timer b/src/daemon/rpm-ostree-countme.timer similarity index 100% rename from src/app/rpm-ostree-countme.timer rename to src/daemon/rpm-ostree-countme.timer diff --git a/src/daemon/rpm-ostree.conf b/src/daemon/rpm-ostree.conf new file mode 100644 index 00000000..7ebb02c2 --- /dev/null +++ b/src/daemon/rpm-ostree.conf @@ -0,0 +1 @@ +u rpm-ostree - "Unprivileged rpm-ostree user"