From 18d9195a29255f352321f7af8941d774365f7b22 Mon Sep 17 00:00:00 2001 From: MementoMori <1003350679@qq.com> Date: Wed, 12 Jan 2022 16:43:08 +0800 Subject: [PATCH 1/6] fix error --- fix_cannot_import_error.patch | 11 +++++++++++ python-reportlab.spec | 4 ++++ 2 files changed, 15 insertions(+) create mode 100644 fix_cannot_import_error.patch diff --git a/fix_cannot_import_error.patch b/fix_cannot_import_error.patch new file mode 100644 index 0000000..97b920f --- /dev/null +++ b/fix_cannot_import_error.patch @@ -0,0 +1,11 @@ +--- reportlab-3.4.0\src\reportlab\libutils.py 2022-01-12 16:37:55.914924400 +0800 ++++ reportlab-3.4.0\src\reportlab\libutils.py 2017-03-07 18:17:00.000000000 +0800 +@@ -5,7 +5,7 @@ + __doc__='''Gazillions of miscellaneous internal utility functions''' + + import os, sys, imp, time, types +-from base64 import decodebytes as base64_decodestring, encodebytes as base64_encodestring ++from base64 import decodestring as base64_decodestring, encodestring as base64_encodestring + from reportlab import isPy3 + from reportlab.lib.logger import warnOnce + from reportlab.lib.rltempfile import get_rl_tempfile, get_rl_tempdir, _rl_getuid diff --git a/python-reportlab.spec b/python-reportlab.spec index 692717f..6c4d654 100644 --- a/python-reportlab.spec +++ b/python-reportlab.spec @@ -9,6 +9,7 @@ URL: https://www.reportlab.com/ Source0: https://pypi.python.org/packages/source/r/reportlab/reportlab-%{version}.tar.gz Patch0001: 0fbf25e4857423f6a38ca7f5aeee1c84acaa3fc1.patch Patch0002: CVE-2019-17626.patch +Patch0003: fix_cannot_import_error.patch %description The ReportLab Toolkit. An Open Source Python library for generating PDFs and graphics. @@ -60,6 +61,9 @@ PYTHONPATH="`pwd`/`ls -d build/lib*`" %{__python3} docs/genAll.py %doc demos/ tools/ %changelog +* * Wed Jan 12 2022 Chengshaowei - - 3.4.0-14 +- Fix cannot import error + * Wed Jul 21 2021 yaoxin - 3.4.0-13 - Fix CVE-2019-17626 -- Gitee From 17be9668f38b525dd4671b7c171d44e09e7af8ad Mon Sep 17 00:00:00 2001 From: MementoMori <1003350679@qq.com> Date: Wed, 12 Jan 2022 16:53:24 +0800 Subject: [PATCH 2/6] fix error --- fix_cannot_import_error.patch | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/fix_cannot_import_error.patch b/fix_cannot_import_error.patch index 97b920f..b73ed87 100644 --- a/fix_cannot_import_error.patch +++ b/fix_cannot_import_error.patch @@ -1,11 +1,11 @@ ---- reportlab-3.4.0\src\reportlab\libutils.py 2022-01-12 16:37:55.914924400 +0800 -+++ reportlab-3.4.0\src\reportlab\libutils.py 2017-03-07 18:17:00.000000000 +0800 +--- reportlab-3.4.0\src\reportlab\lib\utils.py 2022-01-12 16:37:55.914924400 +0800 ++++ reportlab-3.4.0\src\reportlab\lib\utils.py 2017-03-07 18:17:00.000000000 +0800 @@ -5,7 +5,7 @@ __doc__='''Gazillions of miscellaneous internal utility functions''' import os, sys, imp, time, types --from base64 import decodebytes as base64_decodestring, encodebytes as base64_encodestring -+from base64 import decodestring as base64_decodestring, encodestring as base64_encodestring +-from base64 import decodestring as base64_decodestring, encodestring as base64_encodestring ++from base64 import decodebytes as base64_decodestring, encodebytes as base64_encodestring from reportlab import isPy3 from reportlab.lib.logger import warnOnce from reportlab.lib.rltempfile import get_rl_tempfile, get_rl_tempdir, _rl_getuid -- Gitee From 0dde213000779738eec52fc0ba62c2b8f1a6386a Mon Sep 17 00:00:00 2001 From: MementoMori <1003350679@qq.com> Date: Thu, 13 Jan 2022 09:42:16 +0800 Subject: [PATCH 3/6] fix error --- fix_cannot_import_error.patch | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fix_cannot_import_error.patch b/fix_cannot_import_error.patch index b73ed87..fef7dfc 100644 --- a/fix_cannot_import_error.patch +++ b/fix_cannot_import_error.patch @@ -1,5 +1,5 @@ ---- reportlab-3.4.0\src\reportlab\lib\utils.py 2022-01-12 16:37:55.914924400 +0800 -+++ reportlab-3.4.0\src\reportlab\lib\utils.py 2017-03-07 18:17:00.000000000 +0800 +--- reportlab-3.4.0\src\reportlab\lib\utils.py 2017-03-07 18:17:00.000000000 +0800 ++++ reportlab-3.4.0\src\reportlab\lib\utils.py 2022-01-12 16:37:55.914924400 +0800 @@ -5,7 +5,7 @@ __doc__='''Gazillions of miscellaneous internal utility functions''' -- Gitee From 9669c83a9f1a2828962d78dafb9f2334ce69fa40 Mon Sep 17 00:00:00 2001 From: MementoMori <1003350679@qq.com> Date: Thu, 13 Jan 2022 10:10:54 +0800 Subject: [PATCH 4/6] fix error --- fix_cannot_import_error.patch | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/fix_cannot_import_error.patch b/fix_cannot_import_error.patch index fef7dfc..6272d17 100644 --- a/fix_cannot_import_error.patch +++ b/fix_cannot_import_error.patch @@ -1,5 +1,6 @@ ---- reportlab-3.4.0\src\reportlab\lib\utils.py 2017-03-07 18:17:00.000000000 +0800 -+++ reportlab-3.4.0\src\reportlab\lib\utils.py 2022-01-12 16:37:55.914924400 +0800 +diff -Nur reportlab-3.4.0/src/reportlab/lib/utils.py ../reportlab-3.4.0/src/reportlab/lib/utils.py +--- reportlab-3.4.0/src/reportlab/lib/utils.py 2017-03-07 18:17:00.000000000 +0800 ++++ reportlab-3.4.0/src/reportlab/lib/utils.py 2022-01-12 16:37:55.914924400 +0800 @@ -5,7 +5,7 @@ __doc__='''Gazillions of miscellaneous internal utility functions''' -- Gitee From afa484f3f0e0f90dc2796dbf843f8db442f0f6e4 Mon Sep 17 00:00:00 2001 From: MementoMori <1003350679@qq.com> Date: Thu, 13 Jan 2022 16:50:01 +0800 Subject: [PATCH 5/6] fix error --- python-reportlab.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python-reportlab.spec b/python-reportlab.spec index 6c4d654..68b82dc 100644 --- a/python-reportlab.spec +++ b/python-reportlab.spec @@ -61,7 +61,7 @@ PYTHONPATH="`pwd`/`ls -d build/lib*`" %{__python3} docs/genAll.py %doc demos/ tools/ %changelog -* * Wed Jan 12 2022 Chengshaowei - - 3.4.0-14 +* Wed Jan 12 2022 Chengshaowei - - 3.4.0-14 - Fix cannot import error * Wed Jul 21 2021 yaoxin - 3.4.0-13 -- Gitee From f81014cf85163ccff3a2e8186bcf39cfa8d69177 Mon Sep 17 00:00:00 2001 From: MementoMori <1003350679@qq.com> Date: Thu, 13 Jan 2022 16:51:38 +0800 Subject: [PATCH 6/6] fix error --- python-reportlab.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python-reportlab.spec b/python-reportlab.spec index 68b82dc..c213b0f 100644 --- a/python-reportlab.spec +++ b/python-reportlab.spec @@ -2,7 +2,7 @@ Name: python-reportlab Version: 3.4.0 -Release: 13 +Release: 14 Summary: ReportLab library to create PDF documents and graphic License: BSD URL: https://www.reportlab.com/ @@ -61,7 +61,7 @@ PYTHONPATH="`pwd`/`ls -d build/lib*`" %{__python3} docs/genAll.py %doc demos/ tools/ %changelog -* Wed Jan 12 2022 Chengshaowei - - 3.4.0-14 +* Wed Jan 12 2022 Chengshaowei - 3.4.0-14 - Fix cannot import error * Wed Jul 21 2021 yaoxin - 3.4.0-13 -- Gitee