Michal Toman eee810c
Summary: Application for remote coredump analysis
Michal Toman eee810c
Name: retrace-server
ef677ba
Version: 1.18.1
716e67c
Release: 1%{?dist}
Michal Toman eee810c
License: GPLv2+
716e67c
URL: https://github.com/abrt/retrace-server
716e67c
Source0: https://github.com/abrt/%{name}/archive/%{version}/%{name}-%{version}.tar.gz
Michal Toman eee810c
ef677ba
%if 0%{?fedora} >= 29
ef677ba
# There are Python plugins in /usr/share/retrace-server/plugins
ef677ba
%global _python_bytecompile_extra 0
ef677ba
%endif
ef677ba
Michal Toman dbebecd
BuildArch: noarch
Michal Toman dbebecd
Michal Toman eee810c
BuildRequires: intltool
Michal Toman eee810c
BuildRequires: libtool
Michal Toman eee810c
BuildRequires: texinfo
Michal Toman 045cecb
BuildRequires: asciidoc
Michal Toman 045cecb
BuildRequires: xmlto
ef677ba
%if 0%{?fedora} >= 29
ef677ba
BuildRequires: python2-devel
ef677ba
%endif
ef677ba
BuildRequires: lsof
Michal Toman eee810c
Michal Toman eee810c
Requires: rsync
525ff48
Requires: mock >= 1.4.7
Michal Toman eee810c
Requires: xz
Michal Toman b9b9bb5
Requires: gzip
Michal Toman b9b9bb5
Requires: bzip2
Michal Toman b9b9bb5
Requires: tar
Michal Toman b9b9bb5
Requires: p7zip
Michal Toman b9b9bb5
Requires: unzip
716e67c
Requires: lzop
ef677ba
Requires: lsof
Michal Toman eee810c
Requires: elfutils
525ff48
Requires: createrepo >= 0.9.9-27
525ff48
%if 0%{?fedora} > 27
525ff48
Requires: python2-mod_wsgi
525ff48
Requires: python2-webob
525ff48
Requires: python2-magic
525ff48
Requires: python2-requests
525ff48
Requires: python2-requests-kerberos
525ff48
Requires: python2-distro
ef677ba
Requires: python2-bugzilla
ef677ba
Requires: python2-six
ef677ba
BuildRequires: python2-six
525ff48
%else
Michal Toman eee810c
Requires: mod_wsgi
Michal Toman eee810c
Requires: python-webob
525ff48
Requires: python-magic
525ff48
Requires: python-requests
525ff48
Requires: python-requests-kerberos
525ff48
Requires: python-distro
ef677ba
Requires: python-bugzilla
ef677ba
Requires: python-six
ef677ba
BuildRequires: python-six
525ff48
%endif
525ff48
Requires: mod_ssl
Jakub Filak 7d93f3f
Requires: sqlite
Michal Toman 0a774e0
Requires: yum-utils
Michal Toman ccea95e
Requires: crash >= 5.1.7
Michal Toman b9b9bb5
Requires: wget
Michal Toman b9b9bb5
Requires: kexec-tools
ef677ba
%if (0%{?rhel} && 0%{?rhel} <= 7) || (0%{?fedora} && 0%{?fedora} <= 27)
Michal Toman eee810c
Requires(preun): /sbin/install-info
Michal Toman eee810c
Requires(post): /sbin/install-info
ef677ba
%endif
Jakub Filak 7d93f3f
Requires(post): /usr/bin/crontab
Michal Toman eee810c
Michal Toman eee810c
Obsoletes: abrt-retrace-server < 2.0.3
Michal Toman eee810c
Provides: abrt-retrace-server = 2.0.3
Michal Toman eee810c
Michal Toman eee810c
%description
Michal Toman eee810c
The retrace server provides a coredump analysis and backtrace
Michal Toman eee810c
generation service over a network using HTTP protocol.
Michal Toman eee810c
Michal Toman eee810c
%prep
Michal Toman eee810c
%setup -q
Michal Toman eee810c
Michal Toman eee810c
%build
716e67c
autoconf
Michal Toman eee810c
%configure
Michal Toman eee810c
make %{?_smp_mflags}
Michal Toman eee810c
Michal Toman eee810c
%install
Michal Toman eee810c
make install DESTDIR=${RPM_BUILD_ROOT} mandir=%{_mandir}
Michal Toman eee810c
ef677ba
# Remove byte-compiled python files generated by automake.
ef677ba
# automake uses system's python for all *.py files, even
ef677ba
# for those which needs to be byte-compiled with different
ef677ba
# version (python2/python3).
ef677ba
# rpm can do this work and use the appropriate python version.
ef677ba
find $RPM_BUILD_ROOT -name "*.py[co]" -delete
ef677ba
Michal Toman eee810c
mkdir -p ${RPM_BUILD_ROOT}/%{_localstatedir}/cache/%{name}
Michal Toman ccea95e
mkdir -p ${RPM_BUILD_ROOT}/%{_localstatedir}/cache/%{name}/kernel
Michal Toman b9b9bb5
mkdir -p ${RPM_BUILD_ROOT}/%{_localstatedir}/cache/%{name}/download
Michal Toman 045cecb
mkdir -p ${RPM_BUILD_ROOT}/%{_localstatedir}/log/%{name}
Michal Toman eee810c
mkdir -p ${RPM_BUILD_ROOT}/%{_localstatedir}/spool/%{name}
Michal Toman eee810c
mkdir -p ${RPM_BUILD_ROOT}/%{_datadir}/%{name}
Michal Toman eee810c
ef677ba
%if 0%{?fedora} >= 29
ef677ba
%py_byte_compile %{__python2} ${RPM_BUILD_ROOT}%{_datadir}/%{name}/plugins
ef677ba
%endif
ef677ba
Michal Toman eee810c
rm -f ${RPM_BUILD_ROOT}%{_infodir}/dir
Michal Toman eee810c
Michal Toman eee810c
%{find_lang} %{name}
Michal Toman eee810c
Michal Toman 045cecb
%pre
Michal Toman 045cecb
#retrace uid/gid reserved in setup, rhbz #706012
Michal Toman 045cecb
%define retrace_gid_uid 174
Michal Toman 045cecb
getent group retrace > /dev/null || groupadd -f -g %{retrace_gid_uid} --system retrace
Michal Toman 045cecb
getent passwd retrace > /dev/null || useradd --system -g retrace -u %{retrace_gid_uid} -d %{_datadir}/%{name} -s /sbin/nologin retrace
Michal Toman 045cecb
exit 0
Michal Toman 045cecb
Michal Toman eee810c
%post
ef677ba
%if (0%{?rhel} && 0%{?rhel} <= 7) || (0%{?fedora} && 0%{?fedora} <= 27)
Michal Toman eee810c
/sbin/install-info %{_infodir}/%{name} %{_infodir}/dir 2> /dev/null || :
ef677ba
%endif
Michal Toman b9b9bb5
/usr/sbin/usermod -a -G mock retrace 2> /dev/null || :
Michal Toman dbebecd
Michal Toman 0a774e0
if [ "$1" = 1 ]
Michal Toman 0a774e0
then
Michal Toman e19fe7f
#add disabled crontab entries to retrace's crontab
Michal Toman b9b9bb5
    %define retrace_crontab_entry0 "# 0 * * * * /usr/bin/retrace-server-cleanup >> /var/log/retrace-server/cleanup_error.log 2>&1"
