From 6e53b111022ba1f16aea75c9d2d12380ce58f8dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Bidar?= Date: Fri, 12 May 2023 00:40:31 +0300 Subject: [PATCH] Linux: Seperate pre- and postrequires for sysv init and systemd MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Ensures that systemd is installed before davmail so %post etc work. Solves: /var/tmp/rpm-tmp.HZLayD: line 15: /usr/bin/systemd-tmpfiles: No such file or directory Or similar. Signed-off-by: Björn Bidar --- davmail.spec | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/davmail.spec b/davmail.spec index 76c31adc..fdafe5cb 100644 --- a/davmail.spec +++ b/davmail.spec @@ -39,10 +39,14 @@ BuildRequires: javafx %endif Requires: coreutils Requires: filesystem +%if %systemd_support +%systemd_requires +%else Requires(pre): /usr/sbin/useradd, /usr/sbin/groupadd Requires(post): coreutils, filesystem, /sbin/chkconfig Requires(preun): /sbin/service, coreutils, /sbin/chkconfig, /usr/sbin/userdel, /usr/sbin/groupdel Requires(postun): /sbin/service +%endif %if 0%{?el7} || 0%{?el8} || 0%{?fedora} Requires: /etc/init.d, logrotate, java-1.8.0-openjdk