From 6ea6b80612ee5e8f9643ce7418540555fac483e5 Mon Sep 17 00:00:00 2001 From: Matej Habrnal Date: Apr 08 2016 15:20:38 +0000 Subject: Fix BrokenPipe error in a-a-install-debuginfo Related to #1255259 Signed-off-by: Matej Habrnal --- diff --git a/0009-a-a-install-debuginfo-make-tmpdir-variable-global.patch b/0009-a-a-install-debuginfo-make-tmpdir-variable-global.patch new file mode 100644 index 0000000..ca126b9 --- /dev/null +++ b/0009-a-a-install-debuginfo-make-tmpdir-variable-global.patch @@ -0,0 +1,85 @@ +From 715fcfb5d83faa29f8d221d0e2d800b08261810a Mon Sep 17 00:00:00 2001 +From: Matej Habrnal +Date: Tue, 8 Mar 2016 16:42:31 +0100 +Subject: [PATCH] a-a-install-debuginfo: make tmpdir variable global + +Function clean_up() has one required parameter tmpdir. +Without this commit clean_up() function raises an exception because it was +called without the parameter. + +Signed-off-by: Matej Habrnal +--- + src/plugins/abrt-action-install-debuginfo.in | 16 ++++++++-------- + 1 file changed, 8 insertions(+), 8 deletions(-) + +diff --git a/src/plugins/abrt-action-install-debuginfo.in b/src/plugins/abrt-action-install-debuginfo.in +index f70ebcd..7818ffd 100644 +--- a/src/plugins/abrt-action-install-debuginfo.in ++++ b/src/plugins/abrt-action-install-debuginfo.in +@@ -20,7 +20,8 @@ import problem + RETURN_OK = 0 + # serious problem, should be logged somewhere + RETURN_FAILURE = 2 +- ++# path to tmp directory has to be global because of clean_up() ++TMPDIR = None + + GETTEXT_PROGNAME = "abrt" + import locale +@@ -43,11 +44,11 @@ def init_gettext(): + gettext.textdomain(GETTEXT_PROGNAME) + + def sigterm_handler(signum, frame): +- clean_up() ++ clean_up(TMPDIR) + exit(RETURN_OK) + + def sigint_handler(signum, frame): +- clean_up() ++ clean_up(TMPDIR) + print("\n{0}".format(_("Exiting on user command"))) + sys.stdout.flush() + # ??! without "sys.", I am getting segv! +@@ -63,7 +64,6 @@ if __name__ == "__main__": + fbuild_ids = "build_ids" + cachedirs = [] + size_mb = 4096 +- tmpdir = None + keeprpms = False + noninteractive = False + b_ids = [] +@@ -135,7 +135,7 @@ if __name__ == "__main__": + except: + pass + elif opt == "--tmpdir": +- tmpdir = arg ++ TMPDIR = arg + elif opt == "--keeprpms": + keeprpms = True + # --exact takes precendece over --ids +@@ -159,11 +159,11 @@ if __name__ == "__main__": + + if not cachedirs: + cachedirs = ["/var/cache/abrt-di"] +- if not tmpdir: ++ if not TMPDIR: + # security people prefer temp subdirs in app's private dir, like /var/run/abrt + # and we switched to /tmp but Fedora feature tmp-on-tmpfs appeared, hence we must + # not use /tmp for potential big data anymore +- tmpdir = "@LARGE_DATA_TMP_DIR@/abrt-tmp-debuginfo-%s.%u" % (time.strftime("%Y-%m-%d-%H:%M:%S"), os.getpid()) ++ TMPDIR = "@LARGE_DATA_TMP_DIR@/abrt-tmp-debuginfo-%s.%u" % (time.strftime("%Y-%m-%d-%H:%M:%S"), os.getpid()) + + + if missing == None: +@@ -235,7 +235,7 @@ if __name__ == "__main__": + sys.exit(RETURN_FAILURE) + + # TODO: should we pass keep_rpms=keeprpms to DebugInfoDownload here?? +- downloader = download_class(cache=cachedirs[0], tmp=tmpdir, ++ downloader = download_class(cache=cachedirs[0], tmp=TMPDIR, + noninteractive=noninteractive, + repo_pattern=repo_pattern) + try: +-- +2.5.5 + diff --git a/0010-a-a-install-debuginfo-fix-BrokenPipe-error.patch b/0010-a-a-install-debuginfo-fix-BrokenPipe-error.patch new file mode 100644 index 0000000..053ded4 --- /dev/null +++ b/0010-a-a-install-debuginfo-fix-BrokenPipe-error.patch @@ -0,0 +1,49 @@ +From a999c2e9c25a46ffeff0c67ad9b9177d640a4b87 Mon Sep 17 00:00:00 2001 +From: Matej Habrnal +Date: Tue, 8 Mar 2016 16:45:36 +0100 +Subject: [PATCH] a-a-install-debuginfo: fix BrokenPipe error + +While debug info is downloading and stop button is pressed the BrokenPipe +error appears. + +If the stop button is pressed, gui wizard sends SIGTERM to all +processes with the same group ID so abrt-action-install-debuginfo got SIGTERM +as well. It has its own SIGTERM handler which calls clean_up() function and it +takes a while before the tool is terminated. +abrt-action-install-debuginfo tries to write some messages to the closed socket +during the clean_up process and it raises a BrokenPipe exception. We must +ensure that no message will be printed after SIGTERM is recieved. + +Related to: #1255259 + +Signed-off-by: Matej Habrnal +--- + src/plugins/abrt-action-install-debuginfo.in | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/src/plugins/abrt-action-install-debuginfo.in b/src/plugins/abrt-action-install-debuginfo.in +index 7818ffd..e4a7dfd 100644 +--- a/src/plugins/abrt-action-install-debuginfo.in ++++ b/src/plugins/abrt-action-install-debuginfo.in +@@ -44,7 +44,7 @@ def init_gettext(): + gettext.textdomain(GETTEXT_PROGNAME) + + def sigterm_handler(signum, frame): +- clean_up(TMPDIR) ++ clean_up(TMPDIR, silent=True) + exit(RETURN_OK) + + def sigint_handler(signum, frame): +@@ -241,6 +241,9 @@ if __name__ == "__main__": + try: + result = downloader.download(missing, download_exact_files=exact_fls) + except Exception as ex: ++ if ex.errno == errno.EPIPE: ++ clean_up(TMPDIR, silent=True) ++ exit(RETURN_FAILURE) + error_msg_and_die("Can't download debuginfos: %s", ex) + + if exact_fls: +-- +2.5.5 + diff --git a/0011-Add-basic-documentation.patch b/0011-Add-basic-documentation.patch new file mode 100644 index 0000000..9dbab6a --- /dev/null +++ b/0011-Add-basic-documentation.patch @@ -0,0 +1,282 @@ +From 92c847ef13cd721a37187c5878a05b54df48114a Mon Sep 17 00:00:00 2001 +From: Jakub Filak +Date: Sat, 20 Feb 2016 08:27:32 +0100 +Subject: [PATCH] Add basic documentation + +Signed-off-by: Jakub Filak +--- + CONTRIBUTING.md | 94 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + INSTALL | 7 ----- + INSTALL.md | 56 ++++++++++++++++++++++++++++++++++ + Makefile.am | 2 ++ + README | 11 ------- + README.md | 48 +++++++++++++++++++++++++++++ + 6 files changed, 200 insertions(+), 18 deletions(-) + create mode 100644 CONTRIBUTING.md + delete mode 100644 INSTALL + create mode 100644 INSTALL.md + delete mode 100644 README + create mode 100644 README.md + +diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md +new file mode 100644 +index 0000000..4b27138 +--- /dev/null ++++ b/CONTRIBUTING.md +@@ -0,0 +1,94 @@ ++# Contributing to ABRT ++ ++Adopted from http://www.contribution-guide.org/ ++ ++BSD, Copyright (c) 2015 Jeff Forcier ++ ++## Submitting bugs ++ ++### Due diligence ++ ++Before submitting a bug, please do the following: ++ ++* Perform **basic troubleshooting** steps: ++ ++ * **Make sure you're on the latest version.** If you're not on the most ++ recent version, your problem may have been solved already! Upgrading is ++ always the best first step. ++ * **Try older versions.** If you're already *on* the latest release, try ++ rolling back a few minor versions (e.g. if on 1.7, try 1.5 or 1.6) and ++ see if the problem goes away. This will help the devs narrow down when ++ the problem first arose in the commit log. ++ * **Try switching up dependency versions.** If the software in question has ++ dependencies (other libraries, etc) try upgrading/downgrading those as ++ well. ++ ++* **Search the project's bug/issue tracker** to make sure it's not a known issue. ++* If you don't find a pre-existing issue, consider **checking with the mailing ++ list and/or IRC channel** in case the problem is non-bug-related. ++* Consult [README.md](README.md) for links to bugtracker, mailinglist or IRC. ++ ++### What to put in your bug report ++ ++Make sure your report gets the attention it deserves: bug reports with missing ++information may be ignored or punted back to you, delaying a fix. The below ++constitutes a bare minimum; more info is almost always better: ++ ++* **What version of the core programming language interpreter/compiler are you ++ using?** For example, if it's a Python project, are you using Python 2.7.3? ++ Python 3.3.1? PyPy 2.0? ++* **What operating system are you on?** Make sure to include release and distribution. ++* **Which version or versions of the software are you using?** Ideally, you ++ followed the advice above and have ruled out (or verified that the problem ++ exists in) a few different versions. ++* **How can the developers recreate the bug on their end?** If possible, ++ include a copy of your code, the command you used to invoke it, and the full ++ output of your run (if applicable.) ++ ++ * A common tactic is to pare down your code until a simple (but still ++ bug-causing) "base case" remains. Not only can this help you identify ++ problems which aren't real bugs, but it means the developer can get to ++ fixing the bug faster. ++ ++ ++## Contributing changes ++ ++It would be the best if you could discuss your plans with us on #abrt or on our ++mailinig list crash-catcher@lists.fedorahosted.org before you spent too much ++energy and time. ++ ++Before contributing, please, make yourself familiar with git. You can [try git ++online](https://try.github.io/). Things would be easier for all of us if you do ++your changes on a branch. Use a single commit for every logical reviewable ++change, without unrelated modifications (that will help us if need to revert a ++particular commit). Please avoid adding commits fixing your previous ++commits, do amend or rebase instead. ++ ++Every commit must have either comprehensive commit message saying what is being ++changed and why or a link (an issue number on Github) to a bug report where ++this information is available. It is also useful to include notes about ++negative decisions - i.e. why you decided to not do particular things. Please ++bare in mind that other developers might not understand what the original ++problem was. ++ ++### Full example ++ ++Here's an example workflow for a project `abrt` hosted on Github ++Your username is `yourname` and you're submitting a basic bugfix or feature. ++ ++* Hit 'fork' on Github, creating e.g. `yourname/abrt`. ++* `git clone git@github.com:yourname/abrt` ++* `cd abrt` ++* `git checkout -b foo_the_bars` to create new local branch named foo_the_bars ++* Hack, hack, hack ++* Run `make check` ++* `git status` ++* `git add` ++* `git commit -s -m "Foo the bars"` ++* `git push -u origin HEAD` to create foo_the_bars branch in your fork ++* Visit your fork at Github and click handy "Pull request" button. ++* In the description field, write down issue number (if submitting code fixing ++ an existing issue) or describe the issue + your fix (if submitting a wholly ++ new bugfix). ++* Hit 'submit'! And please be patient - the maintainers will get to you when ++ they can. +diff --git a/INSTALL b/INSTALL +deleted file mode 100644 +index 799a4a6..0000000 +--- a/INSTALL ++++ /dev/null +@@ -1,7 +0,0 @@ +-How to install +-============== +- +-1. autogen.sh +-2. ./configure +-3. make +-4. make install +diff --git a/INSTALL.md b/INSTALL.md +new file mode 100644 +index 0000000..96d42c4 +--- /dev/null ++++ b/INSTALL.md +@@ -0,0 +1,56 @@ ++# How to install ++ ++### Development dependencies ++ ++Build dependencies can be listed by: ++ ++ $ ./autogen.sh sysdeps ++ ++or installed by: ++ ++ $ ./autogen.sh sysdeps --install ++ ++The dependency installer gets the data from [the rpm spec file](abrt.spec.in) ++ ++### Building from sources ++ ++When you have all dependencies installed run the following commands: ++ ++ $ ./autogen.sh --prefix=/usr \ ++ --sysconfdir=/etc \ ++ --localstatedir=/var \ ++ --sharedstatedir=/var/lib ++ ++ $ make ++ ++or if you want to debug ABRT run: ++ ++ $ CFLAGS="-g -g3 -ggdb -ggdb3 -O0" ./autogen.sh --prefix=/usr \ ++ --sysconfdir=/etc \ ++ --localstatedir=/var \ ++ --sharedstatedir=/var/lib \ ++ --enable-debug ++ ++ $ make ++ ++### Checking ++ ++ABRT uses [Autotest](http://www.gnu.org/savannah-checkouts/gnu/autoconf/manual/autoconf-2.69/html_node/Using-Autotest.html) ++to validate source codes. Run the test by: ++ ++ $ make check ++ ++If you want to search for memory issues, build ABRT with debug options and then ++run: ++ ++ $ make maintainer-check ++ ++### Installing ++ ++If you need an rpm package, run: ++ ++ $ make rpm ++ ++otherwise run: ++ ++ $ make install +diff --git a/Makefile.am b/Makefile.am +index 01b8a97..e528c93 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -36,6 +36,8 @@ EXTRA_DIST = doc/coding-style abrt.spec.in abrt.pc.in \ + abrt-version asciidoc.conf init-scripts/* $(TESTSUITE_FILES) \ + augeas/test_abrt.aug + ++dist_doc_DATA = README.md ++ + pkgconfigdir = $(libdir)/pkgconfig + pkgconfig_DATA = abrt.pc + +diff --git a/README b/README +deleted file mode 100644 +index 26cbbcb..0000000 +--- a/README ++++ /dev/null +@@ -1,11 +0,0 @@ +-These sources are in early stages. They are changing every day :-)... +-Anyway, patches are welcome. +- +-** Using Valgrind +- +-When running ABRT under memcheck, GLib's environment variables should +-be set to turn off glib's memory optimization, so valgrind is not +-confused: +- +-G_SLICE=always-malloc G_DEBUG=gc-friendly valgrind --tool=memcheck \ +- --leak-check=full abrtd -dvvv +diff --git a/README.md b/README.md +new file mode 100644 +index 0000000..e58a499 +--- /dev/null ++++ b/README.md +@@ -0,0 +1,48 @@ ++# ABRT ++ ++**A set of tools to help users detect and report application crashes.** ++ ++### About ++ ++Its main purpose is to ease the process of reporting an issue and finding a ++solution. ++ ++The solution in this context might be a bugzilla ticket, knowledge base article ++or a suggestion to update a package to a version containing a fix. ++ ++### Documentation ++ ++Every ABRT program and configuration file has a man page describing it. It is ++also possible to [read the ABRT documentation](http://abrt.readthedocs.org/) ++online. For contributors and developers, there are also [wiki ++pages](https://github.com/abrt/abrt/wiki) describing some topics to deeper ++technical details. ++ ++### Development ++ ++ * IRC Channel: #abrt on FreeNode ++ * [Mailing List](https://lists.fedorahosted.org/admin/lists/crash-catcher.lists.fedorahosted.org/) ++ * [Bug Reports and RFEs](https://github.com/abrt/abrt/issues) ++ * [Contributing to ABRT](CONTRIBUTING.md) ++ * [Install and run ABRT](INSTALL.md) ++ ++ ++### Running ++ ++ABRT consist of several services and many small utilities. While The utilities ++can be successfully run from the source directories after build, the services ++often uses the utilities to do actions and expect the utilities installed in ++the system directories. Hence to run the services, it is recommended to install ++ABRT first and run them as system services. The instructions how to build ++and install ABRT can be found in [INSTALL.md](INSTALL.md) ++ ++### Technologies ++ ++* [libreport](https://github.com/abrt/libreport) - problem data format, reporting ++* [satyr](https://github.com/abrt/satyr) - backtrace processing, micro-reports ++* [Python3](https://www.python.org/) ++* [GLib2](https://developer.gnome.org/glib/) ++* [Gtk3](https://developer.gnome.org/gtk3) ++* [D-Bus](https://www.freedesktop.org/wiki/Software/dbus/) ++* [SELinux](https://github.com/SELinuxProject/selinux/wiki) ++* [systemd](https://www.freedesktop.org/wiki/Software/systemd/) +-- +2.5.5 + diff --git a/abrt.spec b/abrt.spec index fd0b313..0031724 100644 --- a/abrt.spec +++ b/abrt.spec @@ -43,13 +43,13 @@ %define docdirversion -%{version} %endif -%define libreport_ver 2.6.4 +%define libreport_ver 2.6.4-2 %define satyr_ver 0.19 Summary: Automatic bug detection and reporting tool Name: abrt Version: 2.8.0 -Release: 3%{?dist} +Release: 4%{?dist} License: GPLv2+ Group: Applications/System URL: https://abrt.readthedocs.org/ @@ -65,6 +65,18 @@ Patch0005: 0005-Fix-minor-typo-possition-position.patch Patch0006: 0006-a-a-save-package-data-blacklist-usr-lib-64-firefox-p.patch #Patch0007: 0007-testsuite-add-concurrent-processing-test-for-abrtd.patch Patch0008: 0008-CCpp-turn-off-compat-cores.patch +Patch0009: 0009-a-a-install-debuginfo-make-tmpdir-variable-global.patch +Patch0010: 0010-a-a-install-debuginfo-fix-BrokenPipe-error.patch +Patch0011: 0011-Add-basic-documentation.patch +#Patch0012: 0012-spec-README-README.md.patch +#Patch0013: 0013-testsuite-fix-ccpp-plugin-debug-test.patch +#Patch0014: 0014-testsuite-rlAssertRpm-doesn-t-work-with-abrt-addon.patch +#Patch0015: 0015-testsuite-compat-cores-add-include-to-the-loop.c-fil.patch +#Patch0016: 0016-testsuite-changes-due-to-turn-off-compat-cores.patch +#Patch0017: 0017-testsuite-yum-to-dnf.patch +#Patch0018: 0018-testsuite-avoid-unintentional-removal-of-package-man.patch +#Patch0019: 0019-testsuite-tell-the-runner-about-problem-sub-director.patch +#Patch0020: 0020-testsuite-add-a-per-test-timeout-for-15m.patch # '%%autosetup -S git' -> git BuildRequires: git @@ -728,7 +740,7 @@ killall abrt-dbus >/dev/null 2>&1 || : %files -f %{name}.lang %defattr(-,root,root,-) -%doc README COPYING +%doc README.md COPYING %if %{with systemd} %{_unitdir}/abrtd.service %{_tmpfilesdir}/abrt.conf @@ -1086,6 +1098,13 @@ killall abrt-dbus >/dev/null 2>&1 || : %config(noreplace) %{_sysconfdir}/profile.d/abrt-console-notification.sh %changelog +* Fri Apr 08 2016 Matej Habrnal 2.9.0-1 +- spec: README -> README.md +- Add basic documentation +- a-a-install-debuginfo: fix BrokenPipe error +- a-a-install-debuginfo: make tmpdir variable global +- Resolves: #1255259 + * Tue Feb 23 2016 Matej Habrnal 2.8.0-3 - translation updates - blacklist Firefox's plugin-container