Rpm: automate rpm building with build-rpm

This commit is contained in:
Dmitry Maksyoma
2021-02-11 21:50:14 +13:00
parent d658f2b8a3
commit b97633ca10
6 changed files with 41 additions and 9 deletions

View File

@@ -8,9 +8,9 @@ cd "$(dirname "$0")/.."
docker build -t kasmvnc_rpmbuilder_${os}:${os_codename} -f \
builder/dockerfile.${os}_${os_codename}.rpm.build .
rpm_output_dir=$(cd .. && echo $PWD)
source_dir=$(echo $PWD)
L_UID=$(id -u) #Ubuntu already has UID env var, but this should work on all Linix systems
L_GID=$(id -g)
docker run --rm -v "$rpm_output_dir":/src --user $L_UID:$L_GID \
docker run --rm -v "$source_dir":/src --user $L_UID:$L_GID \
kasmvnc_rpmbuilder_${os}:${os_codename} /bin/bash -c \
'/src/*/builder/build-rpm-inside-docker'
'/src/builder/build-rpm-inside-docker'