Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 582708 - mail-filter/rspamd-1.2.6: missing systemd service and socket files
Summary: mail-filter/rspamd-1.2.6: missing systemd service and socket files
Status: RESOLVED OBSOLETE
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Christian Roessner
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: install-systemd-unit
  Show dependency tree
 
Reported: 2016-05-11 03:03 UTC by David Heidelberg (okias)
Modified: 2019-01-16 12:49 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description David Heidelberg (okias) 2016-05-11 03:03:14 UTC
There is missing part, where are installed systemd services.
Comment 1 David Heidelberg (okias) 2016-05-11 20:46:42 UTC
same for rmilter.

It works for me with small changes to service/socket files (socket files not work for me, not sure yet..)

############ CHANGED USER ########### rspamd.service
[Unit]
Description=rapid spam filtering system
After=nss-lookup.target

[Service]
ExecStart=/usr/bin/rspamd -c /etc/rspamd/rspamd.conf -f
User=rspamd
RuntimeDirectory=rspamd
RuntimeDirectoryMode=0755
Restart=always

[Install]
WantedBy=multi-user.target

############ CHANGED USER ########### rmilter.socket
[Unit]
Description=Another sendmail milter for different mail checks

[Socket]
ListenStream=/var/run/rmilter/rmilter.sock
SocketUser=rmilter
SocketGroup=adm
SocketMode=660

[Install]
WantedBy=sockets.target
Comment 2 Dirkjan Ochtman (RETIRED) gentoo-dev 2016-05-15 11:01:36 UTC
Can one of you please try this patch?

diff --git a/mail-filter/rspamd/rspamd-1.2.6.ebuild b/mail-filter/rspamd/rspamd-1.2.6.ebuild
index 6e2b770..2635e80 100644
--- a/mail-filter/rspamd/rspamd-1.2.6.ebuild
+++ b/mail-filter/rspamd/rspamd-1.2.6.ebuild
@@ -4,7 +4,7 @@
 
 EAPI=5
 
-inherit cmake-utils user
+inherit cmake-utils user systemd
 
 DESCRIPTION="Rapid spam filtering system"
 SRC_URI="https://rspamd.com/downloads/${P}.tar.xz"
@@ -13,7 +13,7 @@ HOMEPAGE="https://github.com/vstakhov/rspamd"
 LICENSE="Apache-2.0"
 SLOT="0"
 KEYWORDS="~amd64 ~x86"
-IUSE="+jit"
+IUSE="+jit systemd"
 
 DEPEND="dev-libs/openssl:0[-bindist]
 		jit? (
@@ -59,4 +59,6 @@ src_install() {
 
 	insinto /etc/logrotate.d
 	newins "${FILESDIR}/rspamd.logrotate" rspamd
+
+	systemd_newunit rspamd.service
 }

I'm not sure yet whether both the service and socket files from rspamd are needed, or how to install the socket file.
Comment 3 Coacher 2016-05-15 11:27:31 UTC
Please do not use systemd USE to control unit file installation: https://wiki.gentoo.org/wiki/Project:Systemd/Ebuild_policy#General_guidelines
Comment 4 Dirkjan Ochtman (RETIRED) gentoo-dev 2016-05-15 11:52:45 UTC
Ah, good point, thanks!
Comment 5 David Heidelberg (okias) 2016-05-15 18:07:51 UTC
also original user in service unit is "_rspamd", I guess it needs to be replaced with "rspamd"
Comment 6 Jonas Stein gentoo-dev 2018-06-16 11:29:23 UTC
mail-filter/rspamd-1.2.6 is not in the tree anymore. We only have 
~1.6.5 ~1.6.6 ~1.7.1 ~1.7.2 ~1.7.5 **9999

was the problem fixed in the meantime?
Can we close this ticket?
Comment 7 Thomas Deutschmann (RETIRED) gentoo-dev 2019-01-16 12:49:29 UTC
Current version (v1.8.3) is installing systemd service.