Skip to content
Snippets Groups Projects
Verified Commit 5aedeb9f authored by Clayton Craft's avatar Clayton Craft :speech_balloon:
Browse files

systemd/systemd-services: drop pulseaudio (MR 5142)

PA is started automatically by its "autospawn" config thing, and it
works pretty well... if it crashes then it's automatically restarted if
needed, etc.

The included service/socket unit files never really worked,
PA started from systemd would always race with (and often to) PA autospawn.

The subpkg here also resulted in a packaging bug where both
pulseaudio-service and pw-pulse-service were installed at the same time,
because the `install_if` listed `pulseaudio`, and `pw-pulse` also
provides `pulseaudio`. The two unit things conflict with each other.

I did some initial investigation, and getting systemd to manage PA
seemed like too much work especially since autospawn is probably good
enough and we hope to move to pw audio later.

[ci:skip-vercheck]
parent 1630fc77
No related branches found
No related tags found
No related merge requests found
......@@ -6,7 +6,7 @@
# How to add a new service file (4 steps):
pkgname=systemd-services
# 1. bump pkgver
pkgver=10
pkgver=11
pkgrel=0
pkgdesc="Systemd service files"
url="https://postmarketos.org"
......@@ -36,7 +36,6 @@ subpackages="
openssh-server-pam-service:_service
pd-mapper-service:_service
phosh-service:_service
pulseaudio-service:_service
q6voiced-service:_service
qbootctl-service:_service
rmtfs-service:_service
......@@ -68,7 +67,6 @@ _nftables_sources="system/nftables.service"
_openssh_server_pam_sources="system/sshd.service system/sshdgenkeys.service"
_pd_mapper_sources="system/pd-mapper.service"
_phosh_sources="system/phosh.service"
_pulseaudio_sources="user/pulseaudio.service user/pulseaudio.socket"
_q6voiced_sources="system/q6voiced.service"
_qbootctl_sources="system/qbootctl.service"
_rmtfs_sources="system/rmtfs.service"
......@@ -112,7 +110,6 @@ source="$(flatpath \
$_openssh_server_pam_sources \
$_pd_mapper_sources \
$_phosh_sources \
$_pulseaudio_sources \
$_q6voiced_sources \
$_qbootctl_sources \
$_rmtfs_sources \
......@@ -163,8 +160,6 @@ fa445c4a53214524baed4e9c52a5463592a074f88a5a286eacb60d0907c0545f725afde23abd68cf
c0badea3905c1d53d213fbfe11d25b556a2e484fe77eb50e9f4d42e25b67b56a0804e7d8e1b7731cd280cbb3525b4c60311817609381e2308d9f2dfb7c0d7072 system-sshdgenkeys.service
0bed9a8a719661609ad84d1c6fcdf2fe9213e741682b7ddebad82d9744f137c593788ed522868f10b95b599d81743d07ec3212630a7e99d333261dfa1bf1cc11 system-pd-mapper.service
5f53e07a48c64ab27deead4c1dc64dbea048de5632026d131e27e0fc3115723a1138d043199e2fdba9a281c420b3286a0aa96b063ed7f02c1153487ef732dd98 system-phosh.service
416cdca1d43af8f7a9fcb5c04abdc666500f918fa5a6985736be6132da074aa1f322ba891d74eefaeff4b8911240a3942bf82ef21ec3ba0c1f10ccc37e6cea49 user-pulseaudio.service
26c47085980e3f11f214d51846509f41ec9367360355b2d3fb40c7dc6e4394e04d084e645081d03c794669b902141513fbc6c3828b599588e308f98e28d99a92 user-pulseaudio.socket
4c4c3f1e5e829ff67dd35df59120ab59730ff1f1ca0aab93f16d670132979a99099fad59e6c736908cc19df9172c9bdfe476ec721a1cc28de8c2210da46ce1f1 system-q6voiced.service
621189aa251655796795f4fa0cd79360bb67573e7327e545064eaadafc83cc7b382a405d6ba80662e0a4ece3876e4270e3563d859a6ba63b5e3854b39c35873e system-qbootctl.service
11bb0ff9ab32f0f230c665db2738e37e5226fa200621b9207baf92e0632a38f840395a55ef6e827763911cf78f3bad95cd3456e77cc01b30b8abce96dc13df9d system-rmtfs.service
......
[Unit]
Description=Sound Service
# We require pulseaudio.socket to be active before starting the daemon, because
# while it is possible to use the service without the socket, it is not clear
# why it would be desirable.
#
# A user installing pulseaudio and doing `systemctl --user start pulseaudio`
# will not get the socket started, which might be confusing and problematic if
# the server is to be restarted later on, as the client autospawn feature
# might kick in. Also, a start of the socket unit will fail, adding to the
# confusion.
#
# After=pulseaudio.socket is not needed, as it is already implicit in the
# socket-service relationship, see systemd.socket(5).
Requires=pulseaudio.socket
ConditionUser=!root
[Service]
# FIXME: rebuild pulseaudio with journald support!
ExecStart=/usr/bin/pulseaudio --daemonize=no --log-target=stderr
LockPersonality=yes
MemoryDenyWriteExecute=yes
NoNewPrivileges=yes
Restart=on-failure
RestrictNamespaces=yes
SystemCallArchitectures=native
SystemCallFilter=@system-service
# Note that notify will only work if --daemonize=no
Type=notify
UMask=0077
Slice=session.slice
[Install]
Also=pulseaudio.socket
WantedBy=default.target
[Unit]
Description=Sound System
ConditionUser=!root
[Socket]
Priority=6
Backlog=5
ListenStream=%t/pulse/native
[Install]
WantedBy=sockets.target
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment