Skip to contentSkip to conversation

python3-fail2ban: Fix build error of xrange.

PATCH In review Lei Maohui 2 participants 4 messages May 9, 2019 – Jun 13, 2019

lore
Share & tools
lore

Lei Maohui

author
#0 lore raw

PATCH 1/1 python3-fail2ban: Fix build error of xrange.

NameError: name 'xrange' is not defined

---
 .../files/0001-To-fix-build-error-of-xrang.patch   | 28 ++++++++++++++++++++++
 .../fail2ban/python3-fail2ban_0.10.4.0.bb          |  4 ++++
 2 files changed, 32 insertions(+)
 create mode 100644 recipes-security/fail2ban/files/0001-To-fix-build-error-of-xrang.patch
recipes-security/fail2ban/files/0001-To-fix-build-error-of-xrang.patch new file +28 -0
new file mode 100644
index 0000000..7f0812c
@@ -0,0 +1,28 @@
+From fe3436d65518099d35c643848cba50253abc249c Mon Sep 17 00:00:00 2001
+From: Lei Maohui <[email protected]>
+Date: Thu, 9 May 2019 14:44:51 +0900
+Subject: [PATCH] To fix build error of xrange.
+
+NameError: name 'xrange' is not defined
+
+Signed-off-by: Lei Maohui <[email protected]>
+---
+ fail2ban/__init__.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/fail2ban/__init__.py b/fail2ban/__init__.py
+index fa6dcf7..61789a4 100644
+--- a/fail2ban/__init__.py
++++ b/fail2ban/__init__.py
+@@ -82,7 +82,7 @@ strptime("2012", "%Y")
+ 
+ # short names for pure numeric log-level ("Level 25" could be truncated by short formats):
+ def _init():
+-	for i in xrange(50):
++	for i in range(50):
+ 		if logging.getLevelName(i).startswith('Level'):
+ 			logging.addLevelName(i, '#%02d-Lev.' % i)
+ _init()
+-- 
+2.7.4
+
recipes-security/fail2ban/python3-fail2ban_0.10.4.0.bb +4 -0
index 5c887e8..23ef027 100644
@@ -2,3 +2,7 @@ inherit setuptools3
 require python-fail2ban.inc
 
 RDEPENDS_${PN}-ptest = "python3-core python3-io python3-modules python3-fail2ban"
+
+SRC_URI += " \
+        file://0001-To-fix-build-error-of-xrang.patch \
+"
Signature · 1 line
2.7.4
#1 lore raw

ping

Quoted 71 lines

-----Original Message-----
From: Lei, Maohui
Sent: Friday, April 19, 2019 11:59 AM
To: [email protected]
Cc: Lei, Maohui
Subject: [yocto] [meta-security][PATCH] python3-fail2ban: Fix build error of xrange.

NameError: name 'xrange' is not defined

---
 .../files/0001-To-fix-build-error-of-xrang.patch   | 28 ++++++++++++++++++++++
 .../fail2ban/python3-fail2ban_0.10.4.0.bb          |  4 ++++
 2 files changed, 32 insertions(+)
 create mode 100644 recipes-security/fail2ban/files/0001-To-fix-build-error-of-

xrang.patch

(quoted diff) +0 -0

xrang.patch b/recipes-security/fail2ban/files/0001-To-fix-build-error-of- xrang.patch
new file mode 100644
index 0000000..7f0812c

recipes-security/fail2ban/files/0001-To-fix-build-error-of-xrang.patch new file +19 -0
@@ -0,0 +1,28 @@
+From fe3436d65518099d35c643848cba50253abc249c Mon Sep 17 00:00:00 2001
+From: Lei Maohui <[email protected]>
+Date: Thu, 9 May 2019 14:44:51 +0900
+Subject: [PATCH] To fix build error of xrange.
+
+NameError: name 'xrange' is not defined
+
+Signed-off-by: Lei Maohui <[email protected]>
+---
+ fail2ban/__init__.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/fail2ban/__init__.py b/fail2ban/__init__.py
+index fa6dcf7..61789a4 100644
+--- a/fail2ban/__init__.py
++++ b/fail2ban/__init__.py
+@@ -82,7 +82,7 @@ strptime("2012", "%Y")
+
+ # short names for pure numeric log-level ("Level 25" could be truncated by

short formats):
+ def _init():
+- for i in xrange(50):
++ for i in range(50):

recipes-security/fail2ban/files/0001-To-fix-build-error-of-xrang.patch new file +6 -0
+ 		if logging.getLevelName(i).startswith('Level'):
+ 			logging.addLevelName(i, '#%02d-Lev.' % i)
+ _init()
+--
+2.7.4
+
recipes- renamed from recipes-security/fail2ban/python3-fail2ban_0.10.4.0.bb +0 -0

security/fail2ban/python3-fail2ban_0.10.4.0.bb
index 5c887e8..23ef027 100644

recipes-security/fail2ban/python3-fail2ban_0.10.4.0.bb +0 -0
@@ -2,3 +2,7 @@ inherit setuptools3
 require python-fail2ban.inc
 
 RDEPENDS_${PN}-ptest = "python3-core python3-io python3-modules python3-

fail2ban"

recipes-security/fail2ban/python3-fail2ban_0.10.4.0.bb +4 -1
+
+SRC_URI += " \
+        file://0001-To-fix-build-error-of-xrang.patch \
+"
--

2.7.4

#2 lore raw
Quoted 1 line · Maohui

ping

Merged

thanks.

Quoted 73 lines
Quoted 71 lines

-----Original Message-----
From: Lei, Maohui
Sent: Friday, April 19, 2019 11:59 AM
To: [email protected]
Cc: Lei, Maohui
Subject: [yocto] [meta-security][PATCH] python3-fail2ban: Fix build error of xrange.

