commit:     ca0238e2836bfc97cd7c4d3813189ff60519d2c8
Author:     Alexander Golubev <fatzer2 <AT> gmail <DOT> com>
AuthorDate: Mon Dec 25 01:30:39 2023 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Thu Feb 22 10:28:14 2024 +0000
URL:        https://gitweb.gentoo.org/proj/qt.git/commit/?id=ca0238e2

x11-misc/sddm: add logrotate config

Bug: https://bugs.gentoo.org/565862
Signed-off-by: Alexander Golubev <fatzer2 <AT> gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/34466
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>

 x11-misc/sddm/files/sddm.logrotate | 5 +++++
 x11-misc/sddm/sddm-9999.ebuild     | 8 +++++++-
 2 files changed, 12 insertions(+), 1 deletion(-)

diff --git a/x11-misc/sddm/files/sddm.logrotate 
b/x11-misc/sddm/files/sddm.logrotate
new file mode 100644
index 00000000..ba6199c4
--- /dev/null
+++ b/x11-misc/sddm/files/sddm.logrotate
@@ -0,0 +1,5 @@
+/var/log/sddm.log {
+       missingok
+       notifempty
+       copytruncate
+}

diff --git a/x11-misc/sddm/sddm-9999.ebuild b/x11-misc/sddm/sddm-9999.ebuild
index bc905539..f210629a 100644
--- a/x11-misc/sddm/sddm-9999.ebuild
+++ b/x11-misc/sddm/sddm-9999.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2023 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=8
@@ -101,6 +101,12 @@ src_install() {
 
        insinto /etc/sddm.conf.d/
        doins "${S}"/01gentoo.conf
+
+       # with systemd logs are sent to journald, so no point to bother in that 
case
+       if ! use systemd; then
+               insinto /etc/logrotate.d
+               newins "${FILESDIR}/sddm.logrotate" sddm
+       fi
 }
 
 pkg_postinst() {

Reply via email to