#
# Conditional build:
+%bcond_without python2 # Python 2.x modules
+%bcond_without python3 # Python 3.x modules
%bcond_without tests # "make check"
-#
+
Summary: Generic library for reporting various problems
Summary(pl.UTF-8): Ogólna biblioteka do zgłaszania różnych problemów
Name: libreport
-Version: 2.1.12
-Release: 1
+Version: 2.9.5
+Release: 5
License: GPL v2+
Group: Libraries
-Source0: https://fedorahosted.org/released/abrt/%{name}-%{version}.tar.gz
-# Source0-md5: 3c563d8f9d5564a825f94f17af9c5508
-Patch0: format-security.patch
-URL: https://fedorahosted.org/abrt/
+Source0: https://github.com/abrt/libreport/archive/%{version}/%{name}-%{version}.tar.gz
+# Source0-md5: a3abcdfbf1b1ec27ce6c44d5ba22b31b
+URL: https://github.com/abrt/libreport
BuildRequires: asciidoc
-%{?with_tests:BuildRequires: augeas}
BuildRequires: augeas-devel
+%{?with_tests:BuildRequires: augeas}
+BuildRequires: autoconf >= 2.50
+BuildRequires: automake
BuildRequires: curl-devel
BuildRequires: dbus-devel
BuildRequires: desktop-file-utils
-BuildRequires: gettext-devel >= 0.17
-BuildRequires: glib2-devel >= 1:2.21
+BuildRequires: gettext-tools >= 0.17
+BuildRequires: glib2-devel >= 1:2.43
BuildRequires: gtk+3-devel >= 3.0
BuildRequires: intltool >= 0.35.0
BuildRequires: json-c-devel
BuildRequires: libproxy-devel
BuildRequires: libtar-devel
-BuildRequires: libtool
+BuildRequires: libtool >= 1:1.4.2
BuildRequires: libxml2-devel >= 2
BuildRequires: newt-devel
BuildRequires: nss-devel
BuildRequires: pkgconfig
-BuildRequires: python-devel
+%{?with_python2:BuildRequires: python-devel >= 2}
+%{?with_python3:BuildRequires: python3-devel >= 1:3}
+BuildRequires: rpmbuild(macros) >= 1.612
BuildRequires: satyr-devel
-# libsystemd-journal
BuildRequires: systemd-devel
BuildRequires: xmlrpc-c-client-devel
BuildRequires: xmlrpc-c-devel
BuildRequires: xmlto
-Requires: glib2 >= 1:2.21
+%if %{with tests}
+# findmnt
+BuildRequires: mount
+# /etc/system-release for non-empty os_release content
+BuildRequires: pld-release >= 3.0-8
+BuildRequires: sed >= 4.0
+%endif
+Requires: glib2 >= 1:2.43
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%description
Summary(pl.UTF-8): Pliki nagłówkowe bibliotek libreport
Group: Development/Libraries
Requires: %{name} = %{version}-%{release}
-Requires: glib2-devel >= 1:2.21
+Requires: glib2-devel >= 1:2.43
%description devel
Header files for libreport libraries.
Pliki nagłówkowe biblioteki libreport-web.
%package -n python-%{name}
-Summary: Python bindings for libreport libraries
-Summary(pl.UTF-8): Wiązania Pythona dla bibliotek libreport
+Summary: Python 2 bindings for libreport libraries
+Summary(pl.UTF-8): Wiązania Pythona 2 do bibliotek libreport
Group: Libraries/Python
Requires: %{name} = %{version}-%{release}
Provides: %{name}-python = %{version}-%{release}
Obsoletes: libreport-python < 2.1.3-1
%description -n python-%{name}
-Python bindings for libreport libraries.
+Python 2 bindings for libreport libraries.
%description -n python-%{name} -l pl.UTF-8
-Wiązania Pythona dla bibliotek libreport
+Wiązania Pythona 2 do bibliotek libreport
+
+%package -n python3-%{name}
+Summary: Python 3 bindings for libreport libraries
+Summary(pl.UTF-8): Wiązania Pythona 3 do bibliotek libreport
+Group: Libraries/Python
+Requires: %{name} = %{version}-%{release}
+
+%description -n python3-%{name}
+Python 3 bindings for libreport libraries.
+
+%description -n python3-%{name} -l pl.UTF-8
+Wiązania Pythona 3 do bibliotek libreport
%package cli
Summary: libreport's command line interface
Summary: libreport's bugzilla plugin
Summary(pl.UTF-8): Wtyczka libreport do zgłoszeń przez Bugzillę
Group: Libraries
-Requires: %{name} = %{version}-%{release}
+Requires: %{name}-web = %{version}-%{release}
Obsoletes: abrt-plugin-bugzilla < 2.0.4
%description plugin-bugzilla
Summary: libreport's kerneloops reporter plugin
Summary(pl.UTF-8): Wtyczka libreport do zgłoszeń awarii jądra (kerneloops)
Group: Libraries
-Requires: %{name} = %{version}-%{release}
+Requires: %{name}-web = %{version}-%{release}
Requires: curl
%description plugin-kerneloops
Prosta wtyczka zgłaszająca problem, wysyłająca raport na określony
adres e-mail przy użyciu programu mailx.
+%package plugin-mantisbt
+Summary: libreport's mantisbt plugin
+Summary(pl.UTF-8): Wtyczka libreport do zgłoszeń przez mantisbt
+Group: Libraries
+Requires: %{name}-web = %{version}-%{release}
+
+%description plugin-mantisbt
+Plugin to report bugs into the mantisbt.
+
+%description plugin-mantisbt -l pl.UTF-8
+Wtyczka zgłaszająca problemy do systemu mantisbt.
+
%package plugin-reportuploader
Summary: libreport's reportuploader plugin
Summary(pl.UTF-8): Wtyczka libreport do zgłoszeń przez FTP
Group: Libraries
-Requires: %{name} = %{version}-%{release}
+Requires: %{name}-web = %{version}-%{release}
Obsoletes: abrt-plugin-reportuploader < 2.0.4
%description plugin-reportuploader
Summary: libreport's RHTSupport plugin
Summary(pl.UTF-8): Wtyczka libreport do zgłoszeń przez RHTSupport
Group: Libraries
-Requires: %{name} = %{version}-%{release}
+Requires: %{name}-web = %{version}-%{release}
Obsoletes: abrt-plugin-rhtsupport < 2.0.4
%description plugin-rhtsupport
%description plugin-rhtsupport -l pl.UTF-8
Wtyczka zgłaszająca problemy do systemu obsługi RH.
+%package plugin-systemd-journal
+Summary: libreport's systemd journal reporter plugin
+Summary(pl.UTF-8): Wtyczka libreport do zgłoszeń w kronice systemd
+Group: Libraries
+Requires: %{name} = %{version}-%{release}
+
+%description plugin-systemd-journal
+The simple reporter plugin which writes a report to the systemd
+journal.
+
+%description plugin-systemd-journal -l pl.UTF-8
+Prosta wtyczka zgłoszeń zapisująca raport w kronice systemd.
+
%package plugin-ureport
Summary: libreport's micro report plugin
Summary(pl.UTF-8): Wtyczka libreport do zgłoszeń typu micro-report
Group: Libraries
-Requires: %{name} = %{version}-%{release}
+Requires: %{name}-web = %{version}-%{release}
%description plugin-ureport
Uploads micro-report to abrt server.
Domyślna konfiguracja do zgłaszania problemów z Anacondą przy użyciu
infrastruktury Fedory lub przesyłając zebrane dane po ftp/scp.
+%package centos
+Summary: Default configuration for reporting bugs via CentOS infrastructure
+Summary(pl.UTF-8): Domyślna konfiguracja do zgłaszania błędów poprzez infrastrukturę CentOS
+Group: Applications/File
+Requires: %{name}-plugin-mantisbt = %{version}-%{release}
+Requires: %{name}-web = %{version}-%{release}
+
+%description centos
+Default configuration for reporting bugs via CentOS infrastructure
+used primarily to easy configure the reporting process for CentOS
+systems.
+
+%description centos -l pl.UTF-8
+Domyślna konfiguracja do zgłaszania błędów poprzez infrastrukturę
+CentOS, służąca przede wszystkim do łatwej konfiguracji procesu
+zgłaszania błędów w systemach CentOS.
+
%package fedora
Summary: Default configuration for reporting bugs via Fedora infrastructure
-Summary(pl.UTF-8): Domyślna konfiguracja do zgłaszania błędów poprzeze infrastrukturę Fedory
+Summary(pl.UTF-8): Domyślna konfiguracja do zgłaszania błędów poprzez infrastrukturę Fedory
Group: Applications/File
Requires: %{name} = %{version}-%{release}
%package rhel
Summary: Default configuration for reporting bugs via RHEL infrastructure
-Summary(pl.UTF-8): Domyślna konfiguracja do zgłaszania błędów poprzeze infrastrukturę RHEL
+Summary(pl.UTF-8): Domyślna konfiguracja do zgłaszania błędów poprzez infrastrukturę RHEL
Group: Applications/File
Requires: %{name} = %{version}-%{release}
%prep
%setup -q
-%patch0 -p1
+
+./gen-version
+
+# set_echo test from client.at fails on builders due to forkpty()
+%{__sed} -i -e '/client\.at/d' tests/testsuite.at
+# process_has_own_root randomly fails in chroot environment
+%{__sed} -i -e '/proc_helpers\.at/d' tests/testsuite.at
%build
+%{__gettextize}
+%{__intltoolize}
+%{__libtoolize}
+%{__aclocal} -I m4
+%{__autoconf}
+%{__autoheader}
+%{__automake}
%configure \
AUGPARSE=/usr/bin/augparse \
- --disable-silent-rules
+ --disable-silent-rules \
+ %{!?with_python2:--without-python2} \
+ %{!?with_python3:--without-python3}
%{__make}
%if %{with tests}
-%{__make} check
+%{__make} check || (cat tests/testsuite.log && /bin/false)
%endif
%install
# compat layer for compatibility tool
%{__rm} $RPM_BUILD_ROOT{%{_bindir}/report,%{_mandir}/man1/report.1}
+%if %{with python2}
+%py_postclean
+%{__rm} $RPM_BUILD_ROOT%{py_sitedir}/report*/*.la
+%endif
+%if %{with python3}
+%{__rm} $RPM_BUILD_ROOT%{py3_sitedir}/report*/*.la
+# automake uses $PYTHON for both versions, recompile using python3
+%py_postclean %{py3_sitedir}
+%py3_comp $RPM_BUILD_ROOT%{py3_sitedir}
+%py3_ocomp $RPM_BUILD_ROOT%{py3_sitedir}
+%endif
+
+# empty versions of nb,ru
+%{__rm} -r $RPM_BUILD_ROOT%{_localedir}/{no,ru_RU}
+# not supported by glibc yet
+%{__rm} -r $RPM_BUILD_ROOT%{_localedir}/{ach,aln,bal,ilo}
+
%find_lang %{name}
%clean
%files -f %{name}.lang
%defattr(644,root,root,755)
-%doc README
+%doc CHANGELOG.md README.md
%dir %{_sysconfdir}/%{name}
%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/report_event.conf
%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/forbidden_words.conf
%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/ignored_words.conf
+%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/libreport.conf
%dir %{_sysconfdir}/%{name}/events
%dir %{_sysconfdir}/%{name}/events.d
%dir %{_sysconfdir}/%{name}/plugins
%{_datadir}/augeas/lenses/libreport.aug
%dir %{_datadir}/libreport
%dir %{_datadir}/libreport/conf.d
+%{_datadir}/libreport/conf.d/libreport.conf
%dir %{_datadir}/libreport/conf.d/plugins
%dir %{_datadir}/libreport/events
%dir %{_datadir}/libreport/workflows
%{_mandir}/man5/forbidden_words.conf.5*
+%{_mandir}/man5/ignored_words.conf.5*
+%{_mandir}/man5/libreport.conf.5*
%{_mandir}/man5/report_event.conf.5*
%files devel
%{_includedir}/libreport/dump_dir.h
%{_includedir}/libreport/event_config.h
%{_includedir}/libreport/file_obj.h
+%{_includedir}/libreport/global_configuration.h
%{_includedir}/libreport/libreport_types.h
%{_includedir}/libreport/problem_data.h
%{_includedir}/libreport/report.h
%{_includedir}/libreport/run_event.h
%{_includedir}/libreport/internal_abrt_dbus.h
%{_includedir}/libreport/internal_libreport.h
+%{_includedir}/libreport/problem_report.h
+%{_includedir}/libreport/problem_utils.h
+%{_includedir}/libreport/reporters.h
+%{_includedir}/libreport/ureport.h
%{_includedir}/libreport/workflow.h
%{_includedir}/libreport/xml_parser.h
-%{_pkgconfigdir}/%{name}.pc
+%{_includedir}/libreport/helpers
+%{_pkgconfigdir}/libreport.pc
%files web
%defattr(644,root,root,755)
%{_includedir}/libreport/libreport_curl.h
%{_pkgconfigdir}/libreport-web.pc
+%if %{with python2}
%files -n python-%{name}
%defattr(644,root,root,755)
-%{py_sitedir}/report
-%{py_sitedir}/reportclient
+%dir %{py_sitedir}/report
+%attr(755,root,root) %{py_sitedir}/report/_pyreport.so
+%{py_sitedir}/report/*.py[co]
+%dir %{py_sitedir}/report/io
+%{py_sitedir}/report/io/*.py[co]
+%dir %{py_sitedir}/reportclient
+%attr(755,root,root) %{py_sitedir}/reportclient/_reportclient.so
+%{py_sitedir}/reportclient/*.py[co]
+%endif
+
+%if %{with python3}
+%files -n python3-%{name}
+%defattr(644,root,root,755)
+%dir %{py3_sitedir}/report
+%attr(755,root,root) %{py3_sitedir}/report/_py3report.so
+%{py3_sitedir}/report/*.py*
+%dir %{py3_sitedir}/report/io
+%{py3_sitedir}/report/io/*.py*
+%dir %{py3_sitedir}/reportclient
+%attr(755,root,root) %{py3_sitedir}/reportclient/_reportclient3.so
+%{py3_sitedir}/reportclient/*.py*
+%endif
%files cli
%defattr(644,root,root,755)
%defattr(644,root,root,755)
%attr(755,root,root) %{_libdir}/libreport-gtk.so
%{_includedir}/libreport/internal_libreport_gtk.h
+%{_includedir}/libreport/problem_details_dialog.h
+%{_includedir}/libreport/problem_details_widget.h
%{_pkgconfigdir}/libreport-gtk.pc
%files plugin-bugzilla
%attr(755,root,root) %{_bindir}/reporter-bugzilla
%config(noreplace) %{_sysconfdir}/libreport/plugins/bugzilla.conf
%config(noreplace) %{_sysconfdir}/libreport/plugins/bugzilla_format.conf
+%config(noreplace) %{_sysconfdir}/libreport/plugins/bugzilla_format_analyzer_libreport.conf
%config(noreplace) %{_sysconfdir}/libreport/plugins/bugzilla_format_kernel.conf
-%config(noreplace) %{_sysconfdir}/libreport/plugins/bugzilla_format_libreport.conf
%config(noreplace) %{_sysconfdir}/libreport/plugins/bugzilla_formatdup.conf
%config(noreplace) %{_sysconfdir}/libreport/events/report_Bugzilla.conf
%config(noreplace) %{_sysconfdir}/libreport/events.d/bugzilla_event.conf
%{_datadir}/dbus-1/interfaces/com.redhat.problems.configuration.bugzilla.xml
%{_datadir}/libreport/conf.d/plugins/bugzilla.conf
%{_datadir}/libreport/events/report_Bugzilla.xml
+%{_datadir}/libreport/events/watch_Bugzilla.xml
%{_mandir}/man1/reporter-bugzilla.1*
%{_mandir}/man5/bugzilla.conf.5*
%{_mandir}/man5/bugzilla_event.conf.5*
%{_mandir}/man5/bugzilla_format.conf.5*
+%{_mandir}/man5/bugzilla_format_analyzer_libreport.conf.5*
%{_mandir}/man5/bugzilla_format_kernel.conf.5*
-%{_mandir}/man5/bugzilla_format_libreport.conf.5*
%{_mandir}/man5/bugzilla_formatdup.conf.5*
%{_mandir}/man5/report_Bugzilla.conf.5*
%files plugin-logger
%defattr(644,root,root,755)
%attr(755,root,root) %{_bindir}/reporter-print
-%{_sysconfdir}/libreport/events/report_Logger.conf
-%{_datadir}/libreport/events/report_Logger.xml
+%config(noreplace) %{_sysconfdir}/libreport/events/report_Logger.conf
%config(noreplace) %{_sysconfdir}/libreport/events.d/print_event.conf
+%config(noreplace) %{_sysconfdir}/libreport/workflows.d/report_logger.conf
+%{_datadir}/libreport/events/report_Logger.xml
+%{_datadir}/libreport/workflows/workflow_Logger.xml
+%{_datadir}/libreport/workflows/workflow_LoggerCCpp.xml
%{_mandir}/man1/reporter-print.1*
%{_mandir}/man5/print_event.conf.5*
%{_mandir}/man5/report_Logger.conf.5*
+%{_mandir}/man5/report_logger.conf.5*
%files plugin-mailx
%defattr(644,root,root,755)
%attr(755,root,root) %{_bindir}/reporter-mailx
%config(noreplace) %{_sysconfdir}/libreport/plugins/mailx.conf
%config(noreplace) %{_sysconfdir}/libreport/events.d/mailx_event.conf
+%config(noreplace) %{_sysconfdir}/libreport/workflows.d/report_mailx.conf
%{_datadir}/dbus-1/interfaces/com.redhat.problems.configuration.mailx.xml
%{_datadir}/libreport/conf.d/plugins/mailx.conf
%{_datadir}/libreport/events/report_Mailx.xml
+%{_datadir}/libreport/workflows/workflow_Mailx.xml
+%{_datadir}/libreport/workflows/workflow_MailxCCpp.xml
%{_mandir}/man1/reporter-mailx.1*
%{_mandir}/man5/mailx.conf.5*
%{_mandir}/man5/mailx_event.conf.5*
+%{_mandir}/man5/report_mailx.conf.5*
+
+%files plugin-mantisbt
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_bindir}/reporter-mantisbt
+%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/libreport/plugins/mantisbt.conf
+%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/libreport/plugins/mantisbt_format.conf
+%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/libreport/plugins/mantisbt_format_analyzer_libreport.conf
+%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/libreport/plugins/mantisbt_formatdup.conf
+%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/libreport/plugins/mantisbt_formatdup_analyzer_libreport.conf
+%{_datadir}/libreport/conf.d/plugins/mantisbt.conf
+%{_mandir}/man1/reporter-mantisbt.1*
+%{_mandir}/man5/mantisbt.conf.5*
+%{_mandir}/man5/mantisbt_format.conf.5*
+%{_mandir}/man5/mantisbt_format_analyzer_libreport.conf.5*
+%{_mandir}/man5/mantisbt_formatdup.conf.5*
+%{_mandir}/man5/mantisbt_formatdup_analyzer_libreport.conf.5*
%files plugin-reportuploader
%defattr(644,root,root,755)
%attr(755,root,root) %{_bindir}/reporter-upload
+%config(noreplace) %{_sysconfdir}/libreport/plugins/upload.conf
+%config(noreplace) %{_sysconfdir}/libreport/events/report_Uploader.conf
%config(noreplace) %{_sysconfdir}/libreport/events.d/uploader_event.conf
+%config(noreplace) %{_sysconfdir}/libreport/workflows.d/report_uploader.conf
+%{_datadir}/libreport/conf.d/plugins/upload.conf
%{_datadir}/libreport/events/report_Uploader.xml
%{_datadir}/libreport/workflows/workflow_Upload.xml
+%{_datadir}/libreport/workflows/workflow_UploadCCpp.xml
%{_mandir}/man1/reporter-upload.1*
+%{_mandir}/man5/report_Uploader.conf.5*
+%{_mandir}/man5/report_uploader.conf.5*
%{_mandir}/man5/uploader_event.conf.5*
+%{_mandir}/man5/upload.conf.5*
%files plugin-rhtsupport
%defattr(644,root,root,755)
%{_datadir}/dbus-1/interfaces/com.redhat.problems.configuration.rhtsupport.xml
%{_datadir}/libreport/conf.d/plugins/rhtsupport.conf
%{_datadir}/libreport/events/report_RHTSupport.xml
+%{_datadir}/libreport/events/report_RHTSupport_AddData.xml
%{_mandir}/man1/reporter-rhtsupport.1*
%{_mandir}/man5/rhtsupport.conf.5*
%{_mandir}/man5/rhtsupport_event.conf.5*
+%files plugin-systemd-journal
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_bindir}/reporter-systemd-journal
+%{_mandir}/man1/reporter-systemd-journal.1*
+
%files plugin-ureport
%defattr(644,root,root,755)
%attr(755,root,root) %{_bindir}/reporter-ureport
%config(noreplace) %{_sysconfdir}/libreport/events.d/emergencyanalysis_event.conf
%config(noreplace) %{_sysconfdir}/libreport/plugins/ureport.conf
+%config(noreplace) %{_sysconfdir}/libreport/workflows.d/report_uReport.conf
%{_datadir}/dbus-1/interfaces/com.redhat.problems.configuration.ureport.xml
%{_datadir}/libreport/conf.d/plugins/ureport.conf
%{_datadir}/libreport/events/report_uReport.xml
%{_datadir}/libreport/events/report_EmergencyAnalysis.xml
+%{_datadir}/libreport/workflows/workflow_uReport.xml
%{_mandir}/man1/reporter-ureport.1*
%{_mandir}/man5/emergencyanalysis_event.conf.5*
+%{_mandir}/man5/report_uReport.conf.5*
%{_mandir}/man5/ureport.conf.5*
%files anaconda
%{_mandir}/man5/bugzilla_format_anaconda.conf.5*
%{_mandir}/man5/bugzilla_formatdup_anaconda.conf.5*
+%files centos
+%defattr(644,root,root,755)
+%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/libreport/events/report_CentOSBugTracker.conf
+%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/libreport/events.d/centos_report_event.conf
+%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/libreport/workflows.d/report_centos.conf
+%{_datadir}/libreport/events/report_CentOSBugTracker.xml
+%{_datadir}/libreport/workflows/workflow_CentOSCCpp.xml
+%{_datadir}/libreport/workflows/workflow_CentOSJava.xml
+%{_datadir}/libreport/workflows/workflow_CentOSJavaScript.xml
+%{_datadir}/libreport/workflows/workflow_CentOSKerneloops.xml
+%{_datadir}/libreport/workflows/workflow_CentOSLibreport.xml
+%{_datadir}/libreport/workflows/workflow_CentOSPython.xml
+%{_datadir}/libreport/workflows/workflow_CentOSPython3.xml
+%{_datadir}/libreport/workflows/workflow_CentOSVmcore.xml
+%{_datadir}/libreport/workflows/workflow_CentOSXorg.xml
+%{_mandir}/man5/centos_report_event.conf.5*
+%{_mandir}/man5/report_CentOSBugTracker.conf.5*
+%{_mandir}/man5/report_centos.conf.5*
+
%files fedora
%defattr(644,root,root,755)
%config(noreplace) %{_sysconfdir}/libreport/workflows.d/report_fedora.conf
%files rhel
%defattr(644,root,root,755)
%config(noreplace) %{_sysconfdir}/libreport/workflows.d/report_rhel.conf
+%config(noreplace) %{_sysconfdir}/libreport/workflows.d/report_rhel_add_data.conf
%config(noreplace) %{_sysconfdir}/libreport/workflows.d/report_rhel_bugzilla.conf
%{_datadir}/libreport/workflows/workflow_RHEL*.xml
%{_mandir}/man5/report_rhel.conf.5*