Package: milter-greylist Version: 4.3.9-1 Severity: wishlist Tags: patch User: [email protected] Usertags: systemd-units X-Debbugs-CC: [email protected]
Hi, the attached patch adds support for systemd. There is a notable change compared to the init script. The service file will not use the values in /etc/default/milter-greylist, because I believe, that this file is not needed. A user can change some settings there that can also be changed in the main configuration file (e.g pidfile, socketfile, user, etc.). The patch changes the init script, so that it sources /lib/lsb/init-functions. This is needed for invoking the init script under systemd directly. I would also recommend to upgrade the package to 4.4.3, because it fixes the duplicate logging, when running milter-greylist in the foreground (-D parameter). This mode is used by the service file. If desired, I could also write some paragraphs for README.Debian, that gives some pointers how to run milter-greylist with postfix under systemd, so that users do not have the problem as described in #554239. Best regards Christian
diff -Nru milter-greylist-4.3.9/debian/control milter-greylist-4.3.9/debian/control --- milter-greylist-4.3.9/debian/control 2011-06-22 15:17:35.000000000 +0200 +++ milter-greylist-4.3.9/debian/control 2014-02-16 22:38:16.000000000 +0100 @@ -2,7 +2,7 @@ Section: mail Priority: extra Maintainer: Paul Martin <[email protected]> -Build-Depends: quilt, debhelper (>= 8), autotools-dev, libmilter-dev, bison, flex, libspf2-dev +Build-Depends: quilt, debhelper (>= 8), autotools-dev, libmilter-dev, bison, flex, libspf2-dev, dh-systemd Standards-Version: 3.9.2 Package: milter-greylist diff -Nru milter-greylist-4.3.9/debian/milter-greylist.service milter-greylist-4.3.9/debian/milter-greylist.service --- milter-greylist-4.3.9/debian/milter-greylist.service 1970-01-01 01:00:00.000000000 +0100 +++ milter-greylist-4.3.9/debian/milter-greylist.service 2014-02-17 00:00:35.000000000 +0100 @@ -0,0 +1,13 @@ +[Unit] +Description=Greylist Mail Filter Daemon +Before=sendmail.service +Before=postfix.service + +[Service] +Type=simple +ExecStart=/usr/sbin/milter-greylist -D +Restart=on-failure +PrivateTmp=true + +[Install] +WantedBy=multi-user.target diff -Nru milter-greylist-4.3.9/debian/milter-greylist.tmpfile milter-greylist-4.3.9/debian/milter-greylist.tmpfile --- milter-greylist-4.3.9/debian/milter-greylist.tmpfile 1970-01-01 01:00:00.000000000 +0100 +++ milter-greylist-4.3.9/debian/milter-greylist.tmpfile 2014-02-19 00:19:37.000000000 +0100 @@ -0,0 +1 @@ +d /run/milter-greylist 0755 greylist greylist diff -Nru milter-greylist-4.3.9/debian/patches/initfile.lsbfunctions milter-greylist-4.3.9/debian/patches/initfile.lsbfunctions --- milter-greylist-4.3.9/debian/patches/initfile.lsbfunctions 1970-01-01 01:00:00.000000000 +0100 +++ milter-greylist-4.3.9/debian/patches/initfile.lsbfunctions 2014-02-16 22:39:23.000000000 +0100 @@ -0,0 +1,13 @@ +Index: milter-greylist-4.3.9/rc-debian.sh.in +=================================================================== +--- milter-greylist-4.3.9.orig/rc-debian.sh.in 2014-02-16 22:38:03.000000000 +0100 ++++ milter-greylist-4.3.9/rc-debian.sh.in 2014-02-16 22:39:20.572000000 +0100 +@@ -16,7 +16,7 @@ + # Description: another spam-defense service + ### END INIT INFO + +- ++. /lib/lsb/init-functions + + # Based on skeleton by Miquel van Smoorenburg and Ian Murdock + diff -Nru milter-greylist-4.3.9/debian/patches/series milter-greylist-4.3.9/debian/patches/series --- milter-greylist-4.3.9/debian/patches/series 2010-03-15 14:55:46.000000000 +0100 +++ milter-greylist-4.3.9/debian/patches/series 2014-02-16 22:38:44.000000000 +0100 @@ -6,3 +6,4 @@ tempfs.508122 initfile.mountall 573936-dump_lex +initfile.lsbfunctions diff -Nru milter-greylist-4.3.9/debian/rules milter-greylist-4.3.9/debian/rules --- milter-greylist-4.3.9/debian/rules 2011-06-22 15:18:16.000000000 +0200 +++ milter-greylist-4.3.9/debian/rules 2014-02-16 22:38:19.000000000 +0100 @@ -1,6 +1,6 @@ #!/usr/bin/make -f %: - dh $@ --with quilt,autotools_dev + dh $@ --with quilt,autotools_dev,systemd override_dh_auto_configure: dh_auto_configure -- \

