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 b9b9bb5
Version: 1.8
cbe2d73
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 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 b9b9bb5
%dir %attr(0750,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 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
cbe2d73
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.8-2
cbe2d73
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
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