pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/audio/shairport-sync



Module Name:    pkgsrc
Committed By:   schmonz
Date:           Tue Aug  5 19:33:02 UTC 2025

Modified Files:
        pkgsrc/audio/shairport-sync: Makefile PLIST distinfo
        pkgsrc/audio/shairport-sync/files: shairport-sync.sh
        pkgsrc/audio/shairport-sync/patches: patch-audio.c patch-shairport.c
Removed Files:
        pkgsrc/audio/shairport-sync: MESSAGE.NetBSD

Log Message:
shairport-sync: update to 4.3.7. Changes:

There have been many many bug fixes and enhancements to the core
operation of Shairport Sync.

Not included in this pkgsrc update:
* AirPlay 2 operation (needs https://github.com/mikebrady/nqptp to
  be packaged first)

Version 4.3

**Enhancements**
* A new volume control profile called `dasl-tapered` has been added in
  which halving the volume control setting halves the output level.
* On graceful shutdown, an `active_end` signal should now be generated
  if the system was in the active state.

**Bug Fixes**
* Fixed a cross-compliation error caused by not looking for the correct
  version of the `ar` tool. The fix was to substitute the correct
  version during the `autoreconf` phase.
* Updated the mDNS strings for the Classic AirPlay feature of AP2, so
  that it does not appear to provide MFi authentication.
* Always uses a revision number of 1 when looking for status updates on
  the DACP remote control port.
* Fixed a `statistics` bug (the minimum buffer size was incorrectly
  logged) and also tidy up the statistics logging interval logic for
  resetting min and max counters.
* Added an important missing format string argument to a call in the
  Jack Audio backend.

**Maintenance**
* Stopped using a deprecated FFmpeg data structure reference.
* Stopped using deprecated OpenSSL calls.

Version 4.2

**Enhancements**
* Allow compilation with `libplist` version `2.3.0`.
* Update MQTT documentation to correspond to updates in Home Assistant.

**Bug Fixes**
* Sometimes the AirPlay Device ID generated by Shairport Sync was all
  zeros, and so was invalid, causing connectivity problems. The cause of
  the problem was that `get_device_id` was not interpreting
  `getaddrinfo` information correctly.
* Fix a bug: when a Realtime Audio stream (e.g. playing from Spotify on
  iOS or using Shairport Sync as the Sound Output on a Mac) was played,
  it was fine, but when it was stopped and a second stream was started,
  the new stream could not be heard. The problem was that the PTP clock
  was not being correctly revalidated for second and subsequent Realtime
  Audio streams. The fix was to ensure that the PTP clock is revalidated
  on second and subsequent plays on the same connection.
* Use TCP keepalive a little more generally -- treat it the same as a
  client closing the link rather than just an error.
* Remove three potential race conditions between Shairport Sync opening
  a TCP connection and the client checking that the connections are
  open. The problem was that the connections were being opened in
  threads that were created just before the client was given the
  connection information. If the threads were delayed (e.g. on a slow or
  busy processor), the client could use the connection information to
  check the connections, but find that they were not (yet) open. This
  could cause the client to terminate the session immediately with a
  `TEARDOWN`. The fix was to open the connections before creating those
  threads and before sending the connection information back to the
  client. In this way, the connections are guaranteed to be open before
  the client has the information it needs to try to open them, even if
  the threads ared delayed in starting. This bug would manifest itself
  by allowing play to proceed but not play anything.

Version 4.1.1

**Enhancement**
* Use the TCP `keepalive` facility to close a play session if the client
  connection drops for a minute.

**Metadata Enhancements**
* Add `FramePosition` (`phbt`), `FirstFramePosition` (`phb0`),
  `OutputRate` (`ofps`), `OutputFormat` (`ofmt`), `StreamType` (`styp`),
  `ServiceName` (`svna`), `ClientName` (`snam`) properties to the D-Bus
  interface and to the metadata stream (codes in brackets).
* `FramePosition`/`FirstFramePosition` metadata is generated only if the
  `progress_interval` in the `metadata` section of the configuration
  file is non-zero. The progress interval can also be set by a new
  `SetFramePositionUpdateInterval` method in the D-Bus interface.
