From fbad219de3b0ae47a4971cf78e906af68cc97bb7 Mon Sep 17 00:00:00 2001 From: Jiri Moskovcak Date: Thu, 9 Jun 2011 15:49:08 +0200 Subject: libreport: fixed licence headers in source codes --- libreport/libreport.spec | 8 +++----- libreport/src/include/event_config.h | 1 + libreport/src/include/hash_sha1.h | 14 +++++++++++++- libreport/src/include/libreport.h | 22 ++++++++++++++++++---- libreport/src/include/problem_data.h | 2 +- libreport/src/include/report.h | 2 +- libreport/src/include/run_event.h | 2 +- libreport/src/lib/binhex.c | 10 ++++++---- libreport/src/lib/concat_path_file.c | 14 +++++++++++++- libreport/src/lib/encbase64.c | 17 ++++++++++++++++- libreport/src/lib/hash_sha1.c | 17 ++++++++++++++++- libreport/src/lib/overlapping_strcpy.c | 18 +++++++++++++++++- libreport/src/lib/read_write.c | 17 ++++++++++++++++- libreport/src/lib/skip_whitespace.c | 14 +++++++++++++- libreport/src/lib/spawn.c | 17 ++++++++++++++++- libreport/src/lib/stdio_helpers.c | 17 ++++++++++++++++- libreport/src/lib/xatonum.c | 17 ++++++++++++++++- libreport/src/report-python/__init__.py | 14 ++++++++++++++ libreport/src/report-python/accountmanager.py | 15 +++++++++++++++ libreport/src/report-python/io/GTKIO.py | 14 ++++++++++++++ libreport/src/report-python/io/NewtIO.py | 14 ++++++++++++++ libreport/src/report-python/io/TextIO.py | 14 ++++++++++++++ libreport/src/report-python/io/__init__.py | 14 ++++++++++++++ 23 files changed, 268 insertions(+), 26 deletions(-) diff --git a/libreport/libreport.spec b/libreport/libreport.spec index 9369880f..c85ebe17 100644 --- a/libreport/libreport.spec +++ b/libreport/libreport.spec @@ -17,7 +17,6 @@ BuildRequires: rpm-devel >= 4.6 BuildRequires: desktop-file-utils BuildRequires: libnotify-devel BuildRequires: xmlrpc-c-devel -#why? BuildRequires: file-devel BuildRequires: python-devel BuildRequires: gettext BuildRequires: libxml2-devel @@ -77,8 +76,6 @@ Applications for reporting bugs using libreport backend Summary: Development libraries and headers for libreport Group: Development/Libraries Requires: libreport-gtk = %{version}-%{release} -Provides: report-gtk > 0.20 -Obsoletes: report-gtk <= 0.20 %description gtk-devel Development libraries and headers for libreport-gtk @@ -101,11 +98,11 @@ make install DESTDIR=$RPM_BUILD_ROOT mandir=%{_mandir} # remove all .la and .a files find $RPM_BUILD_ROOT -name '*.la' -or -name '*.a' | xargs rm -f -mkdir -p ${RPM_BUILD_ROOT}/%{_initrddir} +mkdir -p $RPM_BUILD_ROOT/%{_initrddir} mkdir -p $RPM_BUILD_ROOT/var/spool/abrt # After everything is installed, remove info dir -rm -f %{buildroot}%{_infodir}/dir +rm -f $RPM_BUILD_ROOT/%{_infodir}/dir %clean rm -rf $RPM_BUILD_ROOT @@ -157,6 +154,7 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %{_libdir}/libreport.so %{_libdir}/libabrt_dbus.so %{_libdir}/pkgconfig/libreport.pc +%dir %{_includedir}/libreport %files python %defattr(-,root,root,-) diff --git a/libreport/src/include/event_config.h b/libreport/src/include/event_config.h index 8ab9477d..cdac4083 100644 --- a/libreport/src/include/event_config.h +++ b/libreport/src/include/event_config.h @@ -1,5 +1,6 @@ /* Copyright (C) 2011 ABRT team + Copyright (C) 2010 RedHat Inc This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/libreport/src/include/hash_sha1.h b/libreport/src/include/hash_sha1.h index 850fd21f..7299608b 100644 --- a/libreport/src/include/hash_sha1.h +++ b/libreport/src/include/hash_sha1.h @@ -7,7 +7,19 @@ * Copyright (C) 2003 Glenn L. McGrath * Copyright (C) 2003 Erik Andersen * - * Licensed under GPLv2 or later, see file LICENSE in this tarball for details. + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * --------------------------------------------------------------------------- * Issue Date: 10/11/2002 diff --git a/libreport/src/include/libreport.h b/libreport/src/include/libreport.h index 9721c90c..cd8a5cb9 100644 --- a/libreport/src/include/libreport.h +++ b/libreport/src/include/libreport.h @@ -1,8 +1,22 @@ /* - * Utility routines. - * - * Licensed under GPLv2, see file COPYING in this tarball for details. - */ + Copyright (C) 2010 ABRT team + Copyright (C) 2010 RedHat Inc + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +*/ + #ifndef LIBREPORT_H_ #define LIBREPORT_H_ diff --git a/libreport/src/include/problem_data.h b/libreport/src/include/problem_data.h index 11a6ec73..f23cb050 100644 --- a/libreport/src/include/problem_data.h +++ b/libreport/src/include/problem_data.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2009 Abrt team. + Copyright (C) 2009 ABRT team. Copyright (C) 2009 RedHat inc. This program is free software; you can redistribute it and/or modify diff --git a/libreport/src/include/report.h b/libreport/src/include/report.h index 269866b2..a5e1fa8e 100644 --- a/libreport/src/include/report.h +++ b/libreport/src/include/report.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2011 Abrt team. + Copyright (C) 2011 ABRT team. Copyright (C) 2011 RedHat inc. This program is free software; you can redistribute it and/or modify diff --git a/libreport/src/include/run_event.h b/libreport/src/include/run_event.h index 9726b643..8e2ad589 100644 --- a/libreport/src/include/run_event.h +++ b/libreport/src/include/run_event.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2009 Abrt team. + Copyright (C) 2009 ABRT team. Copyright (C) 2009 RedHat inc. This program is free software; you can redistribute it and/or modify diff --git a/libreport/src/lib/binhex.c b/libreport/src/lib/binhex.c index 238fda0c..ed6dea08 100644 --- a/libreport/src/lib/binhex.c +++ b/libreport/src/lib/binhex.c @@ -1,10 +1,11 @@ /* - Copyright (C) 2010 ABRT team - Copyright (C) 2010 RedHat Inc + Copyright (C) 2011 ABRT team + Copyright (C) 2011 RedHat Inc This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License version 2 - as published by the Free Software Foundation. + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -15,6 +16,7 @@ with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ + #include "libreport.h" static const char hexdigits_locase[] = "0123456789abcdef"; diff --git a/libreport/src/lib/concat_path_file.c b/libreport/src/lib/concat_path_file.c index a17739e3..d7f199a5 100644 --- a/libreport/src/lib/concat_path_file.c +++ b/libreport/src/lib/concat_path_file.c @@ -3,7 +3,19 @@ * * Copyright (C) 2001 Erik Andersen * - * Licensed under GPLv2 or later. + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ /* Concatenate path and filename to new allocated buffer. diff --git a/libreport/src/lib/encbase64.c b/libreport/src/lib/encbase64.c index 52e02b7f..9ba11e6c 100644 --- a/libreport/src/lib/encbase64.c +++ b/libreport/src/lib/encbase64.c @@ -1,7 +1,22 @@ /* * Copyright 2006 Rob Landley * - * Licensed under GPLv2 or later. + * Copyright (C) 2010 ABRT team + * Copyright (C) 2010 RedHat Inc + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #include "libreport.h" /* xmalloc */ diff --git a/libreport/src/lib/hash_sha1.c b/libreport/src/lib/hash_sha1.c index fafdae56..ad4ea531 100644 --- a/libreport/src/lib/hash_sha1.c +++ b/libreport/src/lib/hash_sha1.c @@ -7,7 +7,22 @@ * Copyright (C) 2003 Glenn L. McGrath * Copyright (C) 2003 Erik Andersen * - * Licensed under GPLv2 or later, see file LICENSE in this tarball for details. + * Copyright (C) 2010 ABRT team + * Copyright (C) 2010 RedHat Inc + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * --------------------------------------------------------------------------- * Issue Date: 10/11/2002 diff --git a/libreport/src/lib/overlapping_strcpy.c b/libreport/src/lib/overlapping_strcpy.c index 3301024f..824d7bd6 100644 --- a/libreport/src/lib/overlapping_strcpy.c +++ b/libreport/src/lib/overlapping_strcpy.c @@ -1,8 +1,24 @@ /* * Copyright (C) 1999-2004 by Erik Andersen * - * Licensed under GPLv2 or later, see file LICENSE in this tarball for details. + * Copyright (C) 2010 ABRT team + * Copyright (C) 2010 RedHat Inc + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ + #include "libreport.h" /* Like strcpy but can copy overlapping strings. */ diff --git a/libreport/src/lib/read_write.c b/libreport/src/lib/read_write.c index a3bbb58f..86d8a2c4 100644 --- a/libreport/src/lib/read_write.c +++ b/libreport/src/lib/read_write.c @@ -1,7 +1,22 @@ /* * Utility routines. * - * Licensed under GPLv2 or later, see file COPYING in this tarball for details. + * Copyright (C) 2010 ABRT team + * Copyright (C) 2010 RedHat Inc + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #include "libreport.h" diff --git a/libreport/src/lib/skip_whitespace.c b/libreport/src/lib/skip_whitespace.c index b2864e6f..57ef2910 100644 --- a/libreport/src/lib/skip_whitespace.c +++ b/libreport/src/lib/skip_whitespace.c @@ -2,7 +2,19 @@ /* * Copyright (C) 2003 Manuel Novoa III * - * Licensed under GPLv2 or later, see file LICENSE in this tarball for details. + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #include "libreport.h" diff --git a/libreport/src/lib/spawn.c b/libreport/src/lib/spawn.c index 2e09da27..07997307 100644 --- a/libreport/src/lib/spawn.c +++ b/libreport/src/lib/spawn.c @@ -1,7 +1,22 @@ /* * Utility routines. * - * Licensed under GPLv2, see file COPYING in this tarball for details. + * Copyright (C) 2010 ABRT team + * Copyright (C) 2010 RedHat Inc + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #include "libreport.h" diff --git a/libreport/src/lib/stdio_helpers.c b/libreport/src/lib/stdio_helpers.c index 2ce20777..b2b9238c 100644 --- a/libreport/src/lib/stdio_helpers.c +++ b/libreport/src/lib/stdio_helpers.c @@ -6,7 +6,22 @@ * Copyright (C) 2005, 2006 Rob Landley * Copyright (C) 2010 ABRT Team * - * Licensed under GPLv2 or later, see file LICENSE in this source tree. + * Copyright (C) 2010 ABRT team + * Copyright (C) 2010 RedHat Inc + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #include "libreport.h" diff --git a/libreport/src/lib/xatonum.c b/libreport/src/lib/xatonum.c index b6b90a98..a6a4ddfd 100644 --- a/libreport/src/lib/xatonum.c +++ b/libreport/src/lib/xatonum.c @@ -3,7 +3,22 @@ * * Copyright (C) 2003 Manuel Novoa III * - * Licensed under GPLv2, see file LICENSE in this tarball for details. + * Copyright (C) 2010 ABRT team + * Copyright (C) 2010 RedHat Inc + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #include "libreport.h" diff --git a/libreport/src/report-python/__init__.py b/libreport/src/report-python/__init__.py index 9efd5257..796d469b 100644 --- a/libreport/src/report-python/__init__.py +++ b/libreport/src/report-python/__init__.py @@ -1,3 +1,17 @@ +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + from _pyreport import * diff --git a/libreport/src/report-python/accountmanager.py b/libreport/src/report-python/accountmanager.py index db8ed117..878be20e 100644 --- a/libreport/src/report-python/accountmanager.py +++ b/libreport/src/report-python/accountmanager.py @@ -1,3 +1,18 @@ +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + + """ Compatibility with report package """ diff --git a/libreport/src/report-python/io/GTKIO.py b/libreport/src/report-python/io/GTKIO.py index 4cc8766e..a3b3d438 100644 --- a/libreport/src/report-python/io/GTKIO.py +++ b/libreport/src/report-python/io/GTKIO.py @@ -1,3 +1,17 @@ +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + """ Compatibility with report package """ diff --git a/libreport/src/report-python/io/NewtIO.py b/libreport/src/report-python/io/NewtIO.py index 10eae284..6f9670dd 100644 --- a/libreport/src/report-python/io/NewtIO.py +++ b/libreport/src/report-python/io/NewtIO.py @@ -1,3 +1,17 @@ +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + """ Compatibility with report package """ diff --git a/libreport/src/report-python/io/TextIO.py b/libreport/src/report-python/io/TextIO.py index 6162fb8b..5d386a61 100644 --- a/libreport/src/report-python/io/TextIO.py +++ b/libreport/src/report-python/io/TextIO.py @@ -1,3 +1,17 @@ +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + """ Compatibility with report package """ diff --git a/libreport/src/report-python/io/__init__.py b/libreport/src/report-python/io/__init__.py index 2ae28399..fd16dc91 100644 --- a/libreport/src/report-python/io/__init__.py +++ b/libreport/src/report-python/io/__init__.py @@ -1 +1,15 @@ +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + pass -- cgit From eef34b06afaaa645fe0619a9316d386b8c64267c Mon Sep 17 00:00:00 2001 From: Miroslav Lichvar Date: Wed, 8 Jun 2011 14:02:18 +0200 Subject: spec: fix service scriptlets Don't enable abrtd on update. Don't call systemctl disable with SysV only services. Follow Fedora guidelines. --- abrt.spec.in | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/abrt.spec.in b/abrt.spec.in index 143e8b65..1808fa64 100644 --- a/abrt.spec.in +++ b/abrt.spec.in @@ -261,10 +261,10 @@ if [ $1 -eq 1 ]; then fi #systemd %if %{?with_systemd} -#if [ $1 -eq 1 ]; then +if [ $1 -eq 1 ]; then # Enable (but don't start) the units by default /bin/systemctl enable abrtd.service >/dev/null 2>&1 || : -#fi +fi %endif %post addon-ccpp @@ -291,8 +291,8 @@ fi #systemd %if %{?with_systemd} if [ "$1" -eq "0" ] ; then + /bin/systemctl --no-reload disable abrtd.service > /dev/null 2>&1 || : /bin/systemctl stop abrtd.service >/dev/null 2>&1 || : - /bin/systemctl disable abrtd.service >/dev/null 2>&1 || : fi %endif @@ -302,10 +302,10 @@ if [ "$1" -eq "0" ] ; then /sbin/chkconfig --del abrt-ccpp fi #systemd (not tested): -%if %{?with_systemd} +%if 0 if [ "$1" -eq "0" ] ; then + /bin/systemctl --no-reload disable abrt-ccpp.service >/dev/null 2>&1 || : /bin/systemctl stop abrt-ccpp.service >/dev/null 2>&1 || : - /bin/systemctl disable abrt-ccpp.service >/dev/null 2>&1 || : fi %endif @@ -315,20 +315,17 @@ if [ "$1" -eq "0" ] ; then /sbin/chkconfig --del abrt-oops fi #systemd (not tested): -%if %{?with_systemd} +%if 0 if [ "$1" -eq "0" ] ; then + /bin/systemctl --no-reload abrt-oops.service >/dev/null 2>&1 || : /bin/systemctl stop abrt-oops.service >/dev/null 2>&1 || : - /bin/systemctl disable abrt-oops.service >/dev/null 2>&1 || : fi %endif -%postun -#systemd %if %{?with_systemd} -if [ $1 -ge 1 ] ; then -# On upgrade, reload init system configuration if we changed unit files - /bin/systemctl daemon-reload >/dev/null 2>&1 || : -fi +%postun +/bin/systemctl daemon-reload >/dev/null 2>&1 || : + %endif %post gui -- cgit From e495dd05e5c938008e9a1126985710b8e22d9ea6 Mon Sep 17 00:00:00 2001 From: Miroslav Lichvar Date: Wed, 8 Jun 2011 14:45:24 +0200 Subject: add abrt-oops systemd service (trac#287) --- abrt.spec.in | 18 +++++++++++++++--- src/plugins/Makefile.am | 5 +++++ src/plugins/abrt-oops.service | 9 +++++++++ 3 files changed, 29 insertions(+), 3 deletions(-) create mode 100644 src/plugins/abrt-oops.service diff --git a/abrt.spec.in b/abrt.spec.in index 1808fa64..8b622429 100644 --- a/abrt.spec.in +++ b/abrt.spec.in @@ -281,7 +281,13 @@ fi if [ $1 -eq 1 ]; then /sbin/chkconfig --add abrt-oops fi -#systemd: TODO +#systemd +%if %{?with_systemd} +if [ $1 -eq 1 ]; then + # Enable (but don't start) the units by default + /bin/systemctl enable abrt-oops.service >/dev/null 2>&1 || : +fi +%endif %preun if [ "$1" -eq "0" ] ; then @@ -314,8 +320,8 @@ if [ "$1" -eq "0" ] ; then service abrt-oops stop >/dev/null 2>&1 /sbin/chkconfig --del abrt-oops fi -#systemd (not tested): -%if 0 +#systemd +%if %{?with_systemd} if [ "$1" -eq "0" ] ; then /bin/systemctl --no-reload abrt-oops.service >/dev/null 2>&1 || : /bin/systemctl stop abrt-oops.service >/dev/null 2>&1 || : @@ -326,6 +332,9 @@ fi %postun /bin/systemctl daemon-reload >/dev/null 2>&1 || : +%postun addon-kerneloops +/bin/systemctl daemon-reload >/dev/null 2>&1 || : + %endif %post gui @@ -447,6 +456,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %config(noreplace) %{_sysconfdir}/%{name}/plugins/Kerneloops.conf %{_sysconfdir}/%{name}/events/report_Kerneloops.xml %config(noreplace) %{_sysconfdir}/%{name}/events.d/koops_events.conf +%if %{?with_systemd} +/lib/systemd/system/abrt-oops.service +%endif %{_initrddir}/abrt-oops %{_mandir}/man*/abrt-action-kerneloops.* %{_bindir}/abrt-dump-oops diff --git a/src/plugins/Makefile.am b/src/plugins/Makefile.am index b041b060..a8d0f989 100644 --- a/src/plugins/Makefile.am +++ b/src/plugins/Makefile.am @@ -409,3 +409,8 @@ abrt_retrace_client_SOURCES = \ $(NSS_LIBS) DEFS = -DLOCALEDIR=\"$(localedir)\" @DEFS@ + +if HAVE_SYSTEMD +dist_systemdsystemunit_DATA = \ + abrt-oops.service +endif diff --git a/src/plugins/abrt-oops.service b/src/plugins/abrt-oops.service new file mode 100644 index 00000000..4911e2ba --- /dev/null +++ b/src/plugins/abrt-oops.service @@ -0,0 +1,9 @@ +[Unit] +Description=ABRT kernel log watcher +After=syslog.target + +[Service] +ExecStart=/usr/bin/abrt-dump-oops -d /var/spool/abrt -rwx /var/log/messages + +[Install] +WantedBy=multi-user.target -- cgit From aa851e935485de31e3c1008756fdd85deef5bb88 Mon Sep 17 00:00:00 2001 From: Miroslav Lichvar Date: Thu, 9 Jun 2011 16:24:16 +0200 Subject: move code from ccpp initscript to abrt-install-ccpp-hook It will be used by systemd service. --- abrt-ccpp.init | 91 ++++--------------------------------- abrt.spec.in | 1 + src/hooks/Makefile.am | 5 ++- src/hooks/abrt-install-ccpp-hook | 97 ++++++++++++++++++++++++++++++++++++++++ 4 files changed, 111 insertions(+), 83 deletions(-) create mode 100755 src/hooks/abrt-install-ccpp-hook diff --git a/abrt-ccpp.init b/abrt-ccpp.init index 7f236237..8935378b 100644 --- a/abrt-ccpp.init +++ b/abrt-ccpp.init @@ -15,38 +15,8 @@ # Source function library. . /etc/rc.d/init.d/functions -# For debugging -dry_run=false -verbose=false - -# We don't have pid files, therefore have to use -# a flag file in /var/lock/subsys to enable GUI service tools -# to figure out our status LOCK="/var/lock/subsys/abrt-ccpp" - -PATTERN_FILE="/proc/sys/kernel/core_pattern" -SAVED_PATTERN_DIR="/var/run/abrt" -SAVED_PATTERN_FILE="/var/run/abrt/saved_core_pattern" -HOOK_BIN="/usr/libexec/abrt-hook-ccpp" -# Must match percent_specifiers[] order in abrt-hook-ccpp.c: -PATTERN="|$HOOK_BIN /var/spool/abrt %s %c %p %u %g %t %e" -# Same, but with bogus "executable name" parameter -PATTERN1="|$HOOK_BIN /var/spool/abrt %s %c %p %u %g %t 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/ of crashing -# process will be available for dump_helper. -# 4 - means that 4 dump_helpers can run at the same time (the rest will also -# run, but they will fail to read /proc/). -# -# This should be enough for ABRT, we can miss some crashes, but what are -# the odds that more processes crash at the same time? And moreover, -# do people want to save EVERY ONE of the crashes when they have -# a crash storm? I don't think so. -# The value of 4 has been recommended by nhorman. -# -CORE_PIPE_LIMIT_FILE="/proc/sys/kernel/core_pipe_limit" -CORE_PIPE_LIMIT="4" +INSTALL_HOOK="/usr/sbin/abrt-install-ccpp-hook" RETVAL=0 @@ -58,46 +28,18 @@ check() { start() { check - cur=`cat "$PATTERN_FILE"` - cur_first=`printf "%s" "$cur" | sed 's/ .*//'` - - # Is there a %e (executable name) in old pattern anywhere? - if test x"${cur#.*%e}" = x"${cur}"; then - # No. Can use PATTERN with less risk of overflow - # on expansion (executable names can be LONG). - # Overflow would cause kernel to abort coredump. BAD. - PATTERN="$PATTERN1" - fi - - $verbose && printf "cur:'%s'\n" "$cur" - # Is it already installed? - if test x"$cur_first" != x"|$HOOK_BIN"; then # no - # It is not installed - mkdir -p -- "$SAVED_PATTERN_DIR" - printf "%s\n" "$cur" >"$SAVED_PATTERN_FILE" - # Install new handler - $verbose && printf "Installing to %s:'%s'\n" "$PATTERN_FILE" "$PATTERN" - $dry_run || echo "$PATTERN" >"$PATTERN_FILE" - $dry_run || touch -- "$LOCK" - - # Check core_pipe_limit and change it if it's 0, - # otherwise the abrt-hook-ccpp won't be able to read /proc/ - # of the crashing process - if test x"`cat "$CORE_PIPE_LIMIT_FILE"`" = x"0"; then - echo "$CORE_PIPE_LIMIT" >"$CORE_PIPE_LIMIT_FILE" - fi - fi + $INSTALL_HOOK install + RETVAL=$? + [ $RETVAL -eq 0 ] && touch -- "$LOCK" return $RETVAL } stop() { check - if test -f "$SAVED_PATTERN_FILE"; then - $verbose && printf "Restoring to %s:'%s'\n" "$PATTERN_FILE" "`cat "$SAVED_PATTERN_FILE"`" - $dry_run || cat "$SAVED_PATTERN_FILE" >"$PATTERN_FILE" - fi - $dry_run || rm -f -- "$LOCK" + $INSTALL_HOOK uninstall + RETVAL=$? + [ $RETVAL -eq 0 ] && rm -f -- "$LOCK" return $RETVAL } @@ -128,25 +70,10 @@ restart) restart ;; condrestart) - cur=`cat "$PATTERN_FILE"` - cur_first=`printf "%s" "$cur" | sed 's/ .*//'` - # Is it already installed? - if test x"$cur_first" = x"|$HOOK_BIN"; then # yes - $verbose && printf "Installed, re-installing\n" - restart - fi + $INSTALL_HOOK is-installed && restart ;; status) - cur=`cat "$PATTERN_FILE"` - cur_first=`printf "%s" "$cur" | sed 's/ .*//'` - # Is it already installed? - if test x"$cur_first" = x"|$HOOK_BIN"; then # yes - $verbose && printf "Installed\n" - RETVAL=0 - else - $verbose && printf "Not installed\n" - RETVAL=3 # "stopped normally" - fi + $INSTALL_HOOK is-installed && RETVAL=0 || RETVAL=3 ;; *) echo $"Usage: $0 {start|stop|status|restart|condrestart|reload|force-reload}" diff --git a/abrt.spec.in b/abrt.spec.in index 8b622429..3d9dd0d0 100644 --- a/abrt.spec.in +++ b/abrt.spec.in @@ -442,6 +442,7 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %{_bindir}/abrt-action-generate-backtrace %{_bindir}/abrt-action-analyze-backtrace %{_bindir}/abrt-action-list-dsos.py* +%{_sbindir}/abrt-install-ccpp-hook %{_sysconfdir}/%{name}/events.d/ccpp_events.conf %{_sysconfdir}/%{name}/events/analyze_LocalGDB.xml %{_sysconfdir}/%{name}/events/analyze_RetraceServer.xml diff --git a/src/hooks/Makefile.am b/src/hooks/Makefile.am index 3fdc59ec..49eddcf3 100644 --- a/src/hooks/Makefile.am +++ b/src/hooks/Makefile.am @@ -3,6 +3,9 @@ pluginsconfdir = $(PLUGINS_CONF_DIR) dist_pluginsconf_DATA = \ CCpp.conf +sbin_SCRIPTS = \ + abrt-install-ccpp-hook + libexec_PROGRAMS = abrt-hook-ccpp # abrt-hook-ccpp @@ -24,7 +27,7 @@ abrt_hook_ccpp_LDADD = \ $(LIBREPORT_LIBS) python_PYTHON = abrt.pth abrt_exception_handler.py -EXTRA_DIST = abrt_exception_handler.py.in $(man_MANS) +EXTRA_DIST = abrt_exception_handler.py.in abrt-install-ccpp-hook $(man_MANS) CLEANFILES := $(notdir $(wildcard *~)) $(notdir $(wildcard *\#)) $(notdir $(wildcard \.\#*)) $(notdir $(wildcard *.pyc)) diff --git a/src/hooks/abrt-install-ccpp-hook b/src/hooks/abrt-install-ccpp-hook new file mode 100755 index 00000000..12a443f0 --- /dev/null +++ b/src/hooks/abrt-install-ccpp-hook @@ -0,0 +1,97 @@ +#!/bin/bash +# Install coredump handler which saves segfault data + +# For debugging + +dry_run=false +verbose=false + +PATTERN_FILE="/proc/sys/kernel/core_pattern" +SAVED_PATTERN_DIR="/var/run/abrt" +SAVED_PATTERN_FILE="/var/run/abrt/saved_core_pattern" +HOOK_BIN="/usr/libexec/abrt-hook-ccpp" +# Must match percent_specifiers[] order in abrt-hook-ccpp.c: +PATTERN="|$HOOK_BIN /var/spool/abrt %s %c %p %u %g %t %e" +# Same, but with bogus "executable name" parameter +PATTERN1="|$HOOK_BIN /var/spool/abrt %s %c %p %u %g %t 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/ of crashing +# process will be available for dump_helper. +# 4 - means that 4 dump_helpers can run at the same time (the rest will also +# run, but they will fail to read /proc/). +# +# This should be enough for ABRT, we can miss some crashes, but what are +# the odds that more processes crash at the same time? And moreover, +# do people want to save EVERY ONE of the crashes when they have +# a crash storm? I don't think so. +# The value of 4 has been recommended by nhorman. +# +CORE_PIPE_LIMIT_FILE="/proc/sys/kernel/core_pipe_limit" +CORE_PIPE_LIMIT="4" + +start() { + cur=`cat "$PATTERN_FILE"` + cur_first=`printf "%s" "$cur" | sed 's/ .*//'` + + # Is there a %e (executable name) in old pattern anywhere? + if test x"${cur#.*%e}" = x"${cur}"; then + # No. Can use PATTERN with less risk of overflow + # on expansion (executable names can be LONG). + # Overflow would cause kernel to abort coredump. BAD. + PATTERN="$PATTERN1" + fi + + $verbose && printf "cur:'%s'\n" "$cur" + # Is it already installed? + if test x"$cur_first" != x"|$HOOK_BIN"; then # no + # It is not installed + mkdir -p -- "$SAVED_PATTERN_DIR" + printf "%s\n" "$cur" >"$SAVED_PATTERN_FILE" + # Install new handler + $verbose && printf "Installing to %s:'%s'\n" "$PATTERN_FILE" "$PATTERN" + $dry_run || echo "$PATTERN" >"$PATTERN_FILE" + + # Check core_pipe_limit and change it if it's 0, + # otherwise the abrt-hook-ccpp won't be able to read /proc/ + # of the crashing process + if test x"`cat "$CORE_PIPE_LIMIT_FILE"`" = x"0"; then + echo "$CORE_PIPE_LIMIT" >"$CORE_PIPE_LIMIT_FILE" + fi + fi +} + +stop() { + if test -f "$SAVED_PATTERN_FILE"; then + $verbose && printf "Restoring to %s:'%s'\n" "$PATTERN_FILE" "`cat "$SAVED_PATTERN_FILE"`" + $dry_run || cat "$SAVED_PATTERN_FILE" >"$PATTERN_FILE" + fi +} + +status() { + cur=`cat "$PATTERN_FILE"` + cur_first=`printf "%s" "$cur" | sed 's/ .*//'` + # Is it already installed? + if test x"$cur_first" = x"|$HOOK_BIN"; then # yes + $verbose && printf "Installed\n" + return 0 + else + $verbose && printf "Not installed\n" + return 1 + fi +} + +case "$1" in +install) + start + ;; +uninstall) + stop + ;; +is-installed) + status + ;; +*) + echo $"Usage: $0 {install|uninstall|is-installed}" + return 2 +esac -- cgit From ffbc6920a332db496dd633f3b7dec944c10d12bf Mon Sep 17 00:00:00 2001 From: Miroslav Lichvar Date: Thu, 9 Jun 2011 16:37:30 +0200 Subject: add abrt-ccpp systemd service (trac#288) --- abrt.spec.in | 18 +++++++++++++++--- src/hooks/Makefile.am | 5 +++++ src/hooks/abrt-ccpp.service | 11 +++++++++++ 3 files changed, 31 insertions(+), 3 deletions(-) create mode 100644 src/hooks/abrt-ccpp.service diff --git a/abrt.spec.in b/abrt.spec.in index 3d9dd0d0..c0e58f5e 100644 --- a/abrt.spec.in +++ b/abrt.spec.in @@ -275,7 +275,13 @@ chown -R abrt:abrt %{_localstatedir}/cache/abrt-di if [ $1 -eq 1 ]; then /sbin/chkconfig --add abrt-ccpp fi -#systemd: TODO +#systemd +%if %{?with_systemd} +if [ $1 -eq 1 ]; then + # Enable (but don't start) the units by default + /bin/systemctl enable abrt-ccpp.service >/dev/null 2>&1 || : +fi +%endif %post addon-kerneloops if [ $1 -eq 1 ]; then @@ -307,8 +313,8 @@ if [ "$1" -eq "0" ] ; then service abrt-ccpp stop >/dev/null 2>&1 /sbin/chkconfig --del abrt-ccpp fi -#systemd (not tested): -%if 0 +#systemd +%if %{?with_systemd} if [ "$1" -eq "0" ] ; then /bin/systemctl --no-reload disable abrt-ccpp.service >/dev/null 2>&1 || : /bin/systemctl stop abrt-ccpp.service >/dev/null 2>&1 || : @@ -335,6 +341,9 @@ fi %postun addon-kerneloops /bin/systemctl daemon-reload >/dev/null 2>&1 || : +%postun addon-ccpp +/bin/systemctl daemon-reload >/dev/null 2>&1 || : + %endif %post gui @@ -432,6 +441,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %defattr(-,root,root,-) %config(noreplace) %{_sysconfdir}/%{name}/plugins/CCpp.conf %dir %attr(0775, abrt, abrt) %{_localstatedir}/cache/abrt-di +%if %{?with_systemd} +/lib/systemd/system/abrt-ccpp.service +%endif %{_initrddir}/abrt-ccpp %{_libexecdir}/abrt-hook-ccpp %{_bindir}/abrt-action-analyze-c diff --git a/src/hooks/Makefile.am b/src/hooks/Makefile.am index 49eddcf3..95cd3634 100644 --- a/src/hooks/Makefile.am +++ b/src/hooks/Makefile.am @@ -38,3 +38,8 @@ abrt_exception_handler.py: # RPM fix: we need to regenerate abrt_exception_handler.py, because it has the default ddir install-data-local: sed s,\@VAR_RUN\@,\"$(VAR_RUN)\",g abrt_exception_handler.py.in > abrt_exception_handler.py + +if HAVE_SYSTEMD +dist_systemdsystemunit_DATA = \ + abrt-ccpp.service +endif diff --git a/src/hooks/abrt-ccpp.service b/src/hooks/abrt-ccpp.service new file mode 100644 index 00000000..663322cb --- /dev/null +++ b/src/hooks/abrt-ccpp.service @@ -0,0 +1,11 @@ +[Unit] +Description=Install ABRT coredump hook + +[Service] +Type=oneshot +ExecStart=/usr/sbin/abrt-install-ccpp-hook install +ExecStop=/usr/sbin/abrt-install-ccpp-hook uninstall +RemainAfterExit=yes + +[Install] +WantedBy=multi-user.target -- cgit From 3382b1481f83cc615e35d0144e5880e4375e629b Mon Sep 17 00:00:00 2001 From: Miroslav Lichvar Date: Thu, 9 Jun 2011 16:56:48 +0200 Subject: don't package SysV init scripts with systemd --- abrt.spec.in | 69 +++++++++++++++++++++++++++--------------------------------- 1 file changed, 31 insertions(+), 38 deletions(-) diff --git a/abrt.spec.in b/abrt.spec.in index c0e58f5e..75fcc9c9 100644 --- a/abrt.spec.in +++ b/abrt.spec.in @@ -257,15 +257,13 @@ exit 0 %post if [ $1 -eq 1 ]; then - /sbin/chkconfig --add abrtd -fi -#systemd %if %{?with_systemd} -if [ $1 -eq 1 ]; then -# Enable (but don't start) the units by default + # Enable (but don't start) the units by default /bin/systemctl enable abrtd.service >/dev/null 2>&1 || : -fi +%else + /sbin/chkconfig --add abrtd %endif +fi %post addon-ccpp # this is required for transition from 1.1.x to 2.x @@ -273,66 +271,56 @@ fi # so 2.x fails when it tries to extract debuginfo there.. chown -R abrt:abrt %{_localstatedir}/cache/abrt-di if [ $1 -eq 1 ]; then - /sbin/chkconfig --add abrt-ccpp -fi -#systemd %if %{?with_systemd} -if [ $1 -eq 1 ]; then # Enable (but don't start) the units by default /bin/systemctl enable abrt-ccpp.service >/dev/null 2>&1 || : -fi +%else + /sbin/chkconfig --add abrt-ccpp %endif +fi %post addon-kerneloops if [ $1 -eq 1 ]; then - /sbin/chkconfig --add abrt-oops -fi -#systemd %if %{?with_systemd} -if [ $1 -eq 1 ]; then # Enable (but don't start) the units by default /bin/systemctl enable abrt-oops.service >/dev/null 2>&1 || : -fi +%else + /sbin/chkconfig --add abrt-oops %endif +fi %preun if [ "$1" -eq "0" ] ; then - service abrtd stop >/dev/null 2>&1 - /sbin/chkconfig --del abrtd -fi -#systemd %if %{?with_systemd} -if [ "$1" -eq "0" ] ; then /bin/systemctl --no-reload disable abrtd.service > /dev/null 2>&1 || : /bin/systemctl stop abrtd.service >/dev/null 2>&1 || : -fi +%else + service abrtd stop >/dev/null 2>&1 + /sbin/chkconfig --del abrtd %endif +fi %preun addon-ccpp if [ "$1" -eq "0" ] ; then - service abrt-ccpp stop >/dev/null 2>&1 - /sbin/chkconfig --del abrt-ccpp -fi -#systemd %if %{?with_systemd} -if [ "$1" -eq "0" ] ; then /bin/systemctl --no-reload disable abrt-ccpp.service >/dev/null 2>&1 || : /bin/systemctl stop abrt-ccpp.service >/dev/null 2>&1 || : -fi +%else + service abrt-ccpp stop >/dev/null 2>&1 + /sbin/chkconfig --del abrt-ccpp %endif +fi %preun addon-kerneloops if [ "$1" -eq "0" ] ; then - service abrt-oops stop >/dev/null 2>&1 - /sbin/chkconfig --del abrt-oops -fi -#systemd %if %{?with_systemd} -if [ "$1" -eq "0" ] ; then /bin/systemctl --no-reload abrt-oops.service >/dev/null 2>&1 || : /bin/systemctl stop abrt-oops.service >/dev/null 2>&1 || : -fi +%else + service abrt-oops stop >/dev/null 2>&1 + /sbin/chkconfig --del abrt-oops %endif +fi %if %{?with_systemd} %postun @@ -375,9 +363,11 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %files -f %{name}.lang %defattr(-,root,root,-) %doc README COPYING -#systemd %if %{?with_systemd} /lib/systemd/system/abrtd.service +%exclude %{_initrddir}/abrtd +%else +%{_initrddir}/abrtd %endif %{_sbindir}/abrtd %{_sbindir}/abrt-server @@ -389,7 +379,6 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %config(noreplace) %{_sysconfdir}/%{name}/gpg_keys %config(noreplace) %{_sysconfdir}/dbus-1/system.d/dbus-abrt.conf %{_sysconfdir}/%{name}/events.d/smart_event.conf -%{_initrddir}/abrtd %dir %attr(0755, abrt, abrt) %{_localstatedir}/spool/%{name} %dir %attr(0700, abrt, abrt) %{_localstatedir}/spool/%{name}-upload %dir %attr(0775, abrt, abrt) %{_localstatedir}/run/%{name} @@ -443,8 +432,10 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %dir %attr(0775, abrt, abrt) %{_localstatedir}/cache/abrt-di %if %{?with_systemd} /lib/systemd/system/abrt-ccpp.service -%endif +%exclude %{_initrddir}/abrt-ccpp +%else %{_initrddir}/abrt-ccpp +%endif %{_libexecdir}/abrt-hook-ccpp %{_bindir}/abrt-action-analyze-c %{_bindir}/abrt-action-trim-files @@ -471,8 +462,10 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %config(noreplace) %{_sysconfdir}/%{name}/events.d/koops_events.conf %if %{?with_systemd} /lib/systemd/system/abrt-oops.service -%endif +%exclude %{_initrddir}/abrt-oops +%else %{_initrddir}/abrt-oops +%endif %{_mandir}/man*/abrt-action-kerneloops.* %{_bindir}/abrt-dump-oops %{_bindir}/abrt-action-analyze-oops -- cgit From 49a50952fb29fbaf544f8e947218fe16a479a0be Mon Sep 17 00:00:00 2001 From: Jiri Moskovcak Date: Fri, 10 Jun 2011 12:44:48 +0200 Subject: pyhook: moved import syslog from module scope into the callsites that use it rhbz#672043 - fixes build of python when ABRT is installed --- src/hooks/abrt_exception_handler.py.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/hooks/abrt_exception_handler.py.in b/src/hooks/abrt_exception_handler.py.in index d12968e1..5b45fcd4 100644 --- a/src/hooks/abrt_exception_handler.py.in +++ b/src/hooks/abrt_exception_handler.py.in @@ -24,7 +24,6 @@ Module for the ABRT exception handling hook import sys import os -import syslog import socket def write_dump(pid, tb): @@ -48,6 +47,7 @@ def write_dump(pid, tb): s.sendall("DONE\0") s.close() except Exception, ex: + import syslog syslog.syslog("can't communicate with ABRT daemon, is it running? %s", str(ex)) def handleMyException((etype, value, tb)): @@ -67,10 +67,10 @@ def handleMyException((etype, value, tb)): return sys.__excepthook__(etype, value, tb) try: - import os import os.path import traceback import errno + import syslog # EPIPE is not a crash, it happens all the time # Testcase: script.py | true, where script.py is: -- cgit From 1a396978d78cb66f3c228d2ef7909cb8f3ecd9e6 Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Fri, 10 Jun 2011 13:57:33 +0200 Subject: add element seletors to .xml files; fix a few places where we expect package data Signed-off-by: Denys Vlasenko --- libreport/src/gui-wizard-gtk/wizard.c | 4 ++-- scripts/dbg_rpminst | 2 +- scripts/dbg_rpmuninst | 2 +- src/daemon/CommLayerServerDBus.c | 6 ++++++ src/gui-gtk/abrt-gtk.c | 1 - src/plugins/report_Bugzilla.xml.in | 4 ++-- src/plugins/report_Kerneloops.xml.in | 7 +++++++ src/plugins/report_Mailx.xml.in | 7 +++++++ src/plugins/report_RHTSupport.xml.in | 7 +++++++ 9 files changed, 33 insertions(+), 7 deletions(-) diff --git a/libreport/src/gui-wizard-gtk/wizard.c b/libreport/src/gui-wizard-gtk/wizard.c index 430c8a93..d7164d6d 100644 --- a/libreport/src/gui-wizard-gtk/wizard.c +++ b/libreport/src/gui-wizard-gtk/wizard.c @@ -1170,9 +1170,9 @@ static void check_bt_rating_and_allow_send(void) * but so far only oopses don't have rating, so for now we * skip the "kernel" manually */ - const char *component = get_problem_item_content_or_NULL(g_cd, FILENAME_COMPONENT); + const char *analyzer = get_problem_item_content_or_NULL(g_cd, FILENAME_ANALYZER); //FIXME: say "no" to special casing! - if (strcmp(component, "kernel") != 0) + if (analyzer && strcmp(analyzer, "Kerneloops") != 0) { const char *rating = get_problem_item_content_or_NULL(g_cd, FILENAME_RATING); //COMPAT, remove after 2.1 release diff --git a/scripts/dbg_rpminst b/scripts/dbg_rpminst index ea70278c..76bf38ea 100755 --- a/scripts/dbg_rpminst +++ b/scripts/dbg_rpminst @@ -4,6 +4,6 @@ BUILDDIR="00_builddir" cd "$BUILDDIR" || exit 1 -yum -y -C erase 'abrt*' 'libreport*' 'report*' +yum -y -C erase 'abrt*' yum -y -C --nogpgcheck localinstall *.rpm killall -HUP dbus-daemon diff --git a/scripts/dbg_rpmuninst b/scripts/dbg_rpmuninst index 0635116a..2ffbf4ef 100755 --- a/scripts/dbg_rpmuninst +++ b/scripts/dbg_rpmuninst @@ -1,3 +1,3 @@ #!/bin/sh -yum -C -y erase 'abrt*' 'libreport*' 'report*' +yum -C -y erase 'abrt*' diff --git a/src/daemon/CommLayerServerDBus.c b/src/daemon/CommLayerServerDBus.c index 05f7df92..28a4002d 100644 --- a/src/daemon/CommLayerServerDBus.c +++ b/src/daemon/CommLayerServerDBus.c @@ -58,6 +58,12 @@ void send_dbus_sig_Crash(const char *package_name, const char *dir, const char *uid_str ) { + /* Happens, for example, if abrt-action-save-package-data + * is not configured to run. + */ + if (!package_name) + package_name = ""; + DBusMessage* msg = new_signal_msg("Crash", NULL); if (uid_str) { diff --git a/src/gui-gtk/abrt-gtk.c b/src/gui-gtk/abrt-gtk.c index a3bf1cab..9a49787d 100644 --- a/src/gui-gtk/abrt-gtk.c +++ b/src/gui-gtk/abrt-gtk.c @@ -213,7 +213,6 @@ static void on_button_send_cb(GtkWidget *button, gpointer data) static void on_menu_report_cb(GtkMenuItem *menuitem, gpointer unused) { - s_report_window = gtk_window_new(GTK_WINDOW_TOPLEVEL); gtk_window_set_title(GTK_WINDOW(s_report_window), _("Problem description")); gtk_window_set_default_size(GTK_WINDOW(s_report_window), 400, 400); diff --git a/src/plugins/report_Bugzilla.xml.in b/src/plugins/report_Bugzilla.xml.in index d12521d8..00ef4a49 100644 --- a/src/plugins/report_Bugzilla.xml.in +++ b/src/plugins/report_Bugzilla.xml.in @@ -3,8 +3,8 @@ <_name>Bugzilla <_description>Report to Bugzilla bug tracker - - + component,duphash,os_release + coredump,count,event_log,reported_to yes diff --git a/src/plugins/report_Kerneloops.xml.in b/src/plugins/report_Kerneloops.xml.in index 83ea50b5..a4da6b6b 100644 --- a/src/plugins/report_Kerneloops.xml.in +++ b/src/plugins/report_Kerneloops.xml.in @@ -2,6 +2,13 @@ <_name>Kerneloops.org <_description>Send kernel problems to oops tracker + + backtrace + + * + yes + +