Merge pull request #2137 from hvilleneuve29/development_yocto

Fix MQTT warning and simplify building the systemd startup script
This commit is contained in:
Mike Brady
2026-01-26 16:48:13 +00:00
committed by GitHub
5 changed files with 17 additions and 29 deletions
-1
View File
@@ -25,7 +25,6 @@ stamp-h1
man/Makefile
man/Makefile.in
scripts/shairport-sync.service
scripts/shairport-sync.service-avahi
scripts/shairport-sync
shairport-sync.core
gitversion-stamp
-4
View File
@@ -277,11 +277,7 @@ endif # INSTALL_SYSTEMV_STARTUP
if INSTALL_SYSTEMD_STARTUP
if USE_AVAHI
SYSTEMD_SERVICE = shairport-sync.service-avahi
else
SYSTEMD_SERVICE = shairport-sync.service
endif # USE_AVAHI
INSTALL_SYSTEMD_TARGET = install-systemd-local
+15 -4
View File
@@ -228,9 +228,8 @@ if test "x$with_avahi" = "xyes" ; then
AC_DEFINE([CONFIG_AVAHI], 1, [Include Avahi-based mDNS support.])
AC_CHECK_LIB([avahi-client], [avahi_client_new], , AC_MSG_ERROR(Avahi support requires the avahi-client library!))
AC_CHECK_LIB([avahi-common],[avahi_strerror], , AC_MSG_ERROR(Avahi support requires the avahi-common library!))
AC_CONFIG_FILES([scripts/shairport-sync.service-avahi])
else
AC_CONFIG_FILES([scripts/shairport-sync.service])
systemd_after_args="${systemd_after_args} avahi-daemon.service"
systemd_requires_args="${systemd_requires_args} avahi-daemon.service"
fi
AM_CONDITIONAL([USE_AVAHI], [test "x$with_avahi" = "xyes"])
@@ -390,6 +389,8 @@ AC_ARG_WITH(mqtt-client, [AS_HELP_STRING([--with-mqtt-client],[include a client
if test "x$with_mqtt_client" = "xyes" ; then
AC_DEFINE([CONFIG_MQTT], 1, [Include a client for MQTT, the Message Queuing Telemetry Transport protocol])
AC_CHECK_LIB([mosquitto], [mosquitto_lib_init], , AC_MSG_ERROR(MQTT support requires the mosquitto library -- libmosquitto-dev suggested!))
systemd_after_args="${systemd_after_args} mosquitto.service"
systemd_requires_args="${systemd_requires_args} mosquitto.service"
fi
AM_CONDITIONAL([USE_MQTT], [test "x$with_mqtt_client" = "xyes"])
@@ -558,12 +559,22 @@ AC_FUNC_ERROR_AT_LINE
AC_FUNC_FORK
AC_CHECK_FUNCS([atexit clock_gettime gethostname inet_ntoa memchr memmove memset mkfifo pow select socket stpcpy strcasecmp strchr strdup strerror strstr strtol strtoul])
# Note -- there are AC_CONFIG_FILES directives further back, conditional on Avahi
if test "x${systemd_after_args}" != x ; then
systemd_after_args="After=${systemd_after_args}"
fi
if test "x${systemd_requires_args}" != x ; then
systemd_requires_args="Requires=${systemd_requires_args}"
fi
AC_SUBST([SYSTEMD_AFTER_ARGS], [${systemd_after_args}])
AC_SUBST([SYSTEMD_REQUIRES_ARGS], [${systemd_requires_args}])
# The man directory will not be recursively made unless you set the SUBDIR in Makefile.am.
# But leave this as is to enable a distclean to be done.
AC_CONFIG_FILES([Makefile man/Makefile])
AC_CONFIG_FILES([scripts/shairport-sync.service])
AC_CONFIG_FILES([scripts/shairport-sync],[chmod +x scripts/shairport-sync])
AC_OUTPUT
-20
View File
@@ -1,20 +0,0 @@
[Unit]
Description=Shairport Sync - AirPlay Audio Receiver
After=sound.target
Requires=avahi-daemon.service
After=avahi-daemon.service
Wants=network-online.target
After=network.target network-online.target
StartLimitIntervalSec=300
StartLimitBurst=5
[Service]
ExecStart=@prefix@/bin/shairport-sync --log-to-syslog
User=shairport-sync
Group=shairport-sync
LimitRTPRIO=5
Restart=on-failure
RestartSec=5s
[Install]
WantedBy=multi-user.target
+2
View File
@@ -3,6 +3,8 @@ Description=Shairport Sync - AirPlay Audio Receiver
After=sound.target
Wants=network-online.target
After=network.target network-online.target
@SYSTEMD_AFTER_ARGS@
@SYSTEMD_REQUIRES_ARGS@
StartLimitIntervalSec=300
StartLimitBurst=5