diff --git a/backport-Support-new-kernel-namespace.patch b/backport-Support-new-kernel-namespace.patch new file mode 100644 index 0000000000000000000000000000000000000000..0f6e3fa6e5650e17266cd04368afe148b7c2f9aa --- /dev/null +++ b/backport-Support-new-kernel-namespace.patch @@ -0,0 +1,75 @@ +From ac7bcb6bf712600ae0cc0a6d9920b156f198829b Mon Sep 17 00:00:00 2001 +From: Ernestas Kulik +Date: Wed, 1 Apr 2020 12:12:34 +0200 +Subject: [PATCH] Support new kernel namespace + +Linux 5.6 introduces a new time namespace: +https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=769071ac9f20b6a447410c7eaa55d1a5233ef40c +--- + src/include/internal_libreport.h | 14 +++++++++++++- + tests/proc_helpers.at | 13 ++++++++++++- + 2 files changed, 25 insertions(+), 2 deletions(-) + +diff --git a/src/include/internal_libreport.h b/src/include/internal_libreport.h +index 5e55170e4..06fb3f0df 100644 +--- a/src/include/internal_libreport.h ++++ b/src/include/internal_libreport.h +@@ -729,7 +729,19 @@ int get_env_variable(pid_t pid, const char *name, char **value); + #define PROC_NS_ID_USER 4 + #define PROC_NS_ID_UTS 5 + #define PROC_NS_ID_CGROUP 6 +-static const char * libreport_proc_namespaces[] = { "ipc", "mnt", "net", "pid", "uts", "user", "cgroup", "pid_for_children" }; ++#define PROC_NS_ID_TIME 8 ++static const char * libreport_proc_namespaces[] = { ++ "ipc", ++ "mnt", ++ "net", ++ "pid", ++ "uts", ++ "user", ++ "cgroup", ++ "pid_for_children", ++ "time", ++ "time_for_children", ++}; + + struct ns_ids { + ino_t nsi_ids[ARRAY_SIZE(libreport_proc_namespaces)]; +diff --git a/tests/proc_helpers.at b/tests/proc_helpers.at +index 4b99d447e..53e174369 100644 +--- a/tests/proc_helpers.at ++++ b/tests/proc_helpers.at +@@ -950,6 +950,8 @@ void check_file_contents(const char *filename) + + char const *pid_for_children = "default"; + char const *cgroup = "default"; ++ const char *time = "default"; ++ const char *time_for_children = "default"; + + if (stat("/proc/self/ns/cgroup", &st) < 0 && errno == ENOENT) + cgroup = "unknown"; +@@ -957,6 +959,12 @@ void check_file_contents(const char *filename) + if (stat("/proc/self/ns/pid_for_children", &st) < 0 && errno == ENOENT) + pid_for_children = "unknown"; + ++ if (stat("/proc/self/ns/time", &st) < 0 && ENOENT == errno) ++ time = "unknown"; ++ ++ if (stat("/proc/self/ns/time_for_children", &st) < 0 && ENOENT == errno) ++ time_for_children = "unknown"; ++ + expected = xasprintf("ipc : default\n" + "mnt : default\n" + "net : default\n" +@@ -964,7 +972,10 @@ void check_file_contents(const char *filename) + "uts : default\n" + "user : default\n" + "cgroup : %s\n" +- "pid_for_children : %s\n", cgroup, pid_for_children); ++ "pid_for_children : %s\n" ++ "time : %s\n" ++ "time_for_children : %s\n", ++ cgroup, pid_for_children, time, time_for_children); + + char *file = xmalloc_xopen_read_close(filename, NULL); + TS_ASSERT_STRING_EQ(file, expected, "Namespaces"); diff --git a/backport-internal_libreport-Sort-kernel-namespaces.patch b/backport-internal_libreport-Sort-kernel-namespaces.patch new file mode 100644 index 0000000000000000000000000000000000000000..82e661022e30296fe04f55da438843ff392864cc --- /dev/null +++ b/backport-internal_libreport-Sort-kernel-namespaces.patch @@ -0,0 +1,83 @@ +From 0a475c549cdd4d0dca58f4e2294b70a3ad78ea0f Mon Sep 17 00:00:00 2001 +From: Ernestas Kulik +Date: Mon, 6 Apr 2020 17:37:12 +0200 +Subject: [PATCH] internal_libreport: Sort kernel namespaces +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Just easier to manage. Will break binary compatibility, but there are +other pending changes that will do the same, so let’s use the +opportunity. +--- + src/include/internal_libreport.h | 22 +++++++++++----------- + tests/proc_helpers.at | 10 +++++----- + 2 files changed, 16 insertions(+), 16 deletions(-) + +diff --git a/src/include/internal_libreport.h b/src/include/internal_libreport.h +index 06fb3f0df..ee320e2de 100644 +--- a/src/include/internal_libreport.h ++++ b/src/include/internal_libreport.h +@@ -722,25 +722,25 @@ int get_env_variable_ext(int fd, char delim, const char *name, char **value); + int get_env_variable(pid_t pid, const char *name, char **value); + + #define PROC_NS_UNSUPPORTED ((ino_t)-1) +-#define PROC_NS_ID_IPC 0 +-#define PROC_NS_ID_MNT 1 +-#define PROC_NS_ID_NET 2 +-#define PROC_NS_ID_PID 3 +-#define PROC_NS_ID_USER 4 +-#define PROC_NS_ID_UTS 5 +-#define PROC_NS_ID_CGROUP 6 +-#define PROC_NS_ID_TIME 8 ++#define PROC_NS_ID_CGROUP 0 ++#define PROC_NS_ID_IPC 1 ++#define PROC_NS_ID_MNT 2 ++#define PROC_NS_ID_NET 3 ++#define PROC_NS_ID_PID 4 ++#define PROC_NS_ID_TIME 6 ++#define PROC_NS_ID_USER 8 ++#define PROC_NS_ID_UTS 9 + static const char * libreport_proc_namespaces[] = { ++ "cgroup", + "ipc", + "mnt", + "net", + "pid", +- "uts", +- "user", +- "cgroup", + "pid_for_children", + "time", + "time_for_children", ++ "user", ++ "uts", + }; + + struct ns_ids { +diff --git a/tests/proc_helpers.at b/tests/proc_helpers.at +index 53e174369..5250526bf 100644 +--- a/tests/proc_helpers.at ++++ b/tests/proc_helpers.at +@@ -965,16 +965,16 @@ void check_file_contents(const char *filename) + if (stat("/proc/self/ns/time_for_children", &st) < 0 && ENOENT == errno) + time_for_children = "unknown"; + +- expected = xasprintf("ipc : default\n" ++ expected = xasprintf("cgroup : %s\n" ++ "ipc : default\n" + "mnt : default\n" + "net : default\n" + "pid : default\n" +- "uts : default\n" +- "user : default\n" +- "cgroup : %s\n" + "pid_for_children : %s\n" + "time : %s\n" +- "time_for_children : %s\n", ++ "time_for_children : %s\n" ++ "user : default\n" ++ "uts : default\n", + cgroup, pid_for_children, time, time_for_children); + + char *file = xmalloc_xopen_read_close(filename, NULL); diff --git a/fix-bug-delete-gtk-deprecation-warnings.patch b/fix-bug-delete-gtk-deprecation-warnings.patch deleted file mode 100644 index 9ef7babdaf0de623c6bc77b462114f9b14fd185e..0000000000000000000000000000000000000000 --- a/fix-bug-delete-gtk-deprecation-warnings.patch +++ /dev/null @@ -1,38 +0,0 @@ -From a760fe1e4ee98808783a9833a022bf3ba77d47f3 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?=E6=A2=B3=E7=A2=A7=E6=B9=96=E7=9A=84=E7=A0=8D=E6=9F=B4?= - =?UTF-8?q?=E4=BA=BA?= -Date: Mon, 13 Jan 2020 14:33:04 +0800 -Subject: [PATCH] tar2 - ---- - libreport-2.10.1/src/gtk-helpers/Makefile.am | 1 - - libreport-2.10.1/src/gui-wizard-gtk/Makefile.am | 1 - - 2 files changed, 2 deletions(-) - -diff --git a/libreport-2.10.1/src/gtk-helpers/Makefile.am b/libreport-2.10.1/src/gtk-helpers/Makefile.am -index ad33750..c4a92dd 100644 ---- a/src/gtk-helpers/Makefile.am -+++ b/src/gtk-helpers/Makefile.am -@@ -33,7 +33,6 @@ libreport_gtk_la_CPPFLAGS = \ - $(GLIB_CFLAGS) \ - $(GIO_CFLAGS) \ - -DWORKFLOWS_DIR=\"$(WORKFLOWS_DIR)\" \ -- -DGDK_DISABLE_DEPRECATION_WARNINGS \ - -D_GNU_SOURCE - libreport_gtk_la_LDFLAGS = \ - -version-info 0:1:0 -diff --git a/libreport-2.10.1/src/gui-wizard-gtk/Makefile.am b/libreport-2.10.1/src/gui-wizard-gtk/Makefile.am -index fce33cb..37e7ba6 100644 ---- a/src/gui-wizard-gtk/Makefile.am -+++ b/src/gui-wizard-gtk/Makefile.am -@@ -22,7 +22,6 @@ report_gtk_CFLAGS = \ - -DICON_DIR=\"${datadir}/abrt/icons/hicolor/48x48/status\" \ - -DWORKFLOWS_DIR=\"$(WORKFLOWS_DIR)\" \ - -DLIBEXEC_DIR=\"$(libexecdir)\" \ -- -DGDK_DISABLE_DEPRECATION_WARNINGS \ - $(GLIB_CFLAGS) \ - $(GTK_CFLAGS) \ - -D_GNU_SOURCE --- -1.8.3.1 - diff --git a/libreport-2.12.0.tar.gz b/libreport-2.12.0.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..2fb22a4124744dbf1bab1b3e7379eda2ab2a6018 Binary files /dev/null and b/libreport-2.12.0.tar.gz differ diff --git a/libreport.spec b/libreport.spec index e0919e4debbbdf410b619f923f9c867dfac78fe1..1bc5cf2bcdf33bef80979bdc2813486cc2cd0e67 100644 --- a/libreport.spec +++ b/libreport.spec @@ -2,20 +2,21 @@ %bcond_with python2_libreport Name: libreport -Version: 2.10.1 -Release: 10 +Version: 2.12.0 +Release: 12 License: GPLv2+ Summary: Generic library for reporting various problems URL: https://abrt.readthedocs.org/ Source: https://github.com/abrt/%{name}/archive/%{version}/%{name}-%{version}.tar.gz -Patch9000: fix-bug-delete-gtk-deprecation-warnings.patch +Patch1: backport-Support-new-kernel-namespace.patch +Patch2: backport-internal_libreport-Sort-kernel-namespaces.patch BuildRequires: dbus-devel gtk3-devel curl-devel desktop-file-utils python2-devel python3-devel BuildRequires: gettext libxml2-devel libtar-devel intltool libtool texinfo asciidoc xmlto BuildRequires: newt-devel libproxy-devel satyr-devel >= 0.24 glib2-devel >= 2.43 git doxygen BuildRequires: glibc-all-langpacks xmlrpc-c-devel systemd-devel augeas-devel augeas xz lz4 -BuildRequires: sed json-c-devel gdb +BuildRequires: sed json-c-devel gdb nettle-devel libarchive-devel Requires: libreport-filesystem = %{version}-%{release} Requires: satyr >= 0.24 @@ -154,12 +155,12 @@ mkdir -p %{buildroot}/%{_datadir}/%{name}/workflows/ rm -f %{buildroot}/%{_infodir}/dir %check -#make check|| { +make check|| { # find and print the logs of failed test # do not cat tests/testsuite.log because it contains a lot of bloat - # find tests/testsuite.dir -name "testsuite.log" -print -exec cat '{}' \; - # exit 1 -# } + find tests/testsuite.dir -name "testsuite.log" -print -exec cat '{}' \; + exit 1 +} %post /sbin/ldconfig @@ -352,6 +353,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %{_mandir}/man5/report_rhel.conf.5.* %changelog +* Thu Feb 16 2023 shixuantong - 2.10.1-11 +- enable check + * Wed Aug 25 2021 panxiaohe - 2.10.1-10 - Split filesystem package and add version limit for some provides symbol