FS#63910 - [reflector] add systemd integration

Attached to Project: Community Packages
Opened by David Runge (dvzrv) - Tuesday, 24 September 2019, 19:09 GMT
Last edited by Xyne (Xyne) - Wednesday, 19 August 2020, 23:30 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Xyne (Xyne)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description: Please add systemd integration (service and timer unit) to the package. There's a package for it in the AUR already [1].

[1] https://aur.archlinux.org/packages/reflector-timer/

Additional info:
* package version: reflector <= 2019.3-1
* config and/or log files etc.
* link to upstream bug report, if any

Steps to reproduce:

* install reflector
* be unable to use a timer/configuration to update the mirrorlist automatically
This task depends upon

Closed by  Xyne (Xyne)
Wednesday, 19 August 2020, 23:30 GMT
Reason for closing:  Implemented
Comment by Xyne (Xyne) - Tuesday, 15 October 2019, 05:19 GMT
Different users will want different options with the timer, both for reflector and the timer interval. Both can be achieved by the user creating their own timer. I could add an example to the package to serve as a starting point with sane defaults, but I'm not sure how useful that would really be.
Comment by David Runge (dvzrv) - Tuesday, 30 June 2020, 09:33 GMT
The options can be provided by an EnvironmentFile in the service [1]. Anything else can be overridden and changed by the user using drop-ins or complete overrides for the units if they so desire.
I think a very common setup can be achieved and it would help a great deal in situations such as archiso [2].
Maybe it's not the most flexible of all solutions, but it would already be an improvement IMHO.

I can create a few files for you and attach them here.

[1] https://aur.archlinux.org/cgit/aur.git/tree/reflector.service?h=reflector-timer#n11
[2] https://gitlab.archlinux.org/archlinux/archiso/-/issues/26
Comment by David Runge (dvzrv) - Tuesday, 30 June 2020, 09:59 GMT
A good (or rather better) alternative to the `EnvironmentFile` approach would be to use an explicit configuration file for reflector.
That way users only have two files to configure (e.g. the reflector.conf and the reflector.timer override, if they want different schedules).
What do you think about this approach?
Comment by Xyne (Xyne) - Wednesday, 19 August 2020, 23:29 GMT
The next update of Reflector will include a systemd service file and timer inspired by the reflector-timer AUR package by Silvio Knizek but based on a proper Reflector configuration file under /etc/xdg/reflector/reflector.conf.

Loading...