* `FramePosition`/`FirstFramePosition` metadata is of the form `<RTP
  Frame number>/<Local Time>` where the local time, in nanoseconds (a
  64-bit number), is the precise time that frame should be played. The
  metadata is generated when the frame is placed in the output buffer,
  and is thus generated `audio_backend_buffer_desired_length_in_seconds`
  (usually 0.2 seconds) before the time in question.
* Add `xesam:albumArtist` and `xesam:composer` metadata (if available)
  to the metadata bundle presented in the D-Bus interface.
* Add a new metadata item: `sps:songdatakind`, derived from the `asdk`
  metadata token, to the metadata bundle presented in the D-Bus
  interface. If `0` it seems to indicate an item of a specific duration
  such as an audio track; if `1` it seems to mean the stream is of
  unknown duration, for example an internet radio stream.

**Bug Fixes**
* Fix a bug that prevented multiple classic AirPlay instances being
  recognised. The bug was that the 12-digit classic AirPlay service name
  prefixes for each instance were all identically derived from a MAC
  hardware address. The fix was to modify the generation of prefixes to
  depend on the service name as well as the hardware address.
* Fix a bug that prevented play to the the PulseAudio backend from
  resuming after a pause. The bug was due to changes in the way pauses
  were handled and the fix was to reopen the stream if it is closed
  whenever a play or latency request was made.
* Fix a long-standing bug which didn't close the socket used for the
  RTSP connection, potentially exhausting the sockets available.
* Fix a bug in `audio_alsa.c` when there is no hardware device name.
* Fix a compilation bug on certain platforms by trying to use
  `AC_CHECK_LIB` to find `libavcodec` if the `PKG_CHECK_MODULES`
  check fails.

**Documentation**
* Include and reference the HTML version of the man page.

Version 4.1

Version 4.1 brings support for AirPlay 2 operation. It works with iOS,
iPadOS, macOS, HomePod mini and Apple TV sources, but not with Windows.
AirPlay 2 operation requires a companion program called NQPTP and
requires a somewhat more powerful system.

Limited support is available for HomeKit -- Shairport Sync speakers can
be added to the Home app, though not all features are working.

Note that you can still build Shairport Sync to support "classic"
AirPlay (aka "AirPlay 1") as before.

Here is a brief list of the high-level new features and changes (more to be added):
* AirPlay 2 operation.
* Improved `libao` backend for better compatibility with HomeBrew installations.
* Improved MQTT and D-Bus facilities.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r0 pkgsrc/audio/shairport-sync/MESSAGE.NetBSD
cvs rdiff -u -r1.9 -r1.10 pkgsrc/audio/shairport-sync/Makefile
cvs rdiff -u -r1.1 -r1.2 pkgsrc/audio/shairport-sync/PLIST \
    pkgsrc/audio/shairport-sync/distinfo
cvs rdiff -u -r1.1 -r1.2 pkgsrc/audio/shairport-sync/files/shairport-sync.sh
cvs rdiff -u -r1.1 -r1.2 pkgsrc/audio/shairport-sync/patches/patch-audio.c \
    pkgsrc/audio/shairport-sync/patches/patch-shairport.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/audio/shairport-sync/Makefile
diff -u pkgsrc/audio/shairport-sync/Makefile:1.9 pkgsrc/audio/shairport-sync/Makefile:1.10
--- pkgsrc/audio/shairport-sync/Makefile:1.9    Wed Feb 12 06:44:29 2025
+++ pkgsrc/audio/shairport-sync/Makefile        Tue Aug  5 19:33:02 2025
@@ -1,7 +1,6 @@
-# $NetBSD: Makefile,v 1.9 2025/02/12 06:44:29 ryoon Exp $
+# $NetBSD: Makefile,v 1.10 2025/08/05 19:33:02 schmonz Exp $
 
