mail-filter/spamassassin: new revision to fix the systemd service.
authorMichael Orlitzky <mjo@gentoo.org>
Thu, 24 Aug 2017 18:25:03 +0000 (14:25 -0400)
committerMichael Orlitzky <mjo@gentoo.org>
Thu, 24 Aug 2017 18:26:32 +0000 (14:26 -0400)
As part of bug 590346, I accidentally broke the systemd service file
by starting the service as spamd:spamd when it needs to bind to port
783. Even when the service is run in the foreground, it needs to be
started as root; it will then drop privileges if given the --username
and --groupname flags. The new service file gets this right, with
root owning the main process and spamd:spamd the children.

Thanks to Dan Goodliffe for the report and help debugging the issue.

Gentoo-Bug: 590346

Package-Manager: Portage-2.3.6, Repoman-2.3.1

mail-filter/spamassassin/files/spamassassin.service-r3 [moved from mail-filter/spamassassin/files/spamassassin.service-r2 with 66% similarity]
mail-filter/spamassassin/spamassassin-3.4.1-r16.ebuild [moved from mail-filter/spamassassin/spamassassin-3.4.1-r15.ebuild with 99% similarity]

similarity index 66%
rename from mail-filter/spamassassin/files/spamassassin.service-r2
rename to mail-filter/spamassassin/files/spamassassin.service-r3
index 8032057178460135b56330dfa43ed9f44e4ffbeb..6bc74c46cc5fb63e40628820f77f9d6e2911115c 100644 (file)
@@ -3,10 +3,8 @@ Description=Spamassassin daemon
 After=network.target
 
 [Service]
-ExecStart=/usr/sbin/spamd $SPAMD_OPTS
+ExecStart=/usr/sbin/spamd --username=spamd --groupname=spamd $SPAMD_OPTS
 ExecReload=/bin/kill -HUP $MAINPID
-User=spamd
-Group=spamd
 
 [Install]
 WantedBy=multi-user.target
similarity index 99%
rename from mail-filter/spamassassin/spamassassin-3.4.1-r15.ebuild
rename to mail-filter/spamassassin/spamassassin-3.4.1-r16.ebuild
index 47d77f361f7377fb321d47c4a1c74842ad695173..3273f6b1706b2b498378291a200ba2119cd01066 100644 (file)
@@ -158,7 +158,7 @@ src_install () {
        newinitd "${FILESDIR}/3.4.1-spamd.init-r1" spamd
        newconfd "${FILESDIR}/3.4.1-spamd.conf" spamd
 
-       systemd_newunit "${FILESDIR}/${PN}.service-r2" "${PN}.service"
+       systemd_newunit "${FILESDIR}/${PN}.service-r3" "${PN}.service"
        systemd_install_serviced "${FILESDIR}/${PN}.service.conf-r1" \
                                                         "${PN}.service"