snapcast
snapcast copied to clipboard
[Fedora] install failed, bad postinst command
Describe the bug When i install snapserver or snapclient it fails. In fact some options aren't the same between debian and Fedora.
Steps to Reproduce
- git clone
- make
- sudo make installserver
Environment details
- OS: Fedora 35
- Snapcast version 0.25.0
- self compiled, ...
Attach logfile if applicable
➜ snapcast (master) ✔ sudo make installserver
make install -C server
make[1]: Entering directory '/home/paul/logiciels/snapcast/server'
make adduser
make[2]: Entering directory '/home/paul/logiciels/snapcast/server'
sh ../debian/snapserver.postinst configure
adduser: unrecognized option '--quiet'
In a second point : At first time, snapclient daemon launched with alsa output fails like this :
2021-12-16 20-16-27.097 [Info] (Alsa) Using default buffer_time: 80 ms, default fragments: 4
ALSA lib conf.c:4096:(config_file_open) cannot access file /etc/alsa/conf.d/50-pipewire.conf
ALSA lib conf.c:4016:(snd_config_hooks_call) function snd_config_hook_load returned error: Permission denied
ALSA lib conf.c:4623:(snd_config_update_r) hooks failed, removing configuration
2021-12-16 20-16-27.098 [Error] (Alsa) Exception: Can't open default, error: Permission denied, code: -13
2021-12-16 20-16-27.099 [Fatal] (Snapclient) Exception: Can't open default, error: Permission denied
2021-12-16 20-16-27.099 [Notice] (Snapclient) Snapclient terminated.
I'm trying to find a workaround, i'll edit this post laster or create a new issue.
Fix:
debian/snapclient.postinst
- adduser --system --quiet --group --home $HOMEDIR --no-create-home --force-badname $USERNAME
+ adduser --system --user-group --home $HOMEDIR --no-create-home --badname $USERNAME
debian/snapserver.postinst
- adduser --system --quiet --group --home $HOMEDIR --no-create-home --force-badname $USERNAME
+ adduser --system --user-group --home $HOMEDIR --no-create-home --badname $USERNAME
- adduser --quiet $USERNAME audio > /dev/null || true
+ usermod -aG pipewire $USERNAME > /dev/null || true
Hi, honestly, I want to remove the Makefile
s and switch completely to cmake
. The only reason for existence of the makefiles is the lack for a proper make install
target in the cmake build. The install
target is there, but it will only copy files and will not install users or systemd or initd related files, because this is target OS specific.
The only clean solution is to use packages. I've just moved the debian build scripts into the Snapos project, this would also be the place for RPM build scripts, any help is appreciated.
I found some old PRM spec here: https://github.com/karafior/snapcast/blob/fedora/packaging/rpm/f27/snapcast.spec. This could be a good starting point.
Long story short: Regarding your bug, I'm planning to remove the Makefiles.
Experimental Fedrora builds can be found in Snapos
The artifacts from the build (the rpms themselves) have expired. I'm giving it a shot at trying to reproduce the rpmbuild method locally.
did that work?