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 <andreas@fatal.se>
This commit is contained in:
Andreas Henriksson 2023-12-09 09:51:58 +01:00 committed by James Calligeros
parent 71b9c84f99
commit d77bdd7bc2
2 changed files with 5 additions and 1 deletions

View file

@ -4,6 +4,7 @@
BINDIR ?= /usr/bin BINDIR ?= /usr/bin
UNITDIR ?= /lib/systemd/system UNITDIR ?= /lib/systemd/system
UDEVDIR ?= /lib/udev/rules.d UDEVDIR ?= /lib/udev/rules.d
TMPFILESDIR ?= /usr/lib/tmpfiles.d
SHAREDIR ?= /usr/share/ SHAREDIR ?= /usr/share/
VARDIR ?= /var/ VARDIR ?= /var/
@ -22,9 +23,11 @@ install-data:
install -dDm0755 $(DESTDIR)/$(SHAREDIR)/speakersafetyd/apple install -dDm0755 $(DESTDIR)/$(SHAREDIR)/speakersafetyd/apple
install -pm0644 -t $(DESTDIR)/$(SHAREDIR)/speakersafetyd/apple $(wildcard conf/apple/*) install -pm0644 -t $(DESTDIR)/$(SHAREDIR)/speakersafetyd/apple $(wildcard conf/apple/*)
install -dDm0755 $(DESTDIR)/$(VARDIR)/lib/speakersafetyd/blackbox install -dDm0755 $(DESTDIR)/$(VARDIR)/lib/speakersafetyd/blackbox
install -dDm0755 $(DESTDIR)/$(TMPFILESDIR)
install -pm0644 speakersafetyd.tmpfiles $(DESTDIR)/$(TMPFILESDIR)/speakersafetyd.conf
uninstall: 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 rm -rf $(DESTDIR)/$(SHAREDIR)/speakersafetyd
.PHONY: all install install-data uninstall .PHONY: all install install-data uninstall

1
speakersafetyd.tmpfiles Normal file
View file

@ -0,0 +1 @@
d /var/lib/speakersafetyd/blackbox 0755 root root -