python3 fixes, use FAF

This commit is contained in:
Jakub Filak 2014-12-08 11:37:10 +01:00
parent c47c38350a
commit 83cb127b4b
3 changed files with 86 additions and 28 deletions

View File

@ -1,23 +0,0 @@
From a71de1287c4eac39959d0d6ddf6ec7641c1a29aa Mon Sep 17 00:00:00 2001
From: Jakub Filak <jfilak@redhat.com>
Date: Fri, 17 Oct 2014 13:26:36 +0200
Subject: [PATCH] Temporary Rawhide patch: test FAF's Webui2
---
src/plugins/ureport.conf | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/plugins/ureport.conf b/src/plugins/ureport.conf
index a3aa456..63ecc29 100644
--- a/src/plugins/ureport.conf
+++ b/src/plugins/ureport.conf
@@ -1,5 +1,5 @@
# Base URL to uReport server
-# URL = https://retrace.fedoraproject.org/faf
+URL = https://retrace.fedoraproject.org/faf2
# no means that ssl certificates will not be checked
# SSLVerify = no
--
2.1.0

View File

@ -0,0 +1,78 @@
From aa02f3ca6d20a2ca1cf1ffd2dffbf231312a0d5e Mon Sep 17 00:00:00 2001
From: Jakub Filak <jfilak@redhat.com>
Date: Mon, 8 Dec 2014 11:00:17 +0100
Subject: [PATCH] report, client: fix minor python3 incompatibilities
Signed-off-by: Jakub Filak <jfilak@redhat.com>
---
src/client-python/__init__.py | 1 +
src/client-python/debuginfo.py | 4 ++--
src/report-python/__init__.py | 2 +-
src/report-python/libreport-meh-test.py | 6 +++---
4 files changed, 7 insertions(+), 6 deletions(-)
diff --git a/src/client-python/__init__.py b/src/client-python/__init__.py
index 8966f22..129149a 100644
--- a/src/client-python/__init__.py
+++ b/src/client-python/__init__.py
@@ -76,3 +76,4 @@ def error_msg(fmt, *args):
def error_msg_and_die(fmt, *args):
sys.stderr.write("%s\n" % (fmt % args))
sys.exit(1)
+
diff --git a/src/client-python/debuginfo.py b/src/client-python/debuginfo.py
index 67faa45..421a0aa 100644
--- a/src/client-python/debuginfo.py
+++ b/src/client-python/debuginfo.py
@@ -84,7 +84,7 @@ def unpack_rpm(package_file_name, files, tmp_dir, destdir, keeprpm, exact_files=
package_full_path = tmp_dir + "/" + package_file_name
log1("Extracting %s to %s", package_full_path, destdir)
log2("%s", files)
- print _("Extracting cpio from {0}").format(package_full_path)
+ print(_("Extracting cpio from {0}").format(package_full_path))
unpacked_cpio_path = tmp_dir + "/unpacked.cpio"
try:
unpacked_cpio = open(unpacked_cpio_path, 'wb')
@@ -447,7 +447,7 @@ class DebugInfoDownload(YumBase):
print _("Download cancelled by user")
return RETURN_CANCEL_BY_USER
- for pkg, files in package_files_dict.iteritems():
+ for pkg, files in package_files_dict.items():
dnlcb.downloaded_pkgs = downloaded_pkgs
repo.cache = 0
remote = pkg.returnSimple('relativepath')
diff --git a/src/report-python/__init__.py b/src/report-python/__init__.py
index 71e2d62..6c75eb1 100644
--- a/src/report-python/__init__.py
+++ b/src/report-python/__init__.py
@@ -236,7 +236,7 @@ def createPythonUnhandledExceptionSignature(**kwargs):
raise AttributeError("missing argument {0}".format(arg))
pd = problem_data()
- for (key, value) in kwargs.iteritems():
+ for (key, value) in kwargs.items():
pd.add(key, value)
product = getProduct()
if product:
diff --git a/src/report-python/libreport-meh-test.py b/src/report-python/libreport-meh-test.py
index 4ef2483..eb1c64f 100644
--- a/src/report-python/libreport-meh-test.py
+++ b/src/report-python/libreport-meh-test.py
@@ -22,10 +22,10 @@ handler = ExceptionHandler(config, intf, ReverseExceptionDump)
handler.install(None)
-print "handler set up, about to divide by zero"
+print("handler set up, about to divide by zero")
zero = 0
-print 1 / zero
+print(1 / zero)
-print "should have crashed"
+print("should have crashed")
--
2.1.0

View File

@ -7,14 +7,14 @@
Summary: Generic library for reporting various problems Summary: Generic library for reporting various problems
Name: libreport Name: libreport
Version: 2.3.0 Version: 2.3.0
Release: 7%{?dist} Release: 8%{?dist}
License: GPLv2+ License: GPLv2+
Group: System Environment/Libraries Group: System Environment/Libraries
URL: https://github.com/abrt/abrt/wiki/ABRT-Project URL: https://github.com/abrt/abrt/wiki/ABRT-Project
Source: https://fedorahosted.org/released/abrt/%{name}-%{version}.tar.gz Source: https://fedorahosted.org/released/abrt/%{name}-%{version}.tar.gz
Source1: autogen.sh Source1: autogen.sh
# git format-patch %%{Version} -N -M; # git format-patch %%{Version} -N -M --topo-order
# for p in `ls 0*.patch`; do printf "Patch%04d: %s\n" $i $p; ((i++)); done # for p in `ls 0*.patch`; do printf "Patch%04d: %s\n" $i $p; ((i++)); done
Patch0001: 0001-Translation-updates.patch Patch0001: 0001-Translation-updates.patch
Patch0002: 0002-upload-don-t-ask-for-password-if-the-env-var-is-empt.patch Patch0002: 0002-upload-don-t-ask-for-password-if-the-env-var-is-empt.patch
@ -53,8 +53,7 @@ Patch0034: 0034-problem_data-make-ks.cfg-file-editable.patch
Patch0035: 0035-ureport-uReport_ContactEmail-setting-can-be-left-emp.patch Patch0035: 0035-ureport-uReport_ContactEmail-setting-can-be-left-emp.patch
Patch0036: 0036-forbidden-words-add-OpenStack-related-strings.patch Patch0036: 0036-forbidden-words-add-OpenStack-related-strings.patch
Patch0037: 0037-anaconda-mark-anaconda-tb-as-editable-file-and-remov.patch Patch0037: 0037-anaconda-mark-anaconda-tb-as-editable-file-and-remov.patch
Patch0038: 0038-report-client-fix-minor-python3-incompatibilities.patch
Patch1001: 0001-Temporary-Rawhide-patch-test-FAF-s-Webui2.patch
# git is need for '%%autosetup -S git' which automatically applies all the # git is need for '%%autosetup -S git' which automatically applies all the
# patches above. Please, be aware that the patches must be generated # patches above. Please, be aware that the patches must be generated
@ -345,7 +344,7 @@ data over ftp/scp...
# Default '__scm_apply_git' is 'git apply && git commit' but this workflow # Default '__scm_apply_git' is 'git apply && git commit' but this workflow
# doesn't allow us to create a new file within a patch, so we have to use # doesn't allow us to create a new file within a patch, so we have to use
# 'git am' (see /usr/lib/rpm/macros for more details) # 'git am' (see /usr/lib/rpm/macros for more details)
%define __scm_apply_git(qp:m:) %{__git} am %define __scm_apply_git(qp:m:) %{__git} am --exclude src/report-python/libreport-meh-test.py
#%%define __scm_apply_git(qp:m:) %%{__git} am --exclude libreport.spec.in --exclude .gitignore #%%define __scm_apply_git(qp:m:) %%{__git} am --exclude libreport.spec.in --exclude .gitignore
%autosetup -S git %autosetup -S git
@ -717,6 +716,10 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
%changelog %changelog
* Mon Dec 08 2014 Jakub Filak <jfilak@redhat.com> 2.3.0-8
- fix several python3 incompatibilities
- switch back from FAF2 to FAF
* Fri Nov 28 2014 Jakub Filak <jfilak@redhat.com> 2.3.0-7 * Fri Nov 28 2014 Jakub Filak <jfilak@redhat.com> 2.3.0-7
- anaconda: filter out rootpw lines - anaconda: filter out rootpw lines
- highglit OpenStack related strings - highglit OpenStack related strings