diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 0d3d7d5f7dd0..00df9316ff12 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -152,6 +152,11 @@ bbb-playback-presentation-build: script: - build/setup-inside-docker.sh bbb-playback-presentation +bbb-playback-presentation-legacy-build: + extends: .build_job + script: + - build/setup-inside-docker.sh bbb-playback-presentation-legacy + bbb-playback-screenshare-build: extends: .build_job script: diff --git a/build/package-names.inc.sh b/build/package-names.inc.sh index 009c01745b25..5cfdf56cb66f 100644 --- a/build/package-names.inc.sh +++ b/build/package-names.inc.sh @@ -23,6 +23,7 @@ DEBNAME_TO_SOURCEDIR[bbb-playback]="bbb-playback" DEBNAME_TO_SOURCEDIR[bbb-playback-notes]="record-and-playback/notes" DEBNAME_TO_SOURCEDIR[bbb-playback-podcast]="record-and-playback/podcast" DEBNAME_TO_SOURCEDIR[bbb-playback-presentation]="record-and-playback/presentation" +DEBNAME_TO_SOURCEDIR[bbb-playback-presentation-legacy]="record-and-playback/presentation" DEBNAME_TO_SOURCEDIR[bbb-playback-screenshare]="record-and-playback/screenshare" DEBNAME_TO_SOURCEDIR[bbb-playback-video]="record-and-playback/video" DEBNAME_TO_SOURCEDIR[bbb-record-core]="record-and-playback/core" diff --git a/build/packages-template/bbb-playback-presentation-legacy/after-install.sh b/build/packages-template/bbb-playback-presentation-legacy/after-install.sh new file mode 100755 index 000000000000..198fa96ed3d6 --- /dev/null +++ b/build/packages-template/bbb-playback-presentation-legacy/after-install.sh @@ -0,0 +1,29 @@ +#!/bin/bash -e + +BIGBLUEBUTTON_USER=bigbluebutton + +case "$1" in + configure|upgrade|1|2) + + for dir in 0.81 0.9.0; do + target=/var/bigbluebutton/playback/presentation/$dir + if [ -d "$target" ]; then + chown -R $BIGBLUEBUTTON_USER:$BIGBLUEBUTTON_USER "$target" + fi + done + + reloadService nginx + + ;; + + failed-upgrade) + echo "## bbb-playback-presentation-legacy failed to upgrade." >&2 + echo "## The legacy players (0.81, 0.9.0) moved here from bbb-playback-presentation." >&2 + echo "## Upgrade bbb-playback-presentation to the matching version first, then run:" >&2 + echo "## apt-get install --reinstall bbb-playback-presentation-legacy" >&2 + ;; + + *) + echo "## postinst called with unknown argument \`$1'" >&2 + ;; +esac diff --git a/build/packages-template/bbb-playback-presentation-legacy/build.sh b/build/packages-template/bbb-playback-presentation-legacy/build.sh new file mode 100755 index 000000000000..9c17a88c8202 --- /dev/null +++ b/build/packages-template/bbb-playback-presentation-legacy/build.sh @@ -0,0 +1,47 @@ +#!/bin/bash -ex + +TARGET=`basename $(pwd)` + + +PACKAGE=$(echo $TARGET | cut -d'_' -f1) +VERSION=$(echo $TARGET | cut -d'_' -f2) +DISTRO=$(echo $TARGET | cut -d'_' -f3) + +# +# Clear staging directory for build +rm -rf staging + +# +# Stage only the standalone legacy players (0.81/0.9.0). These used to be part +# of bbb-playback-presentation; they now ship here so they are not installed by +# default. The source dir is record-and-playback/presentation, so the players +# are available under ./playback/presentation/. +mkdir -p staging/var/bigbluebutton/playback/presentation +cp -r playback/presentation/0.81 \ + playback/presentation/0.9.0 \ + staging/var/bigbluebutton/playback/presentation/ + +mkdir -p staging/usr/share/bigbluebutton/nginx +cp playback-legacy.nginx staging/usr/share/bigbluebutton/nginx + +## + +. ./opts-$DISTRO.sh + +# +# Build package +# +# --replaces declares the file hand-off from bbb-playback-presentation, which +# previously owned these dirs, so dpkg does not report a file conflict when this +# package takes them over. (Debian's Breaks field would also force an old +# bbb-playback-presentation to be upgraded first, closing the transition window, +# but fpm has no --breaks flag; --replaces is sufficient for this opt-in package, +# and after-install.sh guides the admin if a transition conflict ever occurs.) +# The value contains spaces, so it is passed here directly rather than through +# $OPTS (which is expanded unquoted and would word-split it). +fpm -s dir -C ./staging -n $PACKAGE \ + --version $VERSION --epoch $EPOCH \ + --after-install after-install.sh \ + --replaces "bbb-playback-presentation (<< ${EPOCH}:${VERSION})" \ + --description "Standalone legacy BigBlueButton recording players (0.81/0.9.0)" \ + $OPTS diff --git a/build/packages-template/bbb-playback-presentation-legacy/opts-jammy.sh b/build/packages-template/bbb-playback-presentation-legacy/opts-jammy.sh new file mode 100755 index 000000000000..9dd1ea65f17b --- /dev/null +++ b/build/packages-template/bbb-playback-presentation-legacy/opts-jammy.sh @@ -0,0 +1,5 @@ +#!/bin/bash + +. ./opts-global.sh + +OPTS="$OPTS -t deb -d bbb-record-core" diff --git a/build/packages-template/bbb-playback-presentation-legacy/playback-legacy.nginx b/build/packages-template/bbb-playback-presentation-legacy/playback-legacy.nginx new file mode 100644 index 000000000000..4e8ac94bb3a6 --- /dev/null +++ b/build/packages-template/bbb-playback-presentation-legacy/playback-legacy.nginx @@ -0,0 +1,14 @@ +# Routing for the standalone legacy players (0.81/0.9.0), shipped by the +# optional bbb-playback-presentation-legacy deb. The players themselves are served as static +# files by the generic "location /playback/presentation" block in +# presentation.nginx (bbb-playback-presentation); this file only carries the +# legacy-specific redirect, so it exists only when the legacy deb is installed. + + location /playback/presentation/playback.html { + return 301 /playback/presentation/0.81/playback.html?$query_string; + # If you have recordings from 0.9.0 beta versions and are sure + # that you will never want to play recordings made with + # BigBlueButton 0.81, comment the line above and uncomment the + # following line: + #return 301 /playback/presentation/0.9.0/playback.html?$query_string; + } diff --git a/build/packages-template/bbb-playback-presentation/build.sh b/build/packages-template/bbb-playback-presentation/build.sh index cf034f2439e3..f19d098c9c9e 100755 --- a/build/packages-template/bbb-playback-presentation/build.sh +++ b/build/packages-template/bbb-playback-presentation/build.sh @@ -29,6 +29,11 @@ chmod 755 staging/usr/local/bigbluebutton/core/scripts/*/*.rb mkdir -p staging/var/bigbluebutton cp -r playback staging/var/bigbluebutton +# The standalone legacy players (0.81/0.9.0) are shipped separately by the +# optional bbb-playback-presentation-legacy deb, so they are not installed by default. +rm -rf staging/var/bigbluebutton/playback/presentation/0.81 \ + staging/var/bigbluebutton/playback/presentation/0.9.0 + mkdir -p staging/usr/share/bigbluebutton/nginx mv staging/usr/local/bigbluebutton/core/scripts/presentation.nginx staging/usr/share/bigbluebutton/nginx diff --git a/record-and-playback/presentation/scripts/presentation.nginx b/record-and-playback/presentation/scripts/presentation.nginx index a2d0e1a92651..e32e1c0bec48 100644 --- a/record-and-playback/presentation/scripts/presentation.nginx +++ b/record-and-playback/presentation/scripts/presentation.nginx @@ -16,15 +16,6 @@ # with BigBlueButton; if not, see . # - location /playback/presentation/playback.html { - return 301 /playback/presentation/0.81/playback.html?$query_string; - # If you have recordings from 0.9.0 beta versions and are sure - # that you will never want to play recordings made with - # BigBlueButton 0.81, comment the line above and uncomment the - # following line: - #return 301 /playback/presentation/0.9.0/playback.html?$query_string; - } - location /playback/presentation/2.0/playback.html { return 301 /playback/presentation/2.3/$arg_meetingId?$query_string; }