Skip to content

Commit

Permalink
Linux: Seperate pre- and postrequires for sysv init and systemd
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
Thaodan committed May 11, 2023
1 parent 84c26cc commit 6e53b11
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions davmail.spec
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 6e53b11

Please sign in to comment.