As per summary. This renders it unusable in its default state on machines using systemd profiles. sshguard under archlinux provides systemd units, but I don't know if this is an upstream feature, or one provided by that distribution. Reproducible: Always
(In reply to Sebastian Pucilowski from comment #0) > sshguard under archlinux provides systemd units, but I don't know if this is > an upstream feature, or one provided by that distribution. Archlinux package sources lives here: https://git.archlinux.org/svntogit/community.git/tree/trunk?h=packages/sshguard
See examples/sshguard.service
Also sshguard depends on openrc, not sure if this is required on systemd system.
For anyone feeling like implementing this, there is a /usr/share/doc/sshguard-1.99.0/sshguard.service.bz2 that is already installed and that might come in useful. I also removed the openrc RDEPEND (without a revision bump I'm afraid).
the default service file needed on modification. the location of iptables is not /usr/sbin/iptables. on a side note, i also had to edit /etc/sshguard.conf logreader and backend were not set correctly. emerge should be able to set default conf file properly. would be nice if the ebuild provided a systemd script and not rc script which is useless on systemd.
May someone please review my pull request.
Created attachment 623316 [details] ebuild that installs a working systemd unit This is a proposed ebuild that installs a working systemd unit. The unit file should be attached in the files directory. (Will come as further attachment.) The ebuild also refers to an updated configuration file patch. It fixes the journalctl call (and adds firewalld example…). (Will come as further attachment.) It works for me with in the sense that basic functionality like systemctl handling works.
Created attachment 623318 [details] systemd service file for sshguard This file has been adapted from the example, but included as an attachment in analogy with the init.d files.
Created attachment 623320 [details, diff] updated sshguard configuration file patch
Created attachment 623322 [details] live ebuild that installs a working systemd unit
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e1d4d69e32832607488d8deee82b61e26f061c02 commit e1d4d69e32832607488d8deee82b61e26f061c02 Author: Yixun Lan <dlan@gentoo.org> AuthorDate: 2021-02-13 15:52:47 +0000 Commit: Yixun Lan <dlan@gentoo.org> CommitDate: 2021-02-13 15:56:11 +0000 app-admin/sshguard: install systemd unit file Closes: https://bugs.gentoo.org/588726 Package-Manager: Portage-3.0.13, Repoman-3.0.2 Signed-off-by: Yixun Lan <dlan@gentoo.org> app-admin/sshguard/files/sshguard-2.4.1-conf.patch | 25 +++++++++++ app-admin/sshguard/sshguard-2.4.1-r1.ebuild | 49 ++++++++++++++++++++++ 2 files changed, 74 insertions(+)
(In reply to Erik Quaeghebeur from comment #10) > Created attachment 623322 [details] > live ebuild that installs a working systemd unit I haven't tried to fix the live ebuild due to couple reasons 1) it's kind of a low commits repo (which not worth a live version) 2) patches/fixes apply to live ebuild are likely broken quite easily also I'm considering dropping the live ebuild once the new revision stabilized (have any good reason not to drop it?)
(In reply to Yixun Lan from comment #12) > > also I'm considering dropping the live ebuild once the new revision > stabilized > (have any good reason not to drop it?) No. I don't mind.