New upstream release 2.8.1

Signed-off-by: Matej Habrnal <mhabrnal@redhat.com>
This commit is contained in:
Matej Habrnal 2016-05-25 09:48:30 +02:00
parent cd3efeaff4
commit 168feccb11
14 changed files with 22 additions and 93332 deletions

1
.gitignore vendored
View File

@ -48,3 +48,4 @@ abrt-1.1.13.tar.gz
/abrt-2.7.1.tar.gz
/abrt-2.7.2.tar.gz
/abrt-2.8.0.tar.gz
/abrt-2.8.1.tar.gz

View File

@ -1,99 +0,0 @@
From 51531e9ea72af09571688a20f00e55cad5fe9c3a Mon Sep 17 00:00:00 2001
From: Jakub Filak <jfilak@redhat.com>
Date: Tue, 9 Feb 2016 17:55:29 +0100
Subject: [PATCH] ccpp: drop %e from the core_pattern
The argument is no longer need and it must be placed either at the end
of the command or enclosed with '' as it can contain white space.
Threads can have an arbitrary name:
man 3 pthread_setname_np
Signed-off-by: Jakub Filak <jfilak@redhat.com>
---
src/hooks/abrt-hook-ccpp.c | 16 ++++++++--------
src/hooks/abrt-install-ccpp-hook.in | 12 +-----------
2 files changed, 9 insertions(+), 19 deletions(-)
diff --git a/src/hooks/abrt-hook-ccpp.c b/src/hooks/abrt-hook-ccpp.c
index 8f1b813..dfe9526 100644
--- a/src/hooks/abrt-hook-ccpp.c
+++ b/src/hooks/abrt-hook-ccpp.c
@@ -143,9 +143,9 @@ static struct dump_dir *dd;
* %u - uid
* %g - gid
* %t - UNIX time of dump
- * %e - executable filename
- * %i - crash thread tid
* %P - global pid
+ * %I - crash thread tid
+ * %e - executable filename (can contain white spaces)
* %% - output one "%"
*/
/* Hook must be installed with exactly the same sequence of %c specifiers.
@@ -661,9 +661,9 @@ int main(int argc, char** argv)
if (argc < 8)
{
- /* percent specifier: %s %c %p %u %g %t %e %P %i*/
- /* argv: [0] [1] [2] [3] [4] [5] [6] [7] [8] [9]*/
- error_msg_and_die("Usage: %s SIGNO CORE_SIZE_LIMIT PID UID GID TIME BINARY_NAME GLOBAL_PID [TID]", argv[0]);
+ /* percent specifier: %s %c %p %u %g %t %P %T */
+ /* argv: [0] [1] [2] [3] [4] [5] [6] [7] [8] */
+ error_msg_and_die("Usage: %s SIGNO CORE_SIZE_LIMIT PID UID GID TIME GLOBAL_PID GLOBAL_TID", argv[0]);
}
/* Not needed on 2.6.30.
@@ -704,8 +704,8 @@ int main(int argc, char** argv)
/* set to max possible >0 value */
ulimit_c = ~((off_t)1 << (sizeof(off_t)*8-1));
}
- const char *global_pid_str = argv[8];
- pid_t pid = xatoi_positive(argv[8]);
+ const char *global_pid_str = argv[7];
+ pid_t pid = xatoi_positive(argv[7]);
user_pwd = get_cwd(pid); /* may be NULL on error */
log_notice("user_pwd:'%s'", user_pwd);
@@ -867,7 +867,7 @@ int main(int argc, char** argv)
signal_no, signame, "dumping core");
pid_t tid = -1;
- const char *tid_str = argv[9];
+ const char *tid_str = argv[8];
if (tid_str)
{
tid = xatoi_positive(tid_str);
diff --git a/src/hooks/abrt-install-ccpp-hook.in b/src/hooks/abrt-install-ccpp-hook.in
index 707c57d..660c209 100755
--- a/src/hooks/abrt-install-ccpp-hook.in
+++ b/src/hooks/abrt-install-ccpp-hook.in
@@ -11,9 +11,7 @@ SAVED_PATTERN_DIR="@VAR_RUN@/abrt"
SAVED_PATTERN_FILE="@VAR_RUN@/abrt/saved_core_pattern"
HOOK_BIN="@libexecdir@/abrt-hook-ccpp"
# Must match percent_specifiers[] order in abrt-hook-ccpp.c:
-PATTERN="|$HOOK_BIN %s %c %p %u %g %t %e %P %I"
-# Same, but with bogus "executable name" parameter
-PATTERN1="|$HOOK_BIN %s %c %p %u %g %t e %P %I"
+PATTERN="|$HOOK_BIN %s %c %p %u %g %t %P %I"
# core_pipe_limit specifies how many dump_helpers can run at the same time
# 0 - means unlimited, but it's not guaranteed that /proc/<pid> of crashing
@@ -39,14 +37,6 @@ start() {
cur=`cat "$PATTERN_FILE"`
cur_first=`printf "%s" "$cur" | sed 's/ .*//'`
- # Is there a %e (executable name) in old pattern anywhere?
- if test x"${cur#*%e}" = x"${cur}"; then
- # No. Can use PATTERN with less risk of overflow
- # on expansion (executable names can be LONG).
- # Overflow would cause kernel to abort coredump. BAD.
- PATTERN="$PATTERN1"
- fi
-
$verbose && printf "cur:'%s'\n" "$cur"
# Is it already installed?
if test x"$cur_first" != x"|$HOOK_BIN"; then # no
--
2.5.0

File diff suppressed because it is too large Load Diff

View File

@ -1,26 +0,0 @@
From 0a918dd4d1aee2a90de212f932c01081c73791cd Mon Sep 17 00:00:00 2001
From: Jakub Filak <jfilak@redhat.com>
Date: Thu, 11 Feb 2016 15:26:27 +0100
Subject: [PATCH] translations: add missing new line
Signed-off-by: Jakub Filak <jfilak@redhat.com>
---
po/km.po | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/po/km.po b/po/km.po
index 84bb1b1..ab7a684 100644
--- a/po/km.po
+++ b/po/km.po
@@ -137,7 +137,7 @@ msgid ""
"\n"
"Applet which notifies user when new problems are detected by ABRT\n"
msgstr ""
-"Applet ដែលបានជូនដំណឹងអ្នកប្រើនៅពេលដែលមានបញ្ហាថ្មីត្រូវបានរកឃើញដោយ ABRT"
+"Applet ដែលបានជូនដំណឹងអ្នកប្រើនៅពេលដែលមានបញ្ហាថ្មីត្រូវបានរកឃើញដោយ ABRT\n"
#: ../src/configuration-gui/abrt-config-widget.c:483
msgid ""
--
2.5.0

View File

@ -1,25 +0,0 @@
From 7dca143dd91229e0dad78bcdead6748ecf27cbd3 Mon Sep 17 00:00:00 2001
From: Yuri Chornoivan <yurchor@ukr.net>
Date: Fri, 12 Feb 2016 22:51:18 +0200
Subject: [PATCH] Fix minor typo: possition -> position
---
src/plugins/abrt-dump-journal-xorg.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/plugins/abrt-dump-journal-xorg.c b/src/plugins/abrt-dump-journal-xorg.c
index 87dfe13..1ede56f 100644
--- a/src/plugins/abrt-dump-journal-xorg.c
+++ b/src/plugins/abrt-dump-journal-xorg.c
@@ -147,7 +147,7 @@ int main(int argc, char *argv[])
"-c and -e options conflicts because both specifies the first read message.\n"
"\n"
"-e is useful only for -f because the following of journal starts by reading \n"
- "the entire journal if the last seen possition is not available.\n"
+ "the entire journal if the last seen position is not available.\n"
"\n"
"The last seen position is saved in %s\n"
"\n"
--
2.5.0

View File

@ -1,33 +0,0 @@
From a136d0c7b8aa72e7cf60e1255504191f1e9ac800 Mon Sep 17 00:00:00 2001
From: Matej Habrnal <mhabrnal@redhat.com>
Date: Tue, 16 Feb 2016 10:53:06 +0100
Subject: [PATCH] a-a-save-package-data: blacklist
/usr/lib(64)/firefox/plugin-container
/usr/lib(64)/firefox/plugin-container is a sandbox/launcher for Firefox
plug-ins. When it crases Firefox loads it again so we don't want those crashes
reported.
Related to: rhbz#1308840
Signed-off-by: Matej Habrnal <mhabrnal@redhat.com>
---
src/daemon/abrt-action-save-package-data.conf | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/daemon/abrt-action-save-package-data.conf b/src/daemon/abrt-action-save-package-data.conf
index 58f5061..f3a808f 100644
--- a/src/daemon/abrt-action-save-package-data.conf
+++ b/src/daemon/abrt-action-save-package-data.conf
@@ -15,7 +15,7 @@ ProcessUnpackaged = yes
# Blacklisted executable paths (shell patterns)
#
-BlackListedPaths = /usr/share/doc/*, */example*, /usr/bin/nspluginviewer
+BlackListedPaths = /usr/share/doc/*, */example*, /usr/bin/nspluginviewer, /usr/lib*/firefox/plugin-container
# interpreters names
Interpreters = python2, python2.7, python, python3, python3.3, python3.4, python3.5, perl, perl5.16.2
--
2.5.0

View File

@ -1,51 +0,0 @@
From 10a3ff45b150fe426624080abf903242af3ac201 Mon Sep 17 00:00:00 2001
From: Jakub Filak <jfilak@redhat.com>
Date: Tue, 23 Feb 2016 15:40:17 +0100
Subject: [PATCH] CCpp: turn off compat cores
Disable compat cores because with systemd>=229, RLIMIT_CORE is
'unlimited' by default and RLIMIT_CORE!=0 was the signal to create a
core file in the old way. So, abrt-ccpp-hook creates the old way cores
everywhere on file systems by default and users don't know about it
because they did not enable it manually via 'ulimit -c unlimited'.
We could restore the old RLIMIT_CORE value by creating a systemd
configuration file with 'DefaultLimitCORE=0' but that would not be a
good solution for our users:
* you have to reboot, otherwise the configuration has no effect
* and therefore it is impossible to set the new value when
abrt-ccpp.service is stopped and the users who expect
RTLIMIT_CORE='unlimited' would be confused
We should probably adopt the behaviour of systemd-coredump. However,
that means that abrtd must not drop any problem it receives and should
mark those problems that would be dropped as NOT-REPORTABLE to prevent
users from filing bug reports for unfixable problems.
Find more details at:
https://github.com/systemd/systemd/issues/2643
Signed-off-by: Jakub Filak <jfilak@redhat.com>
---
src/hooks/CCpp.conf | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/src/hooks/CCpp.conf b/src/hooks/CCpp.conf
index 025189a..edf66b7 100644
--- a/src/hooks/CCpp.conf
+++ b/src/hooks/CCpp.conf
@@ -7,7 +7,10 @@
# If the original template string starts with "|", the string "core" is used
# instead of the template.
# For more information about naming core dump files see 'man 5 core'.
-MakeCompatCore = yes
+#
+# 'no' because of RLIMIT_CORE='unlimited' since systemd-229:
+# https://github.com/systemd/systemd/issues/2643
+MakeCompatCore = no
# Do you want a copy of crashed binary be saved?
# (useful, for example, when _deleted binary_ segfaults)
--
2.5.0

View File

@ -1,34 +0,0 @@
From cc20fe4e6223c6d7092ba6c4b1bb2cf902e795b3 Mon Sep 17 00:00:00 2001
From: Jakub Filak <jfilak@redhat.com>
Date: Mon, 7 Mar 2016 15:21:14 +0100
Subject: [PATCH] python3 addon: workaround a bug in traceback
This commit re-enables the python3 exception handler for python >= 3.5
without it, no Python3 uncaught exceptions can be detected.
See the following Bugzilla bug for more details:
https://bugzilla.redhat.com/show_bug.cgi?id=1315228
Signed-off-by: Jakub Filak <jfilak@redhat.com>
---
src/hooks/abrt_exception_handler3.py.in | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/hooks/abrt_exception_handler3.py.in b/src/hooks/abrt_exception_handler3.py.in
index f45af86..2800975 100644
--- a/src/hooks/abrt_exception_handler3.py.in
+++ b/src/hooks/abrt_exception_handler3.py.in
@@ -173,8 +173,8 @@ def handle_exception(etype, value, tb):
if tb is not None and etype != IndentationError:
tblast = traceback.extract_tb(tb, limit=None)
- if len(tblast):
- tblast = tblast[len(tblast) - 1]
+ if tblast:
+ tblast = tuple(tblast[-1])
extxt = traceback.format_exception_only(etype, value)
if tblast and len(tblast) > 3:
ll = []
--
2.5.0

View File

@ -1,85 +0,0 @@
From a836ddd2277b05e1d7404cf6480a3ed8cc4807a4 Mon Sep 17 00:00:00 2001
From: Matej Habrnal <mhabrnal@redhat.com>
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 <mhabrnal@redhat.com>
---
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

View File

@ -1,49 +0,0 @@
From 2c48b73b5d449df26053d5d95f98f2ef01610d46 Mon Sep 17 00:00:00 2001
From: Matej Habrnal <mhabrnal@redhat.com>
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 <mhabrnal@redhat.com>
---
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

View File

@ -1,282 +0,0 @@
From 0020bf80cda35ee0ce0ecf91023f3abcc1c4d26d Mon Sep 17 00:00:00 2001
From: Jakub Filak <jfilak@redhat.com>
Date: Sat, 20 Feb 2016 08:27:32 +0100
Subject: [PATCH] Add basic documentation
Signed-off-by: Jakub Filak <jfilak@redhat.com>
---
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

View File

@ -1,232 +0,0 @@
From 451e57fc509f401bb586e7db88256923d47c38f7 Mon Sep 17 00:00:00 2001
From: Matej Habrnal <mhabrnal@redhat.com>
Date: Tue, 9 Feb 2016 16:53:21 +0100
Subject: [PATCH] Save Vendor and GPG Fingerprint
Red Hat keys can be found at:
https://access.redhat.com/security/team/key
Related: #1258474
---
src/daemon/abrt-action-save-package-data.c | 34 ++++++++++++++++++++-----
src/daemon/abrt-action-save-package-data.conf | 7 ++++++
src/daemon/rpm.c | 36 +++++++++++++++++++--------
src/daemon/rpm.h | 15 +++++++++++
src/plugins/abrt-action-save-kernel-data | 6 +++++
5 files changed, 82 insertions(+), 16 deletions(-)
diff --git a/src/daemon/abrt-action-save-package-data.c b/src/daemon/abrt-action-save-package-data.c
index 72c9878..05cbd1a 100644
--- a/src/daemon/abrt-action-save-package-data.c
+++ b/src/daemon/abrt-action-save-package-data.c
@@ -231,6 +231,7 @@ static int SavePackageDescriptionToDebugDump(const char *dump_dir_name, const ch
char *executable = NULL;
char *rootdir = NULL;
char *package_short_name = NULL;
+ char *fingerprint = NULL;
struct pkg_envra *pkg_name = NULL;
char *component = NULL;
int error = 1;
@@ -324,13 +325,12 @@ static int SavePackageDescriptionToDebugDump(const char *dump_dir_name, const ch
goto ret; /* return 1 (failure) */
}
- if (settings_bOpenGPGCheck)
+ fingerprint = rpm_get_fingerprint(package_short_name);
+ if (!(fingerprint != NULL && rpm_fingerprint_is_imported(fingerprint))
+ && settings_bOpenGPGCheck)
{
- if (!rpm_chk_fingerprint(package_short_name))
- {
- log("Package '%s' isn't signed with proper key", package_short_name);
- goto ret; /* return 1 (failure) */
- }
+ log("Package '%s' isn't signed with proper key", package_short_name);
+ goto ret; /* return 1 (failure) */
/* We used to also check the integrity of the executable here:
* if (!CheckHash(package_short_name.c_str(), executable)) BOOM();
* Checking the MD5 sum requires to run prelink to "un-prelink" the
@@ -353,6 +353,27 @@ static int SavePackageDescriptionToDebugDump(const char *dump_dir_name, const ch
dd_save_text(dd, FILENAME_PKG_VERSION, pkg_name->p_version);
dd_save_text(dd, FILENAME_PKG_RELEASE, pkg_name->p_release);
dd_save_text(dd, FILENAME_PKG_ARCH, pkg_name->p_arch);
+ dd_save_text(dd, FILENAME_PKG_VENDOR, pkg_name->p_vendor);
+
+ if (fingerprint)
+ {
+ /* 16 character + 3 spaces + 1 '\0' + 2 Bytes for errors :) */
+ char key_fingerprint[22] = {0};
+
+ /* The condition is just a defense against errors */
+ for (size_t i = 0, j = 0; j < sizeof(key_fingerprint) - 2; )
+ {
+ key_fingerprint[j++] = toupper(fingerprint[i++]);
+
+ if (fingerprint[i] == '\0')
+ break;
+
+ if (!(i & (0x3)))
+ key_fingerprint[j++] = ' ';
+ }
+
+ dd_save_text(dd, FILENAME_PKG_FINGERPRINT, key_fingerprint);
+ }
}
if (component)
@@ -369,6 +390,7 @@ static int SavePackageDescriptionToDebugDump(const char *dump_dir_name, const ch
free(package_short_name);
free_pkg_envra(pkg_name);
free(component);
+ free(fingerprint);
return error;
}
diff --git a/src/daemon/abrt-action-save-package-data.conf b/src/daemon/abrt-action-save-package-data.conf
index 58f5061..295e03a 100644
--- a/src/daemon/abrt-action-save-package-data.conf
+++ b/src/daemon/abrt-action-save-package-data.conf
@@ -3,6 +3,13 @@
# the list of public keys used to check the signature is
# in the file gpg_keys
#
+# How can I check the GPG key used to sign an installed pacakge on
+# Red hat Enterprise Linux:
+# https://access.redhat.com/solutions/1120013
+#
+# Product Signing (GPG) Keys:
+# https://access.redhat.com/security/team/key
+#
OpenGPGCheck = yes
# Blacklisted packages
diff --git a/src/daemon/rpm.c b/src/daemon/rpm.c
index b613f77..e99b960 100644
--- a/src/daemon/rpm.c
+++ b/src/daemon/rpm.c
@@ -99,7 +99,22 @@ void rpm_load_gpgkey(const char* filename)
int rpm_chk_fingerprint(const char* pkg)
{
- int ret = 0;
+ char *fingerprint = rpm_get_fingerprint(pkg);
+ int res = 0;
+ if (fingerprint)
+ res = rpm_fingerprint_is_imported(fingerprint);
+ free(fingerprint);
+ return res;
+}
+
+int rpm_fingerprint_is_imported(const char* fingerprint)
+{
+ return !!g_list_find_custom(list_fingerprints, fingerprint, (GCompareFunc)g_strcmp0);
+}
+
+char *rpm_get_fingerprint(const char *pkg)
+{
+ char *fingerprint = NULL;
char *pgpsig = NULL;
const char *errmsg = NULL;
@@ -117,20 +132,15 @@ int rpm_chk_fingerprint(const char* pkg)
goto error;
}
- {
- char *pgpsig_tmp = strstr(pgpsig, " Key ID ");
- if (pgpsig_tmp)
- {
- pgpsig_tmp += sizeof(" Key ID ") - 1;
- ret = g_list_find_custom(list_fingerprints, pgpsig_tmp, (GCompareFunc)g_strcmp0) != NULL;
- }
- }
+ char *pgpsig_tmp = strstr(pgpsig, " Key ID ");
+ if (pgpsig_tmp)
+ fingerprint = xstrdup(pgpsig_tmp + sizeof(" Key ID ") - 1);
error:
free(pgpsig);
rpmdbFreeIterator(iter);
rpmtsFree(ts);
- return ret;
+ return fingerprint;
}
/*
@@ -256,6 +266,7 @@ pkg_add_id(name);
pkg_add_id(version);
pkg_add_id(release);
pkg_add_id(arch);
+pkg_add_id(vendor);
// caller is responsible to free returned value
struct pkg_envra *rpm_get_package_nvr(const char *filename, const char *rootdir_or_NULL)
@@ -303,6 +314,10 @@ struct pkg_envra *rpm_get_package_nvr(const char *filename, const char *rootdir_
if (r)
goto error;
+ r = pkg_add_vendor(header, p);
+ if (r)
+ goto error;
+
p->p_nvr = xasprintf("%s-%s-%s", p->p_name, p->p_version, p->p_release);
rpmdbFreeIterator(iter);
@@ -322,6 +337,7 @@ void free_pkg_envra(struct pkg_envra *p)
if (!p)
return;
+ free(p->p_vendor);
free(p->p_epoch);
free(p->p_name);
free(p->p_version);
diff --git a/src/daemon/rpm.h b/src/daemon/rpm.h
index 1b90368..89aa088 100644
--- a/src/daemon/rpm.h
+++ b/src/daemon/rpm.h
@@ -38,6 +38,7 @@ struct pkg_envra {
char *p_version;
char *p_release;
char *p_arch;
+ char *p_vendor;
};
void free_pkg_envra(struct pkg_envra *p);
@@ -69,6 +70,20 @@ void rpm_load_gpgkey(const char* filename);
int rpm_chk_fingerprint(const char* pkg);
/**
+ * A function, which checks if the given finger print is imported.
+ * @param pkg A package name.
+ * @return 1 if imported, otherwise (not-imported, or error) 0
+ */
+int rpm_fingerprint_is_imported(const char* fingerprint);
+
+/**
+ * A function, which returns package's finger print
+ * @param pkg A package name.
+ * @return NULL if not-valid, otherwise malloced NULL-terminated string.
+ */
+char *rpm_get_fingerprint(const char* pkg);
+
+/**
* Gets a package name. This package contains particular
* file. If the file doesn't belong to any package, empty string is
* returned.
diff --git a/src/plugins/abrt-action-save-kernel-data b/src/plugins/abrt-action-save-kernel-data
index f8b18f0..de9670a 100755
--- a/src/plugins/abrt-action-save-kernel-data
+++ b/src/plugins/abrt-action-save-kernel-data
@@ -76,3 +76,9 @@ rpm --root $ROOT -q --qf "%{release}\n" "$package" > pkg_release
epoch="$( rpm --root $ROOT -q --qf "%{epoch}" "$package" )"
test "$epoch" = "(none)" && epoch=0
echo "$epoch" > pkg_epoch
+rpm -q --qf "%{vendor}\n" "$package" > pkg_vendor
+
+FINGERPRINT=$(rpm -q --qf "%|SIGGPG?{%{SIGGPG:pgpsig}}:{%{SIGPGP:pgpsig}}|" "$package" 2>/dev/null | tail -1)
+if [ -n "$FINGERPRINT" -a "_(none)" != "_$FINGERPRINT" ]; then
+ echo $FINGERPRINT | sed 's/.*Key ID \(....\)\(....\)\(....\)\(....\)$/\U\1 \U\2 \U\3 \U\4/' > pkg_fingerprint
+fi
--
2.5.5

View File

@ -43,13 +43,13 @@
%define docdirversion -%{version}
%endif
%define libreport_ver 2.7.0
%define libreport_ver 2.7.1
%define satyr_ver 0.19
Summary: Automatic bug detection and reporting tool
Name: abrt
Version: 2.8.0
Release: 5%{?dist}
Version: 2.8.1
Release: 1%{?dist}
License: GPLv2+
Group: Applications/System
URL: https://abrt.readthedocs.org/
@ -57,33 +57,6 @@ Source: https://fedorahosted.org/released/%{name}/%{name}-%{version}.tar.gz
# 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-ccpp-drop-e-from-the-core_pattern.patch
#Patch0002: 0002-translations-update-zanata-configuration.patch
Patch0003: 0003-Translation-updates.patch
Patch0004: 0004-translations-add-missing-new-line.patch
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-python3-addon-workaround-a-bug-in-traceback.patch
#Patch0010: 0010-testsuite-fix-ccpp-plugin-debug-test.patch
#Patch0011: 0011-testsuite-rlAssertRpm-doesn-t-work-with-abrt-addon.patch
Patch0012: 0012-a-a-install-debuginfo-make-tmpdir-variable-global.patch
Patch0013: 0013-a-a-install-debuginfo-fix-BrokenPipe-error.patch
Patch0014: 0014-Add-basic-documentation.patch
#Patch0015: 0015-spec-README-README.md.patch
#Patch0016: 0016-testsuite-compat-cores-add-include-to-the-loop.c-fil.patch
#Patch0017: 0017-testsuite-changes-due-to-turn-off-compat-cores.patch
#Patch0018: 0018-testsuite-yum-to-dnf.patch
#Patch0019: 0019-testsuite-avoid-unintentional-removal-of-package-man.patch
#Patch0020: 0020-testsuite-tell-the-runner-about-problem-sub-director.patch
Patch0021: 0021-Save-Vendor-and-GPG-Fingerprint.patch
#Patch0022: 0022-testsuite-add-tests-for-pgk_vendor-and-pkg_fingerpri.patch
#Patch0023: 0023-testsuite-add-rhtsupport-discourage-tests.patch
#Patch0024: 0024-testsuite-add-a-per-test-timeout-for-15m.patch
#Patch0025: 0025-testsuite-reporter-rhtsupport-should-attach-whole-du.patch
#Patch0026: 0026-testsuite-rhts-problem-report-api-correct-phase-test.patch
#Patch0027: 0027-testsuite-test-for-reporter-mailx-email-formatting.patch
# don't remove this patch, packages in rawhide are not signed!
Patch0: disable-OpenGPGCheck-in-Fedora-Rawhide.patch
@ -957,11 +930,9 @@ killall abrt-dbus >/dev/null 2>&1 || :
%{_bindir}/abrt-dump-oops
%{_bindir}/abrt-dump-journal-oops
%{_bindir}/abrt-action-analyze-oops
%{_bindir}/abrt-action-save-kernel-data
%{_mandir}/man1/abrt-dump-oops.1*
%{_mandir}/man1/abrt-dump-journal-oops.1*
%{_mandir}/man1/abrt-action-analyze-oops.1*
%{_mandir}/man1/abrt-action-save-kernel-data.1*
%{_mandir}/man5/abrt-oops.conf.5*
%files addon-xorg
@ -1114,6 +1085,23 @@ killall abrt-dbus >/dev/null 2>&1 || :
%config(noreplace) %{_sysconfdir}/profile.d/abrt-console-notification.sh
%changelog
* Wed May 25 2016 Matej Habrnal <mhabrnal@redhat.com> 2.8.1-1
- a-dump-journal-xorg: allow *libexec/X* to be executable element
- a-dump-journal-xorg: add '_COMM=gnome-shell' to journal filter
- build: update pkg names for systemd
- a-d-journal-core: save core dump bytes from the journal field
- a-d-journal-core: support lz4 compressed core dump files
- a-a-install-debuginfo: do not try to split None
- doc: improve documentation of AllowedGroups, AllowedUsers and IgnoredPaths
- testcase: add serial field to uReport check
- a-a-install-debuginfo: correct handling of DebuginfoLocation
- a-a-s-container-data: update docker container ID parser
- abrt-hook-ccpp: drop saving of container env vars
- a-console-notification: do not leak variables
- a-retrace-client: format security
- daemon: avoid infinite crash loops
- spec: drop abrt-action-save-kernel-data bits
* Fri Apr 08 2016 Matej Habrnal <mhabrnal@redhat.com> 2.8.0-5
- spec: README -> README.md
- Add basic documentation

View File

@ -1 +1 @@
ab0744ee52a36c0d647ae1af9a356090 abrt-2.8.0.tar.gz
2928780ccb430f0972cc50a33a956772 abrt-2.8.1.tar.gz