[gentoo-commits] repo/gentoo:master commit in: app-admin/sshguard/files/, app-admin/sshguard/

2021-02-13 Thread Yixun Lan
commit: e1d4d69e32832607488d8deee82b61e26f061c02
Author: Yixun Lan  gentoo  org>
AuthorDate: Sat Feb 13 15:52:47 2021 +
Commit: Yixun Lan  gentoo  org>
CommitDate: Sat Feb 13 15:56:11 2021 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e1d4d69e

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  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(+)

diff --git a/app-admin/sshguard/files/sshguard-2.4.1-conf.patch 
b/app-admin/sshguard/files/sshguard-2.4.1-conf.patch
new file mode 100644
index 000..8eb74a84db3
--- /dev/null
+++ b/app-admin/sshguard/files/sshguard-2.4.1-conf.patch
@@ -0,0 +1,25 @@
+diff --git a/examples/sshguard.conf.sample b/examples/sshguard.conf.sample
+index 556f1ec..a483b1e 100644
+--- a/examples/sshguard.conf.sample
 b/examples/sshguard.conf.sample
+@@ -6,14 +6,18 @@
+ 
+  REQUIRED CONFIGURATION 
+ # Full path to backend executable (required, no default)
+-#BACKEND="/usr/local/libexec/sshg-fw-iptables"
++# Example 1: iptables backend
++#BACKEND="/usr/libexec/sshg-fw-iptables"
++# Example 2: firewalld backend; for firewalld configuration instructions see
++# 
https://www.ctrl.blog/entry/how-to-sshguard-firewalld.html#sshguard-section-firewalld
++#BACKEND="/usr/libexec/sshg-fw-firewalld"
+ 
+ # Space-separated list of log files to monitor. (optional, no default)
+ #FILES="/var/log/auth.log /var/log/authlog /var/log/maillog"
+ 
+ # Shell command that provides logs on standard output. (optional, no default)
+ # Example 1: ssh and sendmail from systemd journal:
+-#LOGREADER="LANG=C /usr/bin/journalctl -afb -p info -n1 -t sshd -t sendmail 
-o cat"
++#LOGREADER="LANG=C /bin/journalctl -afb -p info -n1 -t sshd -t sendmail -o 
cat"
+ # Example 2: ssh from os_log (macOS 10.12+)
+ #LOGREADER="/usr/bin/log stream --style syslog --predicate '(processImagePath 
contains \"sshd\")'"
+ 

diff --git a/app-admin/sshguard/sshguard-2.4.1-r1.ebuild 
b/app-admin/sshguard/sshguard-2.4.1-r1.ebuild
new file mode 100644
index 000..7def7a05797
--- /dev/null
+++ b/app-admin/sshguard/sshguard-2.4.1-r1.ebuild
@@ -0,0 +1,49 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit systemd
+DESCRIPTION="protects hosts from brute force attacks against ssh"
+HOMEPAGE="https://www.sshguard.net/;
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~x86"
+
+DEPEND="
+   sys-devel/flex
+"
+RDEPEND="
+   virtual/logger
+"
+DOCS=(
+   CHANGELOG.rst
+   CONTRIBUTING.rst
+   README.rst
+   examples/net.sshguard.plist
+   examples/whitelistfile.example
+)
+PATCHES=(
+   "${FILESDIR}"/${PN}-2.4.1-conf.patch
+)
+
+src_prepare() {
+   default
+   sed -i -e "/ExecStartPre/s:/usr/sbin:/sbin:g" \
+   -e "/ExecStart/s:/usr/local/sbin:/usr/sbin:g" \
+   "${S}"/examples/${PN}.service || die
+}
+
+src_install() {
+   default
+
+   newinitd "${FILESDIR}"/${PN}.initd-r2 ${PN}
+   newconfd "${FILESDIR}"/${PN}.confd ${PN}
+
+   insinto /etc
+   newins examples/sshguard.conf.sample sshguard.conf
+
+   systemd_dounit "${S}"/examples/sshguard.service
+}



[gentoo-commits] repo/gentoo:master commit in: app-admin/sshguard/files/, app-admin/sshguard/

