[Backport staging-22.05] pulseaudioFull: fix wrapGApp wrapping, fix vm tests#188399
Closed
schmittlauch wants to merge 6 commits intoNixOS:staging-22.05from
Closed
[Backport staging-22.05] pulseaudioFull: fix wrapGApp wrapping, fix vm tests#188399schmittlauch wants to merge 6 commits intoNixOS:staging-22.05from
schmittlauch wants to merge 6 commits intoNixOS:staging-22.05from
Conversation
old URL returns 404 (cherry picked from commit 7df2bb1)
The test tries to detect the presence of pavucontrol's
window by looking for the tab label "Playback".
However, the OCR mechanism fails to resolve the
text, possibly due to the grey background color.
To fix this issue, we instead look for the name of the
sound device ("Dummy Output") which gets resolved by OCR.
Note: Strangely, the tab "Playback" *is* correctly
resolved when the test is run in interactive mode.
This might be due to the changed screen resolution,
but I didn't investigate further.
(cherry picked from commit 0fd2538)
According to pulseaudio(1), a system wide pulseaudio instance can only be accessed by members of the `pulse-access` group. This name seems to be hardcoded in pulseaudio -- I didn't find any switch to change it. We need to define the group so users can connect to the deamon. This commit also fixes the systemwide pulseaudio vm test: Previously, the test user `alice` was just a member of the `audio` group. This blocked access to the daemon and failed the test. The commit changes the group assignment and fixes the vm test. (cherry picked from commit 7ba0795)
(cherry picked from commit 78e5c0c)
Since NixOS@7a2605e the pulseaudio build recipe incorporates the `wrapGAppsHook` wrapper setup-hook if `advancedBluetoothCodecs` are enabled. This wrapper setup-hook -- like most wrappers -- wraps binaries in `$out/bin` by first renaming them, then placing a wrapper script where the original binary was. Unfortunatelly, pulseaudio doesn't like its binary moved around after installation: It records the binaries path during installation time https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/blob/e5ad31e873eed62bc580a86a61177047f9e8c491/meson.build#L154 then checks the path in `/proc/self/exe` and complains > Jun 16 19:06:48 nixosb pulseaudio[2219]: W: [.pulseaudio-wra] main.c: /proc/self/exe does not point to /nix/store/bqfyzxwpxa2ydmyvh3j32xrm4chxbj22-pulseaudio-15.0/bin/pulseaudio, cannot self execute. Are you playing games? if they don't match https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/blob/e5ad31e873eed62bc580a86a61177047f9e8c491/src/daemon/main.c#L577 Somehow, this also results in a real bug: `pacmd` fails to connect to the pulseaudio server, see NixOS#177915 To fix this issue, the commit at hand changes the installation directory for binaries to `$out/.bin-unwrapped`. After the installation, `$out/bin` is created by hand and populated with symlinks to files in `$out/.bin-unwrapped`. `wrapGAppsHook` doesn't know or care about the `.bin-unwrapped` directory; it just sees all the symlinks in `bin`, renames them and places wrapper scripts beside them. Effectively, this leaves the original binary in `.bin-unwrapped` unchanged! So pulseaudio will find itself still in its oritinal place, and "users" of the package can call pulseaudio via the wrapper script in `bin` as usual. (cherry picked from commit 3871f8b)
Note that `pacmd` only connects to user session daemons, so we have to skip it in system wide mode. (cherry picked from commit 64d256a)
Member
Author
|
@GrahamcOfBorg build pulseaudioFull |
|
This pull request has been mentioned on NixOS Discourse. There might be relevant details there: |
Member
Author
|
As the 22.11 release is due soon, no need to backport this anymore. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description of changes
Backport of #180976.
Backport necessary as it fixes a regression introduced in the 22.05 release (pacmd not working).
I manually tested that core pulseaudio features are still working on my system (audio plyback, bluetooth, pacmd).
Things done
sandbox = trueset innix.conf? (See Nix manual)nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/)nixos/doc/manual/md-to-db.shto update generated release notes