43380.patch was merged upstream but is not yet in a release. The other
two patches are implicit dependencies of this patch and had to be
backported as well. They move json parsing into shared code and switch
resolvectl's query path to use varlink. They are large, but *seem* low
risk.
Fixes#4831
Signed-off-by: Clayton Craft <craftyguy@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/9416>
This helps slow devices like the PinePhone particularly, where currently
many apps end up launching after the splash has timed out which creates
an awkward gap where the wallpaper temporarily is displayed and Phosh
says that the app either crashed or is slow to launch.
While this patch does not fix the problem entirely, in my testing it
helps many Flatpak apps launch before the splash goes away leading to a
much smoother and less confusing user experience. As such I think this
is worth backporting.
Signed-off-by: Stefan Hansson <newbyte@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/9420>
pmbootstrap 3.11 is strict-by-default and previous versions had a broken
implementation which broke upon a full bootstrap of e.g. the systemd
repo. I think it's therefore safe to remove this already, even without
bumping pmbootstrap_min_version.
[ci:skip-vercheck]: doesn't affect any artifacts
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/9112>
Some reasons why I think we want to use resolved by default:
- split DNS support (e.g. for VPNs)
- DNS caching
- roaming (switching between wifi, cell, etc) is handled better since DNS
is tracked per link and the cache is flushed on config changes, so
there are no stale DNS answers when a device switches
- allows users to easily enable dnssec and DoT (even if we aren't
enabling these by deafult right now)
Signed-off-by: Clayton Craft <craftyguy@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/9109>
This logic is "borrowed" from Fedora, and replaces /etc/resolv.conf with
a symlink to the systemd-resolved stub. Fedora does this from an install
script, but that doesn't work for image-based installs since those never
run install scripts on the device, and /etc persists across updates.
I've also seen cases in testing where the symlink was removed by e.g.
accidentally running resolvconf or something similar. So
this runs from a oneshot unit at boot instead, which is ordered before
network-pre.target so NetworkManager doesn't get there first. The old
resolved.post-install script is dropped since the unit covers both cases.
There are some conditions where resolv.conf is **not** replaced:
- when resolv.conf is already a symlink
- when systemd-resolved isn't enabled
- when its stub listener is disabled (via DNSStubListener= in config)
- when systemd isn't running, since resolved isn't either and replacing
resolv.conf would just break dns (e.g. when running the unit's script
by hand)
- when resolv.conf is a bind mount (e.g. in a chroot or container)
This assumes that if a user/sys admin wants to hand-roll their own
resolv.conf, that they either disable the systemd-resolved unit or
disable the stub listener in config if they want to use foreign mode.
The resolved drop-ins are also renamed with a 10- prefix, to match the
numbering ranges UAPI.6 recommends for vendor config in /usr.
Signed-off-by: Clayton Craft <craftyguy@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/9109>
This fixes a bug where template presets with a specified instance were
not being handled. The install script previously parsed the entire line,
including the instance(s) and ran 'systemctl preset' on it all, e.g.
'systemctl preset unudhcpd@.service usb0'.
The script will now:
- detect lines that contain a template + instance(s)
- diff the instances
- run preset on template@instance for all added or removed instances
Template presets that don't have any instances specified in the preset
file (because they have a DefaultInstance= set) are treated just like
any other unit since we can run preset on those and it enables the
template with the default instance.
Signed-off-by: Clayton Craft <craftyguy@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/9026>
compat-sysv-interfaces is meant for systems that
already have technical debt from switching from
sysv. postmarketOS does not have this, so this
is not needed.
All this option does is enable runlevels 0-6
and install legacy.conf, which also doesn't
work with our packaging because it installs
symlinks who's target only exists in
subpackages.
Signed-off-by: Aster Boese <asterboese@mailbox.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8996>