File supervisor.spec of Package supervisor
%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
Summary: A System for Allowing the Control of Process State on UNIX
Name: supervisor
Version: 3.1.4
Release: 1%{?dist}
License: ZPLv2.1 and BSD and MIT
Group: System Environment/Base
URL: http://supervisord.org/
Source0: https://github.com/Supervisor/supervisor/archive/%{version}.tar.gz
Source1: supervisord.service
Source2: supervisord.conf
Source3: supervisor.logrotate
Source4: supervisor.tmpfiles
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
BuildArch: noarch
BuildRequires: python-devel
BuildRequires: python-setuptools
BuildRequires: systemd
Requires: python-meld3 >= 0.6.5
Requires: python-setuptools
Requires(post): systemd
Requires(preun): systemd
Requires(postun): systemd
%description
The supervisor is a client/server system that allows its users to control a
number of processes on UNIX-like operating systems.
%prep
%setup -q -n %{name}-%{version}%{?prever}
%build
CFLAGS="%{optflags}" %{__python} setup.py build
%install
rm -rf %{buildroot}
%{__python} setup.py install --skip-build --root %{buildroot}
mkdir -p %{buildroot}/%{_sysconfdir}
mkdir -p %{buildroot}/%{_sysconfdir}/supervisord.d
mkdir -p %{buildroot}/%{_sysconfdir}/logrotate.d/
mkdir -p %{buildroot}%{_unitdir}
mkdir -p %{buildroot}/%{_localstatedir}/log/%{name}
mkdir -p %{buildroot}/%{_localstatedir}/run/supervisor
chmod 770 %{buildroot}/%{_localstatedir}/log/%{name}
chmod 770 %{buildroot}/%{_localstatedir}/run/supervisor
install -p -m 644 %{SOURCE1} %{buildroot}%{_unitdir}/supervisord.service
install -p -m 644 %{SOURCE2} %{buildroot}/%{_sysconfdir}/supervisord.conf
install -p -m 644 %{SOURCE3} %{buildroot}/%{_sysconfdir}/logrotate.d/supervisor
install -D -p -m 0644 %{SOURCE4} %{buildroot}%{_sysconfdir}/tmpfiles.d/%{name}.conf
sed -i s'/^#!.*//' $( find %{buildroot}/%{python_sitelib}/supervisor/ -type f)
rm -rf %{buildroot}/%{python_sitelib}/supervisor/meld3/
rm -f %{buildroot}%{_prefix}/doc/*.txt
%clean
rm -rf %{buildroot}
%post
%systemd_post %{name}.service
%preun
%systemd_preun %{name}.service
%postun
%systemd_postun %{name}.service
%files
%defattr(-,root,root,-)
%doc CHANGES.txt COPYRIGHT.txt README.rst LICENSES.txt
%dir %{_localstatedir}/log/%{name}
%{_unitdir}/supervisord.service
%{python_sitelib}/*
%{_bindir}/supervisor*
%{_bindir}/echo_supervisord_conf
%{_bindir}/pidproxy
%{_localstatedir}/run/supervisor
%config(noreplace) %{_sysconfdir}/tmpfiles.d/%{name}.conf
%config(noreplace) %{_sysconfdir}/supervisord.conf
%dir %{_sysconfdir}/supervisord.d
%config(noreplace) %{_sysconfdir}/logrotate.d/supervisor
%changelog
* Fri Jul 28 2017 Kevin Fenzi <kevin@scrye.com> - 3.1.4-1
- Update to 3.1.4.
- Fix CVE-2017-11610 supervisor: Command injection via malicious XML-RPC request - Fixes bug #1476143
- Fix systemd unit file up. Fixes bug #1475938
* Wed Aug 19 2015 Kevin Fenzi <kevin@scrye.com> 3.1.3-3
- Fix tmpfiles.d files.
* Sat Aug 01 2015 Kevin Fenzi <kevin@scrye.com> 3.1.3-2
- Actually commit some more cleanup and fixes I tested with.
* Sat Aug 01 2015 Kevin Fenzi <kevin@scrye.com> 3.1.3-1
- Update to 3.1.3
- Move socket to /var/run/supervisor. Fixes bug #1247877
- Clean up old spec cruft. Possibly fixes bug #1094933
* Fri Jun 19 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
* Sun Jun 08 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
* Thu Aug 01 2013 Nils Philippsen <nils@redhat.com> - 3.0-1
- version 3.0 (final)
- fix changelog dates
* Fri Feb 15 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.0-0.11.a12
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
* Sat Sep 01 2012 Nils Philippsen <nils@redhat.com> - 3.0-0.10.a12
- add [Install] section to service file, so systemctl can enable it
* Tue Aug 21 2012 Nils Philippsen <nils@redhat.com> - 3.0-0.9.a12
- use systemd macros from F-18/RHEL-7 on
- use %%{_unitdir} macro for systemd unit paths
* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.0-0.8.a12
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
* Tue Jan 10 2012 Nils Philippsen <nils@redhat.com> - 3.0-0.7.a12
- version 3.0a12
* Tue Aug 02 2011 Nils Philippsen <nils@redhat.com> - 3.0-0.6.a10
- add native systemd support
* Mon Aug 01 2011 Nils Philippsen <nils@redhat.com> - 3.0-0.5.a10
- require python-setuptools (#725191)
* Tue Apr 05 2011 Nils Philippsen <nils@redhat.com> - 3.0-0.4.a10
- version 3.0a10
- fix source URL
- don't use macros for system executables (except python)
* Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.0-0.3.a8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
* Thu Jul 22 2010 David Malcolm <dmalcolm@redhat.com> - 3.0-0.2.a8
- Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild
* Tue Apr 13 2010 Nils Philippsen <nils@redhat.com> - 3.0-0.1.a8
- add BR: python-setuptools
* Mon Apr 12 2010 Nils Philippsen <nils@redhat.com>
- bundle updated config file
* Sat Apr 10 2010 Nils Philippsen <nils@redhat.com>
- version 3.0a8
- update URLs
- versionize python-meld3 dependency
* Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.1-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
* Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.1-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
* Sat Nov 29 2008 Ignacio Vazquez-Abrams <ivazqueznet+rpm@gmail.com> - 2.1-6
- Rebuild for Python 2.6
* Sat Sep 6 2008 Tom "spot" Callaway <tcallawa@redhat.com> - 2.1-5
- fix license tag
* Mon Jan 07 2008 Toshio Kuratomi <toshio@fedoraproject.org> 2.1-4
- Include egginfo files when python generates them.
* Sun Apr 22 2007 Mike McGrath <mmcgrath@redhat.com> 2.1-3
- Added BuildRequires of python-devel
* Fri Apr 20 2007 Mike McGrath <mmcgrath@redhat.com> 2.1-2
- Added patch suggested in #153225
* Fri Apr 20 2007 Mike McGrath <mmcgrath@redhat.com> 2.1-1
- Initial packaging