diff --git a/libreport.spec.in b/libreport.spec.in index ff1bba5..1d94020 100644 --- a/libreport.spec.in +++ b/libreport.spec.in @@ -2,6 +2,12 @@ # platform-dependent %{!?python_sitearch: %define python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")} +%if 0%{?suse_version} +%define suse 1 +%else +%define suse 0 +%endif + Summary: Generic library for reporting various problems Name: libreport Version: @@LIBREPORT_VERSION@@ @@ -10,22 +16,26 @@ License: GPLv2+ Group: System Environment/Libraries URL: https://fedorahosted.org/abrt/ Source: https://fedorahosted.org/released/abrt/%{name}-%{version}.tar.gz -BuildRequires: dbus-devel BuildRequires: gtk3-devel BuildRequires: curl-devel BuildRequires: desktop-file-utils +%if %{suse} +BuildRequires: dbus-1-devel +BuildRequires: mozilla-nss-devel +%else +BuildRequires: dbus-devel +BuildRequires: nss-devel BuildRequires: xmlrpc-c-devel +%endif BuildRequires: python-devel BuildRequires: gettext BuildRequires: libxml2-devel BuildRequires: libtar-devel BuildRequires: intltool BuildRequires: libtool -BuildRequires: nss-devel BuildRequires: texinfo BuildRequires: asciidoc BuildRequires: xmlto -BuildRequires: newt-devel BuildRequires: libproxy-devel BuildRequires: btparser-devel Requires: libreport-filesystem @@ -159,28 +169,34 @@ Obsoletes: abrt-plugin-mailx < 2.0.4 The simple reporter plugin which sends a report via mailx to a specified email address. -%package plugin-bugzilla -Summary: %{name}'s bugzilla plugin -Group: System Environment/Libraries -Requires: %{name} = %{version}-%{release} -Obsoletes: abrt-plugin-bugzilla < 2.0.4 -Provides: report-plugin-bugzilla = 0:0.23-1 -Obsoletes: report-plugin-bugzilla < 0:0.23-1 -Provides: report-config-bugzilla-redhat-com = 0:0.23-1 -Obsoletes: report-config-bugzilla-redhat-com < 0:0.23-1 - %package plugin-ureport Summary: %{name}'s micro report plugin +%if %{suse} +BuildRequires: libjson-devel +%else BuildRequires: json-c-devel +%endif Group: System Environment/Libraries Requires: %{name} = %{version}-%{release} %description plugin-ureport Uploads micro-report to abrt server +%if !%{suse} %description plugin-bugzilla Plugin to report bugs into the bugzilla. +%package plugin-bugzilla +Summary: %{name}'s bugzilla plugin +Group: System Environment/Libraries +Requires: %{name} = %{version}-%{release} +Obsoletes: abrt-plugin-bugzilla < 2.0.4 +Provides: report-plugin-bugzilla = 0:0.23-1 +Obsoletes: report-plugin-bugzilla < 0:0.23-1 +Provides: report-config-bugzilla-redhat-com = 0:0.23-1 +Obsoletes: report-config-bugzilla-redhat-com < 0:0.23-1 +%endif + %package plugin-rhtsupport Summary: %{name}'s RHTSupport plugin Group: System Environment/Libraries @@ -242,7 +258,12 @@ infrastructure or uploading the gathered data over ftp/scp... %build autoconf -CFLAGS="%{optflags} -Werror" %configure --disable-silent-rules +CFLAGS="%{optflags} -Werror" %configure \ +%if %{suse} + --without-bugzilla \ +%endif + --disable-silent-rules + make %{?_smp_mflags} %install @@ -382,6 +403,7 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : #%{_mandir}/man1/reporter-ureport.1.gz %{_sysconfdir}/libreport/events/report_uReport.xml +%if !%{suse} %files plugin-bugzilla %defattr(-,root,root,-) %config(noreplace) %{_sysconfdir}/libreport/plugins/bugzilla.conf @@ -394,6 +416,7 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : # FIXME: remove with the old gui %{_mandir}/man1/reporter-bugzilla.1.gz %{_bindir}/reporter-bugzilla +%endif %files plugin-rhtsupport %defattr(-,root,root,-) diff --git a/po/POTFILES.in b/po/POTFILES.in index 1d0ca85..e8b2b5d 100644 --- a/po/POTFILES.in +++ b/po/POTFILES.in @@ -22,7 +22,7 @@ src/lib/parse_options.c src/lib/problem_data.c src/lib/run_event.c src/plugins/abrt_rh_support.c -src/plugins/report_Bugzilla.xml.in +#src/plugins/report_Bugzilla.xml.in src/plugins/report.c src/plugins/reporter-bugzilla.c src/plugins/reporter-kerneloops.c diff --git a/src/lib/dump_dir.c b/src/lib/dump_dir.c index 57c439d..2203c7c 100644 --- a/src/lib/dump_dir.c +++ b/src/lib/dump_dir.c @@ -556,7 +556,15 @@ void dd_create_basic_files(struct dump_dir *dd, uid_t uid, const char *chroot_di release = load_text_file("/etc/system-release", DD_LOAD_TEXT_RETURN_NULL_ON_FAILURE); if (!release) - release = load_text_file("/etc/redhat-release", /*flags:*/ 0); + release = load_text_file("/etc/redhat-release", + DD_LOAD_TEXT_RETURN_NULL_ON_FAILURE); + if (!release) + release = load_text_file("/etc/SuSE-release", /* flags */ 0); + + char *newline = strchr(release, '\n'); + if (newline) + *newline = '\0'; + dd_save_text(dd, FILENAME_OS_RELEASE, release); if (chroot_dir) { diff --git a/src/plugins/Makefile.am b/src/plugins/Makefile.am index f121205..2413590 100644 --- a/src/plugins/Makefile.am +++ b/src/plugins/Makefile.am @@ -60,12 +60,12 @@ eventsconfdir = $(EVENTS_CONF_DIR) dist_eventsconf_DATA = \ mailx_event.conf \ print_event.conf \ - bugzilla_event.conf \ rhtsupport_event.conf \ uploader_event.conf reporters_extra_dist = if BUILD_BUGZILLA +dist_eventsconf_DATA += bugzilla_event.conf reporters_extra_dist += report_Bugzilla.xml.in report_Bugzilla.conf endif diff --git a/src/plugins/reporter-mailx.c b/src/plugins/reporter-mailx.c index 0e74122..80ff3de 100644 --- a/src/plugins/reporter-mailx.c +++ b/src/plugins/reporter-mailx.c @@ -74,7 +74,7 @@ static void create_and_send_email( char **args = NULL; unsigned arg_size = 0; - args = append_str_to_vector(args, &arg_size, "/bin/mailx"); + args = append_str_to_vector(args, &arg_size, "/usr/bin/mailx"); //char *dsc = make_description_mailx(problem_data); char *dsc = make_description_bz(problem_data, CD_TEXT_ATT_SIZE_LOGGER);