NameError: name 'xrange' is not defined

---
 .../files/0001-To-fix-build-error-of-xrang.patch   | 28 ++++++++++++++++++++++
 .../fail2ban/python3-fail2ban_0.10.4.0.bb          |  4 ++++
 2 files changed, 32 insertions(+)
 create mode 100644 recipes-security/fail2ban/files/0001-To-fix-build-error-of-

xrang.patch

(quoted diff) +0 -0

xrang.patch b/recipes-security/fail2ban/files/0001-To-fix-build-error-of- xrang.patch
new file mode 100644
index 0000000..7f0812c

recipes-security/fail2ban/files/0001-To-fix-build-error-of-xrang.patch new file +19 -0
@@ -0,0 +1,28 @@
+From fe3436d65518099d35c643848cba50253abc249c Mon Sep 17 00:00:00 2001
+From: Lei Maohui <[email protected]>
+Date: Thu, 9 May 2019 14:44:51 +0900
+Subject: [PATCH] To fix build error of xrange.
+
+NameError: name 'xrange' is not defined
+
+Signed-off-by: Lei Maohui <[email protected]>
+---
+ fail2ban/__init__.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/fail2ban/__init__.py b/fail2ban/__init__.py
+index fa6dcf7..61789a4 100644
+--- a/fail2ban/__init__.py
++++ b/fail2ban/__init__.py
+@@ -82,7 +82,7 @@ strptime("2012", "%Y")
+
+ # short names for pure numeric log-level ("Level 25" could be truncated by

short formats):
+ def _init():
+- for i in xrange(50):
++ for i in range(50):

recipes-security/fail2ban/files/0001-To-fix-build-error-of-xrang.patch new file +6 -0
+ 		if logging.getLevelName(i).startswith('Level'):
+ 			logging.addLevelName(i, '#%02d-Lev.' % i)
+ _init()
+--
+2.7.4
+
recipes- renamed from recipes-security/fail2ban/python3-fail2ban_0.10.4.0.bb +0 -0

security/fail2ban/python3-fail2ban_0.10.4.0.bb
index 5c887e8..23ef027 100644

recipes-security/fail2ban/python3-fail2ban_0.10.4.0.bb +0 -0
@@ -2,3 +2,7 @@ inherit setuptools3
 require python-fail2ban.inc
 
 RDEPENDS_${PN}-ptest = "python3-core python3-io python3-modules python3-

fail2ban"

recipes-security/fail2ban/python3-fail2ban_0.10.4.0.bb +4 -1
+
+SRC_URI += " \
+        file://0001-To-fix-build-error-of-xrang.patch \
+"
--

2.7.4

#3 lore raw
In reply to Lei Maohui

Hi,

Please merge this patch to warrior branch.

Best regards
Lei

Quoted 71 lines

-----Original Message-----
From: Lei, Maohui
Sent: Friday, April 19, 2019 11:59 AM
To: [email protected]
Cc: Lei, Maohui
Subject: [yocto] [meta-security][PATCH] python3-fail2ban: Fix build error of xrange.

NameError: name 'xrange' is not defined

---
 .../files/0001-To-fix-build-error-of-xrang.patch   | 28 ++++++++++++++++++++++
 .../fail2ban/python3-fail2ban_0.10.4.0.bb          |  4 ++++
 2 files changed, 32 insertions(+)
 create mode 100644 recipes-security/fail2ban/files/0001-To-fix-build-error-of-

xrang.patch

(quoted diff) +0 -0

xrang.patch b/recipes-security/fail2ban/files/0001-To-fix-build-error-of- xrang.patch
new file mode 100644
index 0000000..7f0812c

recipes-security/fail2ban/files/0001-To-fix-build-error-of-xrang.patch new file +19 -0
@@ -0,0 +1,28 @@
+From fe3436d65518099d35c643848cba50253abc249c Mon Sep 17 00:00:00 2001
+From: Lei Maohui <[email protected]>
+Date: Thu, 9 May 2019 14:44:51 +0900
+Subject: [PATCH] To fix build error of xrange.
+
+NameError: name 'xrange' is not defined
+
+Signed-off-by: Lei Maohui <[email protected]>
+---
+ fail2ban/__init__.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/fail2ban/__init__.py b/fail2ban/__init__.py
+index fa6dcf7..61789a4 100644
+--- a/fail2ban/__init__.py
++++ b/fail2ban/__init__.py
+@@ -82,7 +82,7 @@ strptime("2012", "%Y")
+
+ # short names for pure numeric log-level ("Level 25" could be truncated by

short formats):
+ def _init():
+- for i in xrange(50):
++ for i in range(50):

recipes-security/fail2ban/files/0001-To-fix-build-error-of-xrang.patch new file +6 -0
+ 		if logging.getLevelName(i).startswith('Level'):
+ 			logging.addLevelName(i, '#%02d-Lev.' % i)
+ _init()
+--
+2.7.4
+
recipes- renamed from recipes-security/fail2ban/python3-fail2ban_0.10.4.0.bb +0 -0

security/fail2ban/python3-fail2ban_0.10.4.0.bb
index 5c887e8..23ef027 100644

recipes-security/fail2ban/python3-fail2ban_0.10.4.0.bb +0 -0
@@ -2,3 +2,7 @@ inherit setuptools3
 require python-fail2ban.inc
 
 RDEPENDS_${PN}-ptest = "python3-core python3-io python3-modules python3-

fail2ban"

recipes-security/fail2ban/python3-fail2ban_0.10.4.0.bb +4 -1
+
+SRC_URI += " \
+        file://0001-To-fix-build-error-of-xrang.patch \
+"
--

2.7.4