From d77bdd7bc2bf5eac33952f32765cd49af46be887 Mon Sep 17 00:00:00 2001 From: Andreas Henriksson Date: Sat, 9 Dec 2023 09:51:58 +0100 Subject: [PATCH] Install tmpfiles.d snippet to create blackbox Create the variable content as needed instead of simply relying on statically shipping it at initial install. This is better aligned with the concepts of stateless systems, factory reset, ostree, etc. Signed-off-by: Andreas Henriksson --- Makefile | 5 ++++- speakersafetyd.tmpfiles | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) create mode 100644 speakersafetyd.tmpfiles diff --git a/Makefile b/Makefile index 8524ef8..b7224d0 100644 --- a/Makefile +++ b/Makefile @@ -4,6 +4,7 @@ BINDIR ?= /usr/bin UNITDIR ?= /lib/systemd/system UDEVDIR ?= /lib/udev/rules.d +TMPFILESDIR ?= /usr/lib/tmpfiles.d SHAREDIR ?= /usr/share/ VARDIR ?= /var/ @@ -22,9 +23,11 @@ install-data: install -dDm0755 $(DESTDIR)/$(SHAREDIR)/speakersafetyd/apple install -pm0644 -t $(DESTDIR)/$(SHAREDIR)/speakersafetyd/apple $(wildcard conf/apple/*) install -dDm0755 $(DESTDIR)/$(VARDIR)/lib/speakersafetyd/blackbox + install -dDm0755 $(DESTDIR)/$(TMPFILESDIR) + install -pm0644 speakersafetyd.tmpfiles $(DESTDIR)/$(TMPFILESDIR)/speakersafetyd.conf uninstall: - rm -f $(DESTDIR)/$(BINDIR)/speakersafetyd $(DESTDIR)/$(UNITDIR)/speakersafetyd.service $(DESTDIR)/$(UDEVDIR)/95-speakersafetyd.rules + rm -f $(DESTDIR)/$(BINDIR)/speakersafetyd $(DESTDIR)/$(UNITDIR)/speakersafetyd.service $(DESTDIR)/$(UDEVDIR)/95-speakersafetyd.rules $(DESTDIR)/$(TMPFILESDIR)/speakersafetyd.conf rm -rf $(DESTDIR)/$(SHAREDIR)/speakersafetyd .PHONY: all install install-data uninstall diff --git a/speakersafetyd.tmpfiles b/speakersafetyd.tmpfiles new file mode 100644 index 0000000..62a9560 --- /dev/null +++ b/speakersafetyd.tmpfiles @@ -0,0 +1 @@ +d /var/lib/speakersafetyd/blackbox 0755 root root -