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 045cecb
Version: 1.1
Michal Toman 045cecb
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 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 eee810c
Requires: mock
Michal Toman eee810c
Requires: xz
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 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 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 045cecb
/usr/sbin/usermod -G mock apache 2> /dev/null || :
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 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 eee810c
%config(noreplace) %{_sysconfdir}/yum.repos.d/%{name}.repo
Michal Toman 045cecb
%config(noreplace) %{_sysconfdir}/logrotate.d/%{name}
Michal Toman 045cecb
%dir %attr(0755,retrace,retrace) %{_localstatedir}/cache/%{name}
Michal Toman 045cecb
%dir %attr(0755,retrace,retrace) %{_localstatedir}/log/%{name}
Michal Toman 045cecb
%dir %attr(0775,retrace,apache) %{_localstatedir}/spool/%{name}
Michal Toman eee810c
%dir %{_datadir}/%{name}
Michal Toman eee810c
%caps(cap_setuid=ep) %{_bindir}/%{name}-worker
Michal Toman eee810c
%{_bindir}/%{name}-cleanup
Michal Toman eee810c
%{_bindir}/%{name}-reposync
Michal Toman eee810c
%{_bindir}/coredump2packages
Michal Toman eee810c
%{python_site}/retrace.py*
Michal Toman eee810c
%{_datadir}/%{name}/*
Michal Toman 045cecb
%doc %{_mandir}/man1/%{name}-cleanup.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 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