From f739fb3751b22f8742d8c33e1e212b6271210eb1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= Date: Sun, 16 Oct 2022 04:13:16 +0200 Subject: [PATCH] Fix pulseaudio module path Take modlibexecdir from pkgconfig, instead of trying to construct it manually for every distribution. Fixes QubesOS/qubes-issues#7482 Fixes QubesOS/qubes-issues#7692 --- Makefile | 6 ++---- debian/pulseaudio-qubes.install | 2 +- rpm_spec/gui-agent.spec.in | 6 ++---- 3 files changed, 5 insertions(+), 9 deletions(-) diff --git a/Makefile b/Makefile index 9c767649..35958147 100644 --- a/Makefile +++ b/Makefile @@ -25,9 +25,7 @@ USRLIBDIR ?= /usr/lib SYSLIBDIR ?= /lib DATADIR ?= /usr/share PA_VER_FULL ?= $(shell pkg-config --modversion libpulse | cut -d "-" -f 1 || echo 0.0) -PA_VER_MAJOR_MINOR ?= $(shell echo $(PA_VER_FULL) | cut -d "." -f 1,2) -PA_VER_MAJOR ?= $(shell echo $(PA_VER_MAJOR_MINOR) | cut -d "." -f 1) -PA_MODULE_DIR ?= $(shell if [ $(PA_VER_MAJOR) -ge 16 ]; then echo pulseaudio; else if [ "$(lsb_release -is)" != "Ubuntu" ]; then echo pulse-$(PA_VER_MAJOR_MINOR); else pulse-$(PA_VER_FULL); fi; fi) +PA_MODULE_DIR ?= $(shell pkg-config --variable=modlibexecdir libpulse) help: @echo "Qubes GUI main Makefile:" ;\ @@ -103,7 +101,7 @@ install-pulseaudio: install -m 0644 -D pulse/qubes-default.pa \ $(DESTDIR)/etc/pulse/qubes-default.pa install -D pulse/module-vchan-sink.so \ - $(DESTDIR)$(LIBDIR)/$(PA_MODULE_DIR)/modules/module-vchan-sink.so + $(DESTDIR)$(PA_MODULE_DIR)/module-vchan-sink.so install -m 0644 -D appvm-scripts/etc/tmpfiles.d/qubes-pulseaudio.conf \ $(DESTDIR)/$(USRLIBDIR)/tmpfiles.d/qubes-pulseaudio.conf install -m 0644 -D appvm-scripts/etc/xdgautostart/qubes-pulseaudio.desktop \ diff --git a/debian/pulseaudio-qubes.install b/debian/pulseaudio-qubes.install index 92ea115b..213a05c5 100644 --- a/debian/pulseaudio-qubes.install +++ b/debian/pulseaudio-qubes.install @@ -2,4 +2,4 @@ etc/pulse/qubes-default.pa etc/xdg/autostart/qubes-pulseaudio.desktop usr/bin/start-pulseaudio-with-vchan usr/lib/pulse-*/modules/module-vchan-sink.so -usr/lib/tmpfiles.d/qubes-pulseaudio.conf \ No newline at end of file +usr/lib/tmpfiles.d/qubes-pulseaudio.conf diff --git a/rpm_spec/gui-agent.spec.in b/rpm_spec/gui-agent.spec.in index 99470a34..a5878cf5 100644 --- a/rpm_spec/gui-agent.spec.in +++ b/rpm_spec/gui-agent.spec.in @@ -37,9 +37,7 @@ URL: http://www.qubes-os.org %define pa_ver_full %((pkg-config --modversion libpulse 2>/dev/null || echo 0.0) | cut -d "-" -f 1) -%define pa_ver_major_minor %((pkg-config --modversion libpulse 2>/dev/null || echo 0.0) | cut -d "-" -f 1 | cut -d "." -f 1,2) -%define pa_ver_major %(echo %{pa_ver_major_minor} | cut -d "." -f 1) -%define pa_module_dir %(if [ %{pa_ver_major} -ge 16 ]; then echo pulseaudio; else echo pulse-%{pa_ver_major_minor}; fi) +%define pa_module_dir %(pkg-config --variable=modlibexecdir libpulse) BuildRequires: gcc BuildRequires: libX11-devel @@ -204,7 +202,7 @@ rm -f %{name}-%{version} /usr/lib/tmpfiles.d/qubes-pulseaudio.conf /etc/pulse/qubes-default.pa /usr/bin/start-pulseaudio-with-vchan -%{_libdir}/%{pa_module_dir}/modules/module-vchan-sink.so +%{pa_module_dir}/module-vchan-sink.so /etc/xdg/autostart/qubes-pulseaudio.desktop %files xfce