SHA256
1
0
forked from pool/fetchmail

Accepting request 396088 from home:jengelh:branches:server:mail

- Check for user/group existence before attempting to add them,
  and remove error suppression from these calls.
- Ensure tmpfile creation is run

OBS-URL: https://build.opensuse.org/request/show/396088
OBS-URL: https://build.opensuse.org/package/show/server:mail/fetchmail?expand=0&rev=70
This commit is contained in:
P. Janouch 2016-05-17 15:37:52 +00:00 committed by Git OBS Bridge
parent 60bce8b149
commit a77029be94
2 changed files with 14 additions and 3 deletions

View File

@ -1,3 +1,10 @@
-------------------------------------------------------------------
Fri May 13 19:33:41 UTC 2016 - jengelh@inai.de
- Check for user/group existence before attempting to add them,
and remove error suppression from these calls.
- Ensure tmpfile creation is run
------------------------------------------------------------------- -------------------------------------------------------------------
Fri May 13 12:06:54 UTC 2016 - pjanouch@suse.de Fri May 13 12:06:54 UTC 2016 - pjanouch@suse.de

View File

@ -117,13 +117,17 @@ rm -r contrib/gai*
%find_lang %{name} %find_lang %{name}
%pre %pre
usr/sbin/useradd -r -g daemon -s /bin/false \ /usr/bin/getent passwd fetchmail >/dev/null || \
-c "mail retrieval daemon" -d %{_localstatedir}/lib/fetchmail fetchmail 2>/dev/null || : /usr/sbin/useradd -r -g daemon -s /bin/false \
%service_add_pre %{name}.service -c "mail retrieval daemon" -d %{_localstatedir}/lib/fetchmail fetchmail || :
%service_add_pre %{name}.service
%post %post
%fillup_only %fillup_only
%service_add_post %{name}.service %service_add_post %{name}.service
if [ -x /usr/bin/systemd-tmpfiles ]; then
systemd-tmpfiles --create %{name}.conf || :
fi
# Ensure that all files are readable by fetchmail with non-root UID. # Ensure that all files are readable by fetchmail with non-root UID.
touch var/log/fetchmail touch var/log/fetchmail
chown fetchmail var/log/fetchmail chown fetchmail var/log/fetchmail