From 16b94211fde17cb0357b9fb3856e68a134496983 Mon Sep 17 00:00:00 2001 From: Juan Orti Alcaine Date: Aug 27 2013 14:01:46 +0000 Subject: Initial import (#982588). --- diff --git a/.gitignore b/.gitignore index e69de29..ff90f78 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1 @@ +/Radicale-0.8.tar.gz diff --git a/radicale-0.8-systemwide.patch b/radicale-0.8-systemwide.patch new file mode 100644 index 0000000..6f1aa03 --- /dev/null +++ b/radicale-0.8-systemwide.patch @@ -0,0 +1,47 @@ +diff --git a/config b/config +index 453a45e..bead08d 100644 +--- a/config ++++ b/config +@@ -14,9 +14,9 @@ + # IPv4 syntax: address:port + # IPv6 syntax: [address]:port + # IPv6 adresses are configured to only allow IPv6 connections +-hosts = 0.0.0.0:5232 ++hosts = 127.0.0.1:5232 + # Daemon flag +-daemon = False ++daemon = True + # File storing the PID in daemon mode + pid = + # SSL flag, enable HTTPS protocol +@@ -100,7 +100,7 @@ http_password_parameter = + type = None + + # File for rights management from_file +-file = ~/.config/radicale/rights ++file = /var/lib/radicale/rights + + + [storage] +@@ -109,7 +109,7 @@ file = ~/.config/radicale/rights + type = filesystem + + # Folder for storing local collections, created if not present +-filesystem_folder = ~/.config/radicale/collections ++filesystem_folder = /var/lib/radicale/collections + + # Database URL for SQLAlchemy + # dialect+driver://user:password@host/dbname[?key=value..] +diff --git a/logging b/logging +index f4efb88..b10f88c 100644 +--- a/logging ++++ b/logging +@@ -45,7 +45,7 @@ formatter = simple + [handler_file] + # File handler + class = FileHandler +-args = ('/var/log/radicale',) ++args = ('/var/log/radicale/radicale.log',) + formatter = full + + diff --git a/radicale-httpd b/radicale-httpd new file mode 100644 index 0000000..5d614a4 --- /dev/null +++ b/radicale-httpd @@ -0,0 +1,42 @@ +# For more information, visit: +# http://radicale.org/user_documentation/#apache-and-mod-wsgi + +#LoadModule wsgi_module modules/mod_wsgi.so +#WSGISocketPrefix run/wsgi + +# +# ServerName cal.localhost + +# WSGIDaemonProcess radicale user=apache group=apache threads=1 +# WSGIScriptAlias / /usr/share/radicale/radicale.wsgi + +# +# WSGIProcessGroup radicale +# WSGIApplicationGroup %{GLOBAL} +# AllowOverride None +# +# # Apache 2.4 +# Require local +# +# +# # Apache 2.2 +# Order Deny,Allow +# Deny from all +# Allow from 127.0.0.1 +# Allow from ::1 +# +# +# ## You may want to use apache's authentication +# AuthType Basic +# AuthName "Enter your credentials" +# AuthUserFile /path/to/httpdfile/ +# AuthGroupFile /dev/null +# Require valid-user +# +# RewriteEngine On +# RewriteCond %{REMOTE_USER}%{PATH_INFO} !^([^/]+/)\1 +# RewriteRule .* - [Forbidden] +# +# +# +# diff --git a/radicale-logrotate b/radicale-logrotate new file mode 100644 index 0000000..e7e38d7 --- /dev/null +++ b/radicale-logrotate @@ -0,0 +1,9 @@ +/var/log/radicale/*.log { + daily + rotate 5 + compress + delaycompress + missingok + notifempty + create 0640 radicale radicale +} diff --git a/radicale-service-unit b/radicale-service-unit new file mode 100644 index 0000000..e4e8665 --- /dev/null +++ b/radicale-service-unit @@ -0,0 +1,16 @@ +[Unit] +Description=Radicale CalDAV and CardDAV server +Documentation=http://radicale.org/documentation/ +After=network.target + +[Service] +WorkingDirectory=/var/lib/radicale +User=radicale +Group=radicale +UMask=0027 +Type=forking +ExecStart=/usr/bin/radicale --daemon +PrivateTmp=true + +[Install] +WantedBy=multi-user.target diff --git a/radicale.spec b/radicale.spec new file mode 100644 index 0000000..de9dce4 --- /dev/null +++ b/radicale.spec @@ -0,0 +1,129 @@ +Name: radicale +Version: 0.8 +Release: 3%{?dist} +Summary: A simple CalDAV (calendar) and CardDAV (contact) server +Group: Applications/Internet +License: GPLv3+ +URL: http://radicale.org +Source0: http://pypi.python.org/packages/source/R/Radicale/Radicale-%{version}.tar.gz +Source1: %{name}-service-unit +Source2: %{name}-logrotate +Source3: %{name}-httpd +# config adjustments for systemwide installation +Patch0: %{name}-%{version}-systemwide.patch + +BuildArch: noarch +BuildRequires: python2-devel +BuildRequires: systemd +Requires(pre): shadow-utils +Requires(post): systemd +Requires(preun): systemd +Requires(postun): systemd +Requires: python-pam +Requires: python-ldap + +%description +The Radicale Project is a CalDAV (calendar) and CardDAV (contact) server. It +aims to be a light solution, easy to use, easy to install, easy to configure. +As a consequence, it requires few software dependencies and is pre-configured +to work out-of-the-box. + +The Radicale Project runs on most of the UNIX-like platforms (Linux, BSD, +MacOS X) and Windows. It is known to work with Evolution, Lightning, iPhone +and Android clients. It is free and open-source software, released under GPL +version 3. + +For further information, please visit the Radicale Website +http://www.radicale.org + +%package httpd +Summary: httpd config for Radicale +Requires: %{name} = %{version}-%{release} +Requires: httpd +Requires: mod_wsgi + +%description httpd +httpd config for Radicale + +%prep +%setup -q -n Radicale-%{version} +%patch0 -p1 + +%build +%{__python} setup.py build + +%install +%{__python} setup.py install --skip-build --root %{buildroot} + +# Install configuration files +mkdir -p %{buildroot}%{_sysconfdir}/%{name}/ +install -p -m 640 config %{buildroot}%{_sysconfdir}/%{name}/ +install -p -m 644 logging %{buildroot}%{_sysconfdir}/%{name}/ + +# Install wsgi file +mkdir -p %{buildroot}%{_datadir}/%{name} +install -p -m 755 radicale.wsgi %{buildroot}%{_datadir}/%{name}/ +install -p -m 755 radicale.fcgi %{buildroot}%{_datadir}/%{name}/ + +# Install apache's configuration file +mkdir -p %{buildroot}%{_sysconfdir}/httpd/conf.d/ +install -p -m 644 %{SOURCE3} %{buildroot}%{_sysconfdir}/httpd/conf.d/%{name}.conf + +# Create folder where the calendar will be stored +mkdir -p %{buildroot}%{_sharedstatedir}/%{name}/ + +install -D -p -m 644 %{SOURCE1} %{buildroot}%{_unitdir}/%{name}.service +install -D -p -m 644 %{SOURCE2} %{buildroot}%{_sysconfdir}/logrotate.d/%{name} + +mkdir -p %{buildroot}%{_localstatedir}/log/%{name} +touch %{buildroot}%{_localstatedir}/log/%{name}/%{name}.log + +%pre +getent group %{name} >/dev/null || groupadd -r %{name} +getent passwd %{name} >/dev/null || \ + useradd -r -g %{name} -d %{_sharedstatedir}/%{name} -s /sbin/nologin \ + -c "Radicale service account" %{name} +exit 0 + +%post +%systemd_post %{name}.service + +%preun +%systemd_preun %{name}.service + +%postun +%systemd_postun_with_restart %{name}.service + +%files +%doc COPYING README NEWS.rst TODO.rst +%dir %attr(0755, %{name}, %{name}) %{_sysconfdir}/%{name}/ +%config(noreplace) %attr(0640, %{name}, %{name}) %{_sysconfdir}/%{name}/config +%config(noreplace) %attr(0644, %{name}, %{name}) %{_sysconfdir}/%{name}/logging +%config(noreplace) %{_sysconfdir}/logrotate.d/%{name} +%{python_sitelib}/%{name} +%{python_sitelib}/Radicale-*.egg-info +%{_bindir}/%{name} +%{_unitdir}/%{name}.service +%dir %attr(750, %{name}, %{name}) %{_localstatedir}/log/%{name} +%ghost %attr(640, %{name}, %{name}) %{_localstatedir}/log/%{name}/%{name}.log +%dir %attr(750, %{name}, %{name}) %{_sharedstatedir}/%{name}/ +%dir %{_datadir}/%{name} +%{_datadir}/%{name}/%{name}.wsgi +%{_datadir}/%{name}/%{name}.fcgi + +%files httpd +%config(noreplace) %{_sysconfdir}/httpd/conf.d/%{name}.conf + +%changelog +* Tue Aug 27 2013 Juan Orti Alcaine - 0.8-3 +- Move .wsgi and .fcgi to main package + +* Sun Jul 21 2013 Juan Orti Alcaine - 0.8-2 +- BuildRequire python2-devel + +* Thu Jul 18 2013 Juan Orti Alcaine - 0.8-1 +- Update to version 0.8 +- Merge Till Maas's spec file. Bug #922276 + +* Mon Jul 08 2013 Juan Orti Alcaine - 0.7.1-1 +- Initial packaging diff --git a/sources b/sources index e69de29..5fea260 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +ad903ead8b910180f80652c0beaebaf6 Radicale-0.8.tar.gz