bigbluebutton-Github/build/packages-template/bbb-libreoffice-docker/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

46 lines
1.4 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)
DIRS="/usr/share/bbb-libreoffice /usr/share/bbb-libreoffice-conversion"
for dir in $DIRS; do
mkdir -p staging$dir
DIRECTORIES="$DIRECTORIES --directories $dir"
done
##
if [ $DISTRO != "amzn2" ]; then
mkdir -p staging/etc/sudoers.d
cp assets/zzz-bbb-docker-libreoffice staging/etc/sudoers.d/zzz-bbb-docker-libreoffice
fi
cp assets/etherpad-export.sh staging/usr/share/bbb-libreoffice-conversion/etherpad-export.sh
cp assets/convert-local.sh staging/usr/share/bbb-libreoffice-conversion/convert-local.sh
cp assets/convert-remote.sh staging/usr/share/bbb-libreoffice-conversion/convert-remote.sh
chmod 755 staging/usr/share/bbb-libreoffice-conversion/convert-local.sh
chmod 755 staging/usr/share/bbb-libreoffice-conversion/convert-remote.sh
chmod 755 staging/usr/share/bbb-libreoffice-conversion/etherpad-export.sh
cp -r docker staging/usr/share/bbb-libreoffice
##
. ./opts-$DISTRO.sh
fpm -s dir -C ./staging -n $PACKAGE \
--version $VERSION --epoch $EPOCH \
--after-install after-install.sh \
--before-remove before-remove.sh \
--after-remove after-remove.sh \
--description "BigBlueButton setup for LibreOffice running in docker" \
$DIRECTORIES \
$OPTS