import abrt-2.10.9-10.el8
This commit is contained in:
commit
5c4e77a87d
1
.abrt.metadata
Normal file
1
.abrt.metadata
Normal file
@ -0,0 +1 @@
|
|||||||
|
8447e6b5d2604815a4156e891936a4c76316f3f4 SOURCES/abrt-2.10.9.tar.gz
|
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
SOURCES/abrt-2.10.9.tar.gz
|
155
SOURCES/0001-Remove-dependency-on-deprecated-nss-pem.patch
Normal file
155
SOURCES/0001-Remove-dependency-on-deprecated-nss-pem.patch
Normal file
@ -0,0 +1,155 @@
|
|||||||
|
From b9005f1a69ad989a50ffa68a41c959551f0cb158 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Matej Habrnal <mhabrnal@redhat.com>
|
||||||
|
Date: Wed, 23 May 2018 11:15:38 +0200
|
||||||
|
Subject: [PATCH 1/1] Remove dependency on deprecated nss-pem
|
||||||
|
|
||||||
|
This commit removes dependency on nss-pem which is deprecated and
|
||||||
|
reimplements TLS client to use libnssckbi.so instead [1].
|
||||||
|
|
||||||
|
Resolves #1578427
|
||||||
|
|
||||||
|
[1] https://docs-old.fedoraproject.org/en-US/Fedora_Security_Team/1/html/Defensive_Coding/sect-Defensive_Coding-TLS-Client-NSS.html#ex-Defensive_Coding-TLS-NSS-Init
|
||||||
|
|
||||||
|
Signed-off-by: Matej Habrnal <mhabrnal@redhat.com>
|
||||||
|
---
|
||||||
|
abrt.spec.in | 2 +-
|
||||||
|
src/plugins/abrt-retrace-client.c | 5 ++-
|
||||||
|
src/plugins/https-utils.c | 53 ++++++-------------------------
|
||||||
|
src/plugins/https-utils.h | 4 +--
|
||||||
|
4 files changed, 15 insertions(+), 49 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/abrt.spec.in b/abrt.spec.in
|
||||||
|
index f423562c..eb6fdaf9 100644
|
||||||
|
--- a/abrt.spec.in
|
||||||
|
+++ b/abrt.spec.in
|
||||||
|
@@ -255,7 +255,7 @@ Summary: %{name}'s retrace client
|
||||||
|
Requires: %{name} = %{version}-%{release}
|
||||||
|
Requires: xz
|
||||||
|
Requires: tar
|
||||||
|
-Requires: nss-pem
|
||||||
|
+Requires: p11-kit-trust
|
||||||
|
|
||||||
|
%description retrace-client
|
||||||
|
This package contains the client application for Retrace server
|
||||||
|
diff --git a/src/plugins/abrt-retrace-client.c b/src/plugins/abrt-retrace-client.c
|
||||||
|
index ae5ef83b..d50d45fb 100644
|
||||||
|
--- a/src/plugins/abrt-retrace-client.c
|
||||||
|
+++ b/src/plugins/abrt-retrace-client.c
|
||||||
|
@@ -1281,8 +1281,7 @@ int main(int argc, char **argv)
|
||||||
|
|
||||||
|
/* Initialize NSS */
|
||||||
|
SECMODModule *mod;
|
||||||
|
- PK11GenericObject *cert;
|
||||||
|
- nss_init(&mod, &cert);
|
||||||
|
+ nss_init(&mod);
|
||||||
|
|
||||||
|
/* Run the desired operation. */
|
||||||
|
int result = 0;
|
||||||
|
@@ -1334,7 +1333,7 @@ int main(int argc, char **argv)
|
||||||
|
error_msg_and_die(_("Unknown operation: %s."), operation);
|
||||||
|
|
||||||
|
/* Shutdown NSS. */
|
||||||
|
- nss_close(mod, cert);
|
||||||
|
+ nss_close(mod);
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
diff --git a/src/plugins/https-utils.c b/src/plugins/https-utils.c
|
||||||
|
index 7a22729b..7a9479ca 100644
|
||||||
|
--- a/src/plugins/https-utils.c
|
||||||
|
+++ b/src/plugins/https-utils.c
|
||||||
|
@@ -142,37 +142,6 @@ static const char *ssl_get_configdir()
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
-static PK11GenericObject *nss_load_cacert(const char *filename)
|
||||||
|
-{
|
||||||
|
- PK11SlotInfo *slot = PK11_FindSlotByName("PEM Token #0");
|
||||||
|
- if (!slot)
|
||||||
|
- error_msg_and_die(_("Failed to get slot 'PEM Token #0': %d."), PORT_GetError());
|
||||||
|
-
|
||||||
|
- CK_ATTRIBUTE template[4];
|
||||||
|
- CK_OBJECT_CLASS class = CKO_CERTIFICATE;
|
||||||
|
-
|
||||||
|
-#define PK11_SETATTRS(x,id,v,l) \
|
||||||
|
- do { \
|
||||||
|
- (x)->type = (id); \
|
||||||
|
- (x)->pValue=(v); \
|
||||||
|
- (x)->ulValueLen = (l); \
|
||||||
|
- } while (0)
|
||||||
|
-
|
||||||
|
- PK11_SETATTRS(&template[0], CKA_CLASS, &class, sizeof(class));
|
||||||
|
- CK_BBOOL cktrue = CK_TRUE;
|
||||||
|
- PK11_SETATTRS(&template[1], CKA_TOKEN, &cktrue, sizeof(CK_BBOOL));
|
||||||
|
- PK11_SETATTRS(&template[2], CKA_LABEL, (unsigned char*)filename, strlen(filename)+1);
|
||||||
|
- PK11_SETATTRS(&template[3], CKA_TRUST, &cktrue, sizeof(CK_BBOOL));
|
||||||
|
- PK11GenericObject *cert = PK11_CreateGenericObject(slot, template, 4, PR_FALSE);
|
||||||
|
- PK11_FreeSlot(slot);
|
||||||
|
- return cert;
|
||||||
|
-}
|
||||||
|
-
|
||||||
|
-static char *ssl_get_password(PK11SlotInfo *slot, PRBool retry, void *arg)
|
||||||
|
-{
|
||||||
|
- return NULL;
|
||||||
|
-}
|
||||||
|
-
|
||||||
|
void ssl_connect(struct https_cfg *cfg, PRFileDesc **tcp_sock, PRFileDesc **ssl_sock)
|
||||||
|
{
|
||||||
|
PRAddrInfo *addrinfo = PR_GetAddrInfoByName(cfg->url, PR_AF_UNSPEC, PR_AI_ADDRCONFIG);
|
||||||
|
@@ -411,7 +380,7 @@ char *http_join_chunked(char *body, int bodylen)
|
||||||
|
return strbuf_free_nobuf(result);
|
||||||
|
}
|
||||||
|
|
||||||
|
-void nss_init(SECMODModule **mod, PK11GenericObject **cert)
|
||||||
|
+void nss_init(SECMODModule **mod)
|
||||||
|
{
|
||||||
|
SECStatus sec_status;
|
||||||
|
const char *configdir = ssl_get_configdir();
|
||||||
|
@@ -422,21 +391,19 @@ void nss_init(SECMODModule **mod, PK11GenericObject **cert)
|
||||||
|
if (SECSuccess != sec_status)
|
||||||
|
error_msg_and_die(_("Failed to initialize NSS."));
|
||||||
|
|
||||||
|
- char *user_module = xstrdup("library=libnsspem.so name=PEM");
|
||||||
|
- *mod = SECMOD_LoadUserModule(user_module, NULL, PR_FALSE);
|
||||||
|
- free(user_module);
|
||||||
|
- if (!*mod || !(*mod)->loaded)
|
||||||
|
- error_msg_and_die(_("Failed to initialize security module."));
|
||||||
|
-
|
||||||
|
- *cert = nss_load_cacert("/etc/pki/tls/certs/ca-bundle.crt");
|
||||||
|
- PK11_SetPasswordFunc(ssl_get_password);
|
||||||
|
- NSS_SetDomesticPolicy();
|
||||||
|
+ // Initialize the trusted certificate store.
|
||||||
|
+ char module_name[] = "library=libnssckbi.so name=\"Root Certs\"";
|
||||||
|
+ *mod = SECMOD_LoadUserModule(module_name, NULL, PR_FALSE);
|
||||||
|
+ if (*mod == NULL || !(*mod)->loaded)
|
||||||
|
+ {
|
||||||
|
+ const PRErrorCode err = PR_GetError();
|
||||||
|
+ error_msg_and_die("error: NSPR error code %d: %s\n", err, PR_ErrorToName(err));
|
||||||
|
+ }
|
||||||
|
}
|
||||||
|
|
||||||
|
-void nss_close(SECMODModule *mod, PK11GenericObject *cert)
|
||||||
|
+void nss_close(SECMODModule *mod)
|
||||||
|
{
|
||||||
|
SSL_ClearSessionCache();
|
||||||
|
- PK11_DestroyGenericObject(cert);
|
||||||
|
SECMOD_UnloadUserModule(mod);
|
||||||
|
SECMOD_DestroyModule(mod);
|
||||||
|
SECStatus sec_status = NSS_Shutdown();
|
||||||
|
diff --git a/src/plugins/https-utils.h b/src/plugins/https-utils.h
|
||||||
|
index 8ff9aede..f0b167d3 100644
|
||||||
|
--- a/src/plugins/https-utils.h
|
||||||
|
+++ b/src/plugins/https-utils.h
|
||||||
|
@@ -61,7 +61,7 @@ int http_get_response_code(const char *message);
|
||||||
|
void http_print_headers(FILE *file, const char *message);
|
||||||
|
char *tcp_read_response(PRFileDesc *tcp_sock);
|
||||||
|
char *http_join_chunked(char *body, int bodylen);
|
||||||
|
-void nss_init(SECMODModule **mod, PK11GenericObject **cert);
|
||||||
|
-void nss_close(SECMODModule *mod, PK11GenericObject *cert);
|
||||||
|
+void nss_init(SECMODModule **mod);
|
||||||
|
+void nss_close(SECMODModule *mod);
|
||||||
|
|
||||||
|
#endif
|
||||||
|
--
|
||||||
|
2.17.0
|
||||||
|
|
@ -0,0 +1,133 @@
|
|||||||
|
From a8a22295837aaadf39bfede6c92e9f9047bcaa34 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 1c4e45e..40117fc 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 660c209..f8c0c61 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
|
||||||
|
--
|
||||||
|
1.8.3.1
|
||||||
|
|
@ -0,0 +1,41 @@
|
|||||||
|
From 7e9e07dc9ce67777a201beddc8cef32f08293a2b 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.17.2
|
||||||
|
|
60
SOURCES/0024-dbus-Add-configuration-for-Python3.patch
Normal file
60
SOURCES/0024-dbus-Add-configuration-for-Python3.patch
Normal file
@ -0,0 +1,60 @@
|
|||||||
|
From d5c53fefd25ef90ece1d3481c9af1552d458eb97 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Martin Kutlak <mkutlak@redhat.com>
|
||||||
|
Date: Tue, 25 Sep 2018 13:28:24 +0200
|
||||||
|
Subject: [PATCH] dbus: Add configuration for Python3
|
||||||
|
|
||||||
|
abrt-dbus misses a configuration file for Python3 and it instead includes Python2 configuration.
|
||||||
|
|
||||||
|
Related: #1652676
|
||||||
|
|
||||||
|
Signed-off-by: Martin Kutlak <mkutlak@redhat.com>
|
||||||
|
---
|
||||||
|
doc/dbus-configuration/Makefile.am | 11 ++++++++++-
|
||||||
|
.../com.redhat.problems.configuration.python3.xml.in | 11 +++++++++++
|
||||||
|
3 files changed, 26 insertions(+), 1 deletion(-)
|
||||||
|
create mode 100644 doc/dbus-configuration/com.redhat.problems.configuration.python3.xml.in
|
||||||
|
|
||||||
|
diff --git a/doc/dbus-configuration/Makefile.am b/doc/dbus-configuration/Makefile.am
|
||||||
|
index 889713943..a02706de9 100644
|
||||||
|
--- a/doc/dbus-configuration/Makefile.am
|
||||||
|
+++ b/doc/dbus-configuration/Makefile.am
|
||||||
|
@@ -9,9 +9,18 @@ dist_dbusabrtinterfaces_DATA = \
|
||||||
|
com.redhat.problems.configuration.abrt.xml \
|
||||||
|
com.redhat.problems.configuration.ccpp.xml \
|
||||||
|
com.redhat.problems.configuration.oops.xml \
|
||||||
|
- com.redhat.problems.configuration.python.xml \
|
||||||
|
com.redhat.problems.configuration.xorg.xml
|
||||||
|
|
||||||
|
+if BUILD_PYTHON2
|
||||||
|
+dist_dbusabrtinterfaces_DATA += \
|
||||||
|
+ com.redhat.problems.configuration.python.xml
|
||||||
|
+endif
|
||||||
|
+
|
||||||
|
+if BUILD_PYTHON3
|
||||||
|
+dist_dbusabrtinterfaces_DATA += \
|
||||||
|
+ com.redhat.problems.configuration.python3.xml
|
||||||
|
+endif
|
||||||
|
+
|
||||||
|
if BUILD_ADDON_VMCORE
|
||||||
|
dist_dbusabrtinterfaces_DATA += \
|
||||||
|
com.redhat.problems.configuration.vmcore.xml
|
||||||
|
diff --git a/doc/dbus-configuration/com.redhat.problems.configuration.python3.xml.in b/doc/dbus-configuration/com.redhat.problems.configuration.python3.xml.in
|
||||||
|
new file mode 100644
|
||||||
|
index 000000000..68b6760b2
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/doc/dbus-configuration/com.redhat.problems.configuration.python3.xml.in
|
||||||
|
@@ -0,0 +1,11 @@
|
||||||
|
+<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN"
|
||||||
|
+ "http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
|
||||||
|
+
|
||||||
|
+<node name="/com/redhat/problems/configuration/python3">
|
||||||
|
+ <annotation name="com.redhat.problems.ConfFile" value="/etc/abrt/plugins/python3.conf" />
|
||||||
|
+ <annotation name="com.redhat.problems.DefaultConfFile" value="/usr/share/abrt/conf.d/plugins/python3.conf" />
|
||||||
|
+
|
||||||
|
+ <interface name="com.redhat.problems.configuration.python3">
|
||||||
|
+ <property name="RequireAbsolutePath" type="b" access="readwrite" />
|
||||||
|
+ </interface>
|
||||||
|
+</node>
|
||||||
|
--
|
||||||
|
2.17.2
|
||||||
|
|
@ -0,0 +1,62 @@
|
|||||||
|
From b2ec373cfec2dd6a39acfd91ea1a67618ee209ac Mon Sep 17 00:00:00 2001
|
||||||
|
From: Martin Kutlak <mkutlak@redhat.com>
|
||||||
|
Date: Tue, 20 Nov 2018 19:03:55 +0100
|
||||||
|
Subject: [PATCH] daemon: Fix double closed fd race condition
|
||||||
|
|
||||||
|
When a communication channel is set up between abrtd and abrt-server it uses
|
||||||
|
abrt_gio_channel_unix_new(). In that function there is a call g_io_channel_set_close_on_unref() [1].
|
||||||
|
This function sets whether to close a file/socket/whatever associated with the channel when channel
|
||||||
|
recieves a final unref and is to be destroyed.
|
||||||
|
|
||||||
|
Calling a close() on fd associated with the channel before/after g_io_channel_unref()
|
||||||
|
created a double close() race condition when ABRT was processing a lot of crashes at the same time.
|
||||||
|
|
||||||
|
Thank you benzea for the patch.
|
||||||
|
|
||||||
|
Related BZ#1650622
|
||||||
|
|
||||||
|
1 - https://developer.gnome.org/glib/stable/glib-IO-Channels.html#g-io-channel-get-close-on-unref
|
||||||
|
|
||||||
|
Signed-off-by: Martin Kutlak <mkutlak@redhat.com>
|
||||||
|
---
|
||||||
|
src/daemon/abrt-server.c | 1 -
|
||||||
|
src/daemon/abrtd.c | 4 +---
|
||||||
|
2 files changed, 1 insertion(+), 4 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/src/daemon/abrt-server.c b/src/daemon/abrt-server.c
|
||||||
|
index 692ccee38..90068069d 100644
|
||||||
|
--- a/src/daemon/abrt-server.c
|
||||||
|
+++ b/src/daemon/abrt-server.c
|
||||||
|
@@ -364,7 +364,6 @@ static int run_post_create(const char *dirname, struct response *resp)
|
||||||
|
g_main_loop_unref(context.main_loop);
|
||||||
|
g_io_channel_unref(channel_signal);
|
||||||
|
close(g_signal_pipe[1]);
|
||||||
|
- close(g_signal_pipe[0]);
|
||||||
|
|
||||||
|
log_notice("Waiting finished");
|
||||||
|
|
||||||
|
diff --git a/src/daemon/abrtd.c b/src/daemon/abrtd.c
|
||||||
|
index 32753966b..fefb2e9c9 100644
|
||||||
|
--- a/src/daemon/abrtd.c
|
||||||
|
+++ b/src/daemon/abrtd.c
|
||||||
|
@@ -114,7 +114,6 @@ static void stop_abrt_server(struct abrt_server_proc *proc)
|
||||||
|
|
||||||
|
static void dispose_abrt_server(struct abrt_server_proc *proc)
|
||||||
|
{
|
||||||
|
- close(proc->fdout);
|
||||||
|
free(proc->dirname);
|
||||||
|
|
||||||
|
if (proc->watch_id > 0)
|
||||||
|
@@ -231,8 +230,7 @@ static gboolean abrt_server_output_cb(GIOChannel *channel, GIOCondition conditio
|
||||||
|
GList *item = g_list_find_custom(s_processes, &fdout, (GCompareFunc)abrt_server_compare_fdout);
|
||||||
|
if (item == NULL)
|
||||||
|
{
|
||||||
|
- log_warning("Closing a pipe fd (%d) without a process assigned", fdout);
|
||||||
|
- close(fdout);
|
||||||
|
+ log_warning("Removing an input channel fd (%d) without a process assigned", fdout);
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
--
|
||||||
|
2.17.2
|
||||||
|
|
@ -0,0 +1,116 @@
|
|||||||
|
From 16b6963ef5e37805d2587684f90d2c6d5dd4ffdc Mon Sep 17 00:00:00 2001
|
||||||
|
From: Jakub Filak <jfilak@redhat.com>
|
||||||
|
Date: Thu, 6 Dec 2018 17:57:59 +0100
|
||||||
|
Subject: [PATCH] cli list: show a hint about creating a case in RHTS
|
||||||
|
|
||||||
|
Adds "Run 'abrt-cli report ...' for creating a case in Red Hat Customer Portal" to
|
||||||
|
abrt-cli list output.
|
||||||
|
|
||||||
|
Resolves: #1649753
|
||||||
|
|
||||||
|
(cherry-picked from 7966e5737e8d3af43b1ecdd6a823234b8d25931d)
|
||||||
|
|
||||||
|
Signed-off-by: Jakub Filak <jfilak@redhat.com>
|
||||||
|
---
|
||||||
|
configure.ac | 2 ++
|
||||||
|
src/cli/Makefile.am | 3 ++-
|
||||||
|
src/cli/list.c | 49 +++++++++++++++++++++++++++++++++++++++++++++
|
||||||
|
3 files changed, 53 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/configure.ac b/configure.ac
|
||||||
|
index 76e0f274b..5d70bb9a8 100644
|
||||||
|
--- a/configure.ac
|
||||||
|
+++ b/configure.ac
|
||||||
|
@@ -246,6 +246,7 @@ DEFAULT_PLUGINS_CONF_DIR='${datadir}/${PACKAGE_NAME}/conf.d/plugins'
|
||||||
|
EVENTS_DIR='${datadir}/libreport/events'
|
||||||
|
EVENTS_CONF_DIR='${sysconfdir}/libreport/events.d'
|
||||||
|
JOURNAL_CATALOG_DIR='$(prefix)/lib/systemd/catalog'
|
||||||
|
+WORKFLOWS_DIR='${datadir}/libreport/workflows'
|
||||||
|
ENABLE_SOCKET_OR_DBUS='-DENABLE_DBUS=1'
|
||||||
|
DEFAULT_DUMP_LOCATION_MODE=0751
|
||||||
|
DEFAULT_DUMP_DIR_MODE=$($PKG_CONFIG --variable=dd_mode libreport)
|
||||||
|
@@ -389,6 +390,7 @@ AC_SUBST(PLUGINS_CONF_DIR)
|
||||||
|
AC_SUBST(DEFAULT_PLUGINS_CONF_DIR)
|
||||||
|
AC_SUBST(EVENTS_CONF_DIR)
|
||||||
|
AC_SUBST(JOURNAL_CATALOG_DIR)
|
||||||
|
+AC_SUBST(WORKFLOWS_DIR)
|
||||||
|
AC_SUBST(EVENTS_DIR)
|
||||||
|
AC_SUBST(DEFAULT_DUMP_LOCATION)
|
||||||
|
AC_SUBST(DEFAULT_DUMP_LOCATION_MODE)
|
||||||
|
diff --git a/src/cli/Makefile.am b/src/cli/Makefile.am
|
||||||
|
index 92dc20ab4..a7c76efa3 100644
|
||||||
|
--- a/src/cli/Makefile.am
|
||||||
|
+++ b/src/cli/Makefile.am
|
||||||
|
@@ -17,7 +17,8 @@ abrt_cli_CFLAGS = \
|
||||||
|
-I$(srcdir)/../include \
|
||||||
|
-I$(srcdir)/../lib \
|
||||||
|
$(LIBREPORT_CFLAGS) \
|
||||||
|
- $(POLKIT_AGENT_CFLAGS)
|
||||||
|
+ $(POLKIT_AGENT_CFLAGS) \
|
||||||
|
+ -DWORKFLOWS_DIR=\"${WORKFLOWS_DIR}\"
|
||||||
|
|
||||||
|
if SUGGEST_AUTOREPORTING
|
||||||
|
abrt_cli_CFLAGS += -DSUGGEST_AUTOREPORTING=1
|
||||||
|
diff --git a/src/cli/list.c b/src/cli/list.c
|
||||||
|
index d069695c6..2c140cb38 100644
|
||||||
|
--- a/src/cli/list.c
|
||||||
|
+++ b/src/cli/list.c
|
||||||
|
@@ -77,6 +77,55 @@ static void print_crash(problem_data_t *problem_data, int detailed, int text_siz
|
||||||
|
/*names_to_skip:*/ NULL,
|
||||||
|
/*max_text_size:*/ text_size,
|
||||||
|
MAKEDESC_SHOW_ONLY_LIST | MAKEDESC_SHOW_URLS);
|
||||||
|
+
|
||||||
|
+ /*
|
||||||
|
+ * If the problem is reportable and has not yet been reported into RHTS
|
||||||
|
+ * and there is at least one applicable Workflow which contains
|
||||||
|
+ * 'report_RHTSupport' event, then append a short message informing
|
||||||
|
+ * user that he can create a new case in Red Hat Customer Portal.
|
||||||
|
+ */
|
||||||
|
+ const char *const not_reportable = problem_data_get_content_or_NULL(problem_data, FILENAME_NOT_REPORTABLE);
|
||||||
|
+ const char *const reported_to = not_reportable ? NULL : problem_data_get_content_or_NULL(problem_data, FILENAME_REPORTED_TO);
|
||||||
|
+ report_result_t *const report = !reported_to ? NULL : find_in_reported_to_data(reported_to, "RHTSupport");
|
||||||
|
+
|
||||||
|
+ if (!not_reportable && !report)
|
||||||
|
+ {
|
||||||
|
+ /* The lines below should be replaced by something simpler, I'd
|
||||||
|
+ * like to see:
|
||||||
|
+ * GHashTable *possible_worfklows = load_applicable_workflows_for_dump();
|
||||||
|
+ *
|
||||||
|
+ * However, this feature (rhbz#1055565) is intended for RHEL only
|
||||||
|
+ * and I'm not sure whether it's worth to file another bug against
|
||||||
|
+ * libreport and try to improve libreport public API.
|
||||||
|
+ */
|
||||||
|
+ const char *const dump_dir_name = problem_data_get_content_or_NULL(problem_data, CD_DUMPDIR);
|
||||||
|
+ GList *const wf_names = list_possible_events_glist(dump_dir_name, "workflow");
|
||||||
|
+ GHashTable *const possible_workflows = load_workflow_config_data_from_list(wf_names, WORKFLOWS_DIR);
|
||||||
|
+ g_list_free_full(wf_names, free);
|
||||||
|
+
|
||||||
|
+ int event_found = 0;
|
||||||
|
+
|
||||||
|
+ GHashTableIter iter;
|
||||||
|
+ gpointer key = NULL;
|
||||||
|
+ gpointer value = NULL;
|
||||||
|
+
|
||||||
|
+ g_hash_table_iter_init(&iter, possible_workflows);
|
||||||
|
+ while (!event_found && g_hash_table_iter_next(&iter, &key, &value))
|
||||||
|
+ {
|
||||||
|
+ GList *const event_names = wf_get_event_names((workflow_t *)value);
|
||||||
|
+ event_found = !!g_list_find_custom(event_names, "report_RHTSupport", (GCompareFunc)g_strcmp0);
|
||||||
|
+ g_list_free_full(event_names, free);
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ g_hash_table_destroy(possible_workflows);
|
||||||
|
+
|
||||||
|
+ if (event_found)
|
||||||
|
+ {
|
||||||
|
+ char *tmp = xasprintf("%sRun 'abrt-cli report %s' for creating a case in Red Hat Customer Portal\n", desc, dump_dir_name);
|
||||||
|
+ free(desc);
|
||||||
|
+ desc = tmp;
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
}
|
||||||
|
fputs(desc, stdout);
|
||||||
|
free(desc);
|
||||||
|
--
|
||||||
|
2.17.2
|
||||||
|
|
@ -0,0 +1,28 @@
|
|||||||
|
From c0aa44a93bfdc701839d2c70568224521a6d5c5b Mon Sep 17 00:00:00 2001
|
||||||
|
From: Jakub Filak <jfilak@redhat.com>
|
||||||
|
Date: Thu, 6 Dec 2018 18:00:45 +0100
|
||||||
|
Subject: [PATCH] cli: mark the suggestion text for translation
|
||||||
|
|
||||||
|
(cherry-picked from 187530c4df6971927d1e099584be5b418ab2725b)
|
||||||
|
|
||||||
|
Signed-off-by: Jakub Filak <jfilak@redhat.com>
|
||||||
|
---
|
||||||
|
src/cli/list.c | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/src/cli/list.c b/src/cli/list.c
|
||||||
|
index 2c140cb38..f16ce8c0d 100644
|
||||||
|
--- a/src/cli/list.c
|
||||||
|
+++ b/src/cli/list.c
|
||||||
|
@@ -121,7 +121,7 @@ static void print_crash(problem_data_t *problem_data, int detailed, int text_siz
|
||||||
|
|
||||||
|
if (event_found)
|
||||||
|
{
|
||||||
|
- char *tmp = xasprintf("%sRun 'abrt-cli report %s' for creating a case in Red Hat Customer Portal\n", desc, dump_dir_name);
|
||||||
|
+ char *tmp = xasprintf(_("%sRun 'abrt-cli report %s' for creating a case in Red Hat Customer Portal\n"), desc, dump_dir_name);
|
||||||
|
free(desc);
|
||||||
|
desc = tmp;
|
||||||
|
}
|
||||||
|
--
|
||||||
|
2.17.2
|
||||||
|
|
@ -0,0 +1,31 @@
|
|||||||
|
From 58dcdd2f2780263e79a82ecebb27b000b0583979 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Jakub Filak <jfilak@redhat.com>
|
||||||
|
Date: Thu, 6 Dec 2018 18:01:13 +0100
|
||||||
|
Subject: [PATCH] cli: get list of possible workflows for problem_data_t
|
||||||
|
|
||||||
|
File system access is not possible, so we have to rely on the data
|
||||||
|
transfered via D-Bus.
|
||||||
|
|
||||||
|
(cherry-picked from f2055f8c6469b590172d94e9ea530243af89f028)
|
||||||
|
|
||||||
|
Signed-off-by: Jakub Filak <jfilak@redhat.com>
|
||||||
|
---
|
||||||
|
src/cli/list.c | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/src/cli/list.c b/src/cli/list.c
|
||||||
|
index f16ce8c0d..e688d2f49 100644
|
||||||
|
--- a/src/cli/list.c
|
||||||
|
+++ b/src/cli/list.c
|
||||||
|
@@ -99,7 +99,7 @@ static void print_crash(problem_data_t *problem_data, int detailed, int text_siz
|
||||||
|
* libreport and try to improve libreport public API.
|
||||||
|
*/
|
||||||
|
const char *const dump_dir_name = problem_data_get_content_or_NULL(problem_data, CD_DUMPDIR);
|
||||||
|
- GList *const wf_names = list_possible_events_glist(dump_dir_name, "workflow");
|
||||||
|
+ GList *const wf_names = list_possible_events_problem_data_glist(problem_data, dump_dir_name, "workflow");
|
||||||
|
GHashTable *const possible_workflows = load_workflow_config_data_from_list(wf_names, WORKFLOWS_DIR);
|
||||||
|
g_list_free_full(wf_names, free);
|
||||||
|
|
||||||
|
--
|
||||||
|
2.17.2
|
||||||
|
|
118
SOURCES/1000-Add-autogen.sh.patch
Normal file
118
SOURCES/1000-Add-autogen.sh.patch
Normal file
@ -0,0 +1,118 @@
|
|||||||
|
From adb55b0cb2711baf45c78947fecfa972392023fe Mon Sep 17 00:00:00 2001
|
||||||
|
From: Martin Kutlak <mkutlak@redhat.com>
|
||||||
|
Date: Fri, 30 Nov 2018 13:36:19 +0100
|
||||||
|
Subject: [PATCH] Add autogen.sh
|
||||||
|
|
||||||
|
Signed-off-by: Martin Kutlak <mkutlak@redhat.com>
|
||||||
|
---
|
||||||
|
autogen.sh | 98 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||||
|
1 file changed, 98 insertions(+)
|
||||||
|
create mode 100755 autogen.sh
|
||||||
|
|
||||||
|
diff --git a/autogen.sh b/autogen.sh
|
||||||
|
new file mode 100755
|
||||||
|
index 00000000..dbbcd885
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/autogen.sh
|
||||||
|
@@ -0,0 +1,98 @@
|
||||||
|
+#!/bin/sh
|
||||||
|
+
|
||||||
|
+print_help()
|
||||||
|
+{
|
||||||
|
+cat << EOH
|
||||||
|
+Prepares the source tree for configuration
|
||||||
|
+
|
||||||
|
+Usage:
|
||||||
|
+ autogen.sh [sysdeps [--install]]
|
||||||
|
+
|
||||||
|
+Options:
|
||||||
|
+
|
||||||
|
+ sysdeps prints out all dependencies
|
||||||
|
+ --install install all dependencies ('sudo yum install \$DEPS')
|
||||||
|
+
|
||||||
|
+EOH
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+parse_build_requires_from_spec_file()
|
||||||
|
+{
|
||||||
|
+ PACKAGE=$1
|
||||||
|
+ TEMPFILE=$(mktemp -u --suffix=.spec)
|
||||||
|
+ sed 's/@PACKAGE_VERSION@/1/' < $PACKAGE.spec.in | sed 's/@.*@//' > $TEMPFILE
|
||||||
|
+ rpmspec -P $TEMPFILE | grep "^\(Build\)\?Requires:" | \
|
||||||
|
+ tr -s " " | tr "," "\n" | cut -f2- -d " " | \
|
||||||
|
+ grep -v "\(^\|python[23]-\)"$PACKAGE | sort -u | sed -E 's/^(.*) (.*)$/"\1 \2"/' | tr \" \'
|
||||||
|
+ rm $TEMPFILE
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+list_build_dependencies()
|
||||||
|
+{
|
||||||
|
+ local BUILD_SYSTEM_DEPS_LIST="gettext-devel"
|
||||||
|
+ echo $BUILD_SYSTEM_DEPS_LIST $(parse_build_requires_from_spec_file abrt)
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+case "$1" in
|
||||||
|
+ "--help"|"-h")
|
||||||
|
+ print_help
|
||||||
|
+ exit 0
|
||||||
|
+ ;;
|
||||||
|
+ "sysdeps")
|
||||||
|
+ DEPS_LIST=$(list_build_dependencies)
|
||||||
|
+ if [ "$2" == "--install" ]; then
|
||||||
|
+ set -x verbose
|
||||||
|
+ eval sudo dnf install --setopt=strict=0 $DEPS_LIST
|
||||||
|
+ set +x verbose
|
||||||
|
+ else
|
||||||
|
+ echo $DEPS_LIST
|
||||||
|
+ fi
|
||||||
|
+ exit 0
|
||||||
|
+ ;;
|
||||||
|
+ *)
|
||||||
|
+ echo "Running gen-version"
|
||||||
|
+ ./gen-version
|
||||||
|
+
|
||||||
|
+ mkdir -p m4
|
||||||
|
+ echo "Creating m4/aclocal.m4 ..."
|
||||||
|
+ test -r m4/aclocal.m4 || touch m4/aclocal.m4
|
||||||
|
+
|
||||||
|
+ echo "Running autopoint"
|
||||||
|
+ autopoint --force || exit 1
|
||||||
|
+
|
||||||
|
+ echo "Running intltoolize..."
|
||||||
|
+ intltoolize --force --copy --automake || exit 1
|
||||||
|
+
|
||||||
|
+ echo "Running aclocal..."
|
||||||
|
+ aclocal || exit 1
|
||||||
|
+
|
||||||
|
+ echo "Running libtoolize..."
|
||||||
|
+ libtoolize || exit 1
|
||||||
|
+
|
||||||
|
+ echo "Running autoheader..."
|
||||||
|
+ autoheader || return 1
|
||||||
|
+
|
||||||
|
+ echo "Running autoconf..."
|
||||||
|
+ autoconf --force || exit 1
|
||||||
|
+
|
||||||
|
+ echo "Running automake..."
|
||||||
|
+ automake --add-missing --force --copy || exit 1
|
||||||
|
+
|
||||||
|
+ echo "Running configure ..."
|
||||||
|
+ if [ 0 -eq $# ]; then
|
||||||
|
+ ./configure \
|
||||||
|
+ --prefix=/usr \
|
||||||
|
+ --mandir=/usr/share/man \
|
||||||
|
+ --infodir=/usr/share/info \
|
||||||
|
+ --sysconfdir=/etc \
|
||||||
|
+ --localstatedir=/var \
|
||||||
|
+ --sharedstatedir=/var/lib \
|
||||||
|
+ --enable-native-unwinder \
|
||||||
|
+ --enable-dump-time-unwind \
|
||||||
|
+ --enable-debug
|
||||||
|
+ echo "Configured for local debugging ..."
|
||||||
|
+ else
|
||||||
|
+ ./configure "$@"
|
||||||
|
+ fi
|
||||||
|
+ ;;
|
||||||
|
+esac
|
||||||
|
--
|
||||||
|
2.18.1
|
||||||
|
|
1952
SPECS/abrt.spec
Normal file
1952
SPECS/abrt.spec
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user