summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJiri Moskovcak <jmoskovc@redhat.com>2009-03-03 21:04:08 +0100
committerJiri Moskovcak <jmoskovc@redhat.com>2009-03-03 21:04:08 +0100
commit0a5b87ab4dae3ec4b47a47d505f89fc3e3e3055f (patch)
tree560f589061acce46928ea03ae6602364002423ee
parent820832e32b5ee5f422261575fc332e038ad94e73 (diff)
downloadabrt-0a5b87ab4dae3ec4b47a47d505f89fc3e3e3055f.tar.gz
abrt-0a5b87ab4dae3ec4b47a47d505f89fc3e3e3055f.tar.xz
abrt-0a5b87ab4dae3ec4b47a47d505f89fc3e3e3055f.zip
Rename to abrt
-rw-r--r--Makefile.am2
-rw-r--r--abrt.init (renamed from crash-catcher.init)28
-rw-r--r--abrt.spec (renamed from crash-catcher.spec)34
-rw-r--r--configure.ac4
-rw-r--r--lib/MiddleWare/Makefile.am2
-rw-r--r--lib/MiddleWare/abrt.conf (renamed from lib/MiddleWare/crash-catcher.conf)0
-rw-r--r--lib/Plugins/SQLite3.conf2
-rw-r--r--lib/Utils/DebugDump.cpp1
-rw-r--r--src/Daemon/CrashWatcher.cpp34
-rw-r--r--src/Daemon/CrashWatcher.h4
-rw-r--r--src/Daemon/Makefile.am12
-rw-r--r--src/Daemon/dbus-abrt.conf (renamed from src/Daemon/dbus-crash-catcher.conf)0
-rw-r--r--src/Gui/CCMainWindow.py2
-rw-r--r--src/Gui/CCReporterDialog.py2
-rw-r--r--src/Gui/Makefile.am4
-rw-r--r--src/Gui/abrt-gui4
-rw-r--r--src/Gui/abrt.desktop (renamed from src/Gui/crash-catcher.desktop)6
-rw-r--r--src/Gui/cc-gui4
18 files changed, 81 insertions, 64 deletions
diff --git a/Makefile.am b/Makefile.am
index 8f8f6f3a..796bd840 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,3 +1,3 @@
SUBDIRS = lib src
-EXTRA_DIST = doc/CodingStyle crash-catcher.spec \ No newline at end of file
+EXTRA_DIST = doc/CodingStyle abrt.spec \ No newline at end of file
diff --git a/crash-catcher.init b/abrt.init
index 56aadac6..f1aed30e 100644
--- a/crash-catcher.init
+++ b/abrt.init
@@ -1,11 +1,11 @@
#!/bin/bash
-# Starts the crash-catcher daemon
+# Starts the abrt daemon
#
# chkconfig: - 82 16
# description: Daemon to detect crashing apps
-# processname: crash-catcher
+# processname: abrt
### BEGIN INIT INFO
-# Provides: crash-catcher
+# Provides: abrt
# Required-Start: $syslog $local_fs
# Required-Stop: $syslog $local_fs
# Default-Stop: 0 1 2 3 4 5 6
@@ -26,8 +26,8 @@ check() {
# Check that we're a privileged user
[ `id -u` = 0 ] || exit 4
- # Check if crash-catcher is executable
- test -x /usr/sbin/crash-catcher || exit 5
+ # Check if abrt is executable
+ test -x /usr/sbin/abrt || exit 5
}
start() {
@@ -35,11 +35,11 @@ start() {
check
# Check if it is already running
- if [ ! -f /var/lock/subsys/crash-catcher ]; then
- echo -n $"Starting crash-catcher daemon: "
- daemon /usr/sbin/crash-catcher
+ if [ ! -f /var/lock/subsys/abrt ]; then
+ echo -n $"Starting abrt daemon: "
+ daemon /usr/sbin/abrt
RETVAL=$?
- [ $RETVAL -eq 0 ] && touch /var/lock/subsys/crash-catcher
+ [ $RETVAL -eq 0 ] && touch /var/lock/subsys/abrt
echo
fi
return $RETVAL
@@ -49,10 +49,10 @@ stop() {
check
- echo -n $"Stopping crash-catcher daemon: "
- killproc /usr/sbin/crash-catcher
+ echo -n $"Stopping abrt daemon: "
+ killproc /usr/sbin/abrt
RETVAL=$?
- [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/crash-catcher
+ [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/abrt
echo
return $RETVAL
}
@@ -85,12 +85,12 @@ restart)
restart
;;
condrestart)
- if [ -f /var/lock/subsys/crash-catcher ]; then
+ if [ -f /var/lock/subsys/abrt ]; then
restart
fi
;;
status)
- status crash-catcher
+ status abrt
RETVAL=$?
;;
*)
diff --git a/crash-catcher.spec b/abrt.spec
index ce1c2fdc..08a312ef 100644
--- a/crash-catcher.spec
+++ b/abrt.spec
@@ -1,12 +1,12 @@
Summary: Automatic bug detection and reporting tool
-Name: crash-catcher
+Name: abrt
Version: 0.0.1
Release: 12%{?dist}
License: GPLv2+
Group: Applications/System
URL: https://fedorahosted.org/crash-catcher/
Source: http://jmoskovc.fedorapeople.org/%{name}-%{version}.tar.gz
-Source1: crash-catcher.init
+Source1: abrt.init
BuildRequires: dbus-c++-devel
BuildRequires: gtkmm24-devel
BuildRequires: dbus-glib-devel
@@ -16,27 +16,27 @@ BuildRequires: desktop-file-utils
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
%description
-CrashCatcher is a tool to help users to detect defects in applications and
+%{name} is a tool to help users to detect defects in applications and
to create a bug report with all informations needed by maintainer to fix it.
It uses plugin system to extend its functionality.
%package libs
-Summary: Libraries for CrashCatcher
+Summary: Libraries for %{name}
Group: System Environment/Libraries
%description libs
-Libraries for CrashCatcher.
+Libraries for %{name}.
%package devel
-Summary: Development libraries for CrashCatcher
+Summary: Development libraries for %{name}
Group: Development/Libraries
Requires: %{name}-libs = %{version}-%{release}
%description devel
-Development libraries and headers for CrashCatcher.
+Development libraries and headers for %{name}.
%package applet
-Summary: CrashCatcher's applet
+Summary: %{name}'s applet
Group: User Interface/Desktops
Requires: %{name} = %{version}-%{release}
@@ -45,7 +45,7 @@ Simple systray applet to notify user about new events detected by %{name}
daemon.
%package gui
-Summary: CrashCatcher's gui
+Summary: %{name}'s gui
Group: User Interface/Desktops
Requires: %{name} = %{version}-%{release}
@@ -53,17 +53,17 @@ Requires: %{name} = %{version}-%{release}
GTK+ wizard for convenient bug reporting.
%package addon-ccpp
-Summary: CrashCatcher's C/C++ addon
+Summary: %{name}'s C/C++ addon
Group: System Environment/Libraries
Requires: gdb
Requires: %{name} = %{version}-%{release}
%description addon-ccpp
-This package contains hook for C/C++ crashed programs and CrashCatcher's C/C++
+This package contains hook for C/C++ crashed programs and %{name}'s C/C++
language plugin.
%package plugin-sqlite3
-Summary: CrashCatcher's SQLite3 database plugin
+Summary: %{name}'s SQLite3 database plugin
Group: System Environment/Libraries
Requires: %{name} = %{version}-%{release}
@@ -72,7 +72,7 @@ This package contains SQLite3 database plugin. It is used for storing the data
required for creating a bug report.
%package plugin-logger
-Summary: CrashCatcher's logger reporter plugin
+Summary: %{name}'s logger reporter plugin
Group: System Environment/Libraries
Requires: %{name} = %{version}-%{release}
@@ -80,7 +80,7 @@ Requires: %{name} = %{version}-%{release}
The simple reporter plugin, which writes a report to a specified file.
%package plugin-mailx
-Summary: CrashCatcher's mailx reporter plugin
+Summary: %{name}'s mailx reporter plugin
Group: System Environment/Libraries
Requires: %{name} = %{version}-%{release}
Requires: mailx
@@ -108,7 +108,7 @@ mkdir -p ${RPM_BUILD_ROOT}/%{_initrddir}
install -m 755 %SOURCE1 ${RPM_BUILD_ROOT}/%{_initrddir}/%{name}
mkdir -p $RPM_BUILD_ROOT/var/cache/%{name}
-desktop-file-install --vendor fedora \
+desktop-file-install \
--dir ${RPM_BUILD_ROOT}%{_datadir}/applications \
src/Gui/%{name}.desktop
%clean
@@ -153,9 +153,9 @@ fi
%files gui
%defattr(-,root,root,-)
-%{_bindir}/cc-gui
+%{_bindir}/%{name}-gui
%{_datadir}/%{name}
-%{_datadir}/applications/fedora-%{name}.desktop
+%{_datadir}/applications/%{name}.desktop
%files addon-ccpp
%defattr(-,root,root,-)
diff --git a/configure.ac b/configure.ac
index 16d683b7..9bda21e4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,4 +1,4 @@
-AC_INIT([crash-catcher], [0.0.1], [jmoskovc@redhat.com, zprikryl@redhat.com])
+AC_INIT([abrt], [0.0.1], [jmoskovc@redhat.com, zprikryl@redhat.com])
AM_INIT_AUTOMAKE([-Wall -Werror foreign])
@@ -21,7 +21,7 @@ PKG_CHECK_MODULES([DBUSCPP], [dbus-c++-1])
PKG_CHECK_MODULES([RPM], [rpm])
AC_CHECK_HEADER([sys/inotify.h], [],
- [AC_MSG_ERROR([sys/inotify.h is needed to build CrashCatcher])])
+ [AC_MSG_ERROR([sys/inotify.h is needed to build abrt])])
CONF_DIR='${sysconfdir}/${PACKAGE_NAME}'
PLUGINS_CONF_DIR='${sysconfdir}/${PACKAGE_NAME}/plugins'
diff --git a/lib/MiddleWare/Makefile.am b/lib/MiddleWare/Makefile.am
index f95253f4..ee292376 100644
--- a/lib/MiddleWare/Makefile.am
+++ b/lib/MiddleWare/Makefile.am
@@ -11,7 +11,7 @@ libMiddleWare_la_LDFLAGS = -version-info 0:1:0
libMiddleWare_la_CPPFLAGS = -I$(srcdir)/../Utils $(RPM_CFLAGS)
middlewareconfdir = $(CONF_DIR)
-dist_middlewareconf_DATA = crash-catcher.conf
+dist_middlewareconf_DATA = abrt.conf
check_PROGRAMS = test
test_SOURCES = test.cpp
diff --git a/lib/MiddleWare/crash-catcher.conf b/lib/MiddleWare/abrt.conf
index 94743a1f..94743a1f 100644
--- a/lib/MiddleWare/crash-catcher.conf
+++ b/lib/MiddleWare/abrt.conf
diff --git a/lib/Plugins/SQLite3.conf b/lib/Plugins/SQLite3.conf
index 7cc8fc3e..3773c8f2 100644
--- a/lib/Plugins/SQLite3.conf
+++ b/lib/Plugins/SQLite3.conf
@@ -1,3 +1,3 @@
# Configuration file for database plugin SQLite3
# DB path
-DBPath = /var/cache/crash-catcher/crash-catcher-db
+DBPath = /var/cache/abrt/abrt-db
diff --git a/lib/Utils/DebugDump.cpp b/lib/Utils/DebugDump.cpp
index 068cfa56..883d6b91 100644
--- a/lib/Utils/DebugDump.cpp
+++ b/lib/Utils/DebugDump.cpp
@@ -106,6 +106,7 @@ bool CDebugDump::GetAndSetLock(const std::string& pLockFile, const std::string&
Delete();
throw std::string("CDebugDump::GetAndSetLock(): dead lock found");
}
+ fIn.close();
return false;
}
}
diff --git a/src/Daemon/CrashWatcher.cpp b/src/Daemon/CrashWatcher.cpp
index 5eb77059..114400c0 100644
--- a/src/Daemon/CrashWatcher.cpp
+++ b/src/Daemon/CrashWatcher.cpp
@@ -69,10 +69,17 @@ gboolean CCrashWatcher::handle_event_cb(GIOChannel *gio, GIOCondition condition,
std::string sName = name;
CCrashWatcher *cc = (CCrashWatcher*)daemon;
crash_info_t crashinfo;
- if(cc->m_pMW->SaveDebugDump(std::string(DEBUG_DUMPS_DIR) + "/" + name, crashinfo))
+ try
{
- /* send message to dbus */
- cc->Crash(crashinfo.m_sPackage);
+ if(cc->m_pMW->SaveDebugDump(std::string(DEBUG_DUMPS_DIR) + "/" + name, crashinfo))
+ {
+ /* send message to dbus */
+ cc->Crash(crashinfo.m_sPackage);
+ }
+ }
+ catch(std::string err)
+ {
+ std::cerr << err << std::endl;
}
}
#ifdef DEBUG
@@ -93,8 +100,8 @@ CCrashWatcher::CCrashWatcher(const std::string& pPath,DBus::Connection &connecti
int watch = 0;
m_sTarget = pPath;
// middleware object
- m_pMW = new CMiddleWare(PLUGINS_CONF_DIR,PLUGINS_LIB_DIR, std::string(CONF_DIR) + "/crash-catcher.conf");
- m_nMainloop = g_main_loop_new(NULL,FALSE);
+ m_pMW = new CMiddleWare(PLUGINS_CONF_DIR,PLUGINS_LIB_DIR, std::string(CONF_DIR) + "/abrt.conf");
+ m_pMainloop = g_main_loop_new(NULL,FALSE);
connection.request_name(CC_DBUS_NAME);
if((m_nFd = inotify_init()) == -1){
throw std::string("Init Failed");
@@ -105,13 +112,15 @@ CCrashWatcher::CCrashWatcher(const std::string& pPath,DBus::Connection &connecti
throw std::string("Add watch failed:") + pPath.c_str();
}
- m_nGio = g_io_channel_unix_new(m_nFd);
+ m_pGio = g_io_channel_unix_new(m_nFd);
}
CCrashWatcher::~CCrashWatcher()
{
//delete dispatcher, connection, etc..
delete m_pMW;
+ g_io_channel_unref(m_pGio);
+ g_main_loop_unref(m_pMainloop);
}
dbus_vector_crash_infos_t CCrashWatcher::GetCrashInfos(const std::string &pUID)
@@ -130,7 +139,14 @@ dbus_vector_map_crash_infos_t CCrashWatcher::GetCrashInfosMap(const std::string
dbus_vector_map_crash_infos_t retval;
vector_crash_infos_t crash_info;
unsigned long unix_uid = m_pConn->sender_unix_uid(pDBusSender.c_str());
- crash_info = m_pMW->GetCrashInfos(to_string(unix_uid));
+ try
+ {
+ crash_info = m_pMW->GetCrashInfos(to_string(unix_uid));
+ }
+ catch(std::string err)
+ {
+ std::cerr << err << std::endl;
+ }
for (vector_crash_infos_t::iterator it = crash_info.begin(); it!=crash_info.end(); ++it) {
retval.push_back(it->GetMap());
}
@@ -237,9 +253,9 @@ void CCrashWatcher::StartWatch()
/* daemon loop with glib */
void CCrashWatcher::GStartWatch()
{
- g_io_add_watch (m_nGio, G_IO_IN, handle_event_cb, this);
+ g_io_add_watch (m_pGio, G_IO_IN, handle_event_cb, this);
//enter the event loop
- g_main_run (m_nMainloop);
+ g_main_run (m_pMainloop);
}
diff --git a/src/Daemon/CrashWatcher.h b/src/Daemon/CrashWatcher.h
index dfe716fb..b1d0d39a 100644
--- a/src/Daemon/CrashWatcher.h
+++ b/src/Daemon/CrashWatcher.h
@@ -44,8 +44,8 @@ class CCrashWatcher
void Lock();
int m_nFd;
- GIOChannel* m_nGio;
- GMainLoop *m_nMainloop;
+ GIOChannel* m_pGio;
+ GMainLoop *m_pMainloop;
std::string m_sTarget;
CMiddleWare *m_pMW;
DBus::Connection *m_pConn;
diff --git a/src/Daemon/Makefile.am b/src/Daemon/Makefile.am
index 8a88fbc0..d36828b3 100644
--- a/src/Daemon/Makefile.am
+++ b/src/Daemon/Makefile.am
@@ -1,13 +1,13 @@
-sbin_PROGRAMS = crash-catcher
-crash_catcher_SOURCES = CrashWatcher.cpp CrashWatcher.h Daemon.cpp DBusServerProxy.h \
+sbin_PROGRAMS = abrt
+abrt_SOURCES = CrashWatcher.cpp CrashWatcher.h Daemon.cpp DBusServerProxy.h \
DBusCommon.h
-crash_catcher_CPPFLAGS = -Wall -Werror -I../../lib/MiddleWare\
+abrt_CPPFLAGS = -Wall -Werror -I../../lib/MiddleWare\
-I../../lib/DBus \
-DDEBUG_DUMPS_DIR=\"$(DEBUG_DUMPS_DIR)\" $(DBUS_GLIB_CFLAGS) $(DBUSCPP_CFLAGS) \
-DPLUGINS_LIB_DIR=\"$(PLUGINS_LIB_DIR)\" \
-DPLUGINS_CONF_DIR=\"$(PLUGINS_CONF_DIR)\" \
-DCONF_DIR=\"$(CONF_DIR)\"
-crash_catcher_LDADD = ../../lib/MiddleWare/libMiddleWare.la $(DL_LIBS) $(DBUSCPP_LIBS) $(RPM_LIBS)
+abrt_LDADD = ../../lib/MiddleWare/libMiddleWare.la $(DL_LIBS) $(DBUSCPP_LIBS) $(RPM_LIBS)
-dbuscrashcatcherconfdir = ${sysconfdir}/dbus-1/system.d/
-dist_dbuscrashcatcherconf_DATA = dbus-crash-catcher.conf
+dbusabrtconfdir = ${sysconfdir}/dbus-1/system.d/
+dist_dbusabrtconf_DATA = dbus-abrt.conf
diff --git a/src/Daemon/dbus-crash-catcher.conf b/src/Daemon/dbus-abrt.conf
index 75c9a6d0..75c9a6d0 100644
--- a/src/Daemon/dbus-crash-catcher.conf
+++ b/src/Daemon/dbus-abrt.conf
diff --git a/src/Gui/CCMainWindow.py b/src/Gui/CCMainWindow.py
index b622b9d0..0aad71f9 100644
--- a/src/Gui/CCMainWindow.py
+++ b/src/Gui/CCMainWindow.py
@@ -29,7 +29,7 @@ class MainWindow():
sys.exit()
#Set the Glade file
# FIXME add to PATH
- self.gladefile = "/usr/share/crash-catcher/ccgui.glade"
+ self.gladefile = "/usr/share/abrt/ccgui.glade"
self.wTree = gtk.glade.XML(self.gladefile)
#Get the Main Window, and connect the "destroy" event
diff --git a/src/Gui/CCReporterDialog.py b/src/Gui/CCReporterDialog.py
index cd55daf8..cfe11c1f 100644
--- a/src/Gui/CCReporterDialog.py
+++ b/src/Gui/CCReporterDialog.py
@@ -13,7 +13,7 @@ class ReporterDialog():
self.report = report
#Set the Glade file
# FIXME add to path
- self.gladefile = "/usr/share/crash-catcher/report.glade"
+ self.gladefile = "/usr/share/abrt/report.glade"
self.wTree = gtk.glade.XML(self.gladefile)
#Get the Main Window, and connect the "destroy" event
self.window = self.wTree.get_widget("reporter_dialog")
diff --git a/src/Gui/Makefile.am b/src/Gui/Makefile.am
index 4162dcfc..21a4423e 100644
--- a/src/Gui/Makefile.am
+++ b/src/Gui/Makefile.am
@@ -1,12 +1,12 @@
#SUBDIRS=gui tui plugins tests conf
-bin_SCRIPTS = cc-gui
+bin_SCRIPTS = abrt-gui
PYTHON_FILES = CCDBusBackend.py CCDumpList.py CCDump.py CC_gui_functions.py ccgui.glade report.glade CCReporterDialog.py CCReport.py CCMainWindow.py exception.py
GLADE_FILES = ccgui.glade report.glade
-EXTRA_DIST = $(PYTHON_FILES) $(GLADE_FILES) cc-gui crash-catcher.desktop
+EXTRA_DIST = $(PYTHON_FILES) $(GLADE_FILES) abrt-gui abrt.desktop
#ccguidir = $(pkgdatadir)
pkgdata_PYTHON = $(PYTHON_FILES)
diff --git a/src/Gui/abrt-gui b/src/Gui/abrt-gui
new file mode 100644
index 00000000..dd0897c0
--- /dev/null
+++ b/src/Gui/abrt-gui
@@ -0,0 +1,4 @@
+#! /bin/sh
+export PYTHONPATH=/usr/share/abrt
+export XLOGNAME=$LOGNAME
+exec /usr/bin/python /usr/share/abrt/CCMainWindow.py "$@"
diff --git a/src/Gui/crash-catcher.desktop b/src/Gui/abrt.desktop
index 37db7ae8..bf3df449 100644
--- a/src/Gui/crash-catcher.desktop
+++ b/src/Gui/abrt.desktop
@@ -1,9 +1,9 @@
[Desktop Entry]
Encoding=UTF-8
-Name=CrashCatcher
-Comment=Gui for crash-catcher
-Exec=cc-gui
+Name=Automatic Bug Reporting Tool
+Comment=Gui for abrt
+Exec=abrt-gui
Icon=
Terminal=false
Type=Application
diff --git a/src/Gui/cc-gui b/src/Gui/cc-gui
deleted file mode 100644
index cd6339f4..00000000
--- a/src/Gui/cc-gui
+++ /dev/null
@@ -1,4 +0,0 @@
-#! /bin/sh
-export PYTHONPATH=/usr/share/crash-catcher
-export XLOGNAME=$LOGNAME
-exec /usr/bin/python /usr/share/crash-catcher/CCMainWindow.py "$@"