diff --git a/fetchmail.changes b/fetchmail.changes index 243b767..43b7823 100644 --- a/fetchmail.changes +++ b/fetchmail.changes @@ -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 diff --git a/fetchmail.spec b/fetchmail.spec index 0b80e8f..41cf720 100644 --- a/fetchmail.spec +++ b/fetchmail.spec @@ -117,13 +117,17 @@ rm -r contrib/gai* %find_lang %{name} %pre -usr/sbin/useradd -r -g daemon -s /bin/false \ - -c "mail retrieval daemon" -d %{_localstatedir}/lib/fetchmail fetchmail 2>/dev/null || : - %service_add_pre %{name}.service +/usr/bin/getent passwd fetchmail >/dev/null || \ + /usr/sbin/useradd -r -g daemon -s /bin/false \ + -c "mail retrieval daemon" -d %{_localstatedir}/lib/fetchmail fetchmail || : +%service_add_pre %{name}.service %post %fillup_only %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. touch var/log/fetchmail chown fetchmail var/log/fetchmail