Skip to content

Commit bc119a9

Browse files
committed
Linux: Seperate pre- and postrequires for sysv init and systemd
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 <[email protected]>
1 parent 0329183 commit bc119a9

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

davmail.spec

+4
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,14 @@ BuildRequires: javafx
3939
%endif
4040
Requires: coreutils
4141
Requires: filesystem
42+
%if %systemd_support
43+
%systemd_requires
44+
%else
4245
Requires(pre): /usr/sbin/useradd, /usr/sbin/groupadd
4346
Requires(post): coreutils, filesystem, /sbin/chkconfig
4447
Requires(preun): /sbin/service, coreutils, /sbin/chkconfig, /usr/sbin/userdel, /usr/sbin/groupdel
4548
Requires(postun): /sbin/service
49+
%endif
4650

4751
%if 0%{?el7} || 0%{?el8} || 0%{?fedora}
4852
Requires: /etc/init.d, logrotate, java-1.8.0-openjdk

0 commit comments

Comments
 (0)