2019-08-08 Thread Jeroen Roovers
commit: 243010d354f8a4eb872f43120a0bd28c92c16ce4
Author: Jeroen Roovers  gentoo  org>
AuthorDate: Thu Aug  8 07:12:45 2019 +
Commit: Jeroen Roovers  gentoo  org>
CommitDate: Thu Aug  8 07:14:04 2019 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=243010d3

app-admin/sshguard: Old

Package-Manager: Portage-2.3.71, Repoman-2.3.17
Signed-off-by: Jeroen Roovers  gentoo.org>

 app-admin/sshguard/Manifest |  2 --
 app-admin/sshguard/files/sshguard.initd | 24 -
 app-admin/sshguard/sshguard-2.1.0-r1.ebuild | 40 -
 app-admin/sshguard/sshguard-2.3.1.ebuild| 40 -
 4 files changed, 106 deletions(-)

diff --git a/app-admin/sshguard/Manifest b/app-admin/sshguard/Manifest
index 799fe68405e..4ef05135180 100644
--- a/app-admin/sshguard/Manifest
+++ b/app-admin/sshguard/Manifest
@@ -1,3 +1 @@
-DIST sshguard-2.1.0.tar.gz 1117466 BLAKE2B 
1a105f346aa9b774fb0314161d779eadaab299d3b74181a449ab86534e11375e4c017c142bc621733593369bcebada9511dd40c64cb4a49cd124eb7537ae0717
 SHA512 
0a75e9d1a8c9c010c767a49e96e88db4a92aae8d428deebcff1ce8befa36b77cb1937f2fcb2a4e2a3e86d47896a8405265eb30ee7a603fc18a3ee117d646b119
-DIST sshguard-2.3.1.tar.gz 765330 BLAKE2B 
d86fe596c788209cb35c699601ccb698365e0c6b497ef8184c64d879ebb821a57e5f366c3b518e6f0c6bf65952b2c675f87f029b7b8184466c7f90d6dfebaca3
 SHA512 
b24f5dba34bed9246665c432b379afa4f1edacb56fd41e0b254a698ded1280c33fd51fb36466ae70d44ef4a31a0a75b59fa4df97d0e8ed8d194bf8046a3ac84d
 DIST sshguard-2.4.0.tar.gz 771506 BLAKE2B 
82e9caf70dc9a1ba9ef6ba1c0916424a74891c84069a4a879c9057f3baea32af68f35d8b31cacdd60d323f5ec7b02a6e12aff1ec72fc0291b74c4882cd441d93
 SHA512 
64293700ef85f0843c333c3a27b04c5b2f69bf8dddf46353a371d4178915deb931362b3641ded0eeb5365f30cb63ce6ce17256d8d094383d1cfe661065b9c1c6

diff --git a/app-admin/sshguard/files/sshguard.initd 
b/app-admin/sshguard/files/sshguard.initd
deleted file mode 100644
index f1360ce8610..000
--- a/app-admin/sshguard/files/sshguard.initd
+++ /dev/null
@@ -1,24 +0,0 @@
-#!/sbin/openrc-run
-# Copyright 1999-2011 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-depend() {
-   after iptables
-   use logger
-}
-
-SSHGUARD_PIDFILE=${SSHGUARD_PIDFILE:-/var/run/${SVCNAME}.pid}
-
-start() {
-   ebegin "Starting sshguard"
-   [ -z "${SSHGUARD_WAIT}" ] && SSHGUARD_WAIT=999
-   start-stop-daemon --start --wait ${SSHGUARD_WAIT} --background --quiet 
--exec \
-   /usr/sbin/sshguard -- -i ${SSHGUARD_PIDFILE} ${SSHGUARD_OPTS}
-   eend $?
-}
-
-stop() {
-   ebegin "Stopping sshguard"
-   start-stop-daemon --stop -p ${SSHGUARD_PIDFILE}
-   eend $?
-}