Michal Toman e19fe7f
    %define retrace_crontab_entry1 "#0 0,12 * * * /usr/bin/retrace-server-reposync fedora 15 i386 >> /var/log/retrace-server/reposync_error.log 2>&1"
Michal Toman e19fe7f
    %define retrace_crontab_entry2 "#0 2,14 * * * /usr/bin/retrace-server-reposync fedora 15 x86_64 >> /var/log/retrace-server/reposync_error.log 2>&1"
Michal Toman e19fe7f
    %define retrace_crontab_entry3 "#0 4,16 * * * /usr/bin/retrace-server-reposync fedora 16 i386 >> /var/log/retrace-server/reposync_error.log 2>&1"
Michal Toman e19fe7f
    %define retrace_crontab_entry4 "#0 6,18 * * * /usr/bin/retrace-server-reposync fedora 16 x86_64 >> /var/log/retrace-server/reposync_error.log 2>&1"
Michal Toman e19fe7f
    %define retrace_crontab_entry5 "#0 8,20 * * * /usr/bin/retrace-server-reposync fedora rawhide i386 >> /var/log/retrace-server/reposync_error.log 2>&1"
Michal Toman e19fe7f
    %define retrace_crontab_entry6 "#0 10,22 * * * /usr/bin/retrace-server-reposync fedora rawhide x86_64 >> /var/log/retrace-server/reposync_error.log 2>&1"