-DISTNAME=      shairport-sync-3.3.9
-PKGREVISION=   7
+DISTNAME=      shairport-sync-4.3.7
 CATEGORIES=    audio
 MASTER_SITES=  ${MASTER_SITE_GITHUB:=mikebrady/}
 
@@ -18,6 +17,7 @@ GNU_CONFIGURE=        yes
 
 BUILD_DEFS+=   VARBASE
 
+# XXX add to mk/defaults/mk.conf
 SHAIRPORT_GROUP?=      shairport
 SHAIRPORT_USER?=       shairport
 
@@ -30,8 +30,10 @@ RCD_SCRIPTS=         ${PKGBASE}
 
 FILES_SUBST+=          SHAIRPORT_USER=${SHAIRPORT_USER}
 FILES_SUBST+=          SHAIRPORT_GROUP=${SHAIRPORT_GROUP}
+FILES_SUBST+=          UNAME=${UNAME}
 FILES_SUBST+=          VARBASE=${VARBASE}
 
+CONFIGURE_ARGS+=       --sysconfdir=${PKG_SYSCONFDIR:Q}
 CONFIGURE_ARGS+=       --with-ao
 CONFIGURE_ARGS+=       --with-libdaemon
 CONFIGURE_ARGS+=       --with-metadata
@@ -40,14 +42,19 @@ CONFIGURE_ARGS+=    --with-soxr
 CONFIGURE_ARGS+=       --with-stdout
 
 CONFIGURE_ARGS+=       --without-configfiles
+CONFIGURE_ARGS+=       --without-airplay-2
 
 .if ${OPSYS} == "NetBSD" || ${OPSYS} == "SunOS" || \
     exists(/usr/include/sys/audioio.h)
 CONFIGURE_ARGS+=       --with-sun
+CONFIGURE_ARGS+=       --with-os=freebsd
 .endif
 
 .if ${OPSYS} != "Darwin"
-CPPFLAGS+=     -DCOMPILE_FOR_LINUX_AND_FREEBSD_AND_CYGWIN_AND_OPENBSD=1
+CPPFLAGS+=             -DCOMPILE_FOR_LINUX_AND_FREEBSD_AND_CYGWIN_AND_OPENBSD=1
+CPPFLAGS+=             -DCOMPILE_FOR_BSD=1
+.else
+CONFIGURE_ARGS+=       --with-os=darwin
 .endif
 
 SUBST_CLASSES+=                etc

Index: pkgsrc/audio/shairport-sync/PLIST
diff -u pkgsrc/audio/shairport-sync/PLIST:1.1 pkgsrc/audio/shairport-sync/PLIST:1.2
--- pkgsrc/audio/shairport-sync/PLIST:1.1       Fri Jul  1 18:36:27 2022
+++ pkgsrc/audio/shairport-sync/PLIST   Tue Aug  5 19:33:02 2025
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST,v 1.1 2022/07/01 18:36:27 nia Exp $
+@comment $NetBSD: PLIST,v 1.2 2025/08/05 19:33:02 schmonz Exp $
 bin/shairport-sync
-man/man7/shairport-sync.7
+man/man1/shairport-sync.1
 share/examples/shairport-sync/shairport-sync.conf
Index: pkgsrc/audio/shairport-sync/distinfo
diff -u pkgsrc/audio/shairport-sync/distinfo:1.1 pkgsrc/audio/shairport-sync/distinfo:1.2
--- pkgsrc/audio/shairport-sync/distinfo:1.1    Fri Jul  1 18:36:27 2022
+++ pkgsrc/audio/shairport-sync/distinfo        Tue Aug  5 19:33:02 2025
@@ -1,11 +1,11 @@
-$NetBSD: distinfo,v 1.1 2022/07/01 18:36:27 nia Exp $
+$NetBSD: distinfo,v 1.2 2025/08/05 19:33:02 schmonz Exp $
 
