diff --git a/debian/README.source b/debian/README.source new file mode 100644 index 0000000..e69de29 diff --git a/debian/changelog b/debian/changelog new file mode 100644 index 0000000..047340d --- /dev/null +++ b/debian/changelog @@ -0,0 +1,573 @@ +snapcast (0.26.0-1) unstable; urgency=medium + + * Features + -Client: Disconnect from pulse when no audio is available (Issue #927, PR #931) + -Server: New Metadata API for audio streams (Issue #803, #953) + -Server: New Control API for audio streams (Issue #954) + -Server: Lowered minimum buffer from 400ms to 20ms (Issue #329) + + * Bugfixes + -Server: systemd.unit starts server after network-online (Issue #950) + + * General + -Update documentation (Issue #804, PR #945, PR #951) + -Snapweb: Update to v0.4.0 + + -- Johannes Pohl Wed, 22 Dec 2021 00:13:37 +0200 + +snapcast (0.25.0-1) unstable; urgency=medium + + * Features + -Client: Editable PulseAudio properties, e.g. media.role=music (Issue #829) + -Server: Configurable amplitute for silence detection in alsa stream (Issue #846) + + * Bugfixes + -Client: Fix crash on Windows when system volume changes (PR #838) + -Client: Removed a log message to stdout for file player backend (Issue #681) + -Server: Fix percent-decoding for stream URIs (Issue #850) + -Server: Fix double quotes in Airplay device names (Issue #851) + -Server: Fix crash when feeding a 16 bit signal into 24 bit flac (Issue #866) + + * General + -Server: less verbose librespot logging (Issue #874) + -Snapweb: Update to v0.3.0 + -Add unit tests to the project + + -- Johannes Pohl Sat, 15 May 2021 00:13:37 +0200 + +snapcast (0.24.0-1) unstable; urgency=medium + + * Features + -Client: Configurable server for Pulseaudio backend (Issue #779) + + * Bugfixes + -Client: Fix dropouts in alsa player backend (Issue #774) + -Client: Fix alsa player volume resetting to max (Issue #735) + -Client: Fix noise while muted for Pulseaudio (Issue #785) + -Client: Android support for opus readded (Issue #789) + -Client: Fix host id for MacBook Pro (later 2016) (Issue #807) + + * General + -Snapweb: Update to v0.2.0 + -Remove submodules with external libs from the git repository + -Write version and revision (git sha) to log + -Add documentation to the default files (Issue #791) + + -- Johannes Pohl Sat, 27 Feb 2021 00:13:37 +0200 + +snapcast (0.23.0-1) unstable; urgency=medium + + * Features + -Client: Add PulseAudio player backend (Issue #722) + -Client: Configurable buffer time for alsa and pulse players + -Server: If docroot is not configured, a default page is served (Issue #711) + -Server: airplay source supports "password" parameter (Issue #754) + + * Bugfixes + -Server: airplay source deletes Shairport's meta pipe on exit (Issue #672) + -Server: alsa source will not send silece when going idle (Issue #729) + -Server: Fix build error on FreeBSD (Issue #752) + -Server: pipe source will not send silence after 3h idle (Issue #741) + -Client: "make install" will set correct user/group for snapclient (Issue #728) + -Client: Fix printing UTF-8 device names on Windows (Issue #732) + -Client: Fix stuttering on alsa player backend (Issue #722, #727) + -Client: Terminate if host is not configured and mDNS is unavailable + + * General + -Server: Change librespot parameter "killall" default to false (Issue #746, #724) + -Client: Android uses performance mode "none" to allow effects (Issue #766) + -Snapweb: Update to v0.1.0 + -Build: Update CMakeLists.txt to build Snapclient on Android + + -- Johannes Pohl Sun, 10 Jan 2021 00:13:37 +0200 + +snapcast (0.22.0-1) unstable; urgency=medium + + * Features + -Server: Add Meta stream source (Issue #402, #569, #666) + -Client: Add file audio backend (Issue #681) + * Bugfixes + -Add missing define for alsa stream to makefile (Issue #692) + -Fix playback when plugging the headset on Android (Issue #699) + -Server discards old chunks if not consumed (Issue #708) + * General + -Less verbose logging during pipe reconnects (Issue #696) + -Add null encoder for streams used only as input for meta streams + -Snapweb: Change latency range to [-10s, 10s] (Issue #695) + -Update Snapweb, including PR #11, #12, #13, Issues #16, #17 + + -- Johannes Pohl Thu, 15 Oct 2020 00:13:37 +0200 + +snapcast (0.21.0-1) unstable; urgency=medium + + * Features + -Server: Support for WebSocket streaming clients + -Server: Install Snapweb web client (Issue #579) + -Server: Resample input to 48000:16:2 when using opus codec + -Server: Add Alsa stream source + * Bugfixes + -make install will setup the snapserver home dir (Issue #643) + -Client retries to open a blocked alsa device (Issue #652) + * General + -debian packag generation switched from make to CMake buildsystem + -Reintroduce MACOS define, hopefully not breaking anything on macOS + -Snapcast uses GitHub actions for automated CI/CD + -CMake installs man files (Issue #507) + -Update documentation (Issue #615, #617) + + -- Johannes Pohl Sun, 13 Sep 2020 00:13:37 +0200 + +snapcast (0.20.0-1) unstable; urgency=medium + + * Features + -Client: Windows support (Issue #24) + -Client: add hardware mixer (Issue #318) + -Client: add "script" and "none" mixer (Issue #302) + -Client: add sharingmode for audio device (if supported) + -Logging: configurable sink and filters (Issue #30, #561, #122, #559) + -Librespot: add option "disable-audio-cache=[false|true]" + * Bugfixes + -Fix build failure on FreeBSD (Issue #565) + -Fix calling lsb_release multiple times (Issue #470) + -Client: high CPU load and crash during playback (Issue #609, #628) + -Client: improved handling of USB audio disconnects (Issue #64) + -Client: latency is forgotten (Issue #476, #588, Snapdroid #11) + -Client: fix segfault on mac when playback is paused (Issue #560) + -Client: fix bonjour on mac reports empty IP (Issue #632) + -Client: fix buzzing tone on Android (Issue #23, #24) + -Server: fix crash if client disconnects during connect (Issue #639) + -Server: fix reading metadata from shairport-sync (Issue #624) + -Server: fix crash on FreeBSD if settings.json is empty (Issue #620) + -Server: fix warning about unknown command line options (Issue #635) + -Readme: openWrt documentation (Issue #633) + -Fix setting the daemon's process priority (PR #448) + * General + -Client: use less threads and thus less ressources + -Update links to xiph externals (Issue #637, PR #616) + + -- Johannes Pohl Sat, 13 Jun 2020 00:13:37 +0200 + +snapcast (0.19.0-1) unstable; urgency=medium + + * Features + -Option to not kill all running librespot instances (PR #539) + -Add Airplay cover art to metadata (PR #543) + -Anroid: add support for Oboe audio backend + -Server: configurable PID file (Issue #554) + -Server: configurable persistant storage directory (Issue #554) + -Server: config file options can be overwritten on command line + -Client: PCM stream can be resampled using the "--sampleformat" option + -Librespot: add option "autoplay=[false|true]" + * Bugfixes + -Fix Airplay metadata, port selection and device names (PR #537) + -Fix cmake build when libatomic is needed (PR #540) + -Control: fix random crash (PR #543) + * General + -ALSA: improved latency estimation for better sync + -Improved audio synchronization + -Faster initial sync after client start and reconnect + -Less playback tempo adaptions and jitter (Issue #525) + -Playback is robust against system time changes (Issue #522) + -Less "resyncs" in stream reader that were causing audio dropouts + -Control: quicker response to group volume changes + -Server uses less memory when sending PCM data to a stalled connection + + -- Johannes Pohl Sat, 14 Mar 2020 00:13:37 +0200 + +snapcast (0.18.1-1) unstable; urgency=medium + + * Bugfixes + -Fix random server crash or deadlock during stream client disconnect + -Fix random server crash or deadlock during control client disconnect + -Fix airplay stream buffer allocation (PR #536) + + -- Johannes Pohl Tue, 28 Jan 2020 00:13:37 +0200 + +snapcast (0.18.0-1) unstable; urgency=medium + + * Features + -Add TCP stream reader + -Configurable number of server worker threads + * Bugfixes + -Client: fix hostname reporting on Android + -Fix some small memory leaks + -Fix Librespot stream causing zombie processes (Issue #530) + -Process stream watchdog is configurable (Issue #517) + -Fix Makefile for macOS (Issues #510, #514) + * General + -Refactored stream readers + -Server can run on a single thread + + -- Johannes Pohl Wed, 22 Jan 2020 00:13:37 +0200 + +snapcast (0.17.1-1) unstable; urgency=medium + + * Bugfixes + -Fix compile error if u_char is not defined (Issue #506) + -Fix error "exception unknown codec ogg" (Issue #504) + -Fix random crash during client disconnect + + -- Johannes Pohl Sat, 23 Nov 2019 00:13:37 +0200 + +snapcast (0.17.0-1) unstable; urgency=medium + + * Features + -Support for Opus low-latency codec (PR #4) + * Bugfixes + -CMake: fix check for libatomic (Issue #490, PR #494) + -WebUI: interface.html uses the server's IP for the websocket connection + -Fix warnings (Issue #484) + -Fix lock order inversions and data races identified by thread sanitizer + -Makefiles: fix install targets (PR #493) + -Makefiles: LDFLAGS are added from environment (PR #492) + -CMake: required Boost version is raised to 1.70 (Issue #488) + -Fix crash in websocket server + * General + -Stream server uses less threads (one in total, instead of 1+2n) + -Changing group volume is much more responsive for larger groups + -Unknown snapserver.conf options are logged as warning (Issue #487) + -debian scripts: change usernames back to snapclient and snapserver + + -- Johannes Pohl Wed, 20 Nov 2019 00:13:37 +0200 + +snapcast (0.16.0-1) unstable; urgency=medium + + * Features + -Control server: websocket support for JSON RPC + -Control server: simple webserver integrated to host web UIs + -Control server: bind-to addresses are configurable + -Control server: streams can be added and Removed (PR #443) + -Control server: group names can be changed (PR #467) + -Librespot: add onevent parameter (PR #465) + * Bugfixes + -Fix build on macOS (Issue #474) + * General + -Control server uses less threads (one in total, instead of 1+2n) + -Snapserver: Configuration is moved into a file + -Removed submodules "popl" and "aixlog" to ease build + -Snapcast depends on boost::asio and boost::beast (header only) + -Tidy up code base + -Makefile doesn't statically link libgcc and libstdc++ + + -- Johannes Pohl Tue, 15 Oct 2019 00:13:37 +0200 + +snapcast (0.15.0) unstable; urgency=low + + * Bugfixes + -Snapclient: make systemd dependeny to avahi-daemon optional + -cmake: fix build on FreeBSD + -Snapserver: fix occasional deadlock + * General + -additional linker flags "ADD_LDFLAGS" can be passed to makefile + -update man pages, fix lintian warning + -Support Android NDK r17 + + -- Johannes Pohl Sat, 07 Jul 2018 00:13:37 +0200 + +snapcast (0.14.0) unstable; urgency=low + + * Features + -Snapserver supports IPv4v6 dual stack and IPv4 + IPv6 + * Bugfixes + -cmake: fix check for big endian (Issue #367) + -cmake: fix linking against libatomic (PR #368) + -Snapclient compiles with Android NDK API level 16 (Issue #365) + -Fix compilation errors on FreeBSD (Issue #374, PR #375) + * General + -cmake: make dependency on avahi optional (PR #378) + -cmake: Options to build snapserver and snapclient + -cmake: works on FreeBSD + -Update external libs (JSON for modern C++, ASIO, AixLog) + -Restructured source tree + -Moved Android app into separate project "snapdroid" + + -- Johannes Pohl Fri, 27 Apr 2018 00:13:37 +0200 + +snapcast (0.13.0) unstable; urgency=low + + * Features + -Support "volume" parameter for Librespot (PR #273) + -Add support for metatags (PR #319) + * Bugfixes + -Fix overflow in timesync when the system time is many years off + -Zeroconf works with IPv6 + -Snapclient unit file depends on avahi-daemon.service (PR #348) + * General + -Drop dependency to external "jsonrpc++" + -Move OpenWrt and Buildroot support into separate project "SnapOS" + -Add CMake support (not fully replacing Make yet) (PR #212) + -Remove MIPS support for Android (deprecated by Google) + -Use MAC address as default client id (override with "--hostID") + + -- Johannes Pohl Tue, 04 Mar 2018 00:13:37 +0200 + +snapcast (0.12.0) unstable; urgency=low + + * Features + -Support for IPv6 (PR #273, #279) + -Spotify plugin: onstart and onstop parameter (PR #225) + -Snapclient: configurable client id (Issue #249) + -Android: Snapclient support for ARM, MIPS and X86 + -Snapserver: Play some silence before going idle (PR #284) + * Bugfixes + -Fix linker error (Issue #255, #274) + -Snapclient: more reliable unique client id (Issue #249, #246) + -Snapserver: fix config file permissions (Issue #251) + -Snapserver: fix crash on "bye" from control client (Issue #238) + -Snapserver: fix crash on port scan (Issue #267) + -Snapserver: fix crash when a malformed message is received (Issue #264) + * General + -Improved logging: Use "--debug" for debug logging + -Log to file: Use "--debug=" + -Improved exception handling and error logging (Issue #276) + -Android: update to NDK r16 and clang++ + -hide spotify credentials in json control message (Issue #282) + + -- Johannes Pohl Tue, 17 Oct 2017 00:13:37 +0200 + +snapcast (0.11.1) unstable; urgency=low + + * Bugfixes + -Snapserver produces high CPU load on some systems (Issue #174) + -Snapserver compile error on FreeBSD + * General + -Updated Markdown files (PR #216, #218) + + -- Johannes Pohl Tue, 21 Mar 2017 00:13:37 +0200 + +snapcast (0.11.0) unstable; urgency=low + + * Features + -Don't send audio to muted clients (Issue #109, #150) + * Bugfixes + -Compilation error on recent GCC versions (Issues #146, #170) + -Crash when frequently connecting to the control port (Issue #200) + -Snapcast App crashes on Android 4.x (Issue #207) + + -- Johannes Pohl Thu, 16 Mar 2017 00:13:37 +0200 + +snapcast (0.11.0~beta-1) unstable; urgency=low + + * Features + -Snapclient multi-instance support (Issue #73) + -daemon can run as different user (default: snapclient, Issue #89) + -Spotify plugin does not require username and password (PR #181) + -Spotify plugin is compatible to librespot's pipe backend (PR #158) + -Clients are organized in Groups + -JSON RPC API supports batch requests + * Bugfixes + -Resync issue on macOS (Issue #156) + -Id in JSON RPC API can be String, Number or NULL (Issue #161) + -Use "which" instead of "whereis" to find binaries (PR #196, Issue #185) + -Compiles on lede (Issue #203) + * General + -JSON RPC API is versionized (current version is 2.0.0) + -Restructured Android App to support Groups + + -- Johannes Pohl Sat, 04 Mar 2017 00:13:37 +0200 + +snapcast (0.10.0) unstable; urgency=low + + * Features + -Added support "process" streams: + Snapserver starts a process and reads PCM data from stdout + -Specialized versions for Spotify "spotify" and AirPlay "airplay" + * Bugfixes + -Fixed crash during server shutdown + -Fixed Makefile for FreeBSD + -Fixed building of dpk (unsigned .changes file) + * General + -Speed up client and server shutdown + + -- Johannes Pohl Wed, 16 Nov 2016 00:13:37 +0200 + +snapcast (0.9.0) unstable; urgency=low + + * Features + -Added (experimental) support for macOS (make TARGET=MACOS) + * Bugfixes + -Android client: Fixed crash on Nougat (Issue #97) + -Fixed FreeBSD compile error for Snapserver (Issue #107) + -Snapserver randomly dropped JSON control messages + -Long command line options (like --sampleformat) + didn't work on some systems (Issue #103) + * General + -Updated Android NDK to revision 13 + + -- Johannes Pohl Sat, 22 Oct 2016 00:13:37 +0200 + +snapcast (0.8.0) unstable; urgency=low + + * Features + -Added support for FreeBSD (Issue #67) + -Android client: Added Japanese and German translation + -Android client: Added support for ogg (Issue #83) + * Bugfixes + -OpenWRT: makefile automatically sets correct endian (Issue #91) + + -- Johannes Pohl Sun, 24 Jul 2016 00:13:37 +0200 + +snapcast (0.7.0) unstable; urgency=low + + * Features + -Support for HiRes audio (e.g. 96000:24:2) (Issue #13) + Bitdepth must be one of 8, 16, 24 (=24 bit padded to 32) or 32 + -Auto start option for Android (Issue #49) + -creation mode for the fifo can be configured (Issue #52) + "-s pipe:///tmp/snapfifo?mode=[read|create]" + * Bugfixes + -Server was sometimes crashing during shutdown + -Exceptions were not properly logged (e.g. unsupported sample rates) + -Fixed default sound card detection on OpenWrt + + -- Johannes Pohl Sat, 07 May 2016 00:13:37 +0200 + +snapcast (0.6.0) unstable; urgency=low + + * Features + -Port to OpenWrt + * Bugfixes + -Android client: fixed crash if more than two streams are active + * General + -Support Tremor, an integer only Ogg-Vorbis implementation + -Endian-independent code + -Cleaned up build process + + -- Johannes Pohl Sun, 10 Apr 2016 00:02:00 +0200 + +snapcast (0.5.0) unstable; urgency=low + + * Features + -Android client: Fast switching of clients between streams + * Bugfixes + -Server: Fixed reading of server.json config file + * General + -Source code cleanups + + -- Johannes Pohl Fri, 25 Mar 2016 00:02:00 +0200 + +snapcast (0.5.0~beta-2) unstable; urgency=low + + * Features + -Remote control API (JSON) + Added version information + Stream playing state (unknown, idle, playing, inactive) (Issue #34) + -Android client: manually configure snapserver host name + -Android client compatibility improved: armeabi and armeabi-v7 binaries + -Android client: configurable latency + -Improved compatibility to Mopidy (GStreamer) (Issue #23) + * Bugfixes + -Android client: fixed "hide offline" on start + -Store config in /var/lib/snapcast/ when running as daemon (Issue #33) + * General + -README.md: Added resampling command to the Mopidy section (Issue #32) + + -- Johannes Pohl Wed, 09 Mar 2016 00:02:00 +0200 + +snapcast (0.5.0~beta-1) unstable; urgency=low + + * Features + -Remote control API (JSON) + Get server status, get streams, get active clients + assign volume, assign stream, rename client, ... + -Android port of the Snapclient with a remote control app (Issue #9) + -Multiple streams ("zones") can be configured (Issue #21) + Use "-s, --stream" to add a stream URI: path, name, codec, sample format + E.g. "pipe:///tmp/snapfifo?name=Radio&sampleformat=48000:16:2&codec=flac" + or "file:///home/user/some_pcm_file.wav?name=file" + -Added .default file for the service (/etc/default/snapserver). + Default program options should be configured here (e.g. streams) + * Bugfixes + -pipe reader recovers if the pipe has been reopened + * General + -SnapCast is renamed to Snapcast + SnapClient => Snapclient + SnapServer => Snapserver + -Snapcast protocol: + Less messaging: SampleFormat, Command, Ack, String, not yet final + -Removed dependency to boost + + -- Johannes Pohl Tue, 09 Feb 2016 13:25:00 +0200 + +snapcast (0.4.1) unstable; urgency=low + + * General + -Debian packages (.deb) are linked statically against libgcc and libstdc++ + to improve compatibility + + -- Johannes Pohl Sat, 12 Mar 2016 12:00:00 +0200 + +snapcast (0.4.0) unstable; urgency=low + + * Features + -Debian packages (.deb) for amd64 and armhf + -Added man pages + * Bugfixes + -Snapserver and Snapclient are started as daemon on systemd systems + (e.g. ARCH, Debian Jessie) + * General + -Snapserver is started with normal process priority + (changed nice from -3 to 0) + + -- Johannes Pohl Mon, 28 Dec 2015 12:00:00 +0200 + +snapcast (0.3.4) unstable; urgency=low + + * Bugfixes + -Fix synchronization bug in FLAC decoder that could cause audible dropouts + + -- Johannes Pohl Wed, 23 Dec 2015 12:00:00 +0200 + +snapcast (0.3.3) unstable; urgency=low + + * Bugfixes + -Fix Segfault when ALSA device has no description + + -- Johannes Pohl Sun, 15 Nov 2015 12:00:00 +0200 + +snapcast (0.3.2) unstable; urgency=low + + * General + -Makefile uses CXX instead of CC to invoke the c++ compiler + * Bugfixes + -Time calculation for PCM chunk play-out was wrong on some gcc versions + + -- Johannes Pohl Wed, 30 Sep 2015 12:00:00 +0200 + +snapcast (0.3.1) unstable; urgency=low + + * General + -Improved stability over WiFi by avoiding simultaneous reads/writes on the + socket connection + * Bugfixes + -Fixed a bug in avahi browser + + -- Johannes Pohl Wed, 26 Aug 2015 12:00:00 +0200 + +snapcast (0.3.0) unstable; urgency=low + + * Features + -Configurable codec options. Run snapserver -c [flac|ogg|pcm]:? to get + supported options for the codec + -Configurable buffer size for the pipe reader + (default 20ms, was 50ms before) + -Process priority can be changed as argument to the daemon option -d + Default priority is -3 + * Bugfixes + -Fixed deadlock in logger + -Fixed occasional timeouts for client to server requests + (e.g. time sync commands) + -Client didn't connect to a local server if the loopback device is the only + device with an address + * General + -Code clean up + -Refactored encoding for lower latency + + -- Johannes Pohl Sun, 16 Aug 2015 19:25:51 +0100 + +snapcast (0.2.1) unstable; urgency=low + + * Features + -Arch Linux compatibility + + -- Johannes Pohl Fri, 24 Jul 2015 15:47:00 +0100 diff --git a/debian/compat b/debian/compat new file mode 100644 index 0000000..f599e28 --- /dev/null +++ b/debian/compat @@ -0,0 +1 @@ +10 diff --git a/debian/control b/debian/control new file mode 100644 index 0000000..97ce167 --- /dev/null +++ b/debian/control @@ -0,0 +1,45 @@ +Source: snapcast +Section: sound +Priority: optional +Maintainer: Johannes Pohl +Build-Depends: debhelper (>= 10~), + libasound2-dev, + libpulse-dev, + libvorbis-dev, + libflac-dev, + libopus-dev, + libavahi-client-dev, + libasio-dev, + libsoxr-dev +Standards-Version: 4.1.4 +Homepage: https://github.com/badaix/snapcast +Vcs-Git: https://salsa.debian.org/debian/snapcast.git +Vcs-Browser: https://salsa.debian.org/debian/snapcast + +Package: snapclient +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends}, adduser +Recommends: avahi-daemon +Description: Snapcast client + Snapcast is a multiroom client-server audio player, where all clients are + time synchronized with the server to play perfectly synced audio. It's not a + standalone player, but an extension that turns your existing audio player into + a Sonos-like multiroom solution. + . + This package contains the client which connects to the server and plays the + audio. + +Package: snapserver +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends}, adduser +Recommends: avahi-daemon +Description: Snapcast server + Snapcast is a multiroom client-server audio player, where all clients are + time synchronized with the server to play perfectly synced audio. It's not a + standalone player, but an extension that turns your existing audio player into + a Sonos-like multiroom solution. + . + The server's audio input is a named pipe `/tmp/snapfifo`. All data that is fed + into this file will be send to the connected clients. One of the most generic + ways to use Snapcast is in conjunction with the music player daemon or Mopidy, + which can be configured to use a named pipe as audio output. diff --git a/debian/copyright b/debian/copyright new file mode 100644 index 0000000..e8b20de --- /dev/null +++ b/debian/copyright @@ -0,0 +1,109 @@ +Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Name: Snapcast +Upstream-Contact: Johannes Pohl +Source: https://github.com/badaix/snapcast + +Files: * +Copyright: 2014-2021 Johannes Pohl +License: GPL-3+ + +Files: client/browseZeroConf/browseAvahi.cpp + server/publishZeroConf/publishAvahi.cpp +Copyright: avahi developers +License: LGPL-2.1+ + +Files: server/streamreader/base64.* +Copyright: 2004-2008 René Nyffenegger +License: Zlib + +Files: common/json.hpp +Copyright: 2013-2021 Niels Lohmann + 2009 Florian Loitsch +License: Expat + +Files: common/aixlog.hpp + common/popl.hpp + server/jsonrpcpp.hpp +Copyright: 2015-2019 Johannes Pohl +License: Expat + +Files: debian/* +Copyright: 2018 Felix Geyer + 2014-2018 Johannes Pohl +License: GPL-3+ + +License: GPL-3+ + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + . + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + . + You should have received a copy of the GNU General Public License + along with this program. If not, see . + . + On Debian systems, the full text of the GNU General Public + License version 2 can be found in the file + `/usr/share/common-licenses/GPL-3'. + +License: LGPL-2.1+ + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. + . + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + . + You should have received a copy of the GNU Lesser General Public + License along with This program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 + USA. + . + On Debian systems, the full text of the GNU General Public + License version 2 can be found in the file + `/usr/share/common-licenses/LGPL-2.1'. + +License: Zlib + This source code is provided 'as-is', without any express or implied + warranty. In no event will the author be held liable for any damages + arising from the use of this software. + . + Permission is granted to anyone to use this software for any purpose, + including commercial applications, and to alter it and redistribute it + freely, subject to the following restrictions: + . + 1. The origin of this source code must not be misrepresented; you must not + claim that you wrote the original source code. If you use this source code + in a product, an acknowledgment in the product documentation would be + appreciated but is not required. + . + 2. Altered source versions must be plainly marked as such, and must not be + misrepresented as being the original source code. + . + 3. This notice may not be removed or altered from any source distribution. + +License: Expat + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + . + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + . + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE. diff --git a/debian/rules b/debian/rules new file mode 100755 index 0000000..fc95c50 --- /dev/null +++ b/debian/rules @@ -0,0 +1,14 @@ +#!/usr/bin/make -f + +export DEB_BUILD_MAINT_OPTIONS = hardening=+all +export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed +include /usr/share/dpkg/buildflags.mk + +%: + dh $@ --buildsystem=cmake + +override_dh_auto_configure: + dh_auto_configure -- $(CMAKEFLAGS) + +#override_dh_auto_build: +# dh_auto_build -- STRIP=: DEBUG= ADD_CFLAGS="$(CXXFLAGS) $(CPPFLAGS)" ADD_LDFLAGS="$(LDFLAGS)" diff --git a/debian/snapclient.default b/debian/snapclient.default new file mode 100644 index 0000000..17b43c4 --- /dev/null +++ b/debian/snapclient.default @@ -0,0 +1,7 @@ +# Start the client, used only by the init.d script +START_SNAPCLIENT=true + +# Additional command line options that will be passed to snapclient +# note that user/group should be configured in the init.d script or the systemd unit file +# For a list of available options, invoke "snapclient --help" +SNAPCLIENT_OPTS="" diff --git a/debian/snapclient.init b/debian/snapclient.init new file mode 100755 index 0000000..062eeab --- /dev/null +++ b/debian/snapclient.init @@ -0,0 +1,162 @@ +#! /bin/sh +### BEGIN INIT INFO +# Provides: snapclient +# Required-Start: $remote_fs $syslog $network +# Required-Stop: $remote_fs $syslog $network +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Short-Description: Snapclient initscript +# Description: Snapclient - Snapcast client +### END INIT INFO + +# Author: Johannes Pohl + +# Do NOT "set -e" + +PATH=/sbin:/usr/sbin:/bin:/usr/bin +DESC="Snapcast client" +NAME=snapclient +USERNAME=snapclient +DAEMON=/usr/bin/$NAME +PIDFILE=/var/run/$NAME/pid +SCRIPTNAME=/etc/init.d/$NAME + +# Exit if the package is not installed +[ -x "$DAEMON" ] || exit 0 + +# Read configuration variable file if it is present +[ -r /etc/default/$NAME ] && . /etc/default/$NAME +SNAPCLIENT_OPTS="--daemon --logsink=system --user $USERNAME:$USERNAME $SNAPCLIENT_OPTS" + +if [ "$START_SNAPCLIENT" != "true" ] ; then + exit 0 +fi + +# Load the VERBOSE setting and other rcS variables +. /lib/init/vars.sh + +# Define LSB log_* functions. +# Depend on lsb-base (>= 3.2-14) to ensure that this file is present +# and status_of_proc is working. +. /lib/lsb/init-functions + +# +# Function that starts the daemon/service +# +do_start() +{ + PIDDIR=$(dirname "$PIDFILE") + if [ ! -d "$PIDDIR" ]; then + mkdir -m 0755 $PIDDIR + chown $USERNAME:$USERNAME $PIDDIR + fi + + # Return + # 0 if daemon has been started + # 1 if daemon was already running + # 2 if daemon could not be started + start-stop-daemon --start --quiet --pidfile "$PIDFILE" --chuid "$USERNAME:$USERNAME" --exec "$DAEMON" --test > /dev/null || return 1 + start-stop-daemon --start --quiet --pidfile "$PIDFILE" --chuid "$USERNAME:$USERNAME" --exec "$DAEMON" -- $SNAPCLIENT_OPTS > /dev/null || return 2 + # Add code here, if necessary, that waits for the process to be ready + # to handle requests from services started subsequently which depend + # on this one. As a last resort, sleep for some time. +} + +# +# Function that stops the daemon/service +# +do_stop() +{ + # Return + # 0 if daemon has been stopped + # 1 if daemon was already stopped + # 2 if daemon could not be stopped + # other if a failure occurred + start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 --pidfile $PIDFILE --name $NAME + RETVAL="$?" + [ "$RETVAL" = 2 ] && return 2 + # Wait for children to finish too if this is a daemon that forks + # and if the daemon is only ever run from this initscript. + # If the above conditions are not satisfied then add some other code + # that waits for the process to drop all resources that could be + # needed by services started subsequently. A last resort is to + # sleep for some time. + start-stop-daemon --stop --quiet --oknodo --retry=0/30/KILL/5 --exec $DAEMON + [ "$?" = 2 ] && return 2 + # Many daemons don't delete their pidfiles when they exit. + rm -f $PIDFILE + return "$RETVAL" +} + +# +# Function that sends a SIGHUP to the daemon/service +# +do_reload() { + # + # If the daemon can reload its configuration without + # restarting (for example, when it is sent a SIGHUP), + # then implement that here. + # + start-stop-daemon --stop --signal 1 --quiet --pidfile $PIDFILE --name $NAME + return 0 +} + +case "$1" in + start) + [ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC" "$NAME" + do_start + case "$?" in + 0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;; + 2) [ "$VERBOSE" != no ] && log_end_msg 1 ;; + esac + ;; + stop) + [ "$VERBOSE" != no ] && log_daemon_msg "Stopping $DESC" "$NAME" + do_stop + case "$?" in + 0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;; + 2) [ "$VERBOSE" != no ] && log_end_msg 1 ;; + esac + ;; + status) + status_of_proc "$DAEMON" "$NAME" && exit 0 || exit $? + ;; + #reload|force-reload) + # + # If do_reload() is not implemented then leave this commented out + # and leave 'force-reload' as an alias for 'restart'. + # + #log_daemon_msg "Reloading $DESC" "$NAME" + #do_reload + #log_end_msg $? + #;; + restart|force-reload) + # + # If the "reload" option is implemented then remove the + # 'force-reload' alias + # + log_daemon_msg "Restarting $DESC" "$NAME" + do_stop + case "$?" in + 0|1) + do_start + case "$?" in + 0) log_end_msg 0 ;; + 1) log_end_msg 1 ;; # Old process is still running + *) log_end_msg 1 ;; # Failed to start + esac + ;; + *) + # Failed to stop + log_end_msg 1 + ;; + esac + ;; + *) + #echo "Usage: $SCRIPTNAME {start|stop|restart|reload|force-reload}" >&2 + echo "Usage: $SCRIPTNAME {start|stop|status|restart|force-reload}" >&2 + exit 3 + ;; +esac + +: diff --git a/debian/snapclient.install b/debian/snapclient.install new file mode 100644 index 0000000..81d57c5 --- /dev/null +++ b/debian/snapclient.install @@ -0,0 +1,2 @@ +usr/bin/snapclient usr/bin/ +usr/share/pixmaps/snapcast.svg usr/share/pixmaps/ \ No newline at end of file diff --git a/debian/snapclient.manpages b/debian/snapclient.manpages new file mode 100644 index 0000000..c2d3cb4 --- /dev/null +++ b/debian/snapclient.manpages @@ -0,0 +1 @@ +client/snapclient.1 \ No newline at end of file diff --git a/debian/snapclient.postinst b/debian/snapclient.postinst new file mode 100644 index 0000000..63af8ed --- /dev/null +++ b/debian/snapclient.postinst @@ -0,0 +1,20 @@ +#!/bin/sh + +set -e + +USERNAME=snapclient +HOMEDIR=/var/lib/snapclient + +if [ "$1" = configure ]; then + if ! getent passwd $USERNAME >/dev/null; then + adduser --system --quiet --group --home $HOMEDIR --no-create-home --force-badname $USERNAME + adduser $USERNAME audio + fi + + if [ ! -d $HOMEDIR ]; then + mkdir -m 0750 $HOMEDIR + chown $USERNAME:$USERNAME $HOMEDIR + fi +fi + +#DEBHELPER# diff --git a/debian/snapclient.postrm b/debian/snapclient.postrm new file mode 100644 index 0000000..1f81c74 --- /dev/null +++ b/debian/snapclient.postrm @@ -0,0 +1,18 @@ +#!/bin/sh + +set -e + +#DEBHELPER# + +USERNAME=snapclient +HOMEDIR=/var/lib/snapclient + +if [ "$1" = "purge" ]; then + rm -r $HOMEDIR + + if [ -x "$(command -v deluser)" ]; then + deluser --quiet --system $USERNAME > /dev/null || true + else + echo >&2 "not removing $USERNAME system account because deluser command was not found" + fi +fi diff --git a/debian/snapclient.service b/debian/snapclient.service new file mode 100644 index 0000000..447d29e --- /dev/null +++ b/debian/snapclient.service @@ -0,0 +1,15 @@ +[Unit] +Description=Snapcast client +Documentation=man:snapclient(1) +Wants=avahi-daemon.service +After=network-online.target time-sync.target sound.target avahi-daemon.service + +[Service] +EnvironmentFile=-/etc/default/snapclient +ExecStart=/usr/bin/snapclient --logsink=system $SNAPCLIENT_OPTS +User=snapclient +Group=snapclient +Restart=on-failure + +[Install] +WantedBy=multi-user.target diff --git a/debian/snapserver.default b/debian/snapserver.default new file mode 100644 index 0000000..3b1779e --- /dev/null +++ b/debian/snapserver.default @@ -0,0 +1,7 @@ +# Start the server, used only by the init.d script +START_SNAPSERVER=true + +# Additional command line options that will be passed to snapserver +# note that user/group should be configured in the init.d script or the systemd unit file +# For a list of available options, invoke "snapserver --help" +SNAPSERVER_OPTS="" diff --git a/debian/snapserver.docs b/debian/snapserver.docs new file mode 100644 index 0000000..793893f --- /dev/null +++ b/debian/snapserver.docs @@ -0,0 +1,2 @@ +README.md +doc/player_setup.md diff --git a/debian/snapserver.init b/debian/snapserver.init new file mode 100755 index 0000000..be95018 --- /dev/null +++ b/debian/snapserver.init @@ -0,0 +1,162 @@ +#! /bin/sh +### BEGIN INIT INFO +# Provides: snapserver +# Required-Start: $remote_fs $syslog $network +# Required-Stop: $remote_fs $syslog $network +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Short-Description: Snapserver initscript +# Description: Snapserver - Snapcast server +### END INIT INFO + +# Author: Johannes Pohl + +# Do NOT "set -e" + +PATH=/sbin:/usr/sbin:/bin:/usr/bin +DESC="Snapcast server" +NAME=snapserver +USERNAME=snapserver +DAEMON=/usr/bin/$NAME +PIDFILE=/var/run/$NAME/pid +SCRIPTNAME=/etc/init.d/$NAME + +# Exit if the package is not installed +[ -x "$DAEMON" ] || exit 0 + +# Read configuration variable file if it is present +[ -r /etc/default/$NAME ] && . /etc/default/$NAME +SNAPSERVER_OPTS="--daemon --logging.sink=system --server.datadir=$USERNAME $SNAPSERVER_OPTS" + +if [ "$START_SNAPSERVER" != "true" ] ; then + exit 0 +fi + +# Load the VERBOSE setting and other rcS variables +. /lib/init/vars.sh + +# Define LSB log_* functions. +# Depend on lsb-base (>= 3.2-14) to ensure that this file is present +# and status_of_proc is working. +. /lib/lsb/init-functions + +# +# Function that starts the daemon/service +# +do_start() +{ + PIDDIR=$(dirname "$PIDFILE") + if [ ! -d "$PIDDIR" ]; then + mkdir -m 0755 $PIDDIR + chown $USERNAME:$USERNAME $PIDDIR + fi + + # Return + # 0 if daemon has been started + # 1 if daemon was already running + # 2 if daemon could not be started + start-stop-daemon --start --quiet --pidfile "$PIDFILE" --chuid "$USERNAME:$USERNAME" --exec "$DAEMON" --test > /dev/null || return 1 + start-stop-daemon --start --quiet --pidfile "$PIDFILE" --chuid "$USERNAME:$USERNAME" --exec "$DAEMON" -- $SNAPSERVER_OPTS || return 2 + # Add code here, if necessary, that waits for the process to be ready + # to handle requests from services started subsequently which depend + # on this one. As a last resort, sleep for some time. +} + +# +# Function that stops the daemon/service +# +do_stop() +{ + # Return + # 0 if daemon has been stopped + # 1 if daemon was already stopped + # 2 if daemon could not be stopped + # other if a failure occurred + start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 --pidfile $PIDFILE --name $NAME + RETVAL="$?" + [ "$RETVAL" = 2 ] && return 2 + # Wait for children to finish too if this is a daemon that forks + # and if the daemon is only ever run from this initscript. + # If the above conditions are not satisfied then add some other code + # that waits for the process to drop all resources that could be + # needed by services started subsequently. A last resort is to + # sleep for some time. + start-stop-daemon --stop --quiet --oknodo --retry=0/30/KILL/5 --exec $DAEMON + [ "$?" = 2 ] && return 2 + # Many daemons don't delete their pidfiles when they exit. + rm -f $PIDFILE + return "$RETVAL" +} + +# +# Function that sends a SIGHUP to the daemon/service +# +do_reload() { + # + # If the daemon can reload its configuration without + # restarting (for example, when it is sent a SIGHUP), + # then implement that here. + # + start-stop-daemon --stop --signal 1 --quiet --pidfile $PIDFILE --name $NAME + return 0 +} + +case "$1" in + start) + [ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC" "$NAME" + do_start + case "$?" in + 0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;; + 2) [ "$VERBOSE" != no ] && log_end_msg 1 ;; + esac + ;; + stop) + [ "$VERBOSE" != no ] && log_daemon_msg "Stopping $DESC" "$NAME" + do_stop + case "$?" in + 0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;; + 2) [ "$VERBOSE" != no ] && log_end_msg 1 ;; + esac + ;; + status) + status_of_proc "$DAEMON" "$NAME" && exit 0 || exit $? + ;; + #reload|force-reload) + # + # If do_reload() is not implemented then leave this commented out + # and leave 'force-reload' as an alias for 'restart'. + # + #log_daemon_msg "Reloading $DESC" "$NAME" + #do_reload + #log_end_msg $? + #;; + restart|force-reload) + # + # If the "reload" option is implemented then remove the + # 'force-reload' alias + # + log_daemon_msg "Restarting $DESC" "$NAME" + do_stop + case "$?" in + 0|1) + do_start + case "$?" in + 0) log_end_msg 0 ;; + 1) log_end_msg 1 ;; # Old process is still running + *) log_end_msg 1 ;; # Failed to start + esac + ;; + *) + # Failed to stop + log_end_msg 1 + ;; + esac + ;; + *) + #echo "Usage: $SCRIPTNAME {start|stop|restart|reload|force-reload}" >&2 + echo "Usage: $SCRIPTNAME {start|stop|status|restart|force-reload}" >&2 + exit 3 + ;; +esac + +: diff --git a/debian/snapserver.install b/debian/snapserver.install new file mode 100644 index 0000000..6a857f5 --- /dev/null +++ b/debian/snapserver.install @@ -0,0 +1,3 @@ +usr/bin/snapserver usr/bin/ +usr/share/snapserver usr/share/ +server/etc/snapserver.conf etc/ \ No newline at end of file diff --git a/debian/snapserver.manpages b/debian/snapserver.manpages new file mode 100644 index 0000000..52cd622 --- /dev/null +++ b/debian/snapserver.manpages @@ -0,0 +1 @@ +server/snapserver.1 \ No newline at end of file diff --git a/debian/snapserver.postinst b/debian/snapserver.postinst new file mode 100644 index 0000000..0f38a94 --- /dev/null +++ b/debian/snapserver.postinst @@ -0,0 +1,21 @@ +#!/bin/sh + +set -e + +USERNAME=snapserver +HOMEDIR=/var/lib/snapserver + +if [ "$1" = configure ]; then + if ! getent passwd $USERNAME >/dev/null; then + adduser --system --quiet --group --home $HOMEDIR --no-create-home --force-badname $USERNAME + # adduser $USERNAME audio + fi + adduser --quiet $USERNAME audio > /dev/null || true + + if [ ! -d $HOMEDIR ]; then + mkdir -m 0750 $HOMEDIR + chown $USERNAME:$USERNAME $HOMEDIR + fi +fi + +#DEBHELPER# diff --git a/debian/snapserver.postrm b/debian/snapserver.postrm new file mode 100644 index 0000000..904859f --- /dev/null +++ b/debian/snapserver.postrm @@ -0,0 +1,18 @@ +#!/bin/sh + +set -e + +#DEBHELPER# + +USERNAME=snapserver +HOMEDIR=/var/lib/snapserver + +if [ "$1" = "purge" ]; then + rm -rf $HOMEDIR + + if [ -x "$(command -v deluser)" ]; then + deluser --quiet --system $USERNAME > /dev/null || true + else + echo >&2 "not removing $USERNAME system account because deluser command was not found" + fi +fi diff --git a/debian/snapserver.service b/debian/snapserver.service new file mode 100644 index 0000000..3a87062 --- /dev/null +++ b/debian/snapserver.service @@ -0,0 +1,15 @@ +[Unit] +Description=Snapcast server +Documentation=man:snapserver(1) +Wants=avahi-daemon.service +After=network-online.target time-sync.target avahi-daemon.service + +[Service] +EnvironmentFile=-/etc/default/snapserver +ExecStart=/usr/bin/snapserver --logging.sink=system --server.datadir=${HOME} $SNAPSERVER_OPTS +User=snapserver +Group=snapserver +Restart=on-failure + +[Install] +WantedBy=multi-user.target diff --git a/debian/source/format b/debian/source/format new file mode 100644 index 0000000..163aaf8 --- /dev/null +++ b/debian/source/format @@ -0,0 +1 @@ +3.0 (quilt) diff --git a/debian/source/local-options b/debian/source/local-options new file mode 100644 index 0000000..9cdfca9 --- /dev/null +++ b/debian/source/local-options @@ -0,0 +1,2 @@ +unapply-patches +abort-on-upstream-changes diff --git a/debian/watch b/debian/watch new file mode 100644 index 0000000..d44dca1 --- /dev/null +++ b/debian/watch @@ -0,0 +1,3 @@ +version=4 +opts=filenamemangle=s/.+\/v?(\d\S+)\.tar\.gz/snapcast-$1\.tar\.gz/ \ + https://github.com/badaix/snapcast/tags .*/v?(\d\S+)\.tar\.gz