Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 588726 - app-admin/sshguard should install systemd units
Summary: app-admin/sshguard should install systemd units
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Netmon project
URL:
Whiteboard:
Keywords: PullRequest
Depends on:
Blocks: install-systemd-unit
  Show dependency tree
 
Reported: 2016-07-13 00:08 UTC by Sebastian Pucilowski
Modified: 2021-02-13 21:30 UTC (History)
4 users (show)

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


Attachments
ebuild that installs a working systemd unit (sshguard-2.4.0-r1.ebuild,757 bytes, text/plain)
2020-03-20 15:46 UTC, Erik Quaeghebeur
Details
systemd service file for sshguard (sshguard.service,310 bytes, text/x-dbus-service)
2020-03-20 15:50 UTC, Erik Quaeghebeur
Details
updated sshguard configuration file patch ( sshguard-2.4.0-conf.patch,1.16 KB, patch)
2020-03-20 15:50 UTC, Erik Quaeghebeur
Details | Diff
live ebuild that installs a working systemd unit (sshguard-99999.ebuild,800 bytes, text/plain)
2020-03-20 15:51 UTC, Erik Quaeghebeur
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Sebastian Pucilowski 2016-07-13 00:08:11 UTC
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
Comment 1 Alexander Tsoy 2016-07-13 18:12:39 UTC
(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
Comment 2 Jeroen Roovers (RETIRED) gentoo-dev 2016-12-28 14:22:56 UTC
See examples/sshguard.service
Comment 3 David Heidelberg (okias) 2017-01-29 14:17:57 UTC
Also sshguard depends on openrc, not sure if this is required on systemd system.
Comment 4 Jeroen Roovers (RETIRED) gentoo-dev 2017-01-29 20:39:13 UTC
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).
Comment 5 mark lybarger 2018-04-01 07:06:23 UTC
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.
Comment 6 Sebastian Pucilowski 2019-04-06 08:50:07 UTC
May someone please review my pull request.
Comment 7 Erik Quaeghebeur 2020-03-20 15:46:55 UTC
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.
Comment 8 Erik Quaeghebeur 2020-03-20 15:50:01 UTC
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.
Comment 9 Erik Quaeghebeur 2020-03-20 15:50:41 UTC
Created attachment 623320 [details, diff]
updated sshguard configuration file patch
Comment 10 Erik Quaeghebeur 2020-03-20 15:51:22 UTC
Created attachment 623322 [details]
live ebuild that installs a working systemd unit
Comment 11 Larry the Git Cow gentoo-dev 2021-02-13 16:15:15 UTC
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(+)
Comment 12 Yixun Lan archtester gentoo-dev 2021-02-13 16:21:11 UTC
(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?)
Comment 13 Erik Quaeghebeur 2021-02-13 21:30:45 UTC
(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.