diff --git a/app-admin/sshguard/sshguard-2.1.0-r1.ebuild 
b/app-admin/sshguard/sshguard-2.1.0-r1.ebuild
deleted file mode 100644
index 5fc804a5f54..000
--- a/app-admin/sshguard/sshguard-2.1.0-r1.ebuild
+++ /dev/null
@@ -1,40 +0,0 @@
-# Copyright 1999-2018 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-DESCRIPTION="protects hosts from brute force attacks against ssh"
-HOMEPAGE="http://sshguard.sourceforge.net/;
-SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
-
-LICENSE="BSD"
-SLOT="0"
-KEYWORDS="amd64 ~arm x86 ~x86-fbsd"
-
-DEPEND="
-   sys-devel/flex
-"
-RDEPEND="
-   virtual/logger
-"
-DOCS=(
-   CHANGELOG.rst
-   CONTRIBUTING.rst
-   README.rst
-   examples/net.sshguard.plist
-   examples/sshguard.service
-   examples/whitelistfile.example
-)
-PATCHES=(
-   "${FILESDIR}"/${PN}-2.1.0-conf.patch
-)
-
-src_install() {
-   default
-
-   newinitd "${FILESDIR}"/${PN}.initd ${PN}
-   newconfd "${FILESDIR}"/${PN}.confd ${PN}
-
-   insinto /etc
-   newins examples/sshguard.conf.sample sshguard.conf
-}

diff --git a/app-admin/sshguard/sshguard-2.3.1.ebuild 
b/app-admin/sshguard/sshguard-2.3.1.ebuild
deleted file mode 100644
index 3fac136a82f..000
--- a/app-admin/sshguard/sshguard-2.3.1.ebuild
+++ /dev/null
@@ -1,40 +0,0 @@
-# Copyright 1999-2019 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-DESCRIPTION="protects hosts from brute force attacks against ssh"
-HOMEPAGE="https://www.sshguard.net/;
-SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
-
-LICENSE="BSD"
-SLOT="0"
-KEYWORDS="~amd64 ~arm ~x86 ~x86-fbsd"
-
-DEPEND="
-   sys-devel/flex
-"
-RDEPEND="
-   virtual/logger
-"
-DOCS=(
-   CHANGELOG.rst
-   CONTRIBUTING.rst
-   README.rst
-   examples/net.sshguard.plist
-   examples/sshguard.service
-   examples/whitelistfile.example
-)
-PATCHES=(
-   "${FILESDIR}"/${PN}-2.1.0-conf.patch
-)
-
-src_install() {
-   default
-
-   newinitd "${FILESDIR}"/${PN}.initd-r1 ${PN}
-   newconfd "${FILESDIR}"/${PN}.confd ${PN}
-
-   insinto /etc
-   newins examples/sshguard.conf.sample sshguard.conf
-}



[gentoo-commits] repo/gentoo:master commit in: app-admin/sshguard/files/

2016-07-01 Thread Patrice Clement
commit: 3871e9e589a8188cb81dd282fd52c935b0ecc447
Author: Michael Mair-Keimberger (asterix)  gmail 
 com>
AuthorDate: Thu Jun 30 17:53:29 2016 +
Commit: Patrice Clement  gentoo  org>
CommitDate: Fri Jul  1 07:34:34 2016 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3871e9e5

app-admin/sshguard: remove unused patch

Closes: https://github.com/gentoo/gentoo/pull/1804

Signed-off-by: Patrice Clement  gentoo.org>

 app-admin/sshguard/files/sshguard-1.5-day-starts-with-0.patch | 11 ---
 1 file changed, 11 deletions(-)

diff --git a/app-admin/sshguard/files/sshguard-1.5-day-starts-with-0.patch 
b/app-admin/sshguard/files/sshguard-1.5-day-starts-with-0.patch
deleted file mode 100644
index a8f9ad0..000
--- a/app-admin/sshguard/files/sshguard-1.5-day-starts-with-0.patch
+++ /dev/null
@@ -1,11 +0,0 @@
 a/src/parser/attack_scanner.l
-+++ b/src/parser/attack_scanner.l
-@@ -72,7 +72,7 @@
- 
- 
- MONTH   (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)
--DAYNO   [1-9][0-9]?
-+DAYNO   [0-9][0-9]?
- HOUR(0|1)[0-9]|2[0-4]
- MINPS   [0-5][0-9]
- WORD[a-zA-Z0-9][-_a-zA-Z0-9]+