Deb: release numbers (18.04) -> codenames (bionic)

This commit is contained in:
Dmitry Maksyoma 2021-01-28 22:10:46 +13:00
parent e5b8d4df11
commit 070458d302
20 changed files with 47 additions and 46 deletions

View File

@ -5,10 +5,12 @@ set -e
cd "$(dirname "$0")/.."
. builder/os_ver_cli.sh
docker build -t debbuilder_${os}:${os_ver} -f \
builder/dockerfile.${os}${os_ver_dockerfile}.deb.build .
docker build -t debbuilder_${os}:${os_codename} -f \
builder/dockerfile.${os}_${os_codename}.deb.build .
deb_output_dir=$(cd .. && 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 "$deb_output_dir":/src --user $L_UID:$L_GID debbuilder_${os}:${os_ver} /bin/bash -c '/src/*/builder/build-deb-inside-docker'
docker run --rm -v "$deb_output_dir":/src --user $L_UID:$L_GID \
debbuilder_${os}:${os_codename} /bin/bash -c \
'/src/*/builder/build-deb-inside-docker'

View File

@ -5,8 +5,8 @@ set -e
cd "$(dirname "$0")/.."
os=$(lsb_release -is | tr '[:upper:]' '[:lower:]')
os_ver=$(lsb_release -rs)
os_dir="builder/build/${os}_${os_ver}"
os_codename=$(lsb_release -cs)
os_dir="builder/build/${os_codename}"
dpkg-buildpackage -us -uc -b
mkdir -p "$os_dir"

View File

@ -13,13 +13,13 @@ cd "$(dirname "$0")/.."
build_www_dir
docker pull "$os_image"
docker build -t kasmvncbuilder:$os_ver \
-f builder/dockerfile.${os}${os_ver_dockerfile}.build .
docker build -t kasmvncbuilder:$os_codename \
-f builder/dockerfile.${os}_${os_codename}.build .
mkdir -p builder/build
docker run -v /tmp:/build --rm kasmvncbuilder:$os_ver
docker run -v /tmp:/build --rm kasmvncbuilder:$os_codename
L_GID=$(id -g)
L_UID=$(id -u)
tarball_name="kasmvnc.${os}_${os_ver}.tar.gz"
tarball_name="kasmvnc.${os}_${os_codename}.tar.gz"
chown $L_UID:$L_GID /tmp/$tarball_name
mv /tmp/$tarball_name $PWD/builder/build/

View File

@ -67,4 +67,4 @@ mv release/maketarball3 release/maketarball
make servertarball
cp kasmvnc*.tar.gz /build/kasmvnc.${KASMVNC_BUILD_OS}_${KASMVNC_BUILD_OS_VER}.tar.gz
cp kasmvnc*.tar.gz /build/kasmvnc.${KASMVNC_BUILD_OS}_${KASMVNC_BUILD_OS_CODENAME}.tar.gz

View File

@ -1,7 +1,7 @@
FROM debian:buster
ENV KASMVNC_BUILD_OS debian
ENV KASMVNC_BUILD_OS_VER 10
ENV KASMVNC_BUILD_OS_CODENAME buster
ENV XORG_VER 1.20.10
ENV DEBIAN_FRONTEND noninteractive

View File

@ -1,4 +1,4 @@
FROM ubuntu:18.04
FROM debian:buster-slim
ENV DISPLAY=:1 \
VNC_PORT=8443 \
@ -20,8 +20,8 @@ ENV DISPLAY=:1 \
OMP_WAIT_POLICY=PASSIVE \
SHELL=/bin/bash \
SINGLE_APPLICATION=0 \
KASMVNC_BUILD_OS=ubuntu \
KASMVNC_BUILD_OS_VER=18.04
KASMVNC_BUILD_OS=debian \
KASMVNC_BUILD_OS_CODENAME=buster
EXPOSE $VNC_PORT

View File

@ -1,7 +1,7 @@
FROM ubuntu:18.04
ENV KASMVNC_BUILD_OS ubuntu
ENV KASMVNC_BUILD_OS_VER 18.04
ENV KASMVNC_BUILD_OS_CODENAME bionic
RUN sed -i 's$# deb-src$deb-src$' /etc/apt/sources.list

View File

@ -1,4 +1,4 @@
FROM ubuntu:18.04
FROM ubuntu:bionic
RUN apt-get update && \
apt-get -y install vim build-essential devscripts equivs

View File

@ -1,4 +1,4 @@
FROM ubuntu:20.04
FROM ubuntu:bionic
ENV DISPLAY=:1 \
VNC_PORT=8443 \
@ -21,7 +21,7 @@ ENV DISPLAY=:1 \
SHELL=/bin/bash \
SINGLE_APPLICATION=0 \
KASMVNC_BUILD_OS=ubuntu \
KASMVNC_BUILD_OS_VER=18.04
KASMVNC_BUILD_OS_CODENAME=bionic
EXPOSE $VNC_PORT

View File

@ -21,7 +21,7 @@ ENV DISPLAY=:1 \
SHELL=/bin/bash \
SINGLE_APPLICATION=0 \
KASMVNC_BUILD_OS=ubuntu \
KASMVNC_BUILD_OS_VER=18.04
KASMVNC_BUILD_OS_CODENAME=bionic
EXPOSE $VNC_PORT
@ -39,8 +39,8 @@ COPY startup/ $STARTUPDIR
### START CUSTOM STUFF ####
COPY build/kasmvnc.${KASMVNC_BUILD_OS}_${KASMVNC_BUILD_OS_VER}.tar.gz /tmp/
RUN tar -xzvf /tmp/kasmvnc.${KASMVNC_BUILD_OS}_${KASMVNC_BUILD_OS_VER}.tar.gz --strip 1 -C /
COPY build/kasmvnc.${KASMVNC_BUILD_OS}_${KASMVNC_BUILD_OS_CODENAME}.tar.gz /tmp/
RUN tar -xzvf /tmp/kasmvnc.${KASMVNC_BUILD_OS}_${KASMVNC_BUILD_OS_CODENAME}.tar.gz --strip 1 -C /
### END CUSTOM STUFF ###

View File

@ -1,7 +1,7 @@
FROM ubuntu:20.04
FROM ubuntu:focal
ENV KASMVNC_BUILD_OS ubuntu
ENV KASMVNC_BUILD_OS_VER 20.04
ENV KASMVNC_BUILD_OS_CODENAME focal
ENV XORG_VER 1.20.8
ENV DEBIAN_FRONTEND noninteractive

View File

@ -1,4 +1,4 @@
FROM ubuntu:20.04
FROM ubuntu:focal
ENV DEBIAN_FRONTEND noninteractive

View File

@ -1,4 +1,4 @@
FROM debian:buster-slim
FROM ubuntu:focal
ENV DISPLAY=:1 \
VNC_PORT=8443 \
@ -21,7 +21,7 @@ ENV DISPLAY=:1 \
SHELL=/bin/bash \
SINGLE_APPLICATION=0 \
KASMVNC_BUILD_OS=ubuntu \
KASMVNC_BUILD_OS_VER=18.04
KASMVNC_BUILD_OS_CODENAME=bionic
EXPOSE $VNC_PORT

View File

@ -1,4 +1,4 @@
FROM ubuntu:20.04
FROM ubuntu:focal
ENV DISPLAY=:1 \
VNC_PORT=8443 \
@ -21,7 +21,7 @@ ENV DISPLAY=:1 \
SHELL=/bin/bash \
SINGLE_APPLICATION=0 \
KASMVNC_BUILD_OS=ubuntu \
KASMVNC_BUILD_OS_VER=20.04
KASMVNC_BUILD_OS_CODENAME=focal
EXPOSE $VNC_PORT
@ -39,8 +39,8 @@ COPY startup/ $STARTUPDIR
### START CUSTOM STUFF ####
COPY build/kasmvnc.${KASMVNC_BUILD_OS}_${KASMVNC_BUILD_OS_VER}.tar.gz /tmp/
RUN tar -xzvf /tmp/kasmvnc.${KASMVNC_BUILD_OS}_${KASMVNC_BUILD_OS_VER}.tar.gz --strip 1 -C /
COPY build/kasmvnc.${KASMVNC_BUILD_OS}_${KASMVNC_BUILD_OS_CODENAME}.tar.gz /tmp/
RUN tar -xzvf /tmp/kasmvnc.${KASMVNC_BUILD_OS}_${KASMVNC_BUILD_OS_CODENAME}.tar.gz --strip 1 -C /
### END CUSTOM STUFF ###

View File

@ -1,9 +1,8 @@
default_os=ubuntu
default_os_ver=18.04
default_os_codename=bionic
os=${1:-$default_os}
os_ver=${2:-$default_os_ver}
os_ver_dockerfile=`echo $os_ver | sed 's/\.//g'`
os_image="$os:$os_ver"
os_codename=${2:-$default_os_codename}
os_image="$os:$os_codename"
echo "Building for $os_image"

View File

@ -5,7 +5,8 @@ set -e
cd "$(dirname "$0")"
. ./os_ver_cli.sh
docker build --build-arg KASMVNC_PACKAGE_DIR="build/${os}_${os_ver}" \
-t kasmvnctester_${os}:$os_ver \
-f dockerfile.${os}${os_ver_dockerfile}.deb.test .
echo docker run -it -p 443:8443 --rm -e "VNC_USER=foo" -e "VNC_PW=bar" kasmvnctester_${os}:$os_ver
docker build --build-arg KASMVNC_PACKAGE_DIR="build/${os_codename}" \
-t kasmvnctester_${os}:$os_codename \
-f dockerfile.${os}_${os_codename}.deb.test .
echo docker run -it -p 443:8443 --rm -e "VNC_USER=foo" -e "VNC_PW=bar" \
kasmvnctester_${os}:$os_codename

View File

@ -4,12 +4,11 @@ set -e
cd "$(dirname "$0")"
os="debian"
os_ver="10"
os_ver_dockerfile="10"
os_codename="buster"
docker build --build-arg KASMVNC_PACKAGE_DIR="build/${os}_${os_ver}" \
-t kasmvnctester_barebones_${os}:$os_ver \
-f dockerfile.${os}${os_ver_dockerfile}.barebones.deb.test .
docker build --build-arg KASMVNC_PACKAGE_DIR="build/${os_codename}" \
-t kasmvnctester_barebones_${os}:$os_codename \
-f dockerfile.${os}_${os_codename}.barebones.deb.test .
echo
echo "You will be asked to set password. User name is docker."
docker run -it -p 443:8443 --rm kasmvnctester_barebones_${os}:$os_ver
docker run -it -p 443:8443 --rm kasmvnctester_barebones_${os}:$os_codename

View File

@ -1,6 +1,6 @@
TARGET_OS := $(shell lsb_release -is | tr '[:upper:]' '[:lower:]')
TARGET_OS_VER := $(shell lsb_release -rs)
TARBALL := builder/build/kasmvnc.$(TARGET_OS)_$(TARGET_OS_VER).tar.gz
TARGET_OS_CODENAME := $(shell lsb_release -cs)
TARBALL := builder/build/kasmvnc.$(TARGET_OS)_$(TARGET_OS_CODENAME).tar.gz
TAR_DATA := $(shell mktemp -d)
SRC := $(TAR_DATA)/usr/local
SRC_BIN := $(SRC)/bin