-BLAKE2s (shairport-sync-3.3.9.tar.gz) = 1fb7074a2af92bb759c07a408e7078f96fd7363d2e963111664a7ebdb15f18c2
-SHA512 (shairport-sync-3.3.9.tar.gz) = 725bbab9f35a209a1893851d6f470a830d396cf73620361b42444459359c04bb98a090d91b74db080eb17cee597ca9da2dd51285e629bd34d6e5f79682fe6470
-Size (shairport-sync-3.3.9.tar.gz) = 426827 bytes
+BLAKE2s (shairport-sync-4.3.7.tar.gz) = d0966375777f8641abc0f68e0f1f82fb3c0207f5fd585101082c07b1a74a72ce
+SHA512 (shairport-sync-4.3.7.tar.gz) = 87e7fd0874a7ac57bcb4d67ae09753a69af17e9ba7f84743f74877f55635f5ccb4a29259b152154755a8522efa8cd5496d1e06f3b19828135f0f0a9e4dc3d0e4
+Size (shairport-sync-4.3.7.tar.gz) = 566065 bytes
 SHA1 (patch-Makefile.am) = 7986bbcd9db23bbb46bb6f383bf20268fd0e56cd
-SHA1 (patch-audio.c) = 09efa3814893b878214505c7e95b6f323e317399
+SHA1 (patch-audio.c) = 1f17b80f0f5eaab05f76b6b825d69d09835b88de
 SHA1 (patch-audio__sun.c) = b48b166b557bb61e89b7f91ba812ef9f3f76ff01
 SHA1 (patch-common.c) = 495e6e7cdf243daf18c695e052eef1bf0174c880
 SHA1 (patch-configure.ac) = ea06a77574022542263fab5affef5722a6a31b7c
-SHA1 (patch-shairport.c) = e8905c0b705b048d8934051f43c7054a3c1c5483
+SHA1 (patch-shairport.c) = 729a32616bf71a4cfa3ba26110160c0bea43de61

Index: pkgsrc/audio/shairport-sync/files/shairport-sync.sh
diff -u pkgsrc/audio/shairport-sync/files/shairport-sync.sh:1.1 pkgsrc/audio/shairport-sync/files/shairport-sync.sh:1.2
--- pkgsrc/audio/shairport-sync/files/shairport-sync.sh:1.1     Fri Jul  1 18:36:27 2022
+++ pkgsrc/audio/shairport-sync/files/shairport-sync.sh Tue Aug  5 19:33:02 2025
@@ -1,6 +1,6 @@
 #!@RCD_SCRIPTS_SHELL@
 #
-# $NetBSD: shairport-sync.sh,v 1.1 2022/07/01 18:36:27 nia Exp $
+# $NetBSD: shairport-sync.sh,v 1.2 2025/08/05 19:33:02 schmonz Exp $
 #
 # PROVIDE: shairport
 # REQUIRE: mdnsd
@@ -19,6 +19,15 @@ command_args="-d"
 shairport_user="@SHAIRPORT_USER@"
 shairport_group="@SHAIRPORT_GROUP@"
 pidfile="@VARBASE@/run/shairport-sync/shairport-sync.pid"
+start_precmd="shairport_sync_precmd"
+
+shairport_sync_precmd() {
+       @MKDIR@ "@VARBASE@/run/shairport-sync"
+       @CHOWN@ ${shairport_user}:${shairport_group} "@VARBASE@/run/shairport-sync"
+       if [ "$(id -u ${shairport_user})" != 0 ] && [ "$(@UNAME@)" = "NetBSD" ]; then
+               /sbin/sysctl -w hw.audio0.multiuser=1
+       fi
+}
 
 load_rc_config $name
 run_rc_command "$1"

Index: pkgsrc/audio/shairport-sync/patches/patch-audio.c
diff -u pkgsrc/audio/shairport-sync/patches/patch-audio.c:1.1 pkgsrc/audio/shairport-sync/patches/patch-audio.c:1.2
--- pkgsrc/audio/shairport-sync/patches/patch-audio.c:1.1       Fri Jul  1 18:36:28 2022
+++ pkgsrc/audio/shairport-sync/patches/patch-audio.c   Tue Aug  5 19:33:02 2025
@@ -1,8 +1,8 @@
-$NetBSD: patch-audio.c,v 1.1 2022/07/01 18:36:28 nia Exp $
+$NetBSD: patch-audio.c,v 1.2 2025/08/05 19:33:02 schmonz Exp $
 
 Add support for Sun/NetBSD audio.
 
