[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#908965: stretch-pu: package postgrey/1.36-3+deb9u1



Package: release.debian.org
Severity: normal
Tags: stretch
User: release.debian.org@packages.debian.org
Usertags: pu

Create the pid file in a subdirectory that is owned
by the postgrey user, avoiding problems with removing
or overwriting the pid file.
diff -Nru postgrey-1.36/debian/changelog postgrey-1.36/debian/changelog
--- postgrey-1.36/debian/changelog	2016-08-28 21:18:34.000000000 +0300
+++ postgrey-1.36/debian/changelog	2018-09-16 22:01:59.000000000 +0300
@@ -1,3 +1,12 @@
+postgrey (1.36-3+deb9u1) stretch; urgency=medium
+
+  * Non-maintainer upload.
+  * debian/postgrey.init: create /var/run/postgrey if it
+    does not exist, patch provided by Laurent Bigonville <bigon@debian.org>.
+    (Closes: 756813, 880047)
+
+ -- Adrian Bunk <bunk@debian.org>  Sun, 16 Sep 2018 22:01:59 +0300
+
 postgrey (1.36-3) unstable; urgency=medium
 
   * debian/patches:
diff -Nru postgrey-1.36/debian/postgrey.init postgrey-1.36/debian/postgrey.init
--- postgrey-1.36/debian/postgrey.init	2016-08-28 21:18:34.000000000 +0300
+++ postgrey-1.36/debian/postgrey.init	2018-09-16 22:01:59.000000000 +0300
@@ -26,7 +26,7 @@
 DESC="postfix greylisting daemon"
 DAEMON_USER=postgrey
 
-PIDFILE=/var/run/$DAEMON_NAME.pid
+PIDFILE=/var/run/postgrey/$DAEMON_NAME.pid
 SCRIPTNAME=/etc/init.d/$DAEMON_NAME
 
 # Gracefully exit if the package has been removed.
@@ -55,6 +55,14 @@
         #   0 if daemon has been started
         #   1 if daemon was already running
         #   2 if daemon could not be started
+   if [ ! -d /var/run/postgrey/ ]
+   then
+                mkdir /var/run/postgrey/
+                chown $DAEMON_USER: /var/run/postgrey/
+                chmod 0755 /var/run/postgrey/
+                # Restore selinux context
+                [ -x /sbin/restorecon ] && /sbin/restorecon /var/run/postgrey/
+   fi
         start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON --test > /dev/null \
                 || return 1
         start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON -- \

Reply to: