From: Mike Brady <4265913+mikebrady@users.noreply.github.com> Date: Thu, 8 Jul 2021 12:02:40 +0000 (+0000) Subject: Temporarily remove prior to making public. X-Git-Tag: 4.1-dev~4^2~75 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cdc249ba51bc7ac8cc14da05bb6a86a43669e6f2;p=thirdparty%2Fshairport-sync.git Temporarily remove prior to making public. --- diff --git a/.github/workflows/docker-build.yaml b/.github/workflows/docker-build.yaml deleted file mode 100644 index fc670487..00000000 --- a/.github/workflows/docker-build.yaml +++ /dev/null @@ -1,44 +0,0 @@ -# Pushes to tag 'unstable-BRANCH'. -# Releases are pushed to latest and tagged - see docker-build-releases.yaml. - -name: Build and push docker image based on specified branches. - -on: - push: - branches: [ master, development, charles-dev ] - -jobs: - main: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - name: Set SHAIRPORT_SYNC_BRANCH env. - run: echo "SHAIRPORT_SYNC_BRANCH=${GITHUB_REF##*/}" >> $GITHUB_ENV - - name: Set up ssh agent - uses: webfactory/ssh-agent@v0.5.2 # Can be removed when no longer pulling from private repos. - with: - ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }} - - name: Set up QEMU - uses: docker/setup-qemu-action@v1 - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v1 - - name: Login to Docker Registry - uses: docker/login-action@v1 - with: - registry: registry.nova.do - username: ${{ secrets.DOCKER_REGISTRY_USER }} - password: ${{ secrets.DOCKER_REGISTRY_TOKEN }} - - name: Build and push - uses: docker/build-push-action@v2 - with: - context: ./ - file: ./docker/Dockerfile - platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm64,linux/arm/v7 - push: true - tags: registry.nova.do/shairport-sync:unstable-${{ env.SHAIRPORT_SYNC_BRANCH }} - build-args: | - SHAIRPORT_SYNC_BRANCH=${{ env.SHAIRPORT_SYNC_BRANCH }} - ssh: default=${{ env.SSH_AUTH_SOCK }} # Can be removed when no longer pulling from private repos. \ No newline at end of file diff --git a/docker/Dockerfile b/docker/Dockerfile deleted file mode 100644 index 40822505..00000000 --- a/docker/Dockerfile +++ /dev/null @@ -1,139 +0,0 @@ -FROM alpine:3.12 AS builder-base -# Version 3.12 is required for now since libplist has breaking changes in v3.13 and above which are not yet standard -# in debian/ubuntu. - -# General Build System: -RUN apk -U add \ - git \ - build-base \ - autoconf \ - 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 \ - openssh-client \ - libsodium-dev \ - ffmpeg-dev \ - xxd \ - libressl-dev \ - openssl-dev \ - libplist-dev \ - libgcrypt-dev - -# ALAC Build System: -FROM builder-base AS builder-alac - -RUN git clone https://github.com/mikebrady/alac -WORKDIR /alac -RUN autoreconf -fi -RUN ./configure -RUN make -RUN make install - -# 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 - -# TODO: Remove when no longer pulling from private repos. -RUN mkdir -p -m 0600 ~/.ssh && ssh-keyscan github.com >> ~/.ssh/known_hosts - -RUN --mount=type=ssh git clone git@github.com:mikebrady/nqptp.git -WORKDIR /nqptp -# Use development branch for now. -RUN git checkout development -RUN autoreconf -fi -RUN ./configure -RUN make -RUN make install -WORKDIR / - -WORKDIR /shairport-sync -COPY . . -RUN git checkout $SHAIRPORT_SYNC_BRANCH -RUN git submodule init -RUN git submodule update -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 \ -# --with-airplay-2 -# RUN make -j $(nproc) -RUN CFLAGS="-O0 -g" CXXFLAGS="-O0 -g" ./configure --sysconfdir=/etc --with-metadata --with-dummy --with-pipe \ - --with-alsa --with-soxr --with-avahi --with-ssl=openssl --with-dbus-interface --with-stdout \ - --with-mpris-interface --with-mqtt-client --with-apple-alac --with-convolution --with-airplay-2 -RUN make -j -RUN make install - -# Shairport Sync Runtime System: -FROM alpine:3.12 - -RUN apk -U add \ - alsa-lib \ - dbus \ - popt \ - glib \ - mbedtls \ - soxr \ - avahi \ - libconfig \ - libsndfile \ - mosquitto \ - su-exec \ - libuuid \ - ffmpeg \ - libsodium \ - libplist \ - libgcrypt - -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 -COPY --from=builder-sps /usr/local/bin/nqptp /usr/local/bin/nqptp - -# 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 - -COPY ./docker/start.sh / - -RUN chmod +x ./start.sh - -ENTRYPOINT [ "/start.sh" ] \ No newline at end of file diff --git a/docker/README.md b/docker/README.md deleted file mode 100644 index a460af13..00000000 --- a/docker/README.md +++ /dev/null @@ -1,12 +0,0 @@ -# Shairport Sync Docker Image - -Available at: https://hub.docker.com/r/mikebrady/shairport-sync - -## Build Example (for arm7 devices) - -TODO: remove `--ssh` when going public as this is only for private repos. -``` -docker buildx build --ssh default=$SSH_AUTH_SOCK --platform linux/arm/v7 -f ./docker/Dockerfile --build-arg SHAIRPORT_SYNC_BRANCH=development -t registry.nova.do/shairport-sync:unstable-development . -``` - -`SHAIRPORT_SYNC_BRANCH` is required to ensure the image is built using the expected branch. \ No newline at end of file diff --git a/docker/docker-compose.yaml b/docker/docker-compose.yaml deleted file mode 100644 index 672639c9..00000000 --- a/docker/docker-compose.yaml +++ /dev/null @@ -1,12 +0,0 @@ -# Example docker compose config. - -version: "3.8" -services: - shairport-sync: - image: registry.nova.do/shairport-sync:unstable-development - network_mode: host - restart: unless-stopped - devices: - - "/dev/snd" - # volumes: - # - ./volumes/shairport-sync/shairport-sync.conf:/etc/shairport-sync.conf # Customised Shairport Sync configuration file. \ No newline at end of file diff --git a/docker/start.sh b/docker/start.sh deleted file mode 100644 index bb790283..00000000 --- a/docker/start.sh +++ /dev/null @@ -1,18 +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 - -# TODO: This should probably be implemented in a better way and using the correct nqptp group. -nqptp & - -# su-exec shairport-sync shairport-sync $@ - -shairport-sync -vu --statistics \ No newline at end of file diff --git a/documentation/Example Setups.md b/documentation/Example Setups.md deleted file mode 100644 index 7ce6f658..00000000 --- a/documentation/Example Setups.md +++ /dev/null @@ -1,21 +0,0 @@ -Example Setups -=== - -Amazon Echo Devices ---- -Since some Amazon Echo devices have either a 3.5mm input or can be used as a bluetooth speaker, Shairport Sync can be connected allowing you to Airplay to these speakers. Currently using the 3.5mm jack is the most reliable method - bluetooth connectivity can have an unreliable delay. Check first to see if your Echo device supports either of these. Volume control of the Echo device can be added via Home Assistant and a MQTT broker. Below goes through some example setups. -### _Raspberry Pi --> Echo 3.5mm Input_ -* Set the Echo device to use the 3.5mm jack as an input. -* Via the Shairport Sync config, set the correct `output_device` and `mixer_control_name` for your configuration. Likely to be -`output_device = "hw:1";` and `mixer_control_name = "Headphone";`. -* At this point, you should be able to hear music via the Echo. Remember that so far, the volume of the Echo and Shairport Sync are _independent_. If you prefer, you can disable any volume control in Shairport Sync by setting `ignore_volume_control = "yes";`. -* Amazon Echo devices appear to add a bit of latency, currently this is thought to be 0.12 seconds. This can be countered by setting the following: `audio_backend_latency_offset_in_seconds = -0.12;`. This was measured _very_ crudely using Audacity so could be wrong. If anyone is able to determine the latency more accurately, please open an issue or pull request so these documents can be updated. -* You should now be able to use your Echo device in sync with other AirPlay devices! - -### _Raspberry Pi --> Echo as Bluetooth Speaker (Docker Version)_ -* WIP - -### _Raspberry Pi --> Echo with Volume Control_ -* Before continuing with volume control via Home Assistant, please note that currently only one way volume control is tested - Shairport Sync to the Echo device. This means if the volume of the Echo is changed (e.g. by voice control or by the physical controls on the device), this will not be reflected in the volume of Shairport Sync and will be overwritten the next time Shairport Sync's volume is changed. -* This setup requires Home Assistant and a MQTT broker. The basic idea is that Shairport Sync sends a MQTT message containing the new volume amount to the MQTT broker when the volume is changed, this is then picked up by Home Assistant (which is monitoring the MQTT broker). Home Assistant will then send a command to the Amazon Echo device to change the volume. -* WIP