Adding new ALSA UCM configs
I have a audio interface that don't work properly on Linux without getting a new a new ALSA UCM config. However the
/usr/share/alsa
directory is of course non-editable. Is it possible to update it? I severely need the configuration to be able to record my audio properly!Solution:Jump to solution
So I've made the copr repo and the package spec.
Package spec: https://github.com/Zelaf/alsa-ucm-conf-rpm
Copr repo: https://copr.fedorainfracloud.org/coprs/zelaf/alsa-ucm/
To install on Bazzite: ...
GitHub
GitHub - Zelaf/alsa-ucm-conf-rpm: An RPM spec for creating a newer ...
An RPM spec for creating a newer version of the ALSA UCM configurations. - GitHub - Zelaf/alsa-ucm-conf-rpm: An RPM spec for creating a newer version of the ALSA UCM configurations.
49 Replies
So far it seems that my only possibility would be to either find or make a rpm package or copr repository to find the latest config updates
those files should work locally too
in a folder in ~/.local or ~/.config
Oh? I've read the UCM config over and over and haven't found anything in regard to having them in a local folder
checking
I take that back, works for everything but UCM
you can also just fork the bazzite repo and make your changes in the containerfile, or make a new containerfile which calls myimage FROM ghcr.io/ublue-os/bazzite
quick and easy way to make changes to the core files
Oh, I can make a new container file that calls on another container file??
yep!
/etc/alsa doesn't work?
That sounds like a sweet way to instantly plug in new programs and features
note as well that if your changes don't break other hardware we're more than happy to accept a PR
Hell yeah
I mean, it's just config files
They're gonna be pushed out eventually to a new ALSA UCM version
But they rarely do it
GitHub
GitHub - alsa-project/alsa-ucm-conf: ALSA Use Case Manager configur...
ALSA Use Case Manager configuration. Contribute to alsa-project/alsa-ucm-conf development by creating an account on GitHub.
As you can see, there's no releases, only tags
GitHub
Commits · alsa-project/alsa-ucm-conf
ALSA Use Case Manager configuration. Contribute to alsa-project/alsa-ucm-conf development by creating an account on GitHub.
And sadly the config needed for me was added on the 30th when one decided to go over PRs D;
I won't be able to test all these config files sadly. But if I get it working will someone look over it?
yeah we'll take a look
Also any documentation for how I do this?
Woah
I think I'm in love with this fedora type now
Right, still gonna need documentation on how all this works. Also if I want to make it as "stable" for bazzite as possible I imagine download a tarbal to put in the repo would potentially be best? Or a folder perhaps.
Since making a script to pull the repo or follow the commands in the ucm repo seems like a bad idea
WAIT, can the
just
command surpass the restrictions on the /usr
folder?
Like, does it run outside of the container itself?It can not, the usr folder is unwriteable outside of layers via rpm-ostree and what's done in the container file
Might be best as a Copr in that case
I did read up on that
I'm a total newbie when it comes to making and modifying distros. Been using Linux for years but never really modified something as sensitive as a distro setup before so I'm unsure what the best approach to this is
For a stable release for users I think an RPM made in copr is best, for personal use you can straight up pull the latest from that repo with git and move them into place in a containerfile
or wget the specific file you need, straight into the final folder
Alright, so either be kind to all users and learn copr for everyone else who uses their setup as audio recording too or make it easy :D
Is it hard mainting a copr repo?
What chroot is required on copr?
this packge would be noarch, for building you'd use 38. 39, and rawhide x86_64
that way it forks automatically as 40, 41, 42 come out
etc
maintaining a copr is pretty easy
brick wall learning curve to get started, then smooth sailing
I have no idea what I'm doing let's hope it goes well enough :D
copr takes a spec file
best thing to do is grab upstream's spec file
change it to point to main rather than a specific tag
and then just build that in copr
Sounds easy enough
I really have to download the whole alsa-lib build to get to the config files???
After all this work, I hope more people will use ublue for audio stuff
alsa-ucm-1.2.10-3.fc39 - Fedora Packages
View alsa-ucm-1.2.10-3.fc39 in Fedora 39. alsa-ucm: ALSA Use Case Manager configuration
I cannot for the life of me find any spec files
https://koji.fedoraproject.org/koji/rpminfo?rpmID=36005731
Found this could the spec file be inside of the rpm?
Oh wait, that's not it
ulsa-ucm is a sub package of alsa-lib
Spec file is there
Oh there it is
Woah, the spec file is literally just the commands from the ucm repo
Should I name the package
alsa-ucm
or make it something along the lines of alsa-ucm-config
?
Or perhaps alsa-ucm-git
?
Do you think this will work?
Not sure how to define %{_datadir}
howeverBuildRequires: systemd-rpm-macros
I found a rpm spec that I decided to modify
Doing trial and error until it turns out fine
GitHub
GitHub - Zelaf/alsa-ucm-conf-rpm-spec: Newer ALSA Use Case Manager ...
Newer ALSA Use Case Manager configurations. Contribute to Zelaf/alsa-ucm-conf-rpm-spec development by creating an account on GitHub.
So... What's the correct way to test this?
How do I make sure this package doesn't get overwritten by a alsa-lib update or a ucm update?
Also will it not show package conflicts between the two?
Alright, I think I'm gonna have to give up on the rpm package.
rpm-ostree override install file.rpm
conflicts are a given since you're replacing
if your RPM has a different name, make sure it has "Provides: original_package_name_here" in the spec
Oh that's a smart one
I just can't figure out how to make copr handle the files properly
/var/tmp/rpm-tmp.78RG7m: line 40: cd: alsa-ucm-conf-23adf5a: No such file or directory
Keep getting this error and the only result I found is that it assumes file and folder names and the files and folders aren't the same as the project on the downloaded git repoyou're close
couple errors in your spec file
GitHub
unl0kr/unl0kr.spec at main · KyleGospo/unl0kr
Framebuffer-based disk unlocker for the initramfs based on LVGL - KyleGospo/unl0kr
take a look at this one
Oh yeah, I can just git clone directly
Alright, I just don't understand what I'm doing wrong. AFAIK the Source0 command should create the directory in the
tmp
directory of the package name that then tries to get deleted but at the same time it fails because the folder isn't there?
From what I understand a way around this would basically to take the install section and make it a separate script and just run that under the install I suppose?
Oh!
It doesn't get downloaded to the same folder??
It creates the folder and then complains about it not existing? D;
HOLY FUCK I DID ITShould I change any of these settings?
Omfg such hype
Piss
Alright so from what I can understand the only way to fix it is by either removing the original
alsa-ucm
package or the files
The package isn't layered so I can't remove it, is it based on pre-installed packages from the ublue image?
I ran
Hopefully it won't remove all of alsa
Omg seems to actually be working
I can't test now tho because I don't have my audio interface lol
Do I need to run rpm-ostree uninstall alsa-ucm
and rpm-ostree install alsa-ucm
every time I get a new system update?
Do you know how to properly handle versioning and release numbers for this? I'm thinking of doing something like this:
Current:
And then:
Solution
So I've made the copr repo and the package spec.
Package spec: https://github.com/Zelaf/alsa-ucm-conf-rpm
Copr repo: https://copr.fedorainfracloud.org/coprs/zelaf/alsa-ucm/
To install on Bazzite:
GitHub
GitHub - Zelaf/alsa-ucm-conf-rpm: An RPM spec for creating a newer ...
An RPM spec for creating a newer version of the ALSA UCM configurations. - GitHub - Zelaf/alsa-ucm-conf-rpm: An RPM spec for creating a newer version of the ALSA UCM configurations.