Closed jreusch closed 4 years ago
I do not know why there is a segmenation fault for the test call. It also fails for me on the current master.
I do not know why there is a segmenation fault for the test call. It also fails for me on the current master.
Should be fixed in #42
cool! i wonder how this ever got into master in the first place since the tests fail :) hope your's get merged soon, then i can rebase onto master.
btw: the bump in the debhelper/compat version needs to be to switch from init to systemd default. since this version is in buster i assume this as safe to do.
What was the reason for not being able to start snapcastc with the unit file?
snapcastc and snapcast are not compatible. Indeed the binaries should be renamed for clarity.
hey hey, i'm currently at a conference, when i'm @home i can give you more information on this.
on additional question: pr #42 was merged into the mixer branch, also it seems there is more activity going on there. is this the one which should be the target instead of master?
Hey hey, this is my journey to try it making it run:
snapcast-server[18748]: /usr/bin/snapcast-server: invalid option -- 'B' -> Deleted this option: --help does not specify it (anymore?)
Feb 02 13:38:47 mowbeil snapcast-server[19351]: no known protocol found when parsing input stream /tmp/snapfifo -> changed to (taken from the RADME.md -s "pipe:///tmp/snapfifo?buffer_ms=120&codec=opus&name=default&sampleformat=48000:16:2&timeout_ms=1000
-> seems to start successfully, but Type=notify -> no sd_notify signal sent -> startup fails
-> adding systemd headers does not help grepping codebase for sd_notify -> nothing? -> changed Type to simple(default)
server does still not start: snapcast-server[22334]: [54B blob data]
that's when i gave up for now, any advice?
snapcastc should be started with sd_simple.
Edit: I just ed this out: Type must not be notify. If it is, systemd will cyclicly re-start the service.
hm. After upgrading the OS of my raspberrypi I can confirm that your unit file indeed is working for the client and for the server.
Did you set up /etc/default/snapcastc?
This is what I have in there:
cat /etc/default/snapcastc SNAPCAST_SERVEROPTS="-s "pipe:///tmp/snapfifo?name=default&codec=opus&sampleformat=48000:16:2&buffer_ms=120" -b 30000 -p 1704" SNAPCAST_CLIENTOPTS="-s snapclient -m snapclient -H lappi.lan -p 1704"
The parameter of -H must resolve to the host running the snapcastc-server
hey hey thanks for the clarification, i'll do the adaptions this weekend i hope.
now it should be good for integration. still would opt for renaming the binaries, but most likely this is another PR :)
@jreusch There are two more questions I would like to ask: Do you want to rebase this pre-merge?
What would be a good place to state that the config lives in /etc/default/snapcastc and state that the hostname should be adjusted for the client in case the server is not running locally? The readme could work but maybe it could be a notification during install as well..?
rebase done.
for the other questions: hmm i do not know the packaging best practices in that area. tbh when i look at such things i have a peak into how it is started and there you would see it. maybe a section in the README.md and if this is too prominent (since this information is only interesting for debian deb deployments) maybe in the package readme itself? notifications during install i do not know, who reads them anyway? ;) maybe not a notification but a forced setting via debconf if you want to have it that prominent?
btw: also a small discepancy
$ snapcast-client --help
snapclient [-l | -H <servername> [...]
the $0 name seems to be wrong?
sorry, messed up with git fetch, now the rebase should look good. :)
Thank you your contribution
This PR takes the unit files written for #11 and shipps them with the debian package.
To be honest i did not manage to start snapcastc with those, it failed for me. But the general structure should do it, adapting the content is smaller change.
I also wanted to split up the package into two debian packages but skipped that, since i do not know (despite having found two manuals) how to do this with CMake.
Additional short questions: why are the binaries called snapcast-[server|client] and noch snapcastc like the rest of the package. do you intent to keep them protocol compatible ( i did not thought so?) to be a drop in replacement?
Also added a small helper script to actually build the debian package inside docker.