Michal Toman eee810c
Summary: Application for remote coredump analysis
Michal Toman eee810c
Name: retrace-server
3c8e134
Version: 1.19.0
6df5f4e
Release: 5%{?dist}
Michal Toman eee810c
License: GPLv2+
9b5ad9f
URL: https://github.com/abrt/retrace-server
9b5ad9f
Source0: https://github.com/abrt/%{name}/archive/%{version}/%{name}-%{version}.tar.gz
Michal Toman eee810c
3c8e134
%if 0%{fedora} >= 29
3c8e134
# There are Python plugins in /usr/share/retrace-server/plugins
3c8e134
%global _python_bytecompile_extra 0
3c8e134
%endif
3c8e134
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
3c8e134
BuildRequires: python3-six
3c8e134
BuildRequires: python3-devel
Michal Toman eee810c
Michal Toman eee810c
Requires: rsync
041aafb
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
9b5ad9f
Requires: lzop
Michal Toman eee810c
Requires: elfutils
3c8e134
Requires: createrepo_c
3c8e134
Requires: python3-mod_wsgi
3c8e134
Requires: python3-webob
3c8e134
Requires: python3-magic
3c8e134
Requires: python3-requests
3c8e134
Requires: python3-requests-kerberos
3c8e134
Requires: python3-distro
3c8e134
Requires: python3-bugzilla
3c8e134
Requires: python3-six
3c8e134
Requires: python3-dnf
3c8e134
Requires: python3-hawkey
041aafb
Requires: mod_ssl
Jakub Filak 0e0894e
Requires: sqlite
Michal Toman ccea95e
Requires: crash >= 5.1.7
Michal Toman b9b9bb5
Requires: wget
Michal Toman b9b9bb5
Requires: kexec-tools
3c8e134
%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
3c8e134
%endif
Jakub Filak 0e0894e
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
9b5ad9f
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
3c8e134
# Remove byte-compiled python files generated by automake.
3c8e134
# automake uses system's python for all *.py files, even
3c8e134
# for those which needs to be byte-compiled with different
3c8e134
# version (python2/python3).
3c8e134
# rpm can do this work and use the appropriate python version.
3c8e134
find $RPM_BUILD_ROOT -name "*.py[co]" -delete
3c8e134
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
3c8e134
%if 0%{fedora} >= 29
3c8e134
%py_byte_compile %{__python3} ${RPM_BUILD_ROOT}%{_datadir}/%{name}/plugins
3c8e134
%endif
3c8e134
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
3c8e134
%if (0%{?rhel} && 0%{?rhel} <= 7) || (0%{?fedora} && 0%{?fedora} <= 27)
Michal Toman eee810c
/sbin/install-info %{_infodir}/%{name} %{_infodir}/dir 2> /dev/null || :
3c8e134
%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
3c8e134
%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 || :
3c8e134
%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 e261edc
%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
9b5ad9f
%{_bindir}/%{name}-reposync-faf
9b5ad9f
%{_bindir}/%{name}-plugin-checker
041aafb
%{_bindir}/%{name}-task
3c8e134
%{_bindir}/%{name}-bugzilla-refresh
3c8e134
%{_bindir}/%{name}-bugzilla-query
Michal Toman e261edc
%{_bindir}/bt_filter
Michal Toman eee810c
%{_bindir}/coredump2packages
3c8e134
%{python3_sitelib}/retrace/
3c8e134
%{_datadir}/%{name}/
9b5ad9f
%doc %{_mandir}/man1/%{name}-cleanup.1*
9b5ad9f
%doc %{_mandir}/man1/%{name}-interact.1*
9b5ad9f
%doc %{_mandir}/man1/%{name}-reposync.1*
9b5ad9f
%doc %{_mandir}/man1/%{name}-worker.1*
041aafb
%doc %{_mandir}/man1/%{name}-task.1*
Michal Toman eee810c
%doc %{_infodir}/%{name}*
041aafb
%doc README.md
041aafb
%license COPYING
Michal Toman eee810c
Michal Toman eee810c
%changelog
6df5f4e
* Thu Oct 03 2019 Miro Hrončok <mhroncok@redhat.com> - 1.19.0-5
6df5f4e
- Rebuilt for Python 3.8.0rc1 (#1748018)
6df5f4e
d9c7ce7
* Mon Aug 19 2019 Miro Hrončok <mhroncok@redhat.com> - 1.19.0-4
d9c7ce7
- Rebuilt for Python 3.8
d9c7ce7
a3e6560
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.19.0-3
a3e6560
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
a3e6560
f5344ed
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.19.0-2
f5344ed
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
f5344ed
3c8e134
* Tue Aug 28 2018 Martin Kutlak <mkutlak@redhat.com> 1.19.0-1
3c8e134
- docker: Allow building local changes
3c8e134
- docker: Introduce docker
3c8e134
- spec: Require Python3 pkgs of dnf and hawkey
3c8e134
- retrace: Check result of get_nevra_possibilities
3c8e134
- r-s-reposync-faf: Convert generator to list
3c8e134
- spec: Add BuildRequire python3-devel
3c8e134
- r-s-reposync-faf: Generate repo using createrepo_c
3c8e134
- httpd-conf: Set WSGIApplicationGroup to %{GLOBAL}
3c8e134
- r-s-reposync: Use default number of workers
3c8e134
- dnf-comp: Replace yum.misc lib with one from dnf
3c8e134
- py3-comp: Distinguish string and byte values in POST
3c8e134
- py3-comp: Specify encoding for Popen
3c8e134
- py3-comp: Use parentheses for print
3c8e134
- py3-comp: Encode response body as a bytestring
3c8e134
- py3-comp: Convert regexps strings to raw strings
3c8e134
- Migrate retrace-server to python3
3c8e134
- Implement splitFilename function using dnf
3c8e134
- Replace yum with DNF
3c8e134
- Correct syntax for gdb backtrace command
3c8e134
- Refactoring: Too long lines, missing whitespaces
3c8e134
- Add has_coredump() method to RetraceTask and upate get_md5_tasks()
3c8e134
- Modify get_md5_tasks to skip tasks with no vmcores or invalid md5sum files
3c8e134
- Add 'has_vmcore' method to RetraceTask
3c8e134
- spec: Bytecompile r-s plugins explicitly
3c8e134
- spec: Remove automake byte-compiled files
3c8e134
- spec: Correct the file ownership
3c8e134
- do not require install-info on F28+
3c8e134
- Adjust indentation according to pylint recommendation
3c8e134
- py3 compatibility: Replace filter function with a list equivalent
3c8e134
- py3 compatibility: Adjust urllib, urllib2 and urlparse
3c8e134
- Fix missing sys import
3c8e134
- Clean up of unused imports
3c8e134
- py3 compatibility: Adjust imports
3c8e134
- py3 compatibility: Resolution of range and xrange
3c8e134
- py3 compatibility: Replace ConfigParser module with configparser
3c8e134
- py3 compatibility: Classic division
3c8e134
- py3 compatibility: Adjust raise statement syntax
3c8e134
- py3 compatibility: Replace StringIO module with io module
3c8e134
- py3 compatibility: Removal of tuple parameter unpacking
3c8e134
- Refactoring: Missing or bad whitespace
3c8e134
- py3 compatibility: Set literals
3c8e134
- py3 compatibility: Use 'sorted' built-in function
3c8e134
- py3 compatibility: Replacement of basestring with six.string_types
3c8e134
- py3 compatibility: Ensure map function to return a list
3c8e134
- py3 compatibility: Replacement of 'has_key' with 'in'
3c8e134
- Make r-s-bugzilla-query query options configurable
3c8e134
- Load credentials from custom file
3c8e134
- manager: Make the bugzillano a clickable link
3c8e134
- Query the remaining bugzilla statuses
3c8e134
- retrace: Add reset_age method
3c8e134
- Implement retrace-server-bzquery tool
3c8e134
- Implement retrace-server-bugzilla-refresh tool
3c8e134
- Implement bugzilla field
3c8e134
- py3 compatibility: Octal literals
3c8e134
- py3 compatibility: try-except statement
3c8e134
- py3 compatibility: print statement is replaced with a print() function
3c8e134
- For vmcores that fail crash but have a large enough kernel log, try --minimal
3c8e134
- Set md5sum as soon as possible.
3c8e134
- Add dedup_vmcore to RetraceWorker and call from retrace-server-cleanup
3c8e134
- Fail task if the crash sys command exits with non-zero and kernellog is small
3c8e134
- Fix typo in exception handling of get_kernel_release
3c8e134
- Set default signal handler for SIGPIPE before calling Popen on 'crash --osrelease'
3c8e134
- Improve vmcore kernel parsing for certain scenarios and limit file scanning
3c8e134
- autogen: correctly parse buildrequires from spec file
3c8e134
- spec: Do not:x show every single change
3c8e134
ef86426
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.18.0-3
ef86426
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
ef86426
d90b81d
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.18.0-2
d90b81d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
d90b81d
041aafb
* Thu Feb 01 2018 Matej Marusak <mmarusak@redhat.com> 1.18.0-1
041aafb
- mark license as license
041aafb
- Update Python 2 dependency declarations to new packaging standards
041aafb
- defattr is not needed as this is default
041aafb
- use standard python_sitelib macro
041aafb
- remove old changelog entries
041aafb
- we do not build for el6 any more
041aafb
- remove group
041aafb
- Remove duplicate RetraceWorker._fail call when start_vmcore fails
041aafb
- Add md5sum and kernelver to email notifications, help text to failing notification
041aafb
- Convert notify_email_success and notify_email_fail to a single method
041aafb
- Create notify_email_success / notify_email_fail helpers
041aafb
- Enable packages with epoch
041aafb
- Update to new mock
041aafb
- Set kernelver and vmlinux as soon as possible
041aafb
- reposync: Cleanup is not done by default in createrepo
041aafb
- Explicitly state python version in shebangs
041aafb
- Fix unreadable crash subdirectory when tarball is submitted without group read permissions
041aafb
- Try noarch when checking for package
041aafb
- Add pylintrc
041aafb
- Use dnf in mock config on Fedora
041aafb
- Update mock config for new mock version
041aafb
- Pylint updates
041aafb
- Add commandline client
041aafb
- Add aliases into FAF reposync
041aafb
- Cleanup tmp FAF repository after failing
041aafb
- Write coresize for vmcores
041aafb
- Change error message
041aafb
- Fix wrong html tag
041aafb
- Set zero to non-existing type of tasks
041aafb
- Fix typeo in manager.wsgi which creates a backtrace on non-ftp tasks.
041aafb
- Bump version of gettext
041aafb
- Change path for README.md
041aafb
- Fix problem with missing modules on kernel versions with cached vmlinux files.
041aafb
- No first retrace time when no existing task
041aafb
- Make the reposync tool more verbose if required
cad247d
9b5ad9f
* Thu Mar 30 2017 Matej Marusak <mmarusak@redhat.com> 1.17.0-1
9b5ad9f
- Enable creating releases with makefile
9b5ad9f
- Introduce gen-version
9b5ad9f
- Do not use fedorahosted.org as source
9b5ad9f
- Include md5sum of original archive in summary page
9b5ad9f
- Do not try to get default time when ftptask
9b5ad9f
- Fix character escape typo
9b5ad9f
- Change retrace-server httpd config
9b5ad9f
- Modify search for existing vmlinux files in cache to handle older kernel-debuginfos
9b5ad9f
- Default to hex mode for crash commands involving backtraces.
9b5ad9f
- Create directories for tests if they are not present
9b5ad9f
- Don't mention old wiki page
9b5ad9f
- Fix double call of _fail method
9b5ad9f
- Update README
9b5ad9f
- Allow any compression of man pages
9b5ad9f
- Autogen without args configures for debugging
9b5ad9f
- Run 'configure' at the end of 'autogen'
9b5ad9f
- Improve autogen to list and install dependencies
9b5ad9f
- Avoid circular dependency on kernel-debuginfo for vmlinux files already in cache
9b5ad9f
- Add plugin checking action
9b5ad9f
- Update documentation of plugin in README
9b5ad9f
- Use short form rhel when creating repository
9b5ad9f
- Fix methods arguments
9b5ad9f
- Move global variables to config.py.in
9b5ad9f
- Recover from missing start/finish task files
9b5ad9f
- Change error message in cleanup script
9b5ad9f
- Add '-ascending' argument to gdb
9b5ad9f
- Use devtoolset-4-gdb when used on RHEL
9b5ad9f
- Enable creating repository from faf repository
9b5ad9f
- Add 'make check'
9b5ad9f
- Correct eu-unstrip parser if FILE is .
9b5ad9f
- Not mark packages with different architectures as duplicity
9b5ad9f
- Separate worker start_retrace method
9b5ad9f
- Add class to wrap plugins accessing
9b5ad9f
- Add class to wrap configuration file reading
9b5ad9f
- Delete python labels when no python backtrace available
9b5ad9f
- Git ignore bytecode
9b5ad9f
- Add python backtrace, source and locals into backtrace
9b5ad9f
- Move src/lib to src/retrace to make testing retrace-server easier
9b5ad9f
- Add "exploitable" into LocationMatch in the httpd.conf
9b5ad9f
- Fix invalid syntax error in sys.stderr.print()
Jakub Filak 99efca5
Jakub Filak c1c2bb0
* Thu Jun 2 2016 Jakub Filak <jfilak@redhat.com> - 1.16-1
Jakub Filak c1c2bb0
- Log failed to start tasks
Jakub Filak c1c2bb0
- Gracefully handle the worker errors
Jakub Filak c1c2bb0
- Move the FTP query operation to an AJAX operation
Jakub Filak c1c2bb0
- Fix duplicate email if a vmcore task fails to determine the kernel version
Jakub Filak c1c2bb0
- Fix typo preventing email notifications from working.
Jakub Filak c1c2bb0
- Correct eu-unstrip parser if FILE is '-'
Jakub Filak a0648dc
- Allow package names with Epoch
Jakub Filak a0648dc
Jakub Filak bd710af
* Fri Mar 18 2016 Jakub Filak <jfilak@redhat.com> - 1.15-1
Jakub Filak bd710af
- Correct paths to Fedora development releases
Jakub Filak bd710af
- Fix small problem with strip_vmcore calling prepare_debuginfo
Jakub Filak bd710af
- Avoid calling prepare_debuginfo from retrace-server-interact after kernel version detection
Jakub Filak bd710af
- Move prepare_debuginfo and strip_vmcore inside RetraceTask
Jakub Filak bd710af
- Add vmlinux file inside RetraceTask
Jakub Filak bd710af
- Fix bt_filter missing last task/PID read if the last line was not blank
Jakub Filak bd710af
- Update the release information to be dynamic based off of plugins
Jakub Filak bd710af
- Including a Red Hat Enterprise Linux plugin
Jakub Filak bd710af
- Mock logging into retrace task's dir
Jakub Filak bd710af
- Enforce uniform mode bits for almost all RetraceTask files
Jakub Filak bd710af
- Fix incorrect group permissions when writing RetraceServer files especially with interactive mode
Jakub Filak bd710af
- Fix retrace-server-worker --restart backtrace due to unwriteable retrace_log
9b5ad9f
- Correct license address
9b5ad9f
- Add VMCoreTask and UsrCoreTask to config
Jakub Filak a33b3ec
Jakub Filak ad65bf9
* Tue Feb 16 2016 Jakub Filak <jfilak@redhat.com> - 1.14-1
9b5ad9f
- generated config.py for the target platform at build time
9b5ad9f
- update URL patterns for Fedora repositories
9b5ad9f
- spec: add sqlite and cron to requirements
9b5ad9f
- set "crash" inside get_crash_cmd file if the file does not exist
9b5ad9f
- fix get_use_mock typo
9b5ad9f
- use %%global for the nested python_site macro instead of %%define