diff --git a/abrt.spec b/abrt.spec index 8ec8193..81401d1 100644 --- a/abrt.spec +++ b/abrt.spec @@ -25,12 +25,11 @@ Summary: Automatic bug detection and reporting tool Name: abrt Version: 2.0.17 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv2+ Group: Applications/System URL: https://fedorahosted.org/abrt/ Source: https://fedorahosted.org/released/%{name}/%{name}-%{version}.tar.gz -Source1: abrt1_to_abrt2 # don't remove this patch, packages in rawhide are not signed! Patch1: disable_gpg_check.patch BuildRequires: dbus-devel @@ -641,6 +640,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %config(noreplace) %{_sysconfdir}/libreport/events.d/dbus_event.conf %changelog +* Wed Oct 24 2012 Jakub Filak 2.0.17-2 +- remove ABRT1.0-to-ABRT2.0 upgrade script from spec file + * Wed Oct 24 2012 Jakub Filak 2.0.17-1 - provide a problem item containing versions of binaries listed in Xorg backtrace Adresses #867694 comment 1 diff --git a/abrt1_to_abrt2 b/abrt1_to_abrt2 deleted file mode 100755 index 978c38f..0000000 --- a/abrt1_to_abrt2 +++ /dev/null @@ -1,115 +0,0 @@ -#! /usr/bin/python -#-*- coding: utf-8 -*- - -import os - -# abrt_v4 TABLE columns: -UUID = 0 -UID = 1 -INFORMALL = 2 -DUMPDIR_PATH = 3 -COUNT = 4 -REPORTED = 5 -TIME = 6 -MESSAGE = 7 - -# abrt_v4_reportresult columns: -#UUID = 0 -#UID = 1 -REPORTER = 2 -RESULT_MESSAGE = 3 - -def get_db_path(): - path = "/var/spool/abrt/abrt-db" - try: - with open("/etc/abrt/plugins/SQLite3.conf") as f: - for line in f: - line = line.split('=', 1) - if len(line) == 2 and line[0].strip() == "DBPath": - path = line[1].strip() - except Exception, ex: - pass - return path - -def get_url_from_text(text): - url_marks = ["http://", "https://", "ftp://", "ftps://", "file://"] - lines = text.split('\n') - url = "" - for mark in url_marks: - for line in lines: - last_mark = line.find(mark) - if last_mark != -1: - url_end = line.find(' ',last_mark) - if url_end == -1: - url_end = len(line) - url = "URL=" + line[last_mark:url_end] - return url - -def format_reported_to(reported_to): - reporter = reported_to[REPORTER] - url = get_url_from_text(reported_to[RESULT_MESSAGE]) - if not url: - url = reported_to[RESULT_MESSAGE] - return reporter + ": " + url - -if __name__ == "__main__": - try: - from sqlite3 import dbapi2 as sqlite - db = sqlite.connect(get_db_path()) - crashes = db.execute("SELECT * FROM abrt_v4") - # abrt_v4 TABLE columns: - # UUID | UID | INFORMALL | DUMPDIR_PATH | COUNT | REPORTED | TIME | MESSAGE - for crash in crashes: - # abrt_v4_reportresult columns: - # UUID | UID | REPORTER | MESSAGE - report_results = db.execute("SELECT * FROM abrt_v4_reportresult WHERE UUID='%s'" % crash[UUID]) - - # save count from db to file - count_file = "%s/count" % crash[DUMPDIR_PATH] - # don't overwrite - if not os.path.exists(count_file): - try: - fout = open(count_file, "w") - fout.write(str(crash[COUNT])) - fout.close() - except Exception, ex: - # silently ignore errors -> probably stalled db, but we can't - # do much about it, so it's better to not polute the rpm output - pass - - # save uuid from db to file - uuid_file = "%s/uuid" % crash[DUMPDIR_PATH] - # don't overwrite - if not os.path.exists(uuid_file): - try: - fout = open(uuid_file, "w") - fout.write(str(crash[UUID])) - fout.close() - except Exception, ex: - # silently ignore errors -> probably stalled db, but we can't - # do much about it, so it's better to not polute the rpm output - pass - - results = report_results.fetchall() - if results: - # save report results from db to file - reported_to_file = "%s/reported_to" % crash[DUMPDIR_PATH] - if not os.path.exists(reported_to_file): - try: - fout = open(reported_to_file, "w") - except Exception, ex: - # silently ignore errors -> probably stalled db, but we can't - # do much about it, so it's better to not polute the rpm output - continue - - for report_result in results: - # print "\t", format_reported_to(report_result) - # I know, it adds a '\n' to the end, but it's not a problem - fout.write("%s\n" % format_reported_to(report_result)) - fout.close() - db.close() - except Exception, ex: - # in case of any unhandled error, just ignore it, the worst, what - # can happen is that the old reports are marked as unreported - #print ex - pass