diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
commit | 4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch) | |
tree | ba5f07bf3f9d22d82e54a462313f5d244036c768 /app-admin/denyhosts |
reinit the tree, so we can have metadata
Diffstat (limited to 'app-admin/denyhosts')
-rw-r--r-- | app-admin/denyhosts/Manifest | 13 | ||||
-rw-r--r-- | app-admin/denyhosts/denyhosts-2.9.ebuild | 72 | ||||
-rw-r--r-- | app-admin/denyhosts/denyhosts-3.0-r1.ebuild | 66 | ||||
-rw-r--r-- | app-admin/denyhosts/denyhosts-3.0.ebuild | 63 | ||||
-rw-r--r-- | app-admin/denyhosts/files/denyhosts-2.6-hostname.patch | 21 | ||||
-rw-r--r-- | app-admin/denyhosts/files/denyhosts-3.0-python2.7.patch | 51 | ||||
-rw-r--r-- | app-admin/denyhosts/files/denyhosts.init-r2 | 27 | ||||
-rw-r--r-- | app-admin/denyhosts/files/denyhosts.logrotate-r2 | 10 | ||||
-rw-r--r-- | app-admin/denyhosts/files/denyhosts.service | 12 | ||||
-rw-r--r-- | app-admin/denyhosts/metadata.xml | 12 |
10 files changed, 347 insertions, 0 deletions
diff --git a/app-admin/denyhosts/Manifest b/app-admin/denyhosts/Manifest new file mode 100644 index 000000000000..571b347b31f5 --- /dev/null +++ b/app-admin/denyhosts/Manifest @@ -0,0 +1,13 @@ +AUX denyhosts-2.6-hostname.patch 664 SHA256 6c7c4567dbfc1c04e76f458ad3fe0247a058a917e4f5808477bf0de306917330 SHA512 0fc512f4a1691a90aba7d95b4757a363f3ff6bb893fdc719277c5dbec1904828be923f5ab21c5ba20e03a5e6bf61a5f7d35c6675b9ccfafd32dbd9e108dd5095 WHIRLPOOL 85d8d3fb33fe629c3c8660f1ef0227b07847cad3c2769484547671108d23acbb2f879dae456f8bdbeb47ce810b0436a98e9ee578dfea90fd546a04cd4b02eb39 +AUX denyhosts-3.0-python2.7.patch 1502 SHA256 8abf4100efc9500ad1ba22a0a342dd183391fa09c159a483cdb36a115c686d5c SHA512 ee3c4f7f6a8126e4a9c30531cce2673f8c0eb4c4d2a011aa22a3aa4f0b9ee58f8278334cf9253619d999b8dadf4370d6c02f2535a0b6d794243e3050f3927e8f WHIRLPOOL 681ecb3559d7f83659b6b498b5ea1eeaf791c4945598d1af5582f2238199b79ac7fe31426e49a60570586ca0542fb861fc4e5e60304b450b1fe2384ab034028a +AUX denyhosts.init-r2 646 SHA256 b08fd688b3e7cd1ca9f6a0b59e74eef535881cacf010a81c81d93411af8cedf1 SHA512 ea20958c74ec34d4f8e2f165cda9d0c3e27d94fe7eef374548d74275d35dc7fc7c89395e36b0a00dfc7d2a83b198f179fd44e16f7dc51419f9af1e907616382c WHIRLPOOL 75295855ad1ef9b85c2e046c5c1a9ca0697efc3d7a7b898c1645ab25d83ee1d2497e91b1eca93f27a38eddfcc407aaec0a2a4af6cdb75aa269997cf5fac81c2a +AUX denyhosts.logrotate-r2 272 SHA256 b2d048354fb00d317e554a93a370ec7e3f276061a350a452b8a3f8c903973772 SHA512 43d379b5909937913ca78a11581f577a5d9fe52bb16627441311cdac7281f59a1f05fdb308f722f9c376d2e446111021d225b2033c5fe5f3399ab88771be2569 WHIRLPOOL 041811f4bc12dabeae155d0330a0b02df12887d3fcd98b744c42afb7f8ac274715a68472348d2166eb454fbf9787fb271759430a970b1ce82a3ca42a0500cf43 +AUX denyhosts.service 265 SHA256 706911153d24785d577d376c772a3c4b7682dfd968d2fdc737872c27e5e574f8 SHA512 601b10e999dd2e16cec57035d025a883df77df272c6a72b4d39f2c118d983f308984aa9edd296f334e0e5062e8ca5ea21ba25ef58b606c9c7e4c09ed7b3ad4be WHIRLPOOL cb62ab529918d801567e5f3b7f6eb3d52709d54bd89747d0b1739bc01a87cbbdd066aa56ff8db3ca7e857d217f2672cc2a267d6ee78e314d821287fea3633806 +DIST denyhosts-2.9.tar.gz 49472 SHA256 751ce6f11c91d1f29c2e726e829c8fe5ddc417bfbb2f229829f5ec820c236716 SHA512 f41e2985e84f0eeaa493def6b8609de934889d02b124962b0bfd02ebe5e41d0670822124eb50ed84eb1c3b8a2a96775fbe09386cef48a3c3e04949fd6b1452c1 WHIRLPOOL 6930899d84a50200c869298cf1061d51a0cebab27edea58252a66c97c81792b13898a726a6bbcba35510cc6041b66d175557d2ddfb5c21c2ae5b62bd4e43fe5d +DIST denyhosts-3.0.tar.gz 56283 SHA256 581cd3b782d7b702f41873ae52d39472d27c90ebd1b2178802cdd623e8e94240 SHA512 8a1c796c259049ffab2c88cef780b175ec75c94216841421f831dfbf45f4ba0cdbcfbb0e3dab7200aa79eeb2416db5234ad5016d5770d8ab2f28ef4c9754e70d WHIRLPOOL 6b8db8e88a5f1693d4a72ea54009b5d185b035040c9407585f829b0f8f918bcbfa38623b0ecb08157256da045427b8b5111f7dc8f520505c56aefdaf1a02a154 +EBUILD denyhosts-2.9.ebuild 1860 SHA256 555a8c778cdd31823dd1eaa7a85d89b4584dc76b9443d90277609b38508f782d SHA512 170d31711fc00f51e6b177cfebcdbeff660a9d2b6cc3eb953d4082e7d3d265cf371da59890ee92b29fea8a2aa740cb25373c0ad6585e9e31db515fd87f512ff4 WHIRLPOOL db72c9797a895b2af227eb48ad0199b07b38fe46280274b8b514c058ab33360d71cb0b2bb128886b20dd89cd0584173c238e9413ccc9adffe49817a6593b81cb +EBUILD denyhosts-3.0-r1.ebuild 1784 SHA256 e0755eebde90c4959d50658eb1abadb6b23bbdb9d2e3e0c366b7102993d0cafa SHA512 cbc35021efb6cd6c4e67ca62cf66576246c2ee2c68114874dd08bcdfed9c4d0ccdc81f343633cee68064b1a575e0bb2fedd3a966e59bad17e8d9a49e331518af WHIRLPOOL feb9ffdb0fec75c28d83f299898a0d274133f527341261e255d11430fd91e32ab70bf0229be05b4ac4ad9e96b606b981bf3745b34cba8c907b73f246f2e8727d +EBUILD denyhosts-3.0.ebuild 1672 SHA256 dd38eb557a2f15b216dfe6d95bb686cf310d23660a813c5bf8a1ddc7f1ad543e SHA512 660bca4d0ca9fd4eea074cdfde7629d06cb4c6c48f3b0cf9674d6ad62ac931cf51624b67e52862b6b284157643f634495bbce7c6b927bc1b80274ed497a9aad0 WHIRLPOOL 75edeac928fd0d62f1944daeca25137c269e31189d0c1c906d141bca61607655ecad6b50a8fcce25a91a664c8916bc257fb22ec20fa7cd5f68aa88435561a8d1 +MISC ChangeLog 6266 SHA256 bf248a0c66cbeae0908285f4a6199ca58d99961d46dd395d33d54c79779d3132 SHA512 720287e9d86cf5dfc8e1df582fadbc055e6824a0f12ba607b687bbe038ea77a2c9ce85c7868e4aa6011816900621c462268a291ba98c03752cb4d5c3cb6d1730 WHIRLPOOL 86d6af76360996b3948c07923f86406d18df19fcfc0e19ff473665433f7209975e8e883affd33749c36e5f985c75a00d0defa84ed2a957814ff19896b0b35f7d +MISC ChangeLog-2015 13169 SHA256 c9990d712a316b57562e93cabf22701a037bb398583f9b3f6ae36a75d283482f SHA512 bfdf25113583ddd664c00709cb44fb97b6c93785f42159c5d68c7f03c7047ef56cd1a3b4e11f826a9f149371a17d24953e0a45f6fb7a06a66742e8424cfed727 WHIRLPOOL 03daaee6b287aed72e633476223827fc5d699e6a610f97114fc18a29686af1ffb1a5a3c4906951d5801d3096529c1ea1500648c039bed829902e5f0ba0adacf2 +MISC metadata.xml 402 SHA256 1ec6ce139f385327b0e664b043441c0bf2a46cb699d75d4aae7daf89ca61b61e SHA512 0a232a4ee999ce021244cc19ad62e68c962fcfb1cbfda1aef306e6b3376e3944f233cff133c746aedc3f68c60a61511b0a749b434515b705f63d68a034951ed7 WHIRLPOOL 9be58b7660475eceb2e07bdcc23ceefbd5b407eebc9efef6bb51339b774670c5ab68ce8d5776eec9301068de1fcce064f4184fce812a3c6ff1b7fd16d8b48d27 diff --git a/app-admin/denyhosts/denyhosts-2.9.ebuild b/app-admin/denyhosts/denyhosts-2.9.ebuild new file mode 100644 index 000000000000..f9a579759fe2 --- /dev/null +++ b/app-admin/denyhosts/denyhosts-2.9.ebuild @@ -0,0 +1,72 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 +PYTHON_COMPAT=( python2_7 ) + +inherit distutils-r1 eutils readme.gentoo systemd + +DESCRIPTION="DenyHosts is a utility to help sys admins thwart ssh hackers" +HOMEPAGE="http://denyhost.sourceforge.net/" +SRC_URI="https://github.com/${PN}/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="alpha amd64 arm hppa ppc sparc x86" +IUSE="" + +DEPEND="" +RDEPEND="" + +DISABLE_AUTOFORMATTING="yes" +DOC_CONTENTS=" +>=net-misc/openssh-6.7p1 dropped support for sys-apps/tcp-wrappers +(see bug#531156) that means you either have patch openssh or use +denyhosts' iptables feature to get any protection. + +You can configure DenyHosts to run as a daemon by running: +# rc-update add denyhosts default +or: +# systemctl enable denyhosts.service +(if you use systemd) + +To run DenyHosts as a cronjob instead of a daemon add the following +to /etc/crontab +# run DenyHosts every 10 minutes +*/10 * * * * root /usr/bin/denyhosts.py -c /etc/denyhosts.conf + +More information can be found at ${HOMEPAGE}faq.html" + +src_prepare() { + #systemd needs HOSTNAME + epatch "${FILESDIR}"/${PN}-2.6-hostname.patch + + sed -e '/^DENY_THRESHOLD_VALID =/s/=.*/= 5/' \ + -e '/^SECURE_LOG/s/^/#/' \ + -e '\@#SECURE_LOG.*/var/log/messages@s/^#//' \ + -i denyhosts.conf || die "sed failed" + + distutils-r1_src_prepare +} + +src_install() { + readme.gentoo_create_doc + + dodoc CHANGELOG.txt README.txt PKG-INFO + distutils-r1_src_install + + dodir /etc/logrotate.d + insinto /etc/logrotate.d + newins "${FILESDIR}"/${PN}.logrotate-r2 ${PN} + + newinitd "${FILESDIR}"/denyhosts.init-r2 denyhosts + systemd_dounit "${FILESDIR}"/${PN}.service + + keepdir /var/lib/denyhosts +} + +pkg_postinst() { + [[ -f "${EROOT}etc/hosts.deny" ]] || touch "${EROOT}etc/hosts.deny" + + readme.gentoo_print_elog +} diff --git a/app-admin/denyhosts/denyhosts-3.0-r1.ebuild b/app-admin/denyhosts/denyhosts-3.0-r1.ebuild new file mode 100644 index 000000000000..09d0b4642714 --- /dev/null +++ b/app-admin/denyhosts/denyhosts-3.0-r1.ebuild @@ -0,0 +1,66 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 +PYTHON_COMPAT=( python2_7 python3_4 python3_5 ) + +inherit distutils-r1 eutils readme.gentoo-r1 systemd + +DESCRIPTION="DenyHosts is a utility to help sys admins thwart ssh hackers" +HOMEPAGE="https://github.com/denyhosts/denyhosts" +SRC_URI="https://github.com/${PN}/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="alpha amd64 arm hppa ppc sparc x86" +IUSE="" + +DEPEND="" +RDEPEND="" + +DISABLE_AUTOFORMATTING="yes" +DOC_CONTENTS=" +>=net-misc/openssh-6.7p1 dropped support for sys-apps/tcp-wrappers +(see bug#531156) that means you either have patch openssh or use +denyhosts' iptables feature to get any protection. + +You can configure DenyHosts to run as a daemon by running: +# rc-update add denyhosts default +or: +# systemctl enable denyhosts.service +(if you use systemd) + +To run DenyHosts as a cronjob instead of a daemon add the following +to /etc/crontab +# run DenyHosts every 10 minutes +*/10 * * * * root /usr/bin/denyhosts.py -c /etc/denyhosts.conf + +More information can be found at ${HOMEPAGE}faq.html" + +#bring back python-2.7 support bug #577502 +PATCHES=( "${FILESDIR}"/"${P}"-python2.7.patch ) + +src_prepare() { + sed -e '/^DENY_THRESHOLD_VALID =/s/=.*/= 5/' \ + -e '/^SECURE_LOG/s/^/#/' \ + -e '\@#SECURE_LOG.*/var/log/messages@s/^#//' \ + -i denyhosts.conf || die "sed failed" + + distutils-r1_src_prepare +} + +src_install() { + readme.gentoo_create_doc + + dodoc CHANGELOG.txt README.md + distutils-r1_src_install + + dodir /etc/logrotate.d + insinto /etc/logrotate.d + newins "${FILESDIR}"/${PN}.logrotate-r2 ${PN} + + newinitd "${FILESDIR}"/denyhosts.init-r2 denyhosts + systemd_dounit "${FILESDIR}"/${PN}.service + + keepdir /var/lib/denyhosts +} diff --git a/app-admin/denyhosts/denyhosts-3.0.ebuild b/app-admin/denyhosts/denyhosts-3.0.ebuild new file mode 100644 index 000000000000..cd2c9fdeea38 --- /dev/null +++ b/app-admin/denyhosts/denyhosts-3.0.ebuild @@ -0,0 +1,63 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 +PYTHON_COMPAT=( python2_7 ) + +inherit distutils-r1 eutils readme.gentoo systemd + +DESCRIPTION="DenyHosts is a utility to help sys admins thwart ssh hackers" +HOMEPAGE="https://github.com/denyhosts/denyhosts" +SRC_URI="https://github.com/${PN}/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha amd64 ~arm ~hppa ~ppc ~sparc x86" +IUSE="" + +DEPEND="" +RDEPEND="" + +DISABLE_AUTOFORMATTING="yes" +DOC_CONTENTS=" +>=net-misc/openssh-6.7p1 dropped support for sys-apps/tcp-wrappers +(see bug#531156) that means you either have patch openssh or use +denyhosts' iptables feature to get any protection. + +You can configure DenyHosts to run as a daemon by running: +# rc-update add denyhosts default +or: +# systemctl enable denyhosts.service +(if you use systemd) + +To run DenyHosts as a cronjob instead of a daemon add the following +to /etc/crontab +# run DenyHosts every 10 minutes +*/10 * * * * root /usr/bin/denyhosts.py -c /etc/denyhosts.conf + +More information can be found at ${HOMEPAGE}faq.html" + +src_prepare() { + sed -e '/^DENY_THRESHOLD_VALID =/s/=.*/= 5/' \ + -e '/^SECURE_LOG/s/^/#/' \ + -e '\@#SECURE_LOG.*/var/log/messages@s/^#//' \ + -i denyhosts.conf || die "sed failed" + + distutils-r1_src_prepare +} + +src_install() { + readme.gentoo_create_doc + + dodoc CHANGELOG.txt README.md + distutils-r1_src_install + + dodir /etc/logrotate.d + insinto /etc/logrotate.d + newins "${FILESDIR}"/${PN}.logrotate-r2 ${PN} + + newinitd "${FILESDIR}"/denyhosts.init-r2 denyhosts + systemd_dounit "${FILESDIR}"/${PN}.service + + keepdir /var/lib/denyhosts +} diff --git a/app-admin/denyhosts/files/denyhosts-2.6-hostname.patch b/app-admin/denyhosts/files/denyhosts-2.6-hostname.patch new file mode 100644 index 000000000000..56d881319c5f --- /dev/null +++ b/app-admin/denyhosts/files/denyhosts-2.6-hostname.patch @@ -0,0 +1,21 @@ +diff -up ./denyhosts.py.orig ./denyhosts.py +--- ./denyhosts.py.orig 2012-01-30 13:14:41.146715839 -0600 ++++ ./denyhosts.py 2012-01-30 14:45:14.372539341 -0600 +@@ -1,5 +1,6 @@ + #!/usr/bin/env python + import os ++import platform + import sys + + import DenyHosts.python_version +@@ -107,6 +108,10 @@ if __name__ == '__main__': + print "DenyHosts version:", VERSION + sys.exit(0) + ++ # This is generally expected to be in the environment, but there's no ++ # non-hackish way to get systemd to set it, so just hack it in here. ++ os.environ['HOSTNAME'] = platform.node() ++ + prefs = Prefs(config_file) + + first_time = 0 diff --git a/app-admin/denyhosts/files/denyhosts-3.0-python2.7.patch b/app-admin/denyhosts/files/denyhosts-3.0-python2.7.patch new file mode 100644 index 000000000000..4b727c7067d9 --- /dev/null +++ b/app-admin/denyhosts/files/denyhosts-3.0-python2.7.patch @@ -0,0 +1,51 @@ +From b5611dfa0510ec8fbaa2db4b6834d0bd7ecf0909 Mon Sep 17 00:00:00 2001 +From: Jesse <jessefrgsmith@yahoo.ca> +Date: Sat, 27 Jun 2015 20:24:44 -0300 +Subject: [PATCH] Fixed a type check which was causing syntax/undefined errors + in DenyHosts/report.py when switching between Python2 and Python3. + +--- + CHANGELOG.txt | 8 ++++++++ + DenyHosts/report.py | 4 +++- + 2 files changed, 11 insertions(+), 1 deletion(-) + +diff --git a/CHANGELOG.txt b/CHANGELOG.txt +index ca173cb..b585332 100644 +--- a/CHANGELOG.txt ++++ b/CHANGELOG.txt +@@ -1,5 +1,13 @@ + DENYHOSTS CHANGELOG + ++3.1 ++====================== ++ ++Fixed a type check in DenyHosts/report.py which was causing ++problems when moving between Python2 and Python3. ++ ++ ++ + 3.0 + ====================== + +diff --git a/DenyHosts/report.py b/DenyHosts/report.py +index 05f3e3d..9560eab 100644 +--- a/DenyHosts/report.py ++++ b/DenyHosts/report.py +@@ -3,6 +3,7 @@ + import socket + # Removing this as it causes runtime errors on Python3.4 + # from types import ListType, TupleType ++import types + from .util import is_true + try: + import syslog +@@ -38,7 +39,8 @@ def get_report(self): + def add_section(self, message, iterable): + self.report += "%s:\n\n" % message + for i in iterable: +- if type(i) in (TupleType, ListType): ++ # if type(i) in (TupleType, ListType): ++ if (type(i) is types.ListType) or (type(i) is types.TupleType): + extra = ": %d\n" % i[1] + i = i[0] + else: diff --git a/app-admin/denyhosts/files/denyhosts.init-r2 b/app-admin/denyhosts/files/denyhosts.init-r2 new file mode 100644 index 000000000000..9b2f24cbf21e --- /dev/null +++ b/app-admin/denyhosts/files/denyhosts.init-r2 @@ -0,0 +1,27 @@ +#!/sbin/openrc-run +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +extra_stopped_commands="purge" + +purge() { + ebegin "Purging hosts.deny" + start-stop-daemon --start --exec /usr/bin/denyhosts.py --pidfile /var/run/denyhosts.pid -- --purge + eend $? +} + +depend() { + use logger sshd +} + +start() { + ebegin "Starting DenyHosts daemon" + start-stop-daemon --start --exec /usr/bin/denyhosts.py --pidfile /var/run/denyhosts.pid -- --daemon -c /etc/denyhosts.conf + eend $? +} + +stop() { + ebegin "Stopping DenyHosts daemon" + start-stop-daemon --quiet --stop --pidfile /var/run/denyhosts.pid + eend $? +} diff --git a/app-admin/denyhosts/files/denyhosts.logrotate-r2 b/app-admin/denyhosts/files/denyhosts.logrotate-r2 new file mode 100644 index 000000000000..582e72f7a365 --- /dev/null +++ b/app-admin/denyhosts/files/denyhosts.logrotate-r2 @@ -0,0 +1,10 @@ +/var/log/denyhosts { + missingok + notifempty + create 0640 root root + sharedscripts + postrotate + test -e /run/openrc/softlevel && /etc/init.d/denyhosts restart 1>/dev/null || true + test -e /run/systemd/system && systemctl restart denyhosts >/dev/null || true + endscript +} diff --git a/app-admin/denyhosts/files/denyhosts.service b/app-admin/denyhosts/files/denyhosts.service new file mode 100644 index 000000000000..05a59dd27bfc --- /dev/null +++ b/app-admin/denyhosts/files/denyhosts.service @@ -0,0 +1,12 @@ +[Unit] +Description=SSH log watcher +Before=sshd.service + +[Service] +Type=forking +ExecStartPre=/bin/rm -f /var/run/denyhosts.pid +ExecStart=/usr/bin/denyhosts.py --daemon --config=/etc/denyhosts.conf +PIDFile=/var/run/denyhosts.pid + +[Install] +WantedBy=multi-user.target diff --git a/app-admin/denyhosts/metadata.xml b/app-admin/denyhosts/metadata.xml new file mode 100644 index 000000000000..c193ef3b8e0a --- /dev/null +++ b/app-admin/denyhosts/metadata.xml @@ -0,0 +1,12 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>junghans@gentoo.org</email> + <name>Christoph Junghans</name> + </maintainer> + <upstream> + <remote-id type="github">denyhosts/denyhosts</remote-id> + <remote-id type="sourceforge">denyhost</remote-id> + </upstream> +</pkgmetadata> |