diff options
| author | leimaohui <leimaohui@cn.fujitsu.com> | 2019-04-19 11:58:39 +0800 |
|---|---|---|
| committer | Armin Kuster <akuster808@gmail.com> | 2019-05-21 08:18:36 -0700 |
| commit | 479d9cc23a741e89b2bd4884b62d8623b1cf2a19 (patch) | |
| tree | f19d503ff73382eeb9a5a43fc962b090132ce08c | |
| parent | 56d6256c83b47ad921a10d22b2d64453dab9821a (diff) | |
| download | meta-security-479d9cc23a741e89b2bd4884b62d8623b1cf2a19.tar.gz | |
python3-fail2ban: Fix build error of xrange.
NameError: name 'xrange' is not defined
Signed-off-by: Lei Maohui <leimaohui@cn.fujitsu.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
| -rw-r--r-- | recipes-security/fail2ban/files/0001-To-fix-build-error-of-xrang.patch | 28 | ||||
| -rw-r--r-- | recipes-security/fail2ban/python3-fail2ban_0.10.4.0.bb | 4 |
2 files changed, 32 insertions, 0 deletions
diff --git a/recipes-security/fail2ban/files/0001-To-fix-build-error-of-xrang.patch b/recipes-security/fail2ban/files/0001-To-fix-build-error-of-xrang.patch new file mode 100644 index 0000000..7f0812c --- /dev/null +++ b/recipes-security/fail2ban/files/0001-To-fix-build-error-of-xrang.patch | |||
| @@ -0,0 +1,28 @@ | |||
| 1 | From fe3436d65518099d35c643848cba50253abc249c Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Lei Maohui <leimaohui@cn.fujitsu.com> | ||
| 3 | Date: Thu, 9 May 2019 14:44:51 +0900 | ||
| 4 | Subject: [PATCH] To fix build error of xrange. | ||
| 5 | |||
| 6 | NameError: name 'xrange' is not defined | ||
| 7 | |||
| 8 | Signed-off-by: Lei Maohui <leimaohui@cn.fujitsu.com> | ||
| 9 | --- | ||
| 10 | fail2ban/__init__.py | 2 +- | ||
| 11 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
| 12 | |||
| 13 | diff --git a/fail2ban/__init__.py b/fail2ban/__init__.py | ||
| 14 | index 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 | -- | ||
| 27 | 2.7.4 | ||
| 28 | |||
diff --git a/recipes-security/fail2ban/python3-fail2ban_0.10.4.0.bb b/recipes-security/fail2ban/python3-fail2ban_0.10.4.0.bb index 5c887e8..23ef027 100644 --- a/recipes-security/fail2ban/python3-fail2ban_0.10.4.0.bb +++ b/recipes-security/fail2ban/python3-fail2ban_0.10.4.0.bb | |||
| @@ -2,3 +2,7 @@ inherit setuptools3 | |||
| 2 | require python-fail2ban.inc | 2 | require python-fail2ban.inc |
| 3 | 3 | ||
| 4 | RDEPENDS_${PN}-ptest = "python3-core python3-io python3-modules python3-fail2ban" | 4 | RDEPENDS_${PN}-ptest = "python3-core python3-io python3-modules python3-fail2ban" |
| 5 | |||
| 6 | SRC_URI += " \ | ||
| 7 | file://0001-To-fix-build-error-of-xrang.patch \ | ||
| 8 | " | ||
