main/postmarketos-ui-plasma-mobile: drop systemd unit file

This should come from the package providing the daemon run by the unit
file (and in our case, at least temporarily, from the vendored unit file
in systemd-services)

This also adds an install script for post-upgrade that makes sure that
the alias for display-manager.service is created for plasma-mobile on
existing installs where we were missing the alias definition in the
tinydm unit file.
Without this workaround, existing installs will miss the alias and we
won't be able to run things that are associated with this alias (like
stopping pbsplash.)
Note: this is a post-install script since this subpkg is new, and on
existing systems affected by the issue it resolves the subpkg would be
'installed' not 'upgraded'.

Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7202>
This commit is contained in:
Clayton Craft 2025-10-15 09:39:41 -07:00 committed by The Friendly Merge Bot
parent d92884c0d6
commit ba2199528e
No known key found for this signature in database
4 changed files with 20 additions and 63 deletions

View file

@ -1,8 +1,8 @@
# Reference: https://postmarketos.org/uipkg
# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=postmarketos-ui-plasma-mobile
pkgver=5
pkgrel=10
pkgver=6
pkgrel=0
pkgdesc="(Wayland) Mobile variant of KDE Plasma (does not run without hardware acceleration)"
url="https://wiki.postmarketos.org/wiki/Plasma_Mobile"
arch="noarch !armhf !x86 !ppc64le" # armhf: pmaports#75, x86: aports#11807, ppc64le: no angelfish
@ -29,12 +29,11 @@ _pmb_recommends="
ttyescape
"
source="
plasma-mobile.service
kscreenlockerrc
maliit-plasmamobile.json
org.kde.plasma.mobile.homescreen.folio.js
"
subpackages="$pkgname-extras $pkgname-openrc"
subpackages="$pkgname-extras $pkgname-openrc $pkgname-systemd"
replaces="plasma-mobile plasma-mobile-meta"
options="!check pmb:drm pmb:systemd"
@ -84,8 +83,14 @@ openrc() {
mkdir -p "$subpkgdir"
}
systemd() {
default_systemd
install="$subpkgname.post-install $subpkgname.post-upgrade"
mkdir -p "$subpkgdir"
}
sha512sums="
e12d8e98e28a795f879aebcceb32a991ee4abcb3bc5ec458aa5378bb52ff86cf39be04bc4a196925f532d623304b3005f561fa5e55d1c87944d718058ec4c0e6 plasma-mobile.service
b3aa8ee26c01de103c0c0af23532bf232f7071fdd02c53bd787d78e5974faa5662fc5776ce9be417392214ae73334b0eb0d073fe24f616a0ce99081f30b9158c kscreenlockerrc
70ee87860842057b557a433a9ae7d54653f076a612b3d9de2d413d598806d23ec19390262eaa398cddf39437f1213d14922402a8d978878e5e98f3767ce0b9eb maliit-plasmamobile.json
9396bb437c8a6e4b13eff1d16d1dee5804beafd126f4be55ab6deec7bcc42e2473c824b9a37717e347f99c33037d4de7accfb67943cb282fde38eb89ed6f2b89 org.kde.plasma.mobile.homescreen.folio.js

View file

@ -1,58 +0,0 @@
[Unit]
Description=Open-source user interface for phones, based on Plasma technologies
Documentation=https://invent.kde.org/plasma-mobile
# replaces the getty
Conflicts=getty@tty1.service
After=getty@tty1.service
# Needs all the dependencies of the services it's replacing
# (currently getty@tty1.service):
After=rc-local.service plymouth-quit-wait.service systemd-user-sessions.service
OnFailure=getty@tty1.service
# D-Bus is necessary for contacting logind. Logind is required.
Wants=dbus.socket
After=dbus.socket
# This scope is created by pam_systemd when logging in as the user.
# This directive is a workaround to a systemd bug, where the setup of the
# user session by PAM has some race condition, possibly leading to a failure.
# See README for more details.
After=session-c1.scope
# Since we are part of the graphical session, make sure we are started before
# it is complete.
Before=graphical.target
# Prevent starting on systems without virtual consoles
ConditionPathExists=/dev/tty0
[Service]
Environment=LANG=C.UTF-8
ExecStart=/usr/bin/startplasmamobile
TimeoutStartSec=30
User=10000
PAMName=login
WorkingDirectory=~
Restart=always
RestartSec=5s
# A virtual terminal is needed.
TTYPath=/dev/tty7
TTYReset=yes
TTYVHangup=yes
TTYVTDisallocate=yes
# Fail to start if not controlling the tty.
StandardInput=tty-fail
StandardOutput=journal
StandardError=journal
# Log this user with utmp, letting it show up with commands 'w' and 'who'.
UtmpIdentifier=tty7
UtmpMode=user
[Install]
WantedBy=graphical.target

View file

@ -0,0 +1,9 @@
#!/bin/sh
# Create missing display-manager.service alias if plasma-mobile service is
# enabled and the alias is missing.
if systemctl is-enabled -q plasma-mobile.service 2>/dev/null; then
if ! systemctl is-enabled -q display-manager.service 2>/dev/null; then
systemctl enable plasma-mobile.service
fi
fi

View file

@ -0,0 +1 @@
postmarketos-ui-plasma-mobile-systemd.post-install