Add logrotate for qubes logs

Fixes QubesOS/qubes-issues#3603
This commit is contained in:
Marek Marczykowski-Górecki 2019-01-06 04:32:32 +01:00
parent a9ec2bb2c3
commit a88733149d
No known key found for this signature in database
GPG Key ID: 063938BA42CFA724
3 changed files with 23 additions and 0 deletions

View File

@ -12,3 +12,6 @@ install:
install -d $(DESTDIR)/etc/dbus-1/system.d
install -m 0644 dbus-org.qubesos.PolicyAgent.conf \
$(DESTDIR)/etc/dbus-1/system.d/org.qubesos.PolicyAgent.conf
install -d $(DESTDIR)/etc/logrotate.d
install -m 0644 logrotate-qubes \
$(DESTDIR)/etc/logrotate.d/qubes

View File

@ -0,0 +1,19 @@
/var/log/qubes/qmemman.log {
create 0640 root qubes
su root qubes
postrotate
/bin/systemctl restart qubes-qmemman.service >/dev/null 2>/dev/null || true
endscript
}
/var/log/qubes/qubes.log {
create 0640 root qubes
su root qubes
postrotate
/bin/systemctl restart qubesd.service >/dev/null 2>/dev/null || true
endscript
}
/var/log/qubes/vm-*.log {
su root qubes
}

View File

@ -193,6 +193,7 @@ fi
%defattr(-,root,root,-)
%config(noreplace) %attr(0664,root,qubes) %{_sysconfdir}/qubes/qmemman.conf
%config(noreplace) /etc/dbus-1/system.d/org.qubesos.PolicyAgent.conf
%config(noreplace) /etc/logrotate.d/qubes
%attr(770,root,qubes) %dir /etc/qubes/backup
/usr/bin/qvm-*
/usr/bin/qubes-*