Compare commits

...
Author SHA1 Message Date
jane400 d1a9562db7 main/postmarketos-base-ui: add -systemd subpackage
- this ships a preset with haveged, systemd-rfkill and
  systemd-timesyncd enabled.

- systemd-timesyncd is enabled when on systemd, for (S)NTP
2024-06-07 20:08:58 +02:00
jane400 42ca63e70f main/postmarketos-base-ui: add networkmanager-systemd preset 2024-06-07 20:08:58 +02:00
jane400 f03839605b main/postmarketos-base-ui: add bluez systemd preset
This introduces a subpackage pmos-base-ui-bluez-systemd which
holds the bluetooth specific preset file and hooks.
2024-06-07 20:08:58 +02:00
jane400 baf3e84c93 main/postmarketos-base-ui: rename subpackage bluez to bluez-openrc 2024-06-07 20:08:58 +02:00
jane400 3ffd621e83 main/postmarketos-base-ui-wifi: introduce systemd presets
This commit adds -{wpa-supplicant,iwd}-preset subpackages which
holds the systemd preset files needed for the configuration and
adds a pmos-base-ui-wifi-systemd package which holds the hooks
for applying the preset.

pmos-base-ui-wifi-systemd depends on the virtual
pmos-base-ui-wifi-preset which is provided by the
-{wpa-supplicant,iwd}-preset packages.
2024-06-07 20:08:58 +02:00
jane400 6df88f0f28 main/postmarketos-base-ui-wifi: split out openrc specifics into subpackage 2024-06-05 21:28:32 +02:00
27 changed files with 121 additions and 9 deletions

No files matched your search

