From a77029be94552daf6378ecaaf2945ae18b08a61eba4821eea4aff92594bb85a5 Mon Sep 17 00:00:00 2001 From: "P. Janouch" Date: Tue, 17 May 2016 15:37:52 +0000 Subject: [PATCH] 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 --- fetchmail.changes | 7 +++++++ fetchmail.spec | 10 +++++++--- 2 files changed, 14 insertions(+), 3 deletions(-) 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