From d76c467fa26b84591a256c2c5d898882b3c8de9d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Men=C5=A1=C3=ADk?= Date: Fri, 5 Sep 2025 15:21:19 +0200 Subject: [PATCH] logrotate: skip if empty and remove old variants Many variants are never built anymore. Clean actions to just those still shipped. But do not trigger named reload when named.run file is empty. That is common on freeipa installation, where configuration changes logging to put it elsewhere. named reload is disruptive because how bind-dyndb-ldap behaves during reloads. Avoid unnecessary reloads with visible service disruption. Keep named-pkcs11 reload variant. Resolves: RHEL-113968 --- bind9.18.spec | 5 ++++- named.logrotate | 4 +--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/bind9.18.spec b/bind9.18.spec index e1a46be..8b8b792 100644 --- a/bind9.18.spec +++ b/bind9.18.spec @@ -77,7 +77,7 @@ License: MPL-2.0 AND ISC AND MIT AND BSD-3-Clause AND BSD-2-Clause # ./lib/isc/tm.c BSD-2-clause and/or MPL-2.0 # ./lib/isccfg/parser.c BSD-2-clause and/or MPL-2.0 Version: 9.18.29 -Release: 4%{?dist} +Release: 5%{?dist} Epoch: 32 Url: https://www.isc.org/downloads/bind/ # @@ -977,6 +977,9 @@ fi; %endif %changelog +* Fri Sep 12 2025 Petr Menšík - 32:9.18.29-5 +- logrotate: skip if empty and remove old variants (RHEL-113942) + * Tue Jun 10 2025 Petr Mensik - 32:9.18.29-4 - Prevent name.c:670 attributes assertion failed (RHEL-30407) - Add extra checks for relative names diff --git a/named.logrotate b/named.logrotate index 5df448f..5934e52 100644 --- a/named.logrotate +++ b/named.logrotate @@ -2,11 +2,9 @@ missingok su named named create 0644 named named + notifempty postrotate /usr/bin/systemctl reload named.service > /dev/null 2>&1 || true /usr/bin/systemctl reload named-chroot.service > /dev/null 2>&1 || true - /usr/bin/systemctl reload named-sdb.service > /dev/null 2>&1 || true - /usr/bin/systemctl reload named-sdb-chroot.service > /dev/null 2>&1 || true - /usr/bin/systemctl reload named-pkcs11.service > /dev/null 2>&1 || true endscript }