+83 -7
View File
@@ -26,17 +26,23 @@ subpackages="
$pkgname-audio-none:_audio_none
$pkgname-audio-pipewire:_audio_pipewire
$pkgname-audio-pulseaudio:_audio_pulseaudio
$pkgname-bluez
$pkgname-bluez-systemd:_bluez_systemd
$pkgname-bluez-openrc:_bluez_openrc
$pkgname-bluez-obexd:_obexd
$pkgname-elogind
$pkgname-flatpak
$pkgname-networkmanager-usb-tethering:_usb_tethering
$pkgname-networkmanager
$pkgname-networkmanager-systemd:networkmanager_systemd
$pkgname-openrc-settingsd:_openrc_settingsd
$pkgname-qt-tweaks:qt_tweaks
$pkgname-qt-wayland:qt_wayland
$pkgname-tinydm
$pkgname-wifi-iwd-openrc:iwd_openrc
$pkgname-wifi-iwd-systemd:iwd_systemd
$pkgname-wifi-iwd:iwd
$pkgname-wifi-wpa_supplicant-openrc:wpa_supplicant_openrc
$pkgname-wifi-wpa_supplicant-systemd:wpa_supplicant_systemd
$pkgname-wifi-wpa_supplicant:wpa_supplicant
$pkgname-x11
postmarketos-default-camera:_default_camera
@@ -65,6 +71,11 @@ _source644="
usr/lib/NetworkManager/conf.d/50-random-mac.conf
usr/lib/NetworkManager/conf.d/50-tethering.conf
usr/lib/NetworkManager/conf.d/50-use-dnsmasq.conf
usr/lib/systemd/system-preset/50-bluetooth.preset
usr/lib/systemd/system-preset/50-iwd.preset
usr/lib/systemd/system-preset/50-networkmanager.preset
usr/lib/systemd/system-preset/50-wpa_supplicant.preset
usr/lib/systemd/system-preset/99-base-ui.preset
usr/share/wireplumber/wireplumber.conf.d/50-pulseaudio.conf
"
_source600="
@@ -117,12 +128,19 @@ x11() {
amove etc/X11/Xwrapper.config
}
bluez() {
_bluez_openrc() {
install_if="$pkgname=$pkgver-r$pkgrel bluez-openrc"
amove etc/conf.d/bluetooth
}
_bluez_systemd() {
install_if="$pkgname=$pkgver-r$pkgrel bluez-service"
install="$subpkgname.post-install $subpkgname.post-upgrade $subpkgname.post-deinstall"
amove usr/lib/systemd/system-preset/50-bluetooth.preset
}
elogind() {
install_if="$pkgname=$pkgver-r$pkgrel elogind"
depends="sleep-inhibitor !systemd-logind"
@@ -144,6 +162,14 @@ _openrc_settingsd() {
amove etc/conf.d/openrc-settingsd
}
systemd() {
install_if="$pkgname=$pkgver-r$pkgrel systemd"
install="$subpkgname.post-install $subpkgname.post-upgrade $subpkgname.post-deinstall"
depends="systemd-timesyncd"
amove usr/lib/systemd/system-preset/99-base-ui.preset
}
tinydm() {
install_if="$pkgname=$pkgver-r$pkgrel tinydm-openrc"
replaces="tinydm-openrc"
@@ -186,6 +212,14 @@ networkmanager() {
amove usr/lib/NetworkManager/dispatcher.d/50-dns-filter.sh
}
networkmanager_systemd() {
depends="networkmanager-service"
install_if="$pkgname-networkmanager=$pkgver-r$pkgrel systemd"
install="$subpkgname.post-install $subpkgname.post-upgrade $subpkgname.post-deinstall"
amove usr/lib/systemd/system-preset/50-networkmanager.preset
}
_default_camera() {
# dummy package for camera app, packages can install_if on this to install
# the appropriate camera app for that device/UI
@@ -202,27 +236,64 @@ qt_wayland() {
wpa_supplicant() {
pkgdesc="Use wpa_supplicant as the WiFi backend."
depends="wpa_supplicant"
install="$subpkgname.post-install $subpkgname.post-upgrade"
replaces="wpa_supplicant-openrc"
provides="postmarketos-base-ui-wifi=$pkgver-r$pkgrel"
provider_priority=100
depends="wpa_supplicant"
mkdir -p "$subpkgdir"
}
wpa_supplicant_systemd() {
install_if="$pkgname-wpa_supplicant=$pkgver-r$pkgrel systemd"
install="$subpkgname.post-install $subpkgname.post-upgrade $subpkgname.post-deinstall"
depends="wpa_supplicant-service"
amove usr/lib/systemd/system-preset/50-wpa_supplicant.preset
}
wpa_supplicant_openrc() {
install_if="$pkgname-wpa_supplicant=$pkgver-r$pkgrel openrc"
install="$subpkgname.post-install $subpkgname.post-upgrade"
depends="wpa_supplicant-openrc openrc"
replaces="wpa_supplicant-openrc"
replaces_priority=100
amove etc/conf.d/wpa_supplicant
}
iwd() {
pkgdesc="Use iwd as the WiFi backend (but may not work with all devices)"
depends="iwd"
install="$subpkgname.post-install $subpkgname.post-upgrade"
provides="postmarketos-base-ui-wifi=$pkgver-r$pkgrel"
# Lower than wpa_supplicant for now, see:
# https://gitlab.com/postmarketOS/pmaports/-/issues/1379
provider_priority=90
depends="iwd"
amove usr/lib/NetworkManager/conf.d/50-iwd.conf
}
iwd_systemd() {
install_if="$pkgname-iwd=$pkgver-r$pkgrel systemd"
install="$subpkgname.post-install $subpkgname.post-upgrade $subpkgname.post-deinstall"
depends="iwd-service"
amove usr/lib/systemd/system-preset/50-iwd.preset
}
iwd_openrc() {
install_if="$pkgname-iwd=$pkgver-r$pkgrel openrc"
install="$subpkgname.post-install $subpkgname.post-upgrade"
depends="iwd-openrc openrc"
mkdir -p "$subpkgdir"
}
_audio_none() {
pkgdesc="Do not install any audio backend."
provides="postmarketos-base-ui-audio=$pkgver-r$pkgrel"
@@ -273,6 +344,11 @@ cac604e25c46e695dd30bd5a10cfd2d69595fcc3bc290096ac94b76b10834d591ea6576afb79c46b
d4b4c4fed2dee7266f6a87ae266691377593014943e2953e4cd87a59f3110f25bfb5f3f866cc843519f628695e4df7602bfdcd3d79f2c2cd6e8256535c33b038 rootfs-usr-lib-NetworkManager-conf.d-50-random-mac.conf
6507eb31cdd694a7db0280246433118a650bf5d99fbe639f967ae2d95945429a7e03ca6feb5bb6e7b9fb14fcec21e13e51209a79edd0041e77b5bf76b129ed6f rootfs-usr-lib-NetworkManager-conf.d-50-tethering.conf
900554534191fa0797064d35350934cdd8af59f30f0ae7d8ec63c2e11c44a16c643d3024b6543940488cd590fec1d392548bcaacc3be88cddff90f69b17ece07 rootfs-usr-lib-NetworkManager-conf.d-50-use-dnsmasq.conf
ee18a6d19f037f4ab76e0cefbe0b2c74f36c892f4c938d1122afe8b9e4c55c38fb48e311271f4036471c0c12e022bc8beea8181b34e084b7fb9e4685ff445551 rootfs-usr-lib-systemd-system-preset-50-bluetooth.preset
b6f586ec976beb816a284ed4b9568b57b967e6f02c66e0df0df0b40d7100260d828c51ba1ea22efbd7d4691f045e56f9b54be1ee5cd76af9021539e1c136d860 rootfs-usr-lib-systemd-system-preset-50-iwd.preset
15647e8e0b4a696f4abf75606d016e6963aa831d97218712d46f2f53ccd1d46115d1d4a0c0742d04a59498e2f936d68d2d0b55a5b1169292ba8b3f70e781d785 rootfs-usr-lib-systemd-system-preset-50-networkmanager.preset
1cee819a9163eb1212c934057615f712bd9380f067ff4b240903ef96165c78d1a32e5312c2d9af07cb68284edff5482a02829319d446a5f35e1c935ca0ab4e96 rootfs-usr-lib-systemd-system-preset-50-wpa_supplicant.preset
f494c848a82d48d126291f36ae79fcca7c4cc33029ebb6cadc76436502044975d5d40a53e4fdee97ec2d8558e9231fca2b2b9cc1ac388b32a692e40de7475978 rootfs-usr-lib-systemd-system-preset-99-base-ui.preset
ebb7700018cf64fe6dcb747365cd2fb816deb6e06e7368af779284b51b1f0749e24f8e70b0b72fa6bff4178a02af934f728c3b115c8c1f77aa1a3490879af731 rootfs-usr-share-wireplumber-wireplumber.conf.d-50-pulseaudio.conf
1b8add60574ec4644197cb93263c0653325c2e88e03673de918be5fb3280c7b81e8e97dce498850a07f2f3307771c44f3c876922e5cbd5207523ede31816296f rootfs-usr-lib-NetworkManager-system-connections-USB_Networking.nmconnection
d1ddd43489e6016e3ffd716027ed2bae4a2ab5f213118bdbcb96750e267ab7c0367cd0e0e386300aa5550352653144f5caeddd790621fe0879f83ca1995bb65c rootfs-etc-tinydm.d-env-wayland.d-50-firefox-wayland.sh
@@ -0,0 +1 @@
postmarketos-base-ui-bluez-systemd.post-install
@@ -0,0 +1,3 @@
#!/bin/sh
systemctl preset bluetooth.service
@@ -0,0 +1 @@
postmarketos-base-ui-bluez-systemd.post-install
@@ -0,0 +1 @@
postmarketos-base-ui-networkmanager-systemd.post-install
@@ -0,0 +1,3 @@
#!/bin/sh
systemctl preset NetworkManager.service || true
@@ -0,0 +1 @@
postmarketos-base-ui-networkmanager-systemd.post-install
@@ -0,0 +1 @@
postmarketos-base-ui-systemd.post-install
@@ -0,0 +1,5 @@
#!/bin/sh
for _service in haveged systemd-rfkill timesyncd; do
systemctl preset "$_service".service || true
done
@@ -0,0 +1 @@
postmarketos-base-ui-systemd.post-install
@@ -0,0 +1 @@
postmarketos-base-ui-wifi-iwd-openrc.post-install
@@ -0,0 +1 @@
postmarketos-base-ui-wifi-iwd-systemd.post-install
@@ -0,0 +1,3 @@
#!/bin/sh -e
systemctl preset iwd
@@ -0,0 +1 @@
postmarketos-base-ui-wifi-iwd-systemd.post-install
@@ -1 +0,0 @@
postmarketos-base-ui-wifi-iwd.post-install
@@ -0,0 +1 @@
postmarketos-base-ui-wifi-wpa_supplicant-openrc.post-install
@@ -0,0 +1 @@
postmarketos-base-ui-wifi-wpa_supplicant-systemd.post-install
@@ -0,0 +1,3 @@
#!/bin/sh -e
systemctl preset wpa_supplicant
@@ -0,0 +1 @@
postmarketos-base-ui-wifi-wpa_supplicant-systemd.post-install
@@ -1 +0,0 @@
postmarketos-base-ui-wifi-wpa_supplicant.post-install
@@ -0,0 +1 @@
enable bluetooth
@@ -0,0 +1,2 @@
disable wpa_supplicant
enable iwd
@@ -0,0 +1 @@
enable NetworkManager
@@ -0,0 +1,2 @@
disable iwd
enable wpa_supplicant
@@ -0,0 +1,3 @@
enable haveged
enable systemd-rfkill
enable timesyncd