|
|
f489057 |
Name: radicale
|
|
|
f489057 |
Version: 0.10
|
|
|
01204ed |
Release: 9%{?dist}
|
|
|
f489057 |
Summary: A simple CalDAV (calendar) and CardDAV (contact) server
|
|
|
f489057 |
Group: Applications/Internet
|
|
|
f489057 |
License: GPLv3+
|
|
|
f489057 |
URL: http://radicale.org
|
|
|
f489057 |
Source0: http://pypi.python.org/packages/source/R/Radicale/Radicale-%{version}.tar.gz
|
|
|
f489057 |
Source1: %{name}-service-unit
|
|
|
f489057 |
Source2: %{name}-logrotate
|
|
|
f489057 |
Source3: %{name}-httpd
|
|
|
f489057 |
Source4: %{name}.te
|
|
|
f489057 |
Source5: %{name}.fc
|
|
|
f489057 |
Source6: %{name}.if
|
|
|
f489057 |
Source7: %{name}-tmpfiles.conf
|
|
|
f489057 |
# Patch0: config adjustments for systemwide installation
|
|
|
f489057 |
Patch0: %{name}-0.10-systemwide.patch
|
|
|
f489057 |
# Patch1: https://github.com/Kozea/Radicale/issues/117#issuecomment-84588704
|
|
|
f489057 |
Patch1: %{name}-0.10-fix_delete_entry.patch
|
|
|
f489057 |
# Patch2: https://github.com/Kozea/Radicale/issues/279
|
|
|
f489057 |
Patch2: %{name}-0.10-fix_charset_handling.patch
|
|
|
f489057 |
|
|
|
f489057 |
# el6, el7 do not have phyton3
|
|
|
f489057 |
%define have_python3 %(echo "%{dist}" | egrep -q '^\.el(6|7)$' && echo 0 || echo 1)
|
|
|
01204ed |
%define have_policycoreutils_python_utils %(echo "%{dist}" | egrep -q '^(\.el(6|7)|(fc22))$' && echo 0 || echo 1)
|
|
|
f489057 |
|
|
|
f489057 |
%if %{have_python3}
|
|
|
f489057 |
%define radicale_python_version python3
|
|
|
f489057 |
%define radicale_python_bin %{__python3}
|
|
|
f489057 |
%define radicale_python_sitelib %{python3_sitelib}
|
|
|
f931990 |
Requires: python3-pam
|
|
|
f489057 |
%else
|
|
|
f489057 |
# fallback to python2 (el6, el7)
|
|
|
f489057 |
%define radicale_python_version python2
|
|
|
f489057 |
%define radicale_python_bin %{__python2}
|
|
|
f489057 |
%define radicale_python_sitelib %{python2_sitelib}
|
|
|
f931990 |
Requires: python-pam
|
|
|
f489057 |
%endif
|
|
|
f489057 |
|
|
|
f489057 |
BuildArch: noarch
|
|
|
f489057 |
BuildRequires: %{radicale_python_version}-devel
|
|
|
f489057 |
BuildRequires: systemd
|
|
|
f489057 |
Requires(pre): shadow-utils
|
|
|
f489057 |
Requires(post): systemd
|
|
|
f489057 |
Requires(preun): systemd
|
|
|
f489057 |
Requires(postun): systemd
|
|
|
f489057 |
Requires: %{name}-selinux = %{version}-%{release}
|
|
|
f489057 |
|
|
|
f489057 |
%description
|
|
|
f489057 |
The Radicale Project is a CalDAV (calendar) and CardDAV (contact) server. It
|
|
|
f489057 |
aims to be a light solution, easy to use, easy to install, easy to configure.
|
|
|
f489057 |
As a consequence, it requires few software dependencies and is pre-configured
|
|
|
f489057 |
to work out-of-the-box.
|
|
|
f489057 |
|
|
|
f489057 |
The Radicale Project runs on most of the UNIX-like platforms (Linux, BSD,
|
|
|
f489057 |
MacOS X) and Windows. It is known to work with Evolution, Lightning, iPhone
|
|
|
f489057 |
and Android clients. It is free and open-source software, released under GPL
|
|
|
f489057 |
version 3.
|
|
|
f489057 |
|
|
|
f489057 |
For further information, please visit the Radicale Website
|
|
|
f489057 |
http://www.radicale.org
|
|
|
f489057 |
|
|
|
f489057 |
%package httpd
|
|
|
f489057 |
Summary: httpd config for Radicale
|
|
|
f489057 |
Requires: %{name} = %{version}-%{release}
|
|
|
f489057 |
Requires: httpd
|
|
|
f489057 |
Requires: mod_wsgi
|
|
|
f489057 |
|
|
|
f489057 |
%description httpd
|
|
|
f489057 |
httpd config for Radicale
|
|
|
f489057 |
|
|
|
f489057 |
%package selinux
|
|
|
f489057 |
%global selinux_types %(%{__awk} '/^#[[:space:]]*SELINUXTYPE=/,/^[^#]/ { if ($3 == "-") printf "%s ", $2 }' /etc/selinux/config 2>/dev/null)
|
|
|
f489057 |
%global selinux_variants %([ -z "%{selinux_types}" ] && echo mls targeted || echo %{selinux_types})
|
|
|
f489057 |
|
|
|
f489057 |
Summary: Selinux policy for Radicale
|
|
|
f489057 |
Requires: %{name} = %{version}-%{release}
|
|
|
f489057 |
%if "%{_selinux_policy_version}" != ""
|
|
|
f489057 |
Requires: selinux-policy >= %{_selinux_policy_version}
|
|
|
f489057 |
%endif
|
|
|
01204ed |
%if %{have_policycoreutils_python_utils}
|
|
|
01204ed |
Requires(post): policycoreutils-python-utils
|
|
|
01204ed |
Requires(postun): policycoreutils-python-utils
|
|
|
01204ed |
%else
|
|
|
01204ed |
Requires(post): policycoreutils-python
|
|
|
01204ed |
Requires(postun): policycoreutils-python
|
|
|
01204ed |
%endif
|
|
|
01204ed |
Requires(post): /usr/sbin/semodule, /sbin/fixfiles
|
|
|
01204ed |
Requires(postun): /usr/sbin/semodule, /sbin/fixfiles
|
|
|
f489057 |
BuildRequires: checkpolicy, selinux-policy-devel, /usr/share/selinux/devel/policyhelp
|
|
|
f489057 |
|
|
|
f489057 |
%description selinux
|
|
|
f489057 |
Selinux policy for Radicale
|
|
|
f489057 |
|
|
|
f489057 |
%prep
|
|
|
f489057 |
%setup -q -n Radicale-%{version}
|
|
|
f489057 |
%patch0 -p1
|
|
|
f489057 |
%patch1 -p1
|
|
|
f489057 |
%patch2 -p1
|
|
|
f489057 |
mkdir SELinux
|
|
|
f489057 |
cp -p %{SOURCE4} %{SOURCE5} %{SOURCE6} SELinux
|
|
|
f489057 |
|
|
|
f489057 |
%build
|
|
|
f489057 |
%{radicale_python_bin} setup.py build
|
|
|
f489057 |
cd SELinux
|
|
|
f489057 |
for selinuxvariant in %{selinux_variants}
|
|
|
f489057 |
do
|
|
|
f489057 |
make NAME=${selinuxvariant} -f /usr/share/selinux/devel/Makefile
|
|
|
f489057 |
mv %{name}.pp %{name}.pp.${selinuxvariant}
|
|
|
f489057 |
make NAME=${selinuxvariant} -f /usr/share/selinux/devel/Makefile clean
|
|
|
f489057 |
done
|
|
|
f489057 |
cd -
|
|
|
f489057 |
|
|
|
f489057 |
%install
|
|
|
f489057 |
%{radicale_python_bin} setup.py install --skip-build --root %{buildroot}
|
|
|
f489057 |
|
|
|
f489057 |
# Install configuration files
|
|
|
f489057 |
mkdir -p %{buildroot}%{_sysconfdir}/%{name}/
|
|
|
f489057 |
install -p -m 640 config %{buildroot}%{_sysconfdir}/%{name}/
|
|
|
f489057 |
install -p -m 644 logging %{buildroot}%{_sysconfdir}/%{name}/
|
|
|
f489057 |
|
|
|
f489057 |
# Install wsgi file
|
|
|
f489057 |
mkdir -p %{buildroot}%{_datadir}/%{name}
|
|
|
f489057 |
install -p -m 755 radicale.wsgi %{buildroot}%{_datadir}/%{name}/
|
|
|
f489057 |
install -p -m 755 radicale.fcgi %{buildroot}%{_datadir}/%{name}/
|
|
|
f489057 |
|
|
|
f489057 |
# Install apache's configuration file
|
|
|
f489057 |
mkdir -p %{buildroot}%{_sysconfdir}/httpd/conf.d/
|
|
|
f489057 |
install -p -m 644 %{SOURCE3} %{buildroot}%{_sysconfdir}/httpd/conf.d/%{name}.conf
|
|
|
f489057 |
|
|
|
f489057 |
# Create folder where the calendar will be stored
|
|
|
f489057 |
mkdir -p %{buildroot}%{_sharedstatedir}/%{name}/
|
|
|
f489057 |
|
|
|
f489057 |
install -D -p -m 644 %{SOURCE1} %{buildroot}%{_unitdir}/%{name}.service
|
|
|
f489057 |
install -D -p -m 644 %{SOURCE2} %{buildroot}%{_sysconfdir}/logrotate.d/%{name}
|
|
|
f489057 |
install -D -p -m 644 %{SOURCE7} %{buildroot}%{_tmpfilesdir}/%{name}.conf
|
|
|
f489057 |
mkdir -p %{buildroot}%{_localstatedir}/run
|
|
|
f489057 |
install -d -m 0755 %{buildroot}%{_localstatedir}/run/%{name}/
|
|
|
f489057 |
|
|
|
f489057 |
mkdir -p %{buildroot}%{_localstatedir}/log/%{name}
|
|
|
f489057 |
touch %{buildroot}%{_localstatedir}/log/%{name}/%{name}.log
|
|
|
f489057 |
|
|
|
f489057 |
for selinuxvariant in %{selinux_variants}
|
|
|
f489057 |
do
|
|
|
f489057 |
install -d %{buildroot}%{_datadir}/selinux/${selinuxvariant}
|
|
|
f489057 |
install -p -m 644 SELinux/%{name}.pp.${selinuxvariant} \
|
|
|
f489057 |
%{buildroot}%{_datadir}/selinux/${selinuxvariant}/%{name}.pp
|
|
|
f489057 |
done
|
|
|
f489057 |
|
|
|
f489057 |
%pre
|
|
|
f489057 |
getent group %{name} >/dev/null || groupadd -r %{name}
|
|
|
f489057 |
getent passwd %{name} >/dev/null || \
|
|
|
f489057 |
useradd -r -g %{name} -d %{_sharedstatedir}/%{name} -s /sbin/nologin \
|
|
|
f489057 |
-c "Radicale service account" %{name}
|
|
|
f489057 |
exit 0
|
|
|
f489057 |
|
|
|
f489057 |
%post
|
|
|
f489057 |
%systemd_post %{name}.service
|
|
|
f489057 |
|
|
|
f489057 |
%preun
|
|
|
f489057 |
%systemd_preun %{name}.service
|
|
|
f489057 |
|
|
|
f489057 |
%postun
|
|
|
f489057 |
%systemd_postun_with_restart %{name}.service
|
|
|
f489057 |
|
|
|
f489057 |
%post selinux
|
|
|
f489057 |
for selinuxvariant in %{selinux_variants}
|
|
|
f489057 |
do
|
|
|
f489057 |
/usr/sbin/semodule -s ${selinuxvariant} -i \
|
|
|
f489057 |
%{_datadir}/selinux/${selinuxvariant}/%{name}.pp &> /dev/null || :
|
|
|
f489057 |
done
|
|
|
f489057 |
# http://danwalsh.livejournal.com/10607.html
|
|
|
f489057 |
semanage port -a -t radicale_port_t -p tcp 5232 > /dev/null 2>&1 || :
|
|
|
f489057 |
/sbin/fixfiles -R %{name} restore > /dev/null 2>&1 || :
|
|
|
f489057 |
/sbin/fixfiles -R %{name}-httpd restore > /dev/null 2>&1 || :
|
|
|
f489057 |
|
|
|
f489057 |
%postun selinux
|
|
|
f489057 |
if [ $1 -eq 0 ] ; then
|
|
|
f489057 |
semanage port -d -p tcp 5232 > /dev/null 2>&1 || :
|
|
|
f489057 |
for selinuxvariant in %{selinux_variants}
|
|
|
f489057 |
do
|
|
|
f489057 |
/usr/sbin/semodule -s ${selinuxvariant} -r %{name} &> /dev/null || :
|
|
|
f489057 |
done
|
|
|
f489057 |
/sbin/fixfiles -R %{name} restore > /dev/null 2>&1 || :
|
|
|
f489057 |
/sbin/fixfiles -R %{name}-httpd restore > /dev/null 2>&1 || :
|
|
|
f489057 |
fi
|
|
|
f489057 |
|
|
|
f489057 |
|
|
|
f489057 |
%files
|
|
|
f489057 |
%doc README NEWS.rst TODO.rst
|
|
|
f489057 |
%license COPYING
|
|
|
f489057 |
%dir %attr(0755, %{name}, %{name}) %{_sysconfdir}/%{name}/
|
|
|
f489057 |
%config(noreplace) %attr(0640, %{name}, %{name}) %{_sysconfdir}/%{name}/config
|
|
|
f489057 |
%config(noreplace) %attr(0644, %{name}, %{name}) %{_sysconfdir}/%{name}/logging
|
|
|
f489057 |
%config(noreplace) %{_sysconfdir}/logrotate.d/%{name}
|
|
|
f489057 |
%{radicale_python_sitelib}/%{name}
|
|
|
f489057 |
%{radicale_python_sitelib}/Radicale-*.egg-info
|
|
|
f489057 |
%{_bindir}/%{name}
|
|
|
f489057 |
%{_unitdir}/%{name}.service
|
|
|
f489057 |
%{_tmpfilesdir}/%{name}.conf
|
|
|
f489057 |
%dir %attr(755, %{name}, %{name}) %{_localstatedir}/run/%{name}
|
|
|
f489057 |
%dir %attr(750, %{name}, %{name}) %{_localstatedir}/log/%{name}
|
|
|
f489057 |
%ghost %attr(640, %{name}, %{name}) %{_localstatedir}/log/%{name}/%{name}.log
|
|
|
f489057 |
%dir %attr(750, %{name}, %{name}) %{_sharedstatedir}/%{name}/
|
|
|
f489057 |
%dir %{_datadir}/%{name}
|
|
|
f489057 |
%{_datadir}/%{name}/%{name}.wsgi
|
|
|
f489057 |
%{_datadir}/%{name}/%{name}.fcgi
|
|
|
f489057 |
|
|
|
f489057 |
%files httpd
|
|
|
f489057 |
%config(noreplace) %{_sysconfdir}/httpd/conf.d/%{name}.conf
|
|
|
f489057 |
|
|
|
f489057 |
%files selinux
|
|
|
f489057 |
%defattr(-,root,root,0755)
|
|
|
f489057 |
%doc SELinux/*
|
|
|
f489057 |
%{_datadir}/selinux/*/%{name}.pp
|
|
|
f489057 |
|
|
|
f489057 |
%changelog
|
|
|
01204ed |
* Tue Sep 22 2015 Peter Bieringer <pb@bieringer.de> - 0.10-9
|
|
|
01204ed |
- fix policycore-utils and python-pam dependencies
|
|
|
01204ed |
|
|
|
f489057 |
* Fri Sep 18 2015 Peter Bieringer <pb@bieringer.de> - 0.10-8
|
|
|
f489057 |
- Switch conditionally back to python2 to support el6/el7
|
|
|
f489057 |
|
|
|
f489057 |
* Mon Sep 07 2015 Juan Orti Alcaine <jorti@fedoraproject.org> - 0.10-7
|
|
|
f489057 |
- Drop old _selinux_policy_version hack
|
|
|
f489057 |
- Require radicale-selinux
|
|
|
f489057 |
|
|
|
f489057 |
* Fri Jul 24 2015 Tomas Radej <tradej@redhat.com> - 0.10-6
|
|
|
f489057 |
- Updated dep on policycoreutils-python-utils
|
|
|
f489057 |
|
|
|
f489057 |
* Wed Jun 17 2015 Juan Orti Alcaine <jorti@fedoraproject.org> - 0.10-5
|
|
|
f489057 |
- Switch to python3
|
|
|
f489057 |
|
|
|
f489057 |
* Thu Apr 09 2015 Juan Orti Alcaine <jorti@fedoraproject.org> - 0.10-4
|
|
|
f489057 |
- Use license macro
|
|
|
f489057 |
|
|
|
f489057 |
* Mon Apr 06 2015 Juan Orti Alcaine <jorti@fedoraproject.org> - 0.10-3
|
|
|
f489057 |
- Add patch1 to fix rhbz#1206813
|
|
|
f489057 |
|
|
|
f489057 |
* Tue Feb 24 2015 Juan Orti Alcaine <jorti@fedoraproject.org> - 0.10-2
|
|
|
f489057 |
- Add radicale_var_run_t to SELinux policy 1.0.3
|
|
|
f489057 |
|
|
|
f489057 |
* Tue Jan 13 2015 Juan Orti Alcaine <jorti@fedoraproject.org> - 0.10-1
|
|
|
f489057 |
- Version 0.10
|
|
|
f489057 |
|
|
|
f489057 |
* Mon Aug 18 2014 Juan Orti Alcaine <jorti@fedoraproject.org> - 0.9-2
|
|
|
f489057 |
- Hide error when re-adding SELinux port label.
|
|
|
f489057 |
|
|
|
f489057 |
* Thu Aug 14 2014 Juan Orti Alcaine <jorti@fedoraproject.org> - 0.9-1
|
|
|
f489057 |
- Version 0.9
|
|
|
f489057 |
- Automatically restart service if it dies.
|
|
|
f489057 |
- Update systemwide patch
|
|
|
f489057 |
|
|
|
f489057 |
* Mon Aug 04 2014 Juan Orti Alcaine <jorti@fedoraproject.org> - 0.8-11
|
|
|
f489057 |
- Handle PID file.
|
|
|
f489057 |
|
|
|
f489057 |
* Thu Jul 17 2014 Juan Orti Alcaine <jorti@fedoraproject.org> - 0.8-10
|
|
|
f489057 |
- Add network-online.target dependency. Bug #1119818
|
|
|
f489057 |
|
|
|
f489057 |
* Sun Jun 08 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.8-9
|
|
|
f489057 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
|
|
|
f489057 |
|
|
|
f489057 |
* Tue Apr 29 2014 Juan Orti Alcaine <jorti@fedoraproject.org> - 0.8-8
|
|
|
f489057 |
- Add PrivateDevices to unit file
|
|
|
f489057 |
|
|
|
f489057 |
* Wed Dec 25 2013 Juan Orti Alcaine <jorti@fedoraproject.org> - 0.8-7
|
|
|
f489057 |
- SELinux policy 1.0.2
|
|
|
f489057 |
|
|
|
f489057 |
* Fri Nov 29 2013 Juan Orti Alcaine <jorti@fedoraproject.org> - 0.8-6
|
|
|
f489057 |
- SELinux policy 1.0.1 fix bug #1035925
|
|
|
f489057 |
|
|
|
f489057 |
* Fri Nov 08 2013 Juan Orti Alcaine <jorti@fedoraproject.org> - 0.8-5
|
|
|
f489057 |
- Hardcode _selinux_policy_version in F20 because of #999584
|
|
|
f489057 |
|
|
|
f489057 |
* Thu Oct 03 2013 Juan Orti Alcaine <jorti@fedoraproject.org> - 0.8-4
|
|
|
f489057 |
- Update httpd config file and add SELinux policy. Bug #1014408
|
|
|
f489057 |
|
|
|
f489057 |
* Tue Aug 27 2013 Juan Orti Alcaine <jorti@fedoraproject.org> - 0.8-3
|
|
|
f489057 |
- Move .wsgi and .fcgi to main package
|
|
|
f489057 |
|
|
|
f489057 |
* Sun Jul 21 2013 Juan Orti Alcaine <jorti@fedoraproject.org> - 0.8-2
|
|
|
f489057 |
- BuildRequire python2-devel
|
|
|
f489057 |
|
|
|
f489057 |
* Thu Jul 18 2013 Juan Orti Alcaine <jorti@fedoraproject.org> - 0.8-1
|
|
|
f489057 |
- Update to version 0.8
|
|
|
f489057 |
- Merge Till Maas's spec file. Bug #922276
|
|
|
f489057 |
|
|
|
f489057 |
* Mon Jul 08 2013 Juan Orti Alcaine <jorti@fedoraproject.org> - 0.7.1-1
|
|
|
f489057 |
- Initial packaging
|