bigbluebutton-Github/build/packages-template/bbb-playback-presentation/build.sh
schrd 78a8ccdcb9
build: Umask fixes for 2.7 build scripts (#21366)
* Fix permissions during build of bbb-libreoffice-docker

The scripts must be executable by anyone. They are owned by root and
executed by user bigbluebutton.

* Fix permissions during build of bbb-html5

The files must be readable by mongodb. There are no secrets in the file,
so it is safe to be readable by anyone.

* Fix permissions during build of bbb-record-core

Files must be readable by user bigbluebutton.

* Fix more umask issues

Recording scripts were not executable in the builds

---------

Co-authored-by: Daniel Schreiber <daniel.schreiber@hrz.tu-chemnitz.de>
2024-10-11 08:48:52 -04:00

50 lines
1.2 KiB
Bash
Executable File

#!/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
#
# Create build directories for markign by fpm
DIRS=""
for dir in $DIRS; do
mkdir -p staging$dir
DIRECTORIES="$DIRECTORIES --directories $dir"
done
##
mkdir -p staging/usr/local/bigbluebutton/core
cp -r scripts staging/usr/local/bigbluebutton/core
chmod a+rx staging/usr/local/bigbluebutton/core/scripts/process/*.rb
chmod a+rx staging/usr/local/bigbluebutton/core/scripts/publish/*.rb
mkdir -p staging/var/bigbluebutton
cp -r playback staging/var/bigbluebutton
chmod -R a+rX staging/var/bigbluebutton
mkdir -p staging/usr/share/bigbluebutton/nginx
mv staging/usr/local/bigbluebutton/core/scripts/presentation.nginx staging/usr/share/bigbluebutton/nginx
##
. ./opts-$DISTRO.sh
#
# Build package
fpm -s dir -C ./staging -n $PACKAGE \
--version $VERSION --epoch $EPOCH \
--post-install before-install.sh \
--after-install after-install.sh \
--description "BigBlueButton presentation recording format" \
$DIRECTORIES \
$OPTS \
-d 'yq (>= 3)' -d 'yq (<< 4)'