public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Matej Habrnal <mhabrnal@redhat.com>
To: git-commits@fedoraproject.org
Subject: [rpms/abrt] update-2.17.8: Fixes related to transition to Python 3 and fix in abrt-merge-pstoreoops
Date: Mon, 03 Aug 2026 10:23:11 GMT [thread overview]
Message-ID: <178575259174.1.679715315337956168.rpms-abrt-66b169ccf2a9@fedoraproject.org> (raw)
A new commit has been pushed.
Repo : rpms/abrt
Branch : update-2.17.8
Commit : 66b169ccf2a98d8eea8cb88d6725c47790bff435
Author : Matej Habrnal <mhabrnal@redhat.com>
Date : 2015-07-24T14:58:43+02:00
Stats : +130/-1 in 4 file(s)
URL : https://src.fedoraproject.org/rpms/abrt/c/66b169ccf2a98d8eea8cb88d6725c47790bff435?branch=update-2.17.8
Log:
Fixes related to transition to Python 3 and fix in abrt-merge-pstoreoops
Resolves #1246459
Signed-off-by: Matej Habrnal <mhabrnal@redhat.com>
---
diff --git a/0002-abrt-merge-pstoreoops-merge-files-in-descending-orde.patch b/0002-abrt-merge-pstoreoops-merge-files-in-descending-orde.patch
new file mode 100644
index 0000000..90ccc4d
--- /dev/null
+++ b/0002-abrt-merge-pstoreoops-merge-files-in-descending-orde.patch
@@ -0,0 +1,35 @@
+From 668014b725660785c43b880e73a9ff723abc0be5 Mon Sep 17 00:00:00 2001
+From: "knoha@redhat.com" <knoha@redhat.com>
+Date: Fri, 24 Jul 2015 07:56:02 +0200
+Subject: [PATCH] abrt-merge-pstoreoops: merge files in descending order
+
+fs/pstore reads the data from kmsg_dump_get_buffer(), which starts at
+the end of the kmsg buffer, in a while loop and increases Part no. in
+each iteration.
+
+Related: rhbz#1233662
+
+Signed-off-by: Jakub Filak <jfilak@redhat.com>
+---
+ src/hooks/abrt-merge-pstoreoops.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/hooks/abrt-merge-pstoreoops.c b/src/hooks/abrt-merge-pstoreoops.c
+index 6fc3109..36f1e0b 100644
+--- a/src/hooks/abrt-merge-pstoreoops.c
++++ b/src/hooks/abrt-merge-pstoreoops.c
+@@ -64,9 +64,9 @@ int compare_oops_texts(const void *a, const void *b)
+ return -1;
+ if (aa->panic_no > bb->panic_no)
+ return 1;
+- if (aa->part_no < bb->part_no)
++ if (aa->part_no > bb->part_no)
+ return -1;
+- return (aa->part_no > bb->part_no);
++ return (aa->part_no < bb->part_no);
+ }
+
+ int main(int argc, char **argv)
+--
+2.4.6
+
diff --git a/0006-pass-encoded-Unicode-to-hashlib.sha1.update.patch b/0006-pass-encoded-Unicode-to-hashlib.sha1.update.patch
new file mode 100644
index 0000000..d4a567e
--- /dev/null
+++ b/0006-pass-encoded-Unicode-to-hashlib.sha1.update.patch
@@ -0,0 +1,44 @@
+From ed7aaffdcac4f29cd513cd4c1086339512320a1c Mon Sep 17 00:00:00 2001
+From: Jakub Filak <jfilak@redhat.com>
+Date: Fri, 24 Jul 2015 13:47:15 +0200
+Subject: [PATCH] pass encoded Unicode to hashlib.sha1.update()
+
+Python 3 compatibility commit.
+
+Related: rhbz#1246459
+
+Signed-off-by: Jakub Filak <jfilak@redhat.com>
+---
+ src/plugins/abrt-action-check-oops-for-hw-error.in | 2 +-
+ src/plugins/abrt-action-generate-machine-id | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/plugins/abrt-action-check-oops-for-hw-error.in b/src/plugins/abrt-action-check-oops-for-hw-error.in
+index 400ed99..1695ddb 100644
+--- a/src/plugins/abrt-action-check-oops-for-hw-error.in
++++ b/src/plugins/abrt-action-check-oops-for-hw-error.in
+@@ -88,7 +88,7 @@ if __name__ == "__main__":
+ oops_hash = hashlib.sha1()
+ with open("backtrace", "r") as btfile:
+ for line in btfile:
+- oops_hash.update(line)
++ oops_hash.update(line.encode())
+
+ with open_or_die("uuid", "w") as f:
+ f.write(oops_hash.hexdigest())
+diff --git a/src/plugins/abrt-action-generate-machine-id b/src/plugins/abrt-action-generate-machine-id
+index 1005b2c..63b5c93 100644
+--- a/src/plugins/abrt-action-generate-machine-id
++++ b/src/plugins/abrt-action-generate-machine-id
+@@ -63,7 +63,7 @@ def generate_machine_id_dmidecode():
+ data = dmixp.xpathEval(k)
+ for d in data:
+ # Update the hash as we find the fields we are looking for
+- machine_id.update(d.get_content())
++ machine_id.update(d.get_content().encode())
+
+ del dmixp
+ del xmldoc
+--
+2.4.6
+
diff --git a/0007-vmcore-read-vmcore-by-chunks.patch b/0007-vmcore-read-vmcore-by-chunks.patch
new file mode 100644
index 0000000..a172ec5
--- /dev/null
+++ b/0007-vmcore-read-vmcore-by-chunks.patch
@@ -0,0 +1,38 @@
+From 8f26482402179dc64b9488be05ef9686922446ec Mon Sep 17 00:00:00 2001
+From: Jakub Filak <jfilak@redhat.com>
+Date: Fri, 24 Jul 2015 13:50:00 +0200
+Subject: [PATCH] vmcore: read vmcore by chunks
+
+Reading vmcore by lines was not a good idea and the switch to Python 3
+makes it impossible because of the binary format of that file (the file
+does not contain only valid Unicode strings and that raises
+UnicodeDecodeError from the for statement).
+
+Signed-off-by: Jakub Filak <jfilak@redhat.com>
+---
+ src/hooks/abrt_harvest_vmcore.py.in | 9 ++++++---
+ 1 file changed, 6 insertions(+), 3 deletions(-)
+
+diff --git a/src/hooks/abrt_harvest_vmcore.py.in b/src/hooks/abrt_harvest_vmcore.py.in
+index c5e7d53..61a6e57 100644
+--- a/src/hooks/abrt_harvest_vmcore.py.in
++++ b/src/hooks/abrt_harvest_vmcore.py.in
+@@ -214,9 +214,12 @@ def harvest_vmcore():
+ hashobj = hashlib.sha1()
+ # Iterate over the file a line at a time in order to not load the whole
+ # vmcore file
+- with open(os.path.join(f_full, 'vmcore'), 'r') as corefile:
+- for line in corefile:
+- hashobj.update(line)
++ with open(os.path.join(f_full, 'vmcore'), 'rb') as corefile:
++ while True:
++ chunk = corefile.read(8192)
++ if not chunk:
++ break
++ hashobj.update(chunk)
+
+ dd = create_abrtd_info(destdirnew, hashobj.hexdigest())
+ if dd is None:
+--
+2.4.6
+
diff --git a/abrt.spec b/abrt.spec
index 0705929..d6a2c84 100644
--- a/abrt.spec
+++ b/abrt.spec
@@ -49,7 +49,7 @@
Summary: Automatic bug detection and reporting tool
Name: abrt
Version: 2.6.2
-Release: 2%{?dist}
+Release: 3%{?dist}
License: GPLv2+
Group: Applications/System
URL: https://abrt.readthedocs.org/
@@ -60,6 +60,12 @@ Patch0: disable-OpenGPGCheck-in-Fedora-Rawhide.patch
# git format-patch %%{Version} --topo-order -N -M;
# i=1; for p in `ls 0*.patch`; do printf "Patch%04d: %s\n" $i $p; ((i++)); done
Patch0001: 0001-use-gettext-instead-of-lgettext-in-all-python-script.patch
+Patch0002: 0002-abrt-merge-pstoreoops-merge-files-in-descending-orde.patch
+#Patch0003: 0003-testsuite-pstore-adapt-to-merging-in-descending-orde.patch
+#Patch0004: 0004-testsuite-a-a-reporting-sanity-add-test-for-missing-.patch
+#Patch0005: 0005-testsuite-pstore-harvest-adapt-to-merging-in-descend.patch
+Patch0006: 0006-pass-encoded-Unicode-to-hashlib.sha1.update.patch
+Patch0007: 0007-vmcore-read-vmcore-by-chunks.patch
# '%%autosetup -S git' -> git
BuildRequires: git
@@ -1046,6 +1052,12 @@ killall abrt-dbus >/dev/null 2>&1 || :
%config(noreplace) %{_sysconfdir}/profile.d/abrt-console-notification.sh
%changelog
+* Fri Jul 24 2015 Matej Habrnal <mhabrnal@redhat.com> 2.6.2-3
+- read vmcore by chunks
+- pass encoded Unicode to hashlib.sha1.update()
+- abrt-merge-pstoreoops: merge files in descending order
+- Resolves #1246459
+
* Wed Jul 22 2015 Matej Habrnal <mhabrnal@redhat.com> 2.6.2-2
- use gettext instead of lgettext in all python scripts
reply other threads:[~2026-08-03 10:23 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=178575259174.1.679715315337956168.rpms-abrt-66b169ccf2a9@fedoraproject.org \
--to=mhabrnal@redhat.com \
--cc=git-commits@fedoraproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox