Compare commits

...
Sign in to create a new pull request.

11 commits

Author SHA1 Message Date
Matěj Grabovský
bdb580f2ca Use correct paths for installed Python modules
This patch is pulled from upstream.
2019-10-16 14:04:38 +02:00
Matěj Grabovský
2a9e14ca2d New upstream release 2.13.0
Signed-off-by: Matěj Grabovský <mgrabovs@redhat.com>
2019-10-11 16:35:11 +02:00
Ernestas Kulik
2e900184c4 Update to 2.12.2
Signed-off-by: Ernestas Kulik <ekulik@redhat.com>
2019-08-01 14:13:10 +02:00
Martin Kutlak
ba28be0b0f New upstream release version 2.12.1
* Remove gen-version from spec
- This is upstream script to generate version. This is not needed in dist-git.

[2.12.1]
Added
- Require dbus-tools for dbus-send command.

Changed
- ABRT won't process crashes coming from unpackaged applications by default.
- Completely removed support for Python2.
- Update new ABRT icon.
- retrace-client defaults to https.
- Updated man pages.
- Removed configurations from /usr/share/abrt.
- Removed provides for abrt-python packages.

Fixed
- Gracefully handle exceptions comming from abrt-action-generate-machine-id.
- Gracefully handle exceptions comming from abrt-action-install-debuginfo.
- Use correct name of environment variable for retrace-server.

Signed-off-by: Martin Kutlak <mkutlak@redhat.com>
2019-07-03 18:00:36 +02:00
Ernestas Kulik
a80913acdd Bump dependencies
Forgot to do that the first time.

Signed-off-by: Ernestas Kulik <ekulik@redhat.com>
2019-02-05 16:50:49 +01:00
Ernestas Kulik
a0a7c14959 Update to 2.12.0
Signed-off-by: Ernestas Kulik <ekulik@redhat.com>
2019-02-04 14:46:02 +01:00
Ernestas Kulik
49589fc28f Require git for building
Since we’re applying git patches, this is still needed.
2019-01-14 08:41:34 +01:00
Matej Marusak
609473ef01 Fix use after free in applet
Fixes BZ#1665521

Signed-off-by: Matej Marusak <mmarusak@redhat.com>
2019-01-12 12:56:34 +01:00
Matej Marusak
09dd0e2717 Update to work with new glib
Signed-off-by: Matej Marusak <mmarusak@redhat.com>
2019-01-08 14:43:58 +01:00
Matej Marusak
746f3887d6 New upstream release
Signed-off-by: Matej Marusak <mmarusak@redhat.com>
2019-01-08 14:43:45 +01:00
Martin Kutlak
582b311842 New upstream release 2.11.0
Signed-off-by: Martin Kutlak <mkutlak@redhat.com>
2018-10-08 15:40:16 +02:00
8 changed files with 325 additions and 611 deletions

6
.gitignore vendored
View file

@ -62,3 +62,9 @@ abrt-1.1.13.tar.gz
/abrt-2.10.8.tar.gz
/abrt-2.10.9.tar.gz
/abrt-2.10.10.tar.gz
/abrt-2.11.0.tar.gz
/abrt-2.11.1.tar.gz
/abrt-2.12.0.tar.gz
/abrt-2.12.1.tar.gz
/abrt-2.12.2.tar.gz
/abrt-2.13.0.tar.gz

View file

