summaryrefslogtreecommitdiffstats
path: root/dynamic-layers/meta-python
diff options
context:
space:
mode:
Diffstat (limited to 'dynamic-layers/meta-python')
-rw-r--r--dynamic-layers/meta-python/recipes-security/fail2ban/files/0001-To-fix-build-error-of-xrang.patch28
-rw-r--r--dynamic-layers/meta-python/recipes-security/fail2ban/files/initd98
-rw-r--r--dynamic-layers/meta-python/recipes-security/fail2ban/files/run-ptest3
-rw-r--r--dynamic-layers/meta-python/recipes-security/fail2ban/python3-fail2ban_0.11.2.bb60
-rw-r--r--dynamic-layers/meta-python/recipes-security/mfa/python3-privacyidea_3.6.2.bb38
-rw-r--r--dynamic-layers/meta-python/recipes-security/python/python3-oauth2client_4.1.3.bb11
6 files changed, 238 insertions, 0 deletions
diff --git a/dynamic-layers/meta-python/recipes-security/fail2ban/files/0001-To-fix-build-error-of-xrang.patch b/dynamic-layers/meta-python/recipes-security/fail2ban/files/0001-To-fix-build-error-of-xrang.patch
new file mode 100644
index 0000000..7f0812c
--- /dev/null
+++ b/dynamic-layers/meta-python/recipes-security/fail2ban/files/0001-To-fix-build-error-of-xrang.patch
@@ -0,0 +1,28 @@
1From fe3436d65518099d35c643848cba50253abc249c Mon Sep 17 00:00:00 2001
2From: Lei Maohui <leimaohui@cn.fujitsu.com>
3Date: Thu, 9 May 2019 14:44:51 +0900
4Subject: [PATCH] To fix build error of xrange.
5
6NameError: name 'xrange' is not defined
7
8Signed-off-by: Lei Maohui <leimaohui@cn.fujitsu.com>
9---
10 fail2ban/__init__.py | 2 +-
11 1 file changed, 1 insertion(+), 1 deletion(-)
12
13diff --git a/fail2ban/__init__.py b/fail2ban/__init__.py
14index fa6dcf7..61789a4 100644
15--- a/fail2ban/__init__.py
16+++ b/fail2ban/__init__.py
17@@ -82,7 +82,7 @@ strptime("2012", "%Y")
18
19 # short names for pure numeric log-level ("Level 25" could be truncated by short formats):
20 def _init():
21- for i in xrange(50):
22+ for i in range(50):
23 if logging.getLevelName(i).startswith('Level'):
24 logging.addLevelName(i, '#%02d-Lev.' % i)
25 _init()
26--
272.7.4
28
diff --git a/dynamic-layers/meta-python/recipes-security/fail2ban/files/initd b/dynamic-layers/meta-python/recipes-security/fail2ban/files/initd
new file mode 100644
index 0000000..586b3da
--- /dev/null
+++ b/dynamic-layers/meta-python/recipes-security/fail2ban/files/initd
@@ -0,0 +1,98 @@
1#!/bin/sh
2### BEGIN INIT INFO
3# Provides: fail2ban
4# Required-Start: $local_fs $remote_fs
5# Required-Stop: $local_fs $remote_fs
6# Should-Start: $time $network $syslog iptables firehol shorewall ferm
7# Should-Stop: $network $syslog iptables firehol shorewall ferm
8# Default-Start: 2 3 4 5
9# Default-Stop: 0 1 6
10# Short-Description: Start/Stop fail2ban
11# Description: Start/Stop fail2ban, a daemon to ban hosts that cause multiple authentication errors
12### END INIT INFO
13
14# Source function library.
15. /etc/init.d/functions
16
17# Check that the config file exists
18[ -f /etc/fail2ban/fail2ban.conf ] || exit 0
19
20check_privsep_dir() {
21 # Create the PrivSep empty dir if necessary
22 if [ ! -d /var/run/fail2ban ]; then
23 mkdir /var/run/fail2ban
24 chmod 0755 /var/run/fail2ban
25 fi
26}
27
28FAIL2BAN="/usr/bin/fail2ban-client"
29prog=fail2ban-server
30lockfile=${LOCKFILE-/var/lock/subsys/fail2ban}
31socket=${SOCKET-/var/run/fail2ban/fail2ban.sock}
32pidfile=${PIDFILE-/var/run/fail2ban/fail2ban.pid}
33RETVAL=0
34
35start() {
36 echo -n $"Starting fail2ban: "
37 check_privsep_dir
38 ${FAIL2BAN} -x start > /dev/null
39 RETVAL=$?
40 if [ $RETVAL = 0 ]; then
41 touch ${lockfile}
42 success
43 else
44 failure
45 fi
46 echo
47 return $RETVAL
48}
49
50stop() {
51 echo -n $"Stopping fail2ban: "
52 ${FAIL2BAN} stop > /dev/null
53 RETVAL=$?
54 if [ $RETVAL = 0 ]; then
55 rm -f ${lockfile} ${pidfile}
56 success
57 else
58 failure
59 fi
60 echo
61 return $RETVAL
62}
63
64reload() {
65 echo "Reloading fail2ban: "
66 ${FAIL2BAN} reload
67 RETVAL=$?
68 echo
69 return $RETVAL
70}
71
72# See how we were called.
73case "$1" in
74 start)
75 status -p ${pidfile} ${prog} >/dev/null 2>&1 && exit 0
76 start
77 ;;
78 stop)
79 stop
80 ;;
81 reload)
82 reload
83 ;;
84 restart)
85 stop
86 start
87 ;;
88 status)
89 status -p ${pidfile} ${prog}
90 RETVAL=$?
91 [ $RETVAL = 0 ] && ${FAIL2BAN} status
92 ;;
93 *)
94 echo $"Usage: fail2ban {start|stop|restart|reload|status}"
95 RETVAL=2
96esac
97
98exit $RETVAL
diff --git a/dynamic-layers/meta-python/recipes-security/fail2ban/files/run-ptest b/dynamic-layers/meta-python/recipes-security/fail2ban/files/run-ptest
new file mode 100644
index 0000000..64d07d5
--- /dev/null
+++ b/dynamic-layers/meta-python/recipes-security/fail2ban/files/run-ptest
@@ -0,0 +1,3 @@
1#!/bin/sh
2
3##PYTHON## bin/fail2ban-testcases
diff --git a/dynamic-layers/meta-python/recipes-security/fail2ban/python3-fail2ban_0.11.2.bb b/dynamic-layers/meta-python/recipes-security/fail2ban/python3-fail2ban_0.11.2.bb
new file mode 100644
index 0000000..96e17b7
--- /dev/null
+++ b/dynamic-layers/meta-python/recipes-security/fail2ban/python3-fail2ban_0.11.2.bb
@@ -0,0 +1,60 @@
1SUMMARY = "Daemon to ban hosts that cause multiple authentication errors."
2DESCRIPTION = "Fail2Ban scans log files like /var/log/auth.log and bans IP addresses having too \
3many failed login attempts. It does this by updating system firewall rules to reject new \
4connections from those IP addresses, for a configurable amount of time. Fail2Ban comes \
5out-of-the-box ready to read many standard log files, such as those for sshd and Apache, \
6and is easy to configure to read any log file you choose, for any error you choose."
7HOMEPAGE = "http://www.fail2ban.org"
8
9LICENSE = "GPL-2.0-only"
10LIC_FILES_CHKSUM = "file://COPYING;md5=ecabc31e90311da843753ba772885d9f"
11
12DEPENDS = "python3-native"
13
14SRCREV ="4fe4ac8dde6ba14841da598ec37f8c6911fe0f64"
15SRC_URI = " git://github.com/fail2ban/fail2ban.git;branch=0.11;protocol=https \
16 file://initd \
17 file://run-ptest \
18"
19
20inherit update-rc.d ptest setuptools3_legacy
21
22S = "${WORKDIR}/git"
23
24do_compile () {
25 cd ${S}
26
27 #remove symlink to python3
28 # otherwise 2to3 is run against it
29 rm -f bin/fail2ban-python
30
31 ./fail2ban-2to3
32}
33
34do_install:append () {
35 rm -f ${D}/${bindir}/fail2ban-python
36 install -d ${D}/${sysconfdir}/fail2ban
37 install -d ${D}/${sysconfdir}/init.d
38 install -m 0755 ${WORKDIR}/initd ${D}${sysconfdir}/init.d/fail2ban-server
39 chown -R root:root ${D}/${bindir}
40 rm -rf ${D}/run
41}
42
43do_install_ptest:append () {
44 install -d ${D}${PTEST_PATH}
45 install -d ${D}${PTEST_PATH}/bin
46 sed -i -e 's/##PYTHON##/${PYTHON_PN}/g' ${D}${PTEST_PATH}/run-ptest
47 install -D ${S}/bin/* ${D}${PTEST_PATH}/bin
48 rm -f ${D}${PTEST_PATH}/bin/fail2ban-python
49}
50
51
52INITSCRIPT_PACKAGES = "${PN}"
53INITSCRIPT_NAME = "fail2ban-server"
54INITSCRIPT_PARAMS = "defaults 25"
55
56INSANE_SKIP:${PN}:append = "already-stripped"
57
58RDEPENDS:${PN} = "${VIRTUAL-RUNTIME_base-utils-syslog} iptables sqlite3 python3-core python3-pyinotify"
59RDEPENDS:${PN} += " python3-logging python3-fcntl python3-json"
60RDEPENDS:${PN}-ptest = "python3-core python3-io python3-modules python3-fail2ban"
diff --git a/dynamic-layers/meta-python/recipes-security/mfa/python3-privacyidea_3.6.2.bb b/dynamic-layers/meta-python/recipes-security/mfa/python3-privacyidea_3.6.2.bb
new file mode 100644
index 0000000..40f6d15
--- /dev/null
+++ b/dynamic-layers/meta-python/recipes-security/mfa/python3-privacyidea_3.6.2.bb
@@ -0,0 +1,38 @@
1SUMMARY = "identity, multifactor authentication (OTP), authorization, audit"
2DESCRIPTION = "privacyIDEA is an open solution for strong two-factor authentication like OTP tokens, SMS, smartphones or SSH keys. Using privacyIDEA you can enhance your existing applications like local login (PAM, Windows Credential Provider), VPN, remote access, SSH connections, access to web sites or web portals with a second factor during authentication. Thus boosting the security of your existing applications."
3
4HOMEPAGE = "http://www.privacyidea.org/"
5LICENSE = "AGPL-3.0-only"
6LIC_FILES_CHKSUM = "file://LICENSE;md5=c0acfa7a8a03b718abee9135bc1a1c55"
7
8PYPI_PACKAGE = "privacyIDEA"
9SRC_URI[sha256sum] = "4441282d086331dac0aee336286de8262d9ac8eb11e14b7f9aa69f865caebe17"
10
11inherit pypi setuptools3
12
13do_install:append () {
14 rm -fr ${D}${libdir}/${PYTHON_DIR}/site-packages/tests
15}
16
17USERADD_PACKAGES = "${PN}"
18GROUPADD_PARAM:${PN} = "--system privacyidea"
19USERADD_PARAM:${PN} = "--system -g privacyidea -o -r -d /opt/${BPN} \
20 --shell /bin/false privacyidea"
21
22FILES:${PN} += " ${prefix}/etc/privacyidea/* ${datadir}/lib/privacyidea/*"
23
24RDEPENDS:${PN} += " bash perl freeradius-mysql freeradius-utils"
25
26RDEPENDS:${PN} += "python3 python3-alembic python3-babel python3-bcrypt"
27RDEPENDS:${PN} += "python3-beautifulsoup4 python3-cbor2 python3-certifi python3-cffi python3-chardet"
28RDEPENDS:${PN} += "python3-click python3-configobj python3-croniter python3-cryptography python3-defusedxml"
29RDEPENDS:${PN} += "python3-ecdsa python3-flask python3-flask-babel python3-flask-migrate"
30RDEPENDS:${PN} += "python3-flask-script python3-flask-sqlalchemy python3-flask-versioned"
31RDEPENDS:${PN} += "python3-future python3-httplib2 python3-huey python3-idna python3-ipaddress"
32RDEPENDS:${PN} += "python3-itsdangerous python3-jinja2 python3-ldap python3-lxml python3-mako"
33RDEPENDS:${PN} += "python3-markupsafe python3-netaddr python3-oauth2client python3-passlib python3-pillow"
34RDEPENDS:${PN} += "python3-pyasn1 python3-pyasn1-modules python3-pycparser python3-pyjwt python3-pymysql"
35RDEPENDS:${PN} += "python3-pyopenssl python3-pyrad python3-dateutil python3-editor python3-gnupg"
36RDEPENDS:${PN} += "python3-pytz python3-pyyaml python3-qrcode python3-redis python3-requests python3-rsa"
37RDEPENDS:${PN} += "python3-six python3-smpplib python3-soupsieve python3-soupsieve "
38RDEPENDS:${PN} += "python3-sqlalchemy python3-sqlsoup python3-urllib3 python3-werkzeug"
diff --git a/dynamic-layers/meta-python/recipes-security/python/python3-oauth2client_4.1.3.bb b/dynamic-layers/meta-python/recipes-security/python/python3-oauth2client_4.1.3.bb
new file mode 100644
index 0000000..3a07461
--- /dev/null
+++ b/dynamic-layers/meta-python/recipes-security/python/python3-oauth2client_4.1.3.bb
@@ -0,0 +1,11 @@
1SUMMARY = "Add version info to file paths."
2SECTION = "devel/python"
3LICENSE = "Apache-2.0"
4LIC_FILES_CHKSUM = "file://LICENSE;md5=038e1390e94fe637991fa5569daa62bc"
5
6PYPI_PACKAGE = "oauth2client"
7SRC_URI[sha256sum] = "d486741e451287f69568a4d26d70d9acd73a2bbfa275746c535b4209891cccc6"
8
9inherit pypi setuptools3
10
11RDEPENDS:${PN} = "python3-six python3-rsa python3-httplib2 python3-pyasn1 python3-pyasn1-modules"