Michal Toman eee810c
%{!?python_site: %define python_site %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(0)")}
Michal Toman eee810c
Michal Toman eee810c
Summary: Application for remote coredump analysis
Michal Toman eee810c
Name: retrace-server
Michal Toman 59861b3
Version: 1.12
Michal Toman 59861b3
Release: 2%{?dist}
Michal Toman eee810c
License: GPLv2+
Michal Toman eee810c
Group: Applications/System
Michal Toman eee810c
URL: https://fedorahosted.org/abrt/wiki/AbrtRetraceServer
Michal Toman eee810c
Source: https://fedorahosted.org/released/%{name}/%{name}-%{version}.tar.gz
Michal Toman eee810c
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
Michal Toman eee810c
Michal Toman eee810c
%{?el6:Requires: python-argparse}
Michal Toman eee810c
Requires: rsync
Michal Toman 0a774e0
Requires: mock >= 1.1.11
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
Michal Toman eee810c
Requires: elfutils
Michal Toman eee810c
Requires: createrepo
Michal Toman eee810c
Requires: mod_wsgi
Michal Toman eee810c
Requires: mod_ssl
Michal Toman eee810c
Requires: python-webob
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
Michal Toman 4b7c1f8
Requires: python-magic
Michal Toman eee810c
Requires(preun): /sbin/install-info
Michal Toman eee810c
Requires(post): /sbin/install-info
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
Michal Toman eee810c
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
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
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
Michal Toman eee810c
/sbin/install-info %{_infodir}/%{name} %{_infodir}/dir 2> /dev/null || :
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
Michal Toman 045cecb
    /sbin/install-info --delete %{_infodir}/retrace-server %{_infodir}/dir 2> /dev/null || :
Michal Toman e19fe7f
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
%defattr(-,root,root,-)
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 eee810c
%dir %{_datadir}/%{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
Michal Toman 4b7c1f8
%{_bindir}/bt_filter
Michal Toman eee810c
%{_bindir}/coredump2packages
Michal Toman 0a774e0
%{python_site}/retrace/*
Michal Toman eee810c
%{_datadir}/%{name}/*
Michal Toman 045cecb
%doc %{_mandir}/man1/%{name}-cleanup.1.gz
Michal Toman f89c503
%doc %{_mandir}/man1/%{name}-interact.1.gz
Michal Toman 045cecb
%doc %{_mandir}/man1/%{name}-reposync.1.gz
Michal Toman 045cecb
%doc %{_mandir}/man1/%{name}-worker.1.gz
Michal Toman eee810c
%doc %{_infodir}/%{name}*
Michal Toman eee810c
%doc COPYING INSTALL README TODO
Michal Toman eee810c
Michal Toman eee810c
%changelog
Michal Toman 59861b3
* Thu Jul 31 2014 Michal Toman <mtoman@redhat.com> 1.12-1
Michal Toman 59861b3
- do not run kmem on vmcores by default
Michal Toman 59861b3
- fix group readability of vmcores
Michal Toman 59861b3
- add support for lzop compression
Michal Toman 59861b3
- add DeleteFailedTaskAfter config option
Michal Toman 59861b3
- add arch-based remote execution
Michal Toman 59861b3
- add set-success and set-fail actions to retrace-server-interact
Michal Toman 59861b3
- add config sanity checks to retrace-server-cleanup
Michal Toman 59861b3
Michal Toman d82f34f
* Thu Feb 27 2014 Michal Toman <mtoman@redhat.com> 1.11-1
Michal Toman d82f34f
- do not die trying to chmod a hardling
Michal Toman d82f34f
- do not hardlink unpacked vmcores
Michal Toman d82f34f
- print command line formatted correctly
Michal Toman d82f34f
- allow submitting vmcores with spaces in file name
Michal Toman d82f34f
- do not run makedumpfile when not necessary
Michal Toman d82f34f
- allow to specify kernel VRA with custom cores
Michal Toman d82f34f
- do not require the trailing slash in task manager URL
Michal Toman d82f34f
- do not kill retrace-server-cleanup when retrace_log does not exist
Michal Toman d82f34f
- cache kernel version into task directory
Michal Toman d82f34f
- add support for ppc64, s390x
Michal Toman d82f34f
- include floating point registers in userspace backtraces
Michal Toman d82f34f
- execute ABRT's exploitability plugin if available
Michal Toman d82f34f
Michal Toman 1f2e6a0
* Wed Aug 21 2013 Michal Toman <mtoman@redhat.com> 1.10-1
Michal Toman 1f2e6a0
- add possibility to make case number clickable
Michal Toman 1f2e6a0
- support local files in 'Custom core location'
Michal Toman 1f2e6a0
- create the stats database group-writable
Michal Toman 1f2e6a0
- do not die when saving stats fails
Michal Toman 1f2e6a0
- add possibility to restart task
Michal Toman 1f2e6a0
- do not show the output of 'mod -S' in crash
Michal Toman 1f2e6a0
- change directory to $MISCDIR after jumping to crash
Michal Toman 1f2e6a0
- load correct flavour for el4 kernels
Michal Toman 1f2e6a0
- do not kill tasks started from task manager
Michal Toman 1f2e6a0
- do not die if task manager is disabled
Michal Toman 1f2e6a0
- add basic support for ARM
Michal Toman 1f2e6a0
- find correct debuginfo for realtime kernels
Michal Toman 1f2e6a0
- fix httpd config for apache 2.4
Michal Toman 1f2e6a0
- use mtime instead of atime in RetraceTask.get_age()
Michal Toman 1f2e6a0
- use correct suffixes when unpacking archives
Michal Toman 1f2e6a0
- do not die if module list can't be read from vmcore
Michal Toman 1f2e6a0
- add support for X-CoreFileDirectory header
Michal Toman 1f2e6a0
- add support for tweaking yum config in reposync
Michal Toman 1f2e6a0
- rework reposync logging
Michal Toman 1f2e6a0
- accept package list in the archive with crash data
Michal Toman 1f2e6a0
- try harder to find ix86 debuginfo in koji
Michal Toman 1f2e6a0
Michal Toman 59861b3
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.9-2
Michal Toman 59861b3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
Michal Toman 4b7c1f8
* Wed Mar 20 2013 Michal Toman <mtoman@redhat.com> 1.9-1
Michal Toman 4b7c1f8
- guess debuginfo name correctly for <= el4
Michal Toman 4b7c1f8
- rename _log to retrace-log
Michal Toman 4b7c1f8
- fix cross-arch vmcores processing
Michal Toman 4b7c1f8
- debug mode checked by default in task manager
Michal Toman 4b7c1f8
- fix typos
Michal Toman 4b7c1f8
- touch task directory when using retrace-server-interact
Michal Toman 4b7c1f8
- forward kernel version from command line correctly
Michal Toman 4b7c1f8
- parse flavoured kernel version correctly
Michal Toman 4b7c1f8
- allow to send notification e-mails
Michal Toman 4b7c1f8
- symlink retrace_log to MISC_DIR
Michal Toman 4b7c1f8
- do not die on download error
Michal Toman 4b7c1f8
- rework front page
Michal Toman 4b7c1f8
- be able to specify custom core location
Michal Toman 4b7c1f8
- do not die if makedumpfile fails
Michal Toman 4b7c1f8
- make FTP buffer size configurable
Michal Toman 4b7c1f8
- fix detaching from httpd
Michal Toman 4b7c1f8
- add more logging
Michal Toman 4b7c1f8
- fix paths of DF_BIN and TAR_BIN
Michal Toman 4b7c1f8
- fix dependencies
Michal Toman 4b7c1f8
- unify access to task directory elements
Michal Toman 4b7c1f8
- display the progress of FTP download
Michal Toman 4b7c1f8
- add notes & case no. boxes
Michal Toman 4b7c1f8
- run bt_filter on vmcores automatically
Michal Toman 4b7c1f8
- add timestamps to logs
Michal Toman 4b7c1f8
- enable free space check in task manager
Michal Toman 4b7c1f8
- urlencode hyperlinks
cbe2d73
Michal Toman b9b9bb5
* Fri Nov 2 2012 Michal Toman <mtoman@redhat.com> 1.8-1
Michal Toman b9b9bb5
- use standard python mechanisms for logging
Michal Toman b9b9bb5
- determine archive types with file magic
Michal Toman b9b9bb5
- catch all task-specific exceptions
Michal Toman b9b9bb5
- support various archive types
Michal Toman b9b9bb5
- make AuthGroup configurable
Michal Toman b9b9bb5
- allow overriding kernel version & architecture from command line
Michal Toman b9b9bb5
- create a writable directory for interactive debuggers
Michal Toman b9b9bb5
- add the retrace-server-interact printdir command
Michal Toman b9b9bb5
- autoload modules when jumping into crash
Michal Toman b9b9bb5
- make dead tasks deletable (really look to /proc)
Michal Toman b9b9bb5
- show downloaded files in task manager
Michal Toman b9b9bb5
- do not delete files that do not need unpacking
Michal Toman b9b9bb5
- show task's start and finish time
Michal Toman b9b9bb5
- added backref to downloaded file
Michal Toman b9b9bb5
- make vmcore readable for retrace group
Michal Toman b9b9bb5
- improve architecture guessing for vmcores
Michal Toman b9b9bb5
- add possibility to wget kernel debuginfo
Michal Toman b9b9bb5
- try harder to determine the actual vmcore
Michal Toman b9b9bb5
- fix kernel version handling
Michal Toman b9b9bb5
- fix httpd config
Michal Toman b9b9bb5
Michal Toman b9b9bb5
* Fri Jul 27 2012 Michal Toman <mtoman@redhat.com> 1.7-1
Michal Toman b9b9bb5
- check whether package can be retraced before uploading
Michal Toman b9b9bb5
- add possibility to disable interactive debugging
Michal Toman b9b9bb5
- add support for chrooted crashes
Michal Toman b9b9bb5
- also cache debuginfo for modules loaded in a vmcore
Michal Toman b9b9bb5
- add task manager
Michal Toman b9b9bb5
- add possibility to search kernel debuginfo in koji-like directory structure
Michal Toman b9b9bb5
- fix permission denied on gdb.sh
Michal Toman b9b9bb5
- add possibility to query an external FTP for task data
Michal Toman b9b9bb5
- tasks may have multiple results
Michal Toman b9b9bb5
- tasks may have remote resources
Michal Toman b9b9bb5
- add possibility to run makedumpfile on vmcores
Michal Toman b9b9bb5
- add possibility to archive old tasks instead of deleting them
Michal Toman b9b9bb5
eb534eb
* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.6-2
eb534eb
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
Michal Toman f89c503
* Fri May 04 2012 Michal Toman <mtoman@redhat.com> 1.6-1
Michal Toman f89c503
- add support for interactive debugging
Michal Toman f89c503
- coredump2packages - handle malformed eu-unstrip output
Michal Toman f89c503
- expose repos via HTTP
Michal Toman f89c503
Michal Toman e19fe7f
* Mon Feb 27 2012 Michal Toman <mtoman@redhat.com> 1.5-1
Michal Toman e19fe7f
- add support for F17
Michal Toman e19fe7f
- add hacks helping to depsolver
Michal Toman e19fe7f
- read huge files buffered
Michal Toman e19fe7f
- get rid of retrace-server.repo file
Michal Toman e19fe7f
- add /<task_id>/delete action
Michal Toman e19fe7f
6bdcc09
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.4-2
6bdcc09
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
Michal Toman ccea95e
* Tue Nov 22 2011 Michal Toman <mtoman@redhat.com> 1.4-1
Michal Toman ccea95e
- add support for vmcores
Michal Toman ccea95e
- add welcome page
Michal Toman ccea95e
- add statistics page
Michal Toman ccea95e
- add support for rawhide
Michal Toman ccea95e
Michal Toman 0a774e0
* Tue Aug 23 2011 Michal Toman <mtoman@redhat.com> 1.3-1
Michal Toman 0a774e0
- cron jobs are not enabled by default
Michal Toman 0a774e0
- support X-Task-Type header
Michal Toman 0a774e0
- use atomic operations to lock/rename
Michal Toman 0a774e0
- add support for http(s) and ftp in reposync
Michal Toman 0a774e0
- abort if release is not supported
Michal Toman 0a774e0
- add option to use createrepo --update
Michal Toman 0a774e0
- add support for F16
Michal Toman 0a774e0
Michal Toman dbebecd
* Wed Jun 29 2011 Michal Toman <mtoman@redhat.com> 1.2-1
Michal Toman dbebecd
- add option to verify GPG signatures
Michal Toman dbebecd
- make HTTPS optional
Michal Toman dbebecd
- use RetraceTask class
Michal Toman dbebecd
- validate input
Michal Toman dbebecd
- limit allowed files
Michal Toman dbebecd
- do not allow worker to start twice
Michal Toman dbebecd
- ship cron configuration
Michal Toman dbebecd
- do not require suid launcher
Michal Toman dbebecd
- minor bug and typo fixes
Michal Toman dbebecd
Michal Toman 045cecb
* Wed Jun 01 2011 Scott Dodson <sdodson@redhat.com> 1.1-2
Michal Toman 045cecb
- Add asciidocs xmlto to BuildRequires
Michal Toman 045cecb
* Wed Jun 01 2011 Michal Toman <mtoman@redhat.com> 1.1-1
Michal Toman 045cecb
- add logrotate script
Michal Toman 045cecb
- add asciidoc support and manpages
Michal Toman 045cecb
- replace rm by os.remove() and shutil.rmtree()
Michal Toman 045cecb
- call du and df without block factor
Michal Toman 045cecb
- use communicate() instead of .stdout.read()
Michal Toman 045cecb
- replace popen by execlp
Michal Toman 045cecb
- import manual from ABRT git, minor changes
Michal Toman 045cecb
- create log directory
Michal Toman 045cecb
- use 'retrace' user and group
Michal Toman 045cecb
Michal Toman eee810c
* Wed May 18 2011 Michal Toman <mtoman@redhat.com> 1.0-1
Michal Toman eee810c
- initial packaging