From 0b24116dbb962aa2b98a9e2819a61f47f9b4bd51 Mon Sep 17 00:00:00 2001 From: Mike Brady <4265913+mikebrady@users.noreply.github.com> Date: Wed, 28 Sep 2022 11:32:37 +0100 Subject: [PATCH 01/36] Tidy up the Dockerfile for AP2 and replace the AP1 Docker stuff with a derivative of the AP2 stuff to add the s6 overlay. The argument for invoking Shairport Sync on both should be 'shairport-sync --log-to-syslog' plus whatever command line arguments you want. --- docker/Dockerfile | 26 ++-- docker/classic/Dockerfile | 113 ++++++++---------- .../etc/s6-overlay/s6-rc.d/01-dbus/finish | 2 + .../etc/s6-overlay/s6-rc.d/01-dbus/run | 4 + .../etc/s6-overlay/s6-rc.d/01-dbus/type | 1 + .../etc/s6-overlay/s6-rc.d/02-avahi/finish | 2 + .../etc/s6-overlay/s6-rc.d/02-avahi/run | 8 ++ .../etc/s6-overlay/s6-rc.d/02-avahi/type | 1 + .../etc/s6-overlay/s6-rc.d/startup/script.sh | 2 + .../etc/s6-overlay/s6-rc.d/startup/type | 1 + .../classic/etc/s6-overlay/s6-rc.d/startup/up | 1 + .../s6-rc.d/user/contents.d/01-dbus | 0 .../s6-rc.d/user/contents.d/02-avahi | 0 .../s6-rc.d/user/contents.d/startup | 0 docker/classic/start.sh | 13 -- docker/etc/s6-overlay/s6-rc.d/03-nqptp/run | 2 +- 16 files changed, 79 insertions(+), 97 deletions(-) create mode 100644 docker/classic/etc/s6-overlay/s6-rc.d/01-dbus/finish create mode 100644 docker/classic/etc/s6-overlay/s6-rc.d/01-dbus/run create mode 100644 docker/classic/etc/s6-overlay/s6-rc.d/01-dbus/type create mode 100644 docker/classic/etc/s6-overlay/s6-rc.d/02-avahi/finish create mode 100644 docker/classic/etc/s6-overlay/s6-rc.d/02-avahi/run create mode 100644 docker/classic/etc/s6-overlay/s6-rc.d/02-avahi/type create mode 100644 docker/classic/etc/s6-overlay/s6-rc.d/startup/script.sh create mode 100644 docker/classic/etc/s6-overlay/s6-rc.d/startup/type create mode 100644 docker/classic/etc/s6-overlay/s6-rc.d/startup/up create mode 100644 docker/classic/etc/s6-overlay/s6-rc.d/user/contents.d/01-dbus create mode 100644 docker/classic/etc/s6-overlay/s6-rc.d/user/contents.d/02-avahi create mode 100644 docker/classic/etc/s6-overlay/s6-rc.d/user/contents.d/startup delete mode 100644 docker/classic/start.sh diff --git a/docker/Dockerfile b/docker/Dockerfile index a34d2c50..0ba13ea8 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -16,21 +16,17 @@ RUN apk -U add \ dbus \ alsa-lib-dev \ popt-dev \ - mbedtls-dev \ soxr-dev \ avahi-dev \ libconfig-dev \ libsndfile-dev \ mosquitto-dev \ - xmltoman \ - openssh-client \ libsodium-dev \ ffmpeg-dev \ xxd \ libressl-dev \ openssl-dev \ - libplist-dev \ - libgcrypt-dev + libplist-dev ##### ALAC ##### RUN git clone https://github.com/mikebrady/alac @@ -76,7 +72,6 @@ RUN apk -U add \ dbus \ popt \ glib \ - mbedtls \ soxr \ avahi \ avahi-tools \ @@ -86,8 +81,7 @@ RUN apk -U add \ libuuid \ ffmpeg \ libsodium \ - libplist \ - libgcrypt + libplist # Copy build files. COPY --from=builder /shairport-sync/build/install/usr/local/bin/shairport-sync /usr/local/bin/shairport-sync @@ -99,18 +93,14 @@ COPY --from=builder /shairport-sync/build/install/etc/dbus-1/system.d/shairport- COPY ./docker/etc/s6-overlay/s6-rc.d /etc/s6-overlay/s6-rc.d RUN chmod +x /etc/s6-overlay/s6-rc.d/startup/script.sh -# Create non-root user for running the container -- running as the user 'shairport-sync' also allows -# Shairport Sync to provide the D-Bus and MPRIS interfaces within the container - -RUN addgroup shairport-sync -RUN adduser -D shairport-sync -G shairport-sync - -# Add the shairport-sync user to the pre-existing audio group, which has ID 29, for access to the ALSA stuff -RUN addgroup -g 29 docker_audio && addgroup shairport-sync docker_audio && addgroup shairport-sync audio +# D-Bus and MPRIS services are normally provided by the user +# 'shairport-sync' running the 'shairport-sync' app. +# However, the 'shairport-sync' user is not defined in this Docker image, +# so we get a harmless warning that the user 'shairport-sync' is unknown. +# In the Docker image, D-Bus and MPRIS services are provided by +# the root user running the 'shairport-sync' app. # Remove anything we don't need. RUN rm -rf /lib/apk/db/* ENTRYPOINT [ "/init" ] - -CMD [ "/usr/local/bin/shairport-sync", "-v", "--statistics" ] \ No newline at end of file diff --git a/docker/classic/Dockerfile b/docker/classic/Dockerfile index 0556cd94..1325049a 100644 --- a/docker/classic/Dockerfile +++ b/docker/classic/Dockerfile @@ -1,5 +1,12 @@ -FROM alpine AS builder-base -# General Build System: +FROM alpine:3.12 AS builder + +# Classic (aka AirPlay 1) Build + +# Check required arguments exist. These will be provided by the Github Action +# Workflow and are required to ensure the correct branches are being used. +ARG SHAIRPORT_SYNC_BRANCH +RUN test -n "$SHAIRPORT_SYNC_BRANCH" + RUN apk -U add \ git \ build-base \ @@ -7,63 +14,42 @@ RUN apk -U add \ automake \ libtool \ dbus \ - su-exec \ alsa-lib-dev \ - libdaemon-dev \ popt-dev \ mbedtls-dev \ soxr-dev \ avahi-dev \ libconfig-dev \ - libsndfile-dev \ mosquitto-dev \ - xmltoman - -# ALAC Build System: -FROM builder-base AS builder-alac + libsndfile-dev +##### ALAC ##### RUN git clone https://github.com/mikebrady/alac -WORKDIR alac -RUN autoreconf -fi +WORKDIR /alac +RUN autoreconf -i RUN ./configure RUN make RUN make install +WORKDIR / +##### ALAC END ##### -# Shairport Sync Build System: -FROM builder-base AS builder-sps - -# This will be modified by the Github Action Workflow and is required -# to ensure the correct branch is being used. -ARG SHAIRPORT_SYNC_BRANCH -RUN test -n "$SHAIRPORT_SYNC_BRANCH" - -COPY --from=builder-alac /usr/local/lib/libalac.* /usr/local/lib/ -COPY --from=builder-alac /usr/local/lib/pkgconfig/alac.pc /usr/local/lib/pkgconfig/alac.pc -COPY --from=builder-alac /usr/local/include /usr/local/include - +##### SPS ##### WORKDIR /shairport-sync COPY . . RUN git checkout "$SHAIRPORT_SYNC_BRANCH" -RUN autoreconf -fi -RUN ./configure \ - --with-alsa \ - --with-dummy \ - --with-pipe \ - --with-stdout \ - --with-avahi \ - --with-ssl=mbedtls \ - --with-soxr \ - --sysconfdir=/etc \ - --with-dbus-interface \ - --with-mpris-interface \ - --with-mqtt-client \ - --with-apple-alac \ - --with-convolution +WORKDIR /shairport-sync/build +RUN autoreconf -i ../ +RUN ../configure --sysconfdir=/etc --with-alsa --with-soxr --with-avahi --with-ssl=mbedtls \ + --with-metadata --with-dummy --with-pipe --with-dbus-interface \ + --with-stdout --with-mpris-interface --with-mqtt-client \ + --with-apple-alac --with-convolution RUN make -j $(nproc) -RUN make install +RUN DESTDIR=install make install +WORKDIR / +##### SPS END ##### -# Shairport Sync Runtime System: -FROM alpine +# Shairport Sync Runtime System +FROM crazymax/alpine-s6:3.12-3.1.1.2 RUN apk -U add \ alsa-lib \ @@ -75,30 +61,27 @@ RUN apk -U add \ avahi \ avahi-tools \ libconfig \ - libsndfile \ - mosquitto-libs \ - su-exec \ - libgcc \ - libgc++ + mosquitto \ + libsndfile-dev + +# Copy build files. +COPY --from=builder /shairport-sync/build/install/usr/local/bin/shairport-sync /usr/local/bin/shairport-sync +COPY --from=builder /usr/local/lib/libalac.* /usr/local/lib/ +COPY --from=builder /shairport-sync/build/install/etc/dbus-1/system.d/shairport-sync-dbus.conf /etc/dbus-1/system.d/ +COPY --from=builder /shairport-sync/build/install/etc/dbus-1/system.d/shairport-sync-mpris.conf /etc/dbus-1/system.d/ + +COPY ./docker/classic/etc/s6-overlay/s6-rc.d /etc/s6-overlay/s6-rc.d +RUN chmod +x /etc/s6-overlay/s6-rc.d/startup/script.sh + +# D-Bus and MPRIS services are normally provided by the user +# 'shairport-sync' running the 'shairport-sync' app. +# However, the 'shairport-sync' user is not defined in this Docker image, +# so we get a harmless warning that the user 'shairport-sync' is unknown. +# In the Docker image, D-Bus and MPRIS services are provided by +# the root user running the 'shairport-sync' app. + +# Remove anything we don't need. RUN rm -rf /lib/apk/db/* -COPY --from=builder-alac /usr/local/lib/libalac.* /usr/local/lib/ -COPY --from=builder-sps /etc/shairport-sync* /etc/ -COPY --from=builder-sps /etc/dbus-1/system.d/shairport-sync-dbus.conf /etc/dbus-1/system.d/ -COPY --from=builder-sps /etc/dbus-1/system.d/shairport-sync-mpris.conf /etc/dbus-1/system.d/ -COPY --from=builder-sps /usr/local/bin/shairport-sync /usr/local/bin/shairport-sync - -# Create non-root user for running the container -- running as the user 'shairport-sync' also allows -# Shairport Sync to provide the D-Bus and MPRIS interfaces within the container - -RUN addgroup shairport-sync -RUN adduser -D shairport-sync -G shairport-sync - -# Add the shairport-sync user to the pre-existing audio group, which has ID 29, for access to the ALSA stuff -RUN addgroup -g 29 docker_audio && addgroup shairport-sync docker_audio - -COPY ./docker/classic/start.sh / -RUN chmod +x /start.sh - -ENTRYPOINT [ "/start.sh" ] +ENTRYPOINT [ "/init" ] diff --git a/docker/classic/etc/s6-overlay/s6-rc.d/01-dbus/finish b/docker/classic/etc/s6-overlay/s6-rc.d/01-dbus/finish new file mode 100644 index 00000000..a8222fb0 --- /dev/null +++ b/docker/classic/etc/s6-overlay/s6-rc.d/01-dbus/finish @@ -0,0 +1,2 @@ +#!/command/execlineb -S0 +/run/s6/basedir/bin/halt \ No newline at end of file diff --git a/docker/classic/etc/s6-overlay/s6-rc.d/01-dbus/run b/docker/classic/etc/s6-overlay/s6-rc.d/01-dbus/run new file mode 100644 index 00000000..8757e5d5 --- /dev/null +++ b/docker/classic/etc/s6-overlay/s6-rc.d/01-dbus/run @@ -0,0 +1,4 @@ +#!/command/with-contenv sh +rm -rf /var/run/dbus.pid +echo "Starting dbus" +exec dbus-daemon --system --nofork \ No newline at end of file diff --git a/docker/classic/etc/s6-overlay/s6-rc.d/01-dbus/type b/docker/classic/etc/s6-overlay/s6-rc.d/01-dbus/type new file mode 100644 index 00000000..1780f9f4 --- /dev/null +++ b/docker/classic/etc/s6-overlay/s6-rc.d/01-dbus/type @@ -0,0 +1 @@ +longrun \ No newline at end of file diff --git a/docker/classic/etc/s6-overlay/s6-rc.d/02-avahi/finish b/docker/classic/etc/s6-overlay/s6-rc.d/02-avahi/finish new file mode 100644 index 00000000..a8222fb0 --- /dev/null +++ b/docker/classic/etc/s6-overlay/s6-rc.d/02-avahi/finish @@ -0,0 +1,2 @@ +#!/command/execlineb -S0 +/run/s6/basedir/bin/halt \ No newline at end of file diff --git a/docker/classic/etc/s6-overlay/s6-rc.d/02-avahi/run b/docker/classic/etc/s6-overlay/s6-rc.d/02-avahi/run new file mode 100644 index 00000000..fc509297 --- /dev/null +++ b/docker/classic/etc/s6-overlay/s6-rc.d/02-avahi/run @@ -0,0 +1,8 @@ +#!/command/with-contenv sh +sleep 5 +while [ ! -f /var/run/dbus.pid ]; do + "dbus is not running, sleeping for 5 seconds before trying to start avahi" + sleep 5 +done +echo "Starting avahi" +exec avahi-daemon --no-chroot \ No newline at end of file diff --git a/docker/classic/etc/s6-overlay/s6-rc.d/02-avahi/type b/docker/classic/etc/s6-overlay/s6-rc.d/02-avahi/type new file mode 100644 index 00000000..1780f9f4 --- /dev/null +++ b/docker/classic/etc/s6-overlay/s6-rc.d/02-avahi/type @@ -0,0 +1 @@ +longrun \ No newline at end of file diff --git a/docker/classic/etc/s6-overlay/s6-rc.d/startup/script.sh b/docker/classic/etc/s6-overlay/s6-rc.d/startup/script.sh new file mode 100644 index 00000000..c975a403 --- /dev/null +++ b/docker/classic/etc/s6-overlay/s6-rc.d/startup/script.sh @@ -0,0 +1,2 @@ +#!/bin/sh +echo "STARTING - $(date)" \ No newline at end of file diff --git a/docker/classic/etc/s6-overlay/s6-rc.d/startup/type b/docker/classic/etc/s6-overlay/s6-rc.d/startup/type new file mode 100644 index 00000000..3d92b15f --- /dev/null +++ b/docker/classic/etc/s6-overlay/s6-rc.d/startup/type @@ -0,0 +1 @@ +oneshot \ No newline at end of file diff --git a/docker/classic/etc/s6-overlay/s6-rc.d/startup/up b/docker/classic/etc/s6-overlay/s6-rc.d/startup/up new file mode 100644 index 00000000..0c609ec6 --- /dev/null +++ b/docker/classic/etc/s6-overlay/s6-rc.d/startup/up @@ -0,0 +1 @@ +/etc/s6-overlay/s6-rc.d/startup/script.sh \ No newline at end of file diff --git a/docker/classic/etc/s6-overlay/s6-rc.d/user/contents.d/01-dbus b/docker/classic/etc/s6-overlay/s6-rc.d/user/contents.d/01-dbus new file mode 100644 index 00000000..e69de29b diff --git a/docker/classic/etc/s6-overlay/s6-rc.d/user/contents.d/02-avahi b/docker/classic/etc/s6-overlay/s6-rc.d/user/contents.d/02-avahi new file mode 100644 index 00000000..e69de29b diff --git a/docker/classic/etc/s6-overlay/s6-rc.d/user/contents.d/startup b/docker/classic/etc/s6-overlay/s6-rc.d/user/contents.d/startup new file mode 100644 index 00000000..e69de29b diff --git a/docker/classic/start.sh b/docker/classic/start.sh deleted file mode 100644 index 5e24ff59..00000000 --- a/docker/classic/start.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/sh - -set -e - -rm -rf /var/run/dbus.pid -#mkdir -p /var/run/dbus - -dbus-uuidgen --ensure -dbus-daemon --system - -avahi-daemon --daemonize --no-chroot - -su-exec shairport-sync shairport-sync "$@" \ No newline at end of file diff --git a/docker/etc/s6-overlay/s6-rc.d/03-nqptp/run b/docker/etc/s6-overlay/s6-rc.d/03-nqptp/run index 7af2c601..e8b59b2e 100644 --- a/docker/etc/s6-overlay/s6-rc.d/03-nqptp/run +++ b/docker/etc/s6-overlay/s6-rc.d/03-nqptp/run @@ -1,3 +1,3 @@ #!/command/with-contenv sh echo "Starting nqptp" -exec /usr/local/bin/nqptp -v \ No newline at end of file +exec /usr/local/bin/nqptp \ No newline at end of file From 830b2a2703cea1756f18b1407d8a8cfa657a7e03 Mon Sep 17 00:00:00 2001 From: Mike Brady <4265913+mikebrady@users.noreply.github.com> Date: Wed, 28 Sep 2022 16:33:14 +0100 Subject: [PATCH 02/36] Simple build_check workflow trial. --- .github/workflows/build_check.yml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 .github/workflows/build_check.yml diff --git a/.github/workflows/build_check.yml b/.github/workflows/build_check.yml new file mode 100644 index 00000000..38952783 --- /dev/null +++ b/.github/workflows/build_check.yml @@ -0,0 +1,25 @@ +name: Build Check + +on: + push: + branches: [ "danger" ] + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + - name: Install Dependencies + run: apt install --no-install-recommends build-essential git xmltoman autoconf automake \ + libtool libpopt-dev libconfig-dev libasound2-dev avahi-daemon libavahi-client-dev \ + libssl-dev libsoxr-dev libplist-dev libsodium-dev libavutil-dev libavcodec-dev libavformat-dev uuid-dev xxd + - name: Configure + run: | + mkdir build + cd build + autoreconf -i .. + ../configure --sysconfdir=/etc --with-alsa --with-soxr --with-avahi --with-ssl=openssl --with-systemd --with-airplay-2 + - name: make + run: Make From 7c3c37c5b2c550fa569ca8d6f19a308f3538c607 Mon Sep 17 00:00:00 2001 From: Mike Brady <4265913+mikebrady@users.noreply.github.com> Date: Wed, 28 Sep 2022 16:37:26 +0100 Subject: [PATCH 03/36] Adjust build_check workflow. --- .github/workflows/build_check.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_check.yml b/.github/workflows/build_check.yml index 38952783..f88d6d9e 100644 --- a/.github/workflows/build_check.yml +++ b/.github/workflows/build_check.yml @@ -12,7 +12,7 @@ jobs: steps: - uses: actions/checkout@v3 - name: Install Dependencies - run: apt install --no-install-recommends build-essential git xmltoman autoconf automake \ + run: sudo apt install -y --no-install-recommends build-essential git xmltoman autoconf automake \ libtool libpopt-dev libconfig-dev libasound2-dev avahi-daemon libavahi-client-dev \ libssl-dev libsoxr-dev libplist-dev libsodium-dev libavutil-dev libavcodec-dev libavformat-dev uuid-dev xxd - name: Configure From abad5b1e6a146c6852b1385e1775b7fde0ffd655 Mon Sep 17 00:00:00 2001 From: Mike Brady <4265913+mikebrady@users.noreply.github.com> Date: Wed, 28 Sep 2022 16:39:39 +0100 Subject: [PATCH 04/36] Adjust build_check workflow. --- .github/workflows/build_check.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/build_check.yml b/.github/workflows/build_check.yml index f88d6d9e..3d64fac7 100644 --- a/.github/workflows/build_check.yml +++ b/.github/workflows/build_check.yml @@ -12,9 +12,7 @@ jobs: steps: - uses: actions/checkout@v3 - name: Install Dependencies - run: sudo apt install -y --no-install-recommends build-essential git xmltoman autoconf automake \ - libtool libpopt-dev libconfig-dev libasound2-dev avahi-daemon libavahi-client-dev \ - libssl-dev libsoxr-dev libplist-dev libsodium-dev libavutil-dev libavcodec-dev libavformat-dev uuid-dev xxd + run: sudo apt-install -y --no-install-recommends build-essential git xmltoman autoconf automake libtool libpopt-dev libconfig-dev libasound2-dev avahi-daemon libavahi-client-dev libssl-dev libsoxr-dev libplist-dev libsodium-dev libavutil-dev libavcodec-dev libavformat-dev uuid-dev xxd - name: Configure run: | mkdir build From aa73205293a4a8d50648f000fa8c408785a17dd8 Mon Sep 17 00:00:00 2001 From: Mike Brady <4265913+mikebrady@users.noreply.github.com> Date: Wed, 28 Sep 2022 16:41:07 +0100 Subject: [PATCH 05/36] Adjust build_check workflow. --- .github/workflows/build_check.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_check.yml b/.github/workflows/build_check.yml index 3d64fac7..d8a803c0 100644 --- a/.github/workflows/build_check.yml +++ b/.github/workflows/build_check.yml @@ -12,7 +12,7 @@ jobs: steps: - uses: actions/checkout@v3 - name: Install Dependencies - run: sudo apt-install -y --no-install-recommends build-essential git xmltoman autoconf automake libtool libpopt-dev libconfig-dev libasound2-dev avahi-daemon libavahi-client-dev libssl-dev libsoxr-dev libplist-dev libsodium-dev libavutil-dev libavcodec-dev libavformat-dev uuid-dev xxd + run: sudo apt-get -y --no-install-recommends build-essential git xmltoman autoconf automake libtool libpopt-dev libconfig-dev libasound2-dev avahi-daemon libavahi-client-dev libssl-dev libsoxr-dev libplist-dev libsodium-dev libavutil-dev libavcodec-dev libavformat-dev uuid-dev xxd - name: Configure run: | mkdir build From 037ced61b0346c70af551c5628fc1dcd876c6cca Mon Sep 17 00:00:00 2001 From: Mike Brady <4265913+mikebrady@users.noreply.github.com> Date: Wed, 28 Sep 2022 16:43:18 +0100 Subject: [PATCH 06/36] Adjust build_check workflow. --- .github/workflows/build_check.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_check.yml b/.github/workflows/build_check.yml index d8a803c0..a0bfa204 100644 --- a/.github/workflows/build_check.yml +++ b/.github/workflows/build_check.yml @@ -12,7 +12,7 @@ jobs: steps: - uses: actions/checkout@v3 - name: Install Dependencies - run: sudo apt-get -y --no-install-recommends build-essential git xmltoman autoconf automake libtool libpopt-dev libconfig-dev libasound2-dev avahi-daemon libavahi-client-dev libssl-dev libsoxr-dev libplist-dev libsodium-dev libavutil-dev libavcodec-dev libavformat-dev uuid-dev xxd + run: sudo apt-get -y --no-install-recommends install build-essential git xmltoman autoconf automake libtool libpopt-dev libconfig-dev libasound2-dev avahi-daemon libavahi-client-dev libssl-dev libsoxr-dev libplist-dev libsodium-dev libavutil-dev libavcodec-dev libavformat-dev uuid-dev xxd - name: Configure run: | mkdir build From 87cdf45620ad5a2bd6396dd158aa7404fd723633 Mon Sep 17 00:00:00 2001 From: Mike Brady <4265913+mikebrady@users.noreply.github.com> Date: Wed, 28 Sep 2022 16:47:15 +0100 Subject: [PATCH 07/36] Adjust build_check workflow. --- .github/workflows/build_check.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build_check.yml b/.github/workflows/build_check.yml index a0bfa204..fe2448d9 100644 --- a/.github/workflows/build_check.yml +++ b/.github/workflows/build_check.yml @@ -19,5 +19,5 @@ jobs: cd build autoreconf -i .. ../configure --sysconfdir=/etc --with-alsa --with-soxr --with-avahi --with-ssl=openssl --with-systemd --with-airplay-2 - - name: make - run: Make + - name: Make + run: make -j From 48d3d4bfc656f5ba0aa1980e5c19b4dd291a2145 Mon Sep 17 00:00:00 2001 From: Mike Brady <4265913+mikebrady@users.noreply.github.com> Date: Wed, 28 Sep 2022 16:50:08 +0100 Subject: [PATCH 08/36] Adjust build_check workflow. --- .github/workflows/build_check.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build_check.yml b/.github/workflows/build_check.yml index fe2448d9..8bb2f354 100644 --- a/.github/workflows/build_check.yml +++ b/.github/workflows/build_check.yml @@ -20,4 +20,6 @@ jobs: autoreconf -i .. ../configure --sysconfdir=/etc --with-alsa --with-soxr --with-avahi --with-ssl=openssl --with-systemd --with-airplay-2 - name: Make - run: make -j + run: | + cd build + make -j From 993434cefbff8eed458e0476d9e5df2155209050 Mon Sep 17 00:00:00 2001 From: Mike Brady <4265913+mikebrady@users.noreply.github.com> Date: Wed, 28 Sep 2022 16:54:39 +0100 Subject: [PATCH 09/36] Enhance build_check workflow. --- .github/workflows/build_check.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.github/workflows/build_check.yml b/.github/workflows/build_check.yml index 8bb2f354..39eb153b 100644 --- a/.github/workflows/build_check.yml +++ b/.github/workflows/build_check.yml @@ -23,3 +23,14 @@ jobs: run: | cd build make -j + - name: Install + run: | + cd build + sudo make install + - invoke: + run: | + sudo systemctl shairport-sync start + - terminate: + run: | + sudo systemctl shairport-sync stop + From 26fac6750d098f0668d09d8383c40c8db1538e67 Mon Sep 17 00:00:00 2001 From: Mike Brady <4265913+mikebrady@users.noreply.github.com> Date: Wed, 28 Sep 2022 16:56:21 +0100 Subject: [PATCH 10/36] Enhance build_check workflow. --- .github/workflows/build_check.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build_check.yml b/.github/workflows/build_check.yml index 39eb153b..fc34e90d 100644 --- a/.github/workflows/build_check.yml +++ b/.github/workflows/build_check.yml @@ -27,10 +27,10 @@ jobs: run: | cd build sudo make install - - invoke: + - name: Invoke run: | sudo systemctl shairport-sync start - - terminate: + - name: Terminate run: | sudo systemctl shairport-sync stop From 92c0a9c89cc1143e02d621d5a3cceb3fec97ee70 Mon Sep 17 00:00:00 2001 From: Mike Brady <4265913+mikebrady@users.noreply.github.com> Date: Wed, 28 Sep 2022 17:04:31 +0100 Subject: [PATCH 11/36] Enhance build_check workflow. --- .github/workflows/build_check.yml | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/.github/workflows/build_check.yml b/.github/workflows/build_check.yml index fc34e90d..59cfd383 100644 --- a/.github/workflows/build_check.yml +++ b/.github/workflows/build_check.yml @@ -13,19 +13,13 @@ jobs: - uses: actions/checkout@v3 - name: Install Dependencies run: sudo apt-get -y --no-install-recommends install build-essential git xmltoman autoconf automake libtool libpopt-dev libconfig-dev libasound2-dev avahi-daemon libavahi-client-dev libssl-dev libsoxr-dev libplist-dev libsodium-dev libavutil-dev libavcodec-dev libavformat-dev uuid-dev xxd - - name: Configure + - name: Build run: | mkdir build cd build autoreconf -i .. ../configure --sysconfdir=/etc --with-alsa --with-soxr --with-avahi --with-ssl=openssl --with-systemd --with-airplay-2 - - name: Make - run: | - cd build make -j - - name: Install - run: | - cd build sudo make install - name: Invoke run: | From 8b96d0cb5f10e5d58357f79d0aac8d3011617dea Mon Sep 17 00:00:00 2001 From: Mike Brady <4265913+mikebrady@users.noreply.github.com> Date: Wed, 28 Sep 2022 17:07:17 +0100 Subject: [PATCH 12/36] Enhance build_check workflow. --- .github/workflows/build_check.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build_check.yml b/.github/workflows/build_check.yml index 59cfd383..c0480d67 100644 --- a/.github/workflows/build_check.yml +++ b/.github/workflows/build_check.yml @@ -13,13 +13,20 @@ jobs: - uses: actions/checkout@v3 - name: Install Dependencies run: sudo apt-get -y --no-install-recommends install build-essential git xmltoman autoconf automake libtool libpopt-dev libconfig-dev libasound2-dev avahi-daemon libavahi-client-dev libssl-dev libsoxr-dev libplist-dev libsodium-dev libavutil-dev libavcodec-dev libavformat-dev uuid-dev xxd - - name: Build + - name: Configure run: | mkdir build cd build autoreconf -i .. ../configure --sysconfdir=/etc --with-alsa --with-soxr --with-avahi --with-ssl=openssl --with-systemd --with-airplay-2 + - name: Make + run: | + cd build make -j + - name: Install + run: | + ls -al ../scripts + cd build sudo make install - name: Invoke run: | From 9d7b56564b9fc95578ec2dccc4198b432f8aa268 Mon Sep 17 00:00:00 2001 From: Mike Brady <4265913+mikebrady@users.noreply.github.com> Date: Wed, 28 Sep 2022 17:12:21 +0100 Subject: [PATCH 13/36] Enhance build_check workflow. --- .github/workflows/build_check.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_check.yml b/.github/workflows/build_check.yml index c0480d67..873414e9 100644 --- a/.github/workflows/build_check.yml +++ b/.github/workflows/build_check.yml @@ -25,7 +25,7 @@ jobs: make -j - name: Install run: | - ls -al ../scripts + ls -al scripts cd build sudo make install - name: Invoke From a11ca360836fe35e7d18d39aa39d3bc137b8c7b3 Mon Sep 17 00:00:00 2001 From: Mike Brady <4265913+mikebrady@users.noreply.github.com> Date: Wed, 28 Sep 2022 17:17:05 +0100 Subject: [PATCH 14/36] Explore build_check workflow. --- .github/workflows/build_check.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_check.yml b/.github/workflows/build_check.yml index 873414e9..9edc8d4f 100644 --- a/.github/workflows/build_check.yml +++ b/.github/workflows/build_check.yml @@ -25,8 +25,8 @@ jobs: make -j - name: Install run: | - ls -al scripts cd build + ls -al scripts sudo make install - name: Invoke run: | From 7f9e8116d74e57e188711b1e46e87092307d1d65 Mon Sep 17 00:00:00 2001 From: Mike Brady <4265913+mikebrady@users.noreply.github.com> Date: Wed, 28 Sep 2022 17:25:27 +0100 Subject: [PATCH 15/36] Look for the shairport-sync.service file in the scripts folder in the _build_ folder, because it's generated by ./configure. Same with the SystemV init file. --- Makefile.am | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/Makefile.am b/Makefile.am index b681ed3e..d1dfb848 100644 --- a/Makefile.am +++ b/Makefile.am @@ -267,9 +267,13 @@ if INSTALL_SYSTEMV INSTALL_SYSTEMV_TARGET = install-systemv-local +# watch out -- shairport-sync is created during the ./configure step and +# will be stored in a scripts folder in the _build_ folder +# which will be the source folder if you're not using a separate build folder + $(INSTALL_SYSTEMV_TARGET): scripts/shairport-sync $(INSTALL_USER_TARGET) install -d $(DESTDIR)$(sysconfdir)/init.d - [ -e $(DESTDIR)$(sysconfdir)/init.d/shairport-sync ] || install -m 0644 $(top_srcdir)/scripts/shairport-sync $(DESTDIR)$(sysconfdir)/init.d + [ -e $(DESTDIR)$(sysconfdir)/init.d/shairport-sync ] || install -m 0644 scripts/shairport-sync $(DESTDIR)$(sysconfdir)/init.d endif # INSTALL_SYSTEMV @@ -283,9 +287,13 @@ endif # USE_AVAHI INSTALL_SYSTEMD_TARGET = install-systemd-local +# watch out -- shairport-sync.service is created during the ./configure step and +# will be stored in a scripts folder in the _build_ folder +# which will be the source folder if you're not using a separate build folder + $(INSTALL_SYSTEMD_TARGET): scripts/$(SYSTEMD_SERVICE) $(INSTALL_USER_TARGET) install -d $(DESTDIR)$(systemdsystemunitdir) - [ -e $(DESTDIR)$(systemdsystemunitdir)/shairport-sync.service ] || install -m 0644 $(top_srcdir)/scripts/$(SYSTEMD_SERVICE) $(DESTDIR)$(systemdsystemunitdir)/shairport-sync.service + [ -e $(DESTDIR)$(systemdsystemunitdir)/shairport-sync.service ] || install -m 0644 scripts/$(SYSTEMD_SERVICE) $(DESTDIR)$(systemdsystemunitdir)/shairport-sync.service endif # INSTALL_SYSTEMD From 300bd525f35fd3e35a6187941344f88efc439813 Mon Sep 17 00:00:00 2001 From: Mike Brady <4265913+mikebrady@users.noreply.github.com> Date: Wed, 28 Sep 2022 17:28:56 +0100 Subject: [PATCH 16/36] Enhance build_check workflow. --- .github/workflows/build_check.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build_check.yml b/.github/workflows/build_check.yml index 9edc8d4f..d83d2d07 100644 --- a/.github/workflows/build_check.yml +++ b/.github/workflows/build_check.yml @@ -26,12 +26,11 @@ jobs: - name: Install run: | cd build - ls -al scripts sudo make install - name: Invoke run: | - sudo systemctl shairport-sync start + sudo systemctl start shairport-sync - name: Terminate run: | - sudo systemctl shairport-sync stop + sudo systemctl stop shairport-sync From ad2f05288ae548ef9f7e9975b9b1f95845afceb8 Mon Sep 17 00:00:00 2001 From: Mike Brady <4265913+mikebrady@users.noreply.github.com> Date: Wed, 28 Sep 2022 17:39:00 +0100 Subject: [PATCH 17/36] Initial workflow for checking a basic AirPlay systemd build and install --- .../workflows/{build_check.yml => check_ap2_systemd_basic.yml} | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename .github/workflows/{build_check.yml => check_ap2_systemd_basic.yml} (96%) diff --git a/.github/workflows/build_check.yml b/.github/workflows/check_ap2_systemd_basic.yml similarity index 96% rename from .github/workflows/build_check.yml rename to .github/workflows/check_ap2_systemd_basic.yml index d83d2d07..a89cfd35 100644 --- a/.github/workflows/build_check.yml +++ b/.github/workflows/check_ap2_systemd_basic.yml @@ -1,4 +1,4 @@ -name: Build Check +name: Build Check Basic AP2 on systemd on: push: From 127bace0abdde04237ee721db5d2f4adf2dd775e Mon Sep 17 00:00:00 2001 From: Mike Brady <4265913+mikebrady@users.noreply.github.com> Date: Wed, 28 Sep 2022 17:53:02 +0100 Subject: [PATCH 18/36] Initial full-fat build check -- omits pipewire. --- .github/workflows/check_ap2_systemd_full.yml | 36 ++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 .github/workflows/check_ap2_systemd_full.yml diff --git a/.github/workflows/check_ap2_systemd_full.yml b/.github/workflows/check_ap2_systemd_full.yml new file mode 100644 index 00000000..cdccdc38 --- /dev/null +++ b/.github/workflows/check_ap2_systemd_full.yml @@ -0,0 +1,36 @@ +name: Build Check (Nearly) Full AP2 on systemd + +on: + push: + branches: [ "danger" ] + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + - name: Install Dependencies + run: sudo apt-get -y --no-install-recommends install build-essential git xmltoman autoconf automake libtool libpopt-dev libconfig-dev libasound2-dev libao-dev libjack-dev libpulse-dev libsoundio-dev libsndio-dev libglib2.0-dev libmosquitto-dev avahi-daemon libavahi-client-dev libssl-dev libsoxr-dev libplist-dev libsodium-dev libavutil-dev libavcodec-dev libavformat-dev uuid-dev xxd + - name: Configure + run: | + mkdir build + cd build + autoreconf -i .. + ../configure --sysconfdir=/etc --with-alsa --with-ao --with-dummy --with-jack --with-pa --with-pipe --with-sndio --with-soundio --with-stdout --with-soxr --with-avahi --with-ssl=openssl --with-systemd --with-dbus-interface --with-mpris-interface --with-mqtt-client --with-airplay-2 + - name: Make + run: | + cd build + make -j + - name: Install + run: | + cd build + sudo make install + - name: Invoke + run: | + sudo systemctl start shairport-sync + - name: Terminate + run: | + sudo systemctl stop shairport-sync + From 0931323af7c2cc02dcf550b9946663522e7204c6 Mon Sep 17 00:00:00 2001 From: Mike Brady <4265913+mikebrady@users.noreply.github.com> Date: Wed, 28 Sep 2022 18:01:46 +0100 Subject: [PATCH 19/36] Add classic systemd build workflows. --- .../workflows/check_classic_systemd_basic.yml | 36 +++++++++++++++++++ .../workflows/check_classic_systemd_full.yml | 36 +++++++++++++++++++ 2 files changed, 72 insertions(+) create mode 100644 .github/workflows/check_classic_systemd_basic.yml create mode 100644 .github/workflows/check_classic_systemd_full.yml diff --git a/.github/workflows/check_classic_systemd_basic.yml b/.github/workflows/check_classic_systemd_basic.yml new file mode 100644 index 00000000..36534c01 --- /dev/null +++ b/.github/workflows/check_classic_systemd_basic.yml @@ -0,0 +1,36 @@ +name: Check Basic Classic on systemd + +on: + push: + branches: [ "danger" ] + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + - name: Install Dependencies + run: sudo apt-get -y --no-install-recommends install build-essential git xmltoman autoconf automake libtool libpopt-dev libconfig-dev libasound2-dev avahi-daemon libavahi-client-dev libssl-dev libsoxr-dev + - name: Configure + run: | + mkdir build + cd build + autoreconf -i .. + ../configure --sysconfdir=/etc --with-alsa --with-soxr --with-avahi --with-ssl=openssl --with-systemd + - name: Make + run: | + cd build + make -j + - name: Install + run: | + cd build + sudo make install + - name: Invoke + run: | + sudo systemctl start shairport-sync + - name: Terminate + run: | + sudo systemctl stop shairport-sync + diff --git a/.github/workflows/check_classic_systemd_full.yml b/.github/workflows/check_classic_systemd_full.yml new file mode 100644 index 00000000..a90d09da --- /dev/null +++ b/.github/workflows/check_classic_systemd_full.yml @@ -0,0 +1,36 @@ +name: Build Check (Nearly) Full Classic on systemd + +on: + push: + branches: [ "danger" ] + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + - name: Install Dependencies + run: sudo apt-get -y --no-install-recommends install build-essential git xmltoman autoconf automake libtool libpopt-dev libconfig-dev libasound2-dev libao-dev libjack-dev libpulse-dev libsoundio-dev libsndio-dev libglib2.0-dev libmosquitto-dev avahi-daemon libavahi-client-dev libssl-dev libsoxr-dev + - name: Configure + run: | + mkdir build + cd build + autoreconf -i .. + ../configure --sysconfdir=/etc --with-alsa --with-ao --with-dummy --with-jack --with-pa --with-pipe --with-sndio --with-soundio --with-stdout --with-soxr --with-avahi --with-ssl=openssl --with-systemd --with-dbus-interface --with-mpris-interface --with-mqtt-client + - name: Make + run: | + cd build + make -j + - name: Install + run: | + cd build + sudo make install + - name: Invoke + run: | + sudo systemctl start shairport-sync + - name: Terminate + run: | + sudo systemctl stop shairport-sync + From 29b85b4273446a9fcd79e41048b49da9fcfa4c1c Mon Sep 17 00:00:00 2001 From: Mike Brady <4265913+mikebrady@users.noreply.github.com> Date: Wed, 28 Sep 2022 22:46:26 +0100 Subject: [PATCH 20/36] Try a macOS check. --- .github/workflows/check_classic_mac_basic.yml | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 .github/workflows/check_classic_mac_basic.yml diff --git a/.github/workflows/check_classic_mac_basic.yml b/.github/workflows/check_classic_mac_basic.yml new file mode 100644 index 00000000..48985a8f --- /dev/null +++ b/.github/workflows/check_classic_mac_basic.yml @@ -0,0 +1,20 @@ +name: Check Basic Classic on macOS with brew + +on: + push: + branches: [ "danger" ] + +jobs: + build: + + runs-on: macos-latest + + steps: + - uses: actions/checkout@v3 + - name: Install Dependencies + run: | + brew update + brew install autoconf + brew install automake + brew install pkg-config + brew install openssl From 9c5f230c1ce8b95344f2e86c465ad50fbfbb6165 Mon Sep 17 00:00:00 2001 From: Mike Brady <4265913+mikebrady@users.noreply.github.com> Date: Wed, 28 Sep 2022 22:54:24 +0100 Subject: [PATCH 21/36] Improve macOS check. --- .github/workflows/check_classic_mac_basic.yml | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/.github/workflows/check_classic_mac_basic.yml b/.github/workflows/check_classic_mac_basic.yml index 48985a8f..c567230b 100644 --- a/.github/workflows/check_classic_mac_basic.yml +++ b/.github/workflows/check_classic_mac_basic.yml @@ -14,7 +14,22 @@ jobs: - name: Install Dependencies run: | brew update - brew install autoconf brew install automake - brew install pkg-config brew install openssl + brew upgrade + + - name: Set Equates + run: | + export CPPFLAGS="-I/usr/local/opt/openssl@3/include" + export LDFLAGS="-L/usr/local/opt/openssl@3/lib" + export PATH="$(brew --prefix)/opt/openssl/bin:${PATH}" + export PKG_CONFIG_PATH="$(brew --prefix)/opt/openssl/lib/pkgconfig" + + - name: Configure + run: | + autoreconf -fi + ./configure --with-os=darwin --with-ao --with-stdout --with-dns_sd --with-ssl=openssl + + - name: Make + run: | + make From e133990de7a94e73721407dbf5ac395f8bedc498 Mon Sep 17 00:00:00 2001 From: Mike Brady <4265913+mikebrady@users.noreply.github.com> Date: Wed, 28 Sep 2022 23:00:05 +0100 Subject: [PATCH 22/36] Improve macOS check. --- .github/workflows/check_classic_mac_basic.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/check_classic_mac_basic.yml b/.github/workflows/check_classic_mac_basic.yml index c567230b..3b0b0d01 100644 --- a/.github/workflows/check_classic_mac_basic.yml +++ b/.github/workflows/check_classic_mac_basic.yml @@ -16,7 +16,7 @@ jobs: brew update brew install automake brew install openssl - brew upgrade + brew install popt - name: Set Equates run: | From d21c8c013b15c0c1378af54b834184e1d490c138 Mon Sep 17 00:00:00 2001 From: Mike Brady <4265913+mikebrady@users.noreply.github.com> Date: Wed, 28 Sep 2022 23:02:34 +0100 Subject: [PATCH 23/36] Improve macOS check. --- .github/workflows/check_classic_mac_basic.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/check_classic_mac_basic.yml b/.github/workflows/check_classic_mac_basic.yml index 3b0b0d01..e9cd59ad 100644 --- a/.github/workflows/check_classic_mac_basic.yml +++ b/.github/workflows/check_classic_mac_basic.yml @@ -17,6 +17,7 @@ jobs: brew install automake brew install openssl brew install popt + brew install libconfig - name: Set Equates run: | From 8f58b7fa931cdc247430e964ff2edaaf0211f6de Mon Sep 17 00:00:00 2001 From: Mike Brady <4265913+mikebrady@users.noreply.github.com> Date: Wed, 28 Sep 2022 23:09:15 +0100 Subject: [PATCH 24/36] Improve macOS check. --- .github/workflows/check_classic_mac_basic.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/check_classic_mac_basic.yml b/.github/workflows/check_classic_mac_basic.yml index e9cd59ad..22baa24a 100644 --- a/.github/workflows/check_classic_mac_basic.yml +++ b/.github/workflows/check_classic_mac_basic.yml @@ -23,8 +23,8 @@ jobs: run: | export CPPFLAGS="-I/usr/local/opt/openssl@3/include" export LDFLAGS="-L/usr/local/opt/openssl@3/lib" - export PATH="$(brew --prefix)/opt/openssl/bin:${PATH}" - export PKG_CONFIG_PATH="$(brew --prefix)/opt/openssl/lib/pkgconfig" + export PATH="/usr/local/opt/openssl/bin:${PATH}" + export PKG_CONFIG_PATH="/usr/local/opt/openssl@3/lib/pkgconfig" - name: Configure run: | From 60ad8bdfce28e5cf884f67a69c5f4d3e94c92ed1 Mon Sep 17 00:00:00 2001 From: Mike Brady <4265913+mikebrady@users.noreply.github.com> Date: Wed, 28 Sep 2022 23:13:10 +0100 Subject: [PATCH 25/36] Improve macOS check. --- .github/workflows/check_classic_mac_basic.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/workflows/check_classic_mac_basic.yml b/.github/workflows/check_classic_mac_basic.yml index 22baa24a..d76cca2c 100644 --- a/.github/workflows/check_classic_mac_basic.yml +++ b/.github/workflows/check_classic_mac_basic.yml @@ -19,15 +19,12 @@ jobs: brew install popt brew install libconfig - - name: Set Equates + - name: Configure run: | export CPPFLAGS="-I/usr/local/opt/openssl@3/include" export LDFLAGS="-L/usr/local/opt/openssl@3/lib" export PATH="/usr/local/opt/openssl/bin:${PATH}" export PKG_CONFIG_PATH="/usr/local/opt/openssl@3/lib/pkgconfig" - - - name: Configure - run: | autoreconf -fi ./configure --with-os=darwin --with-ao --with-stdout --with-dns_sd --with-ssl=openssl From ebe8508d729e19476d795bd19fc4f528ec74323e Mon Sep 17 00:00:00 2001 From: Mike Brady <4265913+mikebrady@users.noreply.github.com> Date: Wed, 28 Sep 2022 23:15:50 +0100 Subject: [PATCH 26/36] Improve macOS check. --- .github/workflows/check_classic_mac_basic.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/check_classic_mac_basic.yml b/.github/workflows/check_classic_mac_basic.yml index d76cca2c..7684b589 100644 --- a/.github/workflows/check_classic_mac_basic.yml +++ b/.github/workflows/check_classic_mac_basic.yml @@ -18,6 +18,7 @@ jobs: brew install openssl brew install popt brew install libconfig + brew install libao - name: Configure run: | From 11c10f4fda51790812815d50ec032334b93dc62b Mon Sep 17 00:00:00 2001 From: Mike Brady <4265913+mikebrady@users.noreply.github.com> Date: Thu, 29 Sep 2022 10:42:47 +0100 Subject: [PATCH 27/36] Add a check for building without using a separate build folder. --- .github/workflows/check_ap2_systemd_full.yml | 10 ++---- .../check_ap2_systemd_full_build_folder.yml | 36 +++++++++++++++++++ 2 files changed, 39 insertions(+), 7 deletions(-) create mode 100644 .github/workflows/check_ap2_systemd_full_build_folder.yml diff --git a/.github/workflows/check_ap2_systemd_full.yml b/.github/workflows/check_ap2_systemd_full.yml index cdccdc38..3852a343 100644 --- a/.github/workflows/check_ap2_systemd_full.yml +++ b/.github/workflows/check_ap2_systemd_full.yml @@ -1,4 +1,4 @@ -name: Build Check (Nearly) Full AP2 on systemd +name: Build Check (Nearly) Full AP2 on systemd build in place on: push: @@ -15,17 +15,13 @@ jobs: run: sudo apt-get -y --no-install-recommends install build-essential git xmltoman autoconf automake libtool libpopt-dev libconfig-dev libasound2-dev libao-dev libjack-dev libpulse-dev libsoundio-dev libsndio-dev libglib2.0-dev libmosquitto-dev avahi-daemon libavahi-client-dev libssl-dev libsoxr-dev libplist-dev libsodium-dev libavutil-dev libavcodec-dev libavformat-dev uuid-dev xxd - name: Configure run: | - mkdir build - cd build - autoreconf -i .. - ../configure --sysconfdir=/etc --with-alsa --with-ao --with-dummy --with-jack --with-pa --with-pipe --with-sndio --with-soundio --with-stdout --with-soxr --with-avahi --with-ssl=openssl --with-systemd --with-dbus-interface --with-mpris-interface --with-mqtt-client --with-airplay-2 + autoreconf -i + ./configure --sysconfdir=/etc --with-alsa --with-ao --with-dummy --with-jack --with-pa --with-pipe --with-sndio --with-soundio --with-stdout --with-soxr --with-avahi --with-ssl=openssl --with-systemd --with-dbus-interface --with-mpris-interface --with-mqtt-client --with-airplay-2 - name: Make run: | - cd build make -j - name: Install run: | - cd build sudo make install - name: Invoke run: | diff --git a/.github/workflows/check_ap2_systemd_full_build_folder.yml b/.github/workflows/check_ap2_systemd_full_build_folder.yml new file mode 100644 index 00000000..cdccdc38 --- /dev/null +++ b/.github/workflows/check_ap2_systemd_full_build_folder.yml @@ -0,0 +1,36 @@ +name: Build Check (Nearly) Full AP2 on systemd + +on: + push: + branches: [ "danger" ] + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + - name: Install Dependencies + run: sudo apt-get -y --no-install-recommends install build-essential git xmltoman autoconf automake libtool libpopt-dev libconfig-dev libasound2-dev libao-dev libjack-dev libpulse-dev libsoundio-dev libsndio-dev libglib2.0-dev libmosquitto-dev avahi-daemon libavahi-client-dev libssl-dev libsoxr-dev libplist-dev libsodium-dev libavutil-dev libavcodec-dev libavformat-dev uuid-dev xxd + - name: Configure + run: | + mkdir build + cd build + autoreconf -i .. + ../configure --sysconfdir=/etc --with-alsa --with-ao --with-dummy --with-jack --with-pa --with-pipe --with-sndio --with-soundio --with-stdout --with-soxr --with-avahi --with-ssl=openssl --with-systemd --with-dbus-interface --with-mpris-interface --with-mqtt-client --with-airplay-2 + - name: Make + run: | + cd build + make -j + - name: Install + run: | + cd build + sudo make install + - name: Invoke + run: | + sudo systemctl start shairport-sync + - name: Terminate + run: | + sudo systemctl stop shairport-sync + From ce4c470174747db1a7b1166143be588053045700 Mon Sep 17 00:00:00 2001 From: Mike Brady <4265913+mikebrady@users.noreply.github.com> Date: Thu, 29 Sep 2022 10:50:56 +0100 Subject: [PATCH 28/36] Add a check for building for System V. --- .github/workflows/check_ap2_systemv_full.yml | 32 ++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 .github/workflows/check_ap2_systemv_full.yml diff --git a/.github/workflows/check_ap2_systemv_full.yml b/.github/workflows/check_ap2_systemv_full.yml new file mode 100644 index 00000000..08119510 --- /dev/null +++ b/.github/workflows/check_ap2_systemv_full.yml @@ -0,0 +1,32 @@ +name: Build Check (Nearly) Full AP2 on System V build in place + +on: + push: + branches: [ "danger" ] + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + - name: Install Dependencies + run: sudo apt-get -y --no-install-recommends install build-essential git xmltoman autoconf automake libtool libpopt-dev libdaemon libconfig-dev libasound2-dev libao-dev libjack-dev libpulse-dev libsoundio-dev libsndio-dev libglib2.0-dev libmosquitto-dev avahi-daemon libavahi-client-dev libssl-dev libsoxr-dev libplist-dev libsodium-dev libavutil-dev libavcodec-dev libavformat-dev uuid-dev xxd + - name: Configure + run: | + autoreconf -i + ./configure --sysconfdir=/etc --with-alsa --with-ao --with-dummy --with-libdaemon --with-jack --with-pa --with-pipe --with-sndio --with-soundio --with-stdout --with-soxr --with-avahi --with-ssl=openssl --with-systemv --with-dbus-interface --with-mpris-interface --with-mqtt-client --with-airplay-2 + - name: Make + run: | + make -j + - name: Install + run: | + sudo make install + - name: Invoke + run: | + sudo service shairport-sync start + - name: Terminate + run: | + sudo service shairport-sync stop + From 1783b60f6542a3d7450a2fa6f3e24bc65f9ef946 Mon Sep 17 00:00:00 2001 From: Mike Brady <4265913+mikebrady@users.noreply.github.com> Date: Thu, 29 Sep 2022 10:53:15 +0100 Subject: [PATCH 29/36] Fix for building for System V. --- .github/workflows/check_ap2_systemv_full.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/check_ap2_systemv_full.yml b/.github/workflows/check_ap2_systemv_full.yml index 08119510..8f6313e6 100644 --- a/.github/workflows/check_ap2_systemv_full.yml +++ b/.github/workflows/check_ap2_systemv_full.yml @@ -12,7 +12,7 @@ jobs: steps: - uses: actions/checkout@v3 - name: Install Dependencies - run: sudo apt-get -y --no-install-recommends install build-essential git xmltoman autoconf automake libtool libpopt-dev libdaemon libconfig-dev libasound2-dev libao-dev libjack-dev libpulse-dev libsoundio-dev libsndio-dev libglib2.0-dev libmosquitto-dev avahi-daemon libavahi-client-dev libssl-dev libsoxr-dev libplist-dev libsodium-dev libavutil-dev libavcodec-dev libavformat-dev uuid-dev xxd + run: sudo apt-get -y --no-install-recommends install build-essential git xmltoman autoconf automake libtool libpopt-dev libdaemon-dev libconfig-dev libasound2-dev libao-dev libjack-dev libpulse-dev libsoundio-dev libsndio-dev libglib2.0-dev libmosquitto-dev avahi-daemon libavahi-client-dev libssl-dev libsoxr-dev libplist-dev libsodium-dev libavutil-dev libavcodec-dev libavformat-dev uuid-dev xxd - name: Configure run: | autoreconf -i From 16a150afbb4f7beb0f6f82951c9b394aaad86b76 Mon Sep 17 00:00:00 2001 From: Mike Brady <4265913+mikebrady@users.noreply.github.com> Date: Thu, 29 Sep 2022 10:56:22 +0100 Subject: [PATCH 30/36] Fix for building for System V. --- .github/workflows/check_ap2_systemv_full.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/check_ap2_systemv_full.yml b/.github/workflows/check_ap2_systemv_full.yml index 8f6313e6..f1b7216c 100644 --- a/.github/workflows/check_ap2_systemv_full.yml +++ b/.github/workflows/check_ap2_systemv_full.yml @@ -25,8 +25,9 @@ jobs: sudo make install - name: Invoke run: | - sudo service shairport-sync start + sudo /etc/init.d/shairport-sync start + sleep 2 - name: Terminate run: | - sudo service shairport-sync stop + sudo /etc/init.d/shairport-sync stop From 44ae68e8fa5d70d7c03a03a291635cdac3c9201f Mon Sep 17 00:00:00 2001 From: Mike Brady <4265913+mikebrady@users.noreply.github.com> Date: Thu, 29 Sep 2022 10:59:51 +0100 Subject: [PATCH 31/36] Fix for building for System V. --- .github/workflows/check_ap2_systemv_full.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/workflows/check_ap2_systemv_full.yml b/.github/workflows/check_ap2_systemv_full.yml index f1b7216c..420ca860 100644 --- a/.github/workflows/check_ap2_systemv_full.yml +++ b/.github/workflows/check_ap2_systemv_full.yml @@ -25,9 +25,6 @@ jobs: sudo make install - name: Invoke run: | - sudo /etc/init.d/shairport-sync start + ls -al /etc/init.d/ sleep 2 - - name: Terminate - run: | - sudo /etc/init.d/shairport-sync stop From 1296b8f2f86c40ee707c907644f4025476ae6875 Mon Sep 17 00:00:00 2001 From: Mike Brady <4265913+mikebrady@users.noreply.github.com> Date: Thu, 29 Sep 2022 11:02:46 +0100 Subject: [PATCH 32/36] Fix for building for System V. --- Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile.am b/Makefile.am index d1dfb848..1dc654cc 100644 --- a/Makefile.am +++ b/Makefile.am @@ -273,7 +273,7 @@ INSTALL_SYSTEMV_TARGET = install-systemv-local $(INSTALL_SYSTEMV_TARGET): scripts/shairport-sync $(INSTALL_USER_TARGET) install -d $(DESTDIR)$(sysconfdir)/init.d - [ -e $(DESTDIR)$(sysconfdir)/init.d/shairport-sync ] || install -m 0644 scripts/shairport-sync $(DESTDIR)$(sysconfdir)/init.d + [ -e $(DESTDIR)$(sysconfdir)/init.d/shairport-sync ] || install -m 0755 scripts/shairport-sync $(DESTDIR)$(sysconfdir)/init.d endif # INSTALL_SYSTEMV From 521e97ad414ac1062b8aaeb5bb48ab2e2200b4b8 Mon Sep 17 00:00:00 2001 From: Mike Brady <4265913+mikebrady@users.noreply.github.com> Date: Thu, 29 Sep 2022 11:05:31 +0100 Subject: [PATCH 33/36] Fix for building for System V. --- .github/workflows/check_ap2_systemv_full.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/check_ap2_systemv_full.yml b/.github/workflows/check_ap2_systemv_full.yml index 420ca860..f1b7216c 100644 --- a/.github/workflows/check_ap2_systemv_full.yml +++ b/.github/workflows/check_ap2_systemv_full.yml @@ -25,6 +25,9 @@ jobs: sudo make install - name: Invoke run: | - ls -al /etc/init.d/ + sudo /etc/init.d/shairport-sync start sleep 2 + - name: Terminate + run: | + sudo /etc/init.d/shairport-sync stop From 7933f5e3d4f1e5f67269629c5780acd559a12620 Mon Sep 17 00:00:00 2001 From: Mike Brady <4265913+mikebrady@users.noreply.github.com> Date: Thu, 29 Sep 2022 11:10:06 +0100 Subject: [PATCH 34/36] Fix for building for System V. --- .github/workflows/check_ap2_systemv_full.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/check_ap2_systemv_full.yml b/.github/workflows/check_ap2_systemv_full.yml index f1b7216c..d6e3a50d 100644 --- a/.github/workflows/check_ap2_systemv_full.yml +++ b/.github/workflows/check_ap2_systemv_full.yml @@ -1,4 +1,4 @@ -name: Build Check (Nearly) Full AP2 on System V build in place +name: Full AP2 on System V in place on: push: From 54d9e0af82b1b2e00f20530988be80140ad7b321 Mon Sep 17 00:00:00 2001 From: Mike Brady <4265913+mikebrady@users.noreply.github.com> Date: Thu, 29 Sep 2022 11:18:38 +0100 Subject: [PATCH 35/36] name changes. --- .github/workflows/check_ap2_systemd_basic.yml | 2 +- .github/workflows/check_ap2_systemd_full.yml | 2 +- .github/workflows/check_ap2_systemd_full_build_folder.yml | 2 +- .github/workflows/check_ap2_systemv_full.yml | 2 +- .github/workflows/check_classic_mac_basic.yml | 2 +- .github/workflows/check_classic_systemd_basic.yml | 2 +- .github/workflows/check_classic_systemd_full.yml | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/check_ap2_systemd_basic.yml b/.github/workflows/check_ap2_systemd_basic.yml index a89cfd35..33d5ae27 100644 --- a/.github/workflows/check_ap2_systemd_basic.yml +++ b/.github/workflows/check_ap2_systemd_basic.yml @@ -1,4 +1,4 @@ -name: Build Check Basic AP2 on systemd +name: Basic AP2 on systemd in build folder on: push: diff --git a/.github/workflows/check_ap2_systemd_full.yml b/.github/workflows/check_ap2_systemd_full.yml index 3852a343..c7e2bb83 100644 --- a/.github/workflows/check_ap2_systemd_full.yml +++ b/.github/workflows/check_ap2_systemd_full.yml @@ -1,4 +1,4 @@ -name: Build Check (Nearly) Full AP2 on systemd build in place +name: Full AP2 on systemd build in place on: push: diff --git a/.github/workflows/check_ap2_systemd_full_build_folder.yml b/.github/workflows/check_ap2_systemd_full_build_folder.yml index cdccdc38..065ada59 100644 --- a/.github/workflows/check_ap2_systemd_full_build_folder.yml +++ b/.github/workflows/check_ap2_systemd_full_build_folder.yml @@ -1,4 +1,4 @@ -name: Build Check (Nearly) Full AP2 on systemd +name: Full AP2 on systemd in build folder on: push: diff --git a/.github/workflows/check_ap2_systemv_full.yml b/.github/workflows/check_ap2_systemv_full.yml index d6e3a50d..eee1b468 100644 --- a/.github/workflows/check_ap2_systemv_full.yml +++ b/.github/workflows/check_ap2_systemv_full.yml @@ -1,4 +1,4 @@ -name: Full AP2 on System V in place +name: AP2 on System V in place on: push: diff --git a/.github/workflows/check_classic_mac_basic.yml b/.github/workflows/check_classic_mac_basic.yml index 7684b589..9489f3fb 100644 --- a/.github/workflows/check_classic_mac_basic.yml +++ b/.github/workflows/check_classic_mac_basic.yml @@ -1,4 +1,4 @@ -name: Check Basic Classic on macOS with brew +name: Classic on macOS with brew on: push: diff --git a/.github/workflows/check_classic_systemd_basic.yml b/.github/workflows/check_classic_systemd_basic.yml index 36534c01..952c2daa 100644 --- a/.github/workflows/check_classic_systemd_basic.yml +++ b/.github/workflows/check_classic_systemd_basic.yml @@ -1,4 +1,4 @@ -name: Check Basic Classic on systemd +name: Basic Classic on systemd on: push: diff --git a/.github/workflows/check_classic_systemd_full.yml b/.github/workflows/check_classic_systemd_full.yml index a90d09da..c648aa76 100644 --- a/.github/workflows/check_classic_systemd_full.yml +++ b/.github/workflows/check_classic_systemd_full.yml @@ -1,4 +1,4 @@ -name: Build Check (Nearly) Full Classic on systemd +name: Classic on systemd in build folder on: push: From f294b503902a677beb10ffd9fe1e5c7b848a1285 Mon Sep 17 00:00:00 2001 From: Mike Brady <4265913+mikebrady@users.noreply.github.com> Date: Thu, 29 Sep 2022 11:22:36 +0100 Subject: [PATCH 36/36] Try all --- .github/workflows/check_ap2_systemd_basic.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/check_ap2_systemd_basic.yml b/.github/workflows/check_ap2_systemd_basic.yml index 33d5ae27..f8919861 100644 --- a/.github/workflows/check_ap2_systemd_basic.yml +++ b/.github/workflows/check_ap2_systemd_basic.yml @@ -1,4 +1,4 @@ -name: Basic AP2 on systemd in build folder +name: Basic AP2 on systemd in build folder on: push: