* apk-tools passes the directories it triggers on as arguments to the
trigger script. Use them to only run the relevant parts of the
triggers.
* Remove "|| :" from commands, as we run the script without "set -e", it
won't fail if a single command fails. Put explicit "exit 0" at the end
to ensure this even if the last command beforehand failed.
* Print messages for each action so we know what is happening.
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6346
[ci:skip-build]: already built successfully in CI
The iptables frontend for nftables seems to not play nice. Since we use
nftables in postmarketOS anyway, tell tailscale to use it directly. This
fixes routing not working and the following error seen in tailscale status
- adding [-i tailscale0 -j MARK --set-mark 0x40000/0xff0000] in v4/filter/ts-forward: running [/usr/sbin/iptables -t filter -A ts-forward -i tailscale0 -j MARK --set-mark 0x40000/0xff0000 --wait]: exit status 2: Warning: Extension MARK revision 0 not supported, missing kernel module?
Signed-off-by: Caleb Connolly <caleb@postmarketos.org>
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6344
This patch is in 257, so we can drop it when upgrading. Without this
patch, we'd have to the enable sysv compat stuff in systemd just to get
this legacy.conf file generated/installed, which totally doesn't seem
worth it (the sysv compat stuff seems to be a lot!)
Fixes#3616
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6352
[ci:skip-build]: already built successfully in CI
It's important to use a versioned constraint so that if the
package is ever removed from the binary repository it will actually be
removed from the users system too.
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6347
[ci:skip-build]: already built successfully in CI
Fixes a conflict between systemd and systemd-udev where apk thinks they both provide cmd:udevadm:
ERROR: unable to select packages:
systemd-256.11-r2:
conflicts: systemd-udevd-256.11-r2[cmd:udevadm=256.11-r2]
systemd-udevd-256.11-r2:
conflicts: systemd-256.11-r2[cmd:udevadm=256.11-r2]
[ci:ignore-count]
[ci:skip-build] already built in CI
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6334
Adjust everything to use the new systemd abuild helpers. These generate
the post-install/pre-deinstall and post-upgrade scripts automagically,
and abuild now provides some helpers where it's necessary to finegle
things a bit (e.g. see the pipewire-pulse-systemd subpackage).
Signed-off-by: Caleb Connolly <caleb@postmarketos.org>
Co-authored-by: Clayton Craft <clayton@craftyguy.net>
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6334
What we want is to reload services that need to be reloaded after
upgrade (those that are marked with needs-reload or needs-restart), to
handle systemctl daemon-reload too, and to reload udev, sysusers,
tmpfiles, etc.
This all needs to be done in a particular order, which we would ideally
do with different triggers (and triggers with consistent ordering!), but
apk can't do that so instead we have this inefficient solution which
will probably do a bunch of useless processing. ah well
Signed-off-by: Caleb Connolly <caleb@postmarketos.org>
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6334
Use the new default_systemd_install_scripts function from [1]. This
generates the install scripts automatically and detects what services
need to be preset/disabled/reloaded.
default_systemd wasn't used on purpose, see the comment in the patch for
an explanation.
[1]: 85969550e4
Signed-off-by: Caleb Connolly <caleb@postmarketos.org>
Co-authored-by: Clayton Craft <clayton@craftyguy.net>
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6334
Since we have cyclical dependencies we need this stub for everything to
build, once the binary repo is updated to drop all uses we can remove
it.
This is now all handled in abuild directly
Signed-off-by: Caleb Connolly <caleb@postmarketos.org>
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6334
This adds a default preset for user units, that disables them by
default. This behavior is identical to what we do with system presets,
which means that if we want a unit enabled by default then we need
to add a preset for it or rely on some other unit to pull it in
automatically. Without this default preset, user units are enabled by
default when `systemctl preset` is run on them, which may not always be
the desired behavior (i.e. we don't want this behavior with system units).
Get dbus building in edge again. This regressed due to the cross-native2
work in pmb which stopped using abuild to install makedepends and does
it in pmb instead. But pmbootstrap's parsing logic can't handle
conditions in the APKBUILD.
Related: issue 3604
Signed-off-by: Caleb Connolly <caleb@postmarketos.org>
[ci:skip-build]: already built successfully in CI