Michal Toman e19fe7f
Michal Toman b9b9bb5
    (crontab -u retrace -l 2> /dev/null; echo %{retrace_crontab_entry0}; \
Michal Toman e19fe7f
     echo %{retrace_crontab_entry1}; echo %{retrace_crontab_entry2}; \
Michal Toman e19fe7f
     echo %{retrace_crontab_entry3}; echo %{retrace_crontab_entry4}; \
Michal Toman e19fe7f
     echo %{retrace_crontab_entry5}; echo %{retrace_crontab_entry6};) | crontab -u retrace - 2> /dev/null
Michal Toman 0a774e0
fi
Michal Toman eee810c
Michal Toman eee810c
%preun
Michal Toman eee810c
if [ "$1" = 0 ]
Michal Toman eee810c
then
ef677ba
%if (0%{?rhel} && 0%{?rhel} <= 7) || (0%{?fedora} && 0%{?fedora} <= 27)
Michal Toman 045cecb
    /sbin/install-info --delete %{_infodir}/retrace-server %{_infodir}/dir 2> /dev/null || :
ef677ba
%endif
Michal Toman e19fe7f
#comment entries in retrace's crontab
Michal Toman e19fe7f
    (crontab -u retrace -l 2> /dev/null | sed "s,^\([^#].*\)$,#\1,g") | crontab -u retrace - 2> /dev/null
