main/postmarketos-base-ui: configure openrc-settingsd for chronyd
We need to tell openrc-settingsd which ntp service to use, otherwise it'll default to busybox ntpd which we don't want.
Fixes https://gitlab.com/postmarketOS/openrc-settingsd/-/issues/1
Main problem (why this is a draft) is that currently dbus activation is launching openrc-settingsd which completely bypasses any configuration done in /etc/conf.d
and just uses the hardcoded arguments in /usr/share/dbus-1/system-services/org.freedesktop.{hostname1,locale1,timedate1}.service
With systemd they have SystemdService
which makes dbus start the systemd service instead of running an executable directly. https://dbus.freedesktop.org/doc/dbus-daemon.1.html No equivalent exists for openrc (or any other init system for that matter, I think Ubuntu had it patched for upstart at some point)
Possible solutions I have thought of:
- Completely drop these service files in Alpine packaging. That way a user has to
rc-update add openrc-settingsd
otherwise the service won't be available. This is a breaking change for Alpine users, in postmarketOS we can make it work with.post-install
/.post-upgrade
- Modify those service files to use
Exec=/bin/true
in pmOS. This will have basically the same effect but without touching Alpine users. Though Alpine users will have the same problem though still if they try to configure openrc-settingsd. Here we also use.post-install
/.post-upgrade
in pmOS. - Use
Exec=/sbin/rc-service openrc-settingsd start
to trigger openrc service start when the dbus interface is accessed. This might be the cleanest solution in terms of usability, not sure about how hacky this really is. Not sure if to patch this upstream, Alpine packaging or postmarketOS packaging (as an override here).
In any case if we make Alpine users do something manually I think there should be a hint as a .post-install
/.post-upgrade
message telling users to enable that service?
Also found this which might be interesting to read.. https://web.archive.org/web/20160304120925/http://homepage.ntlworld.com/jonathan.deboynepollard/Softwares/nosh/avoid-dbus-bus-activation.html
CC @psykose @Cogitri @PureTryOut