%{!?python_site: %global python_site %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(0)")} Summary: Application for remote coredump analysis Name: retrace-server Version: 1.17.0 Release: 1%{?dist} License: GPLv2+ Group: Applications/System URL: https://github.com/abrt/retrace-server Source0: https://github.com/abrt/%{name}/archive/%{version}/%{name}-%{version}.tar.gz BuildArch: noarch BuildRequires: intltool BuildRequires: libtool BuildRequires: texinfo BuildRequires: asciidoc BuildRequires: xmlto %{?el6:Requires: python-argparse} Requires: rsync Requires: mock >= 1.1.11 Requires: xz Requires: gzip Requires: bzip2 Requires: tar Requires: p7zip Requires: unzip Requires: lzop Requires: elfutils Requires: createrepo Requires: mod_wsgi Requires: mod_ssl Requires: python-webob Requires: sqlite Requires: yum-utils Requires: crash >= 5.1.7 Requires: wget Requires: kexec-tools Requires: python-magic Requires(preun): /sbin/install-info Requires(post): /sbin/install-info Requires(post): /usr/bin/crontab Obsoletes: abrt-retrace-server < 2.0.3 Provides: abrt-retrace-server = 2.0.3 %description The retrace server provides a coredump analysis and backtrace generation service over a network using HTTP protocol. %prep %setup -q %build autoconf %configure make %{?_smp_mflags} %install make install DESTDIR=${RPM_BUILD_ROOT} mandir=%{_mandir} mkdir -p ${RPM_BUILD_ROOT}/%{_localstatedir}/cache/%{name} mkdir -p ${RPM_BUILD_ROOT}/%{_localstatedir}/cache/%{name}/kernel mkdir -p ${RPM_BUILD_ROOT}/%{_localstatedir}/cache/%{name}/download mkdir -p ${RPM_BUILD_ROOT}/%{_localstatedir}/log/%{name} mkdir -p ${RPM_BUILD_ROOT}/%{_localstatedir}/spool/%{name} mkdir -p ${RPM_BUILD_ROOT}/%{_datadir}/%{name} rm -f ${RPM_BUILD_ROOT}%{_infodir}/dir %{find_lang} %{name} %pre #retrace uid/gid reserved in setup, rhbz #706012 %define retrace_gid_uid 174 getent group retrace > /dev/null || groupadd -f -g %{retrace_gid_uid} --system retrace getent passwd retrace > /dev/null || useradd --system -g retrace -u %{retrace_gid_uid} -d %{_datadir}/%{name} -s /sbin/nologin retrace exit 0 %post /sbin/install-info %{_infodir}/%{name} %{_infodir}/dir 2> /dev/null || : /usr/sbin/usermod -a -G mock retrace 2> /dev/null || : if [ "$1" = 1 ] then #add disabled crontab entries to retrace's crontab %define retrace_crontab_entry0 "# 0 * * * * /usr/bin/retrace-server-cleanup >> /var/log/retrace-server/cleanup_error.log 2>&1" %define retrace_crontab_entry1 "#0 0,12 * * * /usr/bin/retrace-server-reposync fedora 15 i386 >> /var/log/retrace-server/reposync_error.log 2>&1" %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" %define retrace_crontab_entry3 "#0 4,16 * * * /usr/bin/retrace-server-reposync fedora 16 i386 >> /var/log/retrace-server/reposync_error.log 2>&1" %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" %define retrace_crontab_entry5 "#0 8,20 * * * /usr/bin/retrace-server-reposync fedora rawhide i386 >> /var/log/retrace-server/reposync_error.log 2>&1" %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" (crontab -u retrace -l 2> /dev/null; echo %{retrace_crontab_entry0}; \ echo %{retrace_crontab_entry1}; echo %{retrace_crontab_entry2}; \ echo %{retrace_crontab_entry3}; echo %{retrace_crontab_entry4}; \ echo %{retrace_crontab_entry5}; echo %{retrace_crontab_entry6};) | crontab -u retrace - 2> /dev/null fi %preun if [ "$1" = 0 ] then /sbin/install-info --delete %{_infodir}/retrace-server %{_infodir}/dir 2> /dev/null || : #comment entries in retrace's crontab (crontab -u retrace -l 2> /dev/null | sed "s,^\([^#].*\)$,#\1,g") | crontab -u retrace - 2> /dev/null fi %files -f %{name}.lang %defattr(-,root,root,-) %config(noreplace) %{_sysconfdir}/httpd/conf.d/%{name}-httpd.conf %config(noreplace) %{_sysconfdir}/%{name}.conf %config(noreplace) %{_sysconfdir}/logrotate.d/%{name} %dir %attr(0755,retrace,retrace) %{_localstatedir}/cache/%{name} %dir %attr(0755,retrace,retrace) %{_localstatedir}/cache/%{name}/kernel %dir %attr(0755,retrace,retrace) %{_localstatedir}/cache/%{name}/download %dir %attr(0750,retrace,retrace) %{_localstatedir}/log/%{name} %dir %attr(0770,retrace,retrace) %{_localstatedir}/spool/%{name} %dir %{_datadir}/%{name} %{_bindir}/%{name}-worker %{_bindir}/%{name}-interact %{_bindir}/%{name}-cleanup %{_bindir}/%{name}-reposync %{_bindir}/%{name}-reposync-faf %{_bindir}/%{name}-plugin-checker %{_bindir}/bt_filter %{_bindir}/coredump2packages %{python_site}/retrace/* %{_datadir}/%{name}/* %doc %{_mandir}/man1/%{name}-cleanup.1* %doc %{_mandir}/man1/%{name}-interact.1* %doc %{_mandir}/man1/%{name}-reposync.1* %doc %{_mandir}/man1/%{name}-worker.1* %doc %{_infodir}/%{name}* %doc COPYING README.md %if 0%{?rhel} > 5 && 0%{?rhel} < 8 %exclude /usr/share/doc/retrace-server/README.md %endif %changelog * Thu Mar 30 2017 Matej Marusak 1.17.0-1 - Enable creating releases with makefile - Introduce gen-version - Do not use fedorahosted.org as source - Include md5sum of original archive in summary page - Do not try to get default time when ftptask - Fix character escape typo - Change retrace-server httpd config - Modify search for existing vmlinux files in cache to handle older kernel-debuginfos - Default to hex mode for crash commands involving backtraces. - Create directories for tests if they are not present - Don't mention old wiki page - Fix double call of _fail method - Update README - Allow any compression of man pages - Autogen without args configures for debugging - Run 'configure' at the end of 'autogen' - Improve autogen to list and install dependencies - Avoid circular dependency on kernel-debuginfo for vmlinux files already in cache - Add plugin checking action - Update documentation of plugin in README - Use short form rhel when creating repository - Fix methods arguments - Move global variables to config.py.in - Recover from missing start/finish task files - Change error message in cleanup script - Add '-ascending' argument to gdb - Use devtoolset-4-gdb when used on RHEL - Enable creating repository from faf repository - Add 'make check' - Correct eu-unstrip parser if FILE is . - Not mark packages with different architectures as duplicity - Separate worker start_retrace method - Add class to wrap plugins accessing - Add class to wrap configuration file reading - Delete python labels when no python backtrace available - Git ignore bytecode - Add python backtrace, source and locals into backtrace - Move src/lib to src/retrace to make testing retrace-server easier - Add "exploitable" into LocationMatch in the httpd.conf - Fix invalid syntax error in sys.stderr.print() * Thu Jun 2 2016 Jakub Filak - 1.16-1 - Log failed to start tasks - Gracefully handle the worker errors - Move the FTP query operation to an AJAX operation - Fix duplicate email if a vmcore task fails to determine the kernel version - Fix typo preventing email notifications from working. - Correct eu-unstrip parser if FILE is '-' - Allow package names with Epoch * Fri Mar 18 2016 Jakub Filak - 1.15-1 - Correct paths to Fedora development releases - Fix small problem with strip_vmcore calling prepare_debuginfo - Avoid calling prepare_debuginfo from retrace-server-interact after kernel version detection - Move prepare_debuginfo and strip_vmcore inside RetraceTask - Add vmlinux file inside RetraceTask - Fix bt_filter missing last task/PID read if the last line was not blank - Update the release information to be dynamic based off of plugins - Including a Red Hat Enterprise Linux plugin - Mock logging into retrace task's dir - Enforce uniform mode bits for almost all RetraceTask files - Fix incorrect group permissions when writing RetraceServer files especially with interactive mode - Fix retrace-server-worker --restart backtrace due to unwriteable retrace_log - Correct license address - Add VMCoreTask and UsrCoreTask to config * Tue Feb 16 2016 Jakub Filak - 1.14-1 - generated config.py for the target platform at build time - update URL patterns for Fedora repositories - spec: add sqlite and cron to requirements - set "crash" inside get_crash_cmd file if the file does not exist - fix get_use_mock typo - use %%global for the nested python_site macro instead of %%define * Mon Oct 05 2015 Michal Toman 1.13-1 - update handling of RT kernels - do not forward error messages from 'strings' to actual stderr - do not die if RepoDir has no subdirs - allow 32-bit crash to be executed on 64-bit hosts - add bits for script hooks - better integration with FAF - refactor worker * Wed Mar 11 2015 Michal Toman 1.12-4 - fix the invocation of mock shell * Tue Mar 03 2015 Michal Toman 1.12-3 - manager.wsgi - fix kernelver handling (harshula@redhat.com) - add support for ppc64le and aarch64 * Thu Jul 31 2014 Michal Toman 1.12-1 - do not run kmem on vmcores by default - fix group readability of vmcores - add support for lzop compression - add DeleteFailedTaskAfter config option - add arch-based remote execution - add set-success and set-fail actions to retrace-server-interact - add config sanity checks to retrace-server-cleanup * Thu Mar 13 2014 Michal Toman 1.11-2 - fix changelog - do not run 'kmem' crash command by default * Thu Feb 27 2014 Michal Toman 1.11-1 - do not die trying to chmod a hardlink - only hardlink unpacked vmcores - print command line formatted correctly - allow submitting vmcores with spaces in file name - do not run makedumpfile when not necessary - allow to specify kernel VRA with custom cores - do not require the trailing slash in task manager URL - do not kill retrace-server-cleanup when retrace_log does not exist - cache kernel version into task directory - add support for ppc64, s390x - include floating point registers in userspace backtraces - execute ABRT's exploitability plugin if available * Wed Aug 21 2013 Michal Toman 1.10-1 - add possibility to make case number clickable - support local files in 'Custom core location' - create the stats database group-writable - do not die when saving stats fails - add possibility to restart task - do not show the output of 'mod -S' in crash - change directory to $MISCDIR after jumping to crash - load correct flavour for el4 kernels - do not kill tasks started from task manager - do not die if task manager is disabled - add basic support for ARM - find correct debuginfo for realtime kernels - fix httpd config for apache 2.4 - use mtime instead of atime in RetraceTask.get_age() - use correct suffixes when unpacking archives - do not die if module list can't be read from vmcore - add support for X-CoreFileDirectory header - add support for tweaking yum config in reposync - rework reposync logging - accept package list in the archive with crash data - try harder to find ix86 debuginfo in koji * Wed Mar 20 2013 Michal Toman 1.9-1 - guess debuginfo name correctly for <= el4 - rename _log to retrace-log - fix cross-arch vmcores processing - debug mode checked by default in task manager - fix typos - touch task directory when using retrace-server-interact - forward kernel version from command line correctly - parse flavoured kernel version correctly - allow to send notification e-mails - symlink retrace_log to MISC_DIR - do not die on download error - rework front page - be able to specify custom core location - do not die if makedumpfile fails - make FTP buffer size configurable - fix detaching from httpd - add more logging - fix paths of DF_BIN and TAR_BIN - fix dependencies - unify access to task directory elements - display the progress of FTP download - add notes & case no. boxes - run bt_filter on vmcores automatically - add timestamps to logs - enable free space check in task manager - urlencode hyperlinks * Fri Nov 2 2012 Michal Toman 1.8-1 - use standard python mechanisms for logging - determine archive types with file magic - catch all task-specific exceptions - support various archive types - make AuthGroup configurable - allow overriding kernel version & architecture from command line - create a writable directory for interactive debuggers - add the retrace-server-interact printdir command - autoload modules when jumping into crash - make dead tasks deletable (really look to /proc) - show downloaded files in task manager - do not delete files that do not need unpacking - show task's start and finish time - added backref to downloaded file - make vmcore readable for retrace group - improve architecture guessing for vmcores - add possibility to wget kernel debuginfo - try harder to determine the actual vmcore - fix kernel version handling - fix httpd config * Fri Jul 27 2012 Michal Toman 1.7-1 - check whether package can be retraced before uploading - add possibility to disable interactive debugging - add support for chrooted crashes - also cache debuginfo for modules loaded in a vmcore - add task manager - add possibility to search kernel debuginfo in koji-like directory structure - fix permission denied on gdb.sh - add possibility to query an external FTP for task data - tasks may have multiple results - tasks may have remote resources - add possibility to run makedumpfile on vmcores - add possibility to archive old tasks instead of deleting them * Fri May 04 2012 Michal Toman 1.6-1 - add support for interactive debugging - coredump2packages - handle malformed eu-unstrip output - expose repos via HTTP * Mon Feb 27 2012 Michal Toman 1.5-1 - add support for F17 - add hacks helping to depsolver - read huge files buffered - get rid of retrace-server.repo file - add //delete action * Tue Nov 22 2011 Michal Toman 1.4-1 - add support for vmcores - add welcome page - add statistics page - add support for rawhide * Tue Aug 23 2011 Michal Toman 1.3-1 - cron jobs are not enabled by default - support X-Task-Type header - use atomic operations to lock/rename - add support for http(s) and ftp in reposync - abort if release is not supported - add option to use createrepo --update - add support for F16 * Wed Jun 29 2011 Michal Toman 1.2-1 - add option to verify GPG signatures - make HTTPS optional - use RetraceTask class - validate input - limit allowed files - do not allow worker to start twice - ship cron configuration - do not require suid launcher - minor bug and typo fixes * Wed Jun 01 2011 Scott Dodson 1.1-2 - Add asciidocs xmlto to BuildRequires * Wed Jun 01 2011 Michal Toman 1.1-1 - add logrotate script - add asciidoc support and manpages - replace rm by os.remove() and shutil.rmtree() - call du and df without block factor - use communicate() instead of .stdout.read() - replace popen by execlp - import manual from ABRT git, minor changes - create log directory - use 'retrace' user and group * Wed May 18 2011 Michal Toman 1.0-1 - initial packaging