Michal Toman eee810c
fi
Michal Toman eee810c
Michal Toman eee810c
%files -f %{name}.lang
Michal Toman eee810c
%config(noreplace) %{_sysconfdir}/httpd/conf.d/%{name}-httpd.conf
Michal Toman eee810c
%config(noreplace) %{_sysconfdir}/%{name}.conf
Michal Toman 045cecb
%config(noreplace) %{_sysconfdir}/logrotate.d/%{name}
Michal Toman 045cecb
%dir %attr(0755,retrace,retrace) %{_localstatedir}/cache/%{name}
Michal Toman b9b9bb5
%dir %attr(0755,retrace,retrace) %{_localstatedir}/cache/%{name}/kernel
Michal Toman b9b9bb5
%dir %attr(0755,retrace,retrace) %{_localstatedir}/cache/%{name}/download
Michal Toman b9b9bb5
%dir %attr(0750,retrace,retrace) %{_localstatedir}/log/%{name}
Michal Toman 4b7c1f8
%dir %attr(0770,retrace,retrace) %{_localstatedir}/spool/%{name}
Michal Toman dbebecd
%{_bindir}/%{name}-worker
Michal Toman f89c503
%{_bindir}/%{name}-interact
Michal Toman eee810c
%{_bindir}/%{name}-cleanup
Michal Toman eee810c
%{_bindir}/%{name}-reposync
716e67c
%{_bindir}/%{name}-reposync-faf
716e67c
%{_bindir}/%{name}-plugin-checker
525ff48
%{_bindir}/%{name}-task
ef677ba
%{_bindir}/%{name}-bugzilla-refresh
ef677ba
%{_bindir}/%{name}-bugzilla-query
Michal Toman 4b7c1f8
%{_bindir}/bt_filter
Michal Toman eee810c
%{_bindir}/coredump2packages
ef677ba
%{python_sitelib}/retrace/
ef677ba
%{_datadir}/%{name}/
716e67c
%doc %{_mandir}/man1/%{name}-cleanup.1*
716e67c
%doc %{_mandir}/man1/%{name}-interact.1*
716e67c
%doc %{_mandir}/man1/%{name}-reposync.1*
716e67c
%doc %{_mandir}/man1/%{name}-worker.1*
525ff48
%doc %{_mandir}/man1/%{name}-task.1*
Michal Toman eee810c
%doc %{_infodir}/%{name}*
525ff48
%doc README.md
525ff48
%license COPYING
Michal Toman eee810c
Michal Toman eee810c
%changelog
ef677ba
* Fri Mar 01 2019 Martin Kutlak <mkutlak@redhat.com> 1.18.1-1
ef677ba
- cleanup: Add check for opened crash files
ef677ba
- reposync: Inform why creating of repository failed
ef677ba
- Correct syntax for gdb backtrace command
ef677ba
- Refactoring: Too long lines, missing whitespaces
ef677ba
- Add has_coredump() method to RetraceTask and upate get_md5_tasks()
ef677ba
- Modify get_md5_tasks to skip tasks with no vmcores or invalid md5sum files
ef677ba
- Add 'has_vmcore' method to RetraceTask
ef677ba
- spec: Bytecompile r-s plugins explicitly
ef677ba
- spec: Remove automake byte-compiled files
ef677ba
- spec: Correct the file ownership
ef677ba
- do not require install-info on F28+
ef677ba
- Adjust indentation according to pylint recommendation
ef677ba
- py3 compatibility: Replace filter function with a list equivalent
ef677ba
- py3 compatibility: Adjust urllib, urllib2 and urlparse
ef677ba
- Fix missing sys import
ef677ba
- Clean up of unused imports
ef677ba
- py3 compatibility: Adjust imports
ef677ba
- py3 compatibility: Resolution of range and xrange
ef677ba
- py3 compatibility: Replace ConfigParser module with configparser
ef677ba
- py3 compatibility: Classic division
ef677ba
- py3 compatibility: Adjust raise statement syntax
ef677ba
- py3 compatibility: Replace StringIO module with io module
ef677ba
- py3 compatibility: Removal of tuple parameter unpacking
ef677ba
- Refactoring: Missing or bad whitespace
ef677ba
- py3 compatibility: Set literals
ef677ba
- py3 compatibility: Use 'sorted' built-in function
ef677ba
- py3 compatibility: Replacement of basestring with six.string_types
ef677ba
- py3 compatibility: Ensure map function to return a list
ef677ba
- py3 compatibility: Replacement of 'has_key' with 'in'
ef677ba
- Make r-s-bugzilla-query query options configurable
ef677ba
- Load credentials from custom file
ef677ba
- manager: Make the bugzillano a clickable link
ef677ba
- Query the remaining bugzilla statuses
ef677ba
- retrace: Add reset_age method
ef677ba
- Implement retrace-server-bzquery tool
ef677ba
- Implement retrace-server-bugzilla-refresh tool
ef677ba
- Implement bugzilla field
ef677ba
- py3 compatibility: Octal literals
ef677ba
- py3 compatibility: try-except statement
ef677ba
- py3 compatibility: print statement is replaced with a print() function
ef677ba
- For vmcores that fail crash but have a large enough kernel log, try --minimal
ef677ba
- Set md5sum as soon as possible.
ef677ba
- Add dedup_vmcore to RetraceWorker and call from retrace-server-cleanup
ef677ba
- Fail task if the crash sys command exits with non-zero and kernellog is small
ef677ba
- Fix typo in exception handling of get_kernel_release
ef677ba
- Set default signal handler for SIGPIPE before calling Popen on 'crash --osrelease'
ef677ba
- Improve vmcore kernel parsing for certain scenarios and limit file scanning
ef677ba
- autogen: correctly parse buildrequires from spec file
ef677ba
- spec: Do not:x show every single change
ef677ba
525ff48
* Thu Feb 01 2018 Matej Marusak <mmarusak@redhat.com> 1.18.0-1
525ff48
- mark license as license
525ff48
- Update Python 2 dependency declarations to new packaging standards
525ff48
- defattr is not needed as this is default
525ff48
- use standard python_sitelib macro
525ff48
- remove old changelog entries
525ff48
- we do not build for el6 any more
525ff48
- remove group
525ff48
- Remove duplicate RetraceWorker._fail call when start_vmcore fails
525ff48
- Add md5sum and kernelver to email notifications, help text to failing notification
525ff48
- Convert notify_email_success and notify_email_fail to a single method
525ff48
- Create notify_email_success / notify_email_fail helpers
525ff48
- Enable packages with epoch
525ff48
- Update to new mock
525ff48
- Set kernelver and vmlinux as soon as possible
525ff48
- reposync: Cleanup is not done by default in createrepo
525ff48
- Explicitly state python version in shebangs
525ff48
- Fix unreadable crash subdirectory when tarball is submitted without group read permissions
525ff48
- Try noarch when checking for package
525ff48
- Add pylintrc
525ff48
- Use dnf in mock config on Fedora
525ff48
- Update mock config for new mock version
525ff48
- Pylint updates
525ff48
- Add commandline client
525ff48
- Add aliases into FAF reposync
525ff48
- Cleanup tmp FAF repository after failing
525ff48
- Write coresize for vmcores
525ff48
- Change error message
525ff48
- Fix wrong html tag
525ff48
- Set zero to non-existing type of tasks
525ff48
- Fix typeo in manager.wsgi which creates a backtrace on non-ftp tasks.
525ff48
- Bump version of gettext
525ff48
- Change path for README.md
525ff48
- Fix problem with missing modules on kernel versions with cached vmlinux files.
525ff48
- No first retrace time when no existing task
525ff48
- Make the reposync tool more verbose if required
525ff48
716e67c
* Thu Mar 30 2017 Matej Marusak <mmarusak@redhat.com> 1.17.0-1
716e67c
- Enable creating releases with makefile
716e67c
- Introduce gen-version
716e67c
- Do not use fedorahosted.org as source
716e67c
- Include md5sum of original archive in summary page
716e67c
- Do not try to get default time when ftptask
716e67c
- Fix character escape typo
716e67c
- Change retrace-server httpd config
716e67c
- Modify search for existing vmlinux files in cache to handle older kernel-debuginfos
716e67c
- Default to hex mode for crash commands involving backtraces.
716e67c
- Create directories for tests if they are not present
716e67c
- Don't mention old wiki page
716e67c
- Fix double call of _fail method
716e67c
- Update README
716e67c
- Allow any compression of man pages
716e67c
- Autogen without args configures for debugging
716e67c
- Run 'configure' at the end of 'autogen'
716e67c
- Improve autogen to list and install dependencies
716e67c
- Avoid circular dependency on kernel-debuginfo for vmlinux files already in cache
716e67c
- Add plugin checking action
716e67c
- Update documentation of plugin in README
716e67c
- Use short form rhel when creating repository
716e67c
- Fix methods arguments
716e67c
- Move global variables to config.py.in
716e67c
- Recover from missing start/finish task files
716e67c
- Change error message in cleanup script
716e67c
- Add '-ascending' argument to gdb
716e67c
- Use devtoolset-4-gdb when used on RHEL
716e67c
- Enable creating repository from faf repository
716e67c
- Add 'make check'
716e67c
- Correct eu-unstrip parser if FILE is .
716e67c
- Not mark packages with different architectures as duplicity
716e67c
- Separate worker start_retrace method
716e67c
- Add class to wrap plugins accessing
716e67c
- Add class to wrap configuration file reading
716e67c
- Delete python labels when no python backtrace available
716e67c
- Git ignore bytecode
716e67c
- Add python backtrace, source and locals into backtrace
716e67c
- Move src/lib to src/retrace to make testing retrace-server easier
716e67c
- Add "exploitable" into LocationMatch in the httpd.conf
716e67c
- Fix invalid syntax error in sys.stderr.print()
Jakub Filak 99a413b
Jakub Filak cad8522
* Thu Jun 2 2016 Jakub Filak <jfilak@redhat.com> - 1.16-1
Jakub Filak cad8522
- Log failed to start tasks
Jakub Filak cad8522
- Gracefully handle the worker errors
Jakub Filak cad8522
- Move the FTP query operation to an AJAX operation
Jakub Filak cad8522
- Fix duplicate email if a vmcore task fails to determine the kernel version
Jakub Filak cad8522
- Fix typo preventing email notifications from working.
Jakub Filak cad8522
- Correct eu-unstrip parser if FILE is '-'
Jakub Filak aecbb37
- Allow package names with Epoch
Jakub Filak aecbb37
Jakub Filak 505e228
* Fri Mar 18 2016 Jakub Filak <jfilak@redhat.com> - 1.15-1
Jakub Filak 505e228
- Correct paths to Fedora development releases
Jakub Filak 505e228
- Fix small problem with strip_vmcore calling prepare_debuginfo
Jakub Filak 505e228
- Avoid calling prepare_debuginfo from retrace-server-interact after kernel version detection
Jakub Filak 505e228
- Move prepare_debuginfo and strip_vmcore inside RetraceTask
Jakub Filak 505e228
- Add vmlinux file inside RetraceTask
Jakub Filak 505e228
- Fix bt_filter missing last task/PID read if the last line was not blank
Jakub Filak 505e228
- Update the release information to be dynamic based off of plugins
Jakub Filak 505e228
- Including a Red Hat Enterprise Linux plugin
Jakub Filak 505e228
- Mock logging into retrace task's dir
Jakub Filak 505e228
- Enforce uniform mode bits for almost all RetraceTask files
Jakub Filak 505e228
- Fix incorrect group permissions when writing RetraceServer files especially with interactive mode
Jakub Filak 505e228
- Fix retrace-server-worker --restart backtrace due to unwriteable retrace_log
716e67c
- Correct license address
716e67c
- Add VMCoreTask and UsrCoreTask to config
Jakub Filak 6f5e55c
Jakub Filak 8dc2797
* Tue Feb 16 2016 Jakub Filak <jfilak@redhat.com> - 1.14-1
716e67c
- generated config.py for the target platform at build time
716e67c
- update URL patterns for Fedora repositories
716e67c
- spec: add sqlite and cron to requirements
716e67c
- set "crash" inside get_crash_cmd file if the file does not exist
716e67c
- fix get_use_mock typo
716e67c
- use %%global for the nested python_site macro instead of %%define