]]>Lone_Wolf wrote:The judgment whether that is a good or a bad thing is left to the reader.
It has raised an eyebrow more than once, that some packages on Arch now activate timers (and services?) automatically. Something something Arch Way, something something full control. The only hint that this happens is a "(1/2) Reloading system manager configuration...". I'd probably prefer to have a more verbose output, but I haven't put much thought into it so far and I'm not certain if it's worth the effort to convince people.
If you look at the files inside the package, you'll notice it lists usr/lib/systemd/system/timers.target.wants/pkgstats.timer .
That file is what takes care of the automatic starting to avoid users having to enable it themselves .The judgment whether that is a good or a bad thing is left to the reader.
Hmm... then I will remove the lines I added and let it run on its own. Will check the output of systemctl list-timers for a few days.
UPDATE: After checking it for 4 days, it's all working fine. Thanks Lone_Wolf
]]>The judgment whether that is a good or a bad thing is left to the reader.
It has raised an eyebrow more than once, that some packages on Arch now activate timers (and services?) automatically. Something something Arch Way, something something full control. The only hint that this happens is a "(1/2) Reloading system manager configuration...". I'd probably prefer to have a more verbose output, but I haven't put much thought into it so far and I'm not certain if it's worth the effort to convince people.
]]>pkgstats is set up to automatically run every week using systemd/Timers. Once installed, it will be activated after the next reboot.
If you look at the files inside the package, you'll notice it lists usr/lib/systemd/system/timers.target.wants/pkgstats.timer .
That file is what takes care of the automatic starting to avoid users having to enable it themselves .
The judgment whether that is a good or a bad thing is left to the reader.
]]>[root@arch64 ~]# systemctl status pkgstats.timer
○ pkgstats.timer - Weekly pkgstats submission
Loaded: loaded (/usr/lib/systemd/system/pkgstats.timer; static)
Active: inactive (dead)
Trigger: n/a
Triggers: ● pkgstats.service
[root@arch64 ~]# systemctl enable pkgstats.timer
The unit files have no installation config (WantedBy=, RequiredBy=, Also=,
Alias= settings in the [Install] section, and DefaultInstance= for template
units). This means they are not meant to be enabled using systemctl.
Possible reasons for having this kind of units are:
• A unit may be statically enabled by being symlinked from another unit's
.wants/ or .requires/ directory.
• A unit's purpose may be to act as a helper for some other unit which has
a requirement dependency on it.
• A unit may be started when needed via activation (socket, path, timer,
D-Bus, udev, scripted systemctl call, ...).
• In case of template units, the unit is meant to be enabled with some
instance name specified.
Same message is displayed if I use pkgstats.service. I see this:
[root@arch64 ~]# systemctl list-timers --all
NEXT LEFT LAST PASSED UNIT ACTIVATES
Sat 2021-04-03 00:00:00 IST 6h left Fri 2021-04-02 07:08:44 IST 10h ago man-db.timer man-db.service
Sat 2021-04-03 00:00:00 IST 6h left Fri 2021-04-02 07:08:44 IST 10h ago shadow.timer shadow.service
Sat 2021-04-03 15:10:16 IST 21h left Fri 2021-04-02 15:10:16 IST 2h 46min ago systemd-tmpfiles-clean.timer systemd-tmpfiles-clean.service
n/a n/a n/a n/a pkgstats.timer pkgstats.service
4 timers listed.
So what I did is, I edited the file as mentioned systemd/Timers wiki page:
[root@arch64 system]# cat pkgstats.timer
[Unit]
Description=Weekly pkgstats submission
[Timer]
OnCalendar=weekly
AccuracySec=1d
RandomizedDelaySec=3d
Persistent=true
[Install]
WantedBy=timers.target
[root@arch64 system]#
and now I get this:
[root@arch64 ~]# systemctl list-timers
NEXT LEFT LAST PASSED UNIT ACTIVATES
Sat 2021-04-03 00:00:00 IST 5h 50min left Fri 2021-04-02 07:08:44 IST 11h ago man-db.timer man-db.service
Sat 2021-04-03 00:00:00 IST 5h 50min left Fri 2021-04-02 07:08:44 IST 11h ago shadow.timer shadow.service
Sat 2021-04-03 15:10:16 IST 21h left Fri 2021-04-02 15:10:16 IST 2h 59min ago systemd-tmpfiles-clean.timer systemd-tmpfiles-clean.service
Tue 2021-04-06 17:31:28 IST 3 days left n/a n/a pkgstats.timer pkgstats.service
4 timers listed.
....