diff --git a/.gitignore b/.gitignore index 4adca73..f63be2b 100644 --- a/.gitignore +++ b/.gitignore @@ -24,3 +24,4 @@ abrt-1.1.13.tar.gz /abrt-2.1.0.tar.gz /abrt-2.1.1.tar.gz /abrt-2.1.2.tar.gz +/abrt-2.1.3.tar.gz diff --git a/abrt-2.1.2-recreate_dump_location.patch b/abrt-2.1.2-recreate_dump_location.patch deleted file mode 100644 index ab5a25a..0000000 --- a/abrt-2.1.2-recreate_dump_location.patch +++ /dev/null @@ -1,139 +0,0 @@ -From f3ef192d2ee78bdb4290ea966bc1467d2b599a7e Mon Sep 17 00:00:00 2001 -From: Jakub Filak -Date: Fri, 22 Mar 2013 10:18:16 +0100 -Subject: [ABRT PATCH] abrtd: recreate Dump Location directory if it is delete - -- add inotify watch IN_DELETE_SELF and IN_MOVE_SELF and as a rection on -these events create the dump location and restore inotify watch. - -- closes #624 - -Signed-off-by: Jakub Filak ---- - src/daemon/abrtd.c | 82 +++++++++++++++++++++++++++++++++--------------------- - 1 file changed, 50 insertions(+), 32 deletions(-) - -diff --git a/src/daemon/abrtd.c b/src/daemon/abrtd.c -index f6d3965..7bc93ef 100644 ---- a/src/daemon/abrtd.c -+++ b/src/daemon/abrtd.c -@@ -41,6 +41,7 @@ - /* Maximum number of simultaneously opened client connections. */ - #define MAX_CLIENT_COUNT 10 - -+#define IN_DUMP_LOCATION_FLAGS (IN_CREATE | IN_MOVED_TO | IN_DELETE_SELF | IN_MOVE_SELF) - - /* Daemon initializes, then sits in glib main loop, waiting for events. - * Events can be: -@@ -490,6 +491,36 @@ static gboolean handle_event_output_cb(GIOChannel *gio, GIOCondition condition, - /* Removing will also drop the last ref to this gio, closing/freeing it */ - } - -+static void ensure_writable_dir(const char *dir, mode_t mode, const char *user) -+{ -+ struct stat sb; -+ -+ if (mkdir(dir, mode) != 0 && errno != EEXIST) -+ perror_msg_and_die("Can't create '%s'", dir); -+ if (stat(dir, &sb) != 0 || !S_ISDIR(sb.st_mode)) -+ error_msg_and_die("'%s' is not a directory", dir); -+ -+ struct passwd *pw = getpwnam(user); -+ if (!pw) -+ perror_msg_and_die("Can't find user '%s'", user); -+ -+ if ((sb.st_uid != pw->pw_uid || sb.st_gid != pw->pw_gid) && lchown(dir, pw->pw_uid, pw->pw_gid) != 0) -+ perror_msg_and_die("Can't set owner %u:%u on '%s'", (unsigned int)pw->pw_uid, (unsigned int)pw->pw_gid, dir); -+ if ((sb.st_mode & 07777) != mode && chmod(dir, mode) != 0) -+ perror_msg_and_die("Can't set mode %o on '%s'", mode, dir); -+} -+ -+static void sanitize_dump_dir_rights() -+{ -+ /* We can't allow everyone to create dumps: otherwise users can flood -+ * us with thousands of bogus or malicious dumps */ -+ /* 07000 bits are setuid, setgit, and sticky, and they must be unset */ -+ /* 00777 bits are usual "rwxrwxrwx" access rights */ -+ ensure_writable_dir(g_settings_dump_location, 0755, "abrt"); -+ /* temp dir */ -+ ensure_writable_dir(VAR_RUN"/abrt", 0755, "root"); -+} -+ - /* Inotify handler */ - - static gboolean handle_inotify_cb(GIOChannel *gio, GIOCondition condition, gpointer ptr_unused) -@@ -594,6 +625,22 @@ static gboolean handle_inotify_cb(GIOChannel *gio, GIOCondition condition, gpoin - continue; - } - -+ if (event->mask & IN_DELETE_SELF || event->mask & IN_MOVE_SELF) -+ { -+ /* HACK: we expect that we watch deletion only of 'g_settings_dump_location' -+ * but this handler is used for 'g_settings_sWatchCrashdumpArchiveDir' too -+ */ -+ log("Recreating deleted dump location '%s'", g_settings_dump_location); -+ inotify_rm_watch(g_io_channel_unix_get_fd(gio), event->wd); -+ sanitize_dump_dir_rights(); -+ if (inotify_add_watch(g_io_channel_unix_get_fd(gio), g_settings_dump_location, IN_DUMP_LOCATION_FLAGS) < 0) -+ { -+ perror_msg_and_die("inotify_add_watch failed on recreated '%s'", g_settings_dump_location); -+ } -+ -+ continue; -+ } -+ - if (!(event->mask & IN_ISDIR) || !name) - { - /* ignore lock files and such */ -@@ -810,36 +857,6 @@ static void start_syslog_logging() - putenv((char*)"ABRT_SYSLOG=1"); - } - --static void ensure_writable_dir(const char *dir, mode_t mode, const char *user) --{ -- struct stat sb; -- -- if (mkdir(dir, mode) != 0 && errno != EEXIST) -- perror_msg_and_die("Can't create '%s'", dir); -- if (stat(dir, &sb) != 0 || !S_ISDIR(sb.st_mode)) -- error_msg_and_die("'%s' is not a directory", dir); -- -- struct passwd *pw = getpwnam(user); -- if (!pw) -- perror_msg_and_die("Can't find user '%s'", user); -- -- if ((sb.st_uid != pw->pw_uid || sb.st_gid != pw->pw_gid) && lchown(dir, pw->pw_uid, pw->pw_gid) != 0) -- perror_msg_and_die("Can't set owner %u:%u on '%s'", (unsigned int)pw->pw_uid, (unsigned int)pw->pw_gid, dir); -- if ((sb.st_mode & 07777) != mode && chmod(dir, mode) != 0) -- perror_msg_and_die("Can't set mode %o on '%s'", mode, dir); --} -- --static void sanitize_dump_dir_rights() --{ -- /* We can't allow everyone to create dumps: otherwise users can flood -- * us with thousands of bogus or malicious dumps */ -- /* 07000 bits are setuid, setgit, and sticky, and they must be unset */ -- /* 00777 bits are usual "rwxrwxrwx" access rights */ -- ensure_writable_dir(g_settings_dump_location, 0755, "abrt"); -- /* temp dir */ -- ensure_writable_dir(VAR_RUN"/abrt", 0755, "root"); --} -- - int main(int argc, char** argv) - { - /* I18n */ -@@ -966,8 +983,9 @@ int main(int argc, char** argv) - perror_msg_and_die("inotify_init failed"); - close_on_exec_on(inotify_fd); - -- /* Watching 'g_settings_dump_location' for new files... */ -- if (inotify_add_watch(inotify_fd, g_settings_dump_location, IN_CREATE | IN_MOVED_TO) < 0) -+ /* Watching 'g_settings_dump_location' for new files and delete self -+ * because hooks expects that the dump location exists if abrtd is runnig*/ -+ if (inotify_add_watch(inotify_fd, g_settings_dump_location, IN_DUMP_LOCATION_FLAGS) < 0) - { - perror_msg("inotify_add_watch failed on '%s'", g_settings_dump_location); - goto init_error; --- -1.8.1.4 - diff --git a/abrt-2.1.2-retrace_client_do_not_allow_space.patch b/abrt-2.1.2-retrace_client_do_not_allow_space.patch deleted file mode 100644 index b6190cb..0000000 --- a/abrt-2.1.2-retrace_client_do_not_allow_space.patch +++ /dev/null @@ -1,93 +0,0 @@ -From mtoman@redhat.com Fri, 22 Mar 2013 12:03:23 +0100 -Return-Path: crash-catcher-bounces@lists.fedorahosted.org -Received: from zmta06.collab.prod.int.phx2.redhat.com (LHLO - zmta06.collab.prod.int.phx2.redhat.com) (10.5.81.13) by - zmail18.collab.prod.int.phx2.redhat.com with LMTP; Fri, 22 Mar 2013 - 07:03:36 -0400 (EDT) -Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) - by zmta06.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id 20962160021; - Fri, 22 Mar 2013 07:03:36 -0400 (EDT) -Received: from mx1.redhat.com (ext-mx13.extmail.prod.ext.phx2.redhat.com [10.5.110.18]) - by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id r2MB3ZoW020153; - Fri, 22 Mar 2013 07:03:35 -0400 -Received: from bastion.fedoraproject.org (bastion01.phx2.fedoraproject.org [10.5.126.12]) - by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r2MB3YOd027088; - Fri, 22 Mar 2013 07:03:35 -0400 -Received: from lists.fedorahosted.org (hosted-lists01.vpn.fedoraproject.org [192.168.1.22]) - by bastion01.phx2.fedoraproject.org (Postfix) with ESMTP id 854AF20ECC; - Fri, 22 Mar 2013 11:03:34 +0000 (UTC) -Received: by lists.fedorahosted.org (Postfix, from userid 503) - id E1B22140229; Fri, 22 Mar 2013 11:03:33 +0000 (UTC) -X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on - hosted-lists01.fedoraproject.org -X-Spam-Level: -X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_HI - autolearn=unavailable version=3.3.1 -Received: from hosted-lists01.fedoraproject.org (localhost [127.0.0.1]) - by lists.fedorahosted.org (Postfix) with ESMTP id 11B6D14023E; - Fri, 22 Mar 2013 11:03:33 +0000 (UTC) -X-Original-To: crash-catcher@lists.fedorahosted.org -Delivered-To: crash-catcher@lists.fedorahosted.org -Received: by lists.fedorahosted.org (Postfix, from userid 503) - id F0BDE14024A; Fri, 22 Mar 2013 11:03:31 +0000 (UTC) -Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) - by lists.fedorahosted.org (Postfix) with ESMTP id 72286140229 - for ; - Fri, 22 Mar 2013 11:03:30 +0000 (UTC) -Received: from int-mx09.intmail.prod.int.phx2.redhat.com - (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) - by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r2MB3SZu007039 - (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) - for ; - Fri, 22 Mar 2013 07:03:28 -0400 -Received: from dhcp-25-167.brq.redhat.com (dhcp-24-125.brq.redhat.com - [10.34.24.125]) - by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP - id r2MB3R6x009267; Fri, 22 Mar 2013 07:03:27 -0400 -From: Michal Toman -To: crash-catcher@lists.fedorahosted.org -Subject: [PATCH] retrace-client: do not allow space in os_release_id; - closes #625 -Date: Fri, 22 Mar 2013 12:03:23 +0100 -Message-Id: <1363950203-5648-1-git-send-email-mtoman@redhat.com> -X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23 -X-Scanned-By: MIMEDefang 2.68 on 10.5.110.18 -X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22 -X-BeenThere: crash-catcher@lists.fedorahosted.org -X-Mailman-Version: 2.1.12 -Precedence: list -Reply-To: crash-catcher@lists.fedorahosted.org -List-Id: -List-Unsubscribe: , - -List-Archive: -List-Post: -List-Help: -List-Subscribe: , - -Sender: crash-catcher-bounces@lists.fedorahosted.org -Errors-To: crash-catcher-bounces@lists.fedorahosted.org -X-RedHat-Spam-Score: -6.9 (BAYES_00,RCVD_IN_DNSWL_HI) - ---- - src/plugins/abrt-retrace-client.c | 3 +++ - 1 file changed, 3 insertions(+) - -diff --git a/src/plugins/abrt-retrace-client.c b/src/plugins/abrt-retrace-client.c -index 0e17a62..781a815 100644 ---- a/src/plugins/abrt-retrace-client.c -+++ b/src/plugins/abrt-retrace-client.c -@@ -324,6 +324,9 @@ static char *get_release_id(const char *rawrelease, const char *architecture) - } - char *release = NULL, *version = NULL, *result = NULL; - parse_release_for_rhts(rawrelease, &release, &version); -+ char *space = strchr(version, ' '); -+ if (space) -+ *space = '\0'; - - if (strcmp("Fedora", release) == 0) - result = xasprintf("fedora-%s-%s", version, arch); --- -1.8.1.4 - - diff --git a/abrt.spec b/abrt.spec index b8599be..10aa3b3 100644 --- a/abrt.spec +++ b/abrt.spec @@ -24,8 +24,8 @@ Summary: Automatic bug detection and reporting tool Name: abrt -Version: 2.1.2 -Release: 4%{?dist} +Version: 2.1.3 +Release: 1%{?dist} License: GPLv2+ Group: Applications/System URL: https://fedorahosted.org/abrt/ @@ -37,10 +37,6 @@ Patch2: abrt-2.1.1-hide_all_ureport_stuff.patch Patch3: abrt-2.1.1-dont_enable_shortened_reporting_in_gnome.patch Patch4: abrt-2.1.1-disable_autoreporting_dialog.patch -# Remove these patches with abrt-2.1.3 -Patch5: abrt-2.1.2-recreate_dump_location.patch -Patch6: abrt-2.1.2-retrace_client_do_not_allow_space.patch - BuildRequires: dbus-devel BuildRequires: gtk3-devel BuildRequires: rpm-devel >= 4.6 @@ -231,7 +227,12 @@ Requires: gnome-abrt Requires: abrt-plugin-bodhi Requires: libreport-plugin-logger, libreport-plugin-bugzilla Requires: libreport-plugin-ureport +%if 0%{?fedora} Requires: libreport-fedora +%endif +%if 0%{?rhel} +Requires: libreport-rhel +%endif #Requires: abrt-plugin-firefox Obsoletes: bug-buddy > 0.0.1 Provides: bug-buddy @@ -274,8 +275,6 @@ problems handled by ABRT in Python. %endif #Fedora %patch1 -p1 -b .gpgcheck -%patch5 -p1 -b .dumplocation -%patch6 -p1 -b .spaces %build autoconf @@ -579,7 +578,6 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %config(noreplace) %{_sysconfdir}/%{name}/gpg_keys %config(noreplace) %{_sysconfdir}/libreport/events.d/abrt_event.conf %config(noreplace) %{_sysconfdir}/libreport/events.d/smart_event.conf -%config(noreplace) %{_sysconfdir}/libreport/events.d/smolt_event.conf %dir %attr(0755, abrt, abrt) %{_localstatedir}/tmp/%{name} %dir %attr(0700, abrt, abrt) %{_localstatedir}/spool/%{name}-upload # abrtd runs as root @@ -614,7 +612,6 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %files gui %defattr(-,root,root,-) -%{_bindir}/abrt-gui %dir %{_datadir}/%{name} # all glade, gtkbuilder and py files for gui %{_datadir}/icons/hicolor/*/apps/* @@ -653,7 +650,6 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %{_sysconfdir}/libreport/events/analyze_CCpp.xml %{_sysconfdir}/libreport/events/analyze_LocalGDB.xml %{_sysconfdir}/libreport/events/collect_xsession_errors.xml -%{_sysconfdir}/libreport/events/collect_Smolt.xml %{_sysconfdir}/libreport/events/collect_GConf.xml %{_sysconfdir}/libreport/events/collect_vimrc_user.xml %{_sysconfdir}/libreport/events/collect_vimrc_system.xml @@ -754,6 +750,16 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %{_defaultdocdir}/%{name}-python-%{version}/examples/ %changelog +* Wed Mar 27 2013 Jakub Filak 2.1.3-1 +- record runlevel +- Integration with satyr +- dbus: check correct errno after dump_dir_is_accessible_by_uid() +- require libreport workflow package acc. to OS type +- remove the abrt-gui closes #629 +- retrace-client: do not allow space in os_release_id; closes #625 +- Remove all smolt-related files and code bits +- abrtd: recreate Dump Location directory if it is delete + * Mon Mar 25 2013 Jakub Filak 2.1.2-4 - Check if restorecon cmd exists and run it only if it does - Resolves: #926934 diff --git a/sources b/sources index 0b0f51b..b8dd148 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -9d79f548fd5b2814afe4cf8b4ea78f51 abrt-2.1.2.tar.gz +ba54ade40bd9688d0260b6e2355d1faa abrt-2.1.3.tar.gz