FS#80257 - [alsa-card-profiles] should not overwrite 9999-custom.conf on update

Attached to Project: Arch Linux
Opened by Denilson Sá Maia (denilsonsa) - Tuesday, 14 November 2023, 19:26 GMT
Last edited by Toolybird (Toolybird) - Friday, 24 November 2023, 21:19 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Jan Alexander Steffens (heftig)
David Runge (dvzrv)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No


A couple of months ago, PipeWire introduced a new file `9999-custom.conf` to let the user add their own custom profiles. The idea is to preserve the user changes on this file across package updates. Unfortunately, the Arch package doesn't know about this file yet, and thus it will blindly overwrite it.

I believe the solution is to add `usr/share/alsa-card-profile/mixer/profile-sets/9999-custom.conf` to the `backup` array in the `PKGBUILD` file. I might be wrong, though.

Additional info:
* package version(s): 1:0.3.84-1
* https://archlinux.org/packages/extra/x86_64/alsa-card-profiles/
* https://gitlab.freedesktop.org/pipewire/pipewire/-/commit/4694b48b7b14e6a57742f35343c68e59b55e505c
* https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1050293

Steps to reproduce:
1. Add a custom profile to `/usr/share/alsa-card-profile/mixer/profile-sets/9999-custom.conf` (e.g. uncomment the example profile in that file.
2. Update/reinstall `alsa-card-profiles`.
3. Observe your custom changes are gone.
This task depends upon

Closed by  Toolybird (Toolybird)
Friday, 24 November 2023, 21:19 GMT
Reason for closing:  Fixed
Additional comments about closing:  alsa-card-profiles-1:0.3.85-1
Please continue liaising with upstream re the "room for improvement".
Comment by Toolybird (Toolybird) - Tuesday, 14 November 2023, 20:17 GMT
If you're editing config files under /usr, you're doing it wrong. Editable config files are supposed to live under /etc or $HOME. In general, only config files under /etc should end up in the backup array.

Is this software capable of finding user config files in a more appropriate location?
Comment by Denilson Sá Maia (denilsonsa) - Tuesday, 14 November 2023, 21:30 GMT
In the past few days there was one (or more) commit(s) adding more search paths:


I've not tested them yet, and I'm not sure which release includes those changes.

With these new changes, it might make sense to move the `9999-custom.conf` file to somewhere under `/etc/`, to make it clear it is "safe" to edit. Note, however, that this suggestion is still untested.
Comment by Toolybird (Toolybird) - Tuesday, 14 November 2023, 21:51 GMT
> In the past few days there was one (or more) commit(s) adding more search paths

Ok, thanks for the updated info. It seems upstream are aware of the current (sub-optimal) situation and are taking steps to address it. Good stuff. Please let us know if/when things are tested to be working and if patches are worth backporting or not..or maybe we just wait for a future release...
Comment by Denilson Sá Maia (denilsonsa) - Friday, 17 November 2023, 00:01 GMT
That commit is included in version 0.3.85. Unfortunately, it looks like the new search paths are not documented anywhere except the source-code. Also, people still need to copy the whole `default.conf` file because the `.include` directive isn't searching the new paths. So, I feel like there is still room for improvement.