@ -1,133 +0,0 @@
From 94dc5d2783133cea27b1ae804d5b8a2da06808c5 Mon Sep 17 00:00:00 2001
From: Matej Habrnal <mhabrnal@redhat.com>
Date: Wed, 6 Jun 2018 14:04:09 +0200
Subject: [PATCH] ccpp: add %h and %e parameter into abrt-hook-ccpp
Without this commit core_pattern's parameter %h and %e was not
translated at all.
If there is a white space in executable filename, %e replaced only by
the first part of executable name (till the space). Hence we decided
to get executable name from /proc/PID/exe symlink exist.
Example:
If 'core_pattern = core.%h.%p.%t.%e' the result was
core.%h.26284.1469805542.sleep not
core.myshostmane.26284.1469805542.sleep with spaces
Related to #1587891
Signed-off-by: Matej Habrnal <mhabrnal@redhat.com>
---
src/hooks/abrt-hook-ccpp.c | 36 +++++++++++++++++++----------
src/hooks/abrt-install-ccpp-hook.in | 2 +-
2 files changed, 25 insertions(+), 13 deletions(-)
diff --git a/src/hooks/abrt-hook-ccpp.c b/src/hooks/abrt-hook-ccpp.c
index 1c4e45e5..40117fc8 100644
--- a/src/hooks/abrt-hook-ccpp.c
+++ b/src/hooks/abrt-hook-ccpp.c
@@ -65,13 +65,13 @@ static struct dump_dir *dd;
* %t - UNIX time of dump
* %P - global pid
* %I - crash thread tid
- * %e - executable filename (can contain white spaces)
+ * %h - hostname
+ * %e - executable filename (can contain white spaces, must be placed at the end)
* %% - output one "%"
*/
/* Hook must be installed with exactly the same sequence of %c specifiers.
- * Last one, %h, may be omitted (we can find it out).
*/
-static const char percent_specifiers[] = "%scpugtePi";
+static const char percent_specifiers[] = "%scpugtPIhe";
static char *core_basename = (char*) "core";
static DIR *open_cwd(pid_t pid)
@@ -146,7 +146,8 @@ static int setfscreatecon_raw(security_context_t context)
}
#endif
-static int open_user_core(uid_t uid, uid_t fsuid, gid_t fsgid, pid_t pid, char **percent_values)
+static int open_user_core(uid_t uid, uid_t fsuid, gid_t fsgid, pid_t pid,
+ char **percent_values, const char *executable_filename)
{
proc_cwd = open_cwd(pid);
if (proc_cwd == NULL)
@@ -196,7 +197,13 @@ static int open_user_core(uid_t uid, uid_t fsuid, gid_t fsgid, pid_t pid, char *
{
const char *val = "%";
if (specifier_num > 0) /* not %% */
+ {
val = percent_values[specifier_num - 1];
+ /* if %e (executable filename), use executable from
+ * /proc/PID/exe symlink if exists */
+ if (percent_specifiers[specifier_num] == 'e' && executable_filename)
+ val = executable_filename;
+ }
//log_warning("c:'%c'", c);
//log_warning("val:'%s'", val);
@@ -917,9 +924,9 @@ int main(int argc, char** argv)
if (argc < 8)
{
- /* 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]);
+ /* percent specifier: %s %c %p %u %g %t %P %I %h %e */
+ /* argv: [0] [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] */
+ error_msg_and_die("Usage: %s SIGNO CORE_SIZE_LIMIT PID UID GID TIME GLOBAL_PID GLOBAL_TID HOSTNAME BINARY_NAME", argv[0]);
}
/* Not needed on 2.6.30.
@@ -1016,13 +1023,21 @@ int main(int argc, char** argv)
snprintf(path, sizeof(path), "%s/last-ccpp", g_settings_dump_location);
+ char *executable = get_executable_at(pid_proc_fd);
+ const char *last_slash = NULL;
+ if (executable)
+ {
+ last_slash = strrchr(executable, '/');
+ /* if the last_slash was found, skip it */
+ if (last_slash) ++last_slash;
+ }
+
/* Open a fd to compat coredump, if requested and is possible */
int user_core_fd = -1;
if (setting_MakeCompatCore && ulimit_c != 0)
/* note: checks "user_pwd == NULL" inside; updates core_basename */
- user_core_fd = open_user_core(uid, fsuid, fsgid, pid, &argv[1]);
+ user_core_fd = open_user_core(uid, fsuid, fsgid, pid, &argv[1], (const char *)last_slash);
- char *executable = get_executable_at(pid_proc_fd);
if (executable == NULL)
{
/* readlink on /proc/$PID/exe failed, don't create abrt dump dir */
@@ -1031,9 +1046,6 @@ int main(int argc, char** argv)
return create_user_core(user_core_fd, pid, ulimit_c);
}
- const char *last_slash = strrchr(executable, '/');
- /* if the last_slash was found, skip it */
- if (last_slash) ++last_slash;
/* ignoring crashes */
if (executable && is_path_ignored(setting_ignored_paths, executable))
diff --git a/src/hooks/abrt-install-ccpp-hook.in b/src/hooks/abrt-install-ccpp-hook.in
index 660c2091..f8c0c610 100755
--- a/src/hooks/abrt-install-ccpp-hook.in
+++ b/src/hooks/abrt-install-ccpp-hook.in
@@ -11,7 +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 %P %I"
+PATTERN="|$HOOK_BIN %s %c %p %u %g %t %P %I %h %e"
# 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
--
2.19.0

View file

@ -1,62 +0,0 @@
From af51c51636eb0ca318e62d4c712f2ba3e60ed9b0 Mon Sep 17 00:00:00 2001
From: Martin Kutlak <mkutlak@redhat.com>
Date: Tue, 28 Aug 2018 10:26:47 +0200
Subject: [PATCH] gui: Replace deprecated g_type_class_add_private
g_type_class_add_private will be deprecated in Glib 2.58 [1].
There is a G_DEFINE_TYPE_WITH_PRIVATE macro that can replace
the deprecated function and it is backwards compatible [2].
[1] blog.gtk.org/2018/07/11/news-from-glib-2-58
[2] bassi.io/articles/2013/06/21/the-king-is-dead
Signed-off-by: Martin Kutlak <mkutlak@redhat.com>
---
src/configuration-gui/abrt-config-widget.c | 9 ++-------
1 file changed, 2 insertions(+), 7 deletions(-)
diff --git a/src/configuration-gui/abrt-config-widget.c b/src/configuration-gui/abrt-config-widget.c
index 62910db6..aa3b5c01 100644
--- a/src/configuration-gui/abrt-config-widget.c
+++ b/src/configuration-gui/abrt-config-widget.c
@@ -27,9 +27,6 @@
#include "libabrt.h"
#include <assert.h>
-#define ABRT_CONFIG_WIDGET_GET_PRIVATE(o) \
- (G_TYPE_INSTANCE_GET_PRIVATE((o), TYPE_ABRT_CONFIG_WIDGET, AbrtConfigWidgetPrivate))
-
#define WID(s) GTK_WIDGET(gtk_builder_get_object(self->priv->builder, s))
#define UI_FILE_NAME "abrt-config-widget.glade"
@@ -107,7 +104,7 @@ struct AbrtConfigWidgetPrivate {
AbrtConfigWidgetOption options[_ABRT_OPT_END_];
};
-G_DEFINE_TYPE(AbrtConfigWidget, abrt_config_widget, GTK_TYPE_BOX)
+G_DEFINE_TYPE_WITH_PRIVATE(AbrtConfigWidget, abrt_config_widget, GTK_TYPE_BOX)
enum {
SN_CHANGED,
@@ -214,8 +211,6 @@ abrt_config_widget_class_init(AbrtConfigWidgetClass *klass)
object_class->finalize = abrt_config_widget_finalize;
- g_type_class_add_private(klass, sizeof(AbrtConfigWidgetPrivate));
-
s_signals[SN_CHANGED] = g_signal_new ("changed",
G_TYPE_FROM_CLASS (klass),
G_SIGNAL_RUN_LAST,
@@ -413,7 +408,7 @@ abrt_config_widget_init(AbrtConfigWidget *self)
{
GError *error = NULL;
- self->priv = ABRT_CONFIG_WIDGET_GET_PRIVATE(self);
+ self->priv = abrt_config_widget_get_instance_private(self);
self->priv->builder = gtk_builder_new();
gtk_builder_set_translation_domain(self->priv->builder, GETTEXT_PACKAGE);
--
2.19.0

View file

@ -1,42 +0,0 @@
From 179843d3800f4dd66b143968792a81668a7b172a Mon Sep 17 00:00:00 2001
From: Jake Daryll Obina <jake.obina@gmail.com>
Date: Mon, 25 Jun 2018 11:52:11 +0800
Subject: [PATCH] harvest_vmcore: Fix missing argument error during
delete_and_close()
delete_and_close() requires a directory name argument and it is being called
without one. This argument is really not necessary though since the directory
name is already saved in the directory object (can be queried via the directory
object's name attribute), and it is the saved directory that is always deleted
regardless of the argument passed in.
Signed-off-by: Jake Daryll Obina <jake.obina@gmail.com>
---
src/hooks/abrt_harvest_vmcore.py.in | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/hooks/abrt_harvest_vmcore.py.in b/src/hooks/abrt_harvest_vmcore.py.in
index 7d4bba52..66c3ad37 100644
--- a/src/hooks/abrt_harvest_vmcore.py.in
+++ b/src/hooks/abrt_harvest_vmcore.py.in
@@ -128,13 +128,15 @@ def create_abrtd_info(dest, uuid):
return dd
-def delete_and_close(dd, dd_dirname):
+def delete_and_close(dd):
"""
Deletes the given dump directory and closes it.
dd - dump directory object
- dd_dirname - full path to dump directory
"""
+ # Save the directory name as the directory object could be destroyed during
+ # delete().
+ dd_dirname = dd.name
if not dd.delete() == 0:
sys.stderr.write("Unable to delete '%s'\n" % (dd_dirname))
return
--
2.19.0

View file

@ -1,41 +0,0 @@
From 057f8b0395a37765b856737cb25186c52b300389 Mon Sep 17 00:00:00 2001
From: Martin Kutlak <mkutlak@redhat.com>
Date: Tue, 24 Jul 2018 10:17:05 +0200
Subject: [PATCH] lib: Correct the syntax for gdb backtrace command
abrt-action-generate-backtrace generates backtraces with error message:
A syntax error in expression, near `full'.
According to the GDB documentation the correct syntax for backtrace
command is:
backtrace [n]
backtrace full [n]
- sourceware.org/gdb/onlinedocs/gdb/Backtrace.html
Signed-off-by: Martin Kutlak <mkutlak@redhat.com>
---
src/lib/hooklib.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/lib/hooklib.c b/src/lib/hooklib.c
index 135c7cde..b66fc119 100644
--- a/src/lib/hooklib.c
+++ b/src/lib/hooklib.c
@@ -353,11 +353,11 @@ char *get_backtrace(const char *dump_dir_name, unsigned timeout_sec, const char
/* Limit bt depth. With no limit, gdb sometimes OOMs the machine */
unsigned bt_depth = 1024;
const char *thread_apply_all = "thread apply all -ascending";
- const char *full = " full";
+ const char *full = "full ";
char *bt = NULL;
while (1)
{
- args[bt_cmd_index] = xasprintf("%s backtrace %u%s", thread_apply_all, bt_depth, full);
+ args[bt_cmd_index] = xasprintf("%s backtrace %s%u", thread_apply_all, full, bt_depth);
bt = exec_vp(args, /*redirect_stderr:*/ 1, timeout_sec, NULL);
free(args[bt_cmd_index]);
if ((bt && strnlen(bt, 256*1024) < 256*1024) || bt_depth <= 32)
--
2.19.0

View file

@ -0,0 +1,96 @@
From 57c0042ead87249bed5964eeec45b97543674060 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Mat=C4=9Bj=20Grabovsk=C3=BD?= <mgrabovs@redhat.com>
Date: Wed, 16 Oct 2019 11:27:54 +0200
Subject: [PATCH] python: Use correct paths for installed modules
Non-compiled (without C bits) Python modules should be installed into
architecture-independent directory (/usr/lib/python3.x/site-packages
in the case of Fedora).
This commit fixes both
* the spec file, where %{python3_sitelib} should be used rather than
%{python3_sitearch} which is to be used for compiled extensions; and
* the automake scripts, where $(pythondir) should be used in place of
$(pyexecdir) for the same reason.
This is a follow-up to 20dcf7fb4.
---
abrt.spec.in | 14 +++++++-------
src/cli/abrtcli/Makefile.am | 2 +-
src/cli/abrtcli/cli/Makefile.am | 2 +-
src/hooks/Makefile.am | 2 +-
4 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/abrt.spec.in b/abrt.spec.in
index 1c6c48ad..fe0b2278 100644
--- a/abrt.spec.in
+++ b/abrt.spec.in
@@ -935,14 +935,14 @@ killall abrt-dbus >/dev/null 2>&1 || :
%{_journalcatalogdir}/python3_abrt.catalog
%config(noreplace) %{_sysconfdir}/libreport/plugins/catalog_python3_format.conf
%{_mandir}/man5/python3_event.conf.5*
-%{python3_sitearch}/abrt3.pth
-%{python3_sitearch}/abrt_exception_handler3.py
-%{python3_sitearch}/__pycache__/abrt_exception_handler3.*
+%{python3_sitelib}/abrt3.pth
+%{python3_sitelib}/abrt_exception_handler3.py
+%{python3_sitelib}/__pycache__/abrt_exception_handler3.*
%files -n python3-abrt-container-addon
-%{python3_sitearch}/abrt3_container.pth
-%{python3_sitearch}/abrt_exception_handler3_container.py
-%{python3_sitearch}/__pycache__/abrt_exception_handler3_container.*
+%{python3_sitelib}/abrt3_container.pth
+%{python3_sitelib}/abrt_exception_handler3_container.py
+%{python3_sitelib}/__pycache__/abrt_exception_handler3_container.*
%endif # with python3
%files plugin-sosreport
@@ -959,7 +959,7 @@ killall abrt-dbus >/dev/null 2>&1 || :
%config(noreplace) %{_sysconfdir}/bash_completion.d/abrt.bash_completion
%{_bindir}/abrt
%{_bindir}/abrt-cli
-%{python3_sitearch}/abrtcli/
+%{python3_sitelib}/abrtcli/
%{_mandir}/man1/abrt.1*
%{_mandir}/man1/abrt-cli.1*
%endif # with python3
diff --git a/src/cli/abrtcli/Makefile.am b/src/cli/abrtcli/Makefile.am
index d11355a2..a599d0b5 100644
--- a/src/cli/abrtcli/Makefile.am
+++ b/src/cli/abrtcli/Makefile.am
@@ -9,7 +9,7 @@ PYFILES= \
utils.py
abrtcli_PYTHON = $(PYFILES)
-abrtclidir = $(pyexecdir)/abrtcli
+abrtclidir = $(pythondir)/abrtcli
config.py: config.py.in
sed -e s,\@LOCALE_DIR\@,$(localedir),g \
diff --git a/src/cli/abrtcli/cli/Makefile.am b/src/cli/abrtcli/cli/Makefile.am
index 17ff216b..c796074d 100644
--- a/src/cli/abrtcli/cli/Makefile.am
+++ b/src/cli/abrtcli/cli/Makefile.am
@@ -10,4 +10,4 @@ abrtclicommands_PYTHON = \
retrace.py \
status.py
-abrtclicommandsdir = $(pyexecdir)/abrtcli/cli
+abrtclicommandsdir = $(pythondir)/abrtcli/cli
diff --git a/src/hooks/Makefile.am b/src/hooks/Makefile.am
index 6e35887f..bdef0329 100644
--- a/src/hooks/Makefile.am
+++ b/src/hooks/Makefile.am
@@ -35,7 +35,7 @@ EXTRA_DIST = \
ALL_DEPENDENCES =
if BUILD_PYTHON3
-py3hookdir = $(pyexecdir)
+py3hookdir = $(pythondir)
dist_pluginsconf_DATA += python3.conf
ALL_DEPENDENCES += abrt_exception_handler3.py
--
2.21.0

554
abrt.spec

File diff suppressed because it is too large Load diff

View file

@ -1 +1 @@
SHA512 (abrt-2.10.10.tar.gz) = 1a9183346257bde09d69b2da032472d16661637124635e4959f47d1ec3272b550651f584e6e2c16893b25b906458c86379c3ee6cdbd1cba025bc9a71018048df
SHA512 (abrt-2.13.0.tar.gz) = 936c83293dcb71051b8dd89e84718cf0f76c7d7998b414a2c41d43b8e2a4dc6718f42d8fd47186bd15bac3ea06081f411ab3a7ed3729343da9e6e91edb046568