Bug#916771: radicale: systemd unit proposal

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Bug#916771: radicale: systemd unit proposal

Francisco Romero
Source: radicale
Version: 1.1.1+20160115-4
Severity: normal

Package: radicale
Version: 1.1.1+20160115-4

I have created a systemd unit for radicale that works in debian stretch.

This is my proposal:

[Unit]
Description=A simple CalDAV (calendar) and CardDAV (contact) server
After=network.target

[Service]
Type=simple
ExecStart=/usr/bin/radicale
WorkingDirectory=/etc/radicale
Restart=on-failure
StandardOutput=syslog
StandardError=syslog

[Install]
WantedBy=multi-user.target

I needed a log file to work: /var/log/radicale/radicale.log.



-- System Information:
Debian Release: 9.6
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 4.9.0-8-amd64 (SMP w/8 CPU cores)
Locale: LANG=es_ES.UTF-8, LC_CTYPE=es_ES.UTF-8 (charmap=UTF-8), LANGUAGE=es_ES.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Reply | Threaded
Open this post in threaded view
|

Bug#916771: radicale: systemd unit proposal

Jonas Smedegaard-2
Quoting Francisco Romero (2018-12-18 13:44:54)
> I have created a systemd unit for radicale that works in debian stretch.

Thanks!

> [Service]
> Type=simple
> ExecStart=/usr/bin/radicale
> WorkingDirectory=/etc/radicale
> Restart=on-failure
> StandardOutput=syslog
> StandardError=syslog
>
> [Install]
> WantedBy=multi-user.target
Did you see the systemd unit at https://radicale.org/setup/ ?

I would appreciate reflections on reasons to deviate from that.

E.g. WorkingDirectory looks odd to me...


> I needed a log file to work: /var/log/radicale/radicale.log.

Right.

Reason that is not created during package install is to leave open
different uses of the package (including as a regular user).

I might introduce more specific packages - radicale-systemd and
radicale-uwsgi depending on daemon tools, and radicale-user which
includes registration in XDG menu system.  Help with that appreciated.


NB! The package in stable is too stable to get this kind of change.

It would be quite helpful if you are able to test the package now in
unstable, and propose improvements to that.


 - Jonas

--
 * Jonas Smedegaard - idealist & Internet-arkitekt
 * Tlf.: +45 40843136  Website: http://dr.jones.dk/

 [x] quote me freely  [ ] ask before reusing  [ ] keep private

signature.asc (849 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Bug#916771: radicale: provide service enabling packages

Phil Morrell
Control: merge -1 886420
Control: retitle -1 radicale: provide autostart enabling packages
thanks

Hi, just following up our conversation on IRC and documenting what you
suggested in case anyone else is available to do the work.

> I might introduce more specific packages - radicale-systemd and
> radicale-uwsgi depending on daemon tools, and radicale-user which
> includes registration in XDG menu system.  Help with that appreciated.

radicale:

* should recommend, and be depended by, each of the below
* probably in the order shown, since non-systemd uses can be explicit
* would be nice to have depends syntax support grouping, so the uwsgi
version can be preferred if uwsgi is already setup

radicale-systemd:

* embed, install and enable upstream unit file
* https://radicale.org/setup/#linux-with-systemd-system-wide
* current config relies on systemd-sysv-generator, so unit is untested

radicale-uwsgi:

* move and enable pre-existing radicale.ini, restart uwsgi
* https://salsa.debian.org/freedombox-team/plinth/issues/1620#note_102304

radicale-sysvinit:

* move and enable pre-existing radicale.init script
* https://sources.debian.org/src/radicale/2.1.11-6/debian/rules/#L12

radicale-user:

* embed, install and enable upstream unit file
* https://radicale.org/setup/#linux-with-systemd-as-a-user
* templating should handle default config for user dir
* create .desktop launcher, with sensible-browser to web UI

signature.asc (235 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Bug#916771: radicale: provide service enabling packages

Jonas Smedegaard-2
Quoting Phil Morrell (2019-08-26 23:22:49)
> Hi, just following up our conversation on IRC and documenting what you
> suggested in case anyone else is available to do the work.

Thanks - quite helpful!


> > I might introduce more specific packages - radicale-systemd and
> > radicale-uwsgi depending on daemon tools, and radicale-user which
> > includes registration in XDG menu system.  Help with that
> > appreciated.
>
> radicale:
>
> * should recommend, and be depended by, each of the below

I think (but am open to other suggestions) that "radicale" should become
a meta-package depending on either system-wide daemon setups, the
generally recommended one listed first - i.e. with _no_ packages
depending on or recommending it.


> * probably in the order shown, since non-systemd uses can be explicit

In my opinion uwsgi flavor should be recommended, since that is a
flexible and efficient way of serving only as a back-end service,
leaving the front-end to battle-tested daemons like Apache2 or Nginx.

Please elaborate why you think systemd flavor should be recommended.


> * would be nice to have depends syntax support grouping, so the uwsgi
> version can be preferred if uwsgi is already setup

Sure would be nice, but not possible with the expressivity of Debian
packaging system today.


> radicale-systemd:
>
> * embed, install and enable upstream unit file
> * https://radicale.org/setup/#linux-with-systemd-system-wide
> * current config relies on systemd-sysv-generator, so unit is untested
>
> radicale-uwsgi:
>
> * move and enable pre-existing radicale.ini, restart uwsgi
> * https://salsa.debian.org/freedombox-team/plinth/issues/1620#note_102304
>
> radicale-sysvinit:
>
> * move and enable pre-existing radicale.init script
> * https://sources.debian.org/src/radicale/2.1.11-6/debian/rules/#L12
I think we can merge systemd and sysvinit flavors.  As I understand it,
when a package provides both a systemd unit file and a sysV init script,
then those init systems make sure to only process one of them.


> radicale-user:
>
> * embed, install and enable upstream unit file
> * https://radicale.org/setup/#linux-with-systemd-as-a-user
> * templating should handle default config for user dir
> * create .desktop launcher, with sensible-browser to web UI


 - Jonas

--
 * Jonas Smedegaard - idealist & Internet-arkitekt
 * Tlf.: +45 40843136  Website: http://dr.jones.dk/

 [x] quote me freely  [ ] ask before reusing  [ ] keep private

signature.asc (849 bytes) Download Attachment