Blob Blame History Raw
%{!?python_site: %define 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.3
Release: 1%{?dist}
License: GPLv2+
Group: Applications/System

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: elfutils
Requires: createrepo
Requires: mod_wsgi
Requires: mod_ssl
Requires: python-webob
Requires: yum-utils
Requires(preun): /sbin/install-info
Requires(post): /sbin/install-info

Obsoletes: abrt-retrace-server < 2.0.3
Provides: abrt-retrace-server = 2.0.3

The retrace server provides a coredump analysis and backtrace
generation service over a network using HTTP protocol.

%setup -q

make %{?_smp_mflags}

make install DESTDIR=${RPM_BUILD_ROOT} mandir=%{_mandir}

mkdir -p ${RPM_BUILD_ROOT}/%{_localstatedir}/cache/%{name}
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}

#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

/sbin/install-info %{_infodir}/%{name} %{_infodir}/dir 2> /dev/null || :
/usr/sbin/usermod -a -G mock apache 2> /dev/null || :

if [ "$1" = 1 ]
#add disabled crontab entry to apache's crontab
    %define apache_crontab_entry "# 0 * * * * /usr/bin/retrace-server-cleanup >> /var/log/retrace-server/cleanup_error.log 2>&1"
    (crontab -u apache -l 2> /dev/null; echo %{apache_crontab_entry}) | crontab -u apache - 2> /dev/null

if [ "$1" = 0 ]
    /sbin/install-info --delete %{_infodir}/retrace-server %{_infodir}/dir 2> /dev/null || :
#remove retrace-server related entries from apache's crontab
    (crontab -u apache -l 2> /dev/null | sed "/%{name}/d") | crontab -u apache - 2> /dev/null

%files -f %{name}.lang
%config(noreplace) %{_sysconfdir}/httpd/conf.d/%{name}-httpd.conf
%config(noreplace) %{_sysconfdir}/%{name}.conf
%config(noreplace) %{_sysconfdir}/yum.repos.d/%{name}.repo
%config(noreplace) %{_sysconfdir}/logrotate.d/%{name}
%dir %attr(0755,retrace,retrace) %{_localstatedir}/cache/%{name}
%dir %attr(0775,retrace,apache) %{_localstatedir}/log/%{name}
%dir %attr(0775,retrace,apache) %{_localstatedir}/spool/%{name}
%dir %{_datadir}/%{name}
%attr(0600,root,root) %{_localstatedir}/spool/cron/retrace
%doc %{_mandir}/man1/%{name}-cleanup.1.gz
%doc %{_mandir}/man1/%{name}-reposync.1.gz
%doc %{_mandir}/man1/%{name}-worker.1.gz
%doc %{_infodir}/%{name}*

* 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
- 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