From f2f0afc6091adcfe57d0f49eaab2247f1ff520b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Wr=C3=B3bel?= Date: Sat, 23 Jan 2021 20:04:35 +0100 Subject: [PATCH 1/5] Add script to build server only deb package Addresses the #375 and #335 --- ci/deb-server-script.sh | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 ci/deb-server-script.sh diff --git a/ci/deb-server-script.sh b/ci/deb-server-script.sh new file mode 100644 index 0000000..79cd955 --- /dev/null +++ b/ci/deb-server-script.sh @@ -0,0 +1,35 @@ +#!/bin/sh + +set -x +set -e + +mkdir -p /tmp/syncplay/DEBIAN + +echo "Package: syncplay-server +Version: "$( + sed -n -e "s/^.*version = //p" syncplay/__init__.py | sed "s/'//g" +)$( + if [ $(git describe --exact-match --tags HEAD | wc -l) = '0' ]; + then + echo -git-$(date -u +%y%m%d%H%M) + fi +)" +Architecture: all +Maintainer: +Depends: python3 (>= 3.6), python3-twisted (>= 16.4.0), python3-certifi +Conflicts: syncplay +Homepage: https://syncplay.pl +Section: web +Priority: optional +Description: Server only package. + Solution to synchronize video playback across multiple instances of mpv, VLC, MPC-HC and MPC-BE over the Internet. + Syncplay synchronises the position and play state of multiple media players so that the viewers can watch the same thing at the same time. This means that when one person pauses/unpauses playback or seeks (jumps position) within their media player then this will be replicated across all media players connected to the same server and in the same 'room' (viewing session). When a new person joins they will also be synchronised. Syncplay also includes text-based chat so you can discuss a video as you watch it (or you could use third-party Voice over IP software to talk over a video)." \ +> /tmp/syncplay/DEBIAN/control +echo "#!/bin/sh +py3clean -p syncplay +" +> /tmp/syncplay/DEBIAN/prerm +chmod 555 /tmp/syncplay/DEBIAN/prerm + +make install-server DESTDIR=/tmp/syncplay +dpkg -b /tmp/syncplay/ From ef4b6b31f546c81dd5de3e6a8d4b7199ec0f7690 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Wr=C3=B3bel?= Date: Sat, 23 Jan 2021 20:21:24 +0100 Subject: [PATCH 2/5] Allow running the server build in the same job. Making the paths used by server package build process separate from full package. --- ci/deb-server-script.sh | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/ci/deb-server-script.sh b/ci/deb-server-script.sh index 79cd955..406ced5 100644 --- a/ci/deb-server-script.sh +++ b/ci/deb-server-script.sh @@ -3,7 +3,7 @@ set -x set -e -mkdir -p /tmp/syncplay/DEBIAN +mkdir -p /tmp/syncplay-server/DEBIAN echo "Package: syncplay-server Version: "$( @@ -24,12 +24,12 @@ Priority: optional Description: Server only package. Solution to synchronize video playback across multiple instances of mpv, VLC, MPC-HC and MPC-BE over the Internet. Syncplay synchronises the position and play state of multiple media players so that the viewers can watch the same thing at the same time. This means that when one person pauses/unpauses playback or seeks (jumps position) within their media player then this will be replicated across all media players connected to the same server and in the same 'room' (viewing session). When a new person joins they will also be synchronised. Syncplay also includes text-based chat so you can discuss a video as you watch it (or you could use third-party Voice over IP software to talk over a video)." \ -> /tmp/syncplay/DEBIAN/control +> /tmp/syncplay-server/DEBIAN/control echo "#!/bin/sh -py3clean -p syncplay +py3clean -p syncplay-server " -> /tmp/syncplay/DEBIAN/prerm -chmod 555 /tmp/syncplay/DEBIAN/prerm +> /tmp/syncplay-server/DEBIAN/prerm +chmod 555 /tmp/syncplay-server/DEBIAN/prerm -make install-server DESTDIR=/tmp/syncplay -dpkg -b /tmp/syncplay/ +make install-server DESTDIR=/tmp/syncplay-server +dpkg -b /tmp/syncplay-server/ From 7e8f0cdb64be01ef691ec925982c8c116d04aae3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Wr=C3=B3bel?= Date: Sat, 23 Jan 2021 20:43:39 +0100 Subject: [PATCH 3/5] Pipe in the server deb build into CI workflow --- .github/workflows/build.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 0062a84..4fd8614 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -105,6 +105,9 @@ jobs: - name: Build run: ci/deb-script.sh + - name: Build server + run: ci/deb-server-script.sh + - name: Test run: ci/deb-installation-test.sh @@ -115,11 +118,12 @@ jobs: echo "VER=$VER" >> $GITHUB_ENV mkdir dist_actions mv /tmp/syncplay.deb dist_actions/syncplay_${VER}.deb + mv /tmp/syncplay-server.deb dist_actions/syncplay-server_${VER}.deb ls -al dist_actions - name: Deploy uses: actions/upload-artifact@v2 with: - name: syncplay_${{ env.VER }}.deb + name: syncplay*.deb path: | - dist_actions/syncplay_${{ env.VER }}.deb + dist_actions/syncplay*.deb From 403efe881284b23abeb11be6b77a02a7901f805e Mon Sep 17 00:00:00 2001 From: daniel-123 Date: Sat, 23 Jan 2021 21:35:51 +0100 Subject: [PATCH 4/5] Fix permissions for server build script --- ci/deb-server-script.sh | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 ci/deb-server-script.sh diff --git a/ci/deb-server-script.sh b/ci/deb-server-script.sh old mode 100644 new mode 100755 From 12ee960cdcc785d113d9020fee5ea714238f664f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Wr=C3=B3bel?= Date: Sun, 24 Jan 2021 13:21:08 +0100 Subject: [PATCH 5/5] Fix invalid artifact name --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 4fd8614..c502af5 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -124,6 +124,6 @@ jobs: - name: Deploy uses: actions/upload-artifact@v2 with: - name: syncplay*.deb + name: syncplay.deb path: | dist_actions/syncplay*.deb