---- audio.c.orig       2020-12-01 12:16:11.000000000 +0000
+--- audio.c.orig       2025-01-31 14:57:31.000000000 +0000
 +++ audio.c
 @@ -37,6 +37,9 @@ extern audio_output audio_jack;
  #ifdef CONFIG_SNDIO
@@ -14,13 +14,13 @@ Add support for Sun/NetBSD audio.
  #ifdef CONFIG_AO
  extern audio_output audio_ao;
  #endif
-@@ -66,6 +69,9 @@ static audio_output *outputs[] = {
+@@ -69,6 +72,9 @@ static audio_output *outputs[] = {
  #ifdef CONFIG_SNDIO
      &audio_sndio,
  #endif
 +#ifdef CONFIG_SUN
 +    &audio_sun,
 +#endif
- #ifdef CONFIG_PA
-     &audio_pa,
+ #ifdef CONFIG_PW
+     &audio_pw,
  #endif
Index: pkgsrc/audio/shairport-sync/patches/patch-shairport.c
diff -u pkgsrc/audio/shairport-sync/patches/patch-shairport.c:1.1 pkgsrc/audio/shairport-sync/patches/patch-shairport.c:1.2
--- pkgsrc/audio/shairport-sync/patches/patch-shairport.c:1.1   Fri Jul  1 18:36:28 2022
+++ pkgsrc/audio/shairport-sync/patches/patch-shairport.c       Tue Aug  5 19:33:02 2025
@@ -1,29 +1,15 @@
-$NetBSD: patch-shairport.c,v 1.1 2022/07/01 18:36:28 nia Exp $
+$NetBSD: patch-shairport.c,v 1.2 2025/08/05 19:33:02 schmonz Exp $
 
 Show the configurable config file install location.
 
---- shairport.c.orig   2021-12-08 10:42:01.000000000 +0000
+--- shairport.c.orig   2025-01-31 14:57:31.000000000 +0000
 +++ shairport.c
-@@ -217,11 +217,11 @@ void usage(char *progname) {
- #endif
-   printf("    -V, --version           show version information.\n");
-   printf("    -c, --configfile=FILE   read configuration settings from FILE. Default is "
--         "/etc/shairport-sync.conf.\n");
-+         "@PKG_SYSCONFDIR@/shairport-sync.conf.\n");
- 
-   printf("\n");
-   printf("The following general options are for backward compatibility. These and all new options "
--         "have settings in the configuration file, by default /etc/shairport-sync.conf:\n");
-+         "have settings in the configuration file, by default @PKG_SYSCONFDIR@/shairport-sync.conf:\n");
-   printf("    -v, --verbose           -v print debug information; -vv more; -vvv lots.\n");
-   printf("    -p, --port=PORT         set RTSP listening port.\n");
-   printf("    -a, --name=NAME         set advertised name.\n");
-@@ -1279,7 +1279,7 @@ int parse_options(int argc, char **argv)
- #ifdef DEFINED_CUSTOM_PID_DIR
+@@ -1536,7 +1536,7 @@ int parse_options(int argc, char **argv)
    char *use_this_pid_dir = PIDDIR;
  #else
--  char *use_this_pid_dir = "/var/run/shairport-sync";
-+  char *use_this_pid_dir = "@VARBASE@/run/shairport-sync";
- #endif
-   // debug(1,"config.piddir \"%s\".",config.piddir);
-   if (config.piddir)
+   char temp_pid_dir[4096];
+-  strcpy(temp_pid_dir, "/var/run/");
++  strcpy(temp_pid_dir, "@VARBASE@/run/");
+   strcat(temp_pid_dir, config.appName);
+   debug(3, "Default PID directory is \"%s\".", temp_pid_dir);
+   char *use_this_pid_dir = temp_pid_dir;



Home | Main Index | Thread Index | Old Index