This fixes an issue where the mkosi-generated initrd fails to load udev
because libkmod is not installed when systemd-udevd is installed.
For pmOS installs/initramfs stuff, this change should be a no-op,
libkmod is already pulled in by other things and our initramfs config
includes the library manually.
[ci:skip-build]: already built successfully in CI
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7079>
GJS 1.86 was released with a port from
libgirepository-1.0 to libgirepository-2.0. That port
requires changes in gnome-shell. However, for now, there
is no gnome-shell-mobile based on 49, so as a hot fix,
this is a backport of those patches only.
Without these, the GNOME Shell will not even get beyond
main.js and as such is unusable even for gdm.
Signed-off-by: Markus Göllnitz <camelcasenick@bewares.it>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7061>
The trigger runs `systemctl preset cups.service`, but then if it runs
preset on the other two *afterwards* it will disable them (because no
explicit preset and we default to disable). This helps ensure they're
kept enabled.
The same seems to also happen for NetworkManager-wait-online and the
other things here, leading to them being accidentally disabled.
This also removes cups.service, it should be socket-activatable now that
cups.socket is enabled.
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7029>
GDB is needed, otherwise we can't send crash reports because it's unable to use any
debugger. elfutils is needed for eu-elflint used in the preamble.
Move the Python dependencies from checkdepends to depends because they
are also necessary for drkonqi during use.
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7049>
Apparently the eval trick doesn't work for passing vars if the var to
set is the same as the var for the value, in this case the caller of
this function was using `added_paths` and `removed_paths`. Shell scripts
suck.
This was missed in the tests because the unit tests call
trigger_unit_presets directly.
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7025>
Apparently this fails on other archs when cross compiling, not just
riscv64. I hit it locally when building x86_64 on aarch64. bpo is
hitting it when trying to build aarch64 on x86_64. This is kinda of a
big hammer, but I think we'll be able to drop this cups fork when abuild
systemd split func support is upstreamed, and bpo is currently blocked
trying to build changes to support our effort to upstream that abuild
patch.
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7023>
This reworks the preset, reload/restart, and cleanup handling and moves
it from a (proposed [1]) abuild patch that would generate install
scripts for every -systemd package to a series of commit hooks and
a trigger that would exist in this package. This was made
possible by using `treescan`, which quickly[2] recursively scans
/usr/lib/systemd and allows the commit hook and trigger to diff units
before and after an install or uninstall transaction.
I chose to put the trigger and commit hook in pmos-base-systemd instead
of the systemd package because:
1) It's annoying to have to rebuild systemd just to update the logic in
this script. Rebuilding this package is MUCH faster (nothing to
compile)
2) IF the systemd package moves elsewhere (i.e. out of pmaports), it's
unclear if this preset stuff would follow it, and it's safer for us to
keep it separate so know it's always being included in pmOS+systemd
installs. It can always be moved later if we decide to.
More info on how the three situations are handled by this patch:
Presets: Pre-commit hook captures current unit file list (using
treescan) before changes, then the trigger on /usr/lib/systemd/system
captures (using treescan) the state after changes and diffs them. It
picks out only unit files that were added, and runs systemctl preset to
apply any preset config that might exist for them.
Reload/restart: This relies on manual post-upgrade scripts in packages
that need it. post-upgrade scripts should mark units with systemctl
set-property ... Markers=+needs-reload/restart. Actual reload/restart
handled by the existing systemd.trigger that queries these markers...
This is going to be a bit annoying for package maintainers[3], but I
don't think many packages will *need* this. As of today, there are 0
packages explicitly requesting reload/restart on upgrade. This also
means there will be no automatic detection of whether a unit should be
reloaded/restarted. AFAIK Fedora doesn't support this, packages have to
explicitly request a reload or restart.
Cleanup: The pre-commit hook uses treescan to capture systemd unit
directory state before transactions and the trigger identifies removed
units (using treescan + diff). It then finds broken symlinks in
/etc/systemd/ that point to any newly removed unit files from the
transaction, and removes only them.
Benefits:
- Simple abuild patch for -systemd split func
- Uses existing APK mechanisms (commit hooks, triggers). Hooks can see
before/after transaction state for cleanup.
- Logic updates don't require rebuilding all packages.
Tradeoffs:
- Requires additional per-package complexity to support
reload/restart functionality.
- Moves unit discovery/parsing for preset and cleanup from build-time to
runtime (every device does this work vs. once at build)
- Package behavior varies based on installed trigger/hook
versions rather than being deterministic per package version.
- There's a (tiny) risk of some operations being race-y, e.g. if the
user is actively enabling/disabling/adding unit files between apk
running the pre-commit hook and the trigger firing... It seems
unlikely this will cause issues, but 🤷♂️
1. https://gitlab.alpinelinux.org/alpine/abuild/-/merge_requests/394
2. I used hyperfine to measure performance of treescan on my laptop,
with lots of units installed, and it was ~20ms without disk caching
3. A post-upgrade that would mark a unit for reload might look like
this:
```
if [ -d "/run/systemd/system" ]; then
echo "Marking sshd.service for reload..."
systemctl set-property sshd.service Markers=+needs-reload
fi
```
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6892
These packages were previously built by a WIP abuild patch that added
install scripts to each -systemd subpkg for handling preset application
on install and symlink cleanup on uninstall. This functionality has been
replaced by a trigger/commit hook, so we need to rebuild these packages
to drop the install scripts that were previously generated.
[ci:ignore-count]
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6892
Fixes service shutdown order on device shutdown/reboot.
Basically you can't shutdown rmtfs before Wi-Fi is shut down, due to
how remote processors are involved in this on qcom platforms.
If modem is powered off, all attepts to communicate with Wi-Fi
firmware are nonsense and this hangs device on shutdown/reboot
or send it to crashdump mode.
Openrc sercice already has the correct dependency.
Fixes: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/issues/3936
For more details, see upstream PR: https://github.com/linux-msm/rmtfs/pull/24
We can safely replace the `Before=msm-modem-uim-selection.service` line
because msm-modem-uim-selection already has its own deps specified in its
own service file.
Signed-off-by: Alexey Minnekhanov <alexeymin@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6956>
This could be folded into aports/qemu.. but I'm not sure if
they'd accept it since the path these install to seems(?) to be
systemd-specific? Once there's -systemd split pkg support in abuild,
then maybe it'll make sense to move this to aports.
fixes#3394
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6950
[ci:skip-build